1!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=719)}([function(t,e,n){var r=n(4),i=n(63),o=n(40),a=n(41),s=n(50),u=function(t,e,n){var c,h,l,f,d=t&u.F,p=t&u.G,g=t&u.S,_=t&u.P,m=t&u.B,y=p?r:g?r[e]||(r[e]={}):(r[e]||{}).prototype,v=p?i:i[e]||(i[e]={}),b=v.prototype||(v.prototype={});p&&(n=e);for(c in n)h=!d&&y&&void 0!==y[c],l=(h?y:n)[c],f=m&&h?s(l,r):_&&"function"==typeof l?s(Function.call,l):l,y&&a(y,c,l,t&u.U),v[c]!=l&&o(v,c,f),_&&b[c]!=l&&(b[c]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){"use strict";n.d(e,"c",function(){return r}),n.d(e,"b",function(){return s}),n.d(e,"d",function(){return u}),n.d(e,"a",function(){return c});var r,i=n(21),o=n(622),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Warrior=0]="Warrior"}(r=r||(r={}));var s;!function(t){t[t.Level=0]="Level",t[t.Scale=5]="Scale",t[t.MoveSpeed=6]="MoveSpeed",t[t.AttackInterval=7]="AttackInterval",t[t.AttackRange=8]="AttackRange",t[t.HealthPercentage=9]="HealthPercentage",t[t.CurrentHealth=10]="CurrentHealth",t[t.MaxHealth=11]="MaxHealth",t[t.ManaPercentage=12]="ManaPercentage",t[t.CurrentMana=13]="CurrentMana",t[t.MaxMana=14]="MaxMana",t[t.CurrentExperience=15]="CurrentExperience",t[t.MaxExperience=16]="MaxExperience",t[t.Armor=17]="Armor",t[t.PhysicalDamageReduce=18]="PhysicalDamageReduce",t[t.MinDamage=19]="MinDamage",t[t.MaxDamage=20]="MaxDamage",t[t.DodgeProbability=21]="DodgeProbability",t[t.MagicResistance=22]="MagicResistance",t[t.CritProbability=23]="CritProbability",t[t.CritDamageFactor=24]="CritDamageFactor",t[t.NonCombatHealTime=25]="NonCombatHealTime",t[t.DamageFactor=26]="DamageFactor",t[t.HealingAttackProbability=27]="HealingAttackProbability",t[t.HealPerSecond=28]="HealPerSecond",t[t.ExtraExperiencePerKill=29]="ExtraExperiencePerKill",t[t.DoubleCoinProbability=30]="DoubleCoinProbability",t[t.SpellDamageFactor=31]="SpellDamageFactor",t[t.Resource1DropProbability=32]="Resource1DropProbability",t[t.Class=101]="Class",t[t.Resource1=1001]="Resource1",t[t.Resource2=1002]="Resource2"}(s=s||(s={}));var u;!function(t){t[t.Absolute=0]="Absolute",t[t.Percentage=1]="Percentage"}(u=u||(u={}));var c=function(t){function e(e){var r=t.call(this,e)||this;r._formulas=Array.from(n.i(o.a)());var i=new Set;return Object.keys(s).filter(function(t){return Number.isInteger(Number(t))}).forEach(function(t){i.add(Number(t))}),r._formulas.forEach(function(t){i.delete(t.output)}),r._baseStats=i,r}return a(e,t),Object.defineProperty(e.prototype,"baseStats",{get:function(){return this._baseStats},enumerable:!0,configurable:!0}),e.prototype.compute=function(t,e){var n=this,r=new Map;t.forEach(function(t,i){r.set(i,n.applyModifiers(i,t,e))});for(var i=Array.from(this._formulas),o=[],a=new Map;i.length&&(i.forEach(function(t){if(t.input.every(function(t){return r.has(t)})){a.clear(),t.input.forEach(function(t){a.set(t,r.get(t).final)});var i=t.compute(a),s=n.applyModifiers(t.output,i,e);r.set(t.output,s)}else o.push(t)}),i.length!==o.length);)i=o,o=[];return r},e.prototype.describeStatModifier=function(t){var e=t.value>=0?"+":"-",n=t.value>=0?"-":"+",r=Math.abs(t.value).toFixed(),i=(100*Math.abs(t.value)).toFixed()+"%";switch(t.stat){case s.Armor:return t.type===u.Absolute?""+e+r+" Armor":""+e+i+" Armor";case s.AttackInterval:return t.type===u.Absolute?""+n+(1/Math.abs(t.value)).toFixed(2)+" Attack Speed":""+n+i+" Attack Speed";case s.AttackRange:return t.type===u.Absolute?""+e+r+" Attack Range":""+e+i+" Attack Range";case s.Class:return t.type,u.Absolute,"Changes Your Class";case s.CritDamageFactor:return t.type,u.Absolute,""+e+i+" Crit Hit Damage";case s.CritProbability:return t.type,u.Absolute,""+e+i+" Crit Hit Chance";case s.CurrentExperience:return t.type===u.Absolute?""+e+r+" Experiences":""+e+i+" Experiences";case s.CurrentHealth:return t.type===u.Absolute?""+e+r+" HP":""+e+i+" HP";case s.CurrentMana:return t.type===u.Absolute?""+e+r+" MP":""+e+i+" MP";case s.DamageFactor:return t.type,u.Absolute,""+e+i+" Damage";case s.DodgeProbability:return t.type,u.Absolute,""+e+i+" Dodges";case s.HealthPercentage:return t.type,u.Absolute,""+e+i+" HP";case s.Level:return t.type===u.Absolute?""+e+r+" Levels":""+e+i+" Levels";case s.MagicResistance:return t.type===u.Absolute?""+e+i+" Magic Re
1sistance":""+e+i+" Magic Resistence";case s.ManaPercentage:return t.type,u.Absolute,""+e+i+" MP";case s.MaxDamage:return t.type===u.Absolute?""+e+r+" Max Damage":""+e+i+" Max Damage";case s.MaxExperience:return t.type===u.Absolute?""+e+r+" Max Experiences":""+e+i+" Max Experiences";case s.MaxHealth:return t.type===u.Absolute?""+e+r+" HP":""+e+i+" HP";case s.MaxMana:return t.type===u.Absolute?""+e+r+" Max MP":""+e+i+" Max MP";case s.MinDamage:return t.type===u.Absolute?""+e+r+" Min Damage":""+e+i+" Min Damage";case s.MoveSpeed:return t.type===u.Absolute?""+e+r+" Move Speed":""+e+i+" Move Speed";case s.NonCombatHealTime:return t.type===u.Absolute?""+e+r+" Heal Delay":""+e+i+" Heal Delay";case s.PhysicalDamageReduce:return t.type,u.Absolute,""+e+i+" Physical Damage Reduction";case s.Resource1:return t.type===u.Absolute?""+e+r+" Coins":""+e+i+" Coins";case s.Resource2:return t.type===u.Absolute?""+e+r+" Diamonds":""+e+i+" Diamonds";case s.Scale:return t.type,u.Absolute,""+e+i+" Size";case s.HealingAttackProbability:return t.type,u.Absolute,""+e+i+" Chance Of Healing Attacks";case s.HealPerSecond:return t.type===u.Absolute?""+e+i+" HP Per Second":e+"0 HP Per Second";case s.ExtraExperiencePerKill:return t.type===u.Absolute?""+e+r+" Experience Per Kill":e+"0 Experience Per Kill";case s.DoubleCoinProbability:return t.type===u.Absolute?""+e+i+" Chance of Double Coins":e+"0 Chance of Double Coins";case s.SpellDamageFactor:return t.type,u.Absolute,"Spells "+e+(100*Math.abs(t.value)).toFixed(1)+"%";case s.Resource1DropProbability:return t.type===u.Absolute?""+e+i+" Chance of Dropping Coins":e+"0 Chance of Dropping Coins"}},e.prototype.applyModifiers=function(t,e,n){var r=e;return n.forEach(function(n){if(n.stat===t)switch(n.type){case u.Absolute:r+=n.value;break;case u.Percentage:r+=e*n.value}}),{original:e,final:r}},e}(i.a)},function(t,e,n){"use strict";n.d(e,"c",function(){return r}),n.d(e,"b",function(){return s}),n.d(e,"d",function(){return u}),n.d(e,"a",function(){return h});var r,i=n(53),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};!function(t){t[t.Column=0]="Column",t[t.Row=1]="Row"}(r=r||(r={}));var s;!function(t){t[t.Start=0]="Start",t[t.Center=1]="Center",t[t.End=2]="End"}(s=s||(s={}));var u;!function(t){t[t.Start=0]="Start",t[t.Center=1]="Center",t[t.End=2]="End",t[t.Stretch=3]="Stretch"}(u=u||(u={}));var c={paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,flex:0},h=function(t){function e(e,n,r){void 0===n&&(n=[]),void 0===r&&(r={});var i=t.call(this,e)||this;return i._style=a({},c,r),i._parent=null,n.forEach(function(t){i.addChild(t)}),i}return o(e,t),e.prototype.addChild=function(n){t.prototype.addChild.call(this,n),n instanceof e&&(n._parent=this),this.requestLayout()},e.prototype.clearChildren=function(){t.prototype.clearChildren.call(this),this.requestLayout()},e.prototype.requestLayout=function(){if(this._parent){for(var t=this._parent;t&&t._parent;)t=t._parent;t.layoutChildren()}},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingTop",{get:function(){return this.getAbsoluteNumber(this.style.paddingTop,this._height,this._width,this._height)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingBottom",{get:function(){return this.getAbsoluteNumber(this.style.paddingBottom,this._height,this._width,this._height)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingLeft",{get:function(){return this.getAbsoluteNumber(this.style.paddingLeft,this._width,this._width,this._height)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingRight",{get:function(){return this.getAbsoluteNumber(this.style.paddingRight,this._width,this._width,this._height)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preferredWidth",{get:function(){return this.style.preferredWidth?this.getAbsoluteNumber(this.style.preferredWidth||0,this._parent?this._parent.width:0,this._parent?this._parent.width:0,this._parent?this._parent.height:0):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preferredHeight",{get:function(){return this.style.preferredHeight?this.getAbsoluteNumber(this.style.preferredHeight||0,this._parent?this._parent.height:0,this._parent?this._parent.width:0,this._parent?this._parent.height:0):null},enumerable:!0,configurable:!0}),e.prototype.sizeThatFits=function(t){var e=0,n=0,r={width:t.width-this.paddingLeft-this.paddingRight,height:t.height-this.paddingTop-this.paddingBottom};
1this._children.forEach(function(t){if(!t.disposed){var i=t.sizeThatFits(r);e=Math.max(e,i.width),n=Math.max(n,i.height)}});var i={width:Math.min(t.width,this.preferredWidth||e+this.paddingLeft+this.paddingRight),height:Math.min(t.height,this.preferredHeight||n+this.paddingTop+this.paddingBottom)};if(this.style.forceSquare){var o=Math.min(i.width,i.height);return{width:o,height:o}}return i},e.prototype.constructElement=function(){},e.prototype.resizeElement=function(){this.layoutChildren()},e.prototype.layoutChildren=function(){var t=this;this._children.forEach(function(e){e.disposed||(e.x=t.paddingLeft,e.y=t.paddingTop,e.resize(t._width-t.paddingLeft-t.paddingRight,t._height-t.paddingTop-t.paddingBottom))})},e.prototype.getAbsoluteNumber=function(t,e,n,r){if("string"===typeof t){var i=Number(t.substr(0,t.length-1));return"%"===t[t.length-1]?i/100*e:"u"===t[t.length-1]?i*this._pixiLayer.unitSize:"w"===t[t.length-1]?i*n:"h"===t[t.length-1]?i*r:i}return t||0},e}(i.a)},function(t,e,n){var r=n(10);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){"use strict";e.__esModule=!0;e.VERSION="4.6.0",e.PI_2=2*Math.PI,e.RAD_TO_DEG=180/Math.PI,e.DEG_TO_RAD=Math.PI/180,e.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},e.BLEND_MODES={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,NORMAL_NPM:17,ADD_NPM:18,SCREEN_NPM:19},e.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},e.SCALE_MODES={LINEAR:0,NEAREST:1},e.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},e.GC_MODES={AUTO:0,MANUAL:1},e.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,e.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;(charset=[\w-]+|base64))?,(.*)/i,e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},e.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},e.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},e.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},e.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.autoDetectRenderer=e.Application=e.Filter=e.SpriteMaskFilter=e.Quad=e.RenderTarget=e.ObjectRenderer=e.WebGLManager=e.Shader=e.CanvasRenderTarget=e.TextureUvs=e.VideoBaseTexture=e.BaseRenderTexture=e.RenderTexture=e.BaseTexture=e.TextureMatrix=e.Texture=e.Spritesheet=e.CanvasGraphicsRenderer=e.GraphicsRenderer=e.GraphicsData=e.Graphics=e.TextMetrics=e.TextStyle=e.Text=e.SpriteRenderer=e.CanvasTinter=e.CanvasSpriteRenderer=e.Sprite=e.TransformBase=e.TransformStatic=e.Transform=e.Container=e.DisplayObject=e.Bounds=e.glCore=e.WebGLRenderer=e.CanvasRenderer=e.ticker=e.utils=e.settings=void 0;var o=n(5);Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var a=n(29);Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})});var s=n(47);Object.defineProperty(e,"glCore",{enumerable:!0,get:function(){return i(s).default}});var u=n(173);Object.defineProperty(e,"Bounds",{enumerable:!0,get:function(){return i(u).default}});var c=n(245);Object.defineProperty(e,"DisplayObject",{enumerable:!0,get:function(){return i(c).default}});var h=n(110);Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return i(h).default}});var l=n(246);Object.defineProperty(e,"Transform",{enumerable:!0,get:function(){return i(l).default}});var f=n(247);Object.defineProperty(e,"TransformStatic",{enumerable:!0,get:function(){return i(f).default}});var d=n(174);Object.defineProperty(e,"TransformBase",{enumerable:!0,get:function(){return i(d).default}});var p=n(178);Object.defineProperty(e,"Sprite",{enumerable:!0,get:function(){return i(p).default}});var g=n(552);Object.defineProperty(e,"CanvasSpriteRenderer",{enumerable:!0,get:function(){return i(g).default}});var _=n(179);Object.defineProperty(e,"CanvasTinter",{enumerable:!0,get:function(){return i(_).default}});var m=n(554);Object.defineProperty(e,"SpriteRenderer",{enumerable:!0,get:function(){return i(m).default}});var y=n(556);Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i(y).default}});var v=n(258);Object.defineProperty(e,"TextStyle",{enumerable:!0,get:function(){return i(v).default}});var b=n(257);Object.defineProperty(e,"TextMetrics",{enumerable:!0,get:function(){return i(b).default}});var w=n(524);Object.defineProperty(e,"Graphics",{enumerable:!0,get:function(){return i(w).default}});var x=n(248);Object.defineProperty(e,"GraphicsData",{enumerable:!0,get:function(){return i(x).default}});var S=n(527);Object.defineProperty(e,"GraphicsRenderer",{enumerable:!0,get:function(){return i(S).default}});var T=n(525);Object.defineProperty(e,"CanvasGraphicsRenderer",{enumerable:!0,get:function(){return i(T).default}});var E=n(557);Object.defineProperty(e,"Spritesheet",{enumerable:!0,get:function(){return i(E).default}});var P=n(76);Object.defineProperty(e,"Texture",{enumerable:!0,get:function(){return i(P).default}});var O=n(260);Object.defineProperty(e,"TextureMatrix",{enumerable:!0,get:function(){return i(O).default}});var M=n(102);Object.defineProperty(e,"BaseTexture",{enumerable:!0,get:function(){return i(M).default}});var C=n(180);Object.defineProperty(e,"RenderTexture",{enumerable:!0,get:function(){return i(C).default}});var A=n(259);Object.defineProperty(e,"BaseRenderTexture",{enumerable:!0,get:function(){return i(A).default}});var I=n(262);Object.defineProperty(e,"VideoBaseTexture",{enumerable:!0,get:function(){return i(I).default}});var R=n(261);Object.defineProperty(e,"TextureUvs",{enumerable:!0,get:function(){return i(R).default}});var D=n(252);Object.defineProperty(e,"CanvasRenderTarget",{enumerable:!0,get:function(){return i(D).default}});var L=n(109);Object.defineProperty(e,"Shader",{enumerable:!0,get:function(){return i(L).default}});var k=n(112);Object.defineProperty(e,"WebGLManager",{enumerable:!0,get:function(){return i(k).default}});var F=n(134);Object.defineProperty(e,"ObjectRenderer",{enumerable:!0,get:function(){return i(F).default}});var N=n(135);Object.defineProperty(e,"RenderTarget",{enumerable:!0,get:function(){return i(N).default}});var B=n(256);Object.defineProperty(e,"Quad",{enumerable:!0,get:function(){return i(B).default}});var j=n(255);Object.defineProperty(e,"SpriteMaskFilter",{enumerable:!0,get:function(){return i(j).default}});var U=n(254);Object.defineProperty(e,"Filter",{enumerable:!0,get:function(){return i(U).default}});var H=n(243);Object.defineProperty(e,"Application",{enumerable:!0,get:function(){return i(H).default}});var W=n(244);Object.defineProperty(e,"autoDetectRenderer",{enumerable:!0,get:function(){return W.autoDetectRenderer}});var V=n(11),G=r(V),Y=n(181),z=r(Y),X=n(27),q=i(X),K=n(111),Z=i(K),J=n(133),$=i(J);e.settings=q.default,e.utils=G,e.ticker=z,e.CanvasRenderer=Z.default,e.WebGLRenderer=$.default},function(t,e,n){"use strict";n.d(e,"b",function(){return u}),n.d(e,"a",function(){return c});var r=n(2),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},a={flexDirection:r.c.Row,flexDirectionAlign:r.b.Start,crossDirectionAlign:r.d.Stretch},s=function(t){function e(e,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),t.call(this,e,n,o({},a,r))||this}return i(e,t),e.prototype.sizeThatFits=function(t){var e=this,n={width:Math.min(t.width,this.preferredWidth||t.width),height:Math.min(t.height,this.preferredHeight||t.height)},i={width:this.paddingLeft+this.paddingRight,height:this.paddingTop+this.paddingBottom},o=this.toFlexSize({width:Math.max(0,n.width-i.width),height:Math.max(0,n.height-i.height)}),a=o.flexDirection,s=0,u=0;
1return this._children.forEach(function(t){if(!t.disposed){var n=t.sizeThatFits(e.toUISize({flexDirection:a,crossDirection:o.crossDirection}));s=Math.max(s,e.style.flexDirection===r.c.Row?n.height:n.width);var i=e.toFlexSize(n);t instanceof r.a&&!t.style.flex?(a-=i.flexDirection,a=Math.max(0,a)):t instanceof r.a?u+=t.style.flex||0:u+=1}}),u>0&&(a=0),this._children.length>0&&0===s&&this.style.crossDirectionAlign===r.d.Stretch&&(s=o.crossDirection),this.style.flexDirection===r.c.Row?{width:Math.min(n.width,i.width+o.flexDirection-a),height:Math.min(n.height,i.height+s)}:{height:Math.min(n.height,i.height+o.flexDirection-a),width:Math.min(n.width,i.width+s)}},e.prototype.layoutChildren=function(){var t=this,e={width:this.paddingLeft+this.paddingRight,height:this.paddingTop+this.paddingBottom},n=this.toFlexSize({width:Math.max(0,this._width-e.width),height:Math.max(0,this._height-e.height)}),i=n.flexDirection,o=0,a=[];this._children.forEach(function(e){if(e.disposed)return void a.push({flexDirection:-1,crossDirection:-1});var s=e.sizeThatFits(t.toUISize({flexDirection:i,crossDirection:n.crossDirection})),u=t.toFlexSize(s);a.push(u),e instanceof r.a&&!e.style.flex?(i-=u.flexDirection,i=Math.max(0,i)):e instanceof r.a?o+=e.style.flex||0:o+=1});for(var s=i/o,u=o>0?0:this.style.flexDirectionAlign===r.b.Start?0:this.style.flexDirectionAlign===r.b.End?i:i/2,c=0;c<this._children.length;++c){var h=this._children[c];if(!h.disposed){var l={flexDirection:0,crossDirection:0};if(h instanceof r.a&&!h.style.flex?l.flexDirection=a[c].flexDirection:h instanceof r.a?l.flexDirection=s*(h.style.flex||0):l.flexDirection=s,l.crossDirection=this.style.crossDirectionAlign===r.d.Stretch?n.crossDirection:a[c].crossDirection,this.style.flexDirection===r.c.Row)switch(h.x=this.paddingLeft+u,this.style.crossDirectionAlign){case r.d.Stretch:case r.d.Start:h.y=this.paddingTop;break;case r.d.End:h.y=this.paddingTop+n.crossDirection-l.crossDirection;break;case r.d.Center:h.y=this.paddingTop+(n.crossDirection-l.crossDirection)/2}else switch(h.y=this.paddingTop+u,this.style.crossDirectionAlign){case r.d.Stretch:case r.d.Start:h.x=this.paddingLeft;break;case r.d.End:h.x=this.paddingLeft+n.crossDirection-l.crossDirection;break;case r.d.Center:h.x=this.paddingLeft+(n.crossDirection-l.crossDirection)/2}var f=this.toUISize(l);h.resize(f.width,f.height),u+=l.flexDirection}}},e.prototype.toFlexSize=function(t){return this.style.flexDirection===r.c.Row?{flexDirection:t.width,crossDirection:t.height}:{flexDirection:t.height,crossDirection:t.width}},e.prototype.toUISize=function(t){return this.style.flexDirection===r.c.Row?{width:t.flexDirection,height:t.crossDirection}:{height:t.flexDirection,width:t.crossDirection}},e}(r.a),u=function(t){function e(e,n,i){return void 0===n&&(n=[]),void 0===i&&(i={}),t.call(this,e,n,o({},i,{flexDirection:r.c.Row}))||this}return i(e,t),e}(s),c=function(t){function e(e,n,i){return void 0===n&&(n=[]),void 0===i&&(i={}),t.call(this,e,n,o({},i,{flexDirection:r.c.Column}))||this}return i(e,t),e}(s)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"c",function(){return x}),n.d(e,"d",function(){return S}),n.d(e,"a",function(){return T});var r,i=n(21),o=n(24),a=n(1),s=n(15),u=n(186),c=n(34),h=n(131),l=(n.n(h),n(95)),f=n(103),d=n(77),p=n(16),g=n(283),_=n(52),m=n(142),y=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},b=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}
1a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(t){t[t.Unknown=0]="Unknown",t[t.Male=1]="Male",t[t.Female=2]="Female"}(r=r||(r={}));var w;!function(t){t[t.DATA_VERSION=0]="DATA_VERSION",t[t.FIRST_DATA_VERSION=1]="FIRST_DATA_VERSION",t[t.NAME=5]="NAME",t[t.MODEL=10]="MODEL",t[t.TUTORIAL_STATE=20]="TUTORIAL_STATE",t[t.LAST_ACTIVE_TIME=30]="LAST_ACTIVE_TIME",t[t.FIRST_ACTIVE_TIME=31]="FIRST_ACTIVE_TIME",t[t.TOTAL_SESSIONS=32]="TOTAL_SESSIONS",t[t.CURRENT_ISLAND_LEVEL=41]="CURRENT_ISLAND_LEVEL",t[t.CHESTS_PURCHASED=50]="CHESTS_PURCHASED",t[t.ITEMS_UPGRADED=60]="ITEMS_UPGRADED",t[t.SPELL_SLOT_0=100]="SPELL_SLOT_0",t[t.EQUIPMENT_SLOT_0_DEPRECATED=200]="EQUIPMENT_SLOT_0_DEPRECATED",t[t.CHARACTER_STAT_0=300]="CHARACTER_STAT_0",t[t.INVENTORY_SLOT_0=1e3]="INVENTORY_SLOT_0"}(w=w||(w={}));var x=60,S=4,T=function(t){function e(e){var n=t.call(this,e)||this;return n._bufferedUpdates=new Map,n}return y(e,t),Object.defineProperty(e.prototype,"firstDataVersion",{get:function(){return this._data.firstDataVersion},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._data.model},set:function(t){this._data.model=t,this.bufferUpdate(w.MODEL,t.toFixed()),this.clearBufferedUpdates()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tutorialState",{get:function(){return this._data.tutorialState},set:function(t){this._data.tutorialState=t,this.bufferUpdate(w.TUTORIAL_STATE,t.toFixed()),this.clearBufferedUpdates()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastActiveTime",{get:function(){return this._data.lastActiveTime},enumerable:!0,configurable:!0}),e.prototype.triggerActiveTime=function(){var t=h().unix();this._data.lastActiveTime=t,this.bufferUpdate(w.LAST_ACTIVE_TIME,t.toFixed())},Object.defineProperty(e.prototype,"currentIslandLevel",{get:function(){return this._data.currentIslandLevel},set:function(t){this._data.currentIslandLevel=t,this.bufferUpdate(w.CURRENT_ISLAND_LEVEL,t.toFixed())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"chestsPurchased",{get:function(){return this._data.chestsPurchased},enumerable:!0,configurable:!0}),e.prototype.recordChestPurchase=function(){this._data.chestsPurchased++,this.bufferUpdate(w.CHESTS_PURCHASED,this._data.chestsPurchased.toFixed())},Object.defineProperty(e.prototype,"itemsUpgraded",{get:function(){return this._data.itemsUpgraded},enumerable:!0,configurable:!0}),e.prototype.recordItemUpgrade=function(){this._data.itemsUpgraded++,this.bufferUpdate(w.ITEMS_UPGRADED,this._data.itemsUpgraded.toFixed())},Object.defineProperty(e.prototype,"spellSlots",{get:function(){return this._data.spellSlots},enumerable:!0,configurable:!0}),e.prototype.setSpellSlot=function(t,e){t<0||t>=4||(this._data.spellSlots[t]=e,this.bufferUpdate(w.SPELL_SLOT_0+t,e.toFixed()),this.game.events.emit("spell_slots_updated"))},Object.defineProperty(e.prototype,"baseStats",{get:function(){return this._data.baseStats},enumerable:!0,configurable:!0}),e.prototype.setBaseStat=function(t,e){this._data.baseStats.set(t,e),this.bufferUpdate(w.CHARACTER_STAT_0+t,e.toFixed(2))},e.prototype.getEquipment=function(t){return this._data.inventorySlots.get(this.getEquipmentSlotInInventory(t))||null},e.prototype.equipItemFromSlot=function(t){if(!(t<0||t>=x)){var e=this.getInventoryItem(t);if(e){var n=this.getEquipmentSlotInInventory(e.baseModel.type),r=this._data.inventorySlots.get(n);this._data.inventorySlots.set(n,e),this._data.inventorySlots.set(t,r||null),this.bufferUpdate(w.INVENTORY_SLOT_0+n,JSON.stringify(e)),this.bufferUpdate(w.INVENTORY_SLOT_0+t,JSON.stringify(r||null)),this.clearBufferedUpdates(),this.game.events.emit("player_item_equipped"),this.game.events.emit("player_inventory_slot_updated",n,e),this.game.events.emit("player_inventory_slot_updated",t,r||null),p.a.logEvent("item_equipped",new Map([["equipment_type",c.a[e.baseModel.type]]]),null)}}},Object.defineProperty(e.prototype,"inventorySlots",{get:function(){return this._data.inventorySlots},enumerable:!0,configurable:!0}),e.prototype.isInventoryEmpty=function(){for(var t=0;t<x;++t)if(this.getInventoryItem(t))return!1;return!0},e.prototype.getInventoryItem=function(t){return t>=x+S||t<0?null:this._data.inventorySlots.get(t)||null},e.prototype.putItemIntoInventory=function(t,e){void 0===e&&(e=-1);var n=e;if(n<0)for(var r=0;r<x;++r){var i=this._data.inventorySlots.get(r);if(!i){n=r;break}}return n>=0?(this._data.inventorySlots.set(n,t),this.bufferUpdate(w.INVENTORY_SLOT_0+n,JSON.stringify(t)),this.clearBufferedUpdates(),this.game.events.emit("player_inventory_slot_updated",n,t),n):-1},e.prototype.upgradeItemAtSlot=function(t){if(!(t<0||t>=x+S)){var e=this._data.inventorySlots.get(t)||null;if(e&&n.i(f.a)(e)&&!((this.baseStats.get(a.b.Resource1)||0)<n.i(d.a)(e))){var r=n.i(f.b)(e);return this._data.inventorySlots.set(t,r),this.bufferUpdate(w.INVENTORY_SLOT_0+t,JSON.stringify(r)),this.game.events.emit("player_inventory_slot_updated",t,r),r}}},e.prototype.openChestFromSlot=function(t){if(!(t<0||t>=x)){var e=this.getInventoryItem(t);if(e&&e.baseModel.type===c.a.Chest&&e.chestOutput){var n=e.chestOutput;return this._data.inventorySlots.set(t,n),this.bufferUpdate(w.INVENTORY_SLOT_0+t,JSON.stringify(n)),this.game.events.emit("player_inventory_slot_updated",t,n),n}}},e.prototype.isSlotUpgradable=function(t){var e=this._data.inventorySlots.get(t)||null;return!!(e&&n.i(f.a)(e)&&(this.baseStats.get(a.b.Resource1)||0)>=n.i(d.a)(e))},e.prototype.isAnyEquipmentUpgradable=function(){for(var t=x;t<x+S;++t)if(this.isSlotUpgradable(t))return!0;return!1},e.prototype.destroyItemAtSlot=function(t){if(!(t<0||t>=x)){this.getInventoryItem(t)&&(this._data.inventorySlots.set(t,null),this.bufferUpdate(w.INVENTORY_SLOT_0+t,JSON.stringify(null)),this.game.events.emit("player_inventory_slot_updated",t,null))}},e.prototype.persistInGlobalStorage=function(){this.game.getService(m.a).persistPlayerData(this.serializeData())},e.prototype.preloadServiceAsync=function(){return v(this,void 0,void 0,function(){return b(this,function(t){switch(t.label){case 0:return[4,this.fetchDataAsync()];case 1:return t.sent(),[2]}})})},e.prototype.startServiceAsync=function(){return v(this,void 0,void 0,function(){var t,e,n=this;return b(this,function(r){return t=(h().unix()-this._data.firstActiveTime)/3600/24,e={},t>=1&&t<2?e.d1="true":t>=7&&t<8&&(e.d7="true"),this._data.totalSessions++,this.bufferUpdate(w.TOTAL_SESSIONS,this._data.totalSessions.toFixed()),e.total_sessions=this._data.totalSessions.toFixed(),p.a.setUserProperty(e),this.game.events.on("switching_level",function(){n.triggerActiveTime(),n.clearBufferedUpdates()}),[2]})})},e.prototype.updateService=function(t){},e.prototype.disposeService=function(){this.flushData()},e.prototype.fetchDataAsync=function(){return v(this,void 0,void 0,function(){var t,e;return b(this,function(n){switch(n.label){case 0:return this.game.config.getNumberConfig(o.a.test_scene_level)>0?(this._data=this.getTestCharacterData(),[2]):[4,p.a.getPlayerDataAsync(this.listAllStorageKeys())];case 1:return t=n.sent(),"RC5"===(e=this.game.config.getBooleanConfig(o.a.reset_player_data)?"0":t.get(w.DATA_VERSION.toFixed())||"0")?[3,3]:(this.migrateDataVersion(t,e),[4,p.a.setPlayerDataAsync(t)]);case 2:n.sent(),n.label=3;case 3:return this._data=this.parseStoredData(t),[2]}})})},e.prototype.migrateDataVersion=function(t,e){switch(e){default:this.populateDefaultPlayerData(t);break;case"RC2":var n=t.get(w.MODEL.toFixed())||r.Unknown.toFixed();this.populateDefaultPlayerData(t),t.set(w.MODEL.toFixed(),n),t.set((w.CHARACTER_STAT_0+a.b.Resource2).toFixed(),"100"),t.set(w.FIRST_DATA_VERSION.toFixed(),"RC2");break;case"RC3":t.set(w.ITEMS_UPGRADED.toFixed(),"1");var i=Number(t.get(w.TUTORIAL_STATE.toFixed())||"0");i>l.a.WaitingForPlayerMove&&i<l.a.Finished&&t.set(w.TUTORIAL_STATE.toFixed(),l.a.Finished.toFixed());break;case"RC4":t.set(w.FIRST_DATA_VERSION.toFixed(),"RC4")}},e.prototype.flushData=function(){this.clearBufferedUpdates(),p.a.flushPlayerDataAsync()},e.prototype.serializeData=function(){var t=new Map([[w.DATA_VERSION.toFixed(),this._data.dataVersion],[w.FIRST_DATA_VERSION.toFixed(),this._data.firstDataVersion],[w.NAME.toFixed(),this._data.name],[w.MODEL.toFixed(),this._data.model.toFixed()],[w.TUTORIAL_STATE.toFixed(),this._data.tutorialState.toFixed()],[w.LAST_ACTIVE_TIME.toFixed(),this._data.lastActiveTime.toFixed()],[w.FIRST_ACTIVE_TIME.toFixed(),this._data.firstActiveTime.toFixed()],[w.TOTAL_SESSIONS.toFixed(),this._data.totalSessions.toFixed()],[w.CURRENT_ISLAND_LEVEL.toFixed(),this._data.currentIslandLevel.toFixed()],[w.CHESTS_PURCHASED.toFixed(),this._data.chestsPurchased.toFixed()],[w.ITEMS_UPGRADED.toFixed(),this._data.itemsUpgraded.toFixed()],[(w.SPELL_SLOT_0+0).toFixed(),this._data.spellSlots[0].toFixed()],[(w.SPELL_SLOT_0+1).toFixed(),this._data.spellSlots[1].toFixed()],[(w.SPELL_SLOT_0+2).toFixed(),this._data.spellSlots[2].toFixed()],[(w.SPELL_SLOT_0+3).toFixed(),this._data.spellSlots[3].toFixed()]]);
1return this._data.baseStats.forEach(function(e,n){t.set((w.CHARACTER_STAT_0+n).toFixed(),e.toFixed(2))}),this._data.inventorySlots.forEach(function(e,n){t.set((w.INVENTORY_SLOT_0+n).toFixed(),JSON.stringify(e))}),t},e.prototype.parseStoredData=function(t){var e={dataVersion:t.get(w.DATA_VERSION.toFixed())||"0",firstDataVersion:t.get(w.FIRST_DATA_VERSION.toFixed())||"0",name:t.get(w.NAME.toFixed())||"UNKNOWN",model:Number(t.get(w.MODEL.toFixed())||"0"),lastActiveTime:Number(t.get(w.LAST_ACTIVE_TIME.toFixed())||"0"),firstActiveTime:Number(t.get(w.FIRST_ACTIVE_TIME.toFixed())||"0"),totalSessions:t.has(w.TOTAL_SESSIONS.toFixed())?Number(t.get(w.TOTAL_SESSIONS.toFixed())||"0"):1,tutorialState:Number(t.get(w.TUTORIAL_STATE.toFixed())||"0"),currentIslandLevel:Number(t.get(w.CURRENT_ISLAND_LEVEL.toFixed())||"1"),chestsPurchased:Number(t.get(w.CHESTS_PURCHASED.toFixed())||"0"),itemsUpgraded:Number(t.get(w.ITEMS_UPGRADED.toFixed())||"0"),spellSlots:[Number(t.get((w.SPELL_SLOT_0+0).toFixed())||"0"),Number(t.get((w.SPELL_SLOT_0+1).toFixed())||"0"),Number(t.get((w.SPELL_SLOT_0+2).toFixed())||"0"),Number(t.get((w.SPELL_SLOT_0+3).toFixed())||"0")],baseStats:new Map,inventorySlots:new Map};
1this.game.getService(a.a).baseStats.forEach(function(n){var r=Number(t.get((w.CHARACTER_STAT_0+n).toFixed())||"0");e.baseStats.set(n,r)});for(var n=0;n<x+S;++n)e.inventorySlots.set(n,JSON.parse(t.get((w.INVENTORY_SLOT_0+n).toFixed())||"null"));return e},e.prototype.populateDefaultPlayerData=function(t){t.clear(),t.set(w.DATA_VERSION.toFixed(),"RC5"),t.set(w.FIRST_DATA_VERSION.toFixed(),"RC5"),t.set(w.NAME.toFixed(),p.a.getPlayerName()),t.set(w.MODEL.toFixed(),r.Unknown.toFixed()),t.set(w.TUTORIAL_STATE.toFixed(),l.a.WaitingForFirstKill.toFixed()),t.set(w.LAST_ACTIVE_TIME.toFixed(),"0"),t.set(w.FIRST_ACTIVE_TIME.toFixed(),h().unix().toFixed()),t.set(w.TOTAL_SESSIONS.toFixed(),"0"),t.set(w.CURRENT_ISLAND_LEVEL.toFixed(),"1"),t.set(w.CHESTS_PURCHASED.toFixed(),"0"),t.set(w.ITEMS_UPGRADED.toFixed(),"0"),t.set((w.SPELL_SLOT_0+0).toFixed(),s.a.Empty.toFixed()),t.set((w.SPELL_SLOT_0+1).toFixed(),s.a.Empty.toFixed()),t.set((w.SPELL_SLOT_0+2).toFixed(),s.a.Empty.toFixed()),t.set((w.SPELL_SLOT_0+3).toFixed(),s.a.Empty.toFixed()),u.a.forEach(function(e,n){t.set((w.CHARACTER_STAT_0+n).toFixed(),e.toFixed(2))}),t.set((w.CHARACTER_STAT_0+a.b.Resource1).toFixed(),d.b.toFixed()),t.set((w.CHARACTER_STAT_0+a.b.Resource2).toFixed(),d.c.toFixed());for(var e=0;e<x+S;++e)t.set((w.INVENTORY_SLOT_0+e).toFixed(),"null");t.set((w.INVENTORY_SLOT_0+this.getEquipmentSlotInInventory(c.a.Weapon)).toFixed(),JSON.stringify(n.i(f.c)()))},e.prototype.listAllStorageKeys=function(){var t=[w.DATA_VERSION,w.FIRST_DATA_VERSION,w.MODEL,w.TUTORIAL_STATE,w.LAST_ACTIVE_TIME,w.FIRST_ACTIVE_TIME,w.TOTAL_SESSIONS,w.CURRENT_ISLAND_LEVEL,w.CHESTS_PURCHASED,w.ITEMS_UPGRADED,w.SPELL_SLOT_0,w.SPELL_SLOT_0+1,w.SPELL_SLOT_0+2,w.SPELL_SLOT_0+3];
1this.game.getService(a.a).baseStats.forEach(function(e){t.push(w.CHARACTER_STAT_0+e)});for(var e=0;e<x+S;++e)t.push(w.INVENTORY_SLOT_0+e);return t.map(function(t){return t.toFixed()})},e.prototype.getTestCharacterData=function(){var t=Math.min(_.e,this.game.config.getNumberConfig(o.a.test_scene_level)||1),e=Math.min(_.a,this.game.config.getNumberConfig(o.a.test_character_level)||t),i=new Map([[a.b.Level,e],[a.b.CurrentExperience,0],[a.b.MaxHealth,100],[a.b.MaxMana,100],[a.b.DodgeProbability,0],[a.b.MagicResistance,0],[a.b.Armor,0],[a.b.Scale,1],[a.b.MoveSpeed,180],[a.b.AttackRange,10],[a.b.AttackInterval,1],[a.b.HealthPercentage,1],[a.b.ManaPercentage,1],[a.b.MinDamage,0],[a.b.MaxDamage,0],[a.b.CritProbability,.05],[a.b.CritDamageFactor,1.5],[a.b.NonCombatHealTime,3],[a.b.DamageFactor,1],[a.b.Resource1,999999],[a.b.Resource2,999999],[a.b.Class,a.c.Warrior],[a.b.HealingAttackProbability,0],[a.b.HealPerSecond,0],[a.b.ExtraExperiencePerKill,0],[a.b.DoubleCoinProbability,0],[a.b.SpellDamageFactor,1],[a.b.Resource1DropProbability,0]]);return n.i(g.a)(e).forEach(function(t,e){i.set(e,t)}),{dataVersion:"RC5",firstDataVersion:"RC5",name:"TEST",baseStats:i,model:r.Female,tutorialState:l.a.Finished,lastActiveTime:0,firstActiveTime:0,totalSessions:0,currentIslandLevel:t,chestsPurchased:0,itemsUpgraded:0,spellSlots:[s.a.Empty,s.a.Empty,s.a.Empty,s.a.Empty],inventorySlots:new Map([[this.getEquipmentSlotInInventory(c.a.Weapon),n.i(f.c)()],[0,n.i(f.d)(1,c.b.Common)],[1,n.i(f.d)(1,c.b.Rare)],[2,n.i(f.d)(1,c.b.Epic)],[3,n.i(f.e)(1,c.b.Common)],[4,n.i(f.e)(1,c.b.Rare)],[5,n.i(f.e)(1,c.b.Epic)],[6,n.i(f.f)(1,c.b.Common)],[7,n.i(f.f)(1,c.b.Rare)],[8,n.i(f.f)(1,c.b.Epic)],[9,n.i(f.g)(1,c.b.Common)],[10,n.i(f.g)(1,c.b.Rare)],[11,n.i(f.g)(1,c.b.Epic)],[12,n.i(f.d)(10,c.b.Common)],[13,n.i(f.d)(10,c.b.Common)]])}},e.prototype.getEquipmentSlotInInventory=function(t){switch(t){default:return x+S+1;case c.a.Helmet:return x+0;case c.a.Weapon:return x+1;case c.a.Torso:return x+2;case c.a.Boots:return x+3}}
1,e.prototype.bufferUpdate=function(t,e){this._bufferedUpdates.set(t.toFixed(),e)},e.prototype.clearBufferedUpdates=function(){this._data.tutorialState>=l.a.WaitingForBossKill&&(p.a.setPlayerDataAsync(this._bufferedUpdates),this._bufferedUpdates.clear())},e}(i.a)},function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(){return++B}function a(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function s(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)}function u(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}function c(t,e){var n=E.default.RETINA_PREFIX.exec(t);return n?parseFloat(n[1]):void 0!==e?e:1}function h(t){var e=S.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,encoding:e[3]?e[3].toLowerCase():void 0,data:e[4]}}function l(t){var e=S.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase()}function f(t){var e=S.SVG_SIZE.exec(t),n={};return e&&(n[e[1]]=Math.round(parseFloat(e[3])),n[e[5]]=Math.round(parseFloat(e[7]))),n}function d(){j=!0}function p(t){if(!j){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+S.VERSION+" - \u2730 "+t+" \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("PixiJS "+S.VERSION+" - "+t+" - http://www.pixijs.com/");j=!0}}function g(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,r}catch(t){return!1}}function _(t){return 0===t?0:t<0?-1:1}function m(){var t=void 0;for(t in U)U[t].destroy();for(t in H)H[t].destroy()}function y(){var t=void 0;for(t in U)delete U[t];for(t in H)delete H[t]}function v(t,e){return W[e?1:0][t]}function b(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var n=t>>16&255,r=t>>8&255,i=255&t;return n=n*e+.5|0,r=r*e+.5|0,i=i*e+.5|0,(255*e<<24)+(n<<16)+(r<<8)+i}function w(t,e,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e):(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=e,n}function x(t,e,n,r){return n=n||new Float32Array(4),n[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,(r||void 0===r)&&(n[0]*=e,n[1]*=e,n[2]*=e),n[3]=e,n}e.__esModule=!0,e.premultiplyBlendMode=e.BaseTextureCache=e.TextureCache=e.mixins=e.pluginTarget=e.EventEmitter=e.removeItems=e.isMobile=void 0,e.uid=o,e.hex2rgb=a,e.hex2string=s,e.rgb2hex=u,e.getResolutionOfUrl=c,e.decomposeDataUri=h,e.getUrlFileExtension=l,e.getSvgSize=f,e.skipHello=d,e.sayHello=p,e.isWebGLSupported=g,e.sign=_,e.destroyTextureCache=m,e.clearTextureCache=y,e.correctBlendMode=v,e.premultiplyTint=b,e.premultiplyRgba=w,e.premultiplyTintToRgba=x;var S=n(5),T=n(27),E=i(T),P=n(59),O=i(P),M=n(564),C=i(M),A=n(563),I=r(A),R=n(171),D=r(R),L=n(612),k=i(L),F=n(561),N=i(F),B=0,j=!1;e.isMobile=D,e.removeItems=k.default,e.EventEmitter=O.default,e.pluginTarget=C.default,e.mixins=I;var U=e.TextureCache=Object.create(null),H=e.BaseTextureCache=Object.create(null),W=e.premultiplyBlendMode=(0,N.default)()},function(t,e,n){var r=n(128)("wks"),i=n(92),o=n(4).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){"use strict";n.d(e,"i",function(){return r}),n.d(e,"j",function(){return i}),n.d(e,"k",function(){return o}
1),n.d(e,"l",function(){return a}),n.d(e,"h",function(){return s}),n.d(e,"g",function(){return u}),n.d(e,"f",function(){return c}),n.d(e,"o",function(){return h}),n.d(e,"a",function(){return l}),n.d(e,"n",function(){return f}),n.d(e,"p",function(){return d}),n.d(e,"m",function(){return p}),n.d(e,"e",function(){return g}),n.d(e,"b",function(){return _}),n.d(e,"c",function(){return m}),n.d(e,"d",function(){return y});var r=16777215,i=28893,o=10696174,a=16744448,s=7421984,u=3612943,c=16051128,h=10845268,l=16007990,f=16771899,d=16733986,p=9159498,g=16007990,_=65280,m=16771899,y=16777215},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r={smallPaddingValue:"0.05u",smallPadding:{paddingTop:"0.05u",paddingBottom:"0.05u",paddingLeft:"0.05u",paddingRight:"0.05u"},mediumPaddingValue:"0.1u",mediumPadding:{paddingTop:"0.1u",paddingBottom:"0.1u",paddingLeft:"0.1u",paddingRight:"0.1u"},largePaddingValue:"0.2u",largePadding:{paddingTop:"0.2u",paddingBottom:"0.2u",paddingLeft:"0.2u",paddingRight:"0.2u"},extraLargePaddingValue:"0.5u",extraLargePadding:{paddingTop:"0.5u",paddingBottom:"0.5u",paddingLeft:"0.5u",paddingRight:"0.5u"},smallSizeValue:"0.5u",smallSquare:{preferredWidth:"0.5u",preferredHeight:"0.5u"},mediumSizeValue:"1u",mediumSquare:{preferredWidth:"1u",preferredHeight:"1u"},largeSizeValue:"1.3u",largeSquare:{preferredWidth:"1.3u",preferredHeight:"1.3u"},extraLargeSizeValue:"1.8u",extraLargeSquare:{preferredWidth:"1.8u",preferredHeight:"1.8u"}}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return y});var r,i=n(664),o=n(289),a=n(286),s=n(32),u=n(287),c=n(633),h=n(634),l=n(285),f=n(627),d=n(628),p=n(624),g=n(623),_=n(635);!function(t){t[t.Empty=0]="Empty",t[t.Smash=1]="Smash",t[t.Stomp=2]="Stomp",t[t.Burn=3]="Burn",t[t.Strong=4]="Strong",t[t.StunAttack=5]="StunAttack",t[t.Shockwave=6]="Shockwave",t[t.Clone=7]="Clone",t[t.SpinKill=8]="SpinKill",t[t.BossStomp=1002]="BossStomp",t[t.BossShockwave=1003]="BossShockwave",t[t.PlayingWithFriends=10001]="PlayingWithFriends"}(r=r||(r={}));var m=function(){function t(){this._spells=new Map([[r.Empty,new i.a],[r.Smash,new i.b(r.Smash,"Smash","Smash the enemy \nwith full force and\ndeal extra damage.",s.c,s.d,i.c.Slot0,function(t){return t.targetController.isTargetInAttackRange},!0,a.a)],[r.Stomp,new i.b(r.Stomp,"Stomp","Stomp the ground and\ndeal damage to\nall enemies nearby.",s.e,s.f,i.c.Slot1,function(){return!0},!0,u.a)],[r.BossStomp,new i.b(r.BossStomp,"Stomp","",1,1,i.c.Slot1,function(){return!0},!1,p.a)],[r.BossShockwave,new i.b(r.BossShockwave,"Shockwave","",1,1,i.c.Slot1,function(){return!0},!1,g.a)],[r.Burn,new i.d(r.Burn,"Guardians","Summon stone guardians which\ndeal damage to all nearby\nenemies every second.",s.g,s.h,i.c.Slot2,function(){return!0},!0,c.a)],[r.Strong,new i.d(r.Strong,"Bloodlust","Significantly increase\nyour damage and\nattack speed.",s.i,s.j,i.c.Slot3,function(){return!0},!0,o.a)],[r.StunAttack,new i.b(r.StunAttack,"Stun","Throw a rock to your enemy,\nstun it for a few seconds\nand deal minor damage.",s.k,s.l,i.c.Slot0,function(t){return t.targetController.hasTarget},!0,d.a)],[r.Shockwave,new i.b(r.Shockwave,"Shockwave","Send a wave of force\nwhich damages all enemies\nin front of you.",s.m,s.n,i.c.Slot1,function(){return!0},!0,l.a)],[r.Clone,new i.d(r.Clone,"Clone","\nMake a clone of yourself.\n",s.o,s.p,i.c.Slot2,function(){return!0},!0,h.a)],[r.SpinKill,new i.b(r.SpinKill,"Whirl","Spin like a whirlwind and\ndeal massive damage to\nall enemies nearby.",s.q,s.r,i.c.Slot3,function(){return!0},!0,f.a)],[r.PlayingWithFriends,new i.d(r.PlayingWithFriends,"Playing With Friends","Significantly increase\nyour damage and size.",1,1,i.c.Any,function(){return!0},!1,_.a)]])}return t.prototype.listSpells=function(){return Array.from(this._spells.values())},t.prototype.getSpell=function(t){var e=this._spells.get(t);if(e)return e;throw new Error("spell does not exist.")},t}(),y=new m},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(681),i=n(680),o=function(){switch(n.i({NODE_ENV:"production",PUBLIC_URL:""}).REACT_APP_TARGET){default:case"HTML":return new r.a;case"FBINSTANT":return new i.a}}()},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return h}),n.d(e,"c",function(){return l});var r,i=n(53),o=n(2),a=n(23),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},c={fontFamily:"Passion One",strokeThickness:0,stroke:"#212121"};!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(r=r||(r={}));var h=function(t){function e(e,n,i,o,a){void 0===n&&(n=""),void 0===i&&(i=16777215),void 0===o&&(o=r.Center),void 0===a&&(a=c);var s=t.call(this,e)||this;return s._textString=n,s._textColor=i,s._align=o,s._style=a,s._scale=1,s}return s(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this._textString},set:function(t){this._textString=t,this._text.text=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return Number(this._text.style.fill)},set:function(t){this._text.style.fill=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale",{set:function(t){this._scale!==t&&(this._scale=t,this._text.scale.set(t,t))},enumerable:!0,configurable:!0}),e.prototype.constructElement=function(){this._text=new PIXI.Text,this._text.style=new PIXI.TextStyle(u({},c,this._style,{fontSize:this.height,lineHeight:this.height,fill:this._textColor})),this._text.text=this._textString,this.resizeText(),this._element.addChild(this._text),this._text.displayGroup=this._pixiLayer.guiTextDisplayGroup},e.prototype.resizeElement=function(){switch(this.resizeText(),this._align){default:case r.Center:this._text.anchor.set(.5,.5),this._text.position.set(this.width/2,this.height/2);break;case r.Left:this._text.anchor.set(0,.5),this._text.position.set(0,this._height/2);break;case r.Right:this._text.anchor.set(1,.5),this._text.position.set(this.width,this._height/2)}},e.prototype.resizeText=function(){for(var t=1,e=0;e<this._text.text.length;++e)"\n"===this._text.text.charAt(e)&&t++;this._text.style.fontSize=this.height/t,this._text.style.lineHeight=this.height/t,this._text.scale.set(.75,.75)},e}(i.a),l=function(t){function e(e,n,i){void 0===n&&(n=""),void 0===i&&(i=16777215);var s=this,u=new h(e,n.toUpperCase(),i,r.Center,{strokeThickness:6});return s=t.call(this,e,[new a.a(e,"banner"),new o.a(e,[u],{paddingTop:"5%",paddingBottom:"40%"})])||this,s._text=u,s}return s(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this._text.text},set:function(t){this._text.text=t},enumerable:!0,configurable:!0}),e}(o.a)},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(3),i=n(204),o=n(58),a=Object.defineProperty;e.f=n(18)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(57),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(22),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Prom
1ise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},s=function(t){function e(e){var n=t.call(this,e)||this;return n._active=!1,n}return i(e,t),e.prototype.preloadAsync=function(){return o(this,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return[4,this.preloadServiceAsync()];case 1:return t.sent(),[2]}})})},e.prototype.startAsync=function(){return o(this,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return[4,this.startServiceAsync()];case 1:return t.sent(),this._active=!0,[2]}})})},e.prototype.updateGameObject=function(t){this.updateService(t)},e.prototype.disposeGameObject=function(){this.disposeService()},e.prototype.preloadServiceAsync=function(){return o(this,void 0,void 0,function(){return a(this,function(t){return[2]})})},e.prototype.startServiceAsync=function(){return o(this,void 0,void 0,function(){return a(this,function(t){return[2]})})},e.prototype.updateService=function(t){},e.prototype.disposeService=function(){},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(59),i=(n.n(r),function(){function t(e){this.game=e,t.nextId||(t.nextId=1),this._id=(t.nextId++).toFixed(),this._active=!0,this._disposed=!1,this._timeSinceCreated=0,this._components=[],this._events=new r.EventEmitter,this.game.addChild(this)}return t.prototype.dispose=function(){this._disposed||(this._events.removeAllListeners(),this.game.removeChild(this),this._components.forEach(function(t){t.dispose()}),this.disposeGameObject(),this._active=!1,this._disposed=!0)},t.prototype.update=function(t){!this._disposed&&this._active&&(this._components.forEach(function(e){e.update(t)}),this.updateGameObject(t),this._timeSinceCreated+=t)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},set:function(t){this._active=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){return this._events},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"components",{get:function(){return this._components},enumerable:!0,configurable:!0}),t.prototype.updateGameObject=function(t){},t.prototype.disposeGameObject=function(){},t}())},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return a});var r=n(53),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n,r,i){void 0===r&&(r=16777215),void 0===i&&(i=0);var o=t.call(this,e)||this;return o._textureName=n,o._tint=r,o._rotation=i,o}return i(e,t),Object.defineProperty(e.prototype,"sprite",{get:function(){return this._sprite},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale",{set:function(t){this._sprite.width=this._width*t,this._sprite.height=this._height*t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textureName",{get:function(){return this._textureName},set:function(t){this._textureName!==t&&(this._textureName=t,this._sprite&&(this._sprite.texture=PIXI.loader.resources.atlas.textures[this._textureName],this.resizeElement()))},enumerable:!0,configurable:!0}),e.prototype.constructElement=function(){var t=PIXI.loader.resources.atlas.textures[this._textureName];this._sprite=new PIXI.Sprite(t),this._sprite.anchor.set(.5),this._sprite.position.set(this._width/2,this._height/2),this._sprite.rotation=this._rotation,this._sprite.tint=this._tint,this._element.addChild(this._sprite),this._sprite.displayGroup=this._pixiLayer.guiImageDisplayGroup},e.prototype.resizeElement=function(){this._sprite.scale.set(this._width/this._sprite.texture.width,this._height/this._sprite.texture.height),this._sprite.position.set(this._width/2,this._height/2)},e.prototype.sizeThatFits=function(t){return{width:Math.min(t.width,1),height:Math.min(t.height,1)}},e}(r.a),a=function(t){function e(e,n,r,i,o,a){void 0===r&&(r=!1),void 0===i&&(i=1),void 0===o&&(o=16777215),void 0===a&&(a=0);var s=t.call(this,e)||this;return s._texture=n,s._repeatTexture=r,s._tileScale=i,s._tint=o,s._rotation=a,s}return i(e,t),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._sprite.texture=t},enumerable:!0,configurable:!0}),e.prototype.constructElement=function(){if(this._repeatTexture){var t=new PIXI.extras.TilingSprite(this._texture,this.width,this.height);t.tileScale.set(this._tileScale),this._sprite=t}else this._sprite=new PIXI.Sprite(this._texture),this._sprite.anchor.set(.5),this._sprite.position.set(this._width/2,this._height/2),this._sprite.rotation=this._rotation;this._sprite.tint=this._tint,this._element.addChild(this._sprite),this._sprite.displayGroup=this._pixiLayer.guiImageDisplayGroup},e.prototype.resizeElement=function(){this._sprite.width=this.width,this._sprite.height=this.height,this._repeatTexture||this._sprite.position.set(this._width/2,this._height/2)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"c",function(){return r}),n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o}
1),n.d(e,"d",function(){return a});var r;!function(t){t[t.Earth=0]="Earth",t[t.Fire=1]="Fire"}(r=r||(r={}));var i;!function(t){t[t.debug_layer=0]="debug_layer",t[t.render_fps=1]="render_fps",t[t.reset_player_data=2]="reset_player_data",t[t.show_bounding_box=3]="show_bounding_box",t[t.test_scene_level=4]="test_scene_level",t[t.test_character_level=5]="test_character_level",t[t.test_equipment_level=6]="test_equipment_level",t[t.disable_cooldown=7]="disable_cooldown",t[t.in_context=8]="in_context"}(i=i||(i={}));var o;!function(t){t[t.Idle=0]="Idle",t[t.Run=1]="Run",t[t.Attack1=2]="Attack1",t[t.Attack2=3]="Attack2",t[t.Stunned=4]="Stunned",t[t.Smash=5]="Smash",t[t.Cast=6]="Cast",t[t.Hit=7]="Hit",t[t.Die=8]="Die",t[t.Stomp=9]="Stomp",t[t.Victory1=10]="Victory1"}(o=o||(o={}));var a;!function(t){t[t.Head=0]="Head",t[t.Body=1]="Body",t[t.LeftHand=2]="LeftHand",t[t.RightHand=3]="RightHand",t[t.LeftFoot=4]="LeftFoot",t[t.RightFoot=5]="RightFoot"}(a=a||(a={}))},function(t,e,n){"use strict";n.d(e,"c",function(){return m}),n.d(e,"a",function(){return y}),n.d(e,"d",function(){return v}),n.d(e,"e",function(){return b}),n.d(e,"b",function(){return w}),n.d(e,"f",function(){return x});var r=n(23),i=n(38),o=n(17),a=n(2),s=n(7),u=n(73),c=n(1),h=n(13),l=n(70),f=n(9),d=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},g=5,_=function(t){function e(e,n,r,i){void 0===i&&(i={});var o=t.call(this,e,n,i)||this;return o._isPressed=!1,r&&o.events.on("click",r),o}return d(e,t),Object.defineProperty(e.prototype,"isPressed",{get:function(){return this._isPressed},set:function(t){this._isPressed=t},enumerable:!0,configurable:!0}),e.prototype.constructElement=function(){var t=this,e=this.getClickableChild();e.interactive=!0,e.on("mousedown",function(){t.handleMouseDown()}),e.on("mouseup",function(){t.handleMouseUp(!0)}),e.on("mouseupoutside",function(){t.handleMouseUp(!1)}),e.on("touchstart",function(){t.handleMouseDown()}),e.on("touchend",function(){t.handleMouseUp(!0)}),e.on("touchendoutside",function(){t.handleMouseUp(!1)})},e.prototype.getClickableChild=function(){return this._element},e.prototype.handleMouseDown=function(){this._isPressed=!0,this._element.x+=1,this._element.y+=2},e.prototype.handleMouseUp=function(t){this._isPressed&&(this.isPressed=!1,this._element.x-=1,this._element.y-=2,t&&(this.events.emit("click"),this.game.getService(l.a).playOnce("button_press")))},e}(a.a),m=function(t){function e(e,n,i){var u=this,c=new r.a(e,"radio_button_checked");return u=t.call(this,e,[new s.a(e,[new s.b(e,[new a.a(e,[new r.a(e,"radio_button_bg"),new a.a(e,[c],{paddingTop:"19%",paddingBottom:"19%",paddingLeft:"19%",paddingRight:"19%"})],{forceSquare:!0,preferredHeight:"100%",preferredWidth:"100h"})],{flex:1,flexDirectionAlign:a.b.Center}),new a.a(e,[new o.a(e,i,16777215,o.b.Center,{strokeThickness:4})],{preferredHeight:"40%"})])],n)||this,u._isChecked=!1,u._checkImage=c,u._checkImage.element.visible=!1,u}return d(e,t),Object.defineProperty(e.prototype,"isChecked",{get:function(){return this._isChecked},set:function(t){this._isChecked=t,this._checkImage.element.visible=t},enumerable:!0,configurable:!0}),e}(_),y=function(t){function e(e,n,i,o,u,c,h){void 0===u&&(u={}),void 0===c&&(c=0),void 0===h&&(h=!0);var l=this,f=o?new r.a(e,o):null,d=new r.a(e,i,16777215,c),g=[];return f&&g.push(f),g.push(new s.b(e,[new a.a(e,[d],p({},u,{preferredHeight:"100%",preferredWidth:"100h",forceSquare:!0}))],{flexDirectionAlign:a.b.Center})),l=t.call(this,e,g,n)||this,l._background=f,l._foreground=d,l._backgroundClickable=h,l}return d(e,t),e.prototype.getClickableChild=function(){return this._backgroundClickable&&this._background?this._background.element:this._foreground.element},Object.defineProperty(e.prototype,"foreground",{get:function(){return this._foreground},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return this._background},enumerable:!0,configurable:!0}),e}(_),v=function(t){function e(e,n,i){var u=this,l=(e.getService(f.a).baseStats.get(c.b.Resource1)||0)>=i,d=new o.a(e,i.toFixed(),l?16777215:h.a,o.b.Right,{strokeThickness:4}),p=new r.a(e,"plus");return u=t.call(this,e,[new r.a(e,"button_1"),new a.a(e,[p],{paddingLeft:"15%",paddingRight:"15%",paddingBottom:"30%"}),new s.a(e,[new s.b(e,[d,new a.a(e,[new r.a(e,"coin_single")],{preferredWidth:"0.3u",preferredHeight:"0.3u"})],{preferredHeight:"0.5u",paddingLeft:"10%",paddingRight:"10%",paddingBottom:"5%",crossDirectionAlign:a.d.Center})],{flexDirectionAlign:a.b.End})],n)||this,u._plusSign=p,u._costText=d,u._absoluteTime=0,u._cost=i,u}return d(e,t),Object.defineProperty(e.prototype,"cost",{get:function(){return this._cost},set:function(t){this._cost=t,this._costText.text=t.toFixed()},enumerable:!0,configurable:!0}),e.prototype.updateElement=function(){var t=(this.game.getService(f.a).baseStats.get(c.b.Resource1)||0)>=this.cost;this._costText.color=t?16777215:h.a,this._plusSign.scale=t?1+.2*(1+Math.sin(this._absoluteTime/1e3*Math.PI*4)):1,this._absoluteTime+=this.game.engine.getDeltaTime()},e}(_),b=function(t){function e(e,i,s){var c=this,h=n.i(u.a)(s),l=new r.a(e,"button_2"),f=new r.a(e,"rounded_square_white"),d=new r.a(e,"button_1"),p=new r.a(e,h.iconName),g=new o.a(e,s?"Lv."+s.itemLevel.toFixed():"",16777215,o.b.Right,{strokeThickness:3});return c=t.call(this,e,[l,f,new a.a(e,[d,p,new a.a(e,[g],{paddingTop:"60%",paddingRight:"10%"})],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],i)||this,f.sprite.tint=h.rarityColor,s?l.element.visible=!1:f.element.visible=!1,
1c._highlight=!1,c._absoluteTime=0,c._rarityFrame=f,c._emptyFrame=l,c._foreground=p,c._levelText=g,c}return d(e,t),Object.defineProperty(e.prototype,"highlight",{get:function(){return this._highlight},set:function(t){this._highlight=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"item",{get:function(){return this._item},set:function(t){this._item=t;var e=n.i(u.a)(t);this._rarityFrame.sprite.tint=e.rarityColor,this._foreground.textureName=e.iconName,t?(this._emptyFrame.element.visible=!1,this._rarityFrame.element.visible=!0,this._levelText.text="Lv."+t.itemLevel.toFixed()):(this._emptyFrame.element.visible=!0,this._rarityFrame.element.visible=!1,this._levelText.text="")},enumerable:!0,configurable:!0}),e.prototype.updateElement=function(t){this._highlight?(this._rarityFrame.scale=1+.1*Math.sin(2*this._absoluteTime%1e3/1e3*Math.PI),this._rarityFrame.element.alpha=.5+.5*Math.cos(2*this._absoluteTime%1e3/1e3*Math.PI/2)):(this._rarityFrame.scale=1,this._rarityFrame.element.alpha=1),this._absoluteTime+=this.game.engine.getDeltaTime()},e}(_),w=function(t){function e(e,n,i,s){var u=this,c=new r.a(e,s),h=new o.a(e,i,16777215);return u=t.call(this,e,[c,new a.a(e,[h],{paddingTop:"15%",paddingBottom:"15%"})],n)||this,u._text=h,u._badges=0,u._lastTimeWithoutBadge=0,u._absoluteTime=0,u}return d(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},enumerable:!0,configurable:!0}),e.prototype.addBadge=function(t){void 0===t&&(t=1),this._badges+=t},e.prototype.clearBadges=function(){this._badges=0,this._text.scale=1},e.prototype.updateElement=function(t){if(this._badges>0){var e=(this._absoluteTime-this._lastTimeWithoutBadge)%2e3;this._text.scale=e<300?1+.3*Math.sin(Math.PI*e/300):e<600?1+.15*Math.sin(Math.PI*(e-300)/300):1}else this._lastTimeWithoutBadge=this._absoluteTime;this._absoluteTime+=this.game.engine.getDeltaTime()},e}(_),x=function(t){function e(e,n,i,o){void 0===o&&(o={});var a=this,s=new r.b(e,i);return a=t.call(this,e,[s],n,o)||this,a._image=s,a}return d(e,t),Object.defineProperty(e.prototype,"texture",{get:function(){return this._image.texture},set:function(t){this._image.texture=t},enumerable:!0,configurable:!0}),e}(_);(function(t){function e(e,n,r,a,s,u){void 0===a&&(a=16777215),void 0===s&&(s=6323595),void 0===u&&(u={});var c=this,h=new o.a(e,r,a),l=new i.a(e,s,1,g);return c=t.call(this,e,[l,h],n,u)||this,c._badges=0,c._lastTimeWithoutBadge=0,c._text=h,c._background=l,c}d(e,t),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._background.color},set:function(t){this._background.color=t},enumerable:!0,configurable:!0}),e.prototype.addBadge=function(t){void 0===t&&(t=1),this._badges+=t},e.prototype.clearBadges=function(){this._badges=0,this._text.scale=1},e.prototype.updateElement=function(t){if(this._badges>0){var e=(this._timeSinceCreated-this._lastTimeWithoutBadge)%3e3;this._text.scale=e<500?1+.5*Math.sin(Math.PI*e/500):e<1e3?1+.3*Math.sin(Math.PI*(e-500)/500):1}else this._lastTimeWithoutBadge=this._timeSinceCreated}})(_),function(t){function e(e,n,o,u,c){void 0===u&&(u=6323595),void 0===c&&(c={});var h=this,l=new r.b(e,o),f=new i.a(e,u,1,g);return h=t.call(this,e,[f,new s.b(e,[new a.a(e,[l],{forceSquare:!0})],{flexDirectionAlign:a.b.Center})],n,c)||this,h._background=f,h}d(e,t),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._background.color},set:function(t){this._background.color=t},enumerable:!0,configurable:!0})}(_)},function(t,e,n){var r=n(55);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(562),o=r(i),a=n(560),s=r(a);e.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,o.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,s.default)()}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return o}
1);var r;!function(t){t[t.Player=0]="Player",t[t.SummonnedByPlayer=1]="SummonnedByPlayer",t[t.Monsters=2]="Monsters",t[t.SummonnedByMonsters=3]="SummonnedByMonsters"}(r=r||(r={}));var i;!function(t){t[t.PlayerFriendly=0]="PlayerFriendly",t[t.Monsters=1]="Monsters"}(i=i||(i={}));var o=new Map([[r.Player,i.PlayerFriendly],[r.SummonnedByPlayer,i.PlayerFriendly],[r.Monsters,i.Monsters],[r.SummonnedByMonsters,i.Monsters]])},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(176);Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return r(i).default}});var o=n(250);Object.defineProperty(e,"ObservablePoint",{enumerable:!0,get:function(){return r(o).default}});var a=n(175);Object.defineProperty(e,"Matrix",{enumerable:!0,get:function(){return r(a).default}});var s=n(249);Object.defineProperty(e,"GroupD8",{enumerable:!0,get:function(){return r(s).default}});var u=n(534);Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return r(u).default}});var c=n(535);Object.defineProperty(e,"Ellipse",{enumerable:!0,get:function(){return r(c).default}});var h=n(536);Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return r(h).default}});var l=n(177);Object.defineProperty(e,"Rectangle",{enumerable:!0,get:function(){return r(l).default}});var f=n(537);Object.defineProperty(e,"RoundedRectangle",{enumerable:!0,get:function(){return r(f).default}})},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(93),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e){var n=t.call(this,e)||this;return n._character=e,n._activated=!1,n}return i(e,t),e.prototype.activate=function(){this.activateComponent(),this._activated=!0},e.prototype.deactivate=function(){this.deactivateComponent(),this._activated=!1},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return l}),n.d(e,"b",function(){return d});var r=n(136),i=(n.n(r),n(515)),o=(n.n(i),n(21)),a=n(48),s=n(16),u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},h=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},l=function(t){function e(e){var n=t.call(this,e)||this;return n._canvas2d=document.getElementById("game2d"),n._canvas3d=document.getElementById("game3d"),n._unitSize=f(n.game),n._renderer=new r.WebGLRenderer({width:n.game.engine.getRenderWidth(),height:n.game.engine.getRenderHeight(),view:n._canvas2d,transparent:!0,antialias:!1,forceFXAA:!0,resolution:1}),n._root=new r.Container,n._inputLayer=new r.Container,n._inputLayer.interactive=!0,n._inputLayer.hitArea=new r.Rectangle(0,0,n.game.engine.getRenderWidth(),n.game.engine.getRenderHeight()),n._root.addChild(n._inputLayer),n._inputLayer.on("tap",function(t){n.handleClick(t)}),n._inputLayer.on("click",function(t){n.handleClick(t)}),n._gameLayer=new r.Container,n._root.addChild(n._gameLayer),n._guiLayer=new r.Container,n._root.addChild(n._guiLayer),n._modalLayer=new r.Container,n._root.addChild(n._modalLayer),n._topmostLayer=new r.Container,n._root.addChild(n._topmostLayer),n._guiLayer.displayList=new r.DisplayList,n.guiImageDisplayGroup=new r.DisplayGroup(1,!1),n.guiCooldownMaskDisplayGroup=new r.DisplayGroup(5,!1),n.guiTextDisplayGroup=new r.DisplayGroup(10,!1),n}return u(e,t),Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameLayer",{get:function(){return this._gameLayer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"guiLayer",{get:function(){return this._guiLayer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modalLayer",{get:function(){return this._modalLayer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topmostLayer",{get:function(){return this._topmostLayer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unitSize",{get:function(){return this._unitSize},enumerable:!0,configurable:!0}),e.prototype.preloadServiceAsync=function(){var t="textures/2d-hd.json";return a.a.graphics===a.b.Low&&(t="textures/2d-md.json"),new Promise(function(e){r.loader.add("share_background","textures/share_background.jpg").add("atlas",t).add("player_photo",s.a.getPlayerPhotoURL()).load(function(){e()})})},e.prototype.startServiceAsync=function(){return c(this,void 0,void 0,function(){var t=this;return h(this,function(e){return this.game.events.on("resize",function(){t.resizeCanvas()}),[2]})})},e.prototype.updateService=function(t){this._renderer.render(this._root)},e.prototype.resizeCanvas=function(){this._renderer.resize(this.game.engine.getRenderWidth(),this.game.engine.getRenderHeight()),this._inputLayer.hitArea=new r.Rectangle(0,0,this.game.engine.getRenderWidth(),this.game.engine.getRenderHeight()),this._unitSize=f(this.game),this.events.emit("ui_resize",this._unitSize)},e.prototype.handleClick=function(t){this.events.emit("unhandled_click",t)},e}(o.a),f=function(t){return Math.min(t.engine.getRenderWidth()/10,9*t.engine.getRenderHeight()/16/10)},d=function(t,e){return void 0===e&&(e="atlas"),r.loader.resources[e].textures[t]}},function(t,e,n){"use strict";n.d(e,"d",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"a",function(){return o}
1),n.d(e,"b",function(){return a}),n.d(e,"U",function(){return s}),n.d(e,"V",function(){return u}),n.d(e,"f",function(){return c}),n.d(e,"e",function(){return h}),n.d(e,"S",function(){return l}),n.d(e,"R",function(){return f}),n.d(e,"T",function(){return d}),n.d(e,"Y",function(){return p}),n.d(e,"W",function(){return g}),n.d(e,"X",function(){return _}),n.d(e,"h",function(){return m}),n.d(e,"g",function(){return y}),n.d(e,"K",function(){return v}),n.d(e,"M",function(){return b}),n.d(e,"L",function(){return w}),n.d(e,"N",function(){return x}),n.d(e,"j",function(){return S}),n.d(e,"i",function(){return T}),n.d(e,"I",function(){return E}),n.d(e,"F",function(){return P}),n.d(e,"G",function(){return O}),n.d(e,"H",function(){return M}),n.d(e,"J",function(){return C}),n.d(e,"l",function(){return A}),n.d(e,"k",function(){return I}),n.d(e,"Z",function(){return R}),n.d(e,"E",function(){return D}),n.d(e,"D",function(){return L}),n.d(e,"n",function(){return k}),n.d(e,"m",function(){return F}),n.d(e,"C",function(){return N}),n.d(e,"z",function(){return B}),n.d(e,"B",function(){return j}),n.d(e,"A",function(){return U}),n.d(e,"p",function(){return H}),n.d(e,"o",function(){return W}),n.d(e,"w",function(){return V}),n.d(e,"x",function(){return G}),n.d(e,"y",function(){return Y}),n.d(e,"r",function(){return z}),n.d(e,"q",function(){return X}),n.d(e,"s",function(){return q}),n.d(e,"v",function(){return K}),n.d(e,"t",function(){return Z}),n.d(e,"u",function(){return J}),n.d(e,"Q",function(){return $}),n.d(e,"_0",function(){return Q}),n.d(e,"_1",function(){return tt}),n.d(e,"_2",function(){return et}),n.d(e,"_3",function(){return nt}),n.d(e,"_4",function(){return rt}),n.d(e,"_6",function(){return it}),n.d(e,"_5",function(){return ot}),n.d(e,"O",function(){return at}),n.d(e,"P",function(){return st});var r=2,i=2,o=.3,a=2.5,s=.4,u=100,c=5,h=3,l=50,f=.5,d=1.2,p=.6,g=80,_=20,m=8,y=13,v=10,b=.3,w=1,x=50,S=11,T=30,E=5,P=1.1,O=.3,M=0,C=300,A=14,I=3,R=1,D=2,L=.3,k=17,F=3,N=150,B=.4,j=2,U=30,H=20,W=13,V=10,G=.5,Y=1,z=23,X=30,q=3,K=50,Z=.9,J=2,$=4,Q=2,tt=3,et=.5,nt=.7,rt=.5,it=1500,ot=2,at=8,st=300},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return y});var r,i=n(1),o=n(30),a=n(28),s=n(16),u=n(24),c=n(97),h=n(69),l=n(36),f=n(52),d=n(716),p=n(96),g=n(9),_=n(692),m=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Alive=0]="Alive",t[t.PreDeath=1]="PreDeath",t[t.Dying=2]="Dying",t[t.Dead=3]="Dead"}(r=r||(r={}));var y=function(t){function e(e){var n=t.call(this,e)||this;return n._state=r.Alive,n._lastStateStartTime=0,n._currentTime=0,n}return m(e,t),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.activateComponent=function(){},e.prototype.deactivateComponent=function(){this._state=r.Alive,this._lastStateStartTime=0,this._currentTime=0},e.prototype.updateComponent=function(t){var e=this;switch(this._currentTime+=t,this._state){case r.Alive:this._character.statsController.getStatValue(i.b.HealthPercentage).final<=0&&(this._state=r.PreDeath,this._character.events.emit("died"),this._lastStateStartTime=this._currentTime,this._character.animationController.playState("die"),this._character.buffController&&this._character.buffController.endAllBuffs(),this._character.statBar&&(this._character.statBar.visible=!1),this._character.fakeShadow&&this._character.fakeShadow.deactivate(),this._character===this._character.level.player?(this._character.level.events.emit("player_died"),this._character.game.getService(p.a).enableBlackAndWhite(),this.game.getService(c.a).updateTimeScale(c.b.EndScreen,.5),this._character.level.soundManager.playOnce(this.game.getService(g.a).model===g.b.Male?"male_player_death":"female_player_death"),s.a.logEvent("character_state_dead",new Map([["dead_level",this._character.level.player.statsController.getStatValue(i.b.Level).final.toFixed()],["dead_island_level",this._character.level.index.toFixed()]]),null)):this._character.team===a.a.Monsters&&this._character.level.enemySpawner.bossSpawned&&this._character.level.soundManager.playOnce("boss_death"));break;case r.PreDeath:if(this._currentTime-this._lastStateStartTime>=1e3&&(this._state=r.Dying,this._lastStateStartTime=this._currentTime,this._character===this._character.level.player)){if(this.game.getService(g.a).itemsUpgraded>0&&this.game.getService(h.a).data.playerLifeIndex<f.i)if(s.a.getContextID())this.game.getService(l.a).restart(!0);else{s.a.logEvent("revive_invite_flow_started",new Map([["level",this._character.level.index.toFixed()]]),null);var n=new d.a(this._character.game);n.showWithTransitionAsync().then(function(){s.a.chooseContextAsync(!0).then(function(t){t&&s.a.logEvent("revive_invite_flow_completed",new Map([["level",e._character.level.index.toFixed()]]),null),e.game.getService(l.a).restart(!0)}).catch(function(){s.a.logEvent("revive_invite_flow_cancelled",new Map([["level",e._character.level.index.toFixed()]]),null),e.game.getService(l.a).restart(!0)})}).catch(function(){s.a.logEvent("revive_invite_flow_rejected",new Map([["level",e._character.level.index.toFixed()]]),null),e.game.getService(l.a).restart(!0)})}else new _.a(this._character.game)}break;case r.Dying:var o=2500,m=this._character.level.modelManager.getLoadedModel(this._character.config.modelId).config.animations;if(m){var y=m.get(u.b.Die);o=(y.lastFrame-y.firstFrame+1)/30/y.baseSpeed*1e3}this._currentTime-this._lastStateStartTime>=o&&(this._state=r.Dead,this._character.level.events.emit("character_dead_completed",this._character));break;case r.Dead:}},e.prototype.disposeComponent=function(){},e}(o.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i}),n.d(e,"c",function(){return o}
1);var r;!function(t){t[t.Common=0]="Common",t[t.Rare=2]="Rare",t[t.Epic=3]="Epic",t[t.Legendary=4]="Legendary"}(r=r||(r={}));var i;!function(t){t[t.None=0]="None",t[t.Helmet=1]="Helmet",t[t.Weapon=2]="Weapon",t[t.Torso=3]="Torso",t[t.Boots=4]="Boots",t[t.Chest=6]="Chest"}(i=i||(i={}));var o={baseModels:{Chest:{modelId:"Chest",name:"Treasure Chest",type:i.Chest},Stick_1:{modelId:"Stick_1",name:"Wooden Club",type:i.Weapon},Uncommon_Stick_1:{modelId:"Stick_1",name:"Uncommon Club",type:i.Weapon},Stick_2:{modelId:"Stick_2",name:"Spiky Club",type:i.Weapon},Stick_3:{modelId:"Stick_3",name:"Heavy Club",type:i.Weapon},Helmet_1:{modelId:"Helmet_1",name:"Skull Mask",type:i.Helmet},Helmet_2:{modelId:"Helmet_2",name:"Survivor's Mask",type:i.Helmet},Helmet_3:{modelId:"Helmet_3",name:"Hero's Mask",type:i.Helmet},Armor_1:{modelId:"Armor_1",name:"Armor of Bones",type:i.Torso},Boots_1:{modelId:"Boots_1",name:"Hero's Boots",type:i.Boots}}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";n.d(e,"a",function(){return S});var r=n(131),i=(n.n(r),n(21)),o=n(68),a=n(678),s=n(683),u=n(24),c=n(684),h=n(9),l=n(69),f=n(52),d=n(298),p=n(16),g=n(115),_=n(1),m=n(139),y=n(37),v=n(70),b=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},x=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},S=function(t){function e(e){var n=t.call(this,e)||this;return n._currentLevel=null,n._preparingLevel=null,n}return b(e,t),Object.defineProperty(e.prototype,"currentLevel",{get:function(){return this._currentLevel},enumerable:!0,configurable:!0}),e.prototype.disposeService=function(){this._currentLevel&&this._currentLevel.dispose(),this._preparingLevel&&this._preparingLevel.dispose()},e.prototype.startServiceAsync=function(){return w(this,void 0,void 0,function(){var t,e=this;return x(this,function(n){return this.game.config.getNumberConfig(u.a.test_scene_level)?this.prepareLevel(this.game.config.getNumberConfig(u.a.test_scene_level)):this.prepareLevel(this.getStartingLevelIndex()),this._preparingLevel&&(t=this._preparingLevel,this._currentLevel=t,t.warmUp(),t.events.once("ready",function(){p.a.logEvent("warmup_fps_report",new Map([["level_index",t.index.toFixed()]]),t.warmUpFps),(t.warmUpFps>=18||e.game.getService(h.a).model!==h.b.Unknown)&&p.a.startGameAsync().then(function(){e._loadingScreen=new s.a(e.game),e._loadingScreen.hide(),t.requestGameStart(),e.game.getService(v.a).loadAllSoundsAsync();var n=e.game.getService(h.a).baseStats.get(_.b.Level)||1,i=t.index,o=r().valueOf()-e.game.loadingStartTime;p.a.logEvent("game_session_start",new Map([["launch_source",e.game.launchSource],["player_level",n.toFixed()],["island_level",i.toFixed()],["context_type",p.a.getContextType()||"SOLO"],["loading_duration",(o/1e3).toFixed(2)]]),null),e.game.events.emit("game_loaded")})})),[2]})})},e.prototype.updateService=function(t){},e.prototype.restart=function(t){this.switchToLevel(t&&this._currentLevel?this._currentLevel.index:1);var e=this.game.getService(l.a).data;t?e.playerLifeIndex++:(e.enemiesKilled=0,e.highestDamage=0,e.resource1Collected=0,e.resource2Collected=0,e.playerLifeIndex=0,e.score=0,e.isNewPlayerFirstSession=!1)},e.prototype.getStartingLevelIndex=function(){return this.game.getService(h.a).currentIslandLevel},e.prototype.switchToLevel=function(t,e){var i=this;void 0===e&&(e=null),this.game.getService(y.a).mainDialog.close(),p.a.logEvent("level_switch_start",new Map([["next_level",t.toFixed()]]),null),this._loadingScreen.showWithTransition(function(){var o=e||n.i(c.a)(i.game,t);o.showWithTransitionAsync().then(function(){var e=r().valueOf(),a=n.i(m.c)(1e3),s=new Promise(function(e){if(i.game.getService(h.a).persistInGlobalStorage(),i.prepareLevel(t),i._currentLevel&&i._preparingLevel){var n=i._currentLevel,r=i._preparingLevel;n.events.emit("leaving"),i.game.events.emit("switching_level"),n.dispose(),r.warmUp(),i.game.getService(g.a).removeModelsExcept(r.config.allModels),i.game.getService(g.b).removeModelsExcept(r.config.allModels.filter(function(t){return t.inCharacterPreview})),i._currentLevel=r,i._preparingLevel=null,r.events.once("ready",function(){e()})}});Promise.all([a,s]).then(function(){var n=r().valueOf();o.hideWithTransitionAsync().then(function(){o.dispose(),i._loadingScreen.hideWithTransition(function(){if(i._currentLevel){i._currentLevel.requestGameStart();var r=(n-e)/1e3;p.a.logEvent("level_switch_end",new Map([["next_level",t.toFixed()]]),+r.toFixed(2))}})})})})})},e.prototype.onLevelEnded=function(){this._currentLevel&&(p.a.logEvent("game_fps_report",null,Math.floor(100*this.game.getService(d.a).averageFps)/100),this.game.getService(l.a).data.playerLifeIndex=0,this.switchToLevel(Math.min(f.e,this._currentLevel.index+1)))},e.prototype.prepareLevel=function(t){var e=this;this._preparingLevel=new o.b(this.game,t,this.getLevelConfig(t)),this._preparingLevel.events.once("ended",function(){e.onLevelEnded()});var n=this.getLevelConfig(Math.min(f.e,t+1));this._preparingLevel.events.once("boss_approaching",function(){e.game.getService(g.a).loadModels(n.allModels).then(function(){return e.game.getService(g.b).loadModels(n.allModels.filter(function(t){return t.inCharacterPreview}))})}),this._preparingLevel.startPreloading()},e.prototype.getLevelConfig=function(t){return n.i(a.a)(t,this.game)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(695),i=n(80),o=n(21),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Prom
1ise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},u=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},c=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.startServiceAsync=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return this.gameScreen=new r.a(this.game),this.mainDialog=new i.a(this.game),[2]})})},e.prototype.disposeService=function(){this.gameScreen.dispose(),this.mainDialog.dispose()},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(53),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n,r,i){void 0===r&&(r=1),void 0===i&&(i=0);var o=t.call(this,e)||this;return o._color=n,o._alpha=r,o._cornerRadius=i,o._graphics=new PIXI.Graphics,o._graphics.displayGroup=o._pixiLayer.guiImageDisplayGroup,o._element.addChild(o._graphics),o}return i(e,t),Object.defineProperty(e.prototype,"graphics",{get:function(){return this._graphics},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(t){this._color=t,this.resizeElement()},enumerable:!0,configurable:!0}),e.prototype.sizeThatFits=function(t){return{width:Math.min(1,t.width),height:Math.min(1,t.height)}},e.prototype.constructElement=function(){},e.prototype.resizeElement=function(){this._graphics.clear(),this._graphics.beginFill(this._color,this._alpha),this._cornerRadius>0?this._graphics.drawRoundedRect(0,0,this.width,this.height,this._cornerRadius):this._graphics.drawRect(0,0,this.width,this.height),this._graphics.endFill()},e}(r.a)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(19),i=n(88);t.exports=n(18)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(4),i=n(40),o=n(39),a=n(92)("src"),s=Function.toString,u=(""+s).split("toString");n(63).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(o(n,a)||i(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,n){var r=n(0),i=n(8),o=n(55),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){"use strict";n.d(e,"a",function(){return o}
1);var r=n(53),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n,r,i){void 0===r&&(r=Number.MAX_SAFE_INTEGER),void 0===i&&(i=16777215);var o=t.call(this,e)||this;return o.size=n,o._duration=r,o._tint=i,o._absoluteTime=0,o}return i(e,t),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint!==t&&(this._tint=t,this._sprite.tint=t)},enumerable:!0,configurable:!0}),e.prototype.end=function(){this._duration=this._absoluteTime+500},e.prototype.updateElement=function(t){if(this._sprite.rotation=this._absoluteTime/8e3*Math.PI*2,this._absoluteTime<=500){var e=this.size*this._absoluteTime/500;this._sprite.scale.set(e/this._sprite.texture.width)}else if(this._duration-this._absoluteTime<=500){var e=this.size*(this._duration-this._absoluteTime)/500;this._sprite.scale.set(e/this._sprite.texture.width)}this._absoluteTime+=this.game.engine.getDeltaTime(),this._absoluteTime>=this._duration&&this.dispose()},e.prototype.constructElement=function(){var t=PIXI.loader.resources.atlas.textures.shine;this._sprite=new PIXI.Sprite(t),this._sprite.anchor.set(.5,.5),this._sprite.scale.set(.001,.001),this._sprite.tint=this._tint,this._element.addChild(this._sprite),this._element.displayGroup=this._pixiLayer.guiImageDisplayGroup},e.prototype.resizeElement=function(){this._absoluteTime>500&&this._duration-this._absoluteTime>500&&this._sprite.scale.set(this.size/this._sprite.texture.width)},e}(r.a)},function(t,e,n){var r=n(108),i=n(88),o=n(46),a=n(58),s=n(39),u=n(204),c=Object.getOwnPropertyDescriptor;e.f=n(18)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(39),i=n(26),o=n(161)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(107),i=n(55);t.exports=function(t){return r(i(t))}},function(t,e,n){var r={createContext:n(520),setVertexAttribArrays:n(234),GLBuffer:n(516),GLFramebuffer:n(517),GLShader:n(518),GLTexture:n(233),VertexArrayObject:n(519),shader:n(521)};"undefined"!==typeof t&&t.exports&&(t.exports=r),"undefined"!==typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=r)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return u});var r,i=n(16),o=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};!function(t){t[t.Low=0]="Low",t[t.Mid=1]="Mid",t[t.High=2]="High"}(r=r||(r={}));var a={graphics:r.Mid,musicVolume:.5,soundVolume:1},s=function(){function t(){var t=window.localStorage.getItem("DEVICE_SETTINGS_DATA");t?(this._isConstructedFromDefault=!1,this._data=o({},a,JSON.parse(t)),this.flush()):(this._isConstructedFromDefault=!0,this._data=a,this.flush())}return t.prototype.setDefault=function(){if(this._isConstructedFromDefault){try{"ANDROID"===i.a.getOS()&&(this.graphics=r.Low)}catch(t){}this.graphics===r.Low&&(this.musicVolume=0)}},Object.defineProperty(t.prototype,"graphics",{get:function(){return this._data.graphics},set:function(t){this._data.graphics=t,this.flush()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"musicVolume",{get:function(){return this._data.musicVolume},set:function(t){this._data.musicVolume=t,this.flush()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"soundVolume",{get:function(){return this._data.soundVolume},set:function(t){this._data.soundVolume=t,this.flush()},enumerable:!0,configurable:!0}),t.prototype.flush=function(){window.localStorage.setItem("DEVICE_SETTINGS_DATA",JSON.stringify(this._data))},t}(),u=new s},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(35);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";n.d(e,"n",function(){return r}),n.d(e,"l",function(){return i}),n.d(e,"j",function(){return o}
1),n.d(e,"k",function(){return a}),n.d(e,"m",function(){return s}),n.d(e,"a",function(){return u}),n.d(e,"e",function(){return c}),n.d(e,"i",function(){return h}),n.d(e,"b",function(){return l}),n.d(e,"o",function(){return f}),n.d(e,"f",function(){return d}),n.d(e,"g",function(){return p}),n.d(e,"h",function(){return g}),n.d(e,"d",function(){return _}),n.d(e,"c",function(){return m});var r=3,i=10,o=1,a=24,s=23,u=30,c=55,h=0,l=103,f=2e3,d=.1,p=.1,g=.7,_=.1,m=function(t,e){return.01}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(31),i=n(22),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n._constructed=!1,n._pixiLayer=e.getService(r.a),n._children=[],n._element=new PIXI.Container,n._element.position.set(0,0),n._width=n.game.engine.getRenderWidth(),n._height=n.game.engine.getRenderHeight(),n}return o(e,t),e.prototype.addChild=function(t){t.ensureConstructed(),this._children.push(t),this._element.addChild(t._element)},e.prototype.getChildAt=function(t){return this._children.length<=t?null:this._children[t]},e.prototype.clearChildren=function(){this._children.forEach(function(t){t.dispose()}),this._children=[]},Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this._element.x},set:function(t){this._element.position.x=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._element.y},set:function(t){this._element.position.y=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.resize=function(t,e){this._width=Math.max(1,t),this._height=Math.max(1,e),this.ensureConstructed()&&this.resizeElement()},e.prototype.ensureConstructed=function(){return!!this._constructed||(this.constructElement(),this._constructed=!0,this.resizeElement(),!1)},e.prototype.updateGameObject=function(t){this.ensureConstructed(),this.updateElement(t)},e.prototype.disposeGameObject=function(){this.disposeElement(),this._children.forEach(function(t){t.dispose()}),this._element.destroy({children:!0})},e.prototype.sizeThatFits=function(t){return t},e.prototype.updateElement=function(t){},e.prototype.disposeElement=function(){},e}(i.a)},function(t,e,n){var r=n(50),i=n(107),o=n(26),a=n(20),s=n(146);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,h=4==t,l=6==t,f=5==t||l,d=e||s;return function(e,s,p){for(var g,_,m=o(e),y=i(m),v=r(s,p,3),b=a(y.length),w=0,x=n?d(e,b):u?d(e,0):void 0;b>w;w++)if((f||w in y)&&(g=y[w],_=v(g,w,m),t))if(n)x[w]=_;else if(_)switch(t){case 3:return!0;case 5:return g;case 6:return w;case 2:x.push(g)}else if(h)return!1;return l?-1:c||h?h:x}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(0),i=n(63),o=n(8);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(10);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){"use strict";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){this._events=new r,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,s="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)a.call(t,e)&&n.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=s?s+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},o.prototype.emit=function(t,e,n,r,i,o){var a=s?s+t:t;if(!this._events[a])return!1;var u,c,h=this._events[a],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,n),!0;case 4:return h.fn.call(h.context,e,n,r),!0;case 5:return h.fn.call(h.context,e,n,r,i),!0;case 6:return h.fn.call(h.context,e,n,r,i,o),!0}for(c=1,u=new Array(l-1);c<l;c++)u[c-1]=arguments[c];h.fn.apply(h.context,u)}else{var f,d=h.length;for(c=0;c<d;c++)switch(h[c].once&&this.removeListener(t,h[c].fn,void 0,!0),l){case 1:h[c].fn.call(h[c].context);break;case 2:h[c].fn.call(h[c].context,e);break;case 3:h[c].fn.call(h[c].context,e,n);break;case 4:h[c].fn.call(h[c].context,e,n,r);break;default:if(!u)for(f=1,u=new Array(l-1);f<l;f++)u[f-1]=arguments[f];
1h[c].fn.apply(h[c].context,u)}}return!0},o.prototype.on=function(t,e,n){var r=new i(e,n||this),o=s?s+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],r]:this._events[o].push(r):(this._events[o]=r,this._eventsCount++),this},o.prototype.once=function(t,e,n){var r=new i(e,n||this,!0),o=s?s+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],r]:this._events[o].push(r):(this._events[o]=r,this._eventsCount++),this},o.prototype.removeListener=function(t,e,n,i){var o=s?s+t:t;if(!this._events[o])return this;if(!e)return 0===--this._eventsCount?this._events=new r:delete this._events[o],this;var a=this._events[o];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||(0===--this._eventsCount?this._events=new r:delete this._events[o]);else{for(var u=0,c=[],h=a.length;u<h;u++)(a[u].fn!==e||i&&!a[u].once||n&&a[u].context!==n)&&c.push(a[u]);c.length?this._events[o]=1===c.length?c[0]:c:0===--this._eventsCount?this._events=new r:delete this._events[o]}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=s?s+t:t,this._events[e]&&(0===--this._eventsCount?this._events=new r:delete this._events[e])):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function(){return this},o.prefixed=s,o.EventEmitter=o,t.exports=o},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return i.exec(t).slice(1)};e.resolve=function(){for(var e="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return e=n(r(e.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),o="/"===a(t,-1);return t=n(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&o&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u<a;u++)if(i[u]!==o[u]){s=u;break}for(var c=[],u=s;u<i.length;u++)c.push("..");return c=c.concat(o.slice(s)),c.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var e=o(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},e.basename=function(t,e){var n=o(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){return o(t)[3]};var a="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(e,n(184))},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(291),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e){var n=t.call(this,e)||this;return n.statModifiers=[],n._timeSinceCreated=0,n._duration=n.duration,n}return i(e,t),e.prototype.start=function(){this.character.actionController.activeAction&&this.character.actionController.activeAction!==this&&this.character.actionController.activeAction.endEffect(),this.character.actionController.activeAction=this},e.prototype.end=function(){this.endEffect()},e.prototype.startEffect=function(){this.startAction(),this.character.events.emit("action_started",this)},e.prototype.updateEffect=function(t){this.updateAction(),this._progress+=t/1e3/this._duration,this._timeSinceCreated+=t},e.prototype.endEffect=function(){this.character.actionController.activeAction=null,this.endAction(),this.character.events.emit("action_ended",this),this.events.emit("ended")},e}(r.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return a});var r,i=n(21),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.BACKUP=0]="BACKUP",t[t.INTERESTING=1]="INTERESTING",t[t.AMAZING=2]="AMAZING"}(r=r||(r={}));var a=function(t){function e(e){var n=t.call(this,e)||this;return n._screenshotRequest=null,n._lastScreenshot=null,n._canvas=document.getElementById("game3d"),n}return o(e,t),e.prototype.takeScreenshot=function(t,e){void 0===e&&(e=80),(!this._screenshotRequest||t>this._screenshotRequest.priority)&&(this._screenshotRequest={priority:t,requestTime:this._timeSinceCreated+e,taken:!1})},Object.defineProperty(e.prototype,"lastScreenshot",{get:function(){return this._lastScreenshot},enumerable:!0,configurable:!0}),e.prototype.updateService=function(){var t=this;if(this._screenshotRequest&&!this._screenshotRequest.taken&&this._timeSinceCreated>=this._screenshotRequest.requestTime){var e="screenshot_"+this._timeSinceCreated.toFixed(),n=new PIXI.loaders.Loader;n.add(e,this._canvas.toDataURL()),n.load(function(){var r=n.resources[e].texture;t._lastScreenshot&&t._lastScreenshot.destroy(!0),t._lastScreenshot=r}),this._screenshotRequest.taken=!0}},e.prototype.disposeService=function(){this._screenshotRequest=null,this._lastScreenshot&&this._lastScreenshot.destroy(!0)},e}(i.a)},function(t,e){var n=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(225),i=n(0),o=n(128)("metadata"),a=o.store||(o.store=new(n(228))),s=function(t,e,n){var i=a.get(t);if(!i){if(!n)return;a.set(t,i=new r)}var o=i.get(e);if(!o){if(!n)return;i.set(e,o=new r)}return o},u=function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},c=function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},h=function(t,e,n,r){s(n,r,!0).set(t,e)},l=function(t,e){var n=s(t,e,!1),r=[];
vendor: 2,887 bytes, line 1
1return n&&n.forEach(function(t,e){r.push(e)}),r},f=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},d=function(t){i(i.S,"Reflect",t)};t.exports={store:a,map:s,has:u,get:c,set:h,keys:l,key:f,exp:d}},function(t,e,n){"use strict";if(n(18)){var r=n(84),i=n(4),o=n(8),a=n(0),s=n(130),u=n(167),c=n(50),h=n(82),l=n(88),f=n(40),d=n(89),p=n(57),g=n(20),_=n(223),m=n(91),y=n(58),v=n(39),b=n(106),w=n(10),x=n(26),S=n(153),T=n(85),E=n(45),P=n(86).f,O=n(169),M=n(92),C=n(12),A=n(54),I=n(117),R=n(129),D=n(170),L=n(98),k=n(123),F=n(90),N=n(145),B=n(196),j=n(19),U=n(44),H=j.f,W=U.f,V=i.RangeError,G=i.TypeError,Y=i.Uint8Array,z=Array.prototype,X=u.ArrayBuffer,q=u.DataView,K=A(0),Z=A(2),J=A(3),$=A(4),Q=A(5),tt=A(6),et=I(!0),nt=I(!1),rt=D.values,it=D.keys,ot=D.entries,at=z.lastIndexOf,st=z.reduce,ut=z.reduceRight,ct=z.join,ht=z.sort,lt=z.slice,ft=z.toString,dt=z.toLocaleString,pt=C("iterator"),gt=C("toStringTag"),_t=M("typed_constructor"),mt=M("def_constructor"),yt=s.CONSTR,vt=s.TYPED,bt=s.VIEW,wt=A(1,function(t,e){return Pt(R(t,t[mt]),e)}),xt=o(function(){return 1===new Y(new Uint16Array([1]).buffer)[0]}),St=!!Y&&!!Y.prototype.set&&o(function(){new Y(1).set({})}),Tt=function(t,e){var n=p(t);if(n<0||n%e)throw V("Wrong offset!");return n},Et=function(t){if(w(t)&&vt in t)return t;throw G(t+" is not a typed array!")},Pt=function(t,e){if(!(w(t)&&_t in t))throw G("It is not a typed array constructor!");return new t(e)},Ot=function(t,e){return Mt(R(t,t[mt]),e)},Mt=function(t,e){for(var n=0,r=e.length,i=Pt(t,r);r>n;)i[n]=e[n++];return i},Ct=function(t,e,n){H(t,e,{get:function(){return this._d[n]}})},At=function(t){var e,n,r,i,o,a,s=x(t),u=arguments.length,h=u>1?arguments[1]:void 0,l=void 0!==h,f=O(s);if(void 0!=f&&!S(f)){for(a=f.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(l&&u>2&&(h=c(h,arguments[2],2)),e=0,n=g(s.length),i=Pt(this,n);n>e;e++)i[e]=l?h(s[e],e):s[e];return i},It=function(){for(var t=0,e=arguments.length,n=Pt(this,e);e>t;)n[t]=arguments[t++];return n},Rt=!!Y&&o(function(){dt.call(new Y(1))}),Dt=function(){return dt.apply(Rt?lt.call(Et(this)):Et(this),arguments)},Lt={copyWithin:function(t,e){return B.call(Et(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(Et(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Et(this),arguments)},filter:function(t){return Ot(this,Z(Et(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Et(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Et(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){K(Et(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Et(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Et(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Et(this),arguments)}
vendor: 5,028 bytes, line 1
1,lastIndexOf:function(t){return at.apply(Et(this),arguments)},map:function(t){return wt(Et(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Et(this),arguments)},reduceRight:function(t){return ut.apply(Et(this),arguments)},reverse:function(){for(var t,e=this,n=Et(e).length,r=Math.floor(n/2),i=0;i<r;)t=e[i],e[i++]=e[--n],e[n]=t;return e},some:function(t){return J(Et(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ht.call(Et(this),t)},subarray:function(t,e){var n=Et(this),r=n.length,i=m(t,r);return new(R(n,n[mt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===e?r:m(e,r))-i))}},kt=function(t,e){return Ot(this,lt.call(Et(this),t,e))},Ft=function(t){Et(this);var e=Tt(arguments[1],1),n=this.length,r=x(t),i=g(r.length),o=0;if(i+e>n)throw V("Wrong length!");for(;o<i;)this[e+o]=r[o++]},Nt={entries:function(){return ot.call(Et(this))},keys:function(){return it.call(Et(this))},values:function(){return rt.call(Et(this))}},Bt=function(t,e){return w(t)&&t[vt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},jt=function(t,e){return Bt(t,e=y(e,!0))?l(2,t[e]):W(t,e)},Ut=function(t,e,n){return!(Bt(t,e=y(e,!0))&&w(n)&&v(n,"value"))||v(n,"get")||v(n,"set")||n.configurable||v(n,"writable")&&!n.writable||v(n,"enumerable")&&!n.enumerable?H(t,e,n):(t[e]=n.value,t)};yt||(U.f=jt,j.f=Ut),a(a.S+a.F*!yt,"Object",{getOwnPropertyDescriptor:jt,defineProperty:Ut}),o(function(){ft.call({})})&&(ft=dt=function(){return ct.call(this)});var Ht=d({},Lt);d(Ht,Nt),f(Ht,pt,Nt.values),d(Ht,{slice:kt,set:Ft,constructor:function(){},toString:ft,toLocaleString:Dt}),Ct(Ht,"buffer","b"),Ct(Ht,"byteOffset","o"),Ct(Ht,"byteLength","l"),Ct(Ht,"length","e"),H(Ht,gt,{get:function(){return this[vt]}}),t.exports=function(t,e,n,u){u=!!u;var c=t+(u?"Clamped":"")+"Array",l="get"+t,d="set"+t,p=i[c],m=p||{},y=p&&E(p),v=!p||!s.ABV,x={},S=p&&p.prototype,O=function(t,n){var r=t._d;return r.v[l](n*e+r.o,xt)},M=function(t,n,r){var i=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[d](n*e+i.o,r,xt)},C=function(t,e){H(t,e,{get:function(){return O(this,e)},set:function(t){return M(this,e,t)},enumerable:!0})};v?(p=n(function(t,n,r,i){h(t,p,c,"_d");var o,a,s,u,l=0,d=0;if(w(n)){if(!(n instanceof X||"ArrayBuffer"==(u=b(n))||"SharedArrayBuffer"==u))return vt in n?Mt(p,n):At.call(p,n);o=n,d=Tt(r,e);var m=n.byteLength;if(void 0===i){if(m%e)throw V("Wrong length!");if((a=m-d)<0)throw V("Wrong length!")}else if((a=g(i)*e)+d>m)throw V("Wrong length!");s=a/e}else s=_(n),a=s*e,o=new X(a);for(f(t,"_d",{b:o,o:d,l:a,e:s,v:new q(o)});l<s;)C(t,l++)}),S=p.prototype=T(Ht),f(S,"constructor",p)):o(function(){p(1)})&&o(function(){new p(-1)})&&k(function(t){new p,new p(null),new p(1.5),new p(t)},!0)||(p=n(function(t,n,r,i){h(t,p,c);var o;return w(n)?n instanceof X||"ArrayBuffer"==(o=b(n))||"SharedArrayBuffer"==o?void 0!==i?new m(n,Tt(r,e),i):void 0!==r?new m(n,Tt(r,e)):new m(n):vt in n?Mt(p,n):At.call(p,n):new m(_(n))}),K(y!==Function.prototype?P(m).concat(P(y)):P(m),function(t){t in p||f(p,t,m[t])}),p.prototype=S,r||(S.constructor=p));var A=S[pt],I=!!A&&("values"==A.name||void 0==A.name),R=Nt.values;f(p,_t,!0),f(S,vt,c),f(S,bt,!0),f(S,mt,p),(u?new p(1)[gt]==c:gt in S)||H(S,gt,{get:function(){return c}}),x[c]=p,a(a.G+a.W+a.F*(p!=m),x),a(a.S,c,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*o(function(){m.of.call(p,1)}),c,{from:At,of:It}),"BYTES_PER_ELEMENT"in S||f(S,"BYTES_PER_ELEMENT",e),a(a.P,c,Lt),F(c),a(a.P+a.F*St,c,{set:Ft}),a(a.P+a.F*!I,c,Nt),r||S.toString==ft||(S.toString=ft),a(a.P+a.F*o(function(){new p(1).slice()}),c,{slice:kt}),a(a.P+a.F*(o(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!o(function(){S.toLocaleString.call([1,2])})),c,{toLocaleString:Dt}),L[c]=I?A:R,r||I||f(S,pt,R)}}else t.exports=function(){}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return a});var r,i=n(291),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Buff=0]="Buff",t[t.Debuff=1]="Debuff",t[t.Behavior=2]="Behavior"}(r=r||(r={}));var a=function(t){function e(e,n,r,i,o,a){var s=t.call(this,e)||this;return s.character=e,s.name=n,s.type=r,s.statModifiers=i,s.duration=o,s.iconId=a,s._remainingDuration=s.duration,s._timeSinceCreated=0,s}return o(e,t),Object.defineProperty(e.prototype,"remainingDuration",{get:function(){return this._remainingDuration},enumerable:!0,configurable:!0}),e.prototype.startEffect=function(){this.startBuff()},e.prototype.updateEffect=function(t){this._remainingDuration-=t/1e3;var e=this.duration-this._remainingDuration;this._progress=e/this.duration,this.updateBuff(t),this._timeSinceCreated+=t},e.prototype.endEffect=function(){this.endBuff()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}
1);var r=n(22),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e){return t.call(this,e)||this}return i(e,t),Object.defineProperty(e.prototype,"mesh",{get:function(){if(!this._mesh)throw new Error("this is a display object but the mesh is not available");return this._mesh},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._mesh.position},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.mesh.rotation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaling",{get:function(){return this.mesh.scaling},enumerable:!0,configurable:!0}),e.prototype.manuallyUpdateWorldMatrix=function(){this._mesh&&(this._mesh.freezeWorldMatrix(),this._mesh.getChildMeshes(!1).forEach(function(t){t.freezeWorldMatrix()}))},e.prototype.updateGameObject=function(t){this.updateGameDisplayObject(t)},e.prototype.disposeGameObject=function(){this.disposeGameDisplayObject(),this._mesh&&this._mesh.dispose()},e.prototype.updateGameDisplayObject=function(t){},e.prototype.disposeGameDisplayObject=function(){},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return V});var r,i=n(131),o=(n.n(i),n(22)),a=n(140),s=n(651),u=n(78),c=n(667),h=n(9),l=n(1),f=n(33),d=n(666),p=n(31),g=n(665),_=n(28),m=n(294),y=n(668),v=n(676),b=n(95),w=n(69),x=n(52),S=n(48),T=n(16),E=n(115),P=n(70),O=n(96),M=n(103),C=n(13),A=n(141),I=n(142),R=n(97),D=n(79),L=n(71),k=n(2),F=n(17),N=n(37),B=n(80),j=n(715),U=n(192),H=n(62),W=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Init=0]="Init",t[t.PreloadingInBackground=1]="PreloadingInBackground",t[t.PreloadingInForeground=2]="PreloadingInForeground",t[t.WarmingUp=3]="WarmingUp",t[t.ReadyToStart=4]="ReadyToStart",t[t.EnsuringContext=5]="EnsuringContext",t[t.SelectingGender=6]="SelectingGender",t[t.Started=7]="Started",t[t.Ending=8]="Ending",t[t.Ended=9]="Ended"}(r=r||(r={}));var V=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.index=n,o.config=i,o._state=r.Init,o._allCharacters=[],o._shadowGenerators=[],o._characterPool=new m.a,o._modelManager=o.game.getService(E.a),o._characterPreviewModelManager=o.game.getService(E.b),o._soundManager=o.game.getService(P.a),o._combat=new u.d(o),o._inputManager=new c.a(o),o._enemySpawner=new d.a(o),o._cache=new g.a(o),o._moveTargetIndicator=new y.a(o),o._warmUpStarted=!1,o._preloaded=!1,o._preloadingStarted=!1,o._startRequested=!1,o._endStartTime=0,o._onClick=function(t){var e=t.data.global.x*o.game.engine.getHardwareScalingLevel(),n=t.data.global.y*o.game.engine.getHardwareScalingLevel();if(o._state===r.SelectingGender)return o._soundManager.playOnce("button_press"),void(t.data.global.x<=o.game.engine.getRenderWidth()/2?o._genderSelector.selected=h.b.Male:o._genderSelector.selected=h.b.Female);if(o._state===r.Started){var i=o.game.scene.pick(e,n,function(t){var e=t.character;return t.is_terrain||e&&e!==o._player&&e.active&&e.lifeStateController.state===f.a.Alive});if(i.hit)if(o._soundManager.playOnce("button_press"),i.pickedMesh.is_terrain){var a=new BABYLON.Vector3(i.pickedPoint.x,0,i.pickedPoint.z);o._inputManager.enqueue(new c.b(a)),o.events.emit("move_target_set",a)}else{var s=i.pickedMesh.character;s&&s!==o._player&&(o._inputManager.enqueue(new c.c(s)),o.events.emit("target_character_set",s))}}},o}return W(e,t),e.prototype.startPreloading=function(){var t=this;this._preloadingStarted=!0,this._modelManager.loadModels(this.config.allModels).then(function(){return t._characterPreviewModelManager.loadModels(t.config.allModels.filter(function(t){return t.inCharacterPreview}))}).then(function(){t.game.getService(D.a).ensureInitialized(),t._preloaded=!0,t.events.emit("preloaded")})},e.prototype.warmUp=function(){this._warmUpStarted=!0},Object.defineProperty(e.prototype,"warmUpFps",{get:function(){return this._warmUpFps},enumerable:!0,configurable:!0}),e.prototype.requestGameStart=function(){this._startRequested=!0},e.prototype.end=function(){this.switchState(r.Ending)},Object.defineProperty(e.prototype,"modelManager",{get:function(){return this._modelManager},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"characterPreviewModelManager",{get:function(){return this._characterPreviewModelManager},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enemySpawner",{get:function(){return this._enemySpawner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"soundManager",{get:function(){return this._soundManager},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputManager",{get:function(){return this._inputManager},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"combat",{get:function(){return this._combat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"player",{get:function(){return this._player},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allCharacters",{get:function(){return this._allCharacters},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"moveTargetIndicator",{get:function(){return this._moveTargetIndicator},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"characterPool",{get:function(){return this._characterPool},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tutorial",{get:function(){return this._tutorial},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scene",{get:function(){return this.game.scene},enumerable:!0,configurable:!0}),e.prototype.createAndActivateCharacter=function(t){var e=this._characterPool.fetch(t.modelId,function(e){e.config=t});if(e)return e;var n=new s.a(this,t);return n.activate(),n},Object.defineProperty(e.prototype,"musicVolume",{set:function(t){this._music?this._music.setVolume(t):t>0&&this.startPlayingMusic()},enumerable:!0,configurable:!0}),e.prototype.updateGameObject=function(t){switch(this._state){case r.Init:this._preloadingStarted&&this.switchState(r.PreloadingInBackgroun
1d);break;case r.PreloadingInBackground:this._warmUpStarted&&this.switchState(r.PreloadingInForeground);break;case r.PreloadingInForeground:this._preloaded&&this.switchState(r.WarmingUp);break;case r.WarmingUp:var e=i().valueOf();this._framesWarmedUp>=30?(this._warmUpFps=this._framesWarmedUp/(e-this._warmUpFpsStartedTime)*1e3,this.switchState(r.ReadyToStart)):(0===this._framesWarmedUp&&(this._warmUpFpsStartedTime=e),this._framesWarmedUp+=1);break;case r.ReadyToStart:this._startRequested&&this.switchState(r.EnsuringContext);break;case r.SelectingGender:this._player&&this.switchState(r.Started);break;case r.Started:this.recycleDeadCharacters();break;case r.Ending:this._timeSinceCreated-this._endStartTime>=600&&this.switchState(r.Ended);break;case r.Ended:}},e.prototype.switchState=function(t){var e=this;if(this._state!==t)switch(this._state=t,t){case r.WarmingUp:this.startWarmingUp(),this._framesWarmedUp=0,this._warmUpFpsStartedTime=Number.MAX_SAFE_INTEGER;break;case r.ReadyToStart:this.getReadyToStart(),this.events.emit("ready");break;case r.EnsuringContext:this.game.getService(w.a).data.isFirstLevelInSession?this.forceIntoContextAsync().then(function(){e.game.getService(A.a).refreshContextLeaderboardDataAsync(),e.startPlayingMusic(),e._player?e.switchState(r.Started):e.switchState(r.SelectingGender)}):(this.startPlayingMusic(),this._player?this.switchState(r.Started):this.switchState(r.SelectingGender));break;case r.SelectingGender:this.selectGender();break;case r.Started:this.game.getService(h.a).currentIslandLevel=this.index,this._tutorial=new b.b(this),this.game.events.emit("level_started",this),this.events.emit("started",this),this.showStartupDialogsAsync();break;case r.Ending:this.events.emit("ending"),this._endStartTime=this._timeSinceCreated,this._music&&this._music.stop(),this.soundManager.playOnce("victory"),this._player.animationController.playState("victory1");var n=this.game.getService(A.a).postIslandLevel(this.index);this.game.getService(U.a).bufferUpdate({leaderboardStatus:n,template:U.b.PlayerScore,image:this.game.getService(H.a).lastScreenshot}),T.a.logEvent("level_state_ending",new Map([["player_level",this._player.statsController.getStatValue(l.b.Level).final.toFixed()],["player_resource1",this._player.statsController.getStatValue(l.b.Resource1).final.toFixed()]]),null);break;case r.Ended:this.events.emit("ended")}},e.prototype.startPlayingMusic=function(){!this._music&&S.a.musicVolume>0&&(this._music=new BABYLON.Sound("background_music",this.config.music,this.scene,void 0,{autoplay:!0,loop:!0,volume:S.a.musicVolume}))},e.prototype.disposeGameObject=function(){this.game.getService(p.a).events.off("unhandled_click",this._onClick),this._allCharacters.forEach(function(t){t.dispose()}),this._shadowGenerators.forEach(function(t){t.dispose()}),this._lights.forEach(function(t){t.dispose()}),this._environmentObjects.forEach(function(t){t.dispose()}),this._mergedEnvironmentMesh.dispose(),this._music&&(this._music.stop(),this._music.dispose()),this._characterPool.dispose(),this.game.scene.Animatables.forEach(function(t){t.onAnimationEnd=null,t.stop()})},e.prototype.showUnsubscribeDialogAsync=function(){var t=this;return new Promise(function(e){switch(t.game.launchSource){case"unsubscribe_bot_offline_bonus_reminder":L.c.showModal(t.game,[new k.a(t.game,[new F.a(t.game,"Do you wish to stop receiving\noffline bonus reminders?",C.h)],{preferredHeight:"1.5u"})]).then(function(){t.game.getService(I.a).manageBotMessage("bot_offline_bonus_reminder",!0),e()}).catch(function(){e()});break;default:e()}})},e.prototype.showMainDialogIfNecessary=function(){"bot_tutorial_reminder"===this.game.launchSource&&(0===this.game.getService(h.a).itemsUpgraded?this.game.getService(N.a).mainDialog.showWithTransitionAsync(B.b.Character):0===this.game.getService(h.a).chestsPurchased&&this.game.getService(N.a).mainDialog.showWithTransitionAsync(B.b.Shopping))},e.prototype.showStartupDialogsAsync=function(){var t=this;return this.game.getService(w.a).data.isFirstLevelInSession?(this.game.getService(R.a).updateTimeScale(R.b.StartupDialogs,0),this.showUnsubscribeDialogAsync().then(function(){return t.showOfflineBonusAsync()}).then(function(){t.showMainDialogIfNecessary()}).then(function(){t.game.getService(R.a).updateTimeScale(R.b.StartupDialogs,1)}).catch(function(){t.game.getService(R.a).updateTimeScale(R.b.StartupDialogs,1)})):Promise.resolve()},e.prototype.showOfflineBonusAsync=function(){var t=this.game.getService(h.a).lastActiveTime,e=i().unix();if(t>0&&e-t>=3600*x.j){var r=Math.min(x.k,(e-t)/3600),o=Math.round(r*x.l),a=r>=x.m?[n.i(M.n)(n.i(M.i)()[0])]:[];return new j.a(this.game,3*o,o,a).showWithTransitionAsync()}return Promise.resolve()},e.prototype.startWarmingUp=function(){var t=this;this.game.getService(D.a).activateTheme(this.config.theme),this.game.log(a.b.Info,"[IsNewPlayerFirstSession: "+this.game.getService(w.a).data.isNewPlayerFirstSession+"]"),this._lights=this.config.lightsFactory(this),this._environmentObjects=this.config.environmentObjectsFactory(this);var e=[];
1this._environmentObjects.forEach(function(t){t.mesh.getChildMeshes(!1).forEach(function(t){t instanceof BABYLON.Mesh&&e.push(t)})}),this._mergedEnvironmentMesh=BABYLON.Mesh.MergeMeshes(e,!0),this._mergedEnvironmentMesh.material=this.modelManager.atlasMaterial,this._mergedEnvironmentMesh.freezeWorldMatrix(),this._mergedEnvironmentMesh.alwaysSelectAsActiveMesh=!0,this._mergedEnvironmentMesh.getBoundingInfo().isLocked=!0,S.a.graphics!==S.b.Low&&this._lights.forEach(function(e){if(e instanceof BABYLON.DirectionalLight){e.autoUpdateExtends=!1,e.position=new BABYLON.Vector3(D.b,D.c,D.b).addInPlace(e.direction.normalize().multiplyByFloats(-D.c,0,-D.c));var n=4096;S.a.graphics===S.b.Mid&&(n=1024);var r=new BABYLON.ShadowGenerator(n,e);r.getShadowMap().renderList.push(t._mergedEnvironmentMesh),r.useBlurExponentialShadowMap=!0,r.useKernelBlur=!0,r.blurKernel=5,r.getShadowMap().refreshRate=0,t._shadowGenerators.push(r)}}),this.game.getService(p.a).events.on("unhandled_click",this._onClick);for(var n=new Map,r=new Map,i=this,o=0;o<this.config.enemyWaveCount;++o)!function(t){var e=i.config.enemiesFactory(i,t),o=new Map;e.forEach(function(t){r.set(t.modelId,t),o.set(t.modelId,(o.get(t.modelId)||0)+1)}),o.forEach(function(t,e){n.set(e,Math.max(t,n.get(e)||0))})}(o);n.forEach(function(e,n){for(var i=r.get(n),o=0;o<e;++o){var a=new s.a(t,i);t._characterPool.add(a.config.modelId,a)}});var u=this.game.getService(h.a).model;u!==h.b.Unknown&&(this._player=this.createPlayerCharacter(u))},e.prototype.forceIntoContextAsync=function(t){var e=this;return void 0===t&&(t=0),new Promise(function(n){if(T.a.getContextID())return void n();T.a.logEvent("force_into_context_started",new Map([["retry_count",t.toFixed()]]),null),T.a.chooseContextAsync(!0).then(function(){T.a.logEvent("force_into_context_completed",new Map([["retry_count",t.toFixed()],["type","context"]]),null),n()}).catch(function(){T.a.logEvent("force_into_context_rejected",new Map([["retry_count",t.toFixed()]]),null),t<3?L.a.showModal(e.game,"OKAY",[new k.a(e.game,[new F.a(e.game,"Pick a friend to play.",C.h)],{preferredHeight:"1u"})]).catch(function(){}).then(function(){return e.forceIntoContextAsync(t+1)}).then(function(){n()}):L.c.showModal(e.game,[new k.a(e.game,[new F.a(e.game,"Pick a friend to play.",C.h)],{preferredHeight:"1u"})],"OKAY","PLAY SOLO").then(function(){e.forceIntoContextAsync(t+1).then(function(){n()})}).catch(function(){T.a.logEvent("force_into_context_completed",new Map([["retry_count",t.toFixed()],["type","solo"]]),null),n()})})})},e.prototype.getReadyToStart=function(){this.game.getService(O.a).disableBlackAndWhite(),this.game.getService(O.a).resetShaking()},e.prototype.selectGender=function(){var t=this;this.game.getService(O.a).useGenderSelectionAngle();var e=this.createPlayerCharacter(h.b.Male);e.position.x+=40,e.position.z-=40,e.rotationController.characterRotation=Math.PI/4;var n=this.createPlayerCharacter(h.b.Female);n.position.x-=40,n.position.z+=40,n.rotationController.characterRotation=Math.PI/4,this._genderSelector=new v.a(e,n),this._genderSelector.events.on("gender_confirmed",function(r){t.game.getService(h.a).model=r,r===h.b.Male?(t._player=e,n.dispose()):(t._player=n,e.dispose()),t._genderSelector.dispose()})},e.prototype.createPlayerCharacter=function(t){var e=new s.a(this,{modelId:t===h.b.Male?"male":"female",team:_.a.Player,baseStats:this.game.getService(h.a).baseStats,position:new BABYLON.Vector3(D.b,0,D.b),postActivate:function(){}});return e.activate(),e.statsController.setBaseStat(l.b.HealthPercentage,1),e.statsController.setBaseStat(l.b.ManaPercentage,1),e.statsController.setBaseStat(l.b.Scale,1),e},e.prototype.recycleDeadCharacters=function(){var t=this,e=[];this._allCharacters.forEach(function(n){n.lifeStateController.state===f.a.Dead&&n!==t._player&&e.push(n)}),e.forEach(function(e){t._characterPool.add(e.config.modelId,e)})},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(21),i=n(9),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Prom
1ise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},u=function(t){function e(e){return t.call(this,e)||this}return o(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this._buffer},enumerable:!0,configurable:!0}),e.prototype.preloadServiceAsync=function(){return a(this,void 0,void 0,function(){var t=this;return s(this,function(e){return this.fetchData(),this.game.events.on("switching_level",function(){t._buffer.isFirstLevelInSession=!1,t.flushData()}),[2]})})},e.prototype.startServiceAsync=function(){return a(this,void 0,void 0,function(){return s(this,function(t){return this._buffer.isNewPlayerFirstSession=this.game.getService(i.a).model===i.b.Unknown,[2]})})},e.prototype.updateService=function(t){},e.prototype.disposeService=function(){this.flushData()},e.prototype.fetchData=function(){this._buffer={isFirstLevelInSession:!0,playerLifeIndex:0,enemiesKilled:0,highestDamage:0,resource1Collected:0,resource2Collected:0,score:0,isNewPlayerFirstSession:!1,shineItemAtSlot:-1}},e.prototype.flushData=function(){},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r=n(294),i=n(48),o=n(21),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},u=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},c=[{id:"drum",fileName:"sound/drum.mp3",poolCount:1},{id:"bubble",fileName:"sound/bubble.mp3",poolCount:2},{id:"punch_1",fileName:"sound/punch_1.mp3",poolCount:2},{id:"punch_2",fileName:"sound/punch_2.mp3",poolCount:2},{id:"punch_heavy",fileName:"sound/punch_heavy.mp3",poolCount:2},{id:"miss",fileName:"sound/miss.mp3",poolCount:3},{id:"button_press",fileName:"sound/button_press.mp3",poolCount:1},{id:"coin_drop",fileName:"sound/coin_drop.mp3",poolCount:5},{id:"equip_item_1",fileName:"sound/equip_item_1.mp3",poolCount:1},{id:"equip_item_2",fileName:"sound/equip_item_2.mp3",poolCount:1},{id:"footstep",fileName:"sound/footstep.mp3",poolCount:2},{id:"open_chest",fileName:"sound/open_chest.mp3",poolCount:1},{id:"level_up",fileName:"sound/level_up.mp3",poolCount:1},{id:"victory",fileName:"sound/victory.mp3",poolCount:1},{id:"spell_stomp",fileName:"sound/spell_stomp.mp3",poolCount:1},{id:"magic_1",fileName:"sound/magic_1.mp3",poolCount:1},{id:"magic_2",fileName:"sound/magic_2.mp3",poolCount:1},{id:"forge",fileName:"sound/forge.mp3",poolCount:1},{id:"warning",fileName:"sound/warning.mp3",poolCount:1},{id:"whirl",fileName:"sound/whirl.mp3",poolCount:1},{id:"punch_boss",fileName:"sound/punch_boss.mp3",poolCount:1},{id:"boss_death",fileName:"sound/boss_death.mp3",poolCount:1},{id:"male_player_death",fileName:"sound/male_death.mp3",poolCount:1},{id:"male_player_got_hit",fileName:"sound/male_hit.mp3",poolCount:1},{id:"female_player_death",fileName:"sound/female_death.mp3",poolCount:1},{id:"female_player_got_hit",fileName:"sound/female_hit.mp3",poolCount:1}],h=function(){function t(t){this.sound=t,this._activated=!1}return t.prototype.activate=function(){this._activated=!0},t.prototype.deactivate=function(){this._activated=!1,this.sound.stop()},t.prototype.isActivated=function(){return this._activated},t.prototype.dispose=function(){this.sound.dispose()},t}(),l=0,f=function(t){function e(e){var n=t.call(this,e)||this;return n._assetManager=new BABYLON.AssetsManager(n.game.scene),n._loaded=new Map,n._soundPool=new r.a,n._unprocessedSounds=0,n}return a(e,t),e.prototype.loadAllSoundsAsync=function(){return s(this,void 0,void 0,function(){var t=this;
1return u(this,function(e){return c.forEach(function(e){t.add(e)}),this.loadAsync(),[2]})})},e.prototype.createSound=function(t,e,n){if(!this._loaded.has(t))return null;var r=this._soundPool.fetch(t);if(r)return r.sound.loop=n,e&&r.sound.play(),r;var o=this.createNewSound(t,n,function(){o.setVolume(i.a.soundVolume),e&&o.play()}),a=new h(o);return a.activate(),a},e.prototype.putBackIntoPool=function(t,e){this._soundPool.add(t,e)},e.prototype.playOnce=function(t){var e=this;if(i.a.soundVolume>0){var n=this.createSound(t,!0,!1);n&&(n.sound.onended=function(){e._soundPool.add(t,n)})}},e.prototype.add=function(t){var e=this;this._unprocessedSounds+=t.poolCount;var n=this._assetManager.addBinaryFileTask("task_"+t.id,t.fileName);n.onSuccess=function(){if(e._loaded.set(t.id,n.data),t.poolCount)for(var r=0;r<t.poolCount;++r){var i=e.createNewSound(t.id,!1,function(){e._unprocessedSounds-=1,e.onSoundProcessed()});e._soundPool.add(t.id,new h(i))}else e.onSoundProcessed()}},e.prototype.loadAsync=function(){return s(this,void 0,void 0,function(){var t=this;return u(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,n){t._resolveLoadPromise=e,t._assetManager.useDefaultLoadingScreen=!1,t._assetManager.onFinish=function(){t.onSoundProcessed()},t._assetManager.load()})];case 1:return e.sent(),[2]}})})},e.prototype.disposeService=function(){this._soundPool.dispose()},e.prototype.createNewSound=function(t,e,n){var r=this._loaded.get(t);if(!r)throw new Error("the requested sound does not exist.");return new BABYLON.Sound("sound_"+t+"_"+l++,r.slice(0),this.game.scene,n,{loop:e,autoplay:!1})},e.prototype.onSoundProcessed=function(){0===this._unprocessedSounds&&this._resolveLoadPromise()},e}(o.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return _}),n.d(e,"a",function(){return m}),n.d(e,"c",function(){return y});var r=n(72),i=n(2),o=n(7),a=n(23),s=n(38),u=n(14),c=n(25),h=n(143),l=n(302),f=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},p=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},g=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},_=function(t){function e(e,n){void 0===n&&(n=[]);var f=this,p=new i.a(e,[new s.a(e,0,.7)],{preferredWidth:"100%",preferredHeight:"100%"});p.element.interactive=!0;var g=new l.a(e,"dialog_corner","dialog_edge","dialog_bg",.2);g.element.interactive=!0;var _=new h.a(e,[new i.a(e,[g,new i.a(e,[new i.a(e,[new a.a(e,"background_1"),new i.a(e,n,d({},u.a.mediumPadding,{paddingTop:"0.5u"}))],d({},u.a.mediumPadding)),new i.a(e,[new o.a(e,[new o.b(e,[new i.a(e,[new c.a(e,function(){f.close()},"exit","button_3",d({},u.a.largePadding))],{preferredWidth:"0.75u",preferredHeight:"0.75u"})],{flexDirectionAlign:i.b.End})],{preferredHeight:"1u"})],{paddingTop:u.a.smallPaddingValue})],d({},u.a.largePadding))])]),m=new i.a(e,[],{paddingTop:"50%",paddingLeft:"50%"});return f=t.call(this,e,[p,m,new o.a(e,[_],d({},u.a.largePadding,{flexDirectionAlign:i.b.Center}))],{},r.a.Modal)||this,f._popup=_,f.shineContainer=m,f._element.visible=!1,f}return f(e,t),e.prototype.showWithTransitionAsync=function(){return p(this,void 0,void 0,function(){return g(this,function(t){switch(t.label){case 0:return this._element.visible=!0,[4,this._popup.showWithTransitionAsync()];case 1:return t.sent(),[2]}})})},e.prototype.close=function(){this._element.visible=!1,this.dispose()},e}(r.b),m=function(t){function e(e,n,r){var a=this,s=new c.b(e,function(){a._element.visible=!1,a._resolvePromise(),a.dispose()},n,"plank_1");return a=t.call(this,e,[new o.a(e,[new i.a(e,r,{preferredWidth:"100%",paddingBottom:u.a.largePaddingValue}),new i.a(e,[s],{preferredWidth:"30%",preferredHeight:"1u"})],d({},u.a.largePadding,{crossDirectionAlign:i.d.Center,paddingBottom:u.a.extraLargePaddingValue}))])||this,a.okButton=s,a}return f(e,t),e.prototype.showWithTransitionAsync=function(){var e=this;return new Promise(function(n,r){e._resolvePromise=n,e._rejectPromise=r,t.prototype.showWithTransitionAsync.call(e)})},e.prototype.close=function(){t.prototype.close.call(this),this._rejectPromise()},e.showModal=function(t,n,r){return new e(t,n,r).showWithTransitionAsync()},e}(_),y=function(t){function e(e,n,r,a){var s=this,h=new c.b(e,function(){s._element.visible=!1,s._resolvePromise(),s.dispose()},r,"plank_1"),l=new c.b(e,function(){s._element.visible=!1,s._rejectPromise(),s.dispose()},a,"plank_2");return s=t.call(this,e,[new o.a(e,[new i.a(e,n,{preferredWidth:"100%",paddingBottom:u.a.largePaddingValue}),new o.b(e,[new i.a(e,[h],{preferredWidth:"3u",paddingRight:"0.5u"}),new i.a(e,[l],{preferredWidth:"3u",paddingLeft:"0.5u"})],{preferredHeight:"1u",preferredWidth:"100%",flexDirectionAlign:i.b.Center})],d({},u.a.largePadding,{crossDirectionAlign:i.d.Center,paddingBottom:u.a.extraLargePaddingValue}))])||this,s.yesButton=h,s.noButton=l,s}return f(e,t),e.prototype.showWithTransitionAsync=function(){var e=this;return new Promise(function(n,r){e._resolvePromise=n,e._rejectPromise=r,t.prototype.showWithTransitionAsync.call(e)})},e.prototype.close=function(){t.prototype.close.call(this),this._rejectPromise()},e.showModal=function(t,n,r,i){return void 0===r&&(r="YES"),void 0===i&&(i="NO"),new e(t,n,r,i).showWithTransitionAsync()},e}(_)},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return a});var r,i=n(2),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Default=0]="Default",t[t.Modal=1]="Modal",t[t.Topmost=2]="Topmost"}(r=r||(r={}));var a=function(t){function e(e,n,i,o){void 0===n&&(n=[]),void 0===i&&(i={}),void 0===o&&(o=r.Default);var a=t.call(this,e,n,i)||this;switch(o){default:case r.Default:a._pixiLayer.guiLayer.addChild(a.element);break;
1case r.Modal:a._pixiLayer.modalLayer.addChild(a.element);break;case r.Topmost:a._pixiLayer.topmostLayer.addChild(a.element)}return a._onResize=function(){a.resize(a.game.engine.getRenderWidth(),a.game.engine.getRenderHeight())},a}return o(e,t),e.prototype.constructElement=function(){t.prototype.constructElement.call(this),this._pixiLayer.events.on("ui_resize",this._onResize)},e.prototype.disposeElement=function(){this._pixiLayer.events.off("ui_resize",this._onResize),t.prototype.disposeElement.call(this)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return c}),n.d(e,"c",function(){return h}),n.d(e,"b",function(){return l});var r=n(34),i=n(2),o=n(17),a=n(1),s=n(13),u=n(103),c=function(t){var e=16777215,n="button_1";if(t){switch(t.rarity){case r.b.Common:e=s.i;break;case r.b.Rare:e=s.j;break;case r.b.Epic:e=s.k;break;case r.b.Legendary:e=s.l}n="item_"+t.baseModel.modelId}return{rarityColor:e,iconName:n}},h=function(t,e){return new i.a(t,[new o.a(t,e?"Lv."+e.itemLevel.toFixed():"",16777215,o.b.Right,{strokeThickness:3})],{paddingTop:"60%",paddingRight:"10%"})},l=function(t,e){var c=[],h=n.i(u.h)(e.baseModel.type);switch(e.baseModel.type){default:break;case r.a.Weapon:if(e.statOverrides){var l=e.statOverrides.filter(function(t){return t.stat===a.b.MinDamage})[0].value,f=e.statOverrides.filter(function(t){return t.stat===a.b.MaxDamage})[0].value,d=e.statOverrides.filter(function(t){return t.stat===a.b.AttackInterval})[0].value;c.push(new i.a(t,[new o.a(t,"Attack Speed "+(1/d).toFixed(1),s.g,o.b.Left)],{preferredHeight:"40%"})),c.push(new i.a(t,[new o.a(t,"Damage "+((f+l)/2).toFixed(),s.g,o.b.Left)],{preferredHeight:"60%"}))}break;case r.a.Helmet:case r.a.Torso:case r.a.Boots:if(e.statModifiers){var p=e.statModifiers.filter(function(t){return t.stat===h})[0];c.push(new i.a(t,[new o.a(t,""+r.a[e.baseModel.type],s.g,o.b.Left)],{preferredHeight:"40%"})),c.push(new i.a(t,[new o.a(t,t.getService(a.a).describeStatModifier(p),s.g,o.b.Left)],{preferredHeight:"60%"}))}}return c}},function(t,e,n){var r=n(12)("unscopables"),i=Array.prototype;void 0==i[r]&&n(40)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(92)("meta"),i=n(10),o=n(39),a=n(19).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(8)(function(){return u(Object.preventExtensions({}))}),h=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},l=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";h(t)}return t[r].i},f=function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;h(t)}return t[r].w},d=function(t){return c&&p.NEED&&u(t)&&!o(t,r)&&h(t),t},p=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:f,onFreeze:d}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}e.__esModule=!0;var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(102),h=r(c),l=n(262),f=r(l),d=n(261),p=r(d),g=n(59),_=r(g),m=n(29),y=n(11),v=n(27),b=r(v),w=function(t){function e(n,r,a,s,u){i(this,e);var c=o(this,t.call(this));if(c.noFrame=!1,r||(c.noFrame=!0,r=new m.Rectangle(0,0,1,1)),n instanceof e&&(n=n.baseTexture),c.baseTexture=n,c._frame=r,c.trim=s,c.valid=!1,c.requiresUpdate=!1,c._uvs=null,c.orig=a||r,c._rotate=Number(u||0),!0===u)c._rotate=2;else if(c._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return n.hasLoaded?(c.noFrame&&(r=new m.Rectangle(0,0,n.width,n.height),n.on("update",c.onBaseTextureUpdated,c)),c.frame=r):n.once("loaded",c.onBaseTextureLoaded,c),c._updateID=0,c.transform=null,c.textureCacheIds=[],c}return a(e,t),e.prototype.update=function(){this.baseTexture.update(
1)},e.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new m.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},e.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},e.prototype.destroy=function(t){this.baseTexture&&(t&&(y.TextureCache[this.baseTexture.imageUrl]&&e.removeFromCache(this.baseTexture.imageUrl),this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},e.prototype._updateUvs=function(){this._uvs||(this._uvs=new p.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.fromImage=function(t,n,r,i){var o=y.TextureCache[t];return o||(o=new e(h.default.fromImage(t,n,r,i)),e.addToCache(o,t)),o},e.fromFrame=function(t){var e=y.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},e.fromCanvas=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(h.default.fromCanvas(t,n,r))},e.fromVideo=function(t,n){return"string"===typeof t?e.fromVideoUrl(t,n):new e(f.default.fromVideo(t,n))},e.fromVideoUrl=function(t,n){return new e(f.default.fromUrl(t,n))},e.from=function(t){if("string"===typeof t){var n=y.TextureCache[t];if(!n){return null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?e.fromVideoUrl(t):e.fromImage(t)}return n}return t instanceof HTMLImageElement?new e(h.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,b.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof h.default?new e(t):t},e.fromLoader=function(t,n,r){var i=new h.default(t,void 0,(0,y.getResolutionOfUrl)(n)),o=new e(i);return i.imageUrl=n,r||(r=n),h.default.addToCache(o.baseTexture,r),e.addToCache(o,r),r!==n&&(h.default.addToCache(o.baseTexture,n),e.addToCache(o,n)),o},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),y.TextureCache[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),y.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"===typeof t){var e=y.TextureCache[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete y.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r<t.textureCacheIds.length;++r)y.TextureCache[t.textureCacheIds[r]]===t&&delete y.TextureCache[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null},u(e,[{key:"frame",get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,n=t.y,r=t.width,i=t.height,o=e+r>this.baseTexture.width,a=n+i>this.baseTexture.height;if(o||a){var s=o&&a?"and":"or",u="X: "+e+" + "+r+" = "+(e+r)+" > "+this.baseTexture.width,c="Y: "+n+" + "+i+" = "+(n+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+s+" "+c)}this.valid=r&&i&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),e}(_.default);e.default=w,w.EMPTY=new w(new h.default),s(w.EMPTY),s(w.EMPTY.baseTexture),w.WHITE=function(){var t=document.createElement("canvas");t.width=10,t.height=10;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,10,10),new w(new h.default(t))}(),s(w.WHITE),s(w.WHITE.baseTexture)},function(t,e,n){"use strict";n.d(e,"b",function(){return i}),n.d(e,"c",function(){return o}
1),n.d(e,"e",function(){return a}),n.d(e,"f",function(){return s}),n.d(e,"g",function(){return u}),n.d(e,"h",function(){return c}),n.d(e,"i",function(){return h}),n.d(e,"j",function(){return l}),n.d(e,"k",function(){return f}),n.d(e,"l",function(){return d}),n.d(e,"m",function(){return p}),n.d(e,"n",function(){return g}),n.d(e,"r",function(){return _}),n.d(e,"s",function(){return m}),n.d(e,"q",function(){return y}),n.d(e,"p",function(){return v}),n.d(e,"o",function(){return b}),n.d(e,"a",function(){return w}),n.d(e,"d",function(){return x});var r=n(34),i=200,o=0,a=500,s=0,u=0,c=50,h=0,l=200,f=0,d=300,p=0,g=1200,_=1,m=10,y=5,v=.05,b=function(t){var e=1,n=0;switch(t.rarity){default:break;case r.b.Common:e=100*t.itemLevel;break;case r.b.Rare:e=350*t.itemLevel,n=5*t.itemLevel;break;case r.b.Epic:e=1e3*t.itemLevel,n=10*t.itemLevel}return{resource1:e,resource2:n}},w=function(t){var e=t.itemLevel;return 1===e?1:10*Math.round((8.125*e*e+24.411*e-33.5)/10)},x=function(t,e){var n=0,i=0;switch(e){default:break;case r.b.Common:n=10*t;break;case r.b.Rare:n=20*t;break;case r.b.Epic:n=50*t,i=Math.max(1,Math.floor(t/8))}return{sellResource1:n,sellResource2:i}}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return m}),n.d(e,"c",function(){return y}),n.d(e,"d",function(){return v});var r,i=n(93),o=n(187),a=n(15),s=n(1),u=n(33),c=n(28),h=n(9),l=n(69),f=n(140),d=n(52),p=n(13),g=n(297),_=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Melee=0]="Melee",t[t.Range=1]="Range",t[t.Spell=2]="Spell"}(r=r||(r={}));var m;!function(t){t[t.Physical=0]="Physical",t[t.Earth=1]="Earth",t[t.Wind=2]="Wind",t[t.Fire=3]="Fire",t[t.Ice=4]="Ice",t[t.Holy=5]="Holy"}(m=m||(m={}));var y;!function(t){t[t.Missed=0]="Missed",t[t.Dodged=1]="Dodged",t[t.CritHit=2]="CritHit",t[t.NormalHit=3]="NormalHit"}(y=y||(y={}));var v=function(t){function e(e){var n=t.call(this,e)||this;return n._level=e,n._combatActiveEventSent=!1,n}return _(e,t),e.prototype.updateComponent=function(){},e.prototype.disposeComponent=function(){},e.prototype.playerCastSpell=function(t){a.b.getSpell(t).cast(this._level.player)},e.prototype.dealDamage=function(t){if(t.target.active){this._combatActiveEventSent||(this._level.events.emit("combat_active"),this._combatActiveEventSent=!0),t.source.events.emit("attempted_damage",t);var e=this.calculateHitType(t),n="",i=!1,a=!1;switch(e){case y.Missed:n="Miss";break;case y.Dodged:n="Dodge";break;case y.CritHit:case y.NormalHit:var u=t.source.statsController.getStatValue(s.b.DamageFactor).final,d=t.damageType===m.Physical?1:t.source.statsController.getStatValue(s.b.SpellDamageFactor).final,_=t.source.statsController.getStatValue(s.b.CritDamageFactor).final,v=(t.min+(t.max-t.min)*Math.random())*u*d;e===y.CritHit&&(v*=_);var b=this.calculateReducedDamage(t,v);if(this.game.log(f.b.Combat,"[Damage] [From: "+c.a[t.source.team]+"] [To: "+c.a[t.target.team]+"] [HitType: "+y[e]+"][Min: "+t.min.toFixed()+"] [Max: "+t.max.toFixed()+"] [DamageFactor: "+u.toFixed(2)+"] [CritDamageFactor: "+_.toFixed(2)+"] [DamageOutput: "+v.toFixed(2)+"] [AfterReduction: "+b.toFixed(2)+"]"),0===b)n="Block";else{var w=this.changeCharacterHealth(t.target,-b);t.target.events.emit("received_damage",t),t.source.events.emit("dealt_damage",t);if(Math.random()<t.source.statsController.getStatValue(s.b.HealingAttackProbability).final&&(this.changeCharacterHealth(t.source,b),new o.a(this._level.player,"+"+b.toFixed(),!1,p.b)),0!==w.previous&&0===w.updated?this.characterKilledTarget(t.source,t.target):t.target.animationController.playState("hit"),n=b.toFixed(),t.target===this._level.player&&(n="-"+n),i=e===y.CritHit,a=t.attackType===r.Spell,t.source.teamGroup===c.b.PlayerFriendly){var x=this.game.getService(l.a).data;x.highestDamage=Math.max(x.highestDamage,b)}}}return t.target.teamGroup===c.b.Monsters?(new o.a(t.target,n,i,a?p.c:p.d),i&&new g.a(t.target,0)):t.target===this._level.player&&this._level.enemySpawner.bossSpawned&&(new o.a(t.target,n,i,p.e),e!==y.NormalHit&&e!==y.CritHit||(this._level.soundManager.playOnce("punch_boss"),(t.fromSpell||e===y.CritHit)&&this._level.soundManager.playOnce(this.game.getService(h.a).model===h.b.Male?"male_player_got_hit":"female_player_got_hit"))),e}},e.prototype.killReward=function(t,e,n){var r=e.statsController.getStatValue(n).final;if(n===s.b.CurrentExperience&&(r+=t.statsController.getStatValue(s.b.ExtraExperiencePerKill).final),n===s.b.Resource1){var i=Math.ceil(r);Math.random()<t.statsController.getStatValue(s.b.DoubleCoinProbability).final&&(i*=2),(Math.random()>=e.statsController.getStatValue(s.b.Resource1DropProbability).final||1===e.level.index&&t.statsController.getStatValue(s.b.Level).final<3)&&(i=0),3===t.statsController.getStatValue(s.b.Level).final&&(i=1);for(var o=0;i>15;)new g.b(e,o*Math.random()*100,10,2),i-=10,o++;for(var a=0;a<i;++a)new g.b(e,o*Math.random()*100),o++}if(n===s.b.Resource2&&r>0)for(var i=Math.ceil(r),a=0;a<i;++a)new g.c(e,a*Math.random()*100);if(n===s.b.CurrentExperience){var u=t.statsController.getStatValue(n).original,c=u+r;t.statsController.setBaseStat(n,c),this.game.log(f.b.Combat,"[Experience] [Current: "+u.toFixed()+"] [Reward: "+r.toFixed()+"] [New: "+c.toFixed()+"] [Max: "+t.statsController.getStatValue(s.b.MaxExperience).original.toFixed()+"]")}},e.prototype.characterKilledTarget=function(t,e){if(t.teamGroup===c.b.PlayerFriendly&&t.level.player.lifeStateController.state===u.a.Alive){t.level.player.statsController.getStatValue(s.b.Level).final<d.a&&this.killReward(t.level.player,e,s.b.CurrentExperience),this.killReward(t.level.player,e,s.b.Resource1),this.killReward(t.level.player,e,s.b.Resource2);var n=this.game.getService(l.a).data;
1n.enemiesKilled++,n.score+=d.b,this._level.events.emit("player_killed_enemy",e)}},e.prototype.dealDamageToRadiusAroundSource=function(t,e){var n=this;this._level.allCharacters.forEach(function(r){if(r.teamGroup!==t.source.teamGroup&&r.lifeStateController.state===u.a.Alive){BABYLON.Vector3.Distance(r.position,t.source.position)<=e+t.source.boundingRadius+r.boundingRadius&&n.dealDamage({target:r,source:t.source,min:t.min,max:t.max,attackType:t.attackType,damageType:t.damageType,fromSpell:t.fromSpell})}})},e.prototype.calculateReducedDamage=function(t,e){switch(t.damageType){case m.Physical:return e*(1-t.target.statsController.getStatValue(s.b.PhysicalDamageReduce).final);case m.Earth:case m.Wind:case m.Ice:case m.Fire:return e*(1-t.target.statsController.getStatValue(s.b.MagicResistance).final);case m.Holy:return e}},e.prototype.calculateHitType=function(t){var e=[];t.attackType!==r.Melee&&t.attackType!==r.Range||e.push({type:y.Dodged,probability:t.target.statsController.getStatValue(s.b.DodgeProbability).final}),e.push({type:y.CritHit,probability:t.source.statsController.getStatValue(s.b.CritProbability).final}),e.push({type:y.Missed,probability:n.i(d.c)(t.source.statsController.getStatValue(s.b.Level).final,t.target.statsController.getStatValue(s.b.Level).final)}),e.push({type:y.NormalHit,probability:1});for(var i=Math.random(),o=0;o<e.length;++o){if(i<e[o].probability)return e[o].type;i-=e[o].probability}throw new Error("failed to calculate hit type. this should never happen.")},e.prototype.changeCharacterHealth=function(t,e){var n=t.statsController.getStatValue(s.b.MaxHealth).final,r=e/n,i=t.statsController.getStatValue(s.b.HealthPercentage),o={original:Math.min(1,Math.max(0,i.original+r)),final:Math.min(1,Math.max(0,i.final+r))};return t.statsController.setBaseStat(s.b.HealthPercentage,o.original),this.game.log(f.b.Combat,"[Health] [Character: "+c.a[t.team]+"] [Current HP: "+(i.final*n).toFixed(2)+" / "+n.toFixed(2)+"] [Expected Delta: "+e.toFixed(2)+"] [New HP: "+(o.final*n).toFixed(2)+" / "+n.toFixed(2)+"]]"),{previous:i.final,updated:o.final}},e}(i.a)},function(t,e,n){"use strict";n.d(e,"c",function(){return h}),n.d(e,"b",function(){return l}),n.d(e,"a",function(){return d});var r=n(21),i=n(94),o=n(115),a=n(299),s=n(24),u=n(48),c=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=700,l=1100,f=function(){function t(t,e){this.landRadius=t,this.totalRadius=e,this._data=[],this._noise=new i.a,this.generateBaseTerrain(),this.runSmoothingPass(2)}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),t.prototype.generateBaseTerrain=function(){for(var t=this.totalRadius-.5,e=0;e<2*this.totalRadius;++e){for(var n=[],r=0;r<2*this.totalRadius;++r)Math.pow(e-t,2)+Math.pow(r-t,2)<=Math.pow(this.landRadius,2)?n.push({x:e+2*(Math.random()-.5)*.2,z:r+2*(Math.random()-.5)*.2,y:.08*(this._noise.simplex2(e,r)-1)}):n.push({x:e+2*(Math.random()-.5)*.2,z:r+2*(Math.random()-.5)*.2,y:-1});this._data.push(n)}},t.prototype.runSmoothingPass=function(t){for(var e=this,n=new i.a(Math.random()),r=0;r<t;++r){for(var o=[],a=0;a<2*this.totalRadius;++a)for(var s=0;s<2*this.totalRadius;++s){var u=this.getLargestNeighbor(a,s);-1===this.data[a][s].y&&u>-1&&o.push({x:a,z:s,largestNeighbor:u})}o.forEach(function(t){e.data[t.x][t.z].y+=(n.simplex2(t.x,t.z)+1)/2*(t.largestNeighbor+1)})}},t.prototype.getLargestNeighbor=function(t,e){for(var n=-1,r=t-1;r<=t+1;++r)for(var i=e-1;i<=e+1;++i)r>=0&&i>=0&&r<2*this.totalRadius&&i<2*this.totalRadius&&(r!==t||i!==e)&&(n=Math.max(n,this.data[r][i].y));return n},t}(),d=function(t){function e(e){var n=t.call(this,e)||this;return n._granularity=u.a.graphics===u.b.Low?200:100,n._vertexMap=new f(h/n._granularity,l/n._granularity),n._themeMeshes=new Map,n}return c(e,t),e.prototype.activateTheme=function(t){this._themeMeshes.forEac
1h(function(e,n){e.forEach(function(e){e.setEnabled(n===t)})})},e.prototype.ensureInitialized=function(){0===this._themeMeshes.size&&this.createMeshes()},e.prototype.createMeshes=function(){for(var t=this,e=new BABYLON.VertexData,n=[],r=[],i=[],u=[],c=0;c<l/this._granularity*2-1;++c)for(var h=0;h<l/this._granularity*2-1;++h){var f=[[[c,h],[c+1,h],[c,h+1]],[[c+1,h+1],[c,h+1],[c+1,h]]];f.forEach(function(e){e.forEach(function(e){var o=t._vertexMap.data[e[0]][e[1]];n.push(o.x*t._granularity,100*o.y,o.z*t._granularity),u.push(u.length),r.push(.98,.98),i.push(.15,.58)})})}e.positions=n,e.indices=u;var d=[];BABYLON.VertexData.ComputeNormals(n,u,d),e.normals=d;var p=function(n){e.applyToMesh(n),n.convertToUnIndexedMesh(),n.material=t.game.getService(o.a).atlasMaterial,n.position.y=-.5,n.freezeWorldMatrix(),n.alwaysSelectAsActiveMesh=!0,n.getBoundingInfo().isLocked=!0,n.receiveShadows=!0,n.setEnabled(!1),n.is_terrain=!0},g=new BABYLON.Mesh("terrain_earth",this.game.scene);e.uvs=r,p(g);var _=new BABYLON.Mesh("terrain_fire",this.game.scene);e.uvs=i,p(_);var m=2*l,y=2*l,v=function(t){t.position.x=l,t.position.y=-18,t.position.z=l,t.freezeWorldMatrix(),t.alwaysSelectAsActiveMesh=!0,t.getBoundingInfo().isLocked=!0,t.setEnabled(!1)},b=BABYLON.MeshBuilder.CreateGround("water_earth",{width:m,height:y,subdivisions:m/this._granularity*2},this.game.scene);b.material=this.game.getService(a.a).waterShaderMaterials.get(s.c.Earth),v(b);var w=BABYLON.MeshBuilder.CreateGround("water_fire",{width:m,height:y,subdivisions:m/this._granularity*2},this.game.scene);w.material=this.game.getService(a.a).waterShaderMaterials.get(s.c.Fire),v(w),this._themeMeshes.set(s.c.Earth,[g,b]),this._themeMeshes.set(s.c.Fire,[_,w])},e}(r.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return E});var r,i=n(25),o=n(714),a=n(702),s=n(7),u=n(2),c=n(14),h=n(711),l=n(72),f=n(688),d=n(48),p=n(23),g=n(97),_=n(712),m=n(36),y=n(43),v=n(9),b=n(105),w=n(13),x=n(95),S=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};!function(t){t[t.Character=0]="Character",t[t.Spells=1]="Spells",t[t.Shopping=2]="Shopping",t[t.Settings=3]="Settings"}(r=r||(r={}));var E=function(t){function e(e){var n=this,l=new i.a(e,function(){n.switchTab(r.Character)},"bag","plank_1"),d=new i.a(e,function(){n.switchTab(r.Spells)},"book","plank_1"),g=new i.a(e,function(){n.switchTab(r.Shopping)},"item_Chest","plank_1"),m=new i.a(e,function(){n.switchTab(r.Settings)},"gear","plank_1"),v=new i.a(e,function(){n.close()},"exit","button_3",T({},c.a.largePadding)),b=new y.a(e,e.engine.getRenderWidth()),w=new a.a(e),x=new o.a(e),S=new _.a(e),E=new h.a(e),P=new f.a(e,[]),O=new s.a(e,[new s.b(e,[new u.a(e,[l],{flex:1}),new u.a(e,[d],{flex:1}),new u.a(e,[g],{flex:1}),new u.a(e,[m],{flex:1}),new u.a(e,[new u.a(e,[b],{paddingTop:"50%",paddingLeft:"50%"}),v],{preferredWidth:"100h",preferredHeight:"100%",forceSquare:!0})],{preferredHeight:"1u"}),new u.a(e,[new p.a(e,"background_1"),new u.a(e,[w,x,S,E],T({flex:1},c.a.mediumPadding))],T({},c.a.smallPadding))],T({},c.a.extraLargePadding));return n=t.call(this,e,[P,O],T({},c.a.mediumPadding,{paddingTop:c.a.mediumSizeValue}))||this,n.charactersTab=w,n.spellsTab=x,n.shoppingTab=S,n.settingsTab=E,n._popup=P,n.buttonClose=v,n.shineClose=b,n._content=O,n.shineClose.element.visible=!1,n._tabButtons=new Map([[r.Character,l],[r.Spells,d],[r.Shopping,g],[r.Settings,m]]),n._tabContents=new Map([[r.Character,w],[r.Spells,x],[r.Shopping,S],[r.Settings,E]]),n.switchTab(r.Character),n.element.visible=!1,n._content.element.visible=!1,n}return S(e,t),Object.defineProperty(e.prototype,"isFullyShown",{get:function(){return this.element.visible&&this._popup.isFullyShown},enumerable:!0,configurable:!0}),e.prototype.showWithTransitionAsync=function(t){var e=this;void 0===t&&(t=r.Character),this.switchTab(t),this.element.visible=!0,this.charactersTab.previewArea.clearItemUI();var n=this.game.getService(m.a).currentLevel;return n&&(n.musicVolume=.4*d.a.musicVolume),this._popup.showWithTransitionAsync().then(function(){t===r.Character&&e.game.getService(v.a).isAnyEquipmentUpgradable()&&e.game.getService(v.a).tutorialState>x.a.WaitingForDialogClose&&e.game.getService(b.a).pushText("REMEMBER TO UPGRADE!",!0,.5,w.a,5e3,!1),e.game.getService(g.a).updateTimeScale(g.b.MainDialog,0),e._content.element.visible=!0,e.events.emit("open")})},e.prototype.close=function(){var t=this.game.getService(m.a).currentLevel;t&&(t.musicVolume=d.a.musicVolume),this.shineClose.element.visible=!1,this.charactersTab.previewArea.clearItemUI(),this.element.visible=!1,this._content.element.visible=!1,this.game.getService(g.a).updateTimeScale(g.b.MainDialog,1),this.events.emit("close")},e.prototype.switchTab=function(t){var e=this;t!==this._activeTab&&(this._activeTab=t,t===r.Shopping&&this.shoppingTab.rerfreshEntries(),this._tabButtons.forEach(function(t,n){n===e._activeTab?t.element.alpha=1:t.element.alpha=.5}
1),this._tabContents.forEach(function(t,n){n===e._activeTab?t.element.visible=!0:t.element.visible=!1}))},e}(l.b)},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(50),i=n(207),o=n(153),a=n(3),s=n(20),u=n(169),c={},h={},e=t.exports=function(t,e,n,l,f){var d,p,g,_,m=f?function(){return t}:u(t),y=r(n,l,e?2:1),v=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(o(m)){for(d=s(t.length);d>v;v++)if((_=e?y(a(p=t[v])[0],p[1]):y(t[v]))===c||_===h)return _}else for(g=m.call(t);!(p=g.next()).done;)if((_=i(g,y,p.value,e))===c||_===h)return _};e.BREAK=c,e.RETURN=h},function(t,e){t.exports=!1},function(t,e,n){var r=n(3),i=n(213),o=n(149),a=n(161)("IE_PROTO"),s=function(){},u=function(){var t,e=n(148)("iframe"),r=o.length;for(e.style.display="none",n(151).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(215),i=n(149).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(215),i=n(149);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(41);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(4),i=n(19),o=n(18),a=n(12)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(57),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(){function t(t){this.gameObject=t,this._disposed=!1,this.gameObject.components.push(this),this._timeSinceCreated=0}return t.prototype.dispose=function(){this._disposed||(this.disposeComponent(),this._disposed=!0)},t.prototype.update=function(t){this._disposed||(this.updateComponent(t),this._timeSinceCreated+=t)},Object.defineProperty(t.prototype,"game",{get:function(){return this.gameObject.game},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=function(){function t(t,e,n){this.x=t,this.y=e,this.z=n}return t.prototype.dot2=function(t,e){return this.x*t+this.y*e},t.prototype.dot3=function(t,e,n){return this.x*t+this.y*e+this.z*n},t}(),i=[new r(1,1,0),new r(-1,1,0),new r(1,-1,0),new r(-1,-1,0),new r(1,0,1),new r(-1,0,1),new r(1,0,-1),new r(-1,0,-1),new r(0,1,1),new r(0,-1,1),new r(0,1,-1),new r(0,-1,-1)],o=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],a=function(){function t(t){void 0===t&&(t=Math.random()),this._seed=t,this.F2=.5*(Math.sqrt(3)-1),this.G2=(3-Math.sqrt(3))/6,this.F3=1/3,this.G3=1/6,this._perm=[],this._gradP=[];for(var e=0;e<512;++e)this._perm.push(0),this._gradP.push(i[0]);this._seed>0&&this._seed<1&&(this._seed*=65536),this._seed=Math.floor(this._seed),this._seed<256&&(this._seed|=this._seed<<8);for(var e=0;e<256;e++){var n=void 0;n=1&e?o[e]^255&this._seed:o[e]^this._seed>>8&255,this._perm[e]=this._perm[e+256]=n,this._gradP[e]=this._gradP[e+256]=i[n%12]}}return t.prototype.simplex2=function(t,e){var n,r,i,o,a,s=(t+e)*this.F2,u=Math.floor(t+s),c=Math.floor(e+s),h=(u+c)*this.G2,l=t-u+h,f=e-c+h;l>f?(o=1,a=0):(o=0,a=1);var d=l-o+this.G2,p=f-a+this.G2,g=l-1+2*this.G2,_=f-1+2*this.G2;u&=255,c&=255;var m=this._gradP[u+this._perm[c]],y=this._gradP[u+o+this._perm[c+a]],v=this._gradP[u+1+this._perm[c+1]],b=.5-l*l-f*f;b<0?n=0:(b*=b,n=b*b*m.dot2(l,f));var w=.5-d*d-p*p;w<0?r=0:(w*=w,r=w*w*y.dot2(d,p));var x=.5-g*g-_*_;return x<0?i=0:(x*=x,i=x*x*v.dot2(g,_)),70*(n+r+i)},t.prototype.simplex3=function(t,e,n){var r,i,o,a,s,u,c,h,l,f,d=(t+e+n)*this.F3,p=Math.floor(t+d),g=Math.floor(e+d),_=Math.floor(n+d),m=(p+g+_)*this.G3,y=t-p+m,v=e-g+m,b=n-_+m;y>=v?v>=b?(s=1,u=0,c=0,h=1,l=1,f=0):y>=b?(s=1,u=0,c=0,h=1,l=0,f=1):(s=0,u=0,c=1,h=1,l=0,f=1):v<b?(s=0,u=0,c=1,h=0,l=1,f=1):y<b?(s=0,u=1,c=0,h=0,l=1,f=1):(s=0,u=1,c=0,h=1,l=1,f=0);var w=y-s+this.G3,x=v-u+this.G3,S=b-c+this.G3,T=y-h+2*this.G3,E=v-l+2*this.G3,P=b-f+2*this.G3,O=y-1+3*this.G3,M=v-1+3*this.G3,C=b-1+3*this.G3;p&=255,g&=255,_&=255;var A=this._gradP[p+this._perm[g+this._perm[_]]],I=this._gradP[p+s+this._perm[g+u+this._perm[_+c]]],R=this._gradP[p+h+this._perm[g+l+this._perm[_+f]]],D=this._gradP[p+1+this._perm[g+1+this._perm[_+1]]],L=.6-y*y-v*v-b*b;L<0?r=0:(L*=L,r=L*L*A.dot3(y,v,b));var k=.6-w*w-x*x-S*S;k<0?i=0:(k*=k,i=k*k*I.dot3(w,x,S));var F=.6-T*T-E*E-P*P;F<0?o=0:(F*=F,o=F*F*R.dot3(T,E,P));var N=.6-O*O-M*M-C*C;return N<0?a=0:(N*=N,a=N*N*D.dot3(O,M,C)),32*(r+i+o+a)},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return w});var r,i=n(93),o=n(9),a=n(138),s=n(31),u=n(286),c=n(15),h=n(16),l=n(97),f=n(192),d=n(62),p=n(687),g=n(193),_=n(37),m=n(190),y=n(34),v=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.WaitingForFirstKill=0]="WaitingForFirstKill",t[t.WaitingForSecondEnemy=1]="WaitingForSecondEnemy",t[t.WaitingForSpellCast=2]="WaitingForSpellCast",t[t.WaitingForBossKill=40]="WaitingForBossKill",t[t.WaitingForIslandTwo=50]="WaitingForIslandTwo",t[t.WaitingForDialogClose=60]="WaitingForDialogClose",t[t.WaitingForIslandThree=70]="WaitingForIslandThree",t[t.WaitingForItemEquip=80]="WaitingForItemEquip",t[t.WaitingForIslandFour=90]="WaitingForIslandFour",t[t.WaitingForBossSpell=100]="WaitingForBossSpell",t[t.WaitingForPlayerMove=110]="WaitingForPlayerMove",t[t.Finis
1hed=1e3]="Finished"}(r=r||(r={}));var b=new Set([r.WaitingForBossKill,r.WaitingForIslandTwo,r.WaitingForDialogClose,r.WaitingForIslandThree,r.WaitingForItemEquip,r.WaitingForIslandFour,r.WaitingForBossSpell,r.Finished]),w=function(t){function e(e){var n=t.call(this,e)||this;return n._level=e,n._playerDataStore=n._level.game.getService(o.a),n._state=n._playerDataStore.tutorialState,n.switchState(n._state,!0),n}return v(e,t),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.updateComponent=function(t){},e.prototype.disposeComponent=function(){this._arrow&&this._arrow.dispose()},e.prototype.switchState=function(t,e){var n=this;if(void 0===e&&(e=!1),this._state!==t||e)switch(this._state=t,h.a.logEvent("v2_tutorial_state_updated",new Map([["new_state",r[t]]]),null),b.has(t)&&(this._playerDataStore.tutorialState=t),t){case r.WaitingForFirstKill:this.game.getService(m.a).showAsync("Our people are being\nhurt by monsters.\nLet's fight them off!\n").then(function(){new g.a(n.game,"Auto Attack",2500),n._level.events.once("player_killed_enemy",function(){n.switchState(r.WaitingForSecondEnemy)})});break;case r.WaitingForSecondEnemy:this.game.getService(f.a).bufferUpdate({template:f.b.PlayerChallenge,image:this.game.getService(d.a).lastScreenshot}),this._level.player.events.on("action_started",function(t){n._state===r.WaitingForSecondEnemy&&t instanceof a.a&&n.switchState(r.WaitingForSpellCast)});break;case r.WaitingForSpellCast:if(this._level.player.cooldownController.getSpellCooldown(c.a.Smash).remaining>0)this.switchState(r.WaitingForBossKill);else{this.game.getService(m.a).showAsync("Use SMASH to deal\ngreater damage to the\nenemy!\n"),this.game.getService(l.a).updateTimeScale(l.b.Tutorial,.05);var i=this.game.getService(_.a).gameScreen.spellButtons.buttons[0].element.getBounds(),v=new PIXI.Point((i.left+i.right)/2,(i.top+i.bottom)/2),w=v.clone();w.y-=3*this.game.getService(s.a).unitSize,this._arrow=new p.a(this.game,v,w),this._level.player.events.on("action_started",function(t){n._state===r.WaitingForSpellCast&&t instanceof u.a&&n.switchState(r.WaitingForBossKill)})}break;case r.WaitingForBossKill:this.game.getService(l.a).updateTimeScale(l.b.Tutorial,1),this._arrow&&this._arrow.dispose(),this._clickBlocker&&this._clickBlocker.destroy(),new g.a(this.game,"Tap to move"),this._level.events.once("boss_killed",function(){n.game.getService(m.a).showAsync("Nice job "+h.a.getPlayerName()+"!\nWe just saved this island.\nNow we are going to the\nnext!").then(function(){return n.game.getService(m.a).showAsync("Remember to collect all\nthe coins and diamonds!\nWe'll need them soon!\n").then(function(){n.switchState(r.WaitingForIslandTwo)})})});break;case r.WaitingForIslandTwo:if(this._level.index>=2){this.game.getService(m.a).showAsync("Enemies here are stronger!\nBut don't worry. Let's\nupgrade my weapon!\n");var i=this.game.getService(_.a).gameScreen.spellButtons.bagButton.element.getBounds(),v=new PIXI.Point((i.left+i.right)/2,(i.top+i.bottom)/2),w=v.clone();w.y-=3*this.game.getService(s.a).unitSize,this._arrow=new p.a(this.game,v,w),this.game.getService(_.a).gameScreen.spellButtons.bagShine.element.visible=!0,this.game.getService(l.a).updateTimeScale(l.b.Tutorial,0),this.game.getService(_.a).gameScreen.spellButtons.bagButton.events.once("click",function(){n.switchState(r.WaitingForDialogClose)})}break;case r.WaitingForDialogClose:this.game.getService(l.a).updateTimeScale(l.b.Tutorial,1),this._arrow&&this._arrow.dispose(),this._clickBlocker&&this._clickBlocker.destroy(),this.game.events.once("player_upgraded_item",function(){var t=n.game.getService(_.a).mainDialog.buttonClose.element.getBounds(),e=new PIXI.Point((t.left+t.right)/2,(t.top+t.bottom)/2),r=e.clone();r.x-=1.5*n.game.getService(s.a).unitSize,r.y+=1.5*n.game.getService(s.a).unitSize,n._arrow=new p.a(n.game,e,r),n.game.getService(_.a).mainDialog.shineClose.element.visible=!0}),this.game.getService(_.a).mainDialog.events.once("close",function(){n.game.getService(m.a).showAsync("Great job! Remember to\nkeep upgrading when we\nhave enough coins!\n"),n.game.getService(o.a).getEquipment(y.a.Helmet)?n.switchState(r.WaitingForIslandFour):n.switchState(r.WaitingForIslandThree)});break;case r.WaitingForIslandThree:if(this.game.getService(l.a).updateTimeScale(l.b.Tutorial,1),this._arrow&&this._arrow.dispose(),this._clickBlocker&&this._clickBlocker.destroy(),this._level.index>=3){this.game.getService(m.a).showAsync("To fight tougher enemies,\nlet's go buy some more\nitems!\n");var i=this.game.getService(_.a).gameScreen.secondRow.shoppingButton.element.getBounds(),v=new PIXI.Point((i.left+i.right)/2,(i.top+i.bottom)/2),w=v.clone();w.y+=3*this.game.getService(s.a).unitSize,this._arrow=new p.a(this.game,v,w),this.game.getService(_.a).gameScreen.secondRow.shoppingShine.element.visible=!0,this.game.getService(l.a).updateTimeScale(l.b.Tutorial,0),this.game.getService(_.a).gameScreen.secondRow.shoppingButton.events.once("click",function(){n.switchState(r.WaitingForItemEquip)})}break;case r.WaitingForItemEquip:this.game.getService(l.a).updateTimeScale(l.b.Tutorial,1),this._arrow&&this._arrow.dispose(),this._clickBlocker&&this._clickBlocker.destroy(),this.game.events.once("player_item_equipped",function(){n.game.getService(_.a).mainDialog.events.once("close",function(){n.game.getService(m.a).showAsync("Love my new helmet!\nPlease keep buying me\nmore items like this!\n"),n.switchState(r.WaitingForIslandFour)})});break;case r.WaitingForIslandFour:this.game.getService(l.a).updateTimeScale(l.b.Tutorial,1),this._arrow&&this._arrow.dispose(),this._clickBlocker&&this._clickBlocker.destroy(),this._level.index>=4&&this.game.getService(m.a).showAsync("Did you know that I'll\nbe fighting even when\nyou are offline?\n").then(function(){return n.game.getService(m.a).showAsync("I will let you know\nwhenever I need help\nor find anything new!\n")}).then(function(){n.switchState(r.WaitingForBossSpell)});break;case r.WaitingForBossSpell:this._arrow&&this._arrow.dispose(),this._clickBlocker&&this._clickBlocker.destroy(),this._level.events.on("spell_warning",function(t){n._state===r.WaitingForBossSpell&&2===t&&(n.game.getService(l.a).updateTimeScale(l.b.Tutorial,.05),n.switchState(r.WaitingForPlayerMove))});break;case r.WaitingForPlayerMove:this._clickBlocker&&this._clickBlocker.destroy(),this.game.getService(m.a).showAsync("Be careful!\nThe boss is casting a\nspell. Run away!\n").then(function(){var t=n._level.player.targetController.targetCharacter,e=t.position.add(new BABYLON.Vector3(280,0,60)),i=BABYLON.Vector3.Project(e,BABYLON.Matrix.Identity(),n._level.scene.getTransformMatrix(),n._level.scene.activeCamera.viewport.toGlobal(n.game.engine.getRenderWidth(),n.game.engine.getRenderHeight())),o=new PIXI.Point(i.x,i.y),a=o.clone();a.y-=2*n.game.getService(s.a).unitSize,n._arrow=new p.a(n.game,o,a),n._level.moveTargetIndicator.setTarget(e,1024),n._level.events.once("move_target_set",function(){n.switchState(r.Finished)})});break;
1default:case r.Finished:this.game.getService(l.a).updateTimeScale(l.b.Tutorial,1),this._arrow&&this._arrow.dispose(),this._clickBlocker&&this._clickBlocker.destroy()}},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r=n(21),i=n(94),o=n(48),a=n(36),s=n(79),u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},h=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},l=53.5,f=function(t){function e(e){var n=t.call(this,e)||this;return n.shakeStrength=0,n.shakeSpeed=2.5,n._tempDirVec=BABYLON.Vector3.Zero(),n._noiseX=new i.a(Math.random()),n._noiseZ=new i.a(Math.random()),n._aimPosition=new BABYLON.Vector3(0,0,0),n._distance=500,n._angle=l,n._camera=new BABYLON.TargetCamera("camera_main",new BABYLON.Vector3(0,0,0),n.game.scene),n._camera.mode=BABYLON.Camera.ORTHOGRAPHIC_CAMERA,n._onResize=function(){n.resizeCamera()},n.game.events.on("resize",n._onResize),n.resizeCamera(),n}return u(e,t),e.prototype.useGenderSelectionAngle=function(){this._angle=30},e.prototype.resetShaking=function(){this.shakeStrength=0,this.shakeSpeed=2.5},e.prototype.disposeService=function(){this.game.events.off("resize",this._onResize),this._renderPipeline&&this._renderPipeline.dispose(),this._camera.dispose()},e.prototype.updateService=function(t){this.updateCameraPosition(t)},e.prototype.enableBlackAndWhite=function(){this._bnwPostProcess||(this._bnwPostProcess=new BABYLON.BlackAndWhitePostProcess("bnw",1,this._camera))},e.prototype.disableBlackAndWhite=function(){this._bnwPostProcess&&(this._bnwPostProcess.dispose(),this._bnwPostProcess=null)},e.prototype.preloadServiceAsync=function(){return c(this,void 0,void 0,function(){return h(this,function(t){return this._renderPipeline=new BABYLON.DefaultRenderingPipeline("render_pipeline",!0,this.game.scene,[this._camera]),this._renderPipeline.fxaaEnabled=!0,o.a.graphics===o.b.High&&(this._renderPipeline.bloomEnabled=!0),[2]})})},e.prototype.resizeCamera=function(){var t=this.game.engine.getRenderWidth()/this.game.engine.getRenderHeight(),e=t<1?350/t:350*t;t<1?(this._camera.orthoTop=e/2,this._camera.orthoBottom=-e/2,this._camera.orthoLeft=-175,this._camera.orthoRight=175):(this._camera.orthoTop=175,this._camera.orthoBottom=-175,this._camera.orthoLeft=-e/2,this._camera.orthoRight=e/2)},e.prototype.updateCameraPosition=function(t){var e=this.game.getService(a.a).currentLevel;if(e&&!e.disposed){var n=e.player||null;if(n){if(this._angle!==l){var r=(l-30)*t/300;Math.abs(r)>=Math.abs(this._angle-l)?this._angle=l:this._angle+=r}var i=250*t/1e3;i>=BABYLON.Vector3.Distance(n.position,this._aimPosition)?this._aimPosition.copyFrom(n.position):(this._tempDirVec.set(n.position.x-this._aimPosition.x,n.position.y-this._aimPosition.y,n.position.z-this._aimPosition.z),this._tempDirVec.normalize(),this._tempDirVec.x*=i,this._tempDirVec.y*=i,this._tempDirVec.z*=i,this._aimPosition.x+=this._tempDirVec.x,this._aimPosition.y+=this._tempDirVec.y,this._aimPosition.z+=this._tempDirVec.z)}else this._aimPosition.x=s.b,this._aimPosition.z=s.b;var o=this.shakeStrength>0?this.shakeStrength*(this._noiseX.simplex2(this._timeSinceCreated/1e3*this.shakeSpeed,0)-.5):0,u=this.shakeStrength>0?this.shakeStrength*(this._noiseZ.simplex2(this._timeSinceCreated/1e3*this.shakeSpeed,0)-.5):0;this._tempDirVec.set(this._aimPosition.x+o,this._aimPosition.y,this._aimPosition.z+u),this._camera.position.x=this._tempDirVec.x+Math.sin(45*Math.PI/180)*this._distance,this._camera.position.y=this._tempDirVec.y+Math.tan(this._angle*Math.PI/180)*this._distance,this._camera.position.z=this._tempDirVec.z+Math.sin(45*Math.PI/180)*this._distance,this._camera.setTarget(this._tempDirVec)}},e}(r.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return a});var r,i=n(21),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.MainDialog=0]="MainDialog",t[t.StartupDialogs=1]="StartupDialogs",t[t.FriendBuffDialog=2]="FriendBuffDialog",t[t.Tutorial=3]="Tutorial",t[t.EndScreen=4]="EndScreen",t[t.SlowMotionEffect=5]="SlowMotionEffect",t[t.CharacterCallout=6]="CharacterCallout"}(r=r||(r={}));var a=function(t){function e(e){var n=t.call(this,e)||this;return n._timeScales=new Map,n._currentTimeScale=1,n.game.events.on("switching_level",function(){n._timeScales.clear(),n.refreshCurrentTimeScale()}),n}return o(e,t),Object.defineProperty(e.prototype,"timeScale",{get:function(){return this._currentTimeScale},enumerable:!0,configurable:!0}),e.prototype.getUpdaterValue=function(t){var e=this._timeScales.get(t);return void 0===e?1:e},e.prototype.updateTimeScale=function(t,e){this._timeScales.set(t,e),this.refreshCurrentTimeScale()},e.prototype.updateService=function(t){},e.prototype.disposeService=function(){},e.prototype.refreshCurrentTimeScale=function(){var t=1;
1this._timeScales.forEach(function(e,n){t=Math.min(t,e)}),this._currentTimeScale=t,this.game.scene.animationTimeScale=this._currentTimeScale,this._currentTimeScale>0&&this._currentTimeScale<1?BABYLON.Animation.AllowMatricesInterpolation=!0:BABYLON.Animation.AllowMatricesInterpolation=!1},e}(i.a)},function(t,e){t.exports={}},function(t,e,n){var r=n(19).f,i=n(39),o=n(12)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(0),i=n(55),o=n(8),a=n(165),s="["+a+"]",u="\u200b\x85",c=RegExp("^"+s+s+"*"),h=RegExp(s+s+"*$"),l=function(t,e,n){var i={},s=o(function(){return!!a[t]()||u[t]()!=u}),c=i[t]=s?e(f):a[t];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},f=l.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(h,"")),t};t.exports=l},function(t,e,n){var r=n(10);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(11),u=n(27),c=r(u),h=n(59),l=r(h),f=n(263),d=r(f),p=n(144),g=r(p),_=function(t){function e(n,r,a){i(this,e);var u=o(this,t.call(this));return u.uid=(0,s.uid)(),u.touched=0,u.resolution=a||c.default.RESOLUTION,u.width=100,u.height=100,u.realWidth=100,u.realHeight=100,u.scaleMode=void 0!==r?r:c.default.SCALE_MODE,u.hasLoaded=!1,u.isLoading=!1,u.source=null,u.origSource=null,u.imageType=null,u.sourceScale=1,u.premultipliedAlpha=!0,u.imageUrl=null,u.isPowerOfTwo=!1,u.mipmap=c.default.MIPMAP_TEXTURES,u.wrapMode=c.default.WRAP_MODE,u._glTextures={},u._enabled=0,u._virtalBoundId=-1,u._destroyed=!1,u.textureCacheIds=[],n&&u.loadSource(n),u}return a(e,t),e.prototype.update=function(){"svg"!==this.imageType&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this._updateDimensions()),this.emit("update",this)},e.prototype._updateDimensions=function(){this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=g.default.isPow2(this.realWidth)&&g.default.isPow2(this.realHeight)},e.prototype.loadSource=function(t){var e=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null);var n=!this.source;if(this.source=t,(t.src&&t.complete||t.getContext)&&t.width&&t.height)this._updateImageType(),"svg"===this.imageType?this._loadSvgSource():this._sourceLoaded(),n&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var r=this;if(t.onload=function(){if(r._updateImageType(),t.onload=null,t.onerror=null,r.isLoading){if(r.isLoading=!1,r._sourceLoaded(),"svg"===r.imageType)return void r._loadSvgSource();r.emit("loaded",r)}},t.onerror=function(){t.onload=null,t.onerror=null,r.isLoading&&(r.isLoading=!1,r.emit("error",r))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===r.imageType)return void r._loadSvgSource();this.isLoading=!1,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this)}}},e.prototype._updateImageType=function(){if(this.imageUrl){var t=(0,s.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var n=t.subType.split("+")[0];if(!(e=(0,s.getUrlFileExtension)("."+n)))throw new Error("Invalid image type in data URI.")}else(e=(0,s.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,s.decomposeDataUri)(this.imageUrl);t?this._loadSvgSourceUsingDataUri(t):this._loadSvgSourceUsingXhr()}},e.prototype._loadSvgSourceUsingDataUri=function(t){var e=void 0;if("base64"===t.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");e=atob(t.data)}else e=t.data;this._loadSvgSourceUsingString(e)},e.prototype._loadSvgSourceUsingXhr=function(){var t=this,e=new XMLHttpRequest;e.onload=function(){if(e.readyState!==e.DONE||200!==e.status)throw new Error("Failed to load SVG using XHR.");t._loadSvgSourceUsingString(e.response)},e.onerror=function(){return t.emit("error",t)},e.open("GET",this.imageUrl,!0),e.send()},e.prototype._loadSvgSourceUsingString=function(t){var n=(0,s.getSvgSize)(t),r=n.width,i=n.height;if(!r||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(r*this.sourceScale),this.realHeight=Math.round(i*this.sourceScale),this._updateDimensions();var o=document.createElement("canvas");o.width=this.realWidth,o.height=this.realHeight,o._pixiId="canvas_"+(0,s.uid)(),o.getContext("2d").drawImage(this.source,0,0,r,i,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=o,e.addToCache(this,o._pixiId),this.isLoading=!1,this._sourceLoaded(),this.emit
1("loaded",this)},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl&&(delete s.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,n,r,i){var o=s.BaseTextureCache[t];if(!o){var a=new Image;void 0===n&&0!==t.indexOf("data:")?a.crossOrigin=(0,d.default)(t):n&&(a.crossOrigin="string"===typeof n?n:"anonymous"),o=new e(a,r),o.imageUrl=t,i&&(o.sourceScale=i),o.resolution=(0,s.getResolutionOfUrl)(t),a.src=t,e.addToCache(o,t)}return o},e.fromCanvas=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=r+"_"+(0,s.uid)());var i=s.BaseTextureCache[t._pixiId];return i||(i=new e(t,n),e.addToCache(i,t._pixiId)),i},e.from=function(t,n,r){if("string"===typeof t)return e.fromImage(t,void 0,n,r);if(t instanceof HTMLImageElement){var i=t.src,o=s.BaseTextureCache[i];return o||(o=new e(t,n),o.imageUrl=i,r&&(o.sourceScale=r),o.resolution=(0,s.getResolutionOfUrl)(i),e.addToCache(o,i)),o}return t instanceof HTMLCanvasElement?e.fromCanvas(t,n):t},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),s.BaseTextureCache[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),s.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"===typeof t){var e=s.BaseTextureCache[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete s.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r<t.textureCacheIds.length;++r)delete s.BaseTextureCache[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null},e}(l.default);e.default=_},function(t,e,n){"use strict";n.d(e,"h",function(){return a}),n.d(e,"a",function(){return u}),n.d(e,"b",function(){return c}),n.d(e,"o",function(){return f}),n.d(e,"c",function(){return d}),n.d(e,"i",function(){return p}),n.d(e,"j",function(){return g}),n.d(e,"l",function(){return _}),n.d(e,"k",function(){return m}),n.d(e,"m",function(){return y}),n.d(e,"d",function(){return P}),n.d(e,"e",function(){return O}),n.d(e,"f",function(){return M}),n.d(e,"g",function(){return C}),n.d(e,"p",function(){return A}),n.d(e,"n",function(){return I});var r=n(1),i=n(34),o=n(77),a=function(t){switch(t){default:return r.b.Level;case i.a.Helmet:return r.b.SpellDamageFactor;case i.a.Torso:return r.b.MaxHealth;case i.a.Boots:return r.b.Armor}},s=function(t){switch(t){default:case i.b.Common:return 10;case i.b.Rare:return 20;case i.b.Epic:return 30;case i.b.Legendary:return 50}},u=function(t){return(t.baseModel.type===i.a.Helmet||t.baseModel.type===i.a.Torso||t.baseModel.type===i.a.Weapon||t.baseModel.type===i.a.Boots)&&t.itemLevel<s(t.rarity)},c=function(t){if(u(t)){var e=n.i(o.d)(t.itemLevel+1,t.rarity),r={baseModel:t.baseModel,itemLevel:t.itemLevel+1,sellResource1:e.sellResource1,sellResource2:e.sellResource2,rarity:t.rarity,statOverrides:t.statOverrides,statModifiers:t.statModifiers};return h(r)}return t},h=function(t){switch(t.baseModel.type){default:case i.a.Weapon:if(t.statOverrides){var e=x(t.itemLevel,t.rarity),n=t.statOverrides.filter(function(t){return t.stat===r.b.AttackInterval})[0].value,o=l(e,n);t.statOverrides.filter(function(t){return t.stat===r.b.MinDamage})[0].value=o.minDamage,t.statOverrides.filter(function(t){return t.stat===r.b.MaxDamage})[0].value=o.maxDamage}break;case i.a.Helmet:if(t.statModifiers){var a=S(t.itemLevel,t.rarity);t.statModifiers.filter(function(t){return t.stat===r.b.SpellDamageFactor})[0].value=Math.max(.001,+(a/100).toFixed(3))}break;case i.a.Torso:if(t.statModifiers){var a=x(t.itemLevel,t.rarity);t.statModifiers.filter(function(t){return t.stat===r.b.MaxHealth})[0].value=5*a}break;case i.a.Boots:if(t.statModifiers){var a=x(t.itemLevel,t.rarity);t.statModifiers.filter(function(t){return t.stat===r.b.Armor})[0].value=3*a}}return t},l=function(t,e){var n=t*e,r=.1+Math.pow(.4*Math.random(),3);return{minDamage:Math.max(1,Math.round(n-n*r)),maxDamage:Math.max(1,Math.round(n+n*r)),attackInterval:e}},f=function(t){return(t.baseModel.type===i.a.Helmet||t.baseModel.type===i.a.Torso||t.baseModel.type===i.a.Weapon||t.baseModel.type===i.a.Boots)&&t.itemLevel>
1=s(t.rarity)&&t.rarity!==i.b.Legendary},d=function(){return{baseModel:i.c.baseModels.Stick_1,itemLevel:1,sellResource1:10,sellResource2:0,rarity:i.b.Common,statOverrides:[{stat:r.b.MinDamage,value:4.5},{stat:r.b.MaxDamage,value:5.5},{stat:r.b.AttackInterval,value:.666666}]}},p=function(){var t=i.a.Helmet;switch(Math.floor(4*Math.random())){default:case 0:t=i.a.Helmet;break;case 1:t=i.a.Weapon;break;case 2:t=i.a.Torso;break;case 3:t=i.a.Boots}var e=i.b.Common;return Math.random()<.1&&(e=i.b.Rare),[E(t,1,e)]},g=function(){var t=i.a.Helmet;switch(Math.floor(4*Math.random())){default:case 0:t=i.a.Helmet;break;case 1:t=i.a.Weapon;break;case 2:t=i.a.Torso;break;case 3:t=i.a.Boots}var e=i.b.Rare;return Math.random()<.1&&(e=i.b.Epic),[E(t,1,e)]},_=function(){var t=i.a.Helmet;switch(Math.floor(4*Math.random())){default:case 0:t=i.a.Helmet;break;case 1:t=i.a.Weapon;break;case 2:t=i.a.Torso;break;case 3:t=i.a.Boots}return[E(t,1,i.b.Epic)]},m=function(){for(var t=[],e=0;e<5;++e){var n=g();t.push(n[0])}return t},y=function(){for(var t=[],e=0;e<5;++e){var n=_();t.push(n[0])}return t},v=function(t){return t<=0?0:t>=1&&t<=5?4:t>5&&t<=10?8:t>10&&t<=15?16:t>15&&t<=20?32:t>20&&t<=25?48:64},b=function(t){return t<=5?Math.floor(8+(t-1)*v(t)/2):t>5&&t<=10?Math.floor(18+(t-6)*v(t)/2):t>10&&t<=15?Math.floor(38+(t-11)*v(t)/2):t>15&&t<=20?Math.floor(78+(t-16)*v(t)/2):t>20&&t<=25?Math.floor(158+(t-21)*v(t)/2):Math.floor(278+(t-26)*v(t)/2)},w=function(t,e){var n=Math.ceil(t),r=Math.floor(e);return Math.floor(Math.random()*(r-n+1))+n},x=function(t,e){var n=v(t),r=b(t),o=1;switch(e){case i.b.Common:o=r;break;case i.b.Rare:o=r+w(0,Math.floor(.5*n));break;case i.b.Epic:o=Math.floor(r+.5*n)+w(0,Math.floor(.5*n-1));break;case i.b.Legendary:}return Math.max(1,Math.floor(o))},S=function(t,e){var n=1;switch(e){case i.b.Common:n=5*Math.pow(1.08,t-1);break;case i.b.Rare:n=5*Math.pow(1.102,t-1);break;case i.b.Epic:n=5*Math.pow(1.108,t-1);break;case i.b.Legendary:}return Math.max(1,n)},T=function(t,e){var n=1;switch(e){case i.b.Common:n=30;break;case i.b.Rare:n=30+30*Math.random();break;case i.b.Epic:n=60+1.333*Math.random()*30;break;case i.b.Legendary:}return Math.max(1,Math.round(n))},E=function(t,e,n){switch(t){default:throw new Error("only equipments have standard definitions.");case i.a.Helmet:return O(e,n);case i.a.Weapon:return P(e,n);case i.a.Torso:return M(e,n);case i.a.Boots:return C(e,n)}},P=function(t,e,a){void 0===a&&(a=0);var s=i.c.baseModels.Stick_1;switch(e){default:break;case i.b.Rare:s=i.c.baseModels.Stick_2;break;case i.b.Epic:s=i.c.baseModels.Stick_3;break;case i.b.Legendary:throw new Error("standard items cannot be legendary")}var u=x(t,e),c=a||+(.5+.2*Math.random()).toFixed(1),h=l(u,c),f=R(t,e).concat(D(t,e)),d=0;switch(e){default:break;case i.b.Common:d=0;break;case i.b.Rare:d=2;break;case i.b.Epic:d=4}var p=n.i(o.d)(t,e);return{baseModel:s,itemLevel:t,rarity:e,sellResource1:p.sellResource1,sellResource2:p.sellResource2,statOverrides:[{stat:r.b.MinDamage,value:h.minDamage},{stat:r.b.MaxDamage,value:h.maxDamage},{stat:r.b.AttackInterval,value:h.attackInterval}],statModifiers:N(f,d)}},O=function(t,e){var a=i.c.baseModels.Helmet_1;switch(e){default:break;case i.b.Rare:a=i.c.baseModels.Helmet_2;break;case i.b.Epic:a=i.c.baseModels.Helmet_3;break;case i.b.Legendary:throw new Error("standard items cannot be legendary")}var s=R(t,e).concat(L(t,e)),u=0;switch(e){default:break;case i.b.Common:u=0;break;case i.b.Rare:u=2;break;case i.b.Epic:u=4}var c=n.i(o.d)(t,e);return{baseModel:a,itemLevel:t,rarity:e,sellResource1:c.sellResource1,sellResource2:c.sellResource2,statModifiers:N(s,u).concat([{stat:r.b.SpellDamageFactor,value:Math.max(.001,+(S(t,e)/100).toFixed(3)),type:r.d.Absolute}])}},M=function(t,e){var a=i.c.baseModels.Armor_1,s=R(t,e).concat(k(t,e)),u=0;switch(e){default:break;case i.b.Common:u=0;break;case i.b.Rare:u=2;break;case i.b.Epic:u=4}var c=n.i(o.d)(t,e);return{baseModel:a,itemLevel:t,rarity:e,sellResource1:c.sellResource1,sellResource2:c.sellResource2,statModifiers:N(s,u).concat([{stat:r.b.MaxHealth,value:5*x(t,e),type:r.d.Absolute}])}},C=function(t,e){var a=i.c.baseModels.Boots_1,s=R(t,e).concat(F(t,e)),u=0;switch(e){default:break;case i.b.Common:u=0;break;case i.b.Rare:u=2;break;case i.b.Epic:u=4}var c=n.i(o.d)(t,e);return{baseModel:a,itemLevel:t,rarity:e,sellResource1:c.sellResource1,sellResource2:c.sellResource2,statModifiers:N(s,u).concat([{stat:r.b.Armor,value:3*x(t,e),type:r.d.Absolute}])}},A=function(t){var e=i.b.Common;switch(t.rarity){case i.b.Common:e=i.b.Rare;break;case i.b.Rare:case i.b.Epic:e=i.b.Epic}return E(t.baseModel.type,t.itemLevel+1,e)},I=function(t){return{baseModel:i.c.baseModels.Chest,itemLevel:t.itemLevel,sellResource1:0,sellResource2:0,rarity:t.rarity,chestOutput:t}},R=function(t,e){return[{stat:r.b.DoubleCoinProbability,value:Math.max(.01,+(.25*T(0,e)/100).toFixed(2)),type:r.d.Absolute},{stat:r.b.ExtraExperiencePerKill,value:Math.max(1,T(0,e)/2),type:r.d.Absolute},{stat:r.b.HealingAttackProbability,value:Math.max(.01,+(.05*T(0,e)/100).toFixed(2)),type:r.d.Absolute}]},D=function(t,e){return[{stat:r.b.AttackInterval,value:Math.min(-.01,+(-.
11*T(0,e)/100).toFixed(2)),type:r.d.Percentage},{stat:r.b.DamageFactor,value:Math.max(.01,+(.2*T(0,e)/100).toFixed(2)),type:r.d.Absolute},{stat:r.b.CritProbability,value:Math.max(.01,+(.2*T(0,e)/100).toFixed(2)),type:r.d.Absolute},{stat:r.b.CritDamageFactor,value:Math.max(.01,+(T(0,e)/100).toFixed(2)),type:r.d.Absolute}]},L=function(t,e){return[{stat:r.b.CritProbability,value:Math.max(.01,+(.1*T(0,e)/100).toFixed(2)),type:r.d.Absolute},{stat:r.b.DodgeProbability,value:Math.max(.01,+(.05*T(0,e)/100).toFixed(2)),type:r.d.Absolute}]},k=function(t,e){return[{stat:r.b.PhysicalDamageReduce,value:Math.max(.01,+(.2*T(0,e)/100).toFixed(2)),type:r.d.Absolute},{stat:r.b.DodgeProbability,value:Math.max(.01,+(.05*T(0,e)/100).toFixed(2)),type:r.d.Absolute}]},F=function(t,e){return[{stat:r.b.MoveSpeed,value:Math.max(.01,+(.2*T(0,e)/100).toFixed(2)),type:r.d.Percentage},{stat:r.b.DodgeProbability,value:Math.max(.01,+(.05*T(0,e)/100).toFixed(2)),type:r.d.Absolute}]},N=function(t,e){for(var n=[],r=Math.min(e,t.length),i=0;i<r;++i){var o=Math.floor(Math.random()*t.length);n.push(t[o]),t.splice(o,1)}return n}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r,i=n(67),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Init=0]="Init",t[t.Started=1]="Started",t[t.Stopping=2]="Stopping",t[t.Stopped=3]="Stopped"}(r||(r={}));var a=function(t){function e(e,n){var i=t.call(this,e.game)||this;return i.level=e,i._material=n,i._active=!1,i._currentSpsIndex=0,i._groups=[],i._state=r.Init,i._sps=new BABYLON.SolidParticleSystem("sps_"+i.id,e.scene),i._sps.initParticles=function(){i._sps.particles.forEach(function(t){t.isVisible=!1})},i._sps.updateParticle=function(t){if(t.isVisible){var e=t.__state__;e.definition.rotate&&e.definition.rotate(e),e.definition.translate&&e.definition.translate(e),e.definition.scale&&e.definition.scale(e),e.definition.color&&e.definition.color(e)}return t},i}return o(e,t),e.prototype.addParticleGroup=function(t,e){t.shape||(t.shape=this.level.cache.getItem("multi_particles_plane",function(t){return BABYLON.MeshBuilder.CreatePlane("multi_particles_plane",{size:100},t.scene)})),this._sps.addShape(t.shape,e),this._groups.push({definition:t,startSpsIndex:this._currentSpsIndex,count:e,lastEmitTime:-1e3/t.emitRate,emitted:0}),this._currentSpsIndex+=e},e.prototype.start=function(){this._mesh=this._sps.buildMesh(),this._mesh.hasVertexAlpha=!0,this._sps.isAlwaysVisible=!0,this._sps.isVisibilityBoxLocked=!0,this._mesh.material=this._material,this._sps.initParticles(),this.active=!0,this._state=r.Started},e.prototype.stopThenDispose=function(){this._state=r.Stopping},e.prototype.updateGameDisplayObject=function(t){for(var e=this,n=!0,i=0;i<this._sps.nbParticles;++i){var o=this._sps.particles[i];if(o.isVisible){n=!1;var a=o.__state__;a.progressInLife+=t/a.life,0===a.progressInLife&&(a.progressInLife=1e-7),a.progressInLife>=1&&(o.isVisible=!1,o.__state__=null)}}if(this._state===r.Stopping&&n)return this._state=r.Stopped,void this.dispose();this._state===r.Started&&this._groups.forEach(function(t){if((!t.definition.totalEmit||t.emitted<t.definition.totalEmit)&&e._timeSinceCreated-t.lastEmitTime>=1e3/t.definition.emitRate)for(var n=t.startSpsIndex;n<t.startSpsIndex+t.count;++n){var r=e._sps.particles[n];if(!r.isVisible){r.isVisible=!0,r.uvs=t.definition.uvs;var i={particle:r,emitIndex:t.emitted++,definition:t.definition,life:t.definition.life(),progressInLife:0,context:{}};r.__state__=i,t.lastEmitTime=e._timeSinceCreated;break}}}),this._sps.setParticles()},e.prototype.disposeGameObject=function(){this._mesh&&this._mesh.dispose(),this._sps.dispose()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r,i=n(31),o=n(94),a=n(21),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.WAITING_FOR_TEXT=0]="WAITING_FOR_TEXT",t[t.ANIMATING_TEXT=1]="ANIMATING_TEXT"}(r||(r={}));var u=function(t){function e(e){var n=t.call(this,e)||this;n._absoluteTime=0,n._queue=[],n._lastStateSwitchTime=0,n._state=r.WAITING_FOR_TEXT,n._noise=new o.a(Math.random()),n._pixiLayer=n.game.getService(i.a);var a=new PIXI.Text;return a.visible=!1,a.text="",a.style.fontFamily="Passion One",a.style.fontSize=n._pixiLayer.unitSize,a.style.fill=16777215,a.style.stroke=135698,a.style.strokeThickness=3,a.style.dropShadow=!0,a.anchor.set(.5,1),n._pixiLayer.topmostLayer.addChild(a),n._label=a,n._uiResizeHandler=function(){n.reposition()},n._pixiLayer.events.on("ui_resize",n._uiResizeHandler),n.reposition(),n}return s(e,t),e.prototype.pushText=function(t,e,n,i,o,a){void 0===e&&(e=!1),void 0===n&&(n=1),void 0===i&&(i=16777215),void 0===o&&(o=1e3),void 0===a&&(a=!1),e&&(this._queue=[],this._state=r.WAITING_FOR_TEXT),this._queue.push({text:t,highlight:e,scale:n,color:i,duration:o,shake:a})},e.prototype.disposeService=function(){this._pixiLayer.events.off("ui_resize",this._uiResizeHandler),this._label.destroy()},e.prototype.updateService=function(t){switch(this._state){case r.WAITING_FOR_TEXT:this._queue.length?(this._currentAnimatingText=this._queue[0],this._queue.splice(0,1),this._label.text=this._currentAnimatingText.text,this._lastStateSwitchTime=this._absoluteTime,this._label.style.fontSize=2*this._pixiLayer.unitSize*this._currentAnimatingText.scale,this._label.style.fill=this._currentAnimatingText.color,this._label.visible=!0,this._label.rotation=0,this._label.alpha=1,this._label.anchor.set(.5,1),this._state=r.ANIMATING_TEXT):this._label.visible=!1;break;case r.ANIMATING_TEXT:var e=(this._absoluteTime-this._lastStateSwitchTime)/this._currentAnimatingText.duration;e>=1?this._state=r.WAITING_FOR_TEXT:(this._absoluteTime-this._lastStateSwitchTime<=200&&this._label.scale.set(1-(this._absoluteTime-this._lastStateSwitchTime)/200*.3),e>.8&&(this._label.alpha=1-(e-.8)/.2),this._currentAnimatingText.shake&&(this._label.rotation=this._noise.simplex2((this._absoluteTime-this._lastStateSwitchTime)/5,0)*(1-e)*.01,this._label.anchor.set(.5+this._noise.simplex2((this._absoluteTime-this._lastStateSwitchTime)/10,0)*(1-e)*.02,1+this._noise.simplex2(0,(this._absoluteTime-this._lastStateSwitchTime)/10)*(1-e)*.02)))}this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.reposition=function(){this._label.position.x=this.game.engine.getRenderWidth()/2,this._label.position.y=this.game.engine.getRenderHeight()-3*this._pixiLayer.unitSize},e}(a.a)},function(t,e,n){var r=n(49),i=n(12)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(49);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var n=t.slice(0);return n.unshift("precision "+e+" float;"),n}}else if("precision"!==t.substring(0,9))return"precision "+e+" float;\n"+t;return t}e.__esModule=!0;var s=n(47),u=n(27),c=function(t){return t&&t.__esModule?t:{default:t}}(u),h=function(t){function e(n,o,s){return r(this,e),i(this,t.call(this,n,a(o,c.default.PRECISION_VERTEX),a(s,c.default.PRECISION_FRAGMENT)))}return o(e,t),e}(s.GLShader);e.default=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(11),u=n(245),c=function(t){return t&&t.__esModule?t:{default:t}}(u),h=function(t){function e(){r(this,e);var n=i(this,t.call(this));return n.children=[],n}return o(e,t),e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var n=0;n<e;n++)this.addChild(arguments[n]);else t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var n=this.getChildIndex(t),r=this.getChildIndex(e);this.children[n]=e,this.children[r]=t,this.onChildrenChange(n<r?n:r)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The supplied index is out of bounds");var n=this.getChildIndex(t);(0,s.removeItems)(this.children,n,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var n=0;n<e;n++)this.removeChild(arguments[n]);else{var r=this.children.indexOf(t);if(-1===r)return null;t.parent=null,t.transform._parentID=-1,(0,s.removeItems)(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,(0,s.removeItems)(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),e},e.prototype.removeChildren=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],n=t,r="number"===typeof e?e:this.children.length,i=r-n,o=void 0;if(i>0&&i<=r){o=this.children.splice(n,i);for(var a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var s=0;s<o.length;++s)o[s].emit("removed",this);return o}if(0===i&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var n=this.children[t];n.visible&&n.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];e.visible&&e.renderable&&(e.calculateBounds(),e._mask?(e._mask.calculateBounds(),this._bounds.addBoundsMask(e._bounds,e._mask._bounds)):e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds))}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function(){},e.prototype.renderWebGL=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this._filters)this.renderAdvancedWebGL(t);else{this._renderWebGL(t);for(var e=0,n=this.children.length;e<n;++e)this.children[e].renderWebGL(t)}},e.prototype.renderAdvancedWebGL=function(t){t.flush();var e=this._filters,n=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var r=0;r<e.length;r++)e[r].enabled&&this._enabledFilters.push(e[r]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}n&&t.maskManager.pushMask(this,this._mask),this._renderWebGL(t);for(var i=0,o=this.children.length;i<o;i++)this.children[i].renderWebGL(t);t.flush(),n&&t.maskManager.popMask(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter()},e.prototype._renderWebGL=function(t){},e.prototype._renderCanvas=function(t){},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,n=this.children.length;e<n;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},e.prototype.destroy=function(e){t.prototype.destroy.call(this);var n="boolean"===typeof e?e:e&&e.children,r=this.removeChildren(0,this.children.length);if(n)for(var i=0;i<r.length;++i)r[i].destroy(e)},a(e,[{key:"width",get:function(){return this.scale.x*this.getLocalBounds().width}
1,set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t}},{key:"height",get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t}}]),e}(c.default);e.default=h,h.prototype.containerUpdateTransform=h.prototype.updateTransform},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(251),u=r(s),c=n(538),h=r(c),l=n(252),f=r(l),d=n(539),p=r(d),g=n(11),_=n(5),m=n(27),y=r(m),v=function(t){function e(n,r,a){i(this,e);var s=o(this,t.call(this,"Canvas",n,r,a));return s.type=_.RENDERER_TYPE.CANVAS,s.rootContext=s.view.getContext("2d",{alpha:s.transparent}),s.context=s.rootContext,s.refresh=!0,s.maskManager=new h.default(s),s.smoothProperty="imageSmoothingEnabled",s.rootContext.imageSmoothingEnabled||(s.rootContext.webkitImageSmoothingEnabled?s.smoothProperty="webkitImageSmoothingEnabled":s.rootContext.mozImageSmoothingEnabled?s.smoothProperty="mozImageSmoothingEnabled":s.rootContext.oImageSmoothingEnabled?s.smoothProperty="oImageSmoothingEnabled":s.rootContext.msImageSmoothingEnabled&&(s.smoothProperty="msImageSmoothingEnabled")),s.initPlugins(),s.blendModes=(0,p.default)(),s._activeBlendMode=null,s.renderingToScreen=!1,s.resize(s.options.width,s.options.height),s}return a(e,t),e.prototype.render=function(t,e,n,r,i){if(this.view){this.renderingToScreen=!e,this.emit("prerender");var o=this.resolution;e?(e=e.baseTexture||e,e._canvasRenderTarget||(e._canvasRenderTarget=new f.default(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):this.context=this.rootContext;var a=this.context;if(e||(this._lastObjectRendered=t),!i){var s=t.parent,u=this._tempDisplayObjectParent.transform.worldTransform;r?(r.copy(u),this._tempDisplayObjectParent.transform._worldID=-1):u.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=s}a.save(),a.setTransform(1,0,0,1,0,0),a.globalAlpha=1,this._activeBlendMode=_.BLEND_MODES.NORMAL,a.globalCompositeOperation=this.blendModes[_.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(a.fillStyle="black",a.clear()),(void 0!==n?n:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?a.clearRect(0,0,this.width,this.height):(a.fillStyle=this._backgroundColorString,a.fillRect(0,0,this.width,this.height)));var c=this.context;this.context=a,t.renderCanvas(this),this.context=c,a.restore(),this.resolution=o,this.emit("postrender")}},e.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},e.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this._activeBlendMode=t,this.context.globalCompositeOperation=this.blendModes[t])},e.prototype.destroy=function(e){this.destroyPlugins(),t.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},e.prototype.resize=function(e,n){t.prototype.resize.call(this,e,n),this.smoothProperty&&(this.rootContext[this.smoothProperty]=y.default.SCALE_MODE===_.SCALE_MODES.LINEAR)},e.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},e}(u.default);e.default=v,g.pluginTarget.mixin(v)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(e){r(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function(){},t.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null},t}();e.default=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=n(76),h=function(t){return t&&t.__esModule?t:{default:t}}(c),l=new u.Point,f=new u.Polygon,d=function(t){function e(n,o,a,s,c){r(this,e);var l=i(this,t.call(this));return l._texture=n||h.default.EMPTY,l.uvs=a||new Float32Array([0,0,1,0,1,1,0,1]),l.vertices=o||new Float32Array([0,0,100,0,100,100,0,100]),l.indices=s||new Uint16Array([0,1,3,2]),l.dirty=0,l.indexDirty=0,l.blendMode=u.BLEND_MODES.NORMAL,l.canvasPadding=0,l.drawMode=c||e.DRAW_MODES.TRIANGLE_MESH,l.shader=null,l.tintRgb=new Float32Array([1,1,1]),l._glDatas={},l._uvTransform=new u.TextureMatrix(l._texture),l.uploadUvTransform=!1,l.pluginName="mesh",l}return o(e,t),e.prototype._renderWebGL=function(t){this.refresh(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){this.refresh(),t.plugins[this.pluginName].render(this)},e.prototype._onTextureUpdate=function(){this._uvTransform.texture=this._texture,this.refresh()},e.prototype.multiplyUvs=function(){this.uploadUvTransform||this._uvTransform.multiplyUvs(this.uvs)},e.prototype.refresh=function(t){this._uvTransform.update(t)&&this._refresh()},e.prototype._refresh=function(){},e.prototype._calculateBounds=function(){this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,l);for(var n=this.vertices,r=f.points,i=this.indices,o=this.indices.length,a=this.drawMode===e.DRAW_MODES.TRIANGLES?3:1,s=0;s+2<o;s+=a){var u=2*i[s],c=2*i[s+1],h=2*i[s+2];if(r[0]=n[u],r[1]=n[u+1],r[2]=n[c],r[3]=n[c+1],r[4]=n[h],r[5]=n[h+1],f.contains(l.x,l.y))return!0}return!1},a(e,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}},{key:"tint",get:function(){return u.utils.rgb2hex(this.tintRgb)}
1,set:function(t){this.tintRgb=u.utils.hex2rgb(t,this.tintRgb)}}]),e}(u.Container);e.default=d,d.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},function(t,e,n){"use strict";var r=n(613).default,i=n(185).default,o=n(280),a=n(281);r.Resource=i,r.async=o,r.base64=a,t.exports=r,t.exports.default=r},function(t,e,n){"use strict";n.d(e,"a",function(){return h}),n.d(e,"b",function(){return l});var r=n(140),i=n(686),o=n(21),a=n(191),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},h=function(t){function e(e){var n=t.call(this,e)||this;return n._texturesLoaded=!1,n._scene=n.findScene(),n.textureManager=new i.a(n._scene),n._loadedModels=new Map,n}return s(e,t),e.prototype.loadModels=function(t){return u(this,void 0,void 0,function(){var e,n,i,o,a=this;return c(this,function(s){switch(s.label){case 0:return e=[],this._texturesLoaded||e.push(this.loadTexturesAsync()),n=new BABYLON.AssetsManager(this._scene),i=new Map,o=new Set,t.forEach(function(t){if(!a._loadedModels.has(t.id)){i.set(t.id,t);var e=""+t.directory+t.fileName;o.has(e)||(o.add(e),a.queueModelFile(n,t.id,t.directory,t.fileName,i),a.game.log(r.b.Info,"[ModelManager] Model file "+e+" queued for download"))}}),e.push(this.loadAsync(n)),[4,Promise.all(e)];case 1:return s.sent(),[2]}})})},e.prototype.removeModelsExcept=function(t){var e=this,n=new Set;t.forEach(function(t){n.add(t.id)}),Array.from(this._loadedModels.keys()).forEach(function(t){if(!n.has(t)){var r=e._loadedModels.get(t);r.skeletons.forEach(function(t){t.dispose()}),r.meshes.forEach(function(t){t.dispose()}),e._loadedModels.delete(t)}})},e.prototype.getLoadedModel=function(t){var e=this._loadedModels.get(t);if(!e)throw new Error("failed to get the requested model.");return e},e.prototype.createInstanceFromModel=function(t,e){var n=this,r=this._loadedModels.get(t);if(!r)throw new Error(t+" has not been loaded");var i=new BABYLON.Mesh("model_root_container_"+t,this._scene);i.isVisible=!1,i.model_id=t;var o=new BABYLON.Mesh("model_container_"+t,this._scene);return o.isVisible=!1,r.meshes.forEach(function(t){var i=t.createInstance(e);i.isVisible=!0,r.config.useAtlasTexture&&n._atlasMaterial&&(t.material=n._atlasMaterial),i.getBoundingInfo().isLocked=!0,i.alwaysSelectAsActiveMesh=!0,o.addChild(i)}),i.addChild(o),r.config.transforms(o),i},e.prototype.createMeshFromModel=function(t,e){var n=this,r=this._loadedModels.get(t);if(!r)throw new Error(t+" has not been loaded");var i=new BABYLON.Mesh("model_root_container_"+t,this._scene);i.isVisible=!1,i.model_id=t;var o=null,a=new Map,s=new BABYLON.Mesh("model_container_"+t,this._scene);s.isVisible=!1;var u=0;
1return r.meshes.forEach(function(t){var i=t.clone(e+"_"+u);i.isVisible=!0,t.skeleton&&(i.skeleton=t.skeleton.clone("skeleton_"+e+"_"+u,"skeleton_"+e+"_"+u),null===o&&(o=i,r.config.boneFinders&&r.config.boneFinders.forEach(function(t,e){a.set(e,t(i.skeleton))}))),r.config.useAtlasTexture&&n._atlasMaterial&&(i.material=n._atlasMaterial),i.getBoundingInfo().isLocked=!0,i.alwaysSelectAsActiveMesh=!0,s.addChild(i),u+=1}),i.addChild(s),r.config.transforms(s),{bones:a,meshWithSkeleton:o,root:i,animations:r.config.animations||new Map,boundingHeight:r.config.boundingHeight||0,boundingRadius:r.config.boundingRadius||0}},Object.defineProperty(e.prototype,"atlasMaterial",{get:function(){return this._atlasMaterial},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"vfxMaterial",{get:function(){return this._vfxMaterial},enumerable:!0,configurable:!0}),e.prototype.loadAsync=function(t){return u(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,n){t.useDefaultLoadingScreen=!1,t.onFinish=function(){e()},t.load()})];case 1:return e.sent(),[2]}})})},e.prototype.findScene=function(){return this.game.scene},e.prototype.listTextures=function(){return i.b},e.prototype.loadTexturesAsync=function(){return u(this,void 0,void 0,function(){var t=this;return c(this,function(e){switch(e.label){case 0:return this.listTextures().forEach(function(e){t.textureManager.add(e)}),[4,this.textureManager.loadAsync()];case 1:return e.sent(),this.textureManager.hasTexture("atlas")&&(this._atlasMaterial=new BABYLON.StandardMaterial("material_atlas_texture",this._scene),this._atlasMaterial.diffuseTexture=this.textureManager.getTexture("atlas"),this._atlasMaterial.ambientColor=new BABYLON.Color3(1,1,1),this._atlasMaterial.freeze()),this.textureManager.hasTexture("vfx")&&(this._vfxMaterial=new BABYLON.StandardMaterial("vfx_material",this._scene),this._vfxMaterial.diffuseTexture=this.textureManager.getTexture("vfx"),this._vfxMaterial.diffuseTexture.hasAlpha=!0,this._vfxMaterial.emissiveTexture=this._vfxMaterial.diffuseTexture,this._vfxMaterial.useAlphaFromDiffuseTexture=!0,this._vfxMaterial.backFaceCulling=!1),this._texturesLoaded=!0,[2]}})})},e.prototype.disposeService=function(){this.textureManager.dispose()},e.prototype.queueModelFile=function(t,e,n,r,i){var o=this,a=t.addMeshTask("task_"+e,"",n,r);a.onSuccess=function(){a.loadedMeshes.forEach(function(t){if(t instanceof BABYLON.Mesh){var e=i.get(t.name);if(!e)return void t.dispose();e.postProcessImports&&e.postProcessImports(t),e.useAtlasTexture&&t.material instanceof BABYLON.StandardMaterial&&t.material.dispose(!0,!0),t.setEnabled(!1),t.isVisible=!1,t.material&&t.material.freeze(),o._loadedModels.set(e.id,{config:e,id:e.id,meshes:[t],skeletons:a.loadedSkeletons})}})}},e}(o.a),l=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.findScene=function(){return this.game.getService(a.a).scene},e.prototype.listTextures=function(){return i.c},e}(h)},function(t,e,n){"use strict";n.d(e,"a",function(){return I}),n.d(e,"b",function(){return R});var r,i=n(34),o=n(23),a=n(17),s=n(1),u=n(25),c=n(9),h=n(2),l=n(7),f=n(14),d=n(143),p=n(13),g=n(71),_=n(73),m=n(707),y=n(38),v=n(188),b=n(16),w=n(103),x=n(77),S=n(43),T=n(69),E=n(37),P=n(70),O=n(105),M=n(36),C=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),A=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};!function(t){t[t.Inventory=0]="Inventory",t[t.Equipment=1]="Equipment"}(r=r||(r={}));var I=function(t){function e(e,i,s){var u=this,d=s>=c.c?r.Equipment:r.Inventory,g=n.i(_.a)(i),m=new o.a(e,"rounded_square_white"),v=new o.a(e,"button_1"),b=new o.a(e,g.iconName),w=new y.a(e,p.o,1,16);return w.element.interactive=!0,u=t.call(this,e,[new h.a(e,[w]),new l.a(e,[new l.b(e,[new a.a(e,""+i.baseModel.name,g.rarityColor,a.b.Center,{strokeThickness:4})],{preferredHeight:"0.6u"}),new l.b(e,[new h.a(e,[m,new h.a(e,[v,b,n.i(_.c)(e,i)],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],A({},f.a.largeSquare,{forceSquare:!0})),new l.a(e,n.i(_.b)(e,i),{preferredHeight:f.a.largeSizeValue,flex:1,flexDirectionAlign:h.b.Center,paddingLeft:f.a.largePaddingValue})],A({}
1,f.a.largePadding)),R(e,i)].concat(D(e,i,d,s,function(){e.getService(E.a).mainDialog.charactersTab.previewArea.clearItemUI()})),A({},f.a.mediumPadding))],A({},f.a.smallPadding))||this,m.sprite.tint=g.rarityColor,u._sourceSlot=s,u}return C(e,t),Object.defineProperty(e.prototype,"sourceSlot",{get:function(){return this._sourceSlot},enumerable:!0,configurable:!0}),e}(d.a),R=function(t,e){var r=n.i(w.h)(e.baseModel.type),i=e.statModifiers?e.statModifiers.filter(function(t){return t.stat!==r}):[];return i.sort(function(t,e){return t.stat-e.stat}),new l.a(t,i.map(function(e){return new h.a(t,[new a.a(t,t.getService(s.a).describeStatModifier(e),p.h,a.b.Left)],{preferredHeight:"0.5u"})}),{paddingLeft:f.a.largePaddingValue,flexDirectionAlign:h.b.Center})},D=function(t,e,d,_,y){var C=[],I=[];if(d===r.Inventory?I.push(new l.a(t,[new h.a(t,(t.getService(T.a).data.shineItemAtSlot===_?[new h.a(t,[new S.a(t,t.engine.getRenderWidth())],{paddingTop:"50%",paddingLeft:"50%"})]:[]).concat([new u.a(t,function(){switch(t.getService(c.a).equipItemFromSlot(_),t.getService(E.a).mainDialog.charactersTab.previewArea.clearItemUI(),e.baseModel.type){default:t.getService(P.a).playOnce("equip_item_1");break;case i.a.Weapon:t.getService(P.a).playOnce("equip_item_2")}},"axe","button_1",{paddingTop:"5%",paddingLeft:"5%",paddingBottom:"5%",paddingRight:"5%"})]),A({},f.a.largeSquare,f.a.mediumPadding)),new h.a(t,[new a.a(t,"EQUIP",16777215,a.b.Center,{strokeThickness:4})],{preferredWidth:f.a.largeSizeValue,preferredHeight:"0.4u"})],A({},f.a.mediumPadding))):I.push(new l.a(t,[new h.a(t,[new u.a(t,function(){y()},"eye","button_1",{paddingTop:"10%",paddingLeft:"10%",paddingBottom:"10%",paddingRight:"10%"})],A({},f.a.largeSquare,f.a.mediumPadding)),new h.a(t,[new a.a(t,"VIEW",16777215,a.b.Center,{strokeThickness:4})],{preferredWidth:f.a.largeSizeValue,preferredHeight:"0.4u"})],A({},f.a.mediumPadding))),n.i(w.a)(e)){var R=n.i(x.a)(e);I.push(new l.a(t,[new h.a(t,(0===t.getService(c.a).itemsUpgraded?[new h.a(t,[new S.a(t,t.engine.getRenderWidth())],{paddingTop:"50%",paddingLeft:"50%"})]:[]).concat([new u.d(t,function(){(t.getService(c.a).baseStats.get(s.b.Resource1)||0)<R?(t.getService(P.a).playOnce("warning"),t.getService(O.a).pushText("REQUIRES "+R+" COINS",!0,.5,p.a,3e3,!1)):t.getService(E.a).mainDialog.charactersTab.previewArea.showUpgradeAnimation(e,_)},R)]),A({},f.a.largeSquare,f.a.mediumPadding)),new h.a(t,[new a.a(t,"UPGRADE",16777215,a.b.Center,{strokeThickness:4})],{preferredWidth:f.a.largeSizeValue,preferredHeight:"0.4u"})],A({},f.a.mediumPadding)))}else n.i(w.o)(e)&&I.push(new l.a(t,[new h.a(t,[new u.a(t,function(){new m.a(t,e,_).showWithTransitionAsync()},"anvil","button_1",{paddingTop:"5%",paddingLeft:"5%",paddingBottom:"5%",paddingRight:"5%"})],A({},f.a.largeSquare,f.a.mediumPadding)),new h.a(t,[new a.a(t,"FORGE",16777215,a.b.Center,{strokeThickness:4})],{preferredWidth:f.a.largeSizeValue,preferredHeight:"0.4u"})],A({},f.a.mediumPadding)));return d===r.Inventory&&(e.sellResource1>0||e.sellResource2>0)&&I.push(new l.a(t,[new h.a(t,[new u.a(t,function(){g.a.showModal(t,"OKAY",[new l.a(t,[new h.a(t,[new a.a(t,"SELL",p.g)],{preferredHeight:"0.75u"}),new l.b(t,[new h.a(t,[new o.a(t,"button_1"),new h.a(t,[new o.a(t,"coin_single")],A({},f.a.largePadding)),new l.a(t,[new h.a(t,[new a.a(t,e.sellResource1.toFixed(),16777215,a.b.Right,{strokeThickness:4})],{preferredHeight:"0.75u",paddingRight:"15%",paddingBottom:"15%"})],{flexDirectionAlign:h.b.End})],A({preferredWidth:"2.5u",preferredHeight:"2.5u"},f.a.extraLargePadding)),new h.a(t,[new o.a(t,"button_1"),new h.a(t,[new o.a(t,"diamond")],A({},f.a.largePadding)),new l.a(t,[new h.a(t,[new a.a(t,e.sellResource2.toFixed(),16777215,a.b.Right,{strokeThickness:4})],{preferredHeight:"0.75u",paddingRight:"15%",paddingBottom:"15%"})],{flexDirectionAlign:h.b.End})],A({preferredWidth:"2.5u",preferredHeight:"2.5u"},f.a.extraLargePadding))],{flexDirectionAlign:h.b.Center})])]).then(function(){var n=t.getService(M.a).currentLevel;n&&(n.player.statsController.setBaseStat(s.b.Resource1,n.player.statsController.getStatValue(s.b.Resource1).final+e.sellResource1),n.player.statsController.setBaseStat(s.b.Resource2,n.player.statsController.getStatValue(s.b.Resource2).final+e.sellResource2),e.sellResource1>0&&new v.a(n.player,e.sellResource1),e.sellResource2>0&&new v.a(n.player,e.sellResource2,v.b.Resource2)),t.getService(c.a).destroyItemAtSlot(_),t.getService(E.a).mainDialog.charactersTab.previewArea.clearItemUI(),t.getService(P.a).playOnce("coin_drop"),b.a.logEvent("sell_item_confirmed",new Map([["sell_item_playerlevel",(t.getService(c.a).baseStats.get(s.b.Level)||0).toFixed()],["sell_item_resource1",e.sellResource1.toFixed()],["sell_item_resource2",e.sellResource2.toFixed()]]),null)}
vendor: 4,459 bytes, line 1
1).catch(function(){})},"money","button_1",{paddingTop:"5%",paddingLeft:"5%",paddingBottom:"5%",paddingRight:"5%"})],A({},f.a.largeSquare,f.a.mediumPadding)),new h.a(t,[new a.a(t,"SELL",16777215,a.b.Center,{strokeThickness:4})],{preferredWidth:f.a.largeSizeValue,preferredHeight:"0.4u"})],A({},f.a.mediumPadding))),C.push(new l.b(t,I,{paddingTop:f.a.largePaddingValue,flexDirectionAlign:h.b.Center})),C}},function(t,e,n){var r=n(46),i=n(20),o=n(91);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),h=o(a,c);if(t&&n!=n){for(;c>h;)if((s=u[h++])!=s)return!0}else for(;c>h;h++)if((t||h in u)&&u[h]===n)return t||h||0;return!t&&-1}}},function(t,e,n){"use strict";var r=n(4),i=n(0),o=n(41),a=n(89),s=n(75),u=n(83),c=n(82),h=n(10),l=n(8),f=n(123),d=n(99),p=n(152);t.exports=function(t,e,n,g,_,m){var y=r[t],v=y,b=_?"set":"add",w=v&&v.prototype,x={},S=function(t){var e=w[t];o(w,t,"delete"==t?function(t){return!(m&&!h(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!h(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!h(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof v&&(m||w.forEach&&!l(function(){(new v).entries().next()}))){var T=new v,E=T[b](m?{}:-0,1)!=T,P=l(function(){T.has(1)}),O=f(function(t){new v(t)}),M=!m&&l(function(){for(var t=new v,e=5;e--;)t[b](e,e);return!t.has(-0)});O||(v=e(function(e,n){c(e,v,t);var r=p(new y,e,v);return void 0!=n&&u(n,_,r[b],r),r}),v.prototype=w,w.constructor=v),(P||M)&&(S("delete"),S("has"),_&&S("get")),(M||E)&&S(b),m&&w.clear&&delete w.clear}else v=g.getConstructor(e,t,_,b),a(v.prototype,n),s.NEED=!0;return d(v,t),x[t]=v,i(i.G+i.W+i.F*(v!=y),x),m||g.setStrong(v,t,_),v}},function(t,e,n){"use strict";var r=n(40),i=n(41),o=n(8),a=n(55),s=n(12);t.exports=function(t,e,n){var u=s(t),c=n(a,u,""[t]),h=c[0],l=c[1];o(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,h),r(RegExp.prototype,u,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)}))}},function(t,e,n){"use strict";var r=n(3);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(49);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(10),i=n(49),o=n(12)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(12)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";t.exports=n(84)||!n(8)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(4)[t]})},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var r=n(0),i=n(35),o=n(50),a=n(83);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,u=arguments[1];return i(this),e=void 0!==u,e&&i(u),void 0==t?new this:(n=[],e?(r=0,s=o(u,arguments[2],2),a(t,!1,function(t){n.push(s(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){var r=n(4),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,n){var r=n(3),i=n(35),o=n(12)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){for(var r,i=n(4),o=n(40),a=n(92),s=a("typed_array"),u=a("view"),c=!(!i.ArrayBuffer||!i.DataView),h=c,l=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[f[l++]])?(o(r.prototype,s,!0),o(r.prototype,u,!0)):h=!1;t.exports={ABV:c,CONSTR:h,TYPED:s,VIEW:u}},function(t,e,n){(function(t){!function(e,n){t.exports=n()}(0,function(){"use strict";function e(){return vr.apply(null,arguments)}function n(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function i(t){var e;
vendor: 12,698 bytes, line 1
1for(e in t)return!1;return!0}function o(t){return void 0===t}function a(t){return"number"===typeof t||"[object Number]"===Object.prototype.toString.call(t)}function s(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function c(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)c(e,n)&&(t[n]=e[n]);return c(e,"toString")&&(t.toString=e.toString),c(e,"valueOf")&&(t.valueOf=e.valueOf),t}function l(t,e,n,r){return ye(t,e,n,r,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function d(t){return null==t._pf&&(t._pf=f()),t._pf}function p(t){if(null==t._isValid){var e=d(t),n=wr.call(e.parsedDateParts,function(t){return null!=t}),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(r=r&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function g(t){var e=l(NaN);return null!=t?h(d(e),t):d(e).userInvalidated=!0,e}function _(t,e){var n,r,i;if(o(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),o(e._i)||(t._i=e._i),o(e._f)||(t._f=e._f),o(e._l)||(t._l=e._l),o(e._strict)||(t._strict=e._strict),o(e._tzm)||(t._tzm=e._tzm),o(e._isUTC)||(t._isUTC=e._isUTC),o(e._offset)||(t._offset=e._offset),o(e._pf)||(t._pf=d(e)),o(e._locale)||(t._locale=e._locale),xr.length>0)for(n=0;n<xr.length;n++)r=xr[n],i=e[r],o(i)||(t[r]=i);return t}function m(t){_(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===Sr&&(Sr=!0,e.updateOffset(this),Sr=!1)}function y(t){return t instanceof m||null!=t&&null!=t._isAMomentObject}function v(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function b(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=v(e)),n}function w(t,e,n){var r,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),a=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&b(t[r])!==b(e[r]))&&a++;return a+o}function x(t){!1===e.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,n){var r=!0;return h(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,t),r){for(var i,o=[],a=0;a<arguments.length;a++){if(i="","object"===typeof arguments[a]){i+="\n["+a+"] ";for(var s in arguments[0])i+=s+": "+arguments[0][s]+", ";i=i.slice(0,-2)}else i=arguments[a];o.push(i)}x(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),r=!1}return n.apply(this,arguments)},n)}function T(t,n){null!=e.deprecationHandler&&e.deprecationHandler(t,n),Tr[t]||(x(n),Tr[t]=!0)}function E(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t){var e,n;for(n in t)e=t[n],E(e)?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function O(t,e){var n,i=h({},t);for(n in e)c(e,n)&&(r(t[n])&&r(e[n])?(i[n]={},h(i[n],t[n]),h(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)c(t,n)&&!c(e,n)&&r(t[n])&&(i[n]=h({},i[n]));return i}function M(t){null!=t&&this.set(t)}function C(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return E(r)?r.call(e,n):r}function A(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function I(){return this._invalidDate}function R(t){return this._ordinal.replace("%d",t)}function D(t,e,n,r){var i=this._relativeTime[n];return E(i)?i(t,e,n,r):i.replace(/%d/i,t)}function L(t,e){var n=this._relativeTime[t>0?"future":"past"];return E(n)?n(e):n.replace(/%s/i,e)}function k(t,e){var n=t.toLowerCase();Rr[n]=Rr[n+"s"]=Rr[e]=t}function F(t){return"string"===typeof t?Rr[t]||Rr[t.toLowerCase()]:void 0}function N(t){var e,n,r={};for(n in t)c(t,n)&&(e=F(n))&&(r[e]=t[n]);return r}function B(t,e){Dr[t]=e}function j(t){var e=[];for(var n in t)e.push({unit:n,priority:Dr[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}function U(t,n){return function(r){return null!=r?(W(this,t,r),e.updateOffset(this,n),this):H(this,t)}}function H(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function W(t,e,n){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](n)}function V(t){return t=F(t),E(this[t])?this[t]():this}function G(t,e){if("object"===typeof t){t=N(t);for(var n=j(t),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit])}else if(t=F(t),E(this[t]))return this[t](e);return this}function Y(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function z(t,e,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),t&&(Nr[t]=i),e&&(Nr[e[0]]=function(){return Y(i.apply(this,arguments),e[1],e[2])}),n&&(Nr[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function X(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function q(t){var e,n,r=t.match(Lr);for(e=0,n=r.length;e<n;e++)Nr[r[e]]?r[e]=Nr[r[e]]:r[e]=X(r[e]);return function(e){var i,o="";for(i=0;i<n;i++)o+=E(r[i])?r[i].call(e,t):r[i];return o}}function K(t,e){return t.isValid()?(e=Z(e,t.localeData()),Fr[e]=Fr[e]||q(e),Fr[e](t)):t.localeData().invalidDate()}function Z(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(kr.lastIndex=0;r>=0&&kr.test(t);)t=t.replace(kr,n),kr.lastIndex=0,r-=1;return t}function J(t,e,n){ei[t]=E(e)?e:function(t,r){return t&&n?n:e}}function $(t,e){return c(ei,t)?ei[t](e._strict,e._locale):new RegExp(Q(t))}function Q(t){return tt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i}))}function tt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function et(t,e){var n,r=e;for("string"===typeof t&&(t=[t]),a(e)&&(r=function(t,n){n[e]=b(t)}),n=0;n<t.length;n++)ni[t[n]]=r}function nt(t,e){et(t,function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)})}function rt(t,e,n){null!=e&&c(ni,t)&&ni[t](e,n._a,n,t)}function it(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function ot(t,e){return t?n(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||di).test(e)?"format":"standalone"][t.month()]:n(this._months)?this._months:this._months.standalone}function at(t,e){return t?n(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[di.test(e)?"format":"standalone"][t.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function st(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=l([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?(i=fi.call(this._shortMonthsParse,a),-1!==i?i:null):(i=fi.call(this._longMonthsParse,a),-1!==i?i:null):"MMM"===e?-1!==(i=fi.call(this._shortMonthsParse,a))?i:(i=fi.call(this._longMonthsParse,a),-1!==i?i:null):-1!==(i=fi.call(this._longMonthsParse,a))?i:(i=fi.call(this._shortMonthsParse,a),-1!==i?i:null)}function ut(t,e,n){var r,i,o;if(this._monthsParseExact)return st.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=l([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function ct(t,e){var n;if(!t.isValid())return t;if("string"===typeof e)if(/^\d+$/.test(e))e=b(e);else if(e=t.localeData().monthsParse(e),!a(e))return t;return n=Math.min(t.date(),it(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function ht(t){return null!=t?(ct(this,t),e.updateOffset(this,!0),this):H(this,"Month")}function lt(){return it(this.year(),this.month())}function ft(t){return this._monthsParseExact?(c(this,"_monthsRegex")||pt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=_i),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function dt(t){return this._monthsParseExact?(c(this,"_monthsRegex")||pt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=mi),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function pt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],o=[];for(e=0;e<12;e++)n=l([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),o.sort(t),e=0;e<12;e++)r[e]=tt(r[e]),i[e]=tt(i[e]);for(e=0;e<24;e++)o[e]=tt(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function gt(t){return _t(t)?366:365}function _t(t){return t%4===0&&t%100!==0||t%400===0}function mt(){return _t(this.year())}function yt(t,e,n,r,i,o,a){var s=new Date(t,e,n,r,i,o,a);return t<100&&t>=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}function vt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function bt(t,e,n){var r=7+e-n;return-(7+vt(t,0,r).getUTCDay()-e)%7+r-1}function wt(t,e,n,r,i){var o,a,s=(7+n-r)%7,u=bt(t,r,i),c=1+7*(e-1)+s+u;return c<=0?(o=t-1,a=gt(o)+c):c>gt(t)?(o=t+1,a=c-gt(t)):(o=t,a=c),{year:o,dayOfYear:a}}function xt(t,e,n){var r,i,o=bt(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?(i=t.year()-1,r=a+St(i,e,n)):a>St(t.year(),e,n)?(r=a-St(t.year(),e,n),i=t.year()+1):(i=t.year(),r=a),{week:r,year:i}}function St(t,e,n){var r=bt(t,e,n),i=bt(t+1,e,n);return(gt(t)-r+i)/7}function Tt(t){return xt(t,this._week.dow,this._week.doy).week}function Et(){return this._week.dow}function Pt(){return this._week.doy}function Ot(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Mt(t){var e=xt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Ct(t,e){return"string"!==typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"===typeof t?t:null):parseInt(t,10)}function At(t,e){return"string"===typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function It(t,e){return t?n(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone}function Rt(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Dt(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Lt(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=l([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?(i=fi.call(this._weekdaysParse,a),-1!==i?i:null):"ddd"===e?(i=fi.call(this._shortWeekdaysParse,a),-1!==i?i:null):(i=fi.call(this._minWeekdaysParse,a),-1!==i?i:null):"dddd"===e?-1!==(i=fi.call(this._weekdaysParse,a))?i:-1!==(i=fi.call(this._shortWeekdaysParse,a))?i:(i=fi.call(this._minWeekdaysParse,a),-1!==i?i:null):"ddd"===e?-1!==(i=fi.call(this._shortWeekdaysParse,a))?i:-1!==(i=fi.call(this._weekdaysParse,a))?i:(i=fi.call(this._minWeekdaysParse,a),-1!==i?i:null):-1!==(i=fi.call(this._minWeekdaysParse,a))?i:-1!==(i=fi.call(this._weekdaysParse,a))?i:(i=fi.call(this._shortWeekdaysParse,a),-1!==i?i:null)}function kt(t,e,n){var r,i,o;if(this._weekdaysParseExact)return Lt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;
vendor: 5,566 bytes, line 1
1r++){if(i=l([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function Ft(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Ct(t,this.localeData()),this.add(t-e,"d")):e}function Nt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Bt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=At(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function jt(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Si),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ut(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ti),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ht(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ei),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Wt(){function t(t,e){return e.length-t.length}var e,n,r,i,o,a=[],s=[],u=[],c=[];for(e=0;e<7;e++)n=l([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),u.push(o),c.push(r),c.push(i),c.push(o);for(a.sort(t),s.sort(t),u.sort(t),c.sort(t),e=0;e<7;e++)s[e]=tt(s[e]),u[e]=tt(u[e]),c[e]=tt(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Vt(){return this.hours()%12||12}function Gt(){return this.hours()||24}function Yt(t,e){z(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function zt(t,e){return e._meridiemParse}function Xt(t){return"p"===(t+"").toLowerCase().charAt(0)}function qt(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Kt(t){return t?t.toLowerCase().replace("_","-"):t}function Zt(t){for(var e,n,r,i,o=0;o<t.length;){for(i=Kt(t[o]).split("-"),e=i.length,n=Kt(t[o+1]),n=n?n.split("-"):null;e>0;){if(r=Jt(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&w(i,n,!0)>=e-1)break;e--}o++}return null}function Jt(e){var n=null;if(!Ai[e]&&"undefined"!==typeof t&&t&&t.exports)try{n=Pi._abbr,function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),$t(n)}catch(t){}return Ai[e]}function $t(t,e){var n;return t&&(n=o(e)?ee(t):Qt(t,e))&&(Pi=n),Pi._abbr}function Qt(t,e){if(null!==e){var n=Ci;if(e.abbr=t,null!=Ai[t])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ai[t]._config;else if(null!=e.parentLocale){if(null==Ai[e.parentLocale])return Ii[e.parentLocale]||(Ii[e.parentLocale]=[]),Ii[e.parentLocale].push({name:t,config:e}),null;n=Ai[e.parentLocale]._config}return Ai[t]=new M(O(n,e)),Ii[t]&&Ii[t].forEach(function(t){Qt(t.name,t.config)}),$t(t),Ai[t]}return delete Ai[t],null}function te(t,e){if(null!=e){var n,r=Ci;null!=Ai[t]&&(r=Ai[t]._config),e=O(r,e),n=new M(e),n.parentLocale=Ai[t],Ai[t]=n,$t(t)}else null!=Ai[t]&&(null!=Ai[t].parentLocale?Ai[t]=Ai[t].parentLocale:null!=Ai[t]&&delete Ai[t]);return Ai[t]}function ee(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Pi;if(!n(t)){if(e=Jt(t))return e;t=[t]}return Zt(t)}function ne(){return Or(Ai)}function re(t){var e,n=t._a;return n&&-2===d(t).overflow&&(e=n[ii]<0||n[ii]>11?ii:n[oi]<1||n[oi]>it(n[ri],n[ii])?oi:n[ai]<0||n[ai]>24||24===n[ai]&&(0!==n[si]||0!==n[ui]||0!==n[ci])?ai:n[si]<0||n[si]>59?si:n[ui]<0||n[ui]>59?ui:n[ci]<0||n[ci]>999?ci:-1,d(t)._overflowDayOfYear&&(e<ri||e>oi)&&(e=oi),d(t)._overflowWeeks&&-1===e&&(e=hi),d(t)._overflowWeekday&&-1===e&&(e=li),d(t).overflow=e),t}function ie(t){var e,n,r,i,o,a,s=t._i,u=Ri.exec(s)||Di.exec(s);if(u){for(d(t).iso=!0,e=0,n=ki.length;e<n;e++)if(ki[e][1].exec(u[1])){i=ki[e][0],r=!1!==ki[e][2];break}if(null==i)return void(t._isValid=!1);if(u[3]){for(e=0,n=Fi.length;e<n;e++)if(Fi[e][1].exec(u[3])){o=(u[2]||" ")+Fi[e][0];break}if(null==o)return void(t._isValid=!1)}if(!r&&null!=o)return void(t._isValid=!1);if(u[4]){if(!Li.exec(u[4]))return void(t._isValid=!1);a="Z"}t._f=i+(o||"")+(a||""),le(t)}
1else t._isValid=!1}function oe(t){var e,n,r,i,o,a,s,u,c={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},h="YXWVUTSRQPONZABCDEFGHIKLM";if(e=t._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),n=Bi.exec(e)){if(r=n[1]?"ddd"+(5===n[1].length?", ":" "):"",i="D MMM "+(n[2].length>10?"YYYY ":"YY "),o="HH:mm"+(n[4]?":ss":""),n[1]){var l=new Date(n[2]),f=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][l.getDay()];if(n[1].substr(0,3)!==f)return d(t).weekdayMismatch=!0,void(t._isValid=!1)}switch(n[5].length){case 2:0===u?s=" +0000":(u=h.indexOf(n[5][1].toUpperCase())-12,s=(u<0?" -":" +")+(""+u).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:s=c[n[5]];break;default:s=c[" GMT"]}n[5]=s,t._i=n.splice(1).join(""),a=" ZZ",t._f=r+i+o+a,le(t),d(t).rfc2822=!0}else t._isValid=!1}function ae(t){var n=Ni.exec(t._i);if(null!==n)return void(t._d=new Date(+n[1]));ie(t),!1===t._isValid&&(delete t._isValid,oe(t),!1===t._isValid&&(delete t._isValid,e.createFromInputFallback(t)))}function se(t,e,n){return null!=t?t:null!=e?e:n}function ue(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function ce(t){var e,n,r,i,o=[];if(!t._d){for(r=ue(t),t._w&&null==t._a[oi]&&null==t._a[ii]&&he(t),null!=t._dayOfYear&&(i=se(t._a[ri],r[ri]),(t._dayOfYear>gt(i)||0===t._dayOfYear)&&(d(t)._overflowDayOfYear=!0),n=vt(i,0,t._dayOfYear),t._a[ii]=n.getUTCMonth(),t._a[oi]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ai]&&0===t._a[si]&&0===t._a[ui]&&0===t._a[ci]&&(t._nextDay=!0,t._a[ai]=0),t._d=(t._useUTC?vt:yt).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ai]=24)}}function he(t){var e,n,r,i,o,a,s,u;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)o=1,a=4,n=se(e.GG,t._a[ri],xt(ve(),1,4).year),r=se(e.W,1),((i=se(e.E,1))<1||i>7)&&(u=!0);else{o=t._locale._week.dow,a=t._locale._week.doy;var c=xt(ve(),o,a);n=se(e.gg,t._a[ri],c.year),r=se(e.w,c.week),null!=e.d?((i=e.d)<0||i>6)&&(u=!0):null!=e.e?(i=e.e+o,(e.e<0||e.e>6)&&(u=!0)):i=o}r<1||r>St(n,o,a)?d(t)._overflowWeeks=!0:null!=u?d(t)._overflowWeekday=!0:(s=wt(n,r,i,o,a),t._a[ri]=s.year,t._dayOfYear=s.dayOfYear)}function le(t){if(t._f===e.ISO_8601)return void ie(t);if(t._f===e.RFC_2822)return void oe(t);t._a=[],d(t).empty=!0;var n,r,i,o,a,s=""+t._i,u=s.length,c=0;for(i=Z(t._f,t._locale).match(Lr)||[],n=0;n<i.length;n++)o=i[n],r=(s.match($(o,t))||[])[0],r&&(a=s.substr(0,s.indexOf(r)),a.length>0&&d(t).unusedInput.push(a),s=s.slice(s.indexOf(r)+r.length),c+=r.length),Nr[o]?(r?d(t).empty=!1:d(t).unusedTokens.push(o),rt(o,r,t)):t._strict&&!r&&d(t).unusedTokens.push(o);d(t).charsLeftOver=u-c,s.length>0&&d(t).unusedInput.push(s),t._a[ai]<=12&&!0===d(t).bigHour&&t._a[ai]>0&&(d(t).bigHour=void 0),d(t).parsedDateParts=t._a.slice(0),d(t).meridiem=t._meridiem,t._a[ai]=fe(t._locale,t._a[ai],t._meridiem),ce(t),re(t)}function fe(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&e<12&&(e+=12),r||12!==e||(e=0),e):e}function de(t){var e,n,r,i,o;if(0===t._f.length)return d(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<t._f.length;i++)o=0,e=_({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],le(e),p(e)&&(o+=d(e).charsLeftOver,o+=10*d(e).unusedTokens.length,d(e).score=o,(null==r||o<r)&&(r=o,n=e));h(t,n||e)}function pe(t){if(!t._d){var e=N(t._i);t._a=u([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ce(t)}}function ge(t){var e=new m(re(_e(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function _e(t){var e=t._i,r=t._f;return t._locale=t._locale||ee(t._l),null===e||void 0===r&&""===e?g({nullInput:!0}):("string"===typeof e&&(t._i=e=t._locale.preparse(e)),y(e)?new m(re(e)):(s(e)?t._d=e:n(r)?de(t):r?le(t):me(t),p(t)||(t._d=null),t))}function me(t){var i=t._i;o(i)?t._d=new Date(e.now()):s(i)?t._d=new Date(i.valueOf()):"string"===typeof i?ae(t):n(i)?(t._a=u(i.slice(0),function(t){return parseInt(t,10)}),ce(t)):r(i)?pe(t):a(i)?t._d=new Date(i):e.createFromInputFallback(t)}function ye(t,e,o,a,s){var u={};return!0!==o&&!1!==o||(a=o,o=void 0),(r(t)&&i(t)||n(t)&&0===t.length)&&(t=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=s,u._l=o,u._i=t,u._f=e,u._strict=a,ge(u)}function ve(t,e,n,r){return ye(t,e,n,r,!1)}function be(t,e){var r,i;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return ve();for(r=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](r)||(r=e[i]);return r}function we(){return be("isBefore",[].slice.call(arguments,0))}function xe(){return be("isAfter",[].slice.call(arguments,0))}function Se(t){for(var e in t)if(-1===Wi.indexOf(e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Wi.length;++r)if(t[Wi[r]]){if(n)return!1;parseFloat(t[Wi[r]])!==b(t[Wi[r]])&&(n=!0)}return!0}function Te(){return this._isValid}function Ee(){return Ge(NaN)}function Pe(t){var e=N(t),n=e.year||0,r=e.quarter||0,i=e.month||0,o=e.week||0,a=e.day||0,s=e.hour||0,u=e.minute||0,c=e.second||0,h=e.millisecond||0;this._isValid=Se(e),this._milliseconds=+h+1e3*c+6e4*u+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=ee(),this._bubble()}function Oe(t){return t instanceof Pe}function Me(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ce(t,e){z(t,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+Y(~~(t/60),2)+e+Y(~~t%60,2)})}function Ae(t,e){var n=(e||"").match(t);if(null===n)return null;var r=n[n.length-1]||[],i=(r+"").match(Vi)||["-",0,0],o=60*i[1]+b(i[2]);return 0===o?0:"+"===i[0]?o:-o}function Ie(t,n){var r,i;return n._isUTC?(r=n.clone(),i=(y(t)||s(t)?t.valueOf():ve(t).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),e.updateOffset(r,!1),r):ve(t).local()}
vendor: 5,351 bytes, line 1
1function Re(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function De(t,n,r){var i,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"===typeof t){if(null===(t=Ae($r,t)))return this}else Math.abs(t)<16&&!r&&(t*=60);return!this._isUTC&&n&&(i=Re(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==t&&(!n||this._changeInProgress?Ke(this,Ge(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Re(this)}function Le(t,e){return null!=t?("string"!==typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function ke(t){return this.utcOffset(0,t)}function Fe(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Re(this),"m")),this}function Ne(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var t=Ae(Jr,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function Be(t){return!!this.isValid()&&(t=t?ve(t).utcOffset():0,(this.utcOffset()-t)%60===0)}function je(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ue(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(_(t,this),t=_e(t),t._a){var e=t._isUTC?l(t._a):ve(t._a);this._isDSTShifted=this.isValid()&&w(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function He(){return!!this.isValid()&&!this._isUTC}function We(){return!!this.isValid()&&this._isUTC}function Ve(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ge(t,e){var n,r,i,o=t,s=null;return Oe(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:a(t)?(o={},e?o[e]=t:o.milliseconds=t):(s=Gi.exec(t))?(n="-"===s[1]?-1:1,o={y:0,d:b(s[oi])*n,h:b(s[ai])*n,m:b(s[si])*n,s:b(s[ui])*n,ms:b(Me(1e3*s[ci]))*n}):(s=Yi.exec(t))?(n="-"===s[1]?-1:1,o={y:Ye(s[2],n),M:Ye(s[3],n),w:Ye(s[4],n),d:Ye(s[5],n),h:Ye(s[6],n),m:Ye(s[7],n),s:Ye(s[8],n)}):null==o?o={}:"object"===typeof o&&("from"in o||"to"in o)&&(i=Xe(ve(o.from),ve(o.to)),o={},o.ms=i.milliseconds,o.M=i.months),r=new Pe(o),Oe(t)&&c(t,"_locale")&&(r._locale=t._locale),r}function Ye(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function ze(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Xe(t,e){var n;return t.isValid()&&e.isValid()?(e=Ie(e,t),t.isBefore(e)?n=ze(t,e):(n=ze(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function qe(t,e){return function(n,r){var i,o;return null===r||isNaN(+r)||(T(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),n="string"===typeof n?+n:n,i=Ge(n,r),Ke(this,i,t),this}}function Ke(t,n,r,i){var o=n._milliseconds,a=Me(n._days),s=Me(n._months);t.isValid()&&(i=null==i||i,o&&t._d.setTime(t._d.valueOf()+o*r),a&&W(t,"Date",H(t,"Date")+a*r),s&&ct(t,H(t,"Month")+s*r),i&&e.updateOffset(t,a||s))}function Ze(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Je(t,n){var r=t||ve(),i=Ie(r,this).startOf("day"),o=e.calendarFormat(this,i)||"sameElse",a=n&&(E(n[o])?n[o].call(this,r):n[o]);return this.format(a||this.localeData().calendar(o,this,ve(r)))}function $e(){return new m(this)}function Qe(t,e){var n=y(t)?t:ve(t);return!(!this.isValid()||!n.isValid())&&(e=F(o(e)?"millisecond":e),"millisecond"===e?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())}function tn(t,e){var n=y(t)?t:ve(t);return!(!this.isValid()||!n.isValid())&&(e=F(o(e)?"millisecond":e),"millisecond"===e?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())}function en(t,e,n,r){return r=r||"()",("("===r[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===r[1]?this.isBefore(e,n):!this.isAfter(e,n))}function nn(t,e){var n,r=y(t)?t:ve(t);return!(!this.isValid()||!r.isValid())&&(e=F(e||"millisecond"),"millisecond"===e?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))}function rn(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function on(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function an(t,e,n){var r,i,o,a;return this.isValid()?(r=Ie(t,this),r.isValid()?(i=6e4*(r.utcOffset()-this.utcOffset()),e=F(e),"year"===e||"month"===e||"quarter"===e?(a=sn(this,r),"quarter"===e?a/=3:"year"===e&&(a/=12)):(o=this-r,a="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-i)/864e5:"week"===e?(o-i)/6048e5:o),n?a:v(a)):NaN):NaN}function sn(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(i,"months");return e-o<0?(n=t.clone().add(i-1,"months"),r=(e-o)/(o-n)):(n=t.clone().add(i+1,"months"),r=(e-o)/(n-o)),-(i+r)||0}function un(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function cn(){if(!this.isValid())return null;var t=this.clone().utc();return t.year()<0||t.year()>9999?K(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):E(Date.prototype.toISOString)?this.toDate().toISOString():K(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}
1function hn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)}function ln(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=K(this,t);return this.localeData().postformat(n)}function fn(t,e){return this.isValid()&&(y(t)&&t.isValid()||ve(t).isValid())?Ge({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function dn(t){return this.from(ve(),t)}function pn(t,e){return this.isValid()&&(y(t)&&t.isValid()||ve(t).isValid())?Ge({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function gn(t){return this.to(ve(),t)}function _n(t){var e;return void 0===t?this._locale._abbr:(e=ee(t),null!=e&&(this._locale=e),this)}function mn(){return this._locale}function yn(t){switch(t=F(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function vn(t){return void 0===(t=F(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function bn(){return this._d.valueOf()-6e4*(this._offset||0)}function wn(){return Math.floor(this.valueOf()/1e3)}function xn(){return new Date(this.valueOf())}function Sn(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Tn(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function En(){return this.isValid()?this.toISOString():null}function Pn(){return p(this)}function On(){return h({},d(this))}function Mn(){return d(this).overflow}function Cn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function An(t,e){z(0,[t,t.length],0,e)}function In(t){return kn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Rn(t){return kn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Dn(){return St(this.year(),1,4)}function Ln(){var t=this.localeData()._week;return St(this.year(),t.dow,t.doy)}function kn(t,e,n,r,i){var o;return null==t?xt(this,r,i).year:(o=St(t,r,i),e>o&&(e=o),Fn.call(this,t,e,n,r,i))}function Fn(t,e,n,r,i){var o=wt(t,e,n,r,i),a=vt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Nn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Bn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function jn(t,e){e[ci]=b(1e3*("0."+t))}function Un(){return this._isUTC?"UTC":""}function Hn(){return this._isUTC?"Coordinated Universal Time":""}function Wn(t){return ve(1e3*t)}function Vn(){return ve.apply(null,arguments).parseZone()}function Gn(t){return t}function Yn(t,e,n,r){var i=ee(),o=l().set(r,e);return i[n](o,t)}function zn(t,e,n){if(a(t)&&(e=t,t=void 0),t=t||"",null!=e)return Yn(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Yn(t,r,n,"month");return i}function Xn(t,e,n,r){"boolean"===typeof t?(a(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,a(e)&&(n=e,e=void 0),e=e||"");var i=ee(),o=t?i._week.dow:0;if(null!=n)return Yn(e,(n+o)%7,r,"day");var s,u=[];for(s=0;s<7;s++)u[s]=Yn(e,(s+o)%7,r,"day");return u}function qn(t,e){return zn(t,e,"months")}function Kn(t,e){return zn(t,e,"monthsShort")}function Zn(t,e,n){return Xn(t,e,n,"weekdays")}function Jn(t,e,n){return Xn(t,e,n,"weekdaysShort")}function $n(t,e,n){return Xn(t,e,n,"weekdaysMin")}function Qn(){var t=this._data;return this._milliseconds=no(this._milliseconds),this._days=no(this._days),this._months=no(this._months),t.milliseconds=no(t.milliseconds),t.seconds=no(t.seconds),t.minutes=no(t.minutes),t.hours=no(t.hours),t.months=no(t.months),t.years=no(t.years),this}function tr(t,e,n,r){var i=Ge(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function er(t,e){return tr(this,t,e,1)}function nr(t,e){return tr(this,t,e,-1)}function rr(t){return t<0?Math.floor(t):Math.ceil(t)}function ir(){var t,e,n,r,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*rr(ar(s)+a),a=0,s=0),u.milliseconds=o%1e3,t=v(o/1e3),u.seconds=t%60,e=v(t/60),u.minutes=e%60,n=v(e/60),u.hours=n%24,a+=v(n/24),i=v(or(a)),s+=i,a-=rr(ar(i)),r=v(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function or(t){return 4800*t/146097}function ar(t){return 146097*t/4800}function sr(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=F(t))||"year"===t)return e=this._days+r/864e5,n=this._months+or(e),"month"===t?n:n/12;switch(e=this._days+Math.round(ar(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}}function ur(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*b(this._months/12):NaN}function cr(t){return function(){return this.as(t)}}function hr(t){return t=F(t),this.isValid()?this[t+"s"]():NaN}function lr(t){return function(){return this.isValid()?this._data[t]:NaN}}function fr(){return v(this.days()/7)}function dr(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function pr(t,e,n){var r=Ge(t).abs(),i=vo(r.as("s")),o=vo(r.as("m")),a=vo(r.as("h")),s=vo(r.as("d")),u=vo(r.as("M")),c=vo(r.as("y")),h=i<=bo.ss&&["s",i]||i<bo.s&&["ss",i]||o<=1&&["m"]||o<bo.m&&["mm",o]||a<=1&&["h"]||a<bo.h&&["hh",a]||s<=1&&["d"]||s<bo.d&&["dd",s]||u<=1&&["M"]||u<bo.M&&["MM",u]||c<=1&&["y"]||["yy",c];return h[2]=e,h[3]=+t>0,h[4]=n,dr.apply(null,h)}function gr(t){return void 0===t?vo:"function"===typeof t&&(vo=t,!0)}function _r(t,e){return void 0!==bo[t]&&(void 0===e?bo[t]:(bo[t]=e,"s"===t&&(bo.ss=e-1),!0))}function mr(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=pr(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function yr(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,r=wo(this._milliseconds)/1e3,i=wo(this._days),o=wo(this._months);t=v(r/60),e=v(t/60),r%=60,t%=60,n=v(o/12),o%=12;var a=n,s=o,u=i,c=e,h=t,l=r,f=this.asSeconds();return f?(f<0?"-":"")+"P"+(a?a+"Y":"")+(s?s+"M":"")+(u?u+"D":"")+(c||h||l?"T":"")+(c?c+"H":"")+(h?h+"M":"")+(l?l+"S":""):"P0D"}var vr,br;br=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var wr=br,xr=e.momentProperties=[],Sr=!1,Tr={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var Er;Er=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)c(t,e)&&n.push(e);return n};var Pr,Or=Er,Mr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Cr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ar=/\d{1,2}/,Ir={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Rr={},Dr={},Lr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}
vendor: 12,761 bytes, line 1
1|x|X|zz?|ZZ?|.)/g,kr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Fr={},Nr={},Br=/\d/,jr=/\d\d/,Ur=/\d{3}/,Hr=/\d{4}/,Wr=/[+-]?\d{6}/,Vr=/\d\d?/,Gr=/\d\d\d\d?/,Yr=/\d\d\d\d\d\d?/,zr=/\d{1,3}/,Xr=/\d{1,4}/,qr=/[+-]?\d{1,6}/,Kr=/\d+/,Zr=/[+-]?\d+/,Jr=/Z|[+-]\d\d:?\d\d/gi,$r=/Z|[+-]\d\d(?::?\d\d)?/gi,Qr=/[+-]?\d+(\.\d{1,3})?/,ti=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ei={},ni={},ri=0,ii=1,oi=2,ai=3,si=4,ui=5,ci=6,hi=7,li=8;Pr=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};var fi=Pr;z("M",["MM",2],"Mo",function(){return this.month()+1}),z("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),z("MMMM",0,0,function(t){return this.localeData().months(this,t)}),k("month","M"),B("month",8),J("M",Vr),J("MM",Vr,jr),J("MMM",function(t,e){return e.monthsShortRegex(t)}),J("MMMM",function(t,e){return e.monthsRegex(t)}),et(["M","MM"],function(t,e){e[ii]=b(t)-1}),et(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[ii]=i:d(n).invalidMonth=t});var di=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,pi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gi="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),_i=ti,mi=ti;z("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),z(0,["YY",2],0,function(){return this.year()%100}),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),k("year","y"),B("year",1),J("Y",Zr),J("YY",Vr,jr),J("YYYY",Xr,Hr),J("YYYYY",qr,Wr),J("YYYYYY",qr,Wr),et(["YYYYY","YYYYYY"],ri),et("YYYY",function(t,n){n[ri]=2===t.length?e.parseTwoDigitYear(t):b(t)}),et("YY",function(t,n){n[ri]=e.parseTwoDigitYear(t)}),et("Y",function(t,e){e[ri]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return b(t)+(b(t)>68?1900:2e3)};var yi=U("FullYear",!0);z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),k("week","w"),k("isoWeek","W"),B("week",5),B("isoWeek",5),J("w",Vr),J("ww",Vr,jr),J("W",Vr),J("WW",Vr,jr),nt(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=b(t)});var vi={dow:0,doy:6};z("d",0,"do","day"),z("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),z("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),z("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),k("day","d"),k("weekday","e"),k("isoWeekday","E"),B("day",11),B("weekday",11),B("isoWeekday",11),J("d",Vr),J("e",Vr),J("E",Vr),J("dd",function(t,e){return e.weekdaysMinRegex(t)}),J("ddd",function(t,e){return e.weekdaysShortRegex(t)}),J("dddd",function(t,e){return e.weekdaysRegex(t)}),nt(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:d(n).invalidWeekday=t}),nt(["d","e","E"],function(t,e,n,r){e[r]=b(t)});var bi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),wi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Si=ti,Ti=ti,Ei=ti;z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Vt),z("k",["kk",2],0,Gt),z("hmm",0,0,function(){return""+Vt.apply(this)+Y(this.minutes(),2)}),z("hmmss",0,0,function(){return""+Vt.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+Y(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)}),Yt("a",!0),Yt("A",!1),k("hour","h"),B("hour",13),J("a",zt),J("A",zt),J("H",Vr),J("h",Vr),J("k",Vr),J("HH",Vr,jr),J("hh",Vr,jr),J("kk",Vr,jr),J("hmm",Gr),J("hmmss",Yr),J("Hmm",Gr),J("Hmmss",Yr),et(["H","HH"],ai),et(["k","kk"],function(t,e,n){var r=b(t);e[ai]=24===r?0:r}),et(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),et(["h","hh"],function(t,e,n){e[ai]=b(t),d(n).bigHour=!0}),et("hmm",function(t,e,n){var r=t.length-2;e[ai]=b(t.substr(0,r)),e[si]=b(t.substr(r)),d(n).bigHour=!0}),et("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[ai]=b(t.substr(0,r)),e[si]=b(t.substr(r,2)),e[ui]=b(t.substr(i)),d(n).bigHour=!0}),et("Hmm",function(t,e,n){var r=t.length-2;e[ai]=b(t.substr(0,r)),e[si]=b(t.substr(r))}),et("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[ai]=b(t.substr(0,r)),e[si]=b(t.substr(r,2)),e[ui]=b(t.substr(i))});var Pi,Oi=/[ap]\.?m?\.?/i,Mi=U("Hours",!0),Ci={calendar:Mr,longDateFormat:Cr,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:Ar,relativeTime:Ir,months:pi,monthsShort:gi,week:vi,weekdays:bi,weekdaysMin:xi,weekdaysShort:wi,meridiemParse:Oi},Ai={},Ii={},Ri=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Di=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Li=/Z|[+-]\d\d(?::?\d\d)?/,ki=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Fi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ni=/^\/?Date\((\-?\d+)/i,Bi=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;e.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),e.ISO_8601=function(){},e.RFC_2822=function(){};var ji=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ve.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()}),Ui=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ve.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:g()}),Hi=function(){return Date.now?Date.now():+new Date},Wi=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ce("Z",":"),Ce("ZZ",""),J("Z",$r),J("ZZ",$r),et(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ae($r,t)});var Vi=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Gi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Yi=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ge.fn=Pe.prototype,Ge.invalid=Ee;var zi=qe(1,"add"),Xi=qe(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var qi=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),An("gggg","weekYear"),An("ggggg","weekYear"),An("GGGG","isoWeekYear"),An("GGGGG","isoWeekYear"),k("weekYear","gg"),k("isoWeekYear","GG"),B("weekYear",1),B("isoWeekYear",1),J("G",Zr),J("g",Zr),J("GG",Vr,jr),J("gg",Vr,jr),J("GGGG",Xr,Hr),J("gggg",Xr,Hr),J("GGGGG",qr,Wr),J("ggggg",qr,Wr),nt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=b(t)}),nt(["gg","GG"],function(t,n,r,i){n[i]=e.parseTwoDigitYear(t)}),z("Q",0,"Qo","quarter"),k("quarter","Q"),B("quarter",7),J("Q",Br),et("Q",function(t,e){e[ii]=3*(b(t)-1)}),z("D",["DD",2],"Do","date"),k("date","D"),B("date",9),J("D",Vr),J("DD",Vr,jr),J("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),et(["D","DD"],oi),et("Do",function(t,e){e[oi]=b(t.match(Vr)[0],10)});var Ki=U("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),k("dayOfYear","DDD"),B("dayOfYear",4),J("DDD",zr),J("DDDD",Ur),et(["DDD","DDDD"],function(t,e,n){n._dayOfYear=b(t)}),z("m",["mm",2],0,"minute"),k("minute","m"),B("minute",14),J("m",Vr),J("mm",Vr,jr),et(["m","mm"],si);var Zi=U("Minutes",!1);z("s",["ss",2],0,"second"),k("second","s"),B("second",15),J("s",Vr),J("ss",Vr,jr),et(["s","ss"],ui);var Ji=U("Seconds",!1);z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),k("millisecond","ms"),B("millisecond",16),J("S",zr,Br),J("SS",zr,jr),J("SSS",zr,Ur);var $i;for($i="SSSS";$i.length<=9;$i+="S")J($i,Kr);for($i="S";$i.length<=9;$i+="S")et($i,jn);var Qi=U("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var to=m.prototype;to.add=zi,to.calendar=Je,to.clone=$e,to.diff=an,to.endOf=vn,to.format=ln,to.from=fn,to.fromNow=dn,to.to=pn,to.toNow=gn,to.get=V,to.invalidAt=Mn,to.isAfter=Qe,to.isBefore=tn,to.isBetween=en,to.isSame=nn,to.isSameOrAfter=rn,to.isSameOrBefore=on,to.isValid=Pn,to.lang=qi,to.locale=_n,to.localeData=mn,to.max=Ui,to.min=ji,to.parsingFlags=On,to.set=G,to.startOf=yn,to.subtract=Xi,to.toArray=Sn,to.toObject=Tn,to.toDate=xn,to.toISOString=cn,to.inspect=hn,to.toJSON=En,to.toString=un,to.unix=wn,to.valueOf=bn,to.creationData=Cn,to.year=yi,to.isLeapYear=mt,to.weekYear=In,to.isoWeekYear=Rn,to.quarter=to.quarters=Nn,to.month=ht,to.daysInMonth=lt,to.week=to.weeks=Ot,to.isoWeek=to.isoWeeks=Mt,to.weeksInYear=Ln,to.isoWeeksInYear=Dn,to.date=Ki,to.day=to.days=Ft,to.weekday=Nt,to.isoWeekday=Bt,to.dayOfYear=Bn,to.hour=to.hours=Mi,to.minute=to.minutes=Zi,to.second=to.seconds=Ji,to.millisecond=to.milliseconds=Qi,to.utcOffset=De,to.utc=ke,to.local=Fe,to.parseZone=Ne,to.hasAlignedHourOffset=Be,to.isDST=je,to.isLocal=He,to.isUtcOffset=We,to.isUtc=Ve,to.isUTC=Ve,to.zoneAbbr=Un,to.zoneName=Hn,to.dates=S("dates accessor is deprecated. Use date instead.",Ki),to.months=S("months accessor is deprecated. Use month instead",ht),to.years=S("years accessor is deprecated. Use year instead",yi),to.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Le),to.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ue);var eo=M.prototype;eo.calendar=C,eo.longDateFormat=A,eo.invalidDate=I,eo.ordinal=R,eo.preparse=Gn,eo.postformat=Gn,eo.relativeTime=D,eo.pastFuture=L,eo.set=P,eo.months=ot,eo.monthsShort=at,eo.monthsParse=ut,eo.monthsRegex=dt,eo.monthsShortRegex=ft,eo.week=Tt,eo.firstDayOfYear=Pt,eo.firstDayOfWeek=Et,eo.weekdays=It,eo.weekdaysMin=Dt,eo.weekdaysShort=Rt,eo.weekdaysParse=kt,eo.weekdaysRegex=jt,eo.weekdaysShortRegex=Ut,eo.weekdaysMinRegex=Ht,eo.isPM=Xt,eo.meridiem=qt,$t("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===b(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),e.lang=S("moment.lang is deprecated. Use moment.locale instead.",$t),e.langData=S("moment.langData is deprecated. Use moment.localeData instead.",ee);var no=Math.abs,ro=cr("ms"),io=cr("s"),oo=cr("m"),ao=cr("h"),so=cr("d"),uo=cr("w"),co=cr("M"),ho=cr("y"),lo=lr("milliseconds"),fo=lr("seconds"),po=lr("minutes"),go=lr("hours"),_o=lr("days"),mo=lr("months"),yo=lr("years"),vo=Math.round,bo={ss:44,s:45,m:45,h:22,d:26,M:11},wo=Math.abs,xo=Pe.prototype;return xo.isValid=Te,xo.abs=Qn,xo.add=er,xo.subtract=nr,xo.as=sr,xo.asMilliseconds=ro,xo.asSeconds=io,xo.asMinutes=oo,xo.asHours=ao,xo.asDays=so,xo.asWeeks=uo,xo.asMonths=co,xo.asYears=ho,xo.valueOf=ur,xo._bubble=ir,xo.get=hr,xo.milliseconds=lo,xo.seconds=fo,xo.minutes=po,xo.hours=go,xo.days=_o,xo.weeks=fr,xo.months=mo,xo.years=yo,xo.humanize=mr,xo.toISOString=yr,xo.toString=yr,xo.toJSON=yr,xo.locale=_n,xo.localeData=mn,xo.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",yr),xo.lang=q
1i,z("X",0,0,"unix"),z("x",0,0,"valueOf"),J("x",Zr),J("X",Qr),et("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),et("x",function(t,e,n){n._d=new Date(b(t))}),e.version="2.18.1",function(t){vr=t}(ve),e.fn=to,e.min=we,e.max=xe,e.now=Hi,e.utc=l,e.unix=Wn,e.months=qn,e.isDate=s,e.locale=$t,e.invalid=g,e.duration=Ge,e.isMoment=y,e.weekdays=Zn,e.parseZone=Vn,e.localeData=ee,e.isDuration=Oe,e.monthsShort=Kn,e.weekdaysMin=$n,e.defineLocale=Qt,e.updateLocale=te,e.locales=ne,e.weekdaysShort=Jn,e.normalizeUnits=F,e.relativeTimeRounding=gr,e.relativeTimeThreshold=_r,e.calendarFormat=Ze,e.prototype=to,e})}).call(e,n(305)(t))},function(t,e,n){"use strict";function r(t,e){var n=t.points;if(0!==n.length){var r=new o.Point(n[0],n[1]),i=new o.Point(n[n.length-2],n[n.length-1]);if(r.x===i.x&&r.y===i.y){n=n.slice(),n.pop(),n.pop(),i=new o.Point(n[n.length-2],n[n.length-1]);var s=i.x+.5*(r.x-i.x),u=i.y+.5*(r.y-i.y);n.unshift(s,u),n.push(s,u)}var c=e.points,h=e.indices,l=n.length/2,f=n.length,d=c.length/6,p=t.lineWidth/2,g=(0,a.hex2rgb)(t.lineColor),_=t.lineAlpha,m=g[0]*_,y=g[1]*_,v=g[2]*_,b=n[0],w=n[1],x=n[2],S=n[3],T=0,E=0,P=-(w-S),O=b-x,M=0,C=0,A=0,I=0,R=Math.sqrt(P*P+O*O);P/=R,O/=R,P*=p,O*=p,c.push(b-P,w-O,m,y,v,_),c.push(b+P,w+O,m,y,v,_);for(var D=1;D<l-1;++D){b=n[2*(D-1)],w=n[2*(D-1)+1],x=n[2*D],S=n[2*D+1],T=n[2*(D+1)],E=n[2*(D+1)+1],P=-(w-S),O=b-x,R=Math.sqrt(P*P+O*O),P/=R,O/=R,P*=p,O*=p,M=-(S-E),C=x-T,R=Math.sqrt(M*M+C*C),M/=R,C/=R,M*=p,C*=p;var L=-O+w-(-O+S),k=-P+x-(-P+b),F=(-P+b)*(-O+S)-(-P+x)*(-O+w),N=-C+E-(-C+S),B=-M+x-(-M+T),j=(-M+T)*(-C+S)-(-M+x)*(-C+E),U=L*B-N*k;if(Math.abs(U)<.1)U+=10.1,c.push(x-P,S-O,m,y,v,_),c.push(x+P,S+O,m,y,v,_);else{var H=(k*j-B*F)/U,W=(N*F-L*j)/U;(H-x)*(H-x)+(W-S)*(W-S)>196*p*p?(A=P-M,I=O-C,R=Math.sqrt(A*A+I*I),A/=R,I/=R,A*=p,I*=p,c.push(x-A,S-I),c.push(m,y,v,_),c.push(x+A,S+I),c.push(m,y,v,_),c.push(x-A,S-I),c.push(m,y,v,_),f++):(c.push(H,W),c.push(m,y,v,_),c.push(x-(H-x),S-(W-S)),c.push(m,y,v,_))}}b=n[2*(l-2)],w=n[2*(l-2)+1],x=n[2*(l-1)],S=n[2*(l-1)+1],P=-(w-S),O=b-x,R=Math.sqrt(P*P+O*O),P/=R,O/=R,P*=p,O*=p,c.push(x-P,S-O),c.push(m,y,v,_),c.push(x+P,S+O),c.push(m,y,v,_),h.push(d);for(var V=0;V<f;++V)h.push(d++);h.push(d-1)}}function i(t,e){var n=0,r=t.points;if(0!==r.length){var i=e.points,o=r.length/2,s=(0,a.hex2rgb)(t.lineColor),u=t.lineAlpha,c=s[0]*u,h=s[1]*u,l=s[2]*u;for(n=1;n<o;n++){var f=r[2*(n-1)],d=r[2*(n-1)+1],p=r[2*n],g=r[2*n+1];i.push(f,d),i.push(c,h,l,u),i.push(p,g),i.push(c,h,l,u)}}}e.__esModule=!0,e.default=function(t,e,n){t.nativeLines?i(t,n):r(t,e)};var o=n(29),a=n(11)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(251),u=r(s),c=n(546),h=r(c),l=n(547),f=r(l),d=n(545),p=r(d),g=n(135),_=r(g),m=n(134),y=r(m),v=n(541),b=r(v),w=n(102),x=r(w),S=n(540),T=r(S),E=n(542),P=r(E),O=n(550),M=r(O),C=n(551),A=r(C),I=n(11),R=n(47),D=r(R),L=n(5),k=0,F=function(t){function e(n,r,a){i(this,e);var s=o(this,t.call(this,"WebGL",n,r,a));return s.legacy=s.options.legacy,s.legacy&&(D.default.VertexArrayObject.FORCE_NATIVE=!0),s.type=L.RENDERER_TYPE.WEBGL,s.handleContextLost=s.handleContextLost.bind(s),s.handleContextRestored=s.handleContextRestored.bind(s),s.view.addEventListener("webglcontextlost",s.handleContextLost,!1),s.view.addEventListener("webglcontextrestored",s.handleContextRestored,!1),s._contextOptions={alpha:s.transparent,antialias:s.options.antialias,premultipliedAlpha:s.transparent&&"notMultiplied"!==s.transparent,stencil:!0,preserveDrawingBuffer:s.options.preserveDrawingBuffer,powerPreference:s.options.powerPreference},s._backgroundColorRgba[3]=s.transparent?0:1,s.maskManager=new h.default(s),s.stencilManager=new f.default(s),s.emptyRenderer=new y.default(s),s.currentRenderer=s.emptyRenderer,s.textureManager=null,s.filterManager=null,s.initPlugins(),s.options.context&&(0,A.default)(s.options.context),s.gl=s.options.context||D.default.createContext(s.view,s._contextOptions),s.CONTEXT_UID=k++,s.state=new P.default(s.gl),s.renderingToScreen=!0,s.boundTextures=null,s._activeShader=null,s._activeVao=null,
1s._activeRenderTarget=null,s._initContext(),s.drawModes=(0,M.default)(s.gl),s._nextTextureLocation=0,s.setBlendMode(0),s}return a(e,t),e.prototype._initContext=function(){var t=this.gl;t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext();var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this._activeShader=null,this._activeVao=null,this.boundTextures=new Array(e),this.emptyTextures=new Array(e),this.textureManager=new b.default(this),this.filterManager=new p.default(this),this.textureGC=new T.default(this),this.state.resetToDefault(),this.rootRenderTarget=new _.default(t,this.width,this.height,null,this.resolution,!0),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget);var n=new D.default.GLTexture.fromData(t,null,1,1),r={_glTextures:{}};r._glTextures[this.CONTEXT_UID]={};for(var i=0;i<e;i++){var o=new x.default;o._glTextures[this.CONTEXT_UID]=n,this.boundTextures[i]=r,this.emptyTextures[i]=o,this.bindTexture(null,i)}this.emit("context",t),this.resize(this.screen.width,this.screen.height)},e.prototype.render=function(t,e,n,r,i){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(this._nextTextureLocation=0,e||(this._lastObjectRendered=t),!i){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.bindRenderTexture(e,r),this.currentRenderer.start(),(void 0!==n?n:this.clearBeforeRender)&&this._activeRenderTarget.clear(),t.renderWebGL(this),this.currentRenderer.flush(),this.textureGC.update(),this.emit("postrender")}},e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.resize=function(t,e){u.default.prototype.resize.call(this,t,e),this.rootRenderTarget.resize(t,e),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},e.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},e.prototype.clear=function(t){this._activeRenderTarget.clear(t)},e.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},e.prototype.clearRenderTexture=function(t,e){var n=t.baseTexture,r=n._glRenderTargets[this.CONTEXT_UID];return r&&r.clear(e),this},e.prototype.bindRenderTexture=function(t,e){var n=void 0;if(t){var r=t.baseTexture;r._glRenderTargets[this.CONTEXT_UID]||this.textureManager.updateTexture(r,0),this.unbindTexture(r),n=r._glRenderTargets[this.CONTEXT_UID],n.setFrame(t.frame)}else n=this.rootRenderTarget;return n.transform=e,this.bindRenderTarget(n),this},e.prototype.bindRenderTarget=function(t){return t!==this._activeRenderTarget&&(this._activeRenderTarget=t,t.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=t.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(t.stencilMaskStack)),this},e.prototype.bindShader=function(t,e){return this._activeShader!==t&&(this._activeShader=t,t.bind(),!1!==e&&(t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0))),this},e.prototype.bindTexture=function(t,e,n){if(t=t||this.emptyTextures[e],t=t.baseTexture||t,t.touched=this.textureGC.count,n)e=e||0;else{for(var r=0;r<this.boundTextures.length;r++)if(this.boundTextures[r]===t)return r;void 0===e&&(this._nextTextureLocation++,this._nextTextureLocation%=this.boundTextures.length,e=this.boundTextures.length-this._nextTextureLocation-1)}var i=this.gl,o=t._glTextures[this.CONTEXT_UID];return o?(this.boundTextures[e]=t,i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,o.texture)):this.textureManager.updateTexture(t,e),e},e.prototype.unbindTexture=function(t){var e=this.gl;t=t.baseTexture||t;for(var n=0;n<this.boundTextures.length;n++)this.boundTextures[n]===t&&(this.boundTextures[n]=this.emptyTextures[n],e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[n]._glTextures[this.CONTEXT_UID].texture));return this},e.prototype.createVao=function(){return new D.default.VertexArrayObject(this.gl,this.state.attribState)},e.prototype.bindVao=function(t){return this._activeVao===t?this:(t?t.bind():this._activeVao&&this._activeVao.unbind(),this._activeVao=t,this)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer),this._activeShader=null,this._activeVao=null,this._activeRenderTarget=this.rootRen
1derTarget;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.emptyTextures[t];return this.rootRenderTarget.activate(),this.state.resetToDefault(),this},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.textureManager.removeAll(),this.filterManager.destroy(!0),this._initContext()},e.prototype.destroy=function(e){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),t.prototype.destroy.call(this,e),this.uid=0,this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null},e}(u.default);e.default=F,I.pluginTarget.mixin(F)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(112),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(){return r(this,e),i(this,t.apply(this,arguments))}return o(e,t),e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.flush=function(){},e.prototype.render=function(t){},e}(s.default);e.default=u},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(29),o=n(5),a=n(27),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=n(47),c=function(){function t(e,n,a,c,h,l){r(this,t),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new i.Rectangle(0,0,1,1),this.resolution=h||s.default.RESOLUTION,this.projectionMatrix=new i.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new i.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.scaleMode=void 0!==c?c:s.default.SCALE_MODE,this.root=l,this.root?(this.frameBuffer=new u.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=u.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===o.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame
1(),this.resize(n,a)}return t.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},t.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},t.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||this.destinationFrame},t.prototype.activate=function(){var t=this.gl;this.frameBuffer.bind(),this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(t.enable(t.SCISSOR_TEST),t.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):t.disable(t.SCISSOR_TEST),t.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},t.prototype.calculateProjection=function(t,e){var n=this.projectionMatrix;e=e||t,n.identity(),this.root?(n.a=1/t.width*2,n.d=-1/t.height*2,n.tx=-1-e.x*n.a,n.ty=1-e.y*n.d):(n.a=1/t.width*2,n.d=1/t.height*2,n.tx=-1-e.x*n.a,n.ty=-1-e.y*n.d)},t.prototype.resize=function(t,e){if(t|=0,e|=0,this.size.width!==t||this.size.height!==e){this.size.width=t,this.size.height=e,this.defaultFrame.width=t,this.defaultFrame.height=e,this.frameBuffer.resize(t*this.resolution,e*this.resolution);var n=this.frame||this.size;this.calculateProjection(n)}},t.prototype.destroy=function(){this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null},t}();e.default=c},function(t,e,n){"use strict";(function(t){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}e.__esModule=!0,e.loader=e.prepare=e.particles=e.mesh=e.loaders=e.interaction=e.filters=e.extras=e.extract=e.accessibility=void 0;var i=n(600);
1Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})});var o=n(6);Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var a=n(566),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=n(523),c=r(u),h=n(568),l=r(h),f=n(264),d=r(f),p=n(582),g=r(p),_=n(585),m=r(_),y=n(586),v=r(y),b=n(591),w=r(b),x=n(594),S=r(x),T=n(603),E=r(T);o.utils.mixins.performMixins();var P=v.shared||null;e.accessibility=c,e.extract=l,e.extras=d,e.filters=g,e.interaction=m,e.loaders=v,e.mesh=w,e.particles=S,e.prepare=E,e.loader=P,"function"===typeof s.default&&(0,s.default)(e),t.PIXI=e}).call(e,n(81))},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(630),i=n(186),o=n(632),a=n(631),s=n(629),u=n(295),c=new Map([[1,{model:n.i(u.a)(),behavior:function(t){}}],[4,{model:n.i(u.b)(),behavior:function(t){t.buffController.addBuff(new r.a(t,5,3,3))}}],[7,{model:n.i(u.c)(),behavior:function(t){t.buffController.addBuff(new s.a(t,5,2,3))}}],[10,{model:n.i(u.d)(),behavior:function(t){var e=n.i(i.b)(10,0,0);t.buffController.addBuff(new o.a(t,12,3,e,function(){}))}}],[13,{model:n.i(u.e)(),behavior:function(t){t.buffController.addBuff(new a.a(t,10,5,3))}}],[16,{model:n.i(u.f)(),behavior:function(t){t.buffController.addBuff(new r.a(t,9,3,3));var e=n.i(i.b)(16,0,0);t.buffController.addBuff(new o.a(t,12,6,e,function(){}))}}],[19,{model:n.i(u.g)(),behavior:function(t){t.buffController.addBuff(new s.a(t,7,2,3));var e=n.i(i.b)(19,0,0);t.buffController.addBuff(new o.a(t,9,5,e,function(){}))}}],[22,{model:n.i(u.b)(),behavior:function(t){t.buffController.addBuff(new r.a(t,5,2,3))}}],[25,{model:n.i(u.c)(),behavior:function(t){t.buffController.addBuff(new s.a(t,4,1,3))}}],[28,{model:n.i(u.d)(),behavior:function(t){var e=n.i(i.b)(28,0,0);t.buffController.addBuff(new o.a(t,10,3,e,function(t){t.buffController.addBuff(new r.a(t,5,2,1))}))}}],[31,{model:n.i(u.e)(),behavior:function(t){t.buffController.addBuff(new a.a(t,9,5,3))}}],[34,{model:n.i(u.f)(),behavior:function(t){t.buffController.addBuff(new r.a(t,8,2,3));var e=n.i(i.b)(34,0,0);t.buffController.addBuff(new o.a(t,10,5,e,function(t){t.buffController.addBuff(new r.a(t,5,2,1))}))}}],[37,{model:n.i(u.g)(),behavior:function(t){t.buffController.addBuff(new s.a(t,6,1,3));var e=n.i(i.b)(37,0,0);t.buffController.addBuff(new o.a(t,7,4,e,function(t){t.buffController.addBuff(new s.a(t,5,2,1))}))}}],[40,{model:n.i(u.b)(),behavior:function(t){t.buffController.addBuff(new r.a(t,5,1,3))}}],[43,{model:n.i(u.c)(),behavior:function(t){t.buffController.addBuff(new s.a(t,3,1,3))}}],[46,{model:n.i(u.d)(),behavior:function(t){var e=n.i(i.b)(46,0,0);t.buffController.addBuff(new o.a(t,8,3,e,function(t){t.buffController.addBuff(new a.a(t,10,3,1))}))}}],[49,{model:n.i(u.e)(),behavior:function(t){t.buffController.addBuff(new a.a(t,7,5,3))}}],[52,{model:n.i(u.f)(),behavior:function(t){t.buffController.addBuff(new r.a(t,7,1,3));var e=n.i(i.b)(52,0,0);t.buffController.addBuff(new o.a(t,8,4,e,function(t){t.buffController.addBuff(new s.a(t,5,2,1))}))}}],[55,{model:n.i(u.g)(),behavior:function(t){t.buffController.addBuff(new s.a(t,4,1,3));var e=n.i(i.b)(55,0,0);t.buffController.addBuff(new o.a(t,5,4,e,function(t){t.buffController.addBuff(new a.a(t,10,3,1))}))}}]])},function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r=n(61),i=n(1),o=n(78),a=n(33),s=n(659),u=n(24),c=n(62),h=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=["punch_1","punch_2"],f=function(t){function e(e,n){var r=t.call(this,e)||this;return r._target=n,r._damageDone=!1,r}return h(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return this.character.statsController.getStatValue(i.b.AttackInterval).final},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){var t=Math.random()<.5?"attack1":"attack2",e="attack1"===t?u.b.Attack1:u.b.Attack2,n=this.character.level.modelManager.getLoadedModel(this.character.config.modelId).config.animations,r=2;if(n){var i=n.get(e);i&&(r=(i.lastFrame-i.firstFrame+1)/30/i.baseSpeed)}var o=.9*this._duration<r?r/(.9*this._duration):1;this.character.animationController.playState(t,o)},e.prototype.updateAction=function(){if(this._progress>=.3&&!this._damageDone){if(!this._target.disposed&&this._target.lifeStateController.state===a.a.Alive){var t=this.character.level.combat.dealDamage({source:this.character,target:this._target,min:this.character.statsController.getStatValue(i.b.MinDamage).final,max:this.character.statsController.getStatValue(i.b.MaxDamage).final,attackType:o.a.Melee,damageType:o.b.Physical,fromSpell:null});if(this.character===this.character.level.player)switch(t){case o.c.Dodged:case o.c.Missed:this.character.level.soundManager.playOnce("miss");break;case o.c.NormalHit:case o.c.CritHit:this.character.level.soundManager.playOnce(l[Math.floor(Math.random()*l.length)])}}this._damageDone=!0,this.character===this.character.level.player&&(new s.a(this.character,100),this.character.game.getService(c.a).takeScreenshot(c.b.BACKUP))}},e.prototype.endAction=function(){},e}(r.a)},function(t,e,n){"use strict";function r(t){return new Promise(function(e){window.setTimeout(function(){e()},t)})}function i(t,e,n,r){var i=1.70158,o=t;return r*(o/=e)*o*((i+1)*o-i)+n}function o(t,e,n,r){var i=1.70158,o=0,a=r,s=t;return 0===s?n:1===(s/=e)?n+r:(o||(o=.3*e),a<Math.abs(r)?(a=r,i=o/4):i=o/(2*Math.PI)*Math.asin(r/a),a*Math.pow(2,-10*s)*Math.sin((s*e-i)*(2*Math.PI)/o)+r+n)}e.c=r,e.b=i,e.a=o},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return D});var r,i=n(131),o=(n.n(i),n(36)),a=n(298),s=n(24),u=n(31),c=n(59),h=(n.n(c),n(9)),l=n(1),f=n(69),d=n(192),p=n(48),g=n(16),_=n(189),m=n(97),y=n(70),v=n(115),b=n(191),w=n(96),x=n(299),S=n(62),T=n(142),E=n(141),P=n(682),O=n(79),M=n(37),C=n(105),A=n(190),I=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Prom
1ise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},R=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(t){t[t.Combat=0]="Combat",t[t.Info=1]="Info",t[t.Debug=2]="Debug",t[t.Error=3]="Error"}(r=r||(r={}));var D=function(){function t(t){this.config=t,this._objects=new Map,this._services=new Map,this._events=new c.EventEmitter,this._currentTime=0;var e=g.a.getEntryPointData();this._launchSource=e?e.source||g.a.getContextType():g.a.getContextType()}return t.prototype.startLoadingAsync=function(){return I(this,void 0,void 0,function(){var t,e,n,r=this;return R(this,function(o){switch(o.label){case 0:return this._loadingStartTime=i().valueOf(),g.a.logEvent("game_loading_start",new Map([["launch_source",this._launchSource],["context_type",g.a.getContextType()||"SOLO"]]),null),p.a.setDefault(),t=document.getElementById("game3d"),t.focus(),e=2,p.a.graphics===p.b.Low?e=1:p.a.graphics===p.b.Mid&&(e=1.5),this._engine=new BABYLON.Engine(t,!1,{limitDeviceRatio:e,preserveDrawingBuffer:!0},!0),this._engine.enableOfflineSupport=!1,this.setupScene(),this.configureServices(),[4,Promise.all(Array.from(this._services.values()).map(function(t){return t.preloadAsync()}))];case 1:return o.sent(),[4,Promise.all(Array.from(this._services.values()).map(function(t){return t.startAsync()}))];case 2:return o.sent(),window.addEventListener("resize",function(){r.engine.resize(),r.events.emit("resize")}),n=this.getService(m.a),this.engine.runRenderLoop(function(){var t=r.engine.getDeltaTime()*n.timeScale;r.update(t),(n.timeScale>0||0===n.getUpdaterValue(m.b.Tutorial))&&r._scene.render()}),[2]}})})},t.prototype.update=function(t){this._currentTime+=t,this._objects.forEach(function(e){e.update(t)})},t.prototype.addService=function(t){if(this._services.has(t))throw new Error("this service has already been added to the game.");this._services.set(t,new t(this))},t.prototype.getService=function(t){if(!this._services.has(t))throw new Error("service not added to the game.");var e=this._services.get(t);if(!e)throw new Error("service not added to the game.");return e},t.prototype.addChild=function(t){this._objects.set(t.id,t)},t.prototype.removeChild=function(t){this._objects.delete(t.id)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loadingStartTime",{get:function(){return this._loadingStartTime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"launchSource",{get:function(){return this._launchSource},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){return this._events},enumerable:!0,configurable:!0}),t.prototype.log=function(t,e){g.a.platform===_.a.HTML&&console.log("["+r[t]+"] "+e)},t.prototype.configureServices=function(){this.addService(x.a),this.addService(S.a),this.addService(w.a),this.addService(m.a),this.addService(T.a),this.addService(h.a),this.addService(f.a),this.addService(E.a),this.addService(d.a),this.addService(a.a),this.addService(u.a),this.addService(b.a),this.addService(y.a),this.addService(v.a),this.addService(v.b),this.addService(O.a),this.addService(P.a),this.addService(C.a),this.addService(o.a),this.addService(l.a),this.addService(M.a),this.addService(A.a)},t.prototype.setupScene=function(){if(this._scene=new BABYLON.Scene(this._engine),this._scene.animationTimeScale=1,this._scene.clearColor=BABYLON.Color4.FromHexString("#ffffff"),this.config.getBooleanConfig(s.a.debug_layer)){(new window.SPECTOR.Spector).displayUI()}this._scene.imageProcessingConfiguration.exposure=4,this._scene.imageProcessingConfiguration.contrast=1.5},t}()},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return h});var r,i=n(21),o=n(142),a=n(16),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Prom
1ise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(t){t[t.NothingInteresting=0]="NothingInteresting",t[t.WonFirstPlace=1]="WonFirstPlace",t[t.KeptFirstPlace=2]="KeptFirstPlace",t[t.RankedUp=3]="RankedUp",t[t.PersonalBest=4]="PersonalBest",t[t.NewPlayer=5]="NewPlayer"}(r=r||(r={}));var h=function(t){function e(e){var n=t.call(this,e)||this;return n._contextLeaderboardData={contextId:"SOLO",entries:[]},n._contextPlayersInfo=new Map,e.events.on("switching_level",function(){n.refreshContextLeaderboardDataAsync()}),n}return s(e,t),e.prototype.preloadServiceAsync=function(){return u(this,void 0,void 0,function(){return c(this,function(t){return this.refreshContextLeaderboardDataAsync(),[2]})})},Object.defineProperty(e.prototype,"contextLeaderboard",{get:function(){return this._contextLeaderboardData.entries},enumerable:!0,configurable:!0}),e.prototype.postIslandLevel=function(t){this.game.getService(o.a).persistIslandLevel(t);for(var e=a.a.getPlayerID(),n=this._contextLeaderboardData.entries.slice(),i=null,s=-1,u=0;u<n.length;++u)if(n[u].playerId===e){i=n[u],s=u,n.splice(u,1);break}for(var c=n.length,u=0;u<n.length;++u)if(t>n[u].score){c=u;break}var h=r.NothingInteresting;i?c===s&&t>i.score?h=r.PersonalBest:c<s&&(h=r.RankedUp):h=r.NewPlayer,0===c&&(h=0===s?r.KeptFirstPlace:r.WonFirstPlace);var l=0===c?null:n[c-1],f=c===n.length?null:n[c];return{type:h,playerEntry:{score:t,rank:c,player:{id:e,name:a.a.getPlayerName(),photoUrl:a.a.getPlayerPhotoURL()}},higherThanPlayerEntry:l&&this._contextPlayersInfo.has(l.playerId)?{player:this._contextPlayersInfo.get(l.playerId),score:l.score,rank:c-1}:null,lowerThanPlayerEntry:f&&this._contextPlayersInfo.has(f.playerId)?{player:this._contextPlayersInfo.get(f.playerId),score:f.score,rank:c+1}:null}},e.prototype.refreshContextLeaderboardDataAsync=function(){return u(this,void 0,void 0,function(){var t,e=this;return c(this,function(n){switch(n.label){case 0:return[4,Promise.all([a.a.getContextPlayersAsync(),this.game.getService(o.a).getContextLeaderboardAsync()])];case 1:return t=n.sent(),this._contextPlayersInfo=t[0],this._contextLeaderboardData=t[1],this._contextLeaderboardData.entries.sort(function(t,e){return e.score-t.score}),this._contextLeaderboardData.entries=this._contextLeaderboardData.entries.filter(function(t){return e._contextPlayersInfo.has(t.playerId)}),[2]}})})},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(21),i=n(617),o=(n.n(i),n(16)),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.persistPlayerData=function(t){var e={};t.forEach(function(t,n){e[n]=t}),i.post("https://heroesofwalala.evileggs.com/player_data").retry(3).send({kvps:e,id:o.a.getPlayerID()}).end()},e.prototype.manageBotMessage=function(t,e){i.post("https://heroesofwalala.evileggs.com/player_setting/bot_setting").retry(3).send({player_id:o.a.getPlayerID(),message_type:t,setting:e?"disable":"enable"}).end()},e.prototype.persistIslandLevel=function(t){i.post("https://heroesofwalala.evileggs.com/context_leaderboard").retry(3).send({score:t,score_type:"island",player_id:o.a.getPlayerID(),context_type:o.a.getContextType()||"SOLO",context_id:o.a.getContextID()||"SOLO"}).end()},e.prototype.getContextLeaderboardAsync=function(){return new Promise(function(t,e){if(!o.a.getContextID())return void t({contextId:"SOLO",entries:[]});var n=o.a.getContextID();i.get("https://heroesofwalala.evileggs.com/context_leaderboard").query({context_id:n,score_type:"island"}).retry(3).end(function(n,r){n?e(n):t(r.body)})})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r,i=n(2),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.NotVisible=0]="NotVisible",t[t.ShowingUp=1]="ShowingUp",t[t.Visible=2]="Visible"}(r||(r={}));var a=function(t){function e(e,n,i){void 0===n&&(n=[]),void 0===i&&(i={});var o=t.call(this,e,n,i)||this;return o._state=r.NotVisible,o.element.visible=!1,o._absoluteTime=0,o}return o(e,t),e.prototype.showWithTransitionAsync=function(){var t=this;return new Promise(function(e){t._showPromiseResolve=e,t.switchState(r.ShowingUp)})},Object.defineProperty(e.prototype,"isFullyShown",{get:function(){return this._state===r.Visible},enumerable:!0,configurable:!0}),e.prototype.updateElement=function(e){switch(t.prototype.updateElement.call(this,e),this._state){case r.NotVisible:break;case r.ShowingUp:var n=(this._absoluteTime-this._lastStateSwitchTime)/120;n>=1?this.switchState(r.Visible):(this.element.scale.set(n),this.element.position.set(this._width/2-n*(this._width/2-this._showUpX),this._height/2-n*(this._height/2-this._showUpY)));break;case r.Visible:}this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.switchState=function(t){if(this._state!==t)switch(this._state=t,this._lastStateSwitchTime=this._absoluteTime,t){case r.NotVisible:this.element.visible=!1;break;case r.ShowingUp:this._showUpX=this.element.position.x,this._showUpY=this.element.position.y,this.element.scale.set(0,0),this.element.visible=!0;break;case r.Visible:this.element.scale.set(1,1),this.element.position.set(this._showUpX,this._showUpY),this._showPromiseResolve()}},e}(i.a)},function(t,e,n){"use strict";"use restrict";function r(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)}
1,e.isPow2=function(t){return!(t&t-1)&&!!t},e.log2=function(t){var e,n;return e=(t>65535)<<4,t>>>=e,n=(t>255)<<3,t>>>=n,e|=n,n=(t>15)<<2,t>>>=n,e|=n,n=(t>3)<<1,t>>>=n,(e|=n)|t>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var n=e,r=e,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;t[e]=r<<i&255}}(i),e.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},e.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},e.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},e.interleave3=function(t,e,n){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,n&=1023,n=4278190335&(n|n<<16),n=251719695&(n|n<<8),n=3272356035&(n|n<<4),n=1227133513&(n|n<<2),t|n<<2},e.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},function(t,e,n){"use strict";var r=n(26),i=n(91),o=n(20);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){var r=n(314);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){"use strict";var r=n(19),i=n(88);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(10),i=n(4).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(12)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(4).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(10),i=n(160).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){var r=n(98),i=n(12)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(85),i=n(88),o=n(99),a={};n(40)(a,n(12)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(84),i=n(0),o=n(41),a=n(40),s=n(39),u=n(98),c=n(154),h=n(99),l=n(45),f=n(12)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,g,_,m,y){c(n,e,g);var v,b,w,x=function(t){if(!d&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",T="values"==_,E=!1,P=t.prototype,O=P[f]||P["@@iterator"]||_&&P[_],M=O||x(_),C=_?T?x("entries"):M:void 0,A="Array"==e?P.entries||O:O;if(A&&(w=l(A.call(new t)))!==Object.prototype&&w.next&&(h(w,S,!0),r||s(w,f)||a(w,f,p)),T&&O&&"values"!==O.name&&(E=!0,M=function(){return O.call(this)}),r&&!y||!d&&!E&&P[f]||a(P,f,M),u[e]=M,u[S]=p,_)if(v={values:T?M:x("values"),keys:m?M:x("keys"),entries:C},y)for(b in v)b in P||o(P,b,v[b]);else i(i.P+i.F*(d||E),e,v);return v}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var r=n(4),i=n(166).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(49)(a);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(o){var h=!0,l=document.createTextNode("");new o(c).observe(l,{characterData:!0}
vendor: 6,254 bytes, line 1
1),n=function(){l.data=h=!h}}else if(s&&s.resolve){var f=s.resolve();n=function(){f.then(c)}}else n=function(){i.call(r,c)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=i(e),this.reject=i(n)}var i=n(35);t.exports.f=function(t){return new r(t)}},function(t,e,n){var r=n(10),i=n(3),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(50)(Function.call,n(44).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(128)("keys"),i=n(92);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(57),i=n(55);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536)}}},function(t,e,n){var r=n(122),i=n(55);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){"use strict";var r=n(57),i=n(55);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(t,e,n){var r,i,o,a=n(50),s=n(205),u=n(151),c=n(148),h=n(4),l=h.process,f=h.setImmediate,d=h.clearImmediate,p=h.MessageChannel,g=h.Dispatch,_=0,m={},y=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},v=function(t){y.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++_]=function(){s("function"==typeof t?t:Function(t),e)},r(_),_},d=function(t){delete m[t]},"process"==n(49)(l)?r=function(t){l.nextTick(a(y,t,1))}:g&&g.now?r=function(t){g.now(a(y,t,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=v,r=a(o.postMessage,o,1)):h.addEventListener&&"function"==typeof postMessage&&!h.importScripts?(r=function(t){h.postMessage(t+"","*")},h.addEventListener("message",v,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:f,clear:d}},function(t,e,n){"use strict";function r(t,e,n){var r,i,o,a=Array(n),s=8*n-e-1,u=(1<<s)-1,c=u>>1,h=23===e?B(2,-24)-B(2,-77):0,l=0,f=t<0||0===t&&1/t<0?1:0;for(t=N(t),t!=t||t===k?(i=t!=t?1:0,r=u):(r=j(U(t)/H),t*(o=B(2,-r))<1&&(r--,o*=2),t+=r+c>=1?h/o:h*B(2,1-c),t*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(t*o-1)*B(2,e),r+=c):(i=t*B(2,c-1)*B(2,e),r=0));e>=8;a[l++]=255&i,i/=256,e-=8);for(r=r<<e|i,s+=e;s>0;a[l++]=255&r,r/=256,s-=8);return a[--l]|=128*f,a}function i(t,e,n){var r,i=8*n-e-1,o=(1<<i)-1,a=o>>1,s=i-7,u=n-1,c=t[u--],h=127&c;for(c>>=7;s>0;h=256*h+t[u],u--,s-=8);for(r=h&(1<<-s)-1,h>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===h)h=1-a;else{if(h===o)return r?NaN:c?-k:k;r+=B(2,e),h-=a}return(c?-1:1)*r*B(2,h-e)}function o(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function a(t){return[255&t]}function s(t){return[255&t,t>>8&255]}function u(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function c(t){return r(t,52,8)}function h(t){return r(t,23,4)}function l(t,e,n){P(t[C],e,{get:function(){return this[n]}})}function f(t,e,n,r){var i=+n,o=T(i);if(o+e>t[V])throw L(A);var a=t[W]._b,s=o+t[G],u=a.slice(s,s+e);return r?u:u.reverse()}function d(t,e,n,r,i,o){var a=+n,s=T(a);if(s+e>t[V])throw L(A);for(var u=t[W]._b,c=s+t[G],h=r(+i),l=0;l<e;l++)u[c+l]=h[o?l:e-l-1]}var p=n(4),g=n(18),_=n(84),m=n(130),y=n(40),v=n(89),b=n(8),w=n(82),x=n(57),S=n(20),T=n(223),E=n(86).f,P=n(19).f,O=n(145),M=n(99),C="prototype",A="Wrong index!",I=p.ArrayBuffer,R=p.DataView,D=p.Math,L=p.RangeError,k=p.Infinity,F=I,N=D.abs,B=D.pow,j=D.floor,U=D.log,H=D.LN2,W=g?"_b":"buffer",V=g?"_l":"byteLength",G=g?"_o":"byteOffset";if(m.ABV){if(!b(function(){I(1)})||!b(function(){new I(-1)})||b(function(){return new I,new I(1.5),new I(NaN),"ArrayBuffer"!=I.name})){I=function(t){return w(this,I),new F(T(t))};for(var Y,z=I[C]=F[C],X=E(F),q=0;X.length>q;)(Y=X[q++])in I||y(I,Y,F[Y]);_||(z.constructor=I)}var K=new R(new I(2)),Z=R[C].setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||v(R[C],{setInt8:function(t,e){Z.call(this,t,e<<24>>24)},setUint8:function(t,e){Z.call(this,t,e<<24>>24)}},!0)}else I=function(t){w(this,I,"ArrayBuffer");var e=T(t);this._b=O.call(Array(e),0),this[V]=e},R=function(t,e,n){w(this,R,"DataView"),w(t,I,"DataView");var r=t[V],i=x(e);if(i<0||i>r)throw L("Wrong offset!");if(n=void 0===n?r-i:S(n),i+n>r)throw L("Wrong length!");this[W]=t,this[G]=i,this[V]=n},g&&(l(I,"byteLength","_l"),l(R,"buffer","_b"),l(R,"byteLength","_l"),l(R,"byteOffset","_o")),v(R[C],{getInt8:function(t){return f(this,1,t)[0]<<24>>24},getUint8:function(t){return f(this,1,t)[0]},getInt16:function(t){var e=f(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=f(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return o(f(this,4,t,arguments[1]))},getUint32:function(t){return o(f(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return i(f(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return i(f(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){d(this,1,t,a,e)},setUint8:function(t,e){d(this,1,t,a,e)},setInt16:function(t,e){d(this,2,t,s,e,arguments[2])},setUint16:function(t,e){d(this,2,t,s,e,arguments[2])},setInt32:function(t,e){d(this,4,t,u,e,arguments[2])},setUint32:function(t,e){d(this,4,t,u,e,arguments[2])},setFloat32:function(t,e){d(this,4,t,h,e,arguments[2])},setFloat64:function(t,e){d(this,8,t,c,e,arguments[2])}});M(I,"ArrayBuffer"),M(R,"DataView"),y(R[C],m.VIEW,!0),e.ArrayBuffer=I,e.DataView=R},function(t,e,n){var r=n(4),i=n(63),o=n(84),a=n(224),s=n(19).f;
1t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(106),i=n(12)("iterator"),o=n(98);t.exports=n(63).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(74),i=n(208),o=n(98),a=n(46);t.exports=n(155)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r,i,o;!function(n){var a=/iPhone/i,s=/iPod/i,u=/iPad/i,c=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,h=/Android/i,l=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,f=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,d=/Windows Phone/i,p=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,g=/BlackBerry/i,_=/BB10/i,m=/Opera Mini/i,y=/(CriOS|Chrome)(?=.*\bMobile\b)/i,v=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,b=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),w=function(t,e){return t.test(e)},x=function(t){var e=t||navigator.userAgent,n=e.split("[FBAN");if("undefined"!==typeof n[1]&&(e=n[0]),n=e.split("Twitter"),"undefined"!==typeof n[1]&&(e=n[0]),this.apple={phone:w(a,e),ipod:w(s,e),tablet:!w(a,e)&&w(u,e),device:w(a,e)||w(s,e)||w(u,e)},this.amazon={phone:w(l,e),tablet:!w(l,e)&&w(f,e),device:w(l,e)||w(f,e)},this.android={phone:w(l,e)||w(c,e),tablet:!w(l,e)&&!w(c,e)&&(w(f,e)||w(h,e)),device:w(l,e)||w(f,e)||w(c,e)||w(h,e)},this.windows={phone:w(d,e),tablet:w(p,e),device:w(d,e)||w(p,e)},this.other={blackberry:w(g,e),blackberry10:w(_,e),opera:w(m,e),firefox:w(v,e),chrome:w(y,e),device:w(g,e)||w(_,e)||w(m,e)||w(v,e)||w(y,e)},this.seven_inch=w(b,e),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"===typeof window)return this},S=function(){var t=new x;return t.Class=x,t};"undefined"!==typeof t&&t.exports&&"undefined"===typeof window?t.exports=x:"undefined"!==typeof t&&t.exports&&"undefined"!==typeof window?t.exports=S():(i=[],r=n.isMobile=S(),void 0!==(o="function"===typeof r?r.apply(e,i):r)&&(t.exports=o))}(this)},function(t,e){var n=function(t,e){if(!r){var n=Object.keys(i);r={};for(var o=0;o<n.length;++o){var a=n[o];r[t[a]]=i[a]}}return r[e]},r=null,i={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};t.exports=n},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(29),o=function(){function t(){r(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.Rectangle.EMPTY:(t=t||new i.Rectangle(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY,o=t[0],a=t[1];e=o<e?o:e,n=a<n?a:n,r=o>r?o:r,i=a>i?a:i,o=t[2],a=t[3],e=o<e?o:e,n=a<n?a:n,r=o>r?o:r,i=a>i?a:i,o=t[4],a=t[5],e=o<e?o:e,n=a<n?a:n,r=o>r?o:r,i=a>i?a:i,o=t[6],a=t[7],e=o<e?o:e,n=a<n?a:n,r=o>r?o:r,i=a>i?a:i,this.minX=e,this.minY=n,this.maxX=r,this.maxY=i},t.prototype.addFrame=function(t,e,n,r,i){var o=t.worldTransform,a=o.a,s=o.b,u=o.c,c=o.d,h=o.tx,l=o.ty,f=this.minX,d=this.minY,p=this.maxX,g=this.maxY,_=a*e+u*n+h,m=s*e+c*n+l;f=_<f?_:f,d=m<d?m:d,p=_>p?_:p,g=m>g?m:g,_=a*r+u*n+h,m=s*r+c*n+l,f=_<f?_:f,d=m<d?m:d,p=_>p?_:p,g=m>g?m:g,_=a*e+u*i+h,m=s*e+c*i+l,f=_<f?_:f,d=m<d?m:d,p=_>p?_:p,g=m>g?m:g,_=a*r+u*i+h,m=s*r+c*i+l,f=_<f?_:f,d=m<d?m:d,p=_>p?_:p,g=m>g?m:g,this.minX=f,this.minY=d,this.maxX=p,this.maxY=g},t.prototype.addVertices=function(t,e,n,r){for(var i=t.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,c=i.tx,h=i.ty,l=this.minX,f=this.minY,d=this.maxX,p=this.maxY,g=n;g<r;g+=2){var _=e[g],m=e[g+1],y=o*_+s*m+c,v=u*m+a*_+h;l=y<l?y:l,f=v<f?v:f,d=y>d?y:d,p=v>p?v:p}this.minX=l,this.minY=f,this.maxX=d,this.maxY=p},t.prototype.addBounds=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>r?t.maxX:r,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var n=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,i=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(n<=i&&r<=o){var a=this.minX,s=this.minY,u=this.maxX,c=this.maxY;this.minX=n<a?n:a,this.minY=r<s?r:s,this.maxX=i>u?i:u,this.maxY=o>c?o:c}},t.prototype.addBoundsArea=function(t,e){var n=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,i=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(n<=i&&r<=o){var a=this.minX,s=this.minY,u=this.maxX,c=this.maxY;this.minX=n<a?n:a,this.minY=r<s?r:s,this.maxX=i>u?i:u,this.maxY=o>c?o:c}},t}();e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(29),o=function(){function t(){r(this,t),this.worldTransform=new i.Matrix,this.localTransform=new i.Matrix,this._worldID=0,this._parentID=0}return t.prototype.updateLocalTransform=function(){},t.prototype.updateTransform=function(t){var e=t.worldTransform,n=this.worldTransform,r=this.localTransform;n.a=r.a*e.a+r.b*e.c,n.b=r.a*e.b+r.b*e.d,n.c=r.c*e.a+r.d*e.c,n.d=r.c*e.b+r.d*e.d,n.tx=r.tx*e.a+r.ty*e.c+e.tx,n.ty=r.tx*e.b+r.ty*e.d+e.ty,this._worldID++},t}();e.default=o,o.prototype.updateWorldTransform=o.prototype.updateTransform,o.IDENTITY=new o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(176),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;r(this,t),this.a=e,this.b=n,this.c=i,this.d=o,this.tx=a,this.ty=s,this.array=null}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,n,r,i,o){return this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.apply=function(t,e){e=e||new a.default;var n=t.x,r=t.y;return e.x=this.a*n+this.c*r+this.tx,e.y=this.b*n+this.d*r+this.t
1y,e},t.prototype.applyInverse=function(t,e){e=e||new a.default;var n=1/(this.a*this.d+this.c*-this.b),r=t.x,i=t.y;return e.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=this.a,i=this.c,o=this.tx;return this.a=r*e-this.b*n,this.b=r*n+this.b*e,this.c=i*e-this.d*n,this.d=i*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},t.prototype.append=function(t){var e=this.a,n=this.b,r=this.c,i=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*r,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*n+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,n,r,i,o,a,s,u){var c=Math.sin(a),h=Math.cos(a),l=Math.cos(u),f=Math.sin(u),d=-Math.sin(s),p=Math.cos(s),g=h*i,_=c*i,m=-c*o,y=h*o;return this.a=l*g+f*m,this.b=l*_+f*y,this.c=d*g+p*m,this.d=d*_+p*y,this.tx=t+(n*g+r*m),this.ty=e+(n*_+r*y),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var n=this.a,r=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=-Math.atan2(-r,i),a=Math.atan2(n,e);return Math.abs(o+a)<1e-5?(t.rotation=a,e<0&&i>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=o,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(r*r+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.tx,o=t*r-e*n;return this.a=r/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},i(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,t),this.x=e,this.y=n}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t}();e.default=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(5),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.x=Number(e),this.y=Number(n),this.width=Number(i),this.height=Number(a),this.type=o.SHAPES.RECT}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},t.prototype.fit=function(t){this.x<t.x&&(this.width+=this.x,this.width<0&&(this.width=0),this.x=t.x),this.y<t.y&&(this.height+=this.y,this.height<0&&(this.height=0),this.y=t.y),this.x+this.width>t.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),i=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=n-e,this.y=r,this.height=i-r},i(t,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new t(0,0,0,0)}}]),t}();e.default=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}
1(),u=n(29),c=n(11),h=n(5),l=n(76),f=r(l),d=n(110),p=r(d),g=new u.Point,_=function(t){function e(n){i(this,e);var r=o(this,t.call(this));return r._anchor=new u.ObservablePoint(r._onAnchorUpdate,r),r._texture=null,r._width=0,r._height=0,r._tint=null,r._tintRGB=null,r.tint=16777215,r.blendMode=h.BLEND_MODES.NORMAL,r.shader=null,r.cachedTint=16777215,r.texture=n||f.default.EMPTY,r.vertexData=new Float32Array(8),r.vertexTrimmedData=null,r._transformID=-1,r._textureID=-1,r._transformTrimmedID=-1,r._textureTrimmedID=-1,r.pluginName="sprite",r}return a(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this.cachedTint=16777215,this._width&&(this.scale.x=(0,c.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,c.sign)(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t=this._texture,e=this.transform.worldTransform,n=e.a,r=e.b,i=e.c,o=e.d,a=e.tx,s=e.ty,u=this.vertexData,c=t.trim,h=t.orig,l=this._anchor,f=0,d=0,p=0,g=0;c?(d=c.x-l._x*h.width,f=d+c.width,g=c.y-l._y*h.height,p=g+c.height):(d=-l._x*h.width,f=d+h.width,g=-l._y*h.height,p=g+h.height),u[0]=n*d+i*g+a,u[1]=o*g+r*d+s,u[2]=n*f+i*g+a,u[3]=o*g+r*f+s,u[4]=n*f+i*p+a,u[5]=o*p+r*f+s,u[6]=n*d+i*p+a,u[7]=o*p+r*d+s}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,n=t.orig,r=this._anchor,i=this.transform.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,c=i.tx,h=i.ty,l=-r._x*n.width,f=l+n.width,d=-r._y*n.height,p=d+n.height;e[0]=o*l+s*d+c,e[1]=u*d+a*l+h,e[2]=o*f+s*d+c,e[3]=u*d+a*f+h,e[4]=o*f+s*p+c,e[5]=u*p+a*f+h,e[6]=o*l+s*p+c,e[7]=u*p+a*l+h},e.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new u.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,g);var e=this._texture.orig.width,n=this._texture.orig.height,r=-e*this.anchor.x,i=0;return g.x>=r&&g.x<r+e&&(i=-n*this.anchor.y,g.y>=i&&g.y<i+n)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._anchor=null,"boolean"===typeof e?e:e&&e.texture){var n="boolean"===typeof e?e:e&&e.baseTexture;this._texture.destroy(!!n)}this._texture=null,this.shader=null},e.from=function(t){return new e(f.default.from(t))},e.fromFrame=function(t){var n=c.TextureCache[t];if(!n)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new e(n)},e.fromImage=function(t,n,r){return new e(f.default.fromImage(t,n,r))},s(e,[{key:"width",get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,c.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,c.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"anchor",get:function(){return this._anchor},set:function(t){this._anchor.copy(t)}},{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(p.default);e.default=_},function(t,e,n){"use strict";
1e.__esModule=!0;var r=n(11),i=n(253),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a={getTintedTexture:function(t,e){var n=t._texture;e=a.roundColor(e);var r="#"+("00000"+(0|e).toString(16)).substr(-6);n.tintCache=n.tintCache||{};var i=n.tintCache[r],o=void 0;if(i){if(i.tintId===n._updateID)return n.tintCache[r];o=n.tintCache[r]}else o=a.canvas||document.createElement("canvas");if(a.tintMethod(n,e,o),o.tintId=n._updateID,a.convertTintToImage){var s=new Image;s.src=o.toDataURL(),n.tintCache[r]=s}else n.tintCache[r]=o,a.canvas=null;return o},tintWithMultiply:function(t,e,n){var r=n.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,n.width=Math.ceil(i.width),n.height=Math.ceil(i.height),r.save(),r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,i.width,i.height),r.globalCompositeOperation="multiply",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),r.restore()},tintWithOverlay:function(t,e,n){var r=n.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,n.width=Math.ceil(i.width),n.height=Math.ceil(i.height),r.save(),r.globalCompositeOperation="copy",r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,i.width,i.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),r.restore()},tintWithPerPixel:function(t,e,n){var i=n.getContext("2d"),o=t._frame.clone(),a=t.baseTexture.resolution;o.x*=a,o.y*=a,o.width*=a,o.height*=a,n.width=Math.ceil(o.width),n.height=Math.ceil(o.height),i.save(),i.globalCompositeOperation="copy",i.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height),i.restore();for(var s=(0,r.hex2rgb)(e),u=s[0],c=s[1],h=s[2],l=i.getImageData(0,0,o.width,o.height),f=l.data,d=0;d<f.length;d+=4)f[d+0]*=u,f[d+1]*=c,f[d+2]*=h;i.putImageData(l,0,0)},roundColor:function(t){var e=a.cacheStepsPerColorChannel,n=(0,r.hex2rgb)(t);return n[0]=Math.min(255,n[0]/e*e),n[1]=Math.min(255,n[1]/e*e),n[2]=Math.min(255,n[2]/e*e),(0,r.rgb2hex)(n)}
1,cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,o.default)(),tintMethod:0};a.tintMethod=a.canUseMultiply?a.tintWithMultiply:a.tintWithPerPixel,e.default=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(259),u=r(s),c=n(76),h=r(c),l=function(t){function e(n,r){i(this,e);var a=null;if(!(n instanceof u.default)){var s=arguments[1],c=arguments[2],h=arguments[3],l=arguments[4];console.warn("Please use RenderTexture.create("+s+", "+c+") instead of the ctor directly."),a=arguments[0],r=null,n=new u.default(s,c,h,l)}var f=o(this,t.call(this,n,r));return f.legacyRenderer=a,f.valid=!0,f._updateUvs(),f}return a(e,t),e.prototype.resize=function(t,e,n){t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,n||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,n,r,i){return new e(new u.default(t,n,r,i))},e}(h.default);e.default=l},function(t,e,n){"use strict";e.__esModule=!0,e.Ticker=e.shared=void 0;var r=n(558),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=new i.default;o.autoStart=!0,o.destroy=function(){},e.shared=o,e.Ticker=i.default},function(t,e,n){"use strict";function r(t){for(var e=6*t,n=new Uint16Array(e),r=0,i=0;r<e;r+=6,i+=4)n[r+0]=i+0,n[r+1]=i+1,n[r+2]=i+2,n[r+3]=i+0,n[r+4]=i+2,n[r+5]=i+3;return n}e.__esModule=!0,e.default=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){var n=!1;if(t&&t._textures&&t._textures.length)for(var r=0;r<t._textures.length;r++)if(t._textures[r]instanceof f.Texture){var i=t._textures[r].baseTexture;-1===e.indexOf(i)&&(e.push(i),n=!0)}return n}function o(t,e){return t instanceof f.BaseTexture&&(-1===e.indexOf(t)&&e.push(t),!0)}function a(t,e){if(t._texture&&t._texture instanceof f.Texture){var n=t._texture.baseTexture;return-1===e.indexOf(n)&&e.push(n),!0}return!1}function s(t,e){return e instanceof f.Text&&(e.updateText(!0),!0)}function u(t,e){if(e instanceof f.TextStyle){var n=e.toFontString();return f.TextMetrics.measureFont(n),!0}return!1}function c(t,e){if(t instanceof f.Text){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var n=t._texture.baseTexture;return-1===e.indexOf(n)&&e.push(n),!0}return!1}function h(t,e){return t instanceof f.TextStyle&&(-1===e.indexOf(t)&&e.push(t),!0)}e.__esModule=!0;var l=n(6),f=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(l),d=n(278),p=function(t){return t&&t.__esModule?t:{default:t}}(d),g=f.ticker.shared;f.settings.UPLOADS_PER_FRAME=4;var _=function(){function t(e){var n=this;r(this,t),this.limiter=new p.default(f.settings.UPLOADS_PER_FRAME),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){n.queue&&n.prepareItems()},this.registerFindHook(c),this.registerFindHook(h),this.registerFindHook(i),this.registerFindHook(o),this.registerFindHook(a),this.registerUploadHook(s),this.registerUploadHook(u)}return t.prototype.upload=function(t,e){"function"===typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,g.addOnce(this.tick,this,f.UPDATE_PRIORITY.UTILITY))):e&&e()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var n=0,r=this.uploadHooks.length;n<r;n++)if(this.uploadHooks[n](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)g.addOnce(this.tick,this,f.UPDATE_PRIORITY.UTILITY);else{this.ticking=!1;var i=this.completes.slice(0);this.completes.length=0;for(var o=0,a=i.length;o<a;o++)i[o]()}},t.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},t.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},t.prototype.add=function(t){for(var e=0,n=this.addHooks.length;e<n&&!this.addHooks[e](t,this.queue);e++);if(t instanceof f.Container)for(var r=t.children.length-1;r>=0;r--)this.add(t.children[r]);return this},t.prototype.destroy=function(){this.ticking&&g.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();e.default=_},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(h===setTimeout)return setTimeout(t,0);if((h===n||!h)&&setTimeout)return h=setTimeout,setTimeout(t,0);try{return h(t,0)}catch(e){try{return h.call(null,t,0)}catch(e){return h.call(this,t,0)}}}function o(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function a(){g&&d&&(g=!1,d.length?p=d.concat(p):_=-1,p.length&&s())}function s(){if(!g){var t=i(a);g=!0;for(var e=p.length;e;){for(d=p,p=[];++_<e;)d&&d[_].run();_=-1,e=p.length}d=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var h,l,f=t.exports={};!function(){try{h="function"===typeof setTimeout?setTimeout:n}catch(t){h=n}try{l="function"===typeof clearTimeout?clearTimeout:r}catch(t){l=r}}();var d,p=[],g=!1,_=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];
1p.push(new u(t,e)),1!==p.length||g||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){}function a(t,e,n){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=n)}function s(t){return t.toString().replace("object ","")}e.__esModule=!0;var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(232),h=r(c),l=n(230),f=r(l),d=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),p=null,g=function(){function t(e,n,r){if(i(this,t),"string"!==typeof e||"string"!==typeof n)throw new Error("Both name and url are required for constructing a resource.");r=r||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===n.indexOf("data:")),this.name=e,this.url=n,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===r.crossOrigin?"anonymous":r.crossOrigin,this.loadType=r.loadType||this._determineLoadType(),this.xhrType=r.xhrType,this.metadata=r.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=o,this._onLoadBinding=null,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this._boundXdrOnTimeout=this._xdrOnTimeout.bind(this),this.onStart=new f.default,this.onProgress=new f.default,this.onComplete=new f.default,this.onAfterMiddleware=new f.default}return t.setExtensionLoadType=function(e,n){a(t._loadTypeMap,e,n)},t.setExtensionXhrType=function(e,n){a(t._xhrTypeMap,e,n)},t.prototype.complete=function(){if(this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null)),this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete()}},t.prototype.load=function(e){var n=this;if(!this.isLoading){if(this.isComplete)return void(e&&setTimeout(function(){return e(n)},1));switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"===typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:d&&this.crossOrigin?this._loadXdr():this._loadXhr()}}},t.prototype._hasFlag=function(t){return!!(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&"undefined"!==typeof window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&"undefined"!==typeof window.Audio?this.data=new Audio:this.data=document.createElement(t),null===this.data)return void this.abort("Unsupported element: "+t);if(!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,n=0;n<this.url.length;++n)this.data.appendChild(this._createSource(t,this.url[n],Array.isArray(e)?e[n]:e));else{var r=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(r)?r[0]:r))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load()},t.prototype._loadXhr=function(){"string"!==typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){"string"!==typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXdrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout(function(){return t.send()},1)},t.prototype._createSource=function(t,e,n){n||(n=t+"/"+this._getExtension(e));var r=document.createElement("source");return r.src=e,r.type=n,r},t.prototype._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort(s(t)+" Request failed. Status: "+t.status+', text: "'+t.
1statusText+'"')},t.prototype._xhrOnAbort=function(){this.abort(s(this.xhr)+" Request was aborted by the user.")},t.prototype._xdrOnTimeout=function(){this.abort(s(this.xhr)+" Request timed out.")},t.prototype._xhrOnLoad=function(){var e=this.xhr,n="",r="undefined"===typeof e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&"undefined"!==typeof e.responseType||(n=e.responseText),0===r&&n.length>0?r=200:1223===r&&(r=204),2!==(r/100|0))return void this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=n,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(n),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(n,"text/xml")}else{var o=document.createElement("div");o.innerHTML=n,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||n;this.complete()},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,p||(p=document.createElement("a")),p.href=t,t=(0,h.default)(p.href,{strictMode:!0});var n=!t.port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&n&&r===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var n=t.indexOf("/");e=t.substring(n+1,t.indexOf(";",n))}else{var r=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(r>-1?r:t.length,i>-1?i:t.length);t=t.substring(0,o),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},u(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();e.default=g,g.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},g.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},g.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},g.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},g._loadTypeMap={gif:g.LOAD_TYPE.IMAGE,png:g.LOAD_TYPE.IMAGE,bmp:g.LOAD_TYPE.IMAGE,jpg:g.LOAD_TYPE.IMAGE,jpeg:g.LOAD_TYPE.IMAGE,tif:g.LOAD_TYPE.IMAGE,tiff:g.LOAD_TYPE.IMAGE,webp:g.LOAD_TYPE.IMAGE,tga:g.LOAD_TYPE.IMAGE,svg:g.LOAD_TYPE.IMAGE,"svg+xml":g.LOAD_TYPE.IMAGE,mp3:g.LOAD_TYPE.AUDIO,ogg:g.LOAD_TYPE.AUDIO,wav:g.LOAD_TYPE.AUDIO,mp4:g.LOAD_TYPE.VIDEO,webm:g.LOAD_TYPE.VIDEO},g._xhrTypeMap={xhtml:g.XHR_RESPONSE_TYPE.DOCUMENT,html:g.XHR_RESPONSE_TYPE.DOCUMENT,htm:g.XHR_RESPONSE_TYPE.DOCUMENT,xml:g.XHR_RESPONSE_TYPE.DOCUMENT,tmx:g.XHR_RESPONSE_TYPE.DOCUMENT,svg:g.XHR_RESPONSE_TYPE.DOCUMENT,tsx:g.XHR_RESPONSE_TYPE.DOCUMENT,gif:g.XHR_RESPONSE_TYPE.BLOB,png:g.XHR_RESPONSE_TYPE.BLOB,bmp:g.XHR_RESPONSE_TYPE.BLOB,jpg:g.XHR_RESPONSE_TYPE.BLOB,jpeg:g.XHR_RESPONSE_TYPE.BLOB,tif:g.XHR_RESPONSE_TYPE.BLOB,tiff:g.XHR_RESPONSE_TYPE.BLOB,webp:g.XHR_RESPONSE_TYPE.BLOB,tga:g.XHR_RESPONSE_TYPE.BLOB,json:g.XHR_RESPONSE_TYPE.JSON,text:g.XHR_RESPONSE_TYPE.TEXT,txt:g.XHR_RESPONSE_TYPE.TEXT,ttf:g.XHR_RESPONSE_TYPE.BUFFER,otf:g.XHR_RESPONSE_TYPE.BUFFER},g.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},function(t,e,n){"use strict";n.d(e,"d",function(){return i}),n.d(e,"c",function(){return a}),n.d(e,"b",function(){return s}),n.d(e,"a",function(){return u});var r=n(1),i=function(t,e,n){var i=1;i=t<11?.5+.3*t:t<21&&t>10?Math.round(1.8*Math.pow(Math.E,.1042*t))-2:t<36&&t>20?Math.round(1.7306*Math.pow(Math.E,.0977*t)):Math.round(.07*t*t-t);var o=1;return o=1===t?5.5:2===t?7:t<9&&t>2?Math.round(10.256*Math.pow(Math.E,.1178*t)):t>=9&&t<20?Math.round(16.118*t-115):Math.round(16.727*Math.pow(Math.E,.129*t)),new Map([[r.b.Level,t],[r.b.CurrentExperience,10*Math.pow(1.1,t)],[r.b.MaxHealth,o],[r.b.DodgeProbability,t/1e3],[r.b.MaxM
1ana,10],[r.b.MagicResistance,0],[r.b.Armor,10+10*t],[r.b.Scale,.7+.01*t],[r.b.MoveSpeed,200],[r.b.AttackRange,10],[r.b.AttackInterval,1.2],[r.b.HealthPercentage,1],[r.b.ManaPercentage,1],[r.b.MinDamage,i],[r.b.MaxDamage,1.2*i],[r.b.CritProbability,.05],[r.b.CritDamageFactor,1.5],[r.b.NonCombatHealTime,10],[r.b.DamageFactor,1],[r.b.Resource1,1+Math.floor(t/3)],[r.b.Resource2,0],[r.b.Class,r.c.Warrior],[r.b.HealingAttackProbability,0],[r.b.HealPerSecond,0],[r.b.ExtraExperiencePerKill,0],[r.b.DoubleCoinProbability,0],[r.b.SpellDamageFactor,1],[r.b.Resource1DropProbability,.3]])},o=new Map([]),a=function(t,e){var n=1;n=t<6?Math.round(1.8*Math.pow(Math.E,.1042*t)):Math.round(1.8*Math.pow(Math.E,.1042*t))-2;var i=1;i=1===t?50:2===t?100:t<9&&t>2?9*Math.round(10.256*Math.pow(Math.E,.1178*t)):t>=9&&t<=20?7*Math.round(16.118*t-94.361):6*Math.round(16.727*Math.pow(Math.E,.129*t));var a=new Map([[r.b.Level,t],[r.b.CurrentExperience,100*Math.pow(1.1,t)],[r.b.MaxHealth,i],[r.b.DodgeProbability,t/500],[r.b.MaxMana,10],[r.b.MagicResistance,0],[r.b.Armor,10+20*t],[r.b.Scale,1.2],[r.b.MoveSpeed,200],[r.b.AttackRange,10],[r.b.AttackInterval,1],[r.b.HealthPercentage,1],[r.b.ManaPercentage,1],[r.b.MinDamage,2*n],[r.b.MaxDamage,3*n],[r.b.CritProbability,.05],[r.b.CritDamageFactor,2],[r.b.NonCombatHealTime,10],[r.b.DamageFactor,1],[r.b.Resource1,5*t],[r.b.Resource2,1+Math.floor(t/10)],[r.b.Class,r.c.Warrior],[r.b.HealingAttackProbability,0],[r.b.HealPerSecond,0],[r.b.ExtraExperiencePerKill,0],[r.b.DoubleCoinProbability,0],[r.b.SpellDamageFactor,1],[r.b.Resource1DropProbability,1]]),s=o.get(t);return s&&s.forEach(function(t,e){a.set(e,t)}),a},s=function(t,e,n){var i=1;i=t<9?Math.round(1+t/2):t<=20&&t>=9?Math.round(1.8*Math.pow(Math.E,.1042*t))-2:t<33&&t>20?Math.round(1.8*Math.pow(Math.E,.1042*t))-1:Math.round(.07*t*t-.8*t);var o=1;return o=t<9?Math.round(10.256*Math.pow(Math.E,.1178*t)):t>=9&&t<20?Math.round(16.118*t-115):5*Math.round(7.41*Math.pow(Math.E,.095*t)-2),new Map([[r.b.Level,t],[r.b.CurrentExperience,Math.pow(1.1,t)/10],[r.b.MaxHealth,Math.max(1,o/5)],[r.b.DodgeProbability,.01],[r.b.MaxMana,10],[r.b.MagicResistance,0],[r.b.Armor,10],[r.b.Scale,.7+.01*t],[r.b.MoveSpeed,200],[r.b.AttackRange,10],[r.b.AttackInterval,1.2],[r.b.HealthPercentage,1],[r.b.ManaPercentage,1],[r.b.MinDamage,2*i],[r.b.MaxDamage,3*i],[r.b.CritProbability,.05],[r.b.CritDamageFactor,1.5],[r.b.NonCombatHealTime,10],[r.b.DamageFactor,1],[r.b.Resource1,0],[r.b.Resource2,0],[r.b.Class,r.c.Warrior],[r.b.HealingAttackProbability,0],[r.b.HealPerSecond,0],[r.b.ExtraExperiencePerKill,0],[r.b.DoubleCoinProbability,0],[r.b.SpellDamageFactor,1],[r.b.Resource1DropProbability,0]])},u=new Map([[r.b.Level,1],[r.b.CurrentExperience,0],[r.b.MaxHealth,70],[r.b.DodgeProbability,0],[r.b.MaxMana,10],[r.b.MagicResistance,0],[r.b.Armor,70],[r.b.Scale,1],[r.b.MoveSpeed,180],[r.b.AttackRange,10],[r.b.AttackInterval,.5],[r.b.HealthPercentage,1],[r.b.ManaPercentage,1],[r.b.MinDamage,0],[r.b.MaxDamage,0],[r.b.CritProbability,0],[r.b.CritDamageFactor,1.5],[r.b.NonCombatHealTime,3],[r.b.DamageFactor,1],[r.b.Resource1,0],[r.b.Resource2,0],[r.b.Class,r.c.Warrior],[r.b.HealingAttackProbability,0],[r.b.HealPerSecond,0],[r.b.ExtraExperiencePerKill,0],[r.b.DoubleCoinProbability,0],[r.b.SpellDamageFactor,1],[r.b.Resource1DropProbability,0]])},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(136),i=(n.n(r),n(22)),o=n(31),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=400,u=function(t){function e(e,n,i,a,u){void 0===i&&(i=!1),void 0===a&&(a=16777215),void 0===u&&(u=s);var c=t.call(this,e.game)||this;c._critical=i,c._color=a,c._duration=u,c._pixiLayer=c.game.getService(o.a);var h=new r.Text;h.text=n,h.alpha=0,h.style.fontFamily="Passion One",h.style.fontSize=3*c._pixiLayer.unitSize,h.style.fill=c._color,h.style.strokeThickness=3,h.style.stroke=2171169,h.style.dropShadow=!0,h.anchor.set(.5,.5),c._pixiLayer.gameLayer.addChild(h),c._label=h;var l=BABYLON.Vector3.Project(new BABYLON.Vector3(e.position.x,e.height/1.5,e.position.z),BABYLON.Matrix.Identity(),e.level.scene.getTransformMatrix(),e.level.scene.activeCamera.viewport.toGlobal(c.game.engine.getRenderWidth(),c.game.engine.getRenderHeight()));return c._startPosition=new BABYLON.Vector2(l.x,l.y),c._baseScale=c._critical?1:.5,c._animationDirection=new BABYLON.Vector2(Math.random(),-Math.random()),c._startPosition.x<c.game.engine.getRenderWidth()/2&&(c._animationDirection.x=-c._animationDirection.x),c._animationDirection.normalize(),c._critical?c._duration*=2.5:c._timeSinceCreated=-150*Math.random(),c}return a(e,t),e.prototype.updateGameObject=function(t){var e=this._timeSinceCreated/this._duration;e<0||(0===this._label.alpha&&(this._label.alpha=1,this._label.position.x=this._startPosition.x,this._label.position.y=this._startPosition.y),this._critical&&e<.2?(this._label.scale.x=this._baseScale+this._baseScale*(.2-e)/.1,this._label.scale.y=this._label.scale.x):this._label.scale.set(this._baseScale,this._baseScale),e>.7&&(this._label.alpha=1.01-(e-.7)/.3),this._critical||(this._label.position.x=this._startPosition.x+this._pixiLayer.unitSize*e*this._animationDirection.x,this._label.position.y=this._startPosition.y+this._pixiLayer.unitSize*e*this._animationDirection.y),e>=1&&this.dispose())},e.prototype.disposeGameObject=function(){this._label.destroy()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return l});var r,i=n(136),o=(n.n(i),n(22)),a=n(31),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=5,c=10,h=10;!function(t){t[t.Resource1=0]="Resource1",t[t.Resource2=1]="Resource2"}(r=r||(r={}));var l=function(t){function e(e,n,o){void 0===n&&(n=c),void 0===o&&(o=r.Re
1source1);var s=t.call(this,e.game)||this;s.character=e,s.amount=n,s.type=o,s._absoluteTime=0,s._tempGravityVec=BABYLON.Vector2.Zero();var l=i.loader.resources.atlas.textures[o===r.Resource1?"coin_single":"diamond"],f=s.game.getService(a.a);s._pixiLayer=f;var d=BABYLON.Vector3.Project(new BABYLON.Vector3(e.mesh.position.x,e.mesh.position.y,e.mesh.position.z),BABYLON.Matrix.Identity(),e.level.scene.getTransformMatrix(),e.level.scene.activeCamera.viewport.toGlobal(s.game.engine.getRenderWidth(),s.game.engine.getRenderHeight()));s._particles=[];for(var p=Math.min(Math.max(1,n),h),g=0;g<p;++g){var _=new i.Sprite(l);f.topmostLayer.addChild(_),_.position.set(d.x+(Math.random()-.5)*f.unitSize,d.y+(Math.random()-.5)*f.unitSize),_.width=f.unitSize,_.height=f.unitSize,_.__velocity__={x:(Math.random()-.5)*f.unitSize*u,y:f.unitSize*u},s._particles.push(_)}var m=p;s._pendingSoundTimings=[];for(var g=0;g<m;++g)s._pendingSoundTimings.push(100*g);return s}return s(e,t),e.prototype.updateGameObject=function(t){for(var e=this,n=0;n<this._pendingSoundTimings.length;++n)this._absoluteTime>=this._pendingSoundTimings[n]&&(this.character.level.soundManager.playOnce("coin_drop"),this._pendingSoundTimings[n]=Number.MAX_SAFE_INTEGER);var i={x:this.game.engine.getRenderWidth()*(this.type===r.Resource1?.75:.5),y:-this.game.engine.getRenderHeight()/10},o=!0;this._particles.forEach(function(t){var n=t.__velocity__;t.position.x+=n.x*e.game.engine.getDeltaTime()/1e3,t.position.y+=n.y*e.game.engine.getDeltaTime()/1e3,t.position.y>=0&&(o=!1),e._tempGravityVec.set(i.x-t.position.x,i.y-t.position.y),e._tempGravityVec.normalize(),e._tempGravityVec.x*=e._pixiLayer.unitSize,e._tempGravityVec.y*=e._pixiLayer.unitSize,n.x+=30*e._tempGravityVec.x*e.game.engine.getDeltaTime()/1e3,n.y+=30*e._tempGravityVec.y*e.game.engine.getDeltaTime()/1e3}),o&&this.dispose(),this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.disposeGameObject=function(){this._particles.forEach(function(t){t.destroy()})},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r;!function(t){t[t.HTML=0]="HTML",t[t.FBINSTANT=1]="FBINSTANT"}(r=r||(r={}));var i=function(){function t(t){this.platform=t}return t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return m});var r=n(21),i=n(72),o=n(7),a=n(2),s=n(14),u=n(17),c=n(38),h=n(300),l=n(97),f=n(139),d=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},g=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.shouldBeVisible=function(){return this.game.getService(m).visible},e.prototype.renderedHeight=function(){return 110},e}(h.a),_=function(t){function e(e,n){var r=this,h=new c.a(e,0,.8);h.element.interactive=!0,h.element.on("mousedown",function(){r.close()}),h.element.on("touchstart",function(){r.close()});var l=new a.a(e,[],{preferredHeight:"6u"}),f=new o.a(e,[new a.a(e,[new u.a(e,"TAP TO CONTINUE",16777215,u.b.Right)],{preferredHeight:"1u",paddingBottom:"0.25u"}),new a.a(e,[new c.a(e,16777215,1,12),new a.a(e,[new u.a(e,n,2171169,u.b.Left)],{paddingLeft:s.a.largePaddingValue,paddingRight:s.a.largePaddingValue})],{preferredHeight:"5u"})]);r=t.call(this,e,[h,new o.a(e,[new a.a(e,[f]),l],p({},s.a.largePadding,{flexDirectionAlign:a.b.End}))],{},i.a.Topmost)||this;var d=new g(e);return l.element.addChild(d.element),d.element.position.set(e.engine.getRenderWidth()-7*r._pixiLayer.unitSize,1.5*-r._pixiLayer.unitSize),d.resize(7*r._pixiLayer.unitSize,7.4*r._pixiLayer.unitSize),r._absoluteTime=0,r._previewer=d,r._content=f,r._content.element.position.y=-e.engine.getRenderHeight(),r}return d(e,t),e.prototype.close=function(){this._absoluteTime>1200&&(this.element.visible=!1,this.events.emit("closed"),this.dispose())},e.prototype.disposeElement=function(){this._previewer&&this._previewer.dispose()}
1,e.prototype.updateElement=function(){this._absoluteTime<=1200?this._content.element.position.y=n.i(f.a)(this._absoluteTime,1200,-this.game.engine.getRenderHeight(),this.game.engine.getRenderHeight()):this._content.element.position.y=0,this._absoluteTime+=this.game.engine.getDeltaTime()},e}(i.b),m=function(t){function e(e){var n=t.call(this,e)||this;return n._visible=!1,n}return d(e,t),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},enumerable:!0,configurable:!0}),e.prototype.showAsync=function(t){var e=this;return new Promise(function(n){new _(e.game,t).events.once("closed",function(){e._visible=!1,e.game.getService(l.a).updateTimeScale(l.b.CharacterCallout,1),n()}),e._visible=!0,e.game.getService(l.a).updateTimeScale(l.b.CharacterCallout,0)})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return p});var r=n(48),i=n(21),o=n(34),a=n(290),s=n(115),u=n(9),c=n(296),h=n(24),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},d=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},p=function(t){function e(e){var n=t.call(this,e)||this;n.canvas=document.getElementById("character_preview");var i=2;r.a.graphics===r.b.Low?i=1:r.a.graphics===r.b.Mid&&(i=1.5),n.engine=new BABYLON.Engine(n.canvas,!1,{limitDeviceRatio:i},!0),n.engine.enableOfflineSupport=!1,n.scene=new BABYLON.Scene(n.engine),n.scene.imageProcessingConfiguration.exposure=2,n.scene.imageProcessingConfiguration.contrast=1.5,n.scene.clearColor=new BABYLON.Color4(0,0,0,0),n.scene.ambientColor=new BABYLON.Color3(0,0,0),n.camera=new BABYLON.ArcRotateCamera("camera_preview",Math.PI/2,Math.PI/2,100,BABYLON.Vector3.Zero(),n.scene),n.camera.mode=BABYLON.Camera.ORTHOGRAPHIC_CAMERA;var o=new BABYLON.HemisphericLight("light_environment",new BABYLON.Vector3(0,1,0),n.scene);o.diffuse=new BABYLON.Color3(1,1,1),o.specular=new BABYLON.Color3(0,0,0),o.groundColor=new BABYLON.Color3(.5,.5,.5),o.intensity=.8;var a=new BABYLON.DirectionalLight("light_sun",new BABYLON.Vector3(0,-.2,-1),n.scene);return a.diffuse=new BABYLON.Color3(1,1,1),a.specular=new BABYLON.Color3(0,0,0),a.intensity=.5,n._equipments=new Map,n.game.events.on("player_inventory_slot_updated",function(t,e){t>=u.c&&n._characterMeshInfo&&n.equip(e)}),n}return l(e,t),e.prototype.initializeCharacter=function(){this._characterMeshInfo||this.initializeCharacterImpl()},e.prototype.startServiceAsync=function(){return f(this,void 0,void 0,function(){return d(this,function(t){return this.renderPipeline=new BABYLON.DefaultRenderingPipeline("preview_render_pipeline",!0,this.scene,[this.camera]),this.renderPipeline.fxaaEnabled=!0,[2]})})},e.prototype.disposeService=function(){this.renderPipeline.dispose(),this.camera.dispose(),this.scene.dispose(),this.engine.dispose()},e.prototype.initializeCharacterImpl=function(){var t=this,e=this.game.getService(u.a).model===u.b.Female?c.b[0]:c.a[0];if(this._characterMeshInfo=this.game.getService(s.b).createMeshFromModel(e.id,"character_preview"),this._characterMeshInfo.root.position.set(-15,-45,0),e.animations&&this._characterMeshInfo.meshWithSkeleton){var n=e.animations.get(h.b.Idle);this.scene.beginAnimation(this._characterMeshInfo.meshWithSkeleton.skeleton,n.firstFrame,n.lastFrame,!0)}
1[o.a.Helmet,o.a.Weapon,o.a.Torso,o.a.Boots].forEach(function(e){var n=t.game.getService(u.a).getEquipment(e);n&&t.equip(n)})},e.prototype.equip=function(t){if(t.baseModel.type===o.a.Torso||t.baseModel.type===o.a.Weapon||t.baseModel.type===o.a.Boots||t.baseModel.type===o.a.Helmet){var e=this._equipments.get(t.baseModel.type);e&&e.meshes.forEach(function(t){t.dispose()});var n=this.loadMeshForItem(t);this._equipments.set(t.baseModel.type,{item:t,meshes:n})}},e.prototype.loadMeshForItem=function(t){return a.a.loadMeshForEquipment(t,this.game.getService(s.b),this._characterMeshInfo)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return b});var r,i=n(21),o=n(16),a=n(2),s=n(23),u=n(7),c=n(17),h=n(73),l=n(13),f=n(141),d=n(62),p=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},_=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};!function(t){t[t.PlayerScore=2]="PlayerScore",t[t.PlayerChallenge=3]="PlayerChallenge"}(r=r||(r={}));var m=String.fromCodePoint(128526),y=String.fromCodePoint(128557),v=String.fromCodePoint(128521),b=function(t){function e(e){return t.call(this,e)||this}return p(e,t),e.prototype.bufferUpdate=function(t){switch(t.template){case r.PlayerScore:this.renderPlayerScoreUpdate(t.leaderboardStatus,t.image);break;case r.PlayerChallenge:this.renderPlayerChallengeUpdate(t.image)}o.a.postUpdate(r[t.template],this._lastUpdateText,this._canvas.toDataURL("image/jpeg",.5),this._lastUpdateCTA,{source:"custom_update",custom_update_template:r[t.template]},this._lastUpdatePush,this._lastUpdateImmediate)},e.prototype.renderDefaultShareImage=function(){var t=new PIXI.Container,e=PIXI.loader.resources.share_background.texture,n=new PIXI.Sprite(e);return n.width=561,n.height=561*e.height/e.width,t.addChild(n),n.y=(294-n.height)/2,this._renderer.render(t),t.destroy({children:!0}),this._canvas.toDataURL("image/jpeg",.5)},e.prototype.renderEndScreenShareImage=function(t,e,n,r,i){var o=new PIXI.Container,s=this.game.getService(d.a).lastScreenshot||PIXI.loader.resources.share_background.texture,h=new PIXI.Sprite(s);h.width=561,h.height=561*s.height/s.width,o.addChild(h),h.y=(294-h.height)/2,h.y<-58.8&&(h.y+=58.8);var f=new a.a(this.game,[new u.a(this.game,[new a.a(this.game,[new c.a(this.game,""+t.config.title,l.f,c.b.Center,{stroke:2171169,strokeThickness:4,dropShadow:!0}
1)],{preferredHeight:"20%"}),new a.a(this.game,[new c.a(this.game,"Enemies Killed",16777215,c.b.Left,{stroke:2171169,strokeThickness:4,dropShadow:!0}),new c.a(this.game,e.toFixed(),16777215,c.b.Right,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"17%"}),new a.a(this.game,[new c.a(this.game,"Highest Damage",16777215,c.b.Left,{stroke:2171169,strokeThickness:4,dropShadow:!0}),new c.a(this.game,n.toFixed(),16777215,c.b.Right,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"17%"}),new a.a(this.game,[new c.a(this.game,"Coins Collected",16777215,c.b.Left,{stroke:2171169,strokeThickness:4,dropShadow:!0}),new c.a(this.game,r.toFixed(),16777215,c.b.Right,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"17%"}),new a.a(this.game,[new c.a(this.game,"Chests Collected",16777215,c.b.Left,{stroke:2171169,strokeThickness:4,dropShadow:!0}),new c.a(this.game,i.toFixed(),16777215,c.b.Right,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"17%"})],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})]);return f.ensureConstructed(),f.resize(561,294),o.addChild(f.element),this._renderer.render(o),f.dispose(),o.destroy({children:!0}),this._canvas.toDataURL("image/jpeg",.5)},e.prototype.renderLevelCompleteShareImage=function(t,e,n){var r=new PIXI.Container,i=this.game.getService(d.a).lastScreenshot||PIXI.loader.resources.share_background.texture,s=new PIXI.Sprite(i);s.width=561,s.height=561*i.height/i.width,r.addChild(s),s.y=(294-s.height)/2,s.y<-58.8&&(s.y+=58.8);var h=new a.a(this.game,[new u.a(this.game,[new a.a(this.game,[new c.a(this.game,""+t.config.title,l.f,c.b.Center,{stroke:2171169,strokeThickness:4,dropShadow:!0}
1)],{preferredHeight:"20%"}),new u.b(this.game,[new u.a(this.game,[new a.a(this.game,[new c.a(this.game,"Took "+o.a.getPlayerName(),16777215,c.b.Center,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"20%"}),new a.a(this.game,[new c.a(this.game,""+e.toFixed(2),l.m,c.b.Center,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"50%"}),new a.a(this.game,[new c.a(this.game,"Seconds",16777215,c.b.Center,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"20%"})],{flex:.8,flexDirectionAlign:a.b.Center}),new u.a(this.game,[new a.a(this.game,[new c.a(this.game,"Faster Than",16777215,c.b.Center,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"20%"}),new a.a(this.game,[new c.a(this.game,n.toFixed(2)+"%",l.n,c.b.Center,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"50%"}),new a.a(this.game,[new c.a(this.game,"Of The World",16777215,c.b.Center,{stroke:2171169,strokeThickness:4,dropShadow:!0})],{preferredHeight:"20%"})],{flex:1,flexDirectionAlign:a.b.Center})],{flex:1,crossDirectionAlign:a.d.Center})],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})]);return h.ensureConstructed(),h.resize(561,294),r.addChild(h.element),this._renderer.render(r),h.dispose(),r.destroy({children:!0}),this._canvas.toDataURL("image/jpeg",.5)},e.prototype.renderItemShareImage=function(t,e){var r=new PIXI.Container,i=n.i(h.a)(t),o=new s.a(this.game,"background_1"),l=new s.a(e.game,"rounded_square_white"),f=new s.a(e.game,"button_1"),d=new s.a(e.game,i.iconName),p=new a.a(this.game,[o,new u.a(this.game,[new a.a(this.game,[new c.a(this.game,t.baseModel.name+" Lv."+t.itemLevel.toFixed(),i.rarityColor,c.b.Center,{strokeThickness:4})],{preferredHeight:"20%"}),new u.b(this.game,[new a.a(this.game,[l,new a.a(this.game,[f,d],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],{preferredWidth:112.2,preferredHeight:112.2,forceSquare:!0}),new u.a(this.game,n.i(h.b)(this.game,t),{preferredHeight:112.2,flex:1,flexDirectionAlign:a.b.Center,paddingLeft:"5%"})],{paddingTop:"8%",paddingBottom:"8%",paddingLeft:"18%",paddingRight:"8%",flex:1,crossDirectionAlign:a.d.Center})],{paddingTop:"5%",paddingBottom:"7%"})]);return p.ensureConstructed(),p.resize(561,294),o.scale=1.05,l.sprite.tint=i.rarityColor,r.addChild(p.element),this._renderer.render(r),p.dispose(),r.destroy({children:!0}),this._canvas.toDataURL("image/jpeg",.5)},e.prototype.startServiceAsync=function(){return g(this,void 0,void 0,function(){return _(this,function(t){return this._canvas=document.getElementById("offscreen_canvas_1"),this._renderer=new PIXI.WebGLRenderer({width:561,height:294,view:this._canvas,transparent:!0,antialias:!1,forceFXAA:!0,resolution:1}),[2]})})},e.prototype.disposeService=function(){this._renderer.destroy()},e.prototype.renderPlayerChallengeUpdate=function(t){var e=new PIXI.Container,n=t||PIXI.loader.resources.share_background.texture,r=new PIXI.Sprite(n);r.width=561,r.height=561*n.height/n.width,e.addChild(r),r.y=(294-r.height)/2;var i=new PIXI.Graphics;i.beginFill(16777215),i.drawRoundedRect(56.1,73.5,147,147,8),i.endFill(),e.addChild(i);var a=new PIXI.Graphics;a.beginFill(16777215),a.drawRoundedRect(64.1,81.5,131,131,8),a.endFill(),e.addChild(a);var s=new PIXI.Sprite(PIXI.loader.resources.player_photo.texture);s.position.set(64.1,81.5),s.width=131,s.height=131,s.mask=a,e.addChild(s),this._renderer.render(e),this._lastUpdateText=o.a.getPlayerName()+" wants to play with you!",this._lastUpdateCTA="Play",this._lastUpdatePush=!0,this._lastUpdateImmediate=!1,e.destroy({children:!0})},e.prototype.renderPlayerScoreUpdate=function(t,e){var n=new PIXI.Container,r=e||PIXI.loader.resources.share_background.texture,i=new PIXI.Sprite(r);i.width=561,i.height=561*r.height/r.width,n.addChild(i),i.y=(294-i.height)/2;var o=new PIXI.Graphics;o.beginFill(16777215),o.drawRoundedRect(56.1,73.5,147,147,8),o.endFill(),n.addChild(o);var a=new PIXI.Graphics;a.beginFill(16777215),a.drawRoundedRect(64.1,81.5,131,131,8),a.endFill(),n.addChild(a);var s=new PIXI.Sprite(PIXI.loader.resources.player_photo.texture);s.position.set(64.1,81.5),s.width=131,s.height=131,s.mask=a,n.addChild(s);var u=new PIXI.Text;
1u.style.fontFamily="Passion One",u.style.fontSize=36.75,u.style.lineHeight=36.75,u.style.strokeThickness=8,u.style.stroke="#212121",u.style.fill=16777215,u.style.dropShadow=!0,u.anchor.set(.5,0),u.text="Island",n.addChild(u),u.x=455.9,u.y=73.5;var c=new PIXI.Text;c.style.fontFamily="Passion One",c.style.fontSize=73.5,c.style.lineHeight=73.5,c.style.strokeThickness=8,c.style.stroke="#212121",c.style.fill=l.n,c.style.dropShadow=!0,c.anchor.set(.5,0),c.text=""+t.playerEntry.score.toFixed(),n.addChild(c),c.x=455.9,c.y=122.5,this._renderer.render(n),this._lastUpdateText=(t.higherThanPlayerEntry?t.higherThanPlayerEntry.player.name+": "+m+" Island "+t.higherThanPlayerEntry.score.toFixed()+". ":"")+t.playerEntry.player.name+": "+(t.higherThanPlayerEntry?t.lowerThanPlayerEntry?v:y:t.lowerThanPlayerEntry?m:0===t.playerEntry.score?y:v)+" Island "+t.playerEntry.score.toFixed()+". "+(t.lowerThanPlayerEntry?t.lowerThanPlayerEntry.player.name+": "+y+" Island "+t.lowerThanPlayerEntry.score.toFixed()+". ":""),this._lastUpdateCTA="Play",this._lastUpdatePush=t.type===f.b.WonFirstPlace||t.type===f.b.NewPlayer||t.type===f.b.RankedUp,this._lastUpdateImmediate=!1,n.destroy({children:!0})},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return c}),n.d(e,"b",function(){return h});var r=n(22),i=n(17),o=n(31),a=n(139),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=4500,c=function(t){function e(e,n,r){void 0===r&&(r=u);var a=t.call(this,e)||this;return a.text=n,a.duration=r,a._pixiLayer=a.game.getService(o.a),a._bannerText=new i.c(e,n,16777215),a._bannerText.resize(a.game.engine.getRenderWidth(),2*a._pixiLayer.unitSize),a._pixiLayer.gameLayer.addChild(a._bannerText.element),a._bannerText.element.position.set(0,a.game.engine.getRenderHeight()),a}return s(e,t),e.prototype.updateGameObject=function(t){this.updateBanner(this._timeSinceCreated/this.duration),this._timeSinceCreated<=1200?this._bannerText.element.position.y=this.game.engine.getRenderHeight()-n.i(a.a)(this._timeSinceCreated,1200,0,5*this._pixiLayer.unitSize):this._timeSinceCreated<=this.duration-600||(this._timeSinceCreated<=this.duration?this._bannerText.element.position.y=this.game.engine.getRenderHeight()-5*this._pixiLayer.unitSize+n.i(a.b)(this._timeSinceCreated-(this.duration-600),600,0,5*this._pixiLayer.unitSize):(this.events.emit("ended"),this.dispose()))},e.prototype.disposeGameObject=function(){this._bannerText.dispose()},e.prototype.updateBanner=function(t){},e}(r.a),h=function(t){function e(e,n,r){void 0===r&&(r=u);var i=t.call(this,e,n+" In "+Math.floor(r/1e3).toFixed()+"...",r)||this;return i.textPrefix=n,i}return s(e,t),e.prototype.updateBanner=function(t){var e=this.duration*(1-t);e<0&&(e=0),this._bannerText.text=(this.textPrefix+" In "+Math.floor(e/1e3).toFixed()+"...").toUpperCase()},e}(c)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return d});var r,i=n(2),o=n(7),a=n(23),s=n(17),u=n(53),c=n(14),h=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};!function(t){t[t.Blue=0]="Blue",t[t.Red=1]="Red"}(r=r||(r={}));var f=function(t){function e(e,n){void 0===n&&(n=r.Blue);var i=t.call(this,e)||this;return i.color=n,i._progress=0,i}return h(e,t),Object.defineProperty(e.prototype,"progress",{get:function(){return this._progress},set:function(t){this._progress=t,this.resizeElement()},enumerable:!0,configurable:!0}),e.prototype.constructElement=function(){this._bg=new PIXI.Sprite(PIXI.loader.resources.atlas.textures.progress_bg),this._bar=new PIXI.Sprite(PIXI.loader.resources.atlas.textures[this.color===r.Blue?"progress_blue":"progress_red"]),this._barMask=new PIXI.Sprite(PIXI.loader.resources.atlas.textures.progress_mask),this.element.addChild(this._bg),this.element.addChild(this._bar),this.element.addChild(this._barMask),this._element.displayGroup=this._pixiLayer.guiImageDisplayGroup},e.prototype.resizeElement=function(){this._bg.scale.set(this._width/this._bg.texture.width,this._height/this._bg.texture.height);var t=.91*this._width,e=.7*this._height;this._bar.scale.set(t/this._bar.texture.width,e/this._bar.texture.height),this._barMask.scale.set(t*(1-this._progress)/this._barMask.texture.width,e/this._barMask.texture.height),this._bar.position.set(.045*this._width,.15*this._height),this._barMask.position.set(.045*this._width+this._progress*t,.15*this._height)},e}(u.a),d=function(t){function e(e,n,u,h,d){void 0===n&&(n=r.Blue),void 0===u&&(u=16777215),void 0===h&&(h=""),void 0===d&&(d="");var p=this,g=new s.a(e,"",16777215),_=null;h&&(_=new a.a(e,h));var m=new f(e,n);return p=t.call(this,e,[new i.a(e,[new i.a(e,[m,new i.a(e,[g],l({},c.a.smallPadding))])],{paddingTop:"15%",paddingBottom:"15%",paddingLeft:"0.5h",paddingRight:"0.5h"}),new o.b(e,[new i.a(e,_?[_]:[],{preferredHeight:"100%",preferredWidth:"100h",forceSquare:!0}),new i.a(e,[],{flex:1}),new i.a(e,d?[new a.a(e,d)]:[],{preferredHeight:"100%",preferredWidth:"100h",forceSquare:!0})],{preferredWidth:"100%",preferredHeight:"100%"})])||this,p._bar=m,p._text=g,p._vibrationObject=_,p._progress=0,p._bar.progress=0,p._absoluteTime=0,p._timeOfLastChange=0,p}return h(e,t),Object.defineProperty(e.prototype,"progress",{get:function(){return this._progress},set:function(t){t!==this._progress&&(this._progress=t,this._bar.progress=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text.text},set:function(t){this._text.text!==t&&(this._timeOfLastChange=this._absoluteTime+500*Math.random(),this._text.text=t)},enumerable:!0,configurable:!0}),e.prototype.updateElement=function(){this._vibrationObject&&(this._absoluteTime-this._timeOfLastChange<=300?this._vibrationObject.
vendor: 3,708 bytes, line 1
1scale=1+.5*Math.sin((this._absoluteTime-this._timeOfLastChange)/300*Math.PI):this._vibrationObject.scale=1,this._absoluteTime+=this.game.engine.getDeltaTime())},e}(i.a)},function(t,e,n){var r=n(49);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){"use strict";var r=n(26),i=n(91),o=n(20);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),s=i(t,a),u=i(e,a),c=arguments.length>2?arguments[2]:void 0,h=Math.min((void 0===c?a:i(c,a))-u,a-s),l=1;for(u<s&&s<u+h&&(l=-1,u+=h-1,s+=h-1);h-- >0;)u in n?n[s]=n[u]:delete n[s],s+=l,u+=l;return n}},function(t,e,n){var r=n(83);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){var r=n(35),i=n(26),o=n(107),a=n(20);t.exports=function(t,e,n,s,u){r(e);var c=i(t),h=o(c),l=a(c.length),f=u?l-1:0,d=u?-1:1;if(n<2)for(;;){if(f in h){s=h[f],f+=d;break}if(f+=d,u?f<0:l<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:l>f;f+=d)f in h&&(s=e(s,h[f],f,c));return s}},function(t,e,n){"use strict";var r=n(35),i=n(10),o=n(205),a=[].slice,s={},u=function(t,e,n){if(!(e in s)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?u(e,r.length,r):o(e,r,t)};return i(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e,n){"use strict";var r=n(19).f,i=n(85),o=n(89),a=n(50),s=n(82),u=n(83),c=n(155),h=n(208),l=n(90),f=n(18),d=n(75).fastKey,p=n(101),g=f?"_s":"size",_=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var h=t(function(t,r){s(t,h,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[g]=0,void 0!=r&&u(r,n,t[c],t)});return o(h.prototype,{clear:function(){for(var t=p(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[g]=0},delete:function(t){var n=p(this,e),r=_(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[g]--}return!!r},forEach:function(t){p(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!_(p(this,e),t)}}),f&&r(h.prototype,"size",{get:function(){return p(this,e)[g]}}),h},def:function(t,e,n){var r,i,o=_(t,e);return o?o.v=n:(t._l=o={i:i=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[g]++,"F"!==i&&(t._i[i]=o)),t},getEntry:_,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=p(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?h(0,n.k):"values"==e?h(0,n.v):h(0,[n.k,n.v]):(t._t=void 0,h(1))},n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){var r=n(106),i=n(197);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){"use strict";var r=n(89),i=n(75).getWeak,o=n(3),a=n(10),s=n(82),u=n(83),c=n(54),h=n(39),l=n(101),f=c(5),d=c(6),p=0,g=function(t){return t._l||(t._l=new _)},_=function(){this.a=[]},m=function(t,e){return f(t.a,function(t){return t[0]===e})};_.prototype={get:function(t){var e=m(this,t);if(e)return e[1]},has:function(t){return!!m(this,t)},set:function(t,e){var n=m(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var c=t(function(t,r){s(t,c,e,"_i"),t._t=e,t._i=p++,t._l=void 0,void 0!=r&&u(r,n,t[o],t)}
vendor: 4,228 bytes, line 1
1);return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?g(l(this,e)).delete(t):n&&h(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?g(l(this,e)).has(t):n&&h(n,this._i)}}),c},def:function(t,e,n){var r=i(o(e),!0);return!0===r?g(t).set(e,n):r[t._i]=n,t},ufstore:g}},function(t,e,n){"use strict";function r(t,e,n,c,h,l,f,d){for(var p,g,_=h,m=0,y=!!f&&s(f,d,3);m<c;){if(m in n){if(p=y?y(n[m],m,e):n[m],g=!1,o(p)&&(g=p[u],g=void 0!==g?!!g:i(p)),g&&l>0)_=r(t,e,p,a(p.length),_,l-1)-1;else{if(_>=9007199254740991)throw TypeError();t[_]=p}_++}m++}return _}var i=n(121),o=n(10),a=n(20),s=n(50),u=n(12)("isConcatSpreadable");t.exports=r},function(t,e,n){t.exports=!n(18)&&!n(8)(function(){return 7!=Object.defineProperty(n(148)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(10),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(3);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(157),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),u=i(2,-126),c=function(t){return t+1/o-1/o};t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),h=r(t);return i<u?h*c(i/u/a)*u*a:(e=(1+a/o)*i,n=e-(e-i),n>s||n!=n?h*(1/0):h*n)}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e){t.exports=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-r)/(n-e)+r}},function(t,e,n){"use strict";var r=n(87),i=n(125),o=n(108),a=n(26),s=n(107),u=Object.assign;t.exports=!u||n(8)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,h=i.f,l=o.f;u>c;)for(var f,d=s(arguments[c++]),p=h?r(d).concat(h(d)):r(d),g=p.length,_=0;g>_;)l.call(d,f=p[_++])&&(n[f]=d[f]);return n}:u},function(t,e,n){var r=n(19),i=n(3),o=n(87);t.exports=n(18)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(46),i=n(86).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},function(t,e,n){var r=n(39),i=n(46),o=n(117)(!1),a=n(161)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(87),i=n(46),o=n(108).f;t.exports=function(t){return function(e){for(var n,a=i(e),s=r(a),u=s.length,c=0,h=[];u>c;)o.call(a,n=s[c++])&&h.push(t?[n,a[n]]:a[n]);return h}}},function(t,e,n){var r=n(86),i=n(125),o=n(3),a=n(4).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(4).parseFloat,i=n(100).trim;t.exports=1/r(n(165)+"-0")!==-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(4).parseInt,i=n(100).trim,o=n(165),a=/^[-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(3),i=n(10),o=n(159);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(20),i=n(164),o=n(55);t.exports=function(t,e,n,a){var s=String(o(t)),u=s.length,c=void 0===n?" ":String(n),h=r(e);
1if(h<=u||""==c)return s;var l=h-u,f=i.call(c,Math.ceil(l/c.length));return f.length>l&&(f=f.slice(0,l)),a?f+s:s+f}},function(t,e,n){var r=n(57),i=n(20);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){e.f=n(12)},function(t,e,n){"use strict";var r=n(200),i=n(101);t.exports=n(118)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){n(18)&&"g"!=/./g.flags&&n(19).f(RegExp.prototype,"flags",{configurable:!0,get:n(120)})},function(t,e,n){"use strict";var r=n(200),i=n(101);t.exports=n(118)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(54)(0),o=n(41),a=n(75),s=n(212),u=n(202),c=n(10),h=n(8),l=n(101),f=a.getWeak,d=Object.isExtensible,p=u.ufstore,g={},_=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(c(t)){var e=f(t);return!0===e?p(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(l(this,"WeakMap"),t,e)}},y=t.exports=n(118)("WeakMap",_,m,u,!0,!0);h(function(){return 7!=(new y).set((Object.freeze||Object)(g),7).get(g)})&&(r=u.getConstructor(_,"WeakMap"),s(r.prototype,m),a.NEED=!0,i(["delete","has","get","set"],function(t){var e=y.prototype,n=e[t];o(e,t,function(e,i){if(c(e)&&!d(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r=e&&e.length,o=r?e[0]*n:t.length,s=i(t,0,o,n,!0),u=[];if(!s)return u;var c,h,f,d,p,g,_;if(r&&(s=l(t,e,s,n)),t.length>80*n){c=f=t[0],h=d=t[1];for(var m=n;m<o;m+=n)p=t[m],g=t[m+1],p<c&&(c=p),g<h&&(h=g),p>f&&(f=p),g>d&&(d=g);_=Math.max(f-c,d-h),_=0!==_?1/_:0}return a(s,u,n,c,h,_),u}function i(t,e,n,r,i){var o,a;if(i===I(t,e,n,r)>0)for(o=e;o<n;o+=r)a=M(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=M(o,t[o],t[o+1],a);return a&&x(a,a.next)&&(C(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!x(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(C(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,l,f){if(t){!f&&l&&g(t,r,i,l);for(var d,p,_=t;t.prev!==t.next;)if(d=t.prev,p=t.next,l?u(t,r,i,l):s(t))e.push(d.i/n),e.push(t.i/n),e.push(p.i/n),C(t),t=p.next,_=p.next;else if((t=p)===_){f?1===f?(t=c(t,e,n),a(t,e,n,r,i,l,2)):2===f&&h(t,e,n,r,i,l):a(o(t),e,n,r,i,l,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(w(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&w(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(w(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,h=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,l=m(s,u,e,n,r),f=m(c,h,e,n,r),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&w(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=l;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&w(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function c(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!x(i,o)&&S(i,r,r.next,o)&&E(i,o)&&E(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),C(r),C(r.next),r=t=o),r=r.next}while(r!==t);return r}function h(t,e,n,r,i,s){var u=t;do{for(var c=u.next.next;c!==u.prev;){if(u.i!==c.i&&b(u,c)){var h=O(u,c);return u=o(u,u.next),h=o(h,h.next),a(u,e,n,r,i,s),void a(h,e,n,r,i,s)}c=c.next}u=u.next}while(u!==t)}function l(t,e,n,r){var a,s,u,c,h,l=[];for(a=0,s=e.length;a<s;a++)u=e[a]*r,c=a<s-1?e[a+1]*r:t.length,h=i(t,u,c,r,!1),h===h.next&&(h.steiner=!0),l.push(y(h));for(l.sort(f),a=0;a<l.length;a++)d(l[a],n),n=o(n,n.next);return n}function f(t,e){return t.x-e.x}function d(t,e){if(e=p(t,e)){var n=O(e,t);o(n,n.next)}}function p(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y
1);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var u,c=n,h=n.x,l=n.y,f=1/0;for(r=n.next;r!==c;)i>=r.x&&r.x>=h&&i!==r.x&&v(o<l?i:a,o,h,l,o<l?a:i,o,r.x,r.y)&&((u=Math.abs(o-r.y)/(i-r.x))<f||u===f&&r.x>n.x)&&E(r,t)&&(n=r,f=u),r=r.next;return n}function g(t,e,n,r){var i=t;do{null===i.z&&(i.z=m(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,_(i)}function _(t){var e,n,r,i,o,a,s,u,c=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<c&&(s++,r=r.nextZ);e++);for(u=c;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1);return t}function m(t,e,n,r,i){return t=32767*(t-n)*i,e=32767*(e-r)*i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function v(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function b(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!T(t,e)&&E(t,e)&&E(e,t)&&P(t,e)}function w(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function S(t,e,n,r){return!!(x(t,e)&&x(n,r)||x(t,r)&&x(n,e))||w(t,e,n)>0!==w(t,e,r)>0&&w(n,r,t)>0!==w(n,r,e)>0}function T(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&S(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function E(t,e){return w(t.prev,t,t.next)<0?w(t,e,t.next)>=0&&w(t,t.prev,e)>=0:w(t,e,t.prev)<0||w(t,t.next,e)<0}function P(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}function O(t,e){var n=new A(t.i,t.x,t.y),r=new A(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function M(t,e,n,r){var i=new A(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function C(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 A(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=r,t.exports.default=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(I(t,0,o,n));if(i)for(var s=0,u=e.length;s<u;s++){var c=e[s]*n,h=s<u-1?e[s+1]*n:t.length;a-=Math.abs(I(t,c,h,n))}var l=0;for(s=0;s<r.length;s+=3){var f=r[s]*n,d=r[s+1]*n,p=r[s+2]*n;l+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===a&&0===l?0:Math.abs((l-a)/a)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(e,n,i){void 0===n&&(n=!1),r(this,t),this._fn=e,this._once=n,this._thisArg=i,this._next=this._prev=this._owner=null}return o(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}(),s=function(){function t(){r(this,t),this._head=this._tail=void 0}return o(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var n=[];e;)n.push(e),e=e._next;return n}},{key:"has",value:function(t){if(!(t instanceof a))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=this._head;if(!t)return!1;for(;t;)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!==typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return i(this,new a(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!==typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return i(this,new a(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof a))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t}();
1s.MiniSignalBinding=a,e.default=s,t.exports=e.default},function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,u=r(t),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var h in n)o.call(n,h)&&(u[h]=n[h]);if(i){s=i(n);for(var l=0;l<s.length;l++)a.call(n,s[l])&&(u[s[l]]=n[s[l]])}}return u}},function(t,e,n){"use strict";t.exports=function(t,e){e=e||{};for(var n={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=n.parser[e.strictMode?"strict":"loose"].exec(t),i={},o=14;o--;)i[n.key[o]]=r[o]||"";return i[n.q.name]={},i[n.key[12]].replace(n.q.parser,function(t,e,r){e&&(i[n.q.name][e]=r)}),i}},function(t,e){var n=function(t,e,n,r,i){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=n||-1,this.format=r||t.RGBA,this.type=i||t.UNSIGNED_BYTE};n.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var n=t.videoWidth||t.width,r=t.videoHeight||t.height;r!==this.height||n!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=n,this.height=r};var r=!1;n.prototype.uploadData=function(t,e,n){this.bind();var i=this.gl;if(t instanceof Float32Array){if(!r){if(!i.getExtension("OES_texture_float"))throw new Error("floating point textures not available");r=!0}this.type=i.FLOAT}
1else this.type=this.type||i.UNSIGNED_BYTE;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||n!==this.height?i.texImage2D(i.TEXTURE_2D,0,this.format,e,n,0,this.format,this.type,t||null):i.texSubImage2D(i.TEXTURE_2D,0,0,0,e,n,this.format,this.type,t||null),this.width=e,this.height=n},n.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},n.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},n.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},n.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},n.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},n.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},n.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},n.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},n.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},n.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},n.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},n.fromSource=function(t,e,r){var i=new n(t);return i.premultiplyAlpha=r||!1,i.upload(e),i},n.fromData=function(t,e,r,i){var o=new n(t);return o.uploadData(e,r,i),o},t.exports=n},function(t,e){var n=function(t,e,n){var r;if(n){var i=n.tempAttribState,o=n.attribState;for(r=0;r<i.length;r++)i[r]=!1;for(r=0;r<e.length;r++)i[e[r].attribute.location]=!0;for(r=0;r<o.length;r++)o[r]!==i[r]&&(o[r]=i[r],n.attribState[r]?t.enableVertexAttribArray(r):t.disableVertexAttribArray(r))}else for(r=0;r<e.length;r++){var a=e[r];t.enableVertexAttribArray(a.attribute.location)}};t.exports=n},function(t,e){var n=function(t,e,n,i){var o=r(t,t.VERTEX_SHADER,e),a=r(t,t.FRAGMENT_SHADER,n),s=t.createProgram();if(t.attachShader(s,o),t.attachShader(s,a),i)for(var u in i)t.bindAttribLocation(s,i[u],u);return t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(o),t.deleteShader(a),s},r=function(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)?r:(console.log(t.getShaderInfoLog(r)),null)};t.exports=n},function(t,e){var n=function(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return r(2*e);case"bvec3":return r(3*e);case"bvec4":return r(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}},r=function(t){for(var e=new Array(t),n=0;n<e.length;n++)e[n]=!1;return e};t.exports=n},function(t,e,n){var r=n(172),i=n(240),o=function(t,e){for(var n={},o=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),s=0;s<o;s++){var u=t.getActiveAttrib(e,s),c=r(t,u.type);n[u.name]={type:c,size:i(c),location:t.getAttribLocation(e,u.name),pointer:a}}return n},a=function(t,e,n,r){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,n||0,r||0)};t.exports=o},function(t,e,n){var r=n(172),i=n(236),o=function(t,e){for(var n={},o=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),a=0;a<o;a++){var s=t.getActiveUniform(e,a),u=s.name.replace(/\[.*?\]/,""),c=r(t,s.type);n[u]={type:c,size:s.size,location:t.getUniformLocation(e,u),value:i(c,s.size)}}return n};t.exports=o},function(t,e){var n=function(t,e){var n={data:{}};n.gl=t;for(var a=Object.keys(e),s=0;s<a.length;s++){var u=a[s],c=u.split("."),h=c[c.length-1],l=o(c,n),f=e[u];l.data[h]=f,l.gl=t,Object.defineProperty(l,h,{get:r(h),set:i(h,f)})}return n},r=function(t){var e=a.replace("%%",t);return new Function(e)},i=function(t,e){var n,r=s.replace(/%%/g,t);return n=1===e.size?u[e.type]:c[e.type],n&&(r+="\nthis.gl."+n+";"),new Function("value",r)},o=function(t,e){for(var n=e,r=0;r<t.length-1;r++){var i=n[t[r]]||{data:{}};n[t[r]]=i,n=i}return n},a=["return this.data.%%.value;"].join("\n"),s=["this.data.%%.value = value;","var location = this.data.%%.location;"].join("\n"),u={float:"uniform1f(location, value)",vec2:"uniform2f(location, value[0], value[1])",vec3:"uniform3f(location, value[0], value[1], value[2])",vec4:"uniform4f(location, value[0], value[1], value[2], value[3])",int:"uniform1i(location, value)",ivec2:"uniform2i(location, value[0], value[1])",ivec3:"uniform3i(location, value[0], value[1], value[2])",ivec4:"uniform4i(location, value[0], value[1], value[2], value[3])",bool:"uniform1i(location, value)",bvec2:"uniform2i(location, value[0], value[1])",bvec3:"uniform3i(location, value[0], value[1], value[2])",bvec4:"uniform4i(location, value[0], value[1], value[2], value[3])",mat2:"uniformMatrix2fv(location, false, value)",mat3:"uniformMatrix3fv(location, false, value)",mat4:"uniformMatrix4fv(location, false, value)",sampler2D:"uniform1i(location, value)"},c={float:"uniform1fv(location, value)",vec2:"uniform2fv(location, value)",vec3:"uniform3fv(location, value)",vec4:"uniform4fv(location, value)",int:"uniform1iv(location, value)",ivec2:"uniform2iv(location, value)",ivec3:"uniform3iv(location, value)",ivec4:"uniform4iv(location, value)",bool:"uniform1iv(location, value)",bvec2:"uniform2iv(location, value)",bvec3:"uniform3iv(location, value)",bvec4:"uniform4iv(location, value)",sampler2D:"uniform1iv(location, value)"};t.exports=n},function(t,e){var n=function(t){return r[t]},r={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};t.exports=n},function(t,e){var n=function(t,e){return"precision"!==t.substring(0,9)?"precision "+e+" float;\n"+t:t};t.exports=n},function(t,e,n){"use strict";
1e.__esModule=!0,e.default={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(244),s=n(110),u=r(s),c=n(181),h=n(27),l=r(h),f=n(5),d=function(){function t(e,n,r,o,s){i(this,t),"number"===typeof e&&(e=Object.assign({width:e,height:n||l.default.RENDER_OPTIONS.height,forceCanvas:!!o,sharedTicker:!!s},r)),this._options=e=Object.assign({autoStart:!0,sharedTicker:!1,forceCanvas:!1,sharedLoader:!1},e),this.renderer=(0,a.autoDetectRenderer)(e),this.stage=new u.default,this._ticker=null,this.ticker=e.sharedTicker?c.shared:new c.Ticker,e.autoStart&&this.start()}return t.prototype.render=function(){this.renderer.render(this.stage)},t.prototype.stop=function(){this._ticker.stop()},t.prototype.start=function(){this._ticker.start()},t.prototype.destroy=function(t){var e=this._ticker;this.ticker=null,e.destroy(),this.stage.destroy(),this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},o(t,[{key:"ticker",set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,f.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}},{key:"view",get:function(){return this.renderer.view}},{key:"screen",get:function(){return this.renderer.screen}}]),t}();e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,r){var i=t&&t.forceCanvas;return void 0!==r&&(i=r),!i&&a.isWebGLSupported()?new h.default(t,e,n):new u.default(t,e,n)}e.__esModule=!0,e.autoDetectRenderer=i;var o=n(11),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=n(111),u=r(s),c=n(133),h=r(c)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(59),c=r(u),h=n(5),l=n(27),f=r(l),d=n(247),p=r(d),g=n(246),_=r(g),m=n(173),y=r(m),v=n(29),b=function(t){function e(){i(this,e);var n=o(this,t.call(this)),r=f.default.TRANSFORM_MODE===h.TRANSFORM_MODE.STATIC?p.default:_.default;return n.tempDisplayObjectParent=null,n.transform=new r,n.alpha=1,n.visible=!0,n.renderable=!0,n.parent=null,n.worldAlpha=1,n.filterArea=null,n._filters=null,n._enabledFilters=null,n._bounds=new y.default,n._boundsID=0,n._lastBoundsID=-1,n._boundsRect=null,n._localBoundsRect=null,n._mask=null,n._destroyed=!1,n}return a(e,t),e.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new v.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new v.Rectangle),t=this._localBoundsRect);var r=this.getBounds(!1,t);return this.parent=n,this.transform=e,r},e.prototype.toGlobal=function(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,n,r){return e&&(t=e.toGlobal(t,n,r)),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=n||1,this.scale.y=r||1,this.rotation=i,this.skew.x=o,this.skew.y=a,this.pivot.x=s,this.pivot.y=u,this},e.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},s(e,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},{key:"scale",get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(c.default);e.default=b,b.prototype.displayObjectUpdateTransform=b.prototype.updateTransform},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(29),u=n(174),c=function(t){return t&&t.__esModule?t:{default:t}}(u),h=function(t){function e(){r(this,e);var n=i(this,t.call(this));return n.position=new s.Point(0,0),n.scale=new s.Point(1,1),n.skew=new s.ObservablePoint(n.updateSkew,n,0,0),n.pivot=new s.Point(0,0),n._rotation=0,n._cx=1,n._sx=0,n._cy=0,n._sy=1,n}return o(e,t),e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x)},e.prototype.updateLocalTransform=function(){var t=this.localTransform;t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d)},e.prototype.updateTransform=function(t){var e=this.localTransform;e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d);
1var n=t.worldTransform,r=this.worldTransform;r.a=e.a*n.a+e.b*n.c,r.b=e.a*n.b+e.b*n.d,r.c=e.c*n.a+e.d*n.c,r.d=e.c*n.b+e.d*n.d,r.tx=e.tx*n.a+e.ty*n.c+n.tx,r.ty=e.tx*n.b+e.ty*n.d+n.ty,this._worldID++},e.prototype.setFromMatrix=function(t){t.decompose(this)},a(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(c.default);e.default=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(29),u=n(174),c=function(t){return t&&t.__esModule?t:{default:t}}(u),h=function(t){function e(){r(this,e);var n=i(this,t.call(this));return n.position=new s.ObservablePoint(n.onChange,n,0,0),n.scale=new s.ObservablePoint(n.onChange,n,1,1),n.pivot=new s.ObservablePoint(n.onChange,n,0,0),n.skew=new s.ObservablePoint(n.updateSkew,n,0,0),n._rotation=0,n._cx=1,n._sx=0,n._cy=0,n._sy=1,n._localID=0,n._currentLocalID=0,n}return o(e,t),e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x),this._localID++},e.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale._x,t.b=this._sx*this.scale._x,t.c=this._cy*this.scale._y,t.d=this._sy*this.scale._y,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale._x,e.b=this._sx*this.scale._x,e.c=this._cy*this.scale._y,e.d=this._sy*this.scale._y,e.tx=this.position._x-(this.pivot._x*e.a+this.pivot._y*e.c),e.ty=this.position._y-(this.pivot._x*e.b+this.pivot._y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var n=t.worldTransform,r=this.worldTransform;r.a=e.a*n.a+e.b*n.c,r.b=e.a*n.b+e.b*n.d,r.c=e.c*n.a+e.d*n.c,r.d=e.c*n.b+e.d*n.d,r.tx=e.tx*n.a+e.ty*n.c+n.tx,r.ty=e.tx*n.b+e.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},a(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(c.default);e.default=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(e,n,i,o,a,s,u,c){r(this,t),this.lineWidth=e,this.nativeLines=u,this.lineColor=n,this.lineAlpha=i,this._lineTint=n,this.fillColor=o,this.fillAlpha=a,this._fillTint=o,this.fill=s,this.holes=[],this.shape=c,this.type=c.type}return t.prototype.clone=function(){return new t(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.nativeLines,this.shape)},t.prototype.addHole=function(t){this.holes.push(t)},t.prototype.destroy=function(){this.shape=null,this.holes=null},t}();e.default=i},function(t,e,n){"use strict";function r(t){return t<0?-1:t>0?1:0}e.__esModule=!0;var i=n(175),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],s=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],u=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],c=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],h=[],l=[];!function(){for(var t=0;t<16;t++){var e=[];l.push(e);for(var n=0;n<16;n++)for(var i=r(a[t]*a[n]+u[t]*s[n]),f=r(s[t]*a[n]+c[t]*s[n]),d=r(a[t]*u[n]+u[t]*c[n]),p=r(s[t]*u[n]+c[t]*c[n]),g=0;g<16;g++)if(a[g]===i&&s[g]===f&&u[g]===d&&c[g]===p){e.push(g);break}}for(var _=0;_<16;_++){var m=new o.default;m.set(a[_],s[_],u[_],c[_],0,0),h.push(m)}}();var f={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return a[t]},uY:function(t){return s[t]},vX:function(t){return u[t]},vY:function(t){return c[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return l[t][e]},sub:function(t,e){return l[t][f.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?f.S:f.N:2*Math.abs(e)<=Math.abs(t)?t>0?f.E:f.W:e>0?t>0?f.SE:f.SW:t>0?f.NE:f.NW},matrixAppendRotationInv:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=h[f.inv(e)];i.tx=n,i.ty=r,t.append(i)}};e.default=f},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this._x=i,this._y=o,this.cb=e,this.scope=n}return t.prototype.set=function(t,e){var n=t||0,r=e||(0!==e?n:0);this._x===n&&this._y===r||(this._x=n,this._y=r,this.cb.call(this.scope))},t.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))},i(t,[{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t}();e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(11),c=n(29),h=n(5),l=n(27),f=r(l),d=n(110),p=r(d),g=n(180),_=r(g),m=n(59),y=r(m),v=new c.Matrix,b=function(t){function e(n,r,a,s){i(this,e);var l=o(this,t.call(this));return(0,u.sayHello)(n),"number"===typeof r&&(r=Object.assign({width:r,height:a||f.default.RENDER_OPTIONS.height},s)),r=Object.assign({},f.default.RENDER_OPTIONS,r),l.options=r,l.type=h.RENDERER_TYPE.UNKNOWN,l.screen=new c.Rectangle(0,0,r.width,r.height),l.view=r.view||document.createElement("canvas"),l.resolution=r.resolution||f.default.RESOLUTION,l.transparent=r.transparent,l.autoResize=r.autoResize||!1,l.blendModes=null,l.preserveDrawingBuffer=r.preserveDrawingBuffer,l.clearBeforeRender=r.clearBeforeRender,l.roundPixels=r.roundPixels,l._backgroundColor=0,l._backgroundColorRgba=[0,0,0,0],l._backgroundColorString="#000000",l.backgroundColor=r.backgroundColor||l._backgroundColor,l._tempDisplayObjectParent=new p.default,l._lastObjectRendered=l._tempDisplayObjectParent,l}return a(e,t),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoResize&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,n){var r=t.getLocalBounds(),i=_.default.create(0|r.width,0|r.height,e,n);return v.tx=-r.x,v.ty=-r.y,this.render(t,i,!1,v,!0),i},e.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=h.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},s(e,[{key:"width",get:function(){return this.view.width}},{key:"height",get:function(){return this.view.height}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,u.hex2string)(t),(0,u.hex2rgb)(t,this._backgroundColorRgba)}}]),e}(y.default);e.default=b},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(27),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(e,n,i){r(this,t),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=i||a.default.RESOLUTION,this.resize(e,n)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},i(t,[{key:"width",get:function(){return this.canvas.width}
1,set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t){var e=document.createElement("canvas");e.width=6,e.height=1;var n=e.getContext("2d");return n.fillStyle=t,n.fillRect(0,0,6,1),e}function i(){if("undefined"===typeof document)return!1;var t=r("#ff00ff"),e=r("#ffff00"),n=document.createElement("canvas");n.width=6,n.height=1;var i=n.getContext("2d");i.globalCompositeOperation="multiply",i.drawImage(t,0,0),i.drawImage(e,2,0);var o=i.getImageData(2,0,1,1);if(!o)return!1;var a=o.data;return 255===a[0]&&0===a[1]&&0===a[2]}e.__esModule=!0,e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(543),s=r(a),u=n(11),c=n(5),h=n(27),l=r(h),f={},d=function(){function t(e,n,r){i(this,t),this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=n||t.defaultFragmentSrc,this._blendMode=c.BLEND_MODES.NORMAL,this.uniformData=r||(0,s.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={};for(var o in this.uniformData)this.uniforms[o]=this.uniformData[o].value,this.uniformData[o].type&&(this.uniformData[o].type=this.uniformData[o].type.toLowerCase());this.glShaders={},f[this.vertexSrc+this.fragmentSrc]||(f[this.vertexSrc+this.fragmentSrc]=(0,u.uid)()),this.glShaderKey=f[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=l.default.RESOLUTION,this.enabled=!0,this.autoFit=!0}return t.prototype.apply=function(t,e,n,r,i){t.applyFilter(this,e,n,r)},o(t,[{key:"blendMode",get:function(){return this._blendMode},set:function(t){this._blendMode=t}}],[{key:"defaultVertexSrc",get:function(){return["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);"," vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;"," vTextureCoord = aTextureCoord ;","}"].join("\n")}},{key:"defaultFragmentSrc",get:function(){return["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){"," vec4 masky = texture2D(filterSampler, vFilterCoord);"," vec4 sample = texture2D(uSampler, vTextureCoord);"," vec4 color;"," if(mod(vFilterCoord.x, 1.0) > 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")}}]),t}();e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(254),u=r(s),c=n(29),h=(n(60),n(260)),l=r(h),f=function(t){function e(n){i(this,e);var r=new c.Matrix,a=o(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n\n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n"));return n.renderable=!1,a.maskSprite=n,a.maskMatrix=r,a}return a(e,t),e.prototype.apply=function(t,e,n){var r=this.maskSprite,i=this.maskSprite.texture;i.valid&&(i.transform||(i.transform=new l.default(i,0)),i.transform.update(),this.uniforms.mask=i,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,r).prepend(i.transform.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=i.transform.uClampFrame,t.applyFilter(this,e,n))},e}(u.default);e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=n(47),a=r(o),s=n(182),u=r(s),c=function(){function t(e,n){i(this,t),this.gl=e,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var r=0;r<4;r++)this.interleaved[4*r]=this.vertices[2*r],this.interleaved[4*r+1]=this.vertices[2*r+1],this.interleaved[4*r+2]=this.uvs[2*r],this.interleaved[4*r+3]=this.uvs[2*r+1];this.indices=(0,u.default)(1),this.vertexBuffer=a.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=a.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new a.default.VertexArrayObject(e,n)}return t.prototype.initVao=function(t){this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,t.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,t.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},t.prototype.map=function(t,e){var n=0,r=0;return this.uvs[0]=n,this.uvs[1]=r,this.uvs[2]=n+e.width/t.width,this.uvs[3]=r,this.uvs[4]=n+e.width/t.width,this.uvs[5]=r+e.height/t.height,this.uvs[6]=n,this.uvs[7]=r+e.height/t.height,n=e.x,r=e.y,this.vertices[0]=n,this.vertices[1]=r,this.vertices[2]=n+e.width,this.vertices[3]=r,this.vertices[4]=n+e.width,this.vertices[5]=r+e.height,this.vertices[6]=n,this.vertices[7]=r+e.height,this},t.prototype.upload=function(){for(var t=0;t<4;t++)this.interleaved[4*t]=this.vertices[2*t],this.interleaved[4*t+1]=this.vertices[2*t+1],this.interleaved[4*t+2]=this.uvs[2*t],this.interleaved[4*t+3]=this.uvs[2*t+1];return this.vertexBuffer.upload(this.interleaved),this},t.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t}();e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(e,n,i,o,a,s,u,c,h){r(this,t),this.text=e,this.style=n,this.width=i,this.height=o,this.lines=a,this.lineWidths=s,this.lineHeight=u,this.maxLineWidth=c,this.fontProperties=h}return t.measureText=function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t._canvas;r=r||n.wordWrap;var o=n.toFontString(),a=t.measureFont(o),s=i.getContext("2d");s.font=o;for(var u=r?t.wordWrap(e,n,i):e,c=u.split(/(?:\r\n|\r|\n)/),h=new Array(c.length),l=0,f=0;f<c.length;f++){var d=s.measureText(c[f]).width+(c[f].length-1)*n.letterSpacing;h[f]=d,l=Math.max(l,d)}var p=l+n.strokeThickness;n.dropShadow&&(p+=n.dropShadowDistance);var g=n.lineHeight||a.fontSize+n.strokeThickness,_=Math.max(g,a.fontSize+n.strokeThickness)+(c.length-1)*(g+n.leading);return n.dropShadow&&(_+=n.dropShadowDistance),new t(e,n,p,_,c,h,g+n.leading,l,a)},t.wordWrap=function(e,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t._canvas,i=r.getContext("2d"),o="",a=e.split("\n"),s=n.wordWrapWidth,u={},c=0;c<a.length;c++){for(var h=s,l=a[c].split(" "),f=0;f<l.length;f++){var d=i.measureText(l[f]).width;if(n.breakWords&&d>s)for(var p=l[f].split(""),g=0;g<p.length;g++){var _=p[g],m=u[_];void 0===m&&(m=i.measureText(_).width,u[_]=m),m>h?(o+="\n"+_,h=s-m):(0===g&&(o+=" "),o+=_,h-=m)}else{var y=d+i.measureText(" ").width;0===f||y>h?(f>0&&(o+="\n"),o+=l[f],h=s-d):(h-=y,o+=" "+l[f])}}c<a.length-1&&(o+="\n")}return o},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var n={},r=t._canvas,i=t._context;i.font=e;var o=Math.ceil(i.measureText("|M\xc9q").width),a=Math.ceil(i.measureText("M").width),s=2*a;a=1.4*a|0,r.width=o,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,o,s),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText("|M\xc9q",0,a);var u=i.getImageData(0,0,o,s).data,c=u.length,h=4*o,l=0,f=0,d=!1;for(l=0;l<a;++l){for(var p=0;p<h;p+=4)if(255!==u[f+p]){d=!0;break}if(d)break;f+=h}for(n.ascent=a-l,f=c-h,d=!1,l=s;l>a;--l){for(var g=0;g<h;g+=4)if(255!==u[f+g]){d=!0;break}if(d)break;f-=h}return n.descent=l-a,n.fontSize=n.ascent+n.descent,t._fonts[e]=n,n},t}();e.default=i;var o=document.createElement("canvas");o.width=o.height=10,i._canvas=o,i._context=o.getContext("2d"),i._fonts={}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return"number"===typeof t?(0,c.hex2string)(t):("string"===typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function o(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=i(t[e]);return t}return i(t)}function a(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(5),c=n(11),h={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:u.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,wordWrap:!1,wordWrapWidth:100,leading:0},l=function(){function t(e){r(this,t),this.styleID=0,Object.assign(this,h,e)}return t.prototype.clone=function(){var e={};for(var n in h)e[n]=this[n];return new t(e)},t.prototype.reset=function(){Object.assign(this,h)},t.prototype.toFontString=function(){var t="number"===typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var n=e.length-1;n>=0;n--){var r=e[n].trim();/([\"\'])[^\'\"]+\1/.test(r)||(r='"'+r+'"'),e[n]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},s(t,[{key:"align",get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords}
1,set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAlpha",get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(t){var e=o(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(t){var e=o(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fillGradientStops",get:function(){return this._fillGradientStops},set:function(t){a(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"leading",get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(t){var e=o(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"trim",get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t}();e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(102),u=r(s),c=n(27),h=r(c),l=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=arguments[2],s=arguments[3];i(this,e);var u=o(this,t.call(this,null,a));return u.resolution=s||h.default.RESOLUTION,u.width=Math.ceil(n),u.height=Math.ceil(r),u.realWidth=u.width*u.resolution,u.realHeight=u.height*u.resolution,u.scaleMode=void 0!==a?a:h.default.SCALE_MODE,u.hasLoaded=!0,u._glRenderTargets={},u._canvasRenderTarget=null,u.valid=!1,u}return a(e,t),e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(e),t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit
1("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(u.default);e.default=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(175),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=new a.default,u=function(){function t(e,n){r(this,t),this._texture=e,this.mapCoord=new a.default,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._lastTextureID=-1,this.clampOffset=0,this.clampMargin="undefined"===typeof n?.5:n}return t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var n=this.mapCoord,r=0;r<t.length;r+=2){var i=t[r],o=t[r+1];e[r]=i*n.a+o*n.c+n.tx,e[r+1]=i*n.b+o*n.d+n.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._lastTextureID===e._updateID)return!1;this._lastTextureID=e._updateID;var n=e._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);var r=e.orig,i=e.trim;i&&(s.set(r.width/i.width,0,0,r.height/i.height,-i.x/i.width,-i.y/i.height),this.mapCoord.append(s));var o=e.baseTexture,a=this.uClampFrame,u=this.clampMargin/o.resolution,c=this.clampOffset;return a[0]=(e._frame.x+u+c)/o.width,a[1]=(e._frame.y+u+c)/o.height,a[2]=(e._frame.x+e._frame.width-u+c)/o.width,a[3]=(e._frame.y+e._frame.height-u+c)/o.height,this.uClampOffset[0]=c/o.realWidth,this.uClampOffset[1]=c/o.realHeight,!0},i(t,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture=t,this._lastTextureID=-1}}]),t}();e.default=u},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(249),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=function(){function t(){r(this,t),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return t.prototype.set=function(t,e,n){var r=e.width,i=e.height;if(n){var a=t.width/2/r,s=t.height/2/i,u=t.x/r+a,c=t.y/i+s;n=o.default.add(n,o.default.NW),this.x0=u+a*o.default.uX(n),this.y0=c+s*o.default.uY(n),n=o.default.add(n,2),this.x1=u+a*o.default.uX(n),this.y1=c+s*o.default.uY(n),n=o.default.add(n,2),this.x2=u+a*o.default.uX(n),this.y2=c+s*o.default.uY(n),n=o.default.add(n,2),this.x3=u+a*o.default.uX(n),this.y3=c+s*o.default.uY(n)}else this.x0=t.x/r,this.y0=t.y/i,this.x1=(t.x+t.width)/r,this.y1=t.y/i,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/i,this.x3=t.x/r,this.y3=(t.y+t.height)/i;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535},t}();e.default=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var n=document.createElement("source");return n.src=t,n.type=e,n}e.__esModule=!0;var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(102),h=r(c),l=n(11),f=n(181),d=n(5),p=n(263),g=r(p),_=function(t){function e(n,r){if(i(this,e),!n)throw new Error("No video source element specified.");(n.readyState===n.HAVE_ENOUGH_DATA||n.readyState===n.HAVE_FUTURE_DATA)&&n.width&&n.height&&(n.complete=!0);var a=o(this,t.call(this,n,r));return a.width=n.videoWidth,a.height=n.videoHeight,a._autoUpdate=!0,a._isAutoUpdating=!1,a.autoPlay=!0,a.update=a.update.bind(a),a._onCanPlay=a._onCanPlay.bind(a),n.addEventListener("play",a._onPlayStart.bind(a)),n.addEventListener("pause",a._onPlayStop.bind(a)),a.hasLoaded=!1,a.__loaded=!1,a._isSourceReady()?a._onCanPlay():(n.addEventListener("canplay",a._onCanPlay),n.addEventListener("canplaythrough",a._onCanPlay)),a}return a(e,t),e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(f.shared.add(this.update,this,d.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(f.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit
1("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},e.prototype.destroy=function(){this._isAutoUpdating&&f.shared.remove(this.update,this),this.source&&this.source._pixiId&&(h.default.removeFromCache(this.source._pixiId),delete this.source._pixiId),t.prototype.destroy.call(this)},e.fromVideo=function(t,n){t._pixiId||(t._pixiId="video_"+(0,l.uid)());var r=l.BaseTextureCache[t._pixiId];return r||(r=new e(t,n),h.default.addToCache(r,t._pixiId)),r},e.fromUrl=function(t,n,r){var i=document.createElement("video");i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","");var o=Array.isArray(t)?t[0].src||t[0]:t.src||t;if(void 0===r&&0!==o.indexOf("data:")?i.crossOrigin=(0,g.default)(o):r&&(i.crossOrigin="string"===typeof r?r:"anonymous"),Array.isArray(t))for(var a=0;a<t.length;++a)i.appendChild(s(t[a].src||t[a],t[a].mime));else i.appendChild(s(o,t.mime));return i.load(),e.fromVideo(i,n)},u(e,[{key:"autoUpdate",get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(f.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(f.shared.add(this.update,this,d.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0))}}]),e}(h.default);e.default=_,_.fromUrls=_.fromUrl},function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,a||(a=document.createElement("a")),a.href=t,t=o.default.parse(a.href);var n=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&n&&t.protocol===e.protocol?"":"anonymous"}e.__esModule=!0,e.default=r;var i=n(304),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=void 0},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.BitmapText=e.TilingSpriteRenderer=e.TilingSprite=e.AnimatedSprite=void 0;var i=n(570);Object.defineProperty(e,"AnimatedSprite",{enumerable:!0,get:function(){return r(i).default}});var o=n(572);Object.defineProperty(e,"TilingSprite",{enumerable:!0,get:function(){return r(o).default}});var a=n(576);Object.defineProperty(e,"TilingSpriteRenderer",{enumerable:!0,get:function(){return r(a).default}});var s=n(571);Object.defineProperty(e,"BitmapText",{enumerable:!0,get:function(){return r(s).default}}),n(573),n(574),n(575)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(6),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),h=n(268),l=r(h),f=n(267),d=r(f),p=n(269),g=r(p),_=function(t){function e(n,r,a,s){i(this,e),s=s||5;var u=(0,l.default)(s,!0),h=(0,d.default)(s),f=o(this,t.call(this,u,h));return f.resolution=a||c.settings.RESOLUTION,f._quality=0,f.quality=r||4,f.strength=n||8,f.firstRun=!0,f}return a(e,t),e.prototype.apply=function(t,e,n,r){if(this.firstRun){var i=t.renderer.gl,o=(0,g.default)(i);this.vertexSrc=(0,l.default)(o,!0),this.fragmentSrc=(0,d.default)(o),this.firstRun=!1}if(this.uniforms.strength=1/n.size.width*(n.size.width/e.size.width),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,n,r);else{for(var a=t.getRenderTarget(!0),s=e,u=a,c=0;c<this.passes-1;c++){t.applyFilter(this,s,u,!0);var h=u;u=s,s=h}t.applyFilter(this,s,n,r),t.returnRenderTarget(a)}},s(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(c.Filter);e.default=_},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(6),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),h=n(268),l=r(h),f=n(267),d=r(f),p=n(269),g=r(p),_=function(t){function e(n,r,a,s){i(this,e),s=s||5;var u=(0,l.default)(s,!1),h=(0,d.default)(s),f=o(this,t.call(this,u,h));return f.resolution=a||c.settings.RESOLUTION,f._quality=0,f.quality=r||4,f.strength=n||8,f.firstRun=!0,f}return a(e,t),e.prototype.apply=function(t,e,n,r){if(this.firstRun){var i=t.renderer.gl,o=(0,g.default)(i);this.vertexSrc=(0,l.default)(o,!1),this.fragmentSrc=(0,d.default)(o),this.firstRun=!1}if(this.uniforms.strength=1/n.size.height*(n.size.height/e.size.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,n,r);else{for(var a=t.getRenderTarget(!0),s=e,u=a,c=0;c<this.passes-1;c++){t.applyFilter(this,s,u,!0);var h=u;u=s,s=h}t.applyFilter(this,s,n,r),t.returnRenderTarget(a)}},s(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(c.Filter);e.default=_},function(t,e,n){"use strict";function r(t){for(var e=i[t],n=e.length,r=o,a="",s="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;",u=void 0,c=0;c<t;c++){var h=s.replace("%index%",c);u=c,c>=n&&(u=t-c-1),h=h.replace("%value%",e[u]),a+=h,a+="\n"}return r=r.replace("%blur%",a),r=r.replace("%size%",t)}e.__esModule=!0,e.default=r;var i={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},o=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},function(t,e,n){"use strict";function r(t,e){var n=Math.ceil(t/2),r=i,o="",a=void 0;a=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var u=a.replace("%index%",s);u=u.replace("%sampleIndex%",s-(n-1)+".0"),o+=u,o+="\n"}return r=r.replace("%blur%",o),r=r.replace("%size%",t)}e.__esModule=!0,e.default=r;var i=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n")},function(t,e,n){"use strict";function r(t){for(var e=t.getParameter(t.MAX_VARYING_VECTORS),n=15;n>e;)n-=2;return n}e.__esModule=!0,e.default=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=function(){function t(){r(this,t),this.global=new a.Point,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return t.prototype.getLocalPosition=function(t,e,n){return t.worldTransform.applyInverse(n||this.global,e)},t.prototype._copyEvent=function(t){t.isPrimary&&(this.isPrimary=!0),this.button=t.button,this.buttons=t.buttons,this.width=t.width,this.height=t.height,this.tiltX=t.tiltX,this.tiltY=t.tiltY,this.pointerType=t.pointerType,this.pressure=t.pressure,this.rotationAngle=t.rotationAngle,this.twist=t.twist||0,this.tangentialPressure=t.tangentialPressure||0},t.prototype._reset=function(){this.isPrimary=!1},i(t,[{key:"pointerId",get:function(){return this.identifier}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(){r(this,t),this.stopped=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0},t.prototype._reset=function(){this.stopped=!1,this.currentTarget=null,this.target=null},t}();e.default=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){r(this,t),this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},i(t,[{key:"pointerId",get:function(){return this._pointerId}},{key:"flags",get:function(){return this._flags},set:function(t){this._flags=t}},{key:"none",get:function(){return this._flags===this.constructor.FLAGS.NONE}},{key:"over",get:function(){return 0!==(this._flags&this.constructor.FLAGS.OVER)},set:function(t){this._doSet(this.constructor.FLAGS.OVER,t)}},{key:"rightDown",get:function(){return 0!==(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,t)}},{key:"leftDown",get:function(){return 0!==(this._flags&this.constructor.FLAGS.LEFT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.LEFT_DOWN,t)}}]),t}();e.default=o,o.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4})},function(t,e,n){"use strict";
1e.__esModule=!0,e.default={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0}},function(t,e,n){"use strict";function r(t,e){t.bitmapFont=u.BitmapText.registerFont(t.data,e)}e.__esModule=!0,e.parse=r,e.default=function(){return function(t,e){if(!t.data||t.type!==s.Resource.TYPE.XML)return void e();if(0===t.data.getElementsByTagName("page").length||0===t.data.getElementsByTagName("info").length||null===t.data.getElementsByTagName("info")[0].getAttribute("face"))return void e();var n=t.isDataUrl?"":o.dirname(t.url);t.isDataUrl&&("."===n&&(n=""),this.baseUrl&&n&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(n+="/")),(n=n.replace(this.baseUrl,""))&&"/"!==n.charAt(n.length-1)&&(n+="/");var i=n+t.data.getElementsByTagName("page")[0].getAttribute("file");if(a.utils.TextureCache[i])r(t,a.utils.TextureCache[i]),e();else{var u={crossOrigin:t.crossOrigin,loadType:s.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t};this.add(t.name+"_image",i,u,function(n){r(t,n.texture),e()})}}};var i=n(60),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),a=n(6),s=n(114),u=n(264)},function(t,e,n){"use strict";function r(t,e){return t.isDataUrl?t.data.meta.image:a.default.resolve(t.url.replace(e,""),t.data.meta.image)}e.__esModule=!0,e.default=function(){return function(t,e){var n=t.name+"_image";if(!t.data||t.type!==i.Resource.TYPE.JSON||!t.data.frames||this.resources[n])return void e();var o={crossOrigin:t.crossOrigin,loadType:i.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t},a=r(t,this.baseUrl);this.add(n,a,o,function(n){var r=new s.Spritesheet(n.texture.baseTexture,t.data,t.url);r.parse(function(){t.spritesheet=r,t.textures=r.textures,e()})})}},e.getResourcePath=r;var i=n(114),o=n(304),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=n(6)},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(){return function(t,e){t.data&&t.type===r.Resource.TYPE.IMAGE&&(t.texture=o.default.fromLoader(t.data,t.url,t.name)),e()}};var r=n(114),i=n(76),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(113),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n,o,a){r(this,e);var u=i(this,t.call(this,n));return u._ready=!0,u.verticesX=o||10,u.verticesY=a||10,u.drawMode=s.default.DRAW_MODES.TRIANGLES,u.refresh(),u}return o(e,t),e.prototype._refresh=function(){for(var t=this._texture,e=this.verticesX*this.verticesY,n=[],r=[],i=[],o=[],a=this.verticesX-1,s=this.verticesY-1,u=t.width/a,c=t.height/s,h=0;h<e;h++){var l=h%this.verticesX,f=h/this.verticesX|0;n.push(l*u,f*c),i.push(l/a,f/s)}for(var d=a*s,p=0;p<d;p++){var g=p%a,_=p/a|0,m=_*this.verticesX+g,y=_*this.verticesX+g+1,v=(_+1)*this.verticesX+g,b=(_+1)*this.verticesX+g+1;o.push(m,y,v),o.push(y,b,v)}this.vertices=new Float32Array(n),this.uvs=new Float32Array(i),this.colors=new Float32Array(r),this.indices=new Uint16Array(o),this.dirty++,this.indexDirty++,this.multiplyUvs()},e.prototype._onTextureUpdate=function(){s.default.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},e}(s.default);e.default=u},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(e){r(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();e.default=i},function(t,e,n){"use strict";function r(){}function i(t){try{return t.then}catch(t){return m=t,y}}function o(t,e){try{return t(e)}catch(t){return m=t,y}}function a(t,e,n){try{t(e,n)}catch(t){return m=t,y}}function s(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,t!==r&&g(t,this)}function u(t,e,n){return new t.constructor(function(i,o){var a=new s(r);a.then(i,o),c(t,new p(e,n,a))})}function c(t,e){for(;3===t._81;)t=t._65;if(s._10&&s._10(t),0===t._81)return 0===t._45?(t._45=1,void(t._54=e)):1===t._45?(t._45=2,void(t._54=[t._54,e])):void t._54.push(e);h(t,e)}function h(t,e){_(function(){var n=1===t._81?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._81?l(e.promise,t._65):f(e.promise,t._65));var r=o(n,t._65);r===y?f(e.promise,m):l(e.promise,r)})}function l(t,e){if(e===t)return f(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"===typeof e||"function"===typeof e)){var n=i(e);if(n===y)return f(t,m);if(n===t.then&&e instanceof s)return t._81=3,t._65=e,void d(t);if("function"===typeof n)return void g(n.bind(e),t)}t._81=1,t._65=e,d(t)}function f(t,e){t._81=2,t._65=e,s._97&&s._97(t,e),d(t)}function d(t){if(1===t._45&&(c(t,t._54),t._54=null),2===t._45){for(var e=0;e<t._54.length;e++)c(t,t._54[e]);t._54=null}}function p(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function g(t,e){var n=!1,r=a(t,function(t){n||(n=!0,l(e,t))},function(t){n||(n=!0,f(e,t))});n||r!==y||(n=!0,f(e,m))}var _=n(309),m=null,y={};t.exports=s,s._10=null,s._97=null,s._61=r,s.prototype.then=function(t,e){if(this.constructor!==s)return u(this,t,e);var n=new s(r);return c(this,new p(t,e,n)),n}},function(t,e,n){"use strict";function r(){}function i(t,e,n,r){var i=0,o=t.length;!function a(s){if(s||i===o)return void(n&&n(s));r?setTimeout(function(){e(t[i++],a)}
1,1):e(t[i++],a)}()}function o(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function a(t,e){function n(t,e,n){if(null!=n&&"function"!==typeof n)throw new Error("task callback must be a function");if(s.started=!0,null==t&&s.idle())return void setTimeout(function(){return s.drain()},1);var i={data:t,callback:"function"===typeof n?n:r};e?s._tasks.unshift(i):s._tasks.push(i),setTimeout(function(){return s.process()},1)}function i(t){return function(){a-=1,t.callback.apply(t,arguments),null!=arguments[0]&&s.error(arguments[0],t.data),a<=s.concurrency-s.buffer&&s.unsaturated(),s.idle()&&s.drain(),s.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var a=0,s={_tasks:[],concurrency:e,saturated:r,unsaturated:r,buffer:e/4,empty:r,drain:r,error:r,started:!1,paused:!1,push:function(t,e){n(t,!1,e)},kill:function(){a=0,s.drain=r,s.started=!1,s._tasks=[]},unshift:function(t,e){n(t,!0,e)},process:function(){for(;!s.paused&&a<s.concurrency&&s._tasks.length;){var e=s._tasks.shift();0===s._tasks.length&&s.empty(),a+=1,a===s.concurrency&&s.saturated(),t(e.data,o(i(e)))}},length:function(){return s._tasks.length},running:function(){return a},idle:function(){return s._tasks.length+a===0},pause:function(){!0!==s.paused&&(s.paused=!0)},resume:function(){if(!1!==s.paused){s.paused=!1;for(var t=1;t<=s.concurrency;t++)s.process()}}};return s}e.__esModule=!0,e.eachSeries=i,e.queue=a},function(t,e,n){"use strict";function r(t){for(var e="",n=0;n<t.length;){for(var r=[0,0,0],o=[0,0,0,0],a=0;a<r.length;++a)n<t.length?r[a]=255&t.charCodeAt(n++):r[a]=0;o[0]=r[0]>>2,o[1]=(3&r[0])<<4|r[1]>>4,o[2]=(15&r[1])<<2|r[2]>>6,o[3]=63&r[2];switch(n-(t.length-1)){case 2:o[3]=64,o[2]=64;break;case 1:o[3]=64}for(var s=0;s<o.length;++s)e+=i.charAt(o[s])}return e}e.__esModule=!0,e.encodeBinary=r;var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(t,e,n){"use strict";function r(t){return null!==t&&"object"===typeof t}t.exports=r},function(t,e,n){"use strict";function r(t){var e=3;return e=t<11?1:t<21&&t>10?2:3,new Map([[i.b.MaxHealth,100+20*t],[i.b.NonCombatHealTime,e],[i.b.CritProbability,.05]])}e.a=r;var i=n(1)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(61),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n){var r=t.call(this,e)||this;return r._duration=n,r}return i(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){this.character.animationController.playState("cast")},e.prototype.updateAction=function(){},e.prototype.endAction=function(){},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return g});var r=n(61),i=n(1),o=n(78),a=n(32),s=n(15),u=n(658),c=n(34),h=n(677),l=n(96),f=n(28),d=n(62),p=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(t){function e(e){var n=t.call(this,e)||this;return n._damageDealer=null,n}return p(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return 1},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){var t=this.character.equipmentController.equipments.get(c.a.Weapon);t?(this._weaponMesh=t.meshes[0],this._weaponBaseScale=t.meshes[0].scaling.x):this._weaponMesh=null,this.character.animationController.playState("stomp")},e.prototype.updateAction=function(){if(this._progress>=a.z)if(this._damageDealer){var t=(this._progress-a.z)/(1-a.z);this._damageDealer.position.set(this._damageStartPos.x+this._damageDir.x*t,this._damageStartPos.y+this._damageDir.y*t,this._damageStartPos.z+this._damageDir.z*t)}else{this._damageStartPos=this.character.position.add(new BABYLON.Vector3(Math.sin(this.character.rotationController.characterRotation)*this.character.boundingRadius,0,Math.cos(this.character.rotationController.characterRotation)*this.character.boundingRadius));var e=this.character.position.add(new BABYLON.Vector3(Math.sin(this.character.rotationController.characterRotation)*(this.character.boundingRadius+this.getDamageDistance()),0,Math.cos(this.character.rotationController.characterRotation)*(this.character.boundingRadius+this.getDamageDistance())));this._damageDir=e.subtract(this._damageStartPos),this._damageDealer=new h.a(this.character.level,{source:this.character,target:this.character,min:this.character.statsController.getStatValue(i.b.MinDamage).final*this.getDamageFactor(),max:this.character.statsController.getStatValue(i.b.MaxDamage).final*this.getDamageFactor(),attackType:o.a.Spell,damageType:o.b.Earth,fromSpell:s.a.Shockwave},this._damageStartPos,a.A),this.character.game.getService(l.a).shakeStrength+=3,this.character.game.getService(l.a).shakeSpeed+=1,this.character.level.soundManager.playOnce("magic_1"),new u.a(this.character,300,this.getDamageDistance()),this.character.team===f.a.Player&&this.character.game.getService(d.a).takeScreenshot(d.b.INTERESTING)}if(this._weaponMesh){var n=3;this._progress<.2?n=1+10*this._progress:this._progress>a.z&&(n=1+(1-this._progress)/2*(1-a.z)),this._weaponMesh.scaling.set(this._weaponBaseScale*n,this._weaponBaseScale*n,this._weaponBaseScale*n)}},e.prototype.endAction=function(){var t=this;this._damageDealer&&this._damageDealer.dispose(),window.setTimeout(function(){t.character.game.getService(l.a).shakeStrength-=3,t.character.game.getService(l.a).shakeSpeed-=1},300),this._weaponMesh&&this._weaponMesh.scaling.set(this._weaponBaseScale,this._weaponBaseScale,this._weaponBaseScale)},e.prototype.getDamageFactor=function(){return a.B},e.prototype.getDamageDistance=function(){return a.C},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(61),i=n(1),o=n(78),a=n(33),s=n(32),u=n(15),c=n(34),h=n(96),l=n(97),f=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(t){function e(e){var n=t.call(this,e)||this;if(!e.targetController.targetCharacter)throw new Error("this spell requires a target character.");return n._target=e.targetController.targetCharacter,n._damageDone=!1,n}return f(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return this.character.statsController.getStatValue(i.b.AttackInterval).final},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){this.character.game.getService(l.a).updateTimeScale(l.b.SlowMotionEffect,.6);var t=this._duration<2?2/this._duration:1;this.character.animationController.playState("smash",t);
1var e=this.character.equipmentController.equipments.get(c.a.Weapon);e?(this._weaponMesh=e.meshes[0],this._weaponBaseScale=e.meshes[0].scaling.x):this._weaponMesh=null},e.prototype.updateAction=function(){if(this._progress>=s.a&&!this._damageDone){if(!this._target.disposed&&this._target.lifeStateController.state===a.a.Alive){this.character.game.getService(l.a).updateTimeScale(l.b.SlowMotionEffect,1);var t=this.character.level.combat.dealDamage({source:this.character,target:this._target,min:this.character.statsController.getStatValue(i.b.MinDamage).final*s.b,max:this.character.statsController.getStatValue(i.b.MaxDamage).final*s.b,attackType:o.a.Spell,damageType:o.b.Physical,fromSpell:u.a.Smash});if(this.character===this.character.level.player)switch(t){case o.c.Dodged:case o.c.Missed:this.character.level.soundManager.playOnce("miss");break;case o.c.NormalHit:case o.c.CritHit:this.character.level.soundManager.playOnce("punch_heavy")}}this._damageDone=!0,this.character.game.getService(h.a).shakeStrength+=10}if(this._weaponMesh){var e=2;this._progress<.2?e=1+5*this._progress:this._progress>s.a&&(e=1+(1-this._progress)/(1-s.a)),this._weaponMesh.scaling.set(this._weaponBaseScale*e,this._weaponBaseScale*e,this._weaponBaseScale*e)}},e.prototype.endAction=function(){this.character.game.getService(l.a).updateTimeScale(l.b.SlowMotionEffect,1),this.character.game.getService(h.a).shakeStrength-=10,this._weaponMesh&&this._weaponMesh.scaling.set(this._weaponBaseScale,this._weaponBaseScale,this._weaponBaseScale)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return p});var r=n(61),i=n(1),o=n(78),a=n(32),s=n(15),u=n(661),c=n(34),h=n(96),l=n(28),f=n(62),d=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(t){function e(e){var n=t.call(this,e)||this;return n._damageDone=!1,n}return d(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return 1},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){var t=this.character.equipmentController.equipments.get(c.a.Weapon);t?(this._weaponMesh=t.meshes[0],this._weaponBaseScale=t.meshes[0].scaling.x):this._weaponMesh=null,this.character.animationController.playState("stomp")},e.prototype.updateAction=function(){if(this._progress>=a.R&&!this._damageDone&&(this.character.level.combat.dealDamageToRadiusAroundSource({source:this.character,target:this.character,min:this.character.statsController.getStatValue(i.b.MinDamage).final*this.getDamageFactor(),max:this.character.statsController.getStatValue(i.b.MaxDamage).final*this.getDamageFactor(),attackType:o.a.Spell,damageType:o.b.Earth,fromSpell:s.a.Stomp},a.S),this._damageDone=!0,this.character.game.getService(h.a).shakeStrength+=20,this.character.game.getService(h.a).shakeSpeed+=1,this.character.level.soundManager.playOnce("spell_stomp"),new u.a(this.character),this.character.team===l.a.Player&&this.character.game.getService(f.a).takeScreenshot(f.b.INTERESTING)),this._weaponMesh){var t=3;this._progress<.2?t=1+10*this._progress:this._progress>a.R&&(t=1+(1-this._progress)/2*(1-a.R)),this._weaponMesh.scaling.set(this._weaponBaseScale*t,this._weaponBaseScale*t,this._weaponBaseScale*t)}},e.prototype.endAction=function(){var t=this;window.setTimeout(function(){t.character.game.getService(h.a).shakeStrength-=20,t.character.game.getService(h.a).shakeSpeed-=1},300),this._weaponMesh&&this._weaponMesh.scaling.set(this._weaponBaseScale,this._weaponBaseScale,this._weaponBaseScale)},e.prototype.getDamageFactor=function(){return a.T},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(61),i=n(663),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r._duration=n,r}return o(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){this.character.animationController.playState("stunned"),this._effect=new i.a(this.character)},e.prototype.updateAction=function(){},e.prototype.endAction=function(){this._effect.dispose()},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return p});var r=n(66),i=n(1),o=n(32),a=n(662),s=n(626),u=n(15),c=n(28),h=n(48),l=n(62),f=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=1,p=function(t){function e(e,n,a,s,c,h,l){void 0===n&&(n=o.F),void 0===a&&(a=o.G),void 0===s&&(s=o.H),void 0===c&&(c=o.I),void 0===h&&(h=d),void 0===l&&(l=o.J);var f=this,p={stat:i.b.Scale,type:i.d.Percentage,value:0};return f=t.call(this,e,"Strong!",r.a.Buff,[{stat:i.b.DamageFactor,type:i.d.Absolute,value:n},{stat:i.b.AttackInterval,type:i.d.Percentage,value:-a},{stat:i.b.MoveSpeed,type:i.d.Percentage,value:-s},p],c,u.a.Strong)||this,f._scaleEffect=p,f._scaleIncrease=h,f._scaleIncreaseAnimationLength=l,f}return f(e,t),e.prototype.startBuff=function(){var t=this;this.character.teamGroup===c.b.PlayerFriendly?this.character.level.soundManager.playOnce("magic_2"):h.a.soundVolume>0&&(this._sound=this.character.level.soundManager.createSound("warning",!0,!0)),this._strongEffe
1ct=new a.a(this.character);var e=new s.a(this.character,this._scaleIncreaseAnimationLength/1e3);e.start(),e.events.once("ended",function(){t.character.game.getService(l.a).takeScreenshot(l.b.AMAZING)})},e.prototype.updateBuff=function(t){this._timeSinceCreated<this._scaleIncreaseAnimationLength?this._scaleEffect.value=this._timeSinceCreated/this._scaleIncreaseAnimationLength*this._scaleIncrease:1e3*this.remainingDuration<this._scaleIncreaseAnimationLength&&(this._scaleEffect.value=1e3*this.remainingDuration/this._scaleIncreaseAnimationLength*this._scaleIncrease)},e.prototype.endBuff=function(){this._sound&&this.character.level.soundManager.putBackIntoPool("warning",this._sound),this._strongEffect&&this._strongEffect.dispose()},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(34),i=n(28),o=n(30),a=n(9),s=n(24),u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(t){function e(e){var n=t.call(this,e)||this;return n._equipments=new Map,n._itemEquippedHandler=function(t,e){t>=a.c&&n.equip(e)},n}return u(e,t),e.prototype.equip=function(t){var e=this;if(t.baseModel.type===r.a.Torso||t.baseModel.type===r.a.Weapon||t.baseModel.type===r.a.Boots||t.baseModel.type===r.a.Helmet){var n=this._equipments.get(t.baseModel.type);n&&n.meshes.forEach(function(t){t.dispose()}),t.statOverrides&&t.statOverrides.forEach(function(t){e._character.statsController.setBaseStat(t.stat,t.value)});var i=this.createMeshForItem(t);this._equipments.set(t.baseModel.type,{item:t,meshes:i}),this._character.events.emit("item_equipped",t)}},Object.defineProperty(e.prototype,"equipments",{get:function(){return this._equipments},enumerable:!0,configurable:!0}),e.prototype.activateComponent=function(){var t=this;this._character.team===i.a.Player&&(this.game.events.on("player_inventory_slot_updated",this._itemEquippedHandler),[r.a.Helmet,r.a.Weapon,r.a.Torso,r.a.Boots].forEach(function(e){var n=t.game.getService(a.a).getEquipment(e);n&&t.equip(n)}))},e.prototype.deactivateComponent=function(){this._equipments.forEach(function(t){t.meshes.forEach(function(t){t.dispose()})}),this._equipments=new Map,this.game.events.off("player_inventory_slot_updated",this._itemEquippedHandler)},e.prototype.disposeComponent=function(){this.game.events.off("player_inventory_slot_updated",this._itemEquippedHandler),this._equipments.forEach(function(t){t.meshes.forEach(function(t){t.dispose()})})},e.prototype.updateComponent=function(t){},e.prototype.createMeshForItem=function(t){return e.loadMeshForEquipment(t,this._character.level.modelManager,this._character.meshInfo)},e.loadMeshForEquipment=function(t,e,n){var i=e.game.getService(a.a).model;switch(t.baseModel.type){case r.a.Weapon:var o=e.createMeshFromModel(t.baseModel.modelId,"equipment_"+t.baseModel.modelId).root;o.alwaysSelectAsActiveMesh=!0;var u=n.bones.get(s.d.RightHand);return o.attachToBone(u.bone,n.meshWithSkeleton),u.postAttach(o),[o];case r.a.Helmet:var o=e.createMeshFromModel(t.baseModel.modelId,"equipment_"+t.baseModel.modelId).root;o.alwaysSelectAsActiveMesh=!0;var c=n.bones.get(s.d.Head);return o.attachToBone(c.bone,n.meshWithSkeleton),c.postAttach(o),[o];case r.a.Torso:var o=e.createMeshFromModel(t.baseModel.modelId+"_"+a.b[i].toLowerCase(),"equipment_"+t.baseModel.modelId).root;o.alwaysSelectAsActiveMesh=!0;var h=n.bones.get(s.d.Body);return o.attachToBone(h.bone,n.meshWithSkeleton),h.postAttach(o),[o];case r.a.Boots:var l=e.createMeshFromModel(t.baseModel.modelId+"_L","equipment_"+t.baseModel.modelId).root;l.alwaysSelectAsActiveMesh=!0;var f=n.bones.get(s.d.LeftFoot);l.attachToBone(f.bone,n.meshWithSkeleton),f.postAttach(l);var d=e.createMeshFromModel(t.baseModel.modelId+"_R","equipment_"+t.baseModel.modelId).root;d.alwaysSelectAsActiveMesh=!0;var p=n.bones.get(s.d.RightFoot);return d.attachToBone(p.bone,n.meshWithSkeleton),p.postAttach(d),[l,d];default:throw new Error("equipment type not supported yet")}},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}
1);var r=n(59),i=(n.n(r),0),o=function(){function t(t){this.character=t,this.id=(i++).toFixed(),this.events=new r.EventEmitter,this._progress=0,this._started=!1}return t.prototype.update=function(t){this.isEnded||(this._started||(this._started=!0,this.startEffect()),this.updateEffect(t),this._progress>=1&&this.end())},Object.defineProperty(t.prototype,"isEnded",{get:function(){return this._progress>=1},enumerable:!0,configurable:!0}),t.prototype.end=function(){this._progress=1,this.endEffect(),this.events.emit("ended")},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return u}),n.d(e,"b",function(){return c});var r=n(104),i=n(22),o=n(33),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=BABYLON.Color3.FromHexString("#b71c1c"),u=function(t){function e(e,n,i,o,a){var u=t.call(this,e.game)||this;u._character=e,u._position=n,u._rotation=i,u._distance=o,u._duration=a;var c=3e3/a;return u._particles=new r.a(e.level,e.level.modelManager.vfxMaterial),u._particles.addParticleGroup({emitRate:c,uvs:new BABYLON.Vector4(.5,.25,.75,.5),life:function(){return u._duration/3},rotate:function(t){0===t.progressInLife&&(t.particle.rotation.x=Math.PI/2,t.particle.rotation.y=-Math.PI/2)},scale:function(t){t.particle.scale.set(u._character.boundingRadius/70,u._character.boundingRadius/70*(1+.5*t.progressInLife),u._character.boundingRadius/70)},translate:function(t){0===t.progressInLife&&(t.particle.position.y=1),t.particle.position.z=u._distance*t.progressInLife},color:function(t){t.particle.color.a=.7*Math.sin(t.progressInLife*Math.PI)+.3,t.particle.color.r=s.r,t.particle.color.g=s.g,t.particle.color.b=s.b}},2),u._particles.addParticleGroup({emitRate:c,uvs:new BABYLON.Vector4(.75,.75,1,1),life:function(){return u._duration/3},rotate:function(t){0===t.progressInLife&&(t.particle.rotation.x=Math.PI/2,t.particle.rotation.y=Math.PI,u._character.level.soundManager.playOnce("warning"),u._character.level.events.emit("spell_warning",t.emitIndex))},scale:function(t){t.particle.scale.set(u._character.boundingRadius/200,u._character.boundingRadius/200,u._character.boundingRadius/200)},translate:function(t){0===t.progressInLife&&(t.particle.position.y=1),t.particle.position.z=u._distance*t.progressInLife},color:function(t){t.particle.color.a=.7*Math.sin(t.progressInLife*Math.PI)+.3,t.particle.color.r=s.r,t.particle.color.g=s.g,t.particle.color.b=s.b}},1),u._particles.start(),u._particles.mesh.position.copyFrom(u._position),u._particles.rotation.set(0,u._rotation,0),u}return a(e,t),e.prototype.updateGameObject=function(t){if(this._character.disposed||!this._character.isActivated()||this._character.lifeStateController.state!==o.a.Alive)return void this.dispose();this._timeSinceCreated/this._duration>=1?this.dispose():this._particles.position.copyFrom(this._position)},e.prototype.disposeGameObject=function(){this._particles.stopThenDispose()},e}(i.a),c=function(t){function e(e,n,i,o){var a=t.call(this,e.game)||this;a._character=e,a._position=n,a._radius=i,a._duration=o;var u=3e3/o;return a._particles=new r.a(e.level,e.level.modelManager.vfxMaterial),a._particles.addParticleGroup({emitRate:u,uvs:new BABYLON.Vector4(.25,.75,.5,1),life:function(){return a._duration/3},rotate:function(t){0===t.progressInLife&&t.particle.rotation.set(Math.PI/2,0,0)},scale:function(t){0===t.progressInLife&&t.particle.scale.set(a._radius/30,a._radius/30,a._radius/30)},color:function(t){t.particle.color.a=.7*Math.sin(t.progressInLife*Math.PI)+.3,t.particle.color.r=s.r,t.particle.color.g=s.g,t.particle.color.b=s.b}},2),a._particles.addParticleGroup({emitRate:u,uvs:new BABYLON.Vector4(.75,.75,1,1),life:function(){return a._duration/3},rotate:function(t){0===t.progressInLife&&(t.particle.rotation.set(Math.PI/2,0,0),a._character.level.soundManager.playOnce("warning"),a._character.level.events.emit("spell_warning",t.emitIndex))},scale:function(t){if(0===t.progressInLife){var e=.005*(t.emitIndex+2);t.particle.scale.set(a._radius*e,a._radius*e,a._radius*e)}},color:function(t){t.particle.color.a=.7*Math.sin(t.progressInLife*Math.PI)+.3,t.particle.color.r=s.r,t.particle.color.g=s.g,t.particle.color.b=s.b}},1),a._particles.start(),a._particles.mesh.position.copyFrom(a._position),a._particles.mesh.rotation.y=3*-Math.PI/4,a}return a(e,t),e.prototype.updateGameObject=function(t){if(this._character.disposed||!this._character.isActivated()||this._character.lifeStateController.state!==o.a.Alive)return void this.dispose();this._timeSinceCreated/this._duration>=1?this.dispose():this._particles.mesh.position.copyFrom(this._position)},e.prototype.disposeGameObject=function(){this._particles.stopThenDispose()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(24),i=function(){function t(){this._values=new Map([[r.a.reset_player_data,0],[r.a.debug_layer,0],[r.a.render_fps,0],[r.a.show_bounding_box,0],[r.a.test_scene_level,0],[r.a.test_character_level,0],[r.a.disable_cooldown,0],[r.a.in_context,1]])}return Object.defineProperty(t.prototype,"keys",{get:function(){return Array.from(this._values.keys())},enumerable:!0,configurable:!0}),t.prototype.getBooleanConfig=function(t){return Boolean(this._values.get(t))},t.prototype.getNumberConfig=function(t){var e=this._values.get(t);return void 0===e?0:e},t.prototype.setConfig=function(t,e){this._values.set(t,e)},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(){function t(){this._pool=new Map}return t.prototype.dispose=function(){this._pool.forEach(function(t){t.forEach(function(t){t.dispose?t.dispose():t.destroy&&t.destroy()})})},t.prototype.add=function(t,e){e.isActivated()&&e.deactivate();var n=this._pool.get(t);n?n.push(e):this._pool.set(t,[e])},t.prototype.fetch=function(t,e){void 0===e&&(e=function(){});var n=this._pool.get(t);if(n&&n.length){var r=n[0];return e(r),r.activate(),n.splice(0,1),r}return null},t}()},function(t,e,n){"use strict";n.d(e,"k",function(){return o}
1),n.d(e,"i",function(){return s}),n.d(e,"h",function(){return c}),n.d(e,"m",function(){return l}),n.d(e,"n",function(){return d}),n.d(e,"j",function(){return g}),n.d(e,"l",function(){return m}),n.d(e,"g",function(){return y}),n.d(e,"f",function(){return v}),n.d(e,"e",function(){return b}),n.d(e,"c",function(){return w}),n.d(e,"a",function(){return x}),n.d(e,"d",function(){return S}),n.d(e,"b",function(){return T});var r=n(24),i=(new Map([[r.c.Earth,["Nunu_Elite"]],[r.c.Fire,["Nunu_Elite"]]]),new Map([[r.c.Earth,["Kiki_Earth"]],[r.c.Fire,["Kiki_Fire"]]])),o=function(t,e){var n=i.get(t),o=n[Math.floor(Math.random()*n.length)];return{id:o,directory:"models/characters/",fileName:o+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(30,30,30)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:1,lastFrame:103,baseSpeed:1}],[r.b.Run,{firstFrame:104,lastFrame:124,baseSpeed:1}],[r.b.Attack1,{firstFrame:128,lastFrame:140,baseSpeed:1}],[r.b.Attack2,{firstFrame:128,lastFrame:140,baseSpeed:1}],[r.b.Hit,{firstFrame:182,lastFrame:199,baseSpeed:1}],[r.b.Die,{firstFrame:142,lastFrame:172,baseSpeed:1}],[r.b.Stomp,{firstFrame:201,lastFrame:226,baseSpeed:1}],[r.b.Smash,{firstFrame:201,lastFrame:226,baseSpeed:1}],[r.b.Cast,{firstFrame:487,lastFrame:574,baseSpeed:1}],[r.b.Stunned,{firstFrame:265,lastFrame:416,baseSpeed:1}]]),boundingHeight:90,boundingRadius:45}},a=new Map([[r.c.Earth,["Fofo_Earth"]],[r.c.Fire,["Fofo_Fire"]]]),s=function(t,e){var n=a.get(t),i=n[Math.floor(Math.random()*n.length)];return{id:i,directory:"models/characters/",fileName:i+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(30,30,30)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:1,lastFrame:97,baseSpeed:1}],[r.b.Run,{firstFrame:100,lastFrame:120,baseSpeed:1}],[r.b.Attack1,{firstFrame:134,lastFrame:151,baseSpeed:1}],[r.b.Attack2,{firstFrame:134,lastFrame:151,baseSpeed:1}],[r.b.Hit,{firstFrame:122,lastFrame:134,baseSpeed:1}],[r.b.Die,{firstFrame:152,lastFrame:171,baseSpeed:1}],[r.b.Stomp,{firstFrame:171,lastFrame:201,baseSpeed:1}],[r.b.Smash,{firstFrame:171,lastFrame:201,baseSpeed:1}],[r.b.Cast,{firstFrame:405,lastFrame:448,baseSpeed:1}],[r.b.Stunned,{firstFrame:205,lastFrame:401,baseSpeed:1}]]),boundingHeight:70,boundingRadius:35}},u=new Map([[r.c.Earth,["Gugu_White","Gugu_Green","Gugu_Blue"]],[r.c.Fire,["Gugu_Red","Gugu_Yellow"]]]),c=function(t,e){var n=u.get(t),i=1===e?"Gugu_White":n[Math.floor(Math.random()*n.length)];return{id:i,directory:"models/characters/",fileName:i+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(.5,.5,.5)},animations:new Map([[r.b.Idle,{firstFrame:8,lastFrame:66,baseSpeed:1}],[r.b.Run,{firstFrame:147,lastFrame:206,baseSpeed:8}],[r.b.Attack1,{firstFrame:217,lastFrame:246,baseSpeed:2}],[r.b.Attack2,{firstFrame:217,lastFrame:246,baseSpeed:2}],[r.b.Hit,{firstFrame:257,lastFrame:276,baseSpeed:1}],[r.b.Die,{firstFrame:447,lastFrame:491,baseSpeed:1}],[r.b.Stomp,{firstFrame:217,lastFrame:246,baseSpeed:1}],[r.b.Smash,{firstFrame:217,lastFrame:246,baseSpeed:1}],[r.b.Cast,{firstFrame:546,lastFrame:606,baseSpeed:1}],[r.b.Stunned,{firstFrame:616,lastFrame:646,baseSpeed:1}]]),boundingHeight:60,boundingRadius:35}},h=new Map([[r.c.Earth,["Fafa_Blue","Fafa_Green"]],[r.c.Fire,["Fafa_Pink","Fafa_Red","Fafa_Yellow"]]]),l=function(t,e){var n=h.get(t),i=n[Math.floor(Math.random()*n.length)];return{id:i,directory:"models/characters/",fileName:i+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.position.y+=50,t.scaling.set(.5,.5,.5)},animations:new Map([[r.b.Idle,{firstFrame:7,lastFrame:61,baseSpeed:1}],[r.b.Run,{firstFrame:7,lastFrame:61,baseSpeed:1}],[r.b.Attack1,{firstFrame:62,lastFrame:81,baseSpeed:1}],[r.b.Attack2,{firstFrame:62,lastFrame:81,baseSpeed:1}],[r.b.Hit,{firstFrame:82,lastFrame:101,baseSpeed:1}],[r.b.Die,{firstFrame:312,lastFrame:347,baseSpeed:1}],[r.b.Stomp,{firstFrame:62,lastFrame:81,baseSpeed:1}],[r.b.Smash,{firstFrame:62,lastFrame:81,baseSpeed:1}],[r.b.Cast,{firstFrame:348,lastFrame:447,baseSpeed:1}],[r.b.Stunned,{firstFrame:561,lastFrame:651,baseSpeed:1}]]),boundingHeight:115,boundingRadius:40}},f=new Map([[r.c.Earth,["Roro_White","Roro_Green","Roro_Blue"]],[r.c.Fire,["Roro_Red","Roro_Yellow"]]]),d=function(t,e){var n=f.get(t),i=n[Math.floor(Math.random()*n.length)];return{id:i,directory:"models/characters/",fileName:i+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(.5,.5,.5)},animations:new Map([[r.b.Idle,{firstFrame:6,lastFrame:121,baseSpeed:1}],[r.b.Run,{firstFrame:842,lastFrame:861,baseSpeed:1}],[r.b.Attack1,{firstFrame:143,lastFrame:162,baseSpeed:1.33}],[r.b.Attack2,{firstFrame:143,lastFrame:162,baseSpeed:1.33}],[r.b.Hit,{firstFrame:163,lastFrame:182,baseSpeed:1}],[r.b.Die,{firstFrame:293,lastFrame:328,baseSpeed:1}],[r.b.Stomp,{firstFrame:567,lastFrame:591,baseSpeed:1}],[r.b.Smash,{firstFrame:592,lastFrame:650,baseSpeed:1}],[r.b.Cast,{firstFrame:428,lastFrame:475,baseSpeed:1}],[r.b.Stunned,{firstFrame:476,lastFrame:566,baseSpeed:1}]]),boundingHeight:65,boundingRadius:40}},p=new Map([[r.c.Earth,["Rara_Blue","Rara_Green"]],[r.c.Fire,["Rara_Yellow","Rara_Red"]]]),g=function(t,e){var n=p.get(t),i=n[Math.floor(Math.random()*n.length)];return{id:i,directory:"models/characters/",fileName:i+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(.5,.5,.5)},animations:new Map([[r.b.Idle,{firstFrame:71,lastFrame:140,baseSpeed:1}],[r.b.Run,{firstFrame:6,lastFrame:70,baseSpeed:1}],[r.b.Attack1,{firstFrame:216,lastFrame:255,baseSpeed:2.6}],[r.b.Attack2,{firstFrame:216,lastFrame:255,baseSpeed:2.6}],[r.b.Hit,{firstFrame:256,lastFrame:275,baseSpeed:1}],[r.b.Die,{firstFrame:446,lastFrame:515,baseSpeed:1.4}],[r.b.Stomp,{firstFrame:396,lastFrame:433,baseSpeed:1}],[r.b.Smash,{firstFrame:396,lastFrame:433,baseSpeed:1}],[r.b.Cast,{firstFrame:546,lastFrame:605,baseSpeed:1}],[r.b.Stunned,{firstFrame:606,lastFrame:650,baseSpeed:1}]]),boundingHeight:65,boundingRadius:25}},_=new Map([[r.c.Earth,["Mumu_White","Mumu_Blue","Mumu_Green"]],[r.c.Fire,["Mumu_Red","Mumu_Yellow"]]]),m=function(t,e){var n=_.get(t),i=n[Math.floor(Math.random()*n.length)];return{id:i,directory:"models/characters/",fileName:i+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(.5,.5,.5)},animations:new Map([[r.b.Idle,{firstFrame:8,lastFrame:66,baseSpeed:1}],[r.b.Run,{firstFrame:147,lastFrame:206,baseSpeed:8}],[r.b.Attack1,{firstFrame:217,lastFrame:246,baseSpeed:2}],[r.b.Attack2,{firstFrame:217,lastFrame:246,baseSpeed:2}],[r.b.Hit,{firstFrame:257,lastFrame:276,baseSpeed:1}],[r.b.Die,{firstFrame:447,lastFrame:491,baseSpeed:1.4}],[r.b.Stomp,{firstFrame:217,lastFrame:246,baseSpeed:1}],[r.b.Smash,{firstFrame:217,lastFrame:246,baseSpeed:1}],[r.b.Cast,{firstFrame:546,lastFrame:606,baseSpeed:1}],[r.b.Stunned,{firstFrame:616,lastFrame:646,baseSpeed:1}]]),boundingHeight:60,boundingRadius:25}},y=function(){var t="Boss_Golem_Fire";return{id:t,directory:"models/characters/",fileName:t+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(40,40,40)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:1,lastFrame:80,baseSpeed:1}],[r.b.Run,{firstFrame:114,lastFrame:141,baseSpeed:1}],[r.b.Attack1,{firstFrame:80,lastFrame:114,baseSpeed:1.2}],[r.b.Attack2,{firstFrame:80,lastFrame:114,baseSpeed:1.2}],[r.b.Hit,{firstFrame:192,lastFrame:215,baseSpeed:1}],[r.b.Die,{firstFrame:141,lastFrame:162,baseSpeed:1}],[r.b.Stomp,{firstFrame:342,lastFrame:375,baseSpeed:.6}],[r.b.Smash,{firstFrame:342,lastFrame:375,baseSpeed:.6}],[r.b.Cast,{firstFrame:419,lastFrame:460,baseSpeed:1}],[r.b.Stunned,{firstFrame:243,lastFrame:314,baseSpeed:1}]]),boundingHeight:160,boundingRadius:80}},v=function(){var t="Boss_Golem_Earth";return{id:t,directory:"models/characters/",fileName:t+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(40,40,40)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:1,lastFrame:80,baseSpeed:1}],[r.b.Run,{firstFrame:114,lastFrame:141,baseSpeed:1}],[r.b.Attack1,{firstFrame:80,lastFrame:114,baseSpeed:1.2}],[r.b.Attack2,{firstFrame:80,lastFrame:114,baseSpeed:1.2}],[r.b.Hit,{firstFrame:192,lastFrame:215,baseSpeed:1}],[r.b.Die,{firstFrame:141,lastFrame:162,baseSpeed:1}],[r.b.Stomp,{firstFrame:342,lastFrame:375,baseSpeed:.6}],[r.b.Smash,{firstFrame:342,lastFrame:375,baseSpeed:.6}],[r.b.Cast,{firstFrame:419,lastFrame:460,baseSpeed:1}],[r.b.Stunned,{firstFrame:243,lastFrame:314,baseSpeed:1}]]),boundingHeight:160,boundingRadius:80}},b=function(){var t="Boss_Dino_Earth";return{id:t,directory:"models/characters/",fileName:t+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(30,30,30)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:1,lastFrame:77,baseSpeed:1}],[r.b.Run,{firstFrame:87,lastFrame:99,baseSpeed:1}],[r.b.Attack1,{firstFrame:101,lastFrame:125,baseSpeed:1.6}],[r.b.Attack2,{firstFrame:101,lastFrame:125,baseSpeed:1.6}],[r.b.Hit,{firstFrame:286,lastFrame:315,baseSpeed:1}],[r.b.Die,{firstFrame:125,lastFrame:145,baseSpeed:1}],[r.b.Stomp,{firstFrame:398,lastFrame:448,baseSpeed:1.8}],[r.b.Smash,{firstFrame:398,lastFrame:448,baseSpeed:1.8}],[r.b.Cast,{firstFrame:319,lastFrame:397,baseSpeed:2}],[r.b.Stunned,{firstFrame:169,lastFrame:281,baseSpeed:1}]]),boundingHeight:120,boundingRadius:90}},w=function(){var t="Boss_Dino_Fire";return{id:t,directory:"models/characters/",fileName:t+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(30,30,30)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:1,lastFrame:77,baseSpeed:1}],[r.b.Run,{firstFrame:87,lastFrame:99,baseSpeed:1}],[r.b.Attack1,{firstFrame:101,lastFrame:125,baseSpeed:1.6}],[r.b.Attack2,{firstFrame:101,lastFrame:125,baseSpeed:1.6}],[r.b.Hit,{firstFrame:286,lastFrame:315,baseSpeed:1}],[r.b.Die,{firstFrame:125,lastFrame:145,baseSpeed:1}],[r.b.Stomp,{firstFrame:398,lastFrame:448,baseSpeed:1.8}],[r.b.Smash,{firstFrame:398,lastFrame:448,baseSpeed:1.8}],[r.b.Cast,{firstFrame:319,lastFrame:397,baseSpeed:2}],[r.b.Stunned,{firstFrame:169,lastFrame:281,baseSpeed:1}]]),boundingHeight:120,boundingRadius:90}},x=function(){var t="Golem_Earth";return{id:t,directory:"models/characters/",fileName:t+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(40,40,40)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:2,lastFrame:97,baseSpeed:1}],[r.b.Run,{firstFrame:106,lastFrame:147,baseSpeed:3}],[r.b.Attack1,{firstFrame:220,lastFrame:256,baseSpeed:1.8}],[r.b.Attack2,{firstFrame:220,lastFrame:256,baseSpeed:1.8}],[r.b.Hit,{firstFrame:199,lastFrame:220,baseSpeed:1}],[r.b.Die,{firstFrame:257,lastFrame:287,baseSpeed:1}],[r.b.Stomp,{firstFrame:150,lastFrame:197,baseSpeed:1.5}],[r.b.Smash,{firstFrame:150,lastFrame:197,baseSpeed:1.5}],[r.b.Cast,{firstFrame:440,lastFrame:462,baseSpeed:1.8}],[r.b.Stunned,{firstFrame:296,lastFrame:435,baseSpeed:1}]]),boundingHeight:160,boundingRadius:80}},S=function(){var t="Golem_Fire";return{id:t,directory:"models/characters/",fileName:t+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(40,40,40)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:2,lastFrame:97,baseSpeed:1}],[r.b.Run,{firstFrame:106,lastFrame:147,baseSpeed:3}],[r.b.Attack1,{firstFrame:220,lastFrame:256,baseSpeed:1.8}],[r.b.Attack2,{firstFrame:220,lastFrame:256,baseSpeed:1.8}],[r.b.Hit,{firstFrame:199,lastFrame:220,baseSpeed:1}],[r.b.Die,{firstFrame:257,lastFrame:287,baseSpeed:1}],[r.b.Stomp,{firstFrame:150,lastFrame:197,baseSpeed:1.5}],[r.b.Smash,{firstFrame:150,lastFrame:197,baseSpeed:1.5}],[r.b.Cast,{firstFrame:440,lastFrame:462,baseSpeed:1.8}],[r.b.Stunned,{firstFrame:296,lastFrame:435,baseSpeed:1}]]),boundingHeight:160,boundingRadius:80}},T=function(){var t="Golem_Elite";return{id:t,directory:"models/characters/",fileName:t+".json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(40,40,40)},useAtlasTexture:!0,animations:new Map([[r.b.Idle,{firstFrame:2,lastFrame:97,baseSpeed:1}],[r.b.Run,{firstFrame:106,lastFrame:147,baseSpeed:3}],[r.b.Attack1,{firstFrame:220,lastFrame:256,baseSpeed:1.8}],[r.b.Attack2,{firstFrame:220,lastFrame:256,baseSpeed:1.8}],[r.b.Hit,{firstFrame:199,lastFrame:220,baseSpeed:1}],[r.b.Die,{firstFrame:257,lastFrame:287,baseSpeed:1}],[r.b.Stomp,{firstFrame:150,lastFrame:197,baseSpeed:1.5}],[r.b.Smash,{firstFrame:150,lastFrame:197,baseSpeed:1.5}],[r.b.Cast,{firstFrame:440,lastFrame:462,baseSpeed:1.8}],[r.b.Stunned,{firstFrame:296,lastFrame:435,baseSpeed:1}]]),boundingHeight:160,boundingRadius:80}}},function(t,e,n){"use strict";n.d(e,"a",function(){return o}
1),n.d(e,"b",function(){return a});var r=n(24),i=new Map([[r.d.RightHand,function(t){return{bone:t.bones[t.getBoneIndexByName("mixamorig:RightHand")],postAttach:function(t){t.scaling.set(.03,.03,.03),t.scalingDeterminant=-1,t.rotation.x=.8*Math.PI,t.rotation.z=.2*Math.PI,t.position.x=.1,t.position.y=.2}}}],[r.d.LeftHand,function(t){return{bone:t.bones[t.getBoneIndexByName("mixamorig:LeftHand")],postAttach:function(t){t.scaling.set(.03,.03,.03),t.scalingDeterminant=-1,t.rotation.x=.8*Math.PI,t.rotation.z=.2*Math.PI,t.position.x=.1,t.position.y=.2}}}],[r.d.Head,function(t){return{bone:t.bones[t.getBoneIndexByName("mixamorig:Head")],postAttach:function(t){t.scaling.set(.03,.03,.03),t.scalingDeterminant=-1,t.rotation.set(0,0,Math.PI),t.position.set(0,.5,.5)}}}],[r.d.Body,function(t){return{bone:t.bones[t.getBoneIndexByName("mixamorig:Spine2")],postAttach:function(t){t.scaling.set(.03,.03,.03),t.scalingDeterminant=-1,t.rotation.set(.15,0,Math.PI),t.position.set(0,-1.35,-.15)}}}],[r.d.LeftFoot,function(t){return{bone:t.bones[t.getBoneIndexByName("mixamorig:LeftFoot")],postAttach:function(t){t.scaling.set(.03,.03,.03),t.scalingDeterminant=-1,t.rotation.set(-Math.PI/2+.43,0,.1),t.position.set(0,.1,-.14)}}}],[r.d.RightFoot,function(t){return{bone:t.bones[t.getBoneIndexByName("mixamorig:RightFoot")],postAttach:function(t){t.scaling.set(.03,.03,.03),t.scalingDeterminant=-1,t.rotation.set(-Math.PI/2+.43,0,-.1),t.position.set(0,.1,-.14)}}}]]),o=[{inCharacterPreview:!0,id:"male",directory:"models/characters/",fileName:"male.json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(30,30,30)},useAtlasTexture:!0,boneFinders:i,animations:new Map([[r.b.Idle,{firstFrame:526,lastFrame:577,baseSpeed:1}],[r.b.Run,{firstFrame:611,lastFrame:632,baseSpeed:1}],[r.b.Attack1,{firstFrame:1,lastFrame:72,baseSpeed:1.25}],[r.b.Attack2,{firstFrame:101,lastFrame:168,baseSpeed:1.2}],[r.b.Smash,{firstFrame:202,lastFrame:296,baseSpeed:1.65}],[r.b.Cast,{firstFrame:526,lastFrame:577,baseSpeed:1}],[r.b.Stunned,{firstFrame:659,lastFrame:696,baseSpeed:1}],[r.b.Hit,{firstFrame:447,lastFrame:476,baseSpeed:1}],[r.b.Die,{firstFrame:348,lastFrame:413,baseSpeed:2}],[r.b.Stomp,{firstFrame:716,lastFrame:798,baseSpeed:3}],[r.b.Victory1,{firstFrame:825,lastFrame:876,baseSpeed:1}]]),boundingHeight:90,boundingRadius:35}],a=[{inCharacterPreview:!0,id:"female",directory:"models/characters/",fileName:"female.json",transforms:function(t){t.rotation.x=-Math.PI/2,t.rotation.y=Math.PI,t.scaling.set(30,30,30)},useAtlasTexture:!0,boneFinders:i,animations:new Map([[r.b.Idle,{firstFrame:548,lastFrame:599,baseSpeed:1}],[r.b.Run,{firstFrame:633,lastFrame:654,baseSpeed:1}],[r.b.Attack1,{firstFrame:1,lastFrame:72,baseSpeed:1.25}],[r.b.Attack2,{firstFrame:100,lastFrame:167,baseSpeed:1.2}],[r.b.Smash,{firstFrame:200,lastFrame:294,baseSpeed:1.65}],[r.b.Cast,{firstFrame:548,lastFrame:599,baseSpeed:1}],[r.b.Stunned,{firstFrame:896,lastFrame:933,baseSpeed:1}],[r.b.Hit,{firstFrame:453,lastFrame:498,baseSpeed:1}],[r.b.Die,{firstFrame:340,lastFrame:410,baseSpeed:2}],[r.b.Stomp,{firstFrame:698,lastFrame:786,baseSpeed:3}],[r.b.Victory1,{firstFrame:827,lastFrame:869,baseSpeed:1}]]),boundingHeight:90,boundingRadius:35}]},function(t,e,n){"use strict";n.d(e,"b",function(){return p}),n.d(e,"c",function(){return g}),n.d(e,"a",function(){return _});var r,i=n(67),o=n(1),a=n(188),s=n(69),u=n(52),c=n(187),h=n(13),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Delaying=0]="Delaying",t[t.BurstingOut=1]="BurstingOut",t[t.Spinning=2]="Spinning",t[t.FlyingUp=3]="FlyingUp",t[t.Looted=4]="Looted"}(r||(r={}));var f=15,d=function(t){function e(e,n,i,o){void 0===o&&(o=1);var a=t.call(this,e.game)||this;return a.delay=n,a._level=e.level,a._state=r.Delaying,a._tempVec=BABYLON.Vector3.Zero(),a._burstAngle=Math.random()*Math.PI*2,a._burstDistance=Math.min(50,e.boundingRadius)*(2+2*Math.random()),a._initialPosition=e.position.clone(),a._initialPosition.y=f,a._mesh=e.level.modelManager.createInstanceFromModel(i,a.id),a._mesh.scaling.set(o,o,o),a._mesh.position.copyFrom(a._initialPosition),a._mesh.setEnabled(!1),a._level.events.once("leaving",function(){a.dispose()}),a}return l(e,t),e.prototype.updateGameDisplayObject=function(t){switch(this._state){case r.Delaying:this._timeSinceCreated>=this.delay&&(this._state=r.BurstingOut,this._mesh.setEnabled(!0),this._level.soundManager.playOnce(this.getDropSound()));break;case r.BurstingOut:var e=(this._timeSinceCreated-this.delay)/1e3;this._mesh.rotation.y+=t/1e3*Math.PI*(12-10*e)*this.getSpinSpeed();var n=e<.72?1.5*this._burstDistance:this._burstDistance/4;e<=1?this._mesh.position.set(this._initialPosition.x+Math.sin(this._burstAngle)*this._burstDistance*e,this._initialPosition.y+Math.abs(Math.sin(e*e*2*Math.PI))*n,this._initialPosition.z+Math.cos(this._burstAngle)*this._burstDistance*e):(this._state=r.Spinning,this.ready());break;case r.Spinning:this._mesh.rotation.y+=t/1e3*Math.PI*2*this.getSpinSpeed(),Math.sqrt(Math.pow(this._mesh.position.x-this._level.player.position.x,2)+Math.pow(this._mesh.position.z-this._level.player.position.z,2))<this._level.player.boundingRadius+f&&(this._state=r.FlyingUp);break;case r.FlyingUp:this._mesh.rotation.y+=t/1e3*Math.PI*16*this.getSpinSpeed(),this._tempVec.set(this._level.player.position.x-this._mesh.position.x,this._level.player.position.y+this._level.player.height-this._mesh.position.y,this._level.player.position.z-this._mesh.position.z).normalize(),this._tempVec.set(300*this._tempVec.x*t/1e3,300*this._tempVec.y*t/1e3,300*this._tempVec.z*t/1e3);Math.sqrt(Math.pow(this._mesh.position.x-this._level.player.position.x,2)+Math.pow(this._mesh.position.y-this._level.player.position.y-this._level.player.height,2)+Math.pow(this._mesh.position.z-this._level.player.position.z,2))<this._tempVec.length()?(this._state=r.Looted,this.loot(),this.dispose()):this._mesh.position.addInPlace(this._tempVec);break;case r.Looted:}},e.prototype.ready=function(){},e.prototype.loot=function(){},e.prototype.getSpinSpeed=function(){return 1},e.prototype.getDropSound=function(){return"coin_drop"},e}(i.a),p=function(t){function e(e,n,r,i){void 0===r&&(r=1),void 0===i&&(i=1);var o=t.call(this,e,n,"coin",i)||this;return o.amount=r,o}return l(e,t),e.prototype.loot=function(){new a.a(this._level.player,this.amount,a.b.Resource1);var t=this._level.player.statsController.getStatValue(o.b.Resource1).original;this._level.player.statsController.setBaseStat(o.b.Resource1,t+this.amount),this._level.soundManager.playOnce("coin_drop"),this.game.getService(s.a).data.score+=this.amount*u.b},e}(d),g=function(t){function e(e,n){return t.call(this,e,n,"diamond")||this}return l(e,t),e.prototype.loot=function(){new a.a(this._level.player,1,a.b.Resource2);var t=this._level.player.statsController.getStatValue(o.b.Resource2).original;this._level.player.statsController.setBaseStat(o.b.Resource2,t+1),this._level.soundManager.playOnce("coin_drop")},e.prototype.getSpinSpeed=function(){return.2},e}(d),_=function(t){function e(e,n){return t.call(this,e,n,"heart")||this}return l(e,t),e.prototype.loot=function(){this._level.soundManager.playOnce("bubble");var t=u.d*this._level.player.statsController.getStatValue(o.b.MaxHealth).original;new c.a(this._level.player,"+"+t.toFixed(),!1,h.b);var e=this._level.player.statsController.getStatValue(o.b.MaxHealth).final,n=t/e,r=this._level.player.statsController.getStatValue(o.b.HealthPercentage),i={original:Math.min(1,Math.max(0,r.original+n)),final:Math.min(1,Math.max(0,r.final+n))};this._level.player.statsController.setBaseStat(o.b.HealthPercentage,i.original)},e.prototype.getDropSound=function(){return"bubble"},e}(d)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(21),i=n(31),o=n(24),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Prom
1ise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},u=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},c=function(t){function e(e){var n=t.call(this,e)||this;return n._fpsLabel=null,n}return a(e,t),Object.defineProperty(e.prototype,"averageFps",{get:function(){return this._avgFps},enumerable:!0,configurable:!0}),e.prototype.startServiceAsync=function(){return s(this,void 0,void 0,function(){var t,e=this;return u(this,function(n){return this._currentFrame=0,this._currentTime=0,this._lastFpsReportTime=0,this._avgFps=0,this._fpsSampleCount=0,this.game.config.getBooleanConfig(o.a.render_fps)&&(t=new PIXI.Text,t.text="0 FPS",t.style.fontFamily="Passion One",t.style.fontSize="36px",t.style.fill=16777215,t.style.strokeThickness=4,t.style.stroke=2171169,t.anchor.set(1,1),t.position.x=this.game.engine.getRenderWidth()-12,t.position.y=this.game.engine.getRenderHeight()-12,this.game.getService(i.a).root.addChild(t),this._fpsLabel=t,this.game.events.on("resize",function(){t.position.x=e.game.engine.getRenderWidth()-12,t.position.y=e.game.engine.getRenderHeight()-12})),[2]})})},e.prototype.updateService=function(t){if(this._currentFrame+=1,this._currentTime+=this.game.engine.getDeltaTime(),this._currentFrame%60===0){var e=6e4/(this._currentTime-this._lastFpsReportTime);this._avgFps=(this._avgFps*this._fpsSampleCount+e)/(this._fpsSampleCount+1),this._fpsSampleCount++,this._fpsLabel&&(this._fpsLabel.text=e.toFixed()+" FPS, "+this.game.engine.drawCalls+" Draws"),this._lastFpsReportTime=this._currentTime}},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(685),i=n(21),o=n(24),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(t){function e(e){var i=t.call(this,e)||this;return i.waterShaderMaterials=new Map([[o.c.Earth,n.i(r.a)(e,o.c.Earth)],[o.c.Fire,n.i(r.a)(e,o.c.Fire)]]),i}return a(e,t),e.prototype.updateService=function(t){var e=this;this.waterShaderMaterials.forEach(function(t){t.setFloat("time",e._timeSinceCreated)})},e.prototype.disposeService=function(){this.waterShaderMaterials.forEach(function(t){t.dispose()})},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(53),i=n(191),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n._characterPreviewRenderer=n.game.getService(i.a),n._visible=!1,n}return o(e,t),e.prototype.constructElement=function(){},e.prototype.resizeElement=function(){if(this._visible){this._characterPreviewRenderer.canvas.style.visibility="visible",this._characterPreviewRenderer.canvas.width=this._width,this._characterPreviewRenderer.canvas.height=this._height,this._characterPreviewRenderer.canvas.style.width=this._width*this.game.engine.getHardwareScalingLevel()+"px",this._characterPreviewRenderer.canvas.style.height=this._height*this.game.engine.getHardwareScalingLevel()+"px";var t=this._element.getGlobalPosition();this._characterPreviewRenderer.canvas.style.left=t.x*this.game.engine.getHardwareScalingLevel()+"px",this._characterPreviewRenderer.canvas.style.top=t.y*this.game.engine.getHardwareScalingLevel()+"px",this._characterPreviewRenderer.engine.resize(),this._characterPreviewRenderer.camera&&this.resizeCamera()}},e.prototype.updateElement=function(t){this.shouldBeVisible()?(this._visible||this.show(),this._characterPreviewRenderer.scene.render()):this._visible&&this.hide()},e.prototype.disposeElement=function(){this._visible&&this.hide()},e.prototype.resizeCamera=function(){var t=this._width/this._height,e=this.renderedHeight(),n=e*t;this._characterPreviewRenderer.camera.orthoTop=e/2,this._characterPreviewRenderer.camera.orthoBottom=-e/2,this._characterPreviewRenderer.camera.orthoLeft=-n/2,this._characterPreviewRenderer.camera.orthoRight=n/2},e.prototype.show=function(){this._visible=!0,this._characterPreviewRenderer.initializeCharacter(),this.resizeElement()},e.prototype.hide=function(){this._visible=!1,this._characterPreviewRenderer.canvas.style.visibility="hidden"},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(53),i=n(48),o=n(31),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(t){function e(e){var n=t.call(this,e)||this;return n._percentageMasked=0,n._secondsLeft=0,n}return a(e,t),Object.defineProperty(e.prototype,"secondsLeft",{get:function(){return this._secondsLeft},set:function(t){this._text.visible=t>0;var e=Math.round(t);this._secondsLeft!==e&&(this._secondsLeft=e,this._text.text=e.toFixed())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"percentageMasked",{get:function(){return this._percentageMasked},set:function(t){this._percentageMasked=t,this.updatePercentage()},enumerable:!0,configurable:!0}),e.prototype.constructElement=function(){this._element.visible=!1,i.a.graphics===i.b.Low?(this._maskLowCost=new PIXI.Sprite(n.i(o.b)("square_white")),this._maskLowCost.displayGroup=this._pixiLayer.guiCooldownMaskDisplayGroup,this._maskLowCost.t
1int=0,this._maskLowCost.alpha=.7,this._element.addChild(this._maskLowCost)):(this._maskHighCost=new PIXI.Graphics,this._maskHighCost.displayGroup=this._pixiLayer.guiCooldownMaskDisplayGroup,this._element.addChild(this._maskHighCost),this._maskHighCost.position.set(this._width/2,this._height/2)),this._text=new PIXI.Text,this._text.displayGroup=this._pixiLayer.guiTextDisplayGroup,this._text.style.fontFamily="Passion One",this._text.style.fontSize=2*this._height/3,this._text.style.strokeThickness=4,this._text.style.stroke="#212121",this._text.style.fill="#f44336",this._text.anchor.set(.5,.5),this._element.addChild(this._text),this._text.x=this._width/2,this._text.y=this._height/2},e.prototype.resizeElement=function(){this.updatePercentage(),this._text.style.fontSize=2*this._height/3,this._text.x=this._width/2,this._text.y=this._height/2},e.prototype.updatePercentage=function(){this._maskLowCost?this.updatePercentageLowCost():this.updatePercentageHighCost(),this._element.visible=this._percentageMasked>0},e.prototype.updatePercentageLowCost=function(){this._maskLowCost.scale.set(this._width*this._percentageMasked/this._maskLowCost.texture.width,this._height/this._maskLowCost.texture.height)},e.prototype.updatePercentageHighCost=function(){this._maskHighCost.clear();var t=[];t.push(0,0);var e=(1-this._percentageMasked)*Math.PI*2,n=Math.sin(e),r=-Math.cos(e),i=Math.max(Math.abs(n),Math.abs(r));n=n/i*this._width/2,r=r/i*this._height/2,t.push(n,r),e<1*Math.PI/4&&t.push(this._width/2,-this._height/2),e<2*Math.PI/4&&t.push(this._width/2,0),e<3*Math.PI/4&&t.push(this._width/2,this._height/2),e<4*Math.PI/4&&t.push(0,this._height/2),e<5*Math.PI/4&&t.push(-this._width/2,this._height/2),e<6*Math.PI/4&&t.push(-this._width/2,0),e<7*Math.PI/4&&t.push(-this._width/2,-this._height/2),t.push(0,-this._height/2),t.push(0,0),this._maskHighCost.beginFill(0,.5),this._maskHighCost.drawPolygon(t),this._maskHighCost.endFill(),this._maskHighCost.position.set(this._width/2,this._height/2)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(53),i=n(31),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e,n,r,i,o,a){void 0===a&&(a=16777215);var s=t.call(this,e)||this;return s.topLeftCornerTextureName=n,s.leftEdgeTextureName=r,s.backgroundTextureName=i,s.cornerSizePercentageInWidth=o,s.tint=a,s}return o(e,t),e.prototype.sizeThatFits=function(t){return{width:Math.min(t.width,1),height:Math.min(t.height,1)}},e.prototype.constructElement=function(){this._topLeftCorner=new PIXI.Sprite(n.i(i.b)(this.topLeftCornerTextureName)),this._topLeftCorner.anchor.set(.5),this._topRightCorner=new PIXI.Sprite(n.i(i.b)(this.topLeftCornerTextureName)),this._topRightCorner.anchor.set(.5),this._bottomLeftCorner=new PIXI.Sprite(n.i(i.b)(this.topLeftCornerTextureName)),this._bottomLeftCorner.anchor.set(.5),this._bottomRightCorner=new PIXI.Sprite(n.i(i.b)(this.topLeftCornerTextureName)),this._bottomRightCorner.anchor.set(.5),this._topEdge=new PIXI.Sprite(n.i(i.b)(this.leftEdgeTextureName)),this._topEdge.anchor.set(.5),this._bottomEdge=new PIXI.Sprite(n.i(i.b)(this.leftEdgeTextureName)),this._bottomEdge.anchor.set(.5),this._leftEdge=new PIXI.Sprite(n.i(i.b)(this.leftEdgeTextureName)),this._leftEdge.anchor.set(.5),this._rightEdge=new PIXI.Sprite(n.i(i.b)(this.leftEdgeTextureName)),this._rightEdge.anchor.set(.5),this._bg=new PIXI.Sprite(n.i(i.b)(this.backgroundTextureName)),this._topLeftCorner.tint=this.tint,this._topRightCorner.tint=this.tint,this._bottomLeftCorner.tint=this.tint,this._bottomRightCorner.tint=this.tint,this._leftEdge.tint=this.tint,this._topEdge.tint=this.tint,this._rightEdge.tint=this.tint,this._bottomEdge.tint=this.tint,this._bg.tint=this.tint,this.element.addChild(this._topLeftCorner),this.element.addChild(this._topRightCorner),this.element.addChild(this._bottomLeftCorner),this.element.addChild(this._bottomRightCorner),this.element.addChild(this._leftEdge),this.element.addChild(this._topEdge),this.element.addChild(this._bottomEdge),this.element.addChild(this._rightEdge),this.element.addChild(this._bg),this.element.displayGroup=this._pixiLayer.guiImageDisplayGroup},e.prototype.resizeElement=function(){this._topLeftCorner.scale.set(this.cornerSizePercentageInWidth*this._width/this._topLeftCorner.texture.width),this._topRightCorner.scale.set(this.cornerSizePercentageInWidth*this._width/this._topLeftCorner.texture.width),this._bottomLeftCorner.scale.set(this.cornerSizePercentageInWidth*this._width/this._topLeftCorner.texture.width),this._bottomRightCorner.scale.set(this.cornerSizePercentageInWidth*this._width/this._topLeftCorner.texture.width),this._topLeftCorner.position.set(this.cornerSizePercentageInWidth*this._width/2),this._topRightCorner.position.set((1-this.cornerSizePercentageInWidth/2)*this._width,this.cornerSizePercentageInWidth*this._width/2),this._bottomRightCorner.position.set((1-this.cornerSizePercentageInWidth/2)*this._width,this._height-this.cornerSizePercentageInWidth*this._width/2),this._bottomLeftCorner.position.set(this.cornerSizePercentageInWidth*this._width/2,this._height-this.cornerSizePercentageInWidth*this._width/2),this._topRightCorner.rotation=Math.PI/2,this._bottomRightCorner.rotation=Math.PI,this._bottomLeftCorner.rotation=3*Math.PI/2,this._topEdge.scale.set(this.cornerSizePercentageInWidth*this._width/this._topLeftCorner.texture.width,((1-2*this.cornerSizePercentageInWidth)*this._width+2)/this._leftEdge.texture.height),this._leftEdge.scale.set(this.cornerSizePercentageInWidth*this._width/this._topLeftCorner.texture.width,Math.max(0,(this._height-2*this.cornerSizePercentageInWidth*this._width+2)/this._leftEdge.texture.height)),this._rightEdge.scale.set(this.cornerSizePercentageInWidth*this._width/this._topLeftCorner.texture.width,Math.max(0,(this._height-2*this.cornerSizePercentageInWidth*this._width+2)/this._leftEdge.texture.height)),this._bottomEdge.scale.set(this.cornerSizePercentageInWidth*this._width/this._topLeftCorner.texture.width,((1-2*this.cornerSizePercentageInWidth)*this._width+2)/this._leftEdge.texture.height),this._leftEdge.position.set(this.cornerSizePercentageInWidth*this._width/2,this._height/2),this._topEdge.position.set(this._width/2,this.cornerSizePercentageInWidth*this._width/2),this._rightEdge.position.set((1-this.cornerSizePercentageInWidth/2)*this._width,this._height/2),this._bottomEdge.position.set(this._width/2,this._height-this.cornerSizePercentageInWidth/2*this._width),this._topEdge.rotation=Math.PI/2,this._rightEdge.rotation=Math.PI,this._bottomEdge.rotation=3*Math.PI/2,this._bg.scale.set((1-2*this.cornerSizePercentageInWidth)*this._width/this._bg.texture.width,(this._height-2*this.cornerSizePercentageInWidth*this._width)/this._bg.texture.height),this._bg.position.set(this.cornerSizePercentageInWidth*this._width)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(7),i=n(25),o=n(709),a=n(2),s=n(14),u=n(13),c=n(9),h=n(38),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d=function(t){function e(e,n){void 0===n&&(n=function(){return!0});for(var l=this,d=[],p=new i.a(e,function(){l.prevInventoryPage()},"arrow_left",""),g=new i.a(e,function(){l.nextInventoryPage()},"arrow_left","",{},Math.PI),_=[],m=0;m<c.c+c.d;++m)n(m)&&_.length<c.c&&_.push(m);if(_.length<c.c)for(var m=_.length;m<c.c;++m)_.push(c.c+c.d);return l=t.call(this,e,[new a.a(e,[p],f({},s.a.mediumSquare)),new a.a(e,[new h.a(e,u.h,1,32),new r.a(e,[0,1,2].map(function(t){var n=5*t;return new r.b(e,[0,1,2,3,4].map(function(t){var r=_[n+t],i=new o.a(e,r);return i.events.on("click",function(t){l.events.emit("click",t)}),d.push(i),i}),{flexDirectionAlign:a.b.Center})}),f({},s.a.largePadding))]),new a.a(e,[g],f({},s.a.mediumSquare))],{flexDirectionAlign:a.b.Center,crossDirectionAlign:a.d.Center,paddingBottom:s.a.extraLargePaddingValue})||this,l._slotMapping=_,l._inventoryPage=0,l._prevPageButton=p,l._prevPageButton.element.visible=!1,l._nextPageButton=g,l.inventorySlotButtons=d,l}return l(e,t),e.prototype.prevInventoryPage=function(){if(this._inventoryPage>0){this._inventoryPage-=1;for(var t=0;t<15;++t)this.inventorySlotButtons[t].slot=this._slotMapping[t+15*this._inventoryPage];this._nextPageButton.element.visible=!0,this._prevPageButton.element.visible=this._inventoryPage>0}},e.prototype.nextInventoryPage=function(){if(this._inventoryPage+1<4){this._inventoryPage+=1;for(var t=0;t<15;++t)this.inventorySlotButtons[t].slot=this._slotMapping[t+15*this._inventoryPage];this._prevPageButton.element.visible=!0,this._nextPageButton.element.visible=this._inventoryPage+1<4}},e}(r.b)},function(t,e,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,n){if(t&&c.isObject(t)&&t instanceof r)return t;var i=new r;return i.parse(t,e,n),i}function o(t){return c.isString(t)&&(t=i(t)),t instanceof r?t.format():r.prototype.format.call(t)}function a(t,e){return i(t,!1,!0).resolve(e)}function s(t,e){return t?i(t,!1,!0).resolveObject(e):e}var u=n(606),c=n(717);e.parse=i,e.resolve=a,e.resolveObject=s,e.format=o,e.Url=r;
vendor: 4,004 bytes, line 1
1var h=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),g=["'"].concat(p),_=["%","/","?",";","#"].concat(g),m=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=n(609);r.prototype.parse=function(t,e,n){if(!c.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),i=-1!==r&&r<t.indexOf("#")?"?":"#",o=t.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),t=o.join(i);var s=t;if(s=s.trim(),!n&&1===t.split("#").length){var l=f.exec(s);if(l)return this.path=s,this.href=s,this.pathname=l[1],l[2]?(this.search=l[2],this.query=e?S.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var d=h.exec(s);if(d){d=d[0];var p=d.toLowerCase();this.protocol=p,s=s.substr(d.length)}if(n||d||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===s.substr(0,2);!T||d&&w[d]||(s=s.substr(2),this.slashes=!0)}if(!w[d]&&(T||d&&!x[d])){for(var E=-1,P=0;P<m.length;P++){var O=s.indexOf(m[P]);-1!==O&&(-1===E||O<E)&&(E=O)}var M,C;C=-1===E?s.lastIndexOf("@"):s.lastIndexOf("@",E),-1!==C&&(M=s.slice(0,C),s=s.slice(C+1),this.auth=decodeURIComponent(M)),E=-1;for(var P=0;P<_.length;P++){var O=s.indexOf(_[P]);-1!==O&&(-1===E||O<E)&&(E=O)}-1===E&&(E=s.length),this.host=s.slice(0,E),s=s.slice(E),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var I=this.hostname.split(/\./),P=0,R=I.length;P<R;P++){var D=I[P];if(D&&!D.match(y)){for(var L="",k=0,F=D.length;k<F;k++)D.charCodeAt(k)>127?L+="x":L+=D[k];if(!L.match(y)){var N=I.slice(0,P),B=I.slice(P+1),j=D.match(v);j&&(N.push(j[1]),B.unshift(j[2])),B.length&&(s="/"+B.join(".")+s),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=u.toASCII(this.hostname));var U=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+U,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!b[p])for(var P=0,R=g.length;P<R;P++){var W=g[P];if(-1!==s.indexOf(W)){var V=encodeURIComponent(W);V===W&&(V=escape(W)),s=s.split(W).join(V)}}var G=s.indexOf("#");-1!==G&&(this.hash=s.substr(G),s=s.slice(0,G));var Y=s.indexOf("?");if(-1!==Y?(this.search=s.substr(Y),this.query=s.substr(Y+1),e&&(this.query=S.parse(this.query)),s=s.slice(0,Y)):e&&(this.search="",this.query={}),s&&(this.pathname=s),x[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",z=this.search||"";this.path=U+z}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(o=S.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||x[e])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+i+n+a+r},r.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(c.isString(t)){var e=new r;e.parse(t,!1,!0),t=e}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),u=0;u<s.length;u++){var h=s[u];
1"protocol"!==h&&(n[h]=t[h])}return x[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!x[t.protocol]){for(var l=Object.keys(t),f=0;f<l.length;f++){var d=l[f];n[d]=t[d]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||w[t.protocol])n.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var g=n.pathname||"",_=n.search||"";n.path=g+_}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var m=n.pathname&&"/"===n.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),v=y||m||n.host&&t.pathname,b=v,S=n.pathname&&n.pathname.split("/")||[],p=t.pathname&&t.pathname.split("/")||[],T=n.protocol&&!x[n.protocol];if(T&&(n.hostname="",n.port=null,n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),v=v&&(""===p[0]||""===S[0])),y)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,S=p;else if(p.length)S||(S=[]),S.pop(),S=S.concat(p),n.search=t.search,n.query=t.query;else if(!c.isNullOrUndefined(t.search)){if(T){n.hostname=n.host=S.shift();var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return n.search=t.search,n.query=t.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var P=S.slice(-1)[0],O=(n.host||t.host||S.length>1)&&("."===P||".."===P)||""===P,M=0,C=S.length;C>=0;C--)P=S[C],"."===P?S.splice(C,1):".."===P?(S.splice(C,1),M++):M&&(S.splice(C,1),M--);if(!v&&!b)for(;M--;M)S.unshift("..");!v||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),O&&"/"!==S.join("/").substr(-1)&&S.push("");var A=""===S[0]||S[0]&&"/"===S[0].charAt(0);if(T){n.hostname=n.host=A?"":S.length?S.shift():"";var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return v=v||n.host&&S.length,v&&!A&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=l.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";"undefined"===typeof Promise&&(n(611).enable(),window.Promise=n(610)),n(718),Object.assign=n(231)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(510),i=(n.n(r),n(513)),o=(n.n(i),n(140)),a=n(511),s=(n.n(a),n(16));document.ontouchmove=function(t){t.preventDefault()},document.ondblclick=function(t){t.preventDefault()},document.addEventListener("DOMContentLoaded",function(){if(!BABYLON.Engine.isSupported()){var t=document.createElement("div");return t.id="webglError",t.innerText="Your device does not support this game.",void document.body.appendChild(t)}s.a.initializeAsync().then(function(t){u(s.a),new o.a(t).startLoadingAsync()})});var u=function(t){var e=1,n=window.setInterval(function(){t.setLoadingProgress(e),Math.random()<.5&&e++,e>=100&&window.clearInterval(n)},30)}},function(t,e,n){(function(e,r,i){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function o(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*ft;case"days":case"day":case"d":return n*lt;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ht;case"minutes":case"minute":case"mins":case"min":case"m":return n*ct;case"seconds":case"second":case"secs":case"sec":case"s":return n*ut;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function a(t){return t>=lt?Math.round(t/lt)+"d":t>=ht?Math.round(t/ht)+"h":t>=ct?Math.round(t/ct)+"m":t>=ut?Math.round(t/ut)+"s":t+"ms"}function s(t){return u(t,lt,"day")||u(t,ht,"hour")||u(t,ct,"minute")||u(t,ut,"second")||t+" ms"}function u(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}function c(t,e,n){n=n||{};var r=d(t)+"="+d(e);null==e&&(n.maxage=-1),n.maxage&&(n.expires=new Date(+new Date+n.maxage)),n.path&&(r+="; path="+n.path),n.domain&&(r+="; domain="+n.domain),n.expires&&(r+="; expires="+n.expires.toUTCString()),n.secure&&(r+="; secure"),document.cookie=r}function h(){var t;try{t=document.cookie}catch(t){return"undefined"!==typeof console&&"function"===typeof console.error&&console.error(t.stack||t),{}}return f(t)}function l(t){return h()[t]}function f(t){var e,n={},r=t.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)e=r[i].split("="),n[p(e[0])]=p(e[1]);return n}function d(t){try{return encodeURIComponent(t)}catch(e){_t("error `encode(%o)` - %o",t,e)}}function p(t){try{return decodeURIComponent(t)}catch(e){_t("error `decode(%o)` - %o",t,e)}}function g(t){var e=he.call(t,fe),n=t[fe];try{t[fe]=void 0;var r=!0}catch(t){}var i=le.call(t);return r&&(e?t[fe]=n:delete t[fe]),i}function _(t){return ge.call(t)}function m(t){return null==t?void 0===t?ye:me:ve&&ve in Object(t)?de(t):_e(t)}function y(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function v(t){if(!we(t))return!1;var e=be(t);return e==Se||e==Te||e==xe||e==Ee}function b(t){return!!Ce&&Ce in t}function w(t){if(null!=t){try{return Re.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function x(t){return!(!we(t)||Ae(t))&&(Pe(t)?Ue:ke).test(De(t))}function S(t,e){return null==t?void 0:t[e]}function T(t,e){var n=We(t,e);return He(n)?n:void 0}function E(t,e,n){"__proto__"==e&&Ye?Ye(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function P(t,e){return t===e||t!==t&&e!==e}function O(t,e,n){var r=t[e];Ke.call(t,e)&&Xe(r,n)&&(void 0!==n||e in t)||ze(t,e,n)}function M(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;
1){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?ze(n,s,u):Ze(n,s,u)}return n}function C(t){return t}function A(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function I(t,e,n){return e=tn(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=tn(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),Qe(t,this,s)}}function R(t){return function(){return t}}function D(t){var e=0,n=0;return function(){var r=un(),i=sn-(r-n);if(n=r,i>0){if(++e>=an)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function L(t,e){return ln(en(t,e,$e),t+"")}function k(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=dn}function F(t){return null!=t&&pn(t.length)&&!Pe(t)}function N(t,e){return!!(e=null==e?_n:e)&&("number"==typeof t||mn.test(t))&&t>-1&&t%1==0&&t<e}function B(t,e,n){if(!we(n))return!1;var r=typeof e;return!!("number"==r?gn(n)&&yn(e,n.length):"string"==r&&e in n)&&Xe(n[e],t)}function j(t){return fn(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&vn(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e})}function U(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||wn)}function H(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function W(t){return null!=t&&"object"==typeof t}function V(t){return Tn(t)&&be(t)==En}function G(){return!1}function Y(t){return Tn(t)&&pn(t.length)&&!!Fn[be(t)]}function z(t){return function(e){return t(e)}}function X(t,e){var n=Dn(t),r=!n&&In(t),i=!n&&!r&&kn(t),o=!n&&!r&&!i&&Wn(t),a=n||r||i||o,s=a?Sn(t.length,String):[],u=s.length;for(var c in t)!e&&!Gn.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yn(c,u))||s.push(c);return s}function q(t,e){return function(n){return t(e(n))}}function K(t){if(!xn(t))return qn(t);var e=[];for(var n in Object(t))Zn.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Z(t){return gn(t)?Yn(t):Jn(t)}function J(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function $(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}}function Q(t,e,n,r){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?tt(ir(t),function(r){var i=encodeURIComponent($(r))+n;return rr(t[r])?tt(t[r],function(t){return i+encodeURIComponent($(t))}).join(e):i+encodeURIComponent($(t[r]))}).join(e):r?encodeURIComponent($(r))+n+encodeURIComponent($(t)):""}function tt(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}function et(t,e,n,r){e=e||"&",n=n||"=";var i={};if("string"!==typeof t||0===t.length)return i;var o=/\+/g;t=t.split(e);var a=1e3;r&&"number"===typeof r.maxKeys&&(a=r.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var c,h,l,f,d=t[u].replace(o,"%20"),p=d.indexOf(n);p>=0?(c=d.substr(0,p),h=d.substr(p+1)):(c=d,h=""),l=decodeURIComponent(c),f=decodeURIComponent(h),J(i,l)?rr(i[l])?i[l].push(f):i[l]=[i[l],f]:i[l]=f}return i}var nt,rt="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},it=(t(function(t,e){(function(){function n(t,e){function i(t){if(i[t]!==_)return i[t];var n;if("bug-string-char-index"==t)n="a"!="a"[0];else if("json"==t)n=i("json-stringify")&&i("json-parse");else{var r,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var u=e.stringify,h="function"==typeof u&&v;if(h){(r=function(){return 1}).toJSON=r;try{h="0"===u(0)&&"0"===u(new a)&&'""'==u(new s)&&u(y)===_&&u(_)===_&&u()===_&&"1"===u(r)&&"[1]"==u([r])&&"[null]"==u([_])&&"null"==u(null)&&"[null,null,null]"==u([_,y,null])&&u({a:[r,!0,!1,null,"\0\b\n\f\r\t"]})==o&&"1"===u(null,r)&&"[\n 1,\n 2\n]"==u([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==u(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==u(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==u(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==u(new c(-1))}catch(t){h=!1}}n=h}if("json-parse"==t){var l=e.parse;if("function"==typeof l)try{if(0===l("0")&&!l(!1)){r=l(o);var f=5==r.a.length&&1===r.a[0];if(f){try{f=!l('"\t"')}catch(t){}if(f)try{f=1!==l("01")}catch(t){}if(f)try{f=1!==l("1.")}catch(t){}}}}catch(t){f=!1}n=f}}return i[t]=!!n}t||(t=o.Object()),e||(e=o.Object());var a=t.Number||o.Number,s=t.String||o.String,u=t.Object||o.Object,c=t.Date||o.Date,h=t.SyntaxError||o.SyntaxError,l=t.TypeError||o.TypeError,f=t.Math||o.Math,d=t.JSON||o.JSON;"object"==typeof d&&d&&(e.stringify=d.stringify,e.parse=d.parse);var p,g,_,m=u.prototype,y=m.toString,v=new c(-0xc782b5b800cec);try{v=-109252==v.getUTCFullYear()&&0===v.getUTCMonth()&&1===v.getUTCDate()&&10==v.getUTCHours()&&37==v.getUTCMinutes()&&6==v.getUTCSeconds()&&708==v.getUTCMilliseconds()}catch(t){}if(!i("json")){var b=i("bug-string-char-index");if(!v)var w=f.floor,x=[0,31,59,90,120,151,181,212,243,273,304,334],S=function(t,e){return x[e]+365*(t-1970)+w((t-1969+(e=+(e>1)))/4)-w((t-1901+e)/100)+w((t-1601+e)/400)};if((p=m.hasOwnProperty)||(p=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=y?p=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,p=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,p.call(this,t)}),g=function(t,e){var n,i,o,a=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n;for(o in i)p.call(i,o)&&a++;return n=i=null,a?g=2==a?function(t,e){var n,r={},i="[object Function]"==y.call(t);for(n in t)i&&"prototype"==n||p.call(r,n)||!(r[n]=1)||!p.call(t,n)||e(n)}:function(t,e){var n,r,i="[object Function]"==y.call(t);for(n in t)i&&"prototype"==n||!p.call(t,n)||(r="constructor"===n)||e(n);
1(r||p.call(t,n="constructor"))&&e(n)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],g=function(t,e){var n,o,a="[object Function]"==y.call(t),s=!a&&"function"!=typeof t.constructor&&r[typeof t.hasOwnProperty]&&t.hasOwnProperty||p;for(n in t)a&&"prototype"==n||!s.call(t,n)||e(n);for(o=i.length;n=i[--o];s.call(t,n)&&e(n));}),g(t,e)},!i("json-stringify")){var T={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},E=function(t,e){return("000000"+(e||0)).slice(-t)},P=function(t){for(var e='"',n=0,r=t.length,i=!b||r>10,o=i&&(b?t.split(""):t);n<r;n++){var a=t.charCodeAt(n);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=T[a];break;default:if(a<32){e+="\\u00"+E(2,a.toString(16));break}e+=i?o[n]:t.charAt(n)}}return e+'"'},O=function(t,e,n,r,i,o,a){var s,u,c,h,f,d,m,v,b,x,T,M,C,A,I,R;try{s=e[t]}catch(t){}if("object"==typeof s&&s)if("[object Date]"!=(u=y.call(s))||p.call(s,"toJSON"))"function"==typeof s.toJSON&&("[object Number]"!=u&&"[object String]"!=u&&"[object Array]"!=u||p.call(s,"toJSON"))&&(s=s.toJSON(t));else if(s>-1/0&&s<1/0){if(S){for(f=w(s/864e5),c=w(f/365.2425)+1970-1;S(c+1,0)<=f;c++);for(h=w((f-S(c,0))/30.42);S(c,h+1)<=f;h++);f=1+f-S(c,h),d=(s%864e5+864e5)%864e5,m=w(d/36e5)%24,v=w(d/6e4)%60,b=w(d/1e3)%60,x=d%1e3}else c=s.getUTCFullYear(),h=s.getUTCMonth(),f=s.getUTCDate(),m=s.getUTCHours(),v=s.getUTCMinutes(),b=s.getUTCSeconds(),x=s.getUTCMilliseconds();s=(c<=0||c>=1e4?(c<0?"-":"+")+E(6,c<0?-c:c):E(4,c))+"-"+E(2,h+1)+"-"+E(2,f)+"T"+E(2,m)+":"+E(2,v)+":"+E(2,b)+"."+E(3,x)+"Z"}else s=null;if(n&&(s=n.call(e,t,s)),null===s)return"null";if("[object Boolean]"==(u=y.call(s)))return""+s;if("[object Number]"==u)return s>-1/0&&s<1/0?""+s:"null";if("[object String]"==u)return P(""+s);if("object"==typeof s){for(A=a.length;A--;)if(a[A]===s)throw l();if(a.push(s),T=[],I=o,o+=i,"[object Array]"==u){for(C=0,A=s.length;C<A;C++)M=O(C,s,n,r,i,o,a),T.push(M===_?"null":M);R=T.length?i?"[\n"+o+T.join(",\n"+o)+"\n"+I+"]":"["+T.join(",")+"]":"[]"}else g(r||s,function(t){var e=O(t,s,n,r,i,o,a);e!==_&&T.push(P(t)+":"+(i?" ":"")+e)}),R=T.length?i?"{\n"+o+T.join(",\n"+o)+"\n"+I+"}":"{"+T.join(",")+"}":"{}";return a.pop(),R}};e.stringify=function(t,e,n){var i,o,a,s;if(r[typeof e]&&e)if("[object Function]"==(s=y.call(e)))o=e;else if("[object Array]"==s){a={};for(var u,c=0,h=e.length;c<h;u=e[c++],("[object String]"==(s=y.call(u))||"[object Number]"==s)&&(a[u]=1));}if(n)if("[object Number]"==(s=y.call(n))){if((n-=n%1)>0)for(i="",n>10&&(n=10);i.length<n;i+=" ");}else"[object String]"==s&&(i=n.length<=10?n:n.slice(0,10));return O("",(u={},u[""]=t,u),o,a,i,"",[])}}if(!i("json-parse")){var M,C,A=s.fromCharCode,I={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},R=function(){throw M=C=null,h()},D=function(){for(var t,e,n,r,i,o=C,a=o.length;M<a;)switch(i=o.charCodeAt(M)){case 9:case 10:case 13:case 32:M++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=b?o.charAt(M):o[M],M++,t;case 34:for(t="@",M++;M<a;)if((i=o.charCodeAt(M))<32)R();else if(92==i)switch(i=o.charCodeAt(++M)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=I[i],M++;break;case 117:for(e=++M,n=M+4;M<n;M++)(i=o.charCodeAt(M))>=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||R();t+=A("0x"+o.slice(e,M));break;default:R()}else{if(34==i)break;for(i=o.charCodeAt(M),e=M;i>=32&&92!=i&&34!=i;)i=o.charCodeAt(++M);t+=o.slice(e,M)}if(34==o.charCodeAt(M))return M++,t;R();default:if(e=M,45==i&&(r=!0,i=o.charCodeAt(++M)),i>=48&&i<=57){for(48==i&&(i=o.charCodeAt(M+1))>=48&&i<=57&&R(),r=!1;M<a&&(i=o.charCodeAt(M))>=48&&i<=57;M++);if(46==o.charCodeAt(M)){for(n=++M;n<a&&(i=o.charCodeAt(n))>=48&&i<=57;n++);n==M&&R(),M=n}if(101==(i=o.charCodeAt(M))||69==i){for(i=o.charCodeAt(++M),43!=i&&45!=i||M++,n=M;n<a&&(i=o.charCodeAt(n))>=48&&i<=57;n++);n==M&&R(),M=n}return+o.slice(e,M)}if(r&&R(),"true"==o.slice(M,M+4))return M+=4,!0;if("false"==o.slice(M,M+5))return M+=5,!1;if("null"==o.slice(M,M+4))return M+=4,null;R()}return"$"},L=function(t){var e,n;if("$"==t&&R(),"string"==typeof t){if("@"==(b?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];"]"!=(t=D());n||(n=!0))n&&(","==t?"]"==(t=D())&&R():R()),","==t&&R(),e.push(L(t));return e}if("{"==t){for(e={};"}"!=(t=D());n||(n=!0))n&&(","==t?"}"==(t=D())&&R():R()),","!=t&&"string"==typeof t&&"@"==(b?t.charAt(0):t[0])&&":"==D()||R(),e[t.slice(1)]=L(D());return e}R()}return t},k=function(t,e,n){var r=F(t,e,n);r===_?delete t[e]:t[e]=r},F=function(t,e,n){var r,i=t[e];if("object"==typeof i&&i)if("[object Array]"==y.call(i))for(r=i.length;r--;)k(i,r,n);else g(i,function(t){k(i,t,n)});return n.call(t,e,i)};e.parse=function(t,e){var n,r;return M=0,C=""+t,n=L(D()),"$"!=D()&&R(),M=C=null,e&&"[object Function]"==y.call(e)?F((r={},r[""]=n,r),"",e):n}}}return e.runInContext=n,e}var r={function:!0,object:!0},i=r.object&&e&&!e.nodeType&&e,o=r[typeof window]&&window||this,a=i&&r.object&&t&&!t.nodeType&&"object"==typeof rt&&rt;if(!a||a.global!==a&&a.window!==a&&a.self!==a||(o=a),i)n(o,i);else{var s=o.JSON,u=o.JSON3,c=!1,h=n(o,o.JSON3={noConflict:function(){return c||(c=!0,o.JSON=s,o.JSON3=u,s=u=null),h}});o.JSON={parse:h.parse,stringify:h.stringify}}}).call(rt)}
1),{DEFAULT_INSTANCE:"$default_instance",API_VERSION:2,MAX_STRING_LENGTH:4096,MAX_PROPERTY_KEYS:1e3,IDENTIFY_EVENT:"$identify",LAST_EVENT_ID:"amplitude_lastEventId",LAST_EVENT_TIME:"amplitude_lastEventTime",LAST_IDENTIFY_ID:"amplitude_lastIdentifyId",LAST_SEQUENCE_NUMBER:"amplitude_lastSequenceNumber",SESSION_ID:"amplitude_sessionId",DEVICE_ID:"amplitude_deviceId",OPT_OUT:"amplitude_optOut",USER_ID:"amplitude_userId",COOKIE_TEST:"amplitude_cookie_test",REVENUE_EVENT:"revenue_amount",REVENUE_PRODUCT_ID:"$productId",REVENUE_QUANTITY:"$quantity",REVENUE_PRICE:"$price",REVENUE_REVENUE_TYPE:"$revenueType",AMP_DEVICE_ID_PARAM:"amp_device_id"}),ot={encode:function(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e+=String.fromCharCode(r):r>127&&r<2048?(e+=String.fromCharCode(r>>6|192),e+=String.fromCharCode(63&r|128)):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128),e+=String.fromCharCode(63&r|128))}return e},decode:function(t){for(var e="",n=0,r=0,i=0,o=0;n<t.length;)r=t.charCodeAt(n),r<128?(e+=String.fromCharCode(r),n++):r>191&&r<224?(i=t.charCodeAt(n+1),e+=String.fromCharCode((31&r)<<6|63&i),n+=2):(i=t.charCodeAt(n+1),o=t.charCodeAt(n+2),e+=String.fromCharCode((15&r)<<12|(63&i)<<6|63&o),n+=3);return e}},at={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(t){try{if(window.btoa&&window.atob)return window.btoa(unescape(encodeURIComponent(t)))}catch(t){}return at._encode(t)},_encode:function(t){var e,n,r,i,o,a,s,u="",c=0;for(t=ot.encode(t);c<t.length;)e=t.charCodeAt(c++),n=t.charCodeAt(c++),r=t.charCodeAt(c++),i=e>>2,o=(3&e)<<4|n>>4,a=(15&n)<<2|r>>6,s=63&r,isNaN(n)?a=s=64:isNaN(r)&&(s=64),u=u+at._keyStr.charAt(i)+at._keyStr.charAt(o)+at._keyStr.charAt(a)+at._keyStr.charAt(s);return u},decode:function(t){try{if(window.btoa&&window.atob)return decodeURIComponent(escape(window.atob(t)))}catch(t){}return at._decode(t)},_decode:function(t){var e,n,r,i,o,a,s,u="",c=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");c<t.length;)i=at._keyStr.indexOf(t.charAt(c++)),o=at._keyStr.indexOf(t.charAt(c++)),a=at._keyStr.indexOf(t.charAt(c++)),s=at._keyStr.indexOf(t.charAt(c++)),e=i<<2|o>>4,n=(15&o)<<4|a>>2,r=(3&a)<<6|s,u+=String.fromCharCode(e),64!==a&&(u+=String.fromCharCode(n)),64!==s&&(u+=String.fromCharCode(r));return u=ot.decode(u)}},st=t(function(t,e){function n(t){switch(t){case"http:":return 80;case"https:":return 443;default:return location.port}}e.parse=function(t){var e=document.createElement("a");return e.href=t,{href:e.href,host:e.host||location.host,port:"0"===e.port||""===e.port?n(e.protocol):e.port,hash:e.hash,hostname:e.hostname||location.hostname,pathname:"/"!=e.pathname.charAt(0)?"/"+e.pathname:e.pathname,protocol:e.protocol&&":"!=e.protocol?e.protocol:location.protocol,search:e.search,query:e.search.slice(1)}},e.isAbsolute=function(t){return 0==t.indexOf("//")||!!~t.indexOf("://")},e.isRelative=function(t){return!e.isAbsolute(t)},e.isCrossDomain=function(t){t=e.parse(t);var n=e.parse(window.location.href);return t.hostname!==n.hostname||t.port!==n.port||t.protocol!==n.protocol}}),ut=1e3,ct=60*ut,ht=60*ct,lt=24*ht,ft=365.25*lt,dt=function(t,e){e=e||{};var n=typeof t;if("string"===n&&t.length>0)return o(t);if("number"===n&&!1===isNaN(t))return e.long?s(t):a(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))},pt=t(function(t,e){function n(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}function r(t){function r(){if(r.enabled){var t=r,n=+new Date,i=n-(o||n);t.diff=i,t.prev=o,t.curr=n,o=n;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!==typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=e.formatters[r];if("function"===typeof i){var o=a[u];n=i.call(t,o),a.splice(u,1),u--}return n}),e.formatArgs.call(t,a);(r.log||e.log||console.log.bind(console)).apply(t,a)}}var o;return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=n(t),r.destroy=i,"function"===typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}function o(t){e.save(t),e.names=[],e.skips=[];var n,r=("string"===typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&(t=r[n].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}}function a(){e.enable("")}function s(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1}function u(t){return t instanceof Error?t.stack||t.message:t}
1e=t.exports=r.debug=r.default=r,e.coerce=u,e.disable=a,e.enable=o,e.enabled=s,e.humanize=dt,e.instances=[],e.names=[],e.skips=[],e.formatters={}}),gt=t(function(t,e){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,r)}}function a(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function u(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!==typeof r&&"env"in r&&(t=n.i({NODE_ENV:"production",PUBLIC_URL:""}).DEBUG),t}e=t.exports=pt,e.log=a,e.formatArgs=o,e.save=s,e.load=u,e.useColors=i,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(u())}),_t=gt("cookie"),mt=function(t,e,n){switch(arguments.length){case 3:case 2:return c(t,e,n);case 1:return l(t);default:return h()}},yt=t(function(t,e){function n(t){for(var n=e.cookie,r=e.levels(t),i=0;i<r.length;++i){var o=r[i],a={domain:"."+o};if(n("__tld__",1,a),n("__tld__"))return n("__tld__",null,a),o}return""}var r=st.parse;n.levels=function(t){var e=r(t).hostname,n=e.split("."),i=n[n.length-1],o=[];if(4===n.length&&i===parseInt(i,10))return o;if(n.length<=1)return o;for(var a=n.length-2;a>=0;--a)o.push(n.slice(a).join("."));return o},n.cookie=mt,e=t.exports=n}),vt="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},bt=Object.prototype.toString,wt=function(t){switch(bt.call(t)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===t?"null":void 0===t?"undefined":t!==t?"nan":t&&1===t.nodeType?"element":"undefined"!==typeof i&&i.isBuffer(t)?"buffer":(t=t.valueOf?t.valueOf():Object.prototype.valueOf.apply(t),"undefined"===typeof t?"undefined":vt(t))},xt="WARN",St={DISABLE:0,ERROR:1,WARN:2,INFO:3},Tt=function(t){xt=St[t]||xt},Et=function(){return xt},Pt={error:function(t){xt>=St.ERROR&&Ot(t)},warn:function(t){xt>=St.WARN&&Ot(t)},info:function(t){xt>=St.INFO&&Ot(t)}},Ot=function(t){try{console.log("[Amplitude] "+t)}catch(t){}},Mt=function(t){return!t||0===t.length},Ct=function(){try{if(window.sessionStorage)return!0}catch(t){}return!1},At=function t(e){if("array"===wt(e))for(var n=0;n<e.length;n++)e[n]=t(e[n]);else if("object"===wt(e))for(var r in e)e.hasOwnProperty(r)&&(e[r]=t(e[r]));else e=It(e);return e},It=function(t){return"string"===wt(t)&&t.length>it.MAX_STRING_LENGTH?t.substring(0,it.MAX_STRING_LENGTH):t},Rt=function(t,e,n){return wt(t)===n||(Pt.error("Invalid "+e+" input type. Expected "+n+" but received "+wt(t)),!1)},Dt=function(t){var e=wt(t);if("object"!==e)return Pt.error("Error: invalid properties format. Expecting Javascript object, received "+e+", ignoring"),{};if(Object.keys(t).length>it.MAX_PROPERTY_KEYS)return Pt.error("Error: too many properties (more than 1000), ignoring"),{};var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=r,o=wt(i);"string"!==o&&(i=String(i),Pt.warn("WARNING: Non-string property key, received type "+o+', coercing to string "'+i+'"'));var a=kt(i,t[r]);null!==a&&(n[i]=a)}return n},Lt=["null","nan","undefined","function","arguments","regexp","element"],kt=function t(e,n){var r=wt(n);if(-1!==Lt.indexOf(r))Pt.warn('WARNING: Property key "'+e+'" with invali
1d value type '+r+", ignoring"),n=null;else if("error"===r)n=String(n),Pt.warn('WARNING: Property key "'+e+'" with value type error, coercing to '+n);else if("array"===r){for(var i=[],o=0;o<n.length;o++){var a=n[o],s=wt(a);"array"!==s&&"object"!==s?i.push(t(e,a)):Pt.warn("WARNING: Cannot have "+s+" nested in an array property value, skipping")}n=i}else"object"===r&&(n=Dt(n));return n},Ft=function(t){var e=wt(t);if("object"!==e)return Pt.error("Error: invalid groups format. Expecting Javascript object, received "+e+", ignoring"),{};var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=r,o=wt(i);"string"!==o&&(i=String(i),Pt.warn("WARNING: Non-string groupType, received type "+o+', coercing to string "'+i+'"'));var a=Nt(i,t[r]);null!==a&&(n[i]=a)}return n},Nt=function(t,e){var n=wt(e);if("string"===n)return e;if("date"===n||"number"===n||"boolean"===n)return e=String(e),Pt.warn("WARNING: Non-string groupName, received type "+n+', coercing to string "'+e+'"'),e;if("array"===n){for(var r=[],i=0;i<e.length;i++){var o=e[i],a=wt(o);"array"!==a&&"object"!==a?"string"===a?r.push(o):"date"!==a&&"number"!==a&&"boolean"!==a||(o=String(o),Pt.warn("WARNING: Non-string groupName, received type "+a+', coercing to string "'+o+'"'),r.push(o)):Pt.warn("WARNING: Skipping nested "+a+" in array groupName")}return r}Pt.warn("WARNING: Non-string groupName, received type "+n+". Please use strings or array of strings for groupName")},Bt=function(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+t+"=([^&#]*)"),r=n.exec(e);return null===r?void 0:decodeURIComponent(r[1].replace(/\+/g," "))},jt={setLogLevel:Tt,getLogLevel:Et,log:Pt,isEmptyString:Mt,getQueryParam:Bt,sessionStorageEnabled:Ct,truncate:At,validateGroups:Ft,validateInput:Rt,validateProperties:Dt},Ut={expirationDays:void 0,domain:void 0},Ht=function(){Ut={expirationDays:void 0,domain:void 0}},Wt=function(t){if(0===arguments.length)return Ut;t=t||{},Ut.expirationDays=t.expirationDays;var e=jt.isEmptyString(t.domain)?"."+yt(window.location.href):t.domain,n=Math.random();Ut.domain=e,Yt("amplitude_test",n);var r=Gt("amplitude_test");r&&r===n||(e=null),Xt("amplitude_test"),Ut.domain=e},Vt=function(t){var e="";return Ut.domain&&(e="."===Ut.domain.charAt(0)?Ut.domain.substring(1):Ut.domain),t+e},Gt=function(t){try{for(var e=Vt(t)+"=",n=document.cookie.split(";"),r=null,i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(e)){r=o.substring(e.length,o.length);break}}return r?JSON.parse(at.decode(r)):null}catch(t){return null}},Yt=function(t,e){try{return zt(Vt(t),at.encode(JSON.stringify(e)),Ut),!0}catch(t){return!1}},zt=function(t,e,n){var r=null!==e?n.expirationDays:-1;if(r){var i=new Date;i.setTime(i.getTime()+24*r*60*60*1e3),r=i}var o=t+"="+e;r&&(o+="; expires="+r.toUTCString()),o+="; path=/",n.domain&&(o+="; domain="+n.domain),document.cookie=o},Xt=function(t){try{return zt(Vt(t),null,Ut),!0}catch(t){return!1}},qt={reset:Ht,options:Wt,get:Gt,set:Yt,remove:Xt};if(function(){var t,e=new Date;try{return window.localStorage.setItem(e,e),t=window.localStorage.getItem(e)===String(e),window.localStorage.removeItem(e),t}catch(t){}return!1}())nt=window.localStorage;else if(window.globalStorage)try{nt=window.globalStorage[window.location.hostname]}catch(t){}else{var Kt=document.createElement("div"),Zt="localStorage";Kt.style.display="none",document.getElementsByTagName("head")[0].appendChild(Kt),Kt.addBehavior&&(Kt.addBehavior("#default#userdata"),nt={length:0,setItem:function(t,e){Kt.load(Zt),Kt.getAttribute(t)||this.length++,Kt.setAttribute(t,e),Kt.save(Zt)},getItem:function(t){return Kt.load(Zt),Kt.getAttribute(t)},removeItem:function(t){Kt.load(Zt),Kt.getAttribute(t)&&this.length--,Kt.removeAttribute(t),Kt.save(Zt)},clear:function(){Kt.load(Zt);for(var t,e=0;t=Kt.XMLDocument.documentElement.attributes[e++];)Kt.removeAttribute(t.name);Kt.save(Zt),this.length=0},key:function(t){return Kt.load(Zt),Kt.XMLDocument.documentElement.attributes[t]}},Kt.load(Zt),nt.length=Kt.XMLDocument.documentElement.attributes.length)}nt||(nt={length:0,setItem:function(t,e){},getItem:function(t){},removeItem:function(t){},clear:function(){},key:function(t){}}
1);var Jt=nt,$t=function(){this.storage=null};$t.prototype._cookiesEnabled=function(){var t,e=String(new Date);try{return qt.set(it.COOKIE_TEST,e),t=qt.get(it.COOKIE_TEST)===e,qt.remove(it.COOKIE_TEST),t}catch(t){}return!1},$t.prototype.getStorage=function(){if(null!==this.storage)return this.storage;if(this._cookiesEnabled())this.storage=qt;else{this.storage={_options:{expirationDays:void 0,domain:void 0},reset:function(){this._options={expirationDays:void 0,domain:void 0}},options:function(t){return 0===arguments.length?this._options:(t=t||{},this._options.expirationDays=t.expirationDays||this._options.expirationDays,this._options.domain=t.domain||this._options.domain||window.location.hostname,this._options)},get:function(t){try{return JSON.parse(Jt.getItem("amp_cookiestore_"+t))}catch(t){}return null},set:function(t,e){try{return Jt.setItem("amp_cookiestore_"+t,JSON.stringify(e)),!0}catch(t){}return!1},remove:function(t){try{Jt.removeItem("amp_cookiestore_"+t)}catch(t){return!1}}}}return this.storage};var Qt=function(t,e){var n=t?"?"+t.split(".").slice(-1)[0].replace(/\|/g,"&"):"",r=function(t,e,n,r){return jt.getQueryParam(t,e)||jt.getQueryParam(n,r)},i=r("utm_source",e,"utmcsr",n),o=r("utm_medium",e,"utmcmd",n),a=r("utm_campaign",e,"utmccn",n),s=r("utm_term",e,"utmctr",n),u=r("utm_content",e,"utmcct",n),c={},h=function(t,e){jt.isEmptyString(e)||(c[t]=e)};return h("utm_source",i),h("utm_medium",o),h("utm_campaign",a),h("utm_term",s),h("utm_content",u),c},te=function(){this.userPropertiesOperations={},this.properties=[]};te.prototype.add=function(t,e){return"number"===wt(e)||"string"===wt(e)?this._addOperation("$add",t,e):jt.log.error("Unsupported type for value: "+wt(e)+", expecting number or string"),this},te.prototype.append=function(t,e){return this._addOperation("$append",t,e),this},te.prototype.clearAll=function(){return Object.keys(this.userPropertiesOperations).length>0?(this.userPropertiesOperations.hasOwnProperty("$clearAll")||jt.log.error("Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll"),this):(this.userPropertiesOperations.$clearAll="-",this)},te.prototype.prepend=function(t,e){return this._addOperation("$prepend",t,e),this},te.prototype.set=function(t,e){return this._addOperation("$set",t,e),this},te.prototype.setOnce=function(t,e){return this._addOperation("$setOnce",t,e),this},te.prototype.unset=function(t){return this._addOperation("$unset",t,"-"),this},te.prototype._addOperation=function(t,e,n){return this.userPropertiesOperations.hasOwnProperty("$clearAll")?void jt.log.error("This identify already contains a $clearAll operation, skipping operation "+t):-1!==this.properties.indexOf(e)?void jt.log.error('User property "'+e+'" already used in this identify, skipping operation '+t):(this.userPropertiesOperations.hasOwnProperty(t)||(this.userPropertiesOperations[t]={}),this.userPropertiesOperations[t][e]=n,void this.properties.push(e))};var ee=t(function(t){!function(e){function n(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function r(t,e){return t<<e|t>>>32-e}function i(t,e,i,o,a,s){return n(r(n(n(e,t),n(o,s)),a),i)}function o(t,e,n,r,o,a,s){return i(e&n|~e&r,t,e,o,a,s)}function a(t,e,n,r,o,a,s){return i(e&r|n&~r,t,e,o,a,s)}function s(t,e,n,r,o,a,s){return i(e^n^r,t,e,o,a,s)}function u(t,e,n,r,o,a,s){return i(n^(e|~r),t,e,o,a,s)}function c(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var r,i,c,h,l,f=1732584193,d=-271733879,p=-1732584194,g=271733878;for(r=0;r<t.length;r+=16)i=f,c=d,h=p,l=g,f=o(f,d,p,g,t[r],7,-680876936),g=o(g,f,d,p,t[r+1],12,-389564586),p=o(p,g,f,d,t[r+2],17,606105819),d=o(d,p,g,f,t[r+3],22,-1044525330),f=o(f,d,p,g,t[r+4],7,-176418897),g=o(g,f,d,p,t[r+5],12,1200080426),p=o(p,g,f,d,t[r+6],17,-1473231341),d=o(d,p,g,f,t[r+7],22,-45705983),f=o(f,d,p,g,t[r+8],7,1770035416),g=o(g,f,d,p,t[r+9],12,-1958414417),p=o(p,g,f,d,t[r+10],17,-42063),d=o(d,p,g,f,t[r+11],22,-1990404162),f=o(f,d,p,g,t[r+12],7,1804603682),g=o(g,f,d,p,t[r+13],12,-40341101),p=o(p,g,f,d,t[r+14],17,-1502002290),d=o(d,p,g,f,t[r+15],22,1236535329),f=a(f,d,p,g,t[r+1],5,-165796510),g=a(g,f,d,p,t[r+6],9,-1069501632),p=a(p,g,f,d,t[r+11],14,643717713),d=a(d,p,g,f,t[r],20,-373897302),f=
1a(f,d,p,g,t[r+5],5,-701558691),g=a(g,f,d,p,t[r+10],9,38016083),p=a(p,g,f,d,t[r+15],14,-660478335),d=a(d,p,g,f,t[r+4],20,-405537848),f=a(f,d,p,g,t[r+9],5,568446438),g=a(g,f,d,p,t[r+14],9,-1019803690),p=a(p,g,f,d,t[r+3],14,-187363961),d=a(d,p,g,f,t[r+8],20,1163531501),f=a(f,d,p,g,t[r+13],5,-1444681467),g=a(g,f,d,p,t[r+2],9,-51403784),p=a(p,g,f,d,t[r+7],14,1735328473),d=a(d,p,g,f,t[r+12],20,-1926607734),f=s(f,d,p,g,t[r+5],4,-378558),g=s(g,f,d,p,t[r+8],11,-2022574463),p=s(p,g,f,d,t[r+11],16,1839030562),d=s(d,p,g,f,t[r+14],23,-35309556),f=s(f,d,p,g,t[r+1],4,-1530992060),g=s(g,f,d,p,t[r+4],11,1272893353),p=s(p,g,f,d,t[r+7],16,-155497632),d=s(d,p,g,f,t[r+10],23,-1094730640),f=s(f,d,p,g,t[r+13],4,681279174),g=s(g,f,d,p,t[r],11,-358537222),p=s(p,g,f,d,t[r+3],16,-722521979),d=s(d,p,g,f,t[r+6],23,76029189),f=s(f,d,p,g,t[r+9],4,-640364487),g=s(g,f,d,p,t[r+12],11,-421815835),p=s(p,g,f,d,t[r+15],16,530742520),d=s(d,p,g,f,t[r+2],23,-995338651),f=u(f,d,p,g,t[r],6,-198630844),g=u(g,f,d,p,t[r+7],10,1126891415),p=u(p,g,f,d,t[r+14],15,-1416354905),d=u(d,p,g,f,t[r+5],21,-57434055),f=u(f,d,p,g,t[r+12],6,1700485571),g=u(g,f,d,p,t[r+3],10,-1894986606),p=u(p,g,f,d,t[r+10],15,-1051523),d=u(d,p,g,f,t[r+1],21,-2054922799),f=u(f,d,p,g,t[r+8],6,1873313359),g=u(g,f,d,p,t[r+15],10,-30611744),p=u(p,g,f,d,t[r+6],15,-1560198380),d=u(d,p,g,f,t[r+13],21,1309151649),f=u(f,d,p,g,t[r+4],6,-145523070),g=u(g,f,d,p,t[r+11],10,-1120210379),p=u(p,g,f,d,t[r+2],15,718787259),d=u(d,p,g,f,t[r+9],21,-343485551),f=n(f,i),d=n(d,c),p=n(p,h),g=n(g,l);return[f,d,p,g]}function h(t){var e,n="",r=32*t.length;for(e=0;e<r;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function l(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var r=8*t.length;for(e=0;e<r;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function f(t){return h(c(l(t),8*t.length))}function d(t,e){var n,r,i=l(t),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=c(i,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=c(o.concat(l(e)),512+8*e.length),h(c(a.concat(r),640))}function p(t){var e,n,r="0123456789abcdef",i="";for(n=0;n<t.length;n+=1)e=t.charCodeAt(n),i+=r.charAt(e>>>4&15)+r.charAt(15&e);return i}function g(t){return unescape(encodeURIComponent(t))}function _(t){return f(g(t))}function m(t){return p(_(t))}function y(t,e){return d(g(t),g(e))}function v(t,e){return p(y(t,e))}function b(t,e,n){return e?n?y(e,t):v(e,t):n?_(t):m(t)}t.exports?t.exports=b:e.md5=b}(rt)}),ne="object"==typeof rt&&rt&&rt.Object===Object&&rt,re=ne,ie="object"==typeof self&&self&&self.Object===Object&&self,oe=re||ie||Function("return this")(),ae=oe,se=ae.Symbol,ue=se,ce=Object.prototype,he=ce.hasOwnProperty,le=ce.toString,fe=ue?ue.toStringTag:void 0,de=g,pe=Object.prototype,ge=pe.toString,_e=_,me="[object Null]",ye="[object Undefined]",ve=ue?ue.toStringTag:void 0,be=m,we=y,xe="[object AsyncFunction]",Se="[object Function]",Te="[object GeneratorFunction]",Ee="[object Proxy]",Pe=v,Oe=ae["__core-js_shared__"],Me=Oe,Ce=function(){var t=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ae=b,Ie=Function.prototype,Re=Ie.toString,De=w,Le=/[\\^$.*+?()[\]{}|]/g,ke=/^\[object .+?Constructor\]$/,Fe=Function.prototype,Ne=Object.prototype,Be=Fe.toString,je=Ne.hasOwnProperty,Ue=RegExp("^"+Be.call(je).replace(Le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=x,We=S,Ve=T,Ge=function(){try{var t=Ve(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ye=Ge,ze=E,Xe=P,qe=Object.prototype,Ke=qe.hasOwnProperty,Ze=O,Je=M,$e=C,Qe=A,tn=Math.max,en=I,nn=R,rn=Ye?function(t,e){return Ye(t,"toString",{configurable:!0,enumerable:!1,value:nn(e),writable:!0})}:$e,on=rn,an=800,sn=16,un=Date.now,cn=D,hn=cn(on),ln=hn,fn=L,dn=9007199254740991,pn=k,gn=F,_n=9007199254740991,mn=/^(?:0|[1-9]\d*)$/,yn=N,vn=B,bn=j,wn=Object.prototype,xn=U,Sn=H,Tn=W,En="[object Arguments]",Pn=V,On=Object.prototype,Mn=On.hasOwnProperty,Cn=On.propertyIsEnumerable,An=Pn(function(){return arguments}())?Pn:function(t){return Tn(t)&&Mn.call(t,"callee")&&!Cn.call(t,"callee")},In=An,Rn=Array.isArray,Dn=Rn,Ln=G,kn=t(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i?ae.Buffer:void 0,a=o?o.isBuffer:void 0,s=a||Ln;t.exports=s}),Fn={};
1Fn["[object Float32Array]"]=Fn["[object Float64Array]"]=Fn["[object Int8Array]"]=Fn["[object Int16Array]"]=Fn["[object Int32Array]"]=Fn["[object Uint8Array]"]=Fn["[object Uint8ClampedArray]"]=Fn["[object Uint16Array]"]=Fn["[object Uint32Array]"]=!0,Fn["[object Arguments]"]=Fn["[object Array]"]=Fn["[object ArrayBuffer]"]=Fn["[object Boolean]"]=Fn["[object DataView]"]=Fn["[object Date]"]=Fn["[object Error]"]=Fn["[object Function]"]=Fn["[object Map]"]=Fn["[object Number]"]=Fn["[object Object]"]=Fn["[object RegExp]"]=Fn["[object Set]"]=Fn["[object String]"]=Fn["[object WeakMap]"]=!1;var Nn=Y,Bn=z,jn=t(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i&&re.process,a=function(){try{return o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}),Un=jn&&jn.isTypedArray,Hn=Un?Bn(Un):Nn,Wn=Hn,Vn=Object.prototype,Gn=Vn.hasOwnProperty,Yn=X,zn=q,Xn=zn(Object.keys,Object),qn=Xn,Kn=Object.prototype,Zn=Kn.hasOwnProperty,Jn=K,$n=Z,Qn=Object.prototype,tr=Qn.hasOwnProperty,er=bn(function(t,e){if(xn(e)||gn(e))return void Je(e,$n(e),t);for(var n in e)tr.call(e,n)&&Ze(t,n,e[n])}),nr=er,rr=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ir=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e},or={encode:Q,stringify:Q,decode:et,parse:et},ar=function(t,e){this.url=t,this.data=e||{}};ar.prototype.send=function(t){if(!window.XDomainRequest){var e=new XMLHttpRequest;e.open("POST",this.url,!0),e.onreadystatechange=function(){4===e.readyState&&t(e.status,e.responseText)},e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(or.stringify(this.data))}else{var n=new window.XDomainRequest;n.open("POST",this.url,!0),n.onload=function(){t(200,n.responseText)},n.onerror=function(){"Request Entity Too Large"===n.responseText?t(413,n.responseText):t(500,n.responseText)},n.ontimeout=function(){},n.onprogress=function(){},n.send(or.stringify(this.data))}};var sr=function(){this._price=null,this._productId=null,this._quantity=1,this._revenueType=null,this._properties=null};sr.prototype.setProductId=function(t){return"string"!==wt(t)?jt.log.error("Unsupported type for productId: "+wt(t)+", expecting string"):jt.isEmptyString(t)?jt.log.error("Invalid empty productId"):this._productId=t,this},sr.prototype.setQuantity=function(t){return"number"!==wt(t)?jt.log.error("Unsupported type for quantity: "+wt(t)+", expecting number"):this._quantity=parseInt(t),this},sr.prototype.setPrice=function(t){return"number"!==wt(t)?jt.log.error("Unsupported type for price: "+wt(t)+", expecting number"):this._price=t,this},sr.prototype.setRevenueType=function(t){return"string"!==wt(t)?jt.log.error("Unsupported type for revenueType: "+wt(t)+", expecting string"):this._revenueType=t,this},sr.prototype.setEventProperties=function(t){return"object"!==wt(t)?jt.log.error("Unsupported type for eventProperties: "+wt(t)+", expecting object"):this._properties=jt.validateProperties(t),this},sr.prototype._isValidRevenue=function(){return"number"===wt(this._price)||(jt.log.error("Invalid revenue, need to set price field"),!1)},sr.prototype._toJSONObject=function(){var t="object"===wt(this._properties)?this._properties:{};return null!==this._productId&&(t[it.REVENUE_PRODUCT_ID]=this._productId),null!==this._quantity&&(t[it.REVENUE_QUANTITY]=this._quantity),null!==this._price&&(t[it.REVENUE_PRICE]=this._price),null!==this._revenueType&&(t[it.REVENUE_REVENUE_TYPE]=this._revenueType),t};var ur=t(function(t,e){!function(n,r){var i="model",o="name",a="type",s="vendor",u="version",c="mobile",h="tablet",l={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2===0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return"string"===typeof t&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return"string"===typeof t?t.split(".")[0]:r}},f={rgx:function(){for(var t,e,n,i,o,a,s,u=0,c=arguments;u<c.length&&!a;){var h=c[u],l=c[u+1];if("undefined"===typeof t){t={};for(i in l)l.hasOwnProperty(i)&&(o=l[i],"object"===typeof o?t[o[0]]=r:t[o]=r)}
1for(e=n=0;e<h.length&&!a;)if(a=h[e++].exec(this.getUA()))for(i=0;i<l.length;i++)s=a[++n],o=l[i],"object"===typeof o&&o.length>0?2==o.length?"function"==typeof o[1]?t[o[0]]=o[1].call(this,s):t[o[0]]=o[1]:3==o.length?"function"!==typeof o[1]||o[1].exec&&o[1].test?t[o[0]]=s?s.replace(o[1],o[2]):r:t[o[0]]=s?o[1].call(this,s,o[2]):r:4==o.length&&(t[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):r):t[o]=s||r;u+=2}return t},str:function(t,e){for(var n in e)if("object"===typeof e[n]&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(l.has(e[n][i],t))return"?"===n?r:n}else if(l.has(e[n],t))return"?"===n?r:n;return t}},d={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},name:{"Opera Mobile":"Opera Mobi","IE Mobile":"IEMobile"}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},name:{"Windows Phone":"Windows Phone OS"}}}},p={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[o,u],[/(OPiOS)[\/\s]+([\w\.]+)/i],[[o,"Opera Mini"],u],[/\s(opr)\/([\w\.]+)/i],[[o,"Opera"],u],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs)\/([\w\.-]+)/i],[o,u],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[o,"IE"],u],[/(edge)\/((\d+)?[\w\.]+)/i],[o,u],[/(yabrowser)\/([\w\.]+)/i],[[o,"Yandex"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],u],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[o,"Chrome Mobile"],u],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,/(qqbrowser)[\/\s]?([\w\.]+)/i],[o,u],[/(uc\s?browser)[\/\s]?([\w\.]+)/i,/ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i,/JUC.+(ucweb)[\/\s]?([\w\.]+)/i],[[o,"UCBrowser"],u],[/(dolfin)\/([\w\.]+)/i],[[o,"Dolphin"],u],[/XiaoMi\/MiuiBrowser\/([\w\.]+)/i],[u,[o,"MIUI Browser"]],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i],[u,[o,"Android Browser"]],[/FBAV\/([\w\.]+);/i],[u,[o,"Facebook"]],[/fxios\/([\w\.-]+)/i],[u,[o,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[u,[o,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[u,o],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[o,[u,f.str,d.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[o,u],[/(blackberry)\\s?\/([\w\.]+)/i],[[o,"BlackBerry"],u],[/(navigator|netscape)\/([\w\.-]+)/i],[[o,"Netscape"],u],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.
1+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[o,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",l.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",l.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",l.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[i,s,[a,h]],[/applecoremedia\/[\w\.]+ \((ipad)/],[i,[s,"Apple"],[a,h]],[/(apple\s{0,1}tv)/i],[[i,"Apple TV"],[s,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[s,i,[a,h]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],[i,[s,"Amazon"],[a,h]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[[i,f.str,d.device.amazon.model],[s,"Amazon"],[a,c]],[/\
vendor: 3,279 bytes, line 1
1((ip[honed|\s\w*]+);.+(apple)/i],[i,s,[a,c]],[/\((ip[honed|\s\w*]+);/i],[i,[s,"Apple"],[a,c]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[s,i,[a,c]],[/\(bb10;\s(\w+)/i],[i,[s,"BlackBerry"],[a,c]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7)/i],[i,[s,"Asus"],[a,h]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[s,"Sony"],[i,"Xperia Tablet"],[a,h]],[/(?:sony)?(?:(?:(?:c|d)\d{4})|(?:so[-l].+))\sbuild\//i],[[s,"Sony"],[i,"Xperia Phone"],[a,c]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[s,i,[a,"console"]],[/android.+;\s(shield)\sbuild/i],[i,[s,"Nvidia"],[a,"console"]],[/(playstation\s[34portablevi]+)/i],[i,[s,"Sony"],[a,"console"]],[/(sprint\s(\w+))/i],[[s,f.str,d.device.sprint.vendor],[i,f.str,d.device.sprint.model],[a,c]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[s,i,[a,h]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,/(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],[s,[i,/_/g," "],[a,c]],[/(nexus\s9)/i],[i,[s,"HTC"],[a,h]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[i,[s,"Microsoft"],[a,"console"]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[s,"Microsoft"],[a,c]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i,/(nexus\s[6])/i],[i,[s,"Motorola"],[a,c]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[s,"Motorola"],[a,h]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[s,"Samsung"],i,[a,h]],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-n900))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[[s,"Samsung"],i,[a,c]],[/(samsung);smarttv/i],[s,i,[a,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[i,[s,"Sharp"],[a,"smarttv"]],[/sie-(\w+)*/i],[i,[s,"Siemens"],[a,c]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[[s,"Nokia"],i,[a,c]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[i,[s,"Acer"],[a,h]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[s,"LG"],i,[a,h]],[/(lg) netcast\.tv/i],[s,i,[a,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w+)*/i],[i,[s,"LG"],[a,c]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[i,[s,"Lenovo"],[a,h]],[/linux;.+((jolla));/i],[s,i,[a,c]],[/((pebble))app\/[\d\.]+\s/i],[s,i,[a,"wearable"]],[/android.+;\s(glass)\s\d/i],[i,[s,"Google"],[a,"wearable"]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus)?[\s_]*(?:\d\w)?)\s+build/i],[[i,/_/g," "],[s,"Xiaomi"],[a,c]],[/\s(tablet)[;\/\s]/i,/\s(mobile)[;\/\s]/i],[[a,l.lowerize],s,i]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[u,[o,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[o,u],[/rv\:([\w\.]+).*(gecko)/i],[u,o]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[o,u],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[o,f.str,d.os.windows.name],[u,f.str,d.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[o,"Windows"],[u,f.str,d.os.windows.version]],[/\((bb)(10);
1/i],[[o,"BlackBerry"],u],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[o,u],[/(symbian\s?o?s?|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[o,"Symbian"],u],[/\((series40);/i],[o],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[o,"Firefox OS"],u],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[[o,"Linux"],u],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[o,"Chromium OS"],u],[/(sunos)\s?([\w\.]+\d)*/i],[[o,"Solaris"],u],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[[o,"Linux"],u],[/(iphone)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[o,"iPhone"],[u,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[o,"iPad"],[u,/_/g,"."]],[/(ip[honead]+)(?:.*os\s([\w]+)*\slike\smac|;\sopera)/i],[[o,"iOS"],[u,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[o,"Mac"],[u,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[o,u]]},g=function(t,e){if(!(this instanceof g))return new g(t,e).getResult();var r=t||(n&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),i=e?l.extend(p,e):p;return this.getBrowser=function(){var t=f.rgx.apply(this,i.browser);return t.major=l.major(t.version),t},this.getCPU=function(){return f.rgx.apply(this,i.cpu)},this.getDevice=function(){return f.rgx.apply(this,i.device)},this.getEngine=function(){return f.rgx.apply(this,i.engine)},this.getOS=function(){return f.rgx.apply(this,i.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(t){return r=t,this},this};g.VERSION="0.7.10",g.BROWSER={NAME:o,MAJOR:"major",VERSION:u},g.CPU={ARCHITECTURE:"architecture"},g.DEVICE={MODEL:i,VENDOR:s,TYPE:a,CONSOLE:"console",MOBILE:c,SMARTTV:"smarttv",TABLET:h,WEARABLE:"wearable",EMBEDDED:"embedded"},g.ENGINE={NAME:o,VERSION:u},g.OS={NAME:o,VERSION:u},t.exports&&(e=t.exports=g),e.UAParser=g;var _=n.jQuery||n.Zepto;if("undefined"!==typeof _){var m=new g;_.ua=m.getResult(),_.ua.get=function(){return m.getUA()},_.ua.set=function(t){m.setUA(t);var e=m.getResult();for(var n in e)_.ua[n]=e[n]}}}("object"===typeof window?window:rt)}),cr=function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)},hr={language:function(){return navigator&&(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||void 0}()},lr={apiEndpoint:"api.amplitude.com",cookieExpiration:3650,cookieName:"amplitude_id",domain:"",includeReferrer:!1,includeUtm:!1,language:hr.language,logLevel:"WARN",optOut:!1,platform:"Web",savedMaxCount:1e3,saveEvents:!0,sessionTimeout:18e5,unsentKey:"amplitude_unsent",unsentIdentifyKey:"amplitude_unsent_identify",uploadBatchSize:100,batchEvents:!1,eventUploadThreshold:30,eventUploadPeriodMillis:3e4,forceHttps:!1,includeGclid:!1,saveParamsReferrerOncePerSession:!0,deviceIdFromUrlParam:!1},fr=function(t){this._instanceName=jt.isEmptyString(t)?it.DEFAULT_INSTANCE:t.toLowerCase(),this._storageSuffix=this._instanceName===it.DEFAULT_INSTANCE?"":"_"+this._instanceName,this._unsentEvents=[],this._unsentIdentifys=[],this._ua=new ur(navigator.userAgent).getResult(),this.options=nr({},lr),this.cookieStorage=(new $t).getStorage(),this._q=[],this._sending=!1,this._updateScheduled=!1,this._eventId=0,this._identifyId=0,this._lastEventTime=null,this._newSession=!1,this._sequenceNumber=0,this._sessionId=null,this._userAgent=navigator&&navigator.userAgent||null};fr.prototype.Identify=te,fr.prototype.Revenue=sr,fr.prototype.init=function(t,e,n,r){if("string"!==wt(t)||jt.isEmptyString(t))return void jt.log.error("Invalid apiKey. Please re-initialize with a valid apiKey");try{if(this.options.apiKey=t,dr(this.options,n),this.cookieStorage.options({expirationDays:this.options.cookieExpiration,domain:this.options.domain}),this.options.domain=this.cookieStorage.options().domain,this._instanceName===it.DEFAULT_INSTANCE&&pr(this),gr(this),this.options.deviceId="object"===wt(n)&&"string"===wt(n.deviceId)&&!jt.isEmptyString(n.deviceId)&&n.deviceId||this.options.deviceIdFromUrlParam&&this._getDeviceIdFromUrlParam(this._getUrlParams())||this.options.deviceId||cr()+"R",this.options.userId="string"===wt(e)&&!jt.isEmptyString(e)&&e||this.options.userId||null,this.options.saveEvents){this._unsentEvents=this._loadSavedUnsentEvents(this.options.unsentKey),this._unsentIdentifys=this._loadSavedUnsentEvents(this.options.unsentIdentifyKey);for(var i=0;i<this._unsentEvents.length;i++){var o=this._unsentEvents[i].event_properties,a=this._unsentEvents[i].groups;this._unsentEvents[i].event_properties=jt.validateProperties(o),this._unsentEvents[i].groups=jt.validateGroups(a)}for(var s=0;s<this._unsentIdentifys.length;s++){var u=this._unsentIdentifys[s].user_properties,c=this._unsentIdentifys[s].groups;this._unsentIdentifys[s].user_properties=jt.validateProperties(u),this._unsentIdentifys[s].groups=jt.validateGroups(c)}}var h=(new Date).getTime();(!this._sessionId||!this._lastEventTime||h-this._lastEventTime>this.options.sessionTimeout)&&(this._newSession=!0,this._sessionId=h,this.options.saveParamsReferrerOncePerSession&&this._trackParamsAndReferrer()),this.options.saveParamsReferrerOncePerSession||this._trackParamsAndReferrer(),this._lastEventTime=h,_r(this),this._sendEventsIfReady()}catch(t){jt.log.error(t)}finally{"function"===wt(r)&&r(this)}},fr.prototype._trackParamsAndReferrer=function(){this.options.includeUtm&&this._initUtmData(),this.options.includeReferrer&&this._saveReferrer(this._getReferrer()),this.options.includeGclid&&this._saveGclid(this._getUrlParams())};var dr=function(t,e){if("object"===wt(e)){for(var n in e)e.hasOwnProperty(n)&&function(n){if(lr.hasOwnProperty(n)){var r=e[n],i=wt(lr[n]);jt.validateInput(r,n+" option",i)&&("boolean"===i?t[n]=!!r:("string"===i&&!jt.isEmptyString(r)||"number"===i&&r>0)&&(t[n]=r))}}(n)}};fr.prototype.runQueuedFunctions=function(){for(var t=0;t<this._q.length;t++){var e=this[this._q[t][0]];"function"===wt(e)&&e.apply(this,this._q[t].slice(1))}this._q=[]},fr.prototype._apiKeySet=function(t){return!jt.isEmptyString(this.options.apiKey)||(jt.log.error("Invalid apiKey. Please set a valid apiKey with init() before calling "+t),!1)},fr.prototype._loadSavedUnsentEvents=function(t){var e=this._getFromStorage(Jt,t);
1if(jt.isEmptyString(e))return[];if("string"===wt(e))try{var n=JSON.parse(e);if("array"===wt(n))return n}catch(t){}return jt.log.error("Unable to load "+t+" events. Restart with a new empty queue."),[]},fr.prototype.isNewSession=function(){return this._newSession},fr.prototype.getSessionId=function(){return this._sessionId},fr.prototype.nextEventId=function(){return++this._eventId},fr.prototype.nextIdentifyId=function(){return++this._identifyId},fr.prototype.nextSequenceNumber=function(){return++this._sequenceNumber},fr.prototype._unsentCount=function(){return this._unsentEvents.length+this._unsentIdentifys.length},fr.prototype._sendEventsIfReady=function(t){return 0!==this._unsentCount()&&(this.options.batchEvents?this._unsentCount()>=this.options.eventUploadThreshold?(this.sendEvents(t),!0):(this._updateScheduled||(this._updateScheduled=!0,setTimeout(function(){this._updateScheduled=!1,this.sendEvents()}.bind(this),this.options.eventUploadPeriodMillis)),!1):(this.sendEvents(t),!0))},fr.prototype._getFromStorage=function(t,e){return t.getItem(e+this._storageSuffix
1)},fr.prototype._setInStorage=function(t,e,n){t.setItem(e+this._storageSuffix,n)};var pr=function(t){var e=t.cookieStorage.get(t.options.cookieName);if(!("object"===wt(e)&&e.deviceId&&e.sessionId&&e.lastEventTime)){var n=function(t){var e=Jt.getItem(t);return Jt.removeItem(t),e},r="string"===wt(t.options.apiKey)&&"_"+t.options.apiKey.slice(0,6)||"",i=n(it.DEVICE_ID+r),o=n(it.USER_ID+r),a=n(it.OPT_OUT+r);null!==a&&void 0!==a&&(a="true"===String(a));var s=parseInt(n(it.SESSION_ID)),u=parseInt(n(it.LAST_EVENT_TIME)),c=parseInt(n(it.LAST_EVENT_ID)),h=parseInt(n(it.LAST_IDENTIFY_ID)),l=parseInt(n(it.LAST_SEQUENCE_NUMBER)),f=function(t){return"object"===wt(e)&&e[t]};t.options.deviceId=f("deviceId")||i,t.options.userId=f("userId")||o,t._sessionId=f("sessionId")||s||t._sessionId,t._lastEventTime=f("lastEventTime")||u||t._lastEventTime,t._eventId=f("eventId")||c||t._eventId,t._identifyId=f("identifyId")||h||t._identifyId,t._sequenceNumber=f("sequenceNumber")||l||t._sequenceNumber,t.options.optOut=a||!1,e&&void 0!==e.optOut&&null!==e.optOut&&(t.options.optOut="true"===String(e.optOut)),_r(t)}},gr=function(t){var e=t.cookieStorage.get(t.options.cookieName+t._storageSuffix
1);"object"===wt(e)&&(e.deviceId&&(t.options.deviceId=e.deviceId),e.userId&&(t.options.userId=e.userId),null!==e.optOut&&void 0!==e.optOut&&(t.options.optOut=e.optOut),e.sessionId&&(t._sessionId=parseInt(e.sessionId)),e.lastEventTime&&(t._lastEventTime=parseInt(e.lastEventTime)),e.eventId&&(t._eventId=parseInt(e.eventId)),e.identifyId&&(t._identifyId=parseInt(e.identifyId)),e.sequenceNumber&&(t._sequenceNumber=parseInt(e.sequenceNumber)))},_r=function(t){t.cookieStorage.set(t.options.cookieName+t._storageSuffix,{deviceId:t.options.deviceId,userId:t.options.userId,optOut:t.options.optOut,sessionId:t._sessionId,lastEventTime:t._lastEventTime,eventId:t._eventId,identifyId:t._identifyId,sequenceNumber:t._sequenceNumber})};fr.prototype._initUtmData=function(t,e){t=t||this._getUrlParams(),e=e||this.cookieStorage.get("__utmz");var n=Qt(e,t);mr(this,n)};var mr=function(t,e){if("object"===wt(e)&&0!==Object.keys(e).length){var n=new te;for(var r in e)e.hasOwnProperty(r)&&(n.setOnce("initial_"+r,e[r]),n.set(r,e[r]));t.identify(n)}};fr.prototype._getReferrer=function(){return document.referrer},fr.prototype._getUrlParams=function(){return location.search},fr.prototype._saveGclid=function(t){var e=jt.getQueryParam("gclid",t);if(!jt.isEmptyString(e)){mr(this,{gclid:e})}},fr.prototype._getDeviceIdFromUrlParam=function(t){return jt.getQueryParam(it.AMP_DEVICE_ID_PARAM,t)},fr.prototype._getReferringDomain=function(t){if(jt.isEmptyString(t))return null;var e=t.split("/");return e.length>=3?e[2]:null},fr.prototype._saveReferrer=function(t){if(!jt.isEmptyString(t)){var e={referrer:t,referring_domain:this._getReferringDomain(t)};mr(this,e)}},fr.prototype.saveEvents=function(){try{this._setInStorage(Jt,this.options.unsentKey,JSON.stringify(this._unsentEvents))}catch(t){}try{this._setInStorage(Jt,this.options.unsentIdentifyKey,JSON.stringify(this._unsentIdentifys))}catch(t){}},fr.prototype.setDomain=function(t){if(jt.validateInput(t,"domain","string"))try{this.cookieStorage.options({domain:t}),this.options.domain=this.cookieStorage.options().domain,gr(this),_r(this)}catch(t){jt.log.error(t)}},fr.prototype.setUserId=function(t){try{this.options.userId=void 0!==t&&null!==t&&""+t||null,_r(this)}catch(t){jt.log.error(t)}},fr.prototype.setGroup=function(t,e){if(this._apiKeySet("setGroup()")&&jt.validateInput(t,"groupType","string")&&!jt.isEmptyString(t)){var n={};n[t]=e;var r=(new te).set(t,e);this._logEvent(it.IDENTIFY_EVENT,null,null,r.userPropertiesOperations,n,null,null)}},fr.prototype.setOptOut=function(t){if(jt.validateInput(t,"enable","boolean"))try{this.options.optOut=t,_r(this)}catch(t){jt.log.error(t)}},fr.prototype.setSessionId=function(t){if(jt.validateInput(t,"sessionId","number"))try{this._sessionId=t,_r(this)}catch(t){jt.log.error(t)}},fr.prototype.regenerateDeviceId=function(){this.setDeviceId(cr()+"R")},fr.prototype.setDeviceId=function(t){if(jt.validateInput(t,"deviceId","string"))try{jt.isEmptyString(t)||(this.options.deviceId=""+t,_r(this))}catch(t){jt.log.error(t)}},fr.prototype.setUserProperties=function(t){if(this._apiKeySet("setUserProperties()")&&jt.validateInput(t,"userProperties","object")){var e=jt.truncate(jt.validateProperties(t));if(0!==Object.keys(e).length){var n=new te;for(var r in e)e.hasOwnProperty(r)&&n.set(r,e[r]);this.identify(n)}}},fr.prototype.clearUserProperties=function(){if(this._apiKeySet("clearUserProperties()")){var t=new te;t.clearAll(),this.identify(t)}};var yr=function(t,e){for(var n=0;n<e._q.length;n++){var r=t[e._q[n][0]];"function"===wt(r)&&r.apply(t,e._q[n].slice(1))}return t};fr.prototype.identify=function(t,e){if(!this._apiKeySet("identify()"))return void("function"===wt(e)&&e(0,"No request sent"));if("object"===wt(t)&&t.hasOwnProperty("_q")&&(t=yr(new te,t)),t instanceof te){if(Object.keys(t.userPropertiesOperations).length>0)return this._logEvent(it.IDENTIFY_EVENT,null,null,t.userPropertiesOperations,null,null,e)}else jt.log.error("Invalid identify input type. Expected Identify object but saw "+wt(t));"function"===wt(e)&&e(0,"No request sent")},fr.prototype.setVersionName=function(t){jt.validateInput(t,"versionName","string")&&(this.options.versionName=t)},fr.prototype._logEvent=function(t,e,n,r,i,o,a){if(gr(this),!t||this.options.optOut)return void("function"===wt(a)&&a(0,"No request sent"));try{var s;s=t===it.IDENTIFY_EVENT?this.nextIdentifyId():this.nextEventId();var u=this.nextSequenceNumber(),c="number"===wt(o)?o:(new Date).getTime();(!this._sessionId||!this._lastEventTime||c-this._lastEventTime>this.options.sessionTimeout)&&(this._sessionId=c),this._lastEventTime=c,_r(this),r=r||{},n=n||{},e=e||{},i=i||{};var h={device_id:this.options.deviceId,user_id:this.options.userId,timestamp:c,event_id:s,session_id:this._sessionId||-1,event_type:t,version_name:this.options.versionName||null,platform:this.options.platform,os_name:this._ua.browser.name||null,os_version:this._ua.browser.major||null,device_model:this._ua.os.name||null,language:this.options.language,api_properties:n,event_properties:jt.truncate(jt.validateProperties(e)),user_properties:jt.truncate(jt.validateProperties(r)),uuid:cr(),library:{name:"amplitude-js",version:"3.8.0"},sequence_number:u,groups:jt.truncate(jt.validateGroups(i)),user_agent:this._userAgent};return t===it.IDENTIFY_EVENT?(this._unsentIdentifys.push(h),this._limitEventsQueued(this._unsentIdentifys)):(this._unsentEvents.push(h),this._limitEventsQueued(this._unsentEvents)),this.options.saveEvents&&this.saveEvents(),this._sendEventsIfReady(a)||"function"!==wt(a)||a(0,"No request sent"),s}catch(t){jt.log.error(t)}},fr.prototype._limitEventsQueued=function(t){t.length>this.options.savedMaxCount&&t.splice(0,t.length-this.options.savedMaxCount)},fr.prototype.logEvent=function(t,e,n){return this.logEventWithTimestamp(t,e,null,n)},fr.prototype.logEventWithTimestamp=function(t,e,n,r){return this._apiKeySet("logEvent()")&&jt.validateInput(t,"eventType","string")&&!jt.isEmptyString(t)?this._logEvent(t,e,null,null,null,n,r):("function"===wt(r)&&r(0,"No request sent"),-1)},fr.prototype.logEventWithGroups=function(t,e,n,r){return this._apiKeySet("logEventWithGroup()")&&jt.validateInput(t,"eventType","string")?this._logEvent(t,e,null,null,n,null,r):("function"===wt(r)&&r(0,"No request sent"),-1)};var vr=function(t){return!isNaN(parseFloat(t))&&isFinite(t)}
1;fr.prototype.logRevenueV2=function(t){if(this._apiKeySet("logRevenueV2()"))if("object"===wt(t)&&t.hasOwnProperty("_q")&&(t=yr(new sr,t)),t instanceof sr){if(t&&t._isValidRevenue())return this.logEvent(it.REVENUE_EVENT,t._toJSONObject())}else jt.log.error("Invalid revenue input type. Expected Revenue object but saw "+wt(t))},fr.prototype.logRevenue=function(t,e,n){return this._apiKeySet("logRevenue()")&&vr(t)&&(void 0===e||vr(e))?this._logEvent(it.REVENUE_EVENT,{},{productId:n,special:"revenue_amount",quantity:e||1,price:t},null,null,null,null):-1},fr.prototype.removeEvents=function(t,e){br(this,"_unsentEvents",t),br(this,"_unsentIdentifys",e)};var br=function(t,e,n){if(!(n<0)){for(var r=[],i=0;i<t[e].length;i++)t[e][i].event_id>n&&r.push(t[e][i]);t[e]=r}};fr.prototype.sendEvents=function(t){if(!this._apiKeySet("sendEvents()")||this._sending||this.options.optOut||0===this._unsentCount())return void("function"===wt(t)&&t(0,"No request sent"));this._sending=!0;var e=this.options.forceHttps?"https":"https:"===window.location.protocol?"https":"http",n=e+"://"+this.options.apiEndpoint+"/",r=Math.min(this._unsentCount(),this.options.uploadBatchSize),i=this._mergeEventsAndIdentifys(r),o=i.maxEventId,a=i.maxIdentifyId,s=JSON.stringify(i.eventsToSend),u=(new Date).getTime(),c={client:this.options.apiKey,e:s,v:it.API_VERSION,upload_time:u,checksum:ee(it.API_VERSION+this.options.apiKey+s+u)},h=this;new ar(n,c).send(function(e,n){h._sending=!1;try{200===e&&"success"===n?(h.removeEvents(o,a),h.options.saveEvents&&h.saveEvents(),h._sendEventsIfReady(t)||"function"!==wt(t)||t(e,n)):413===e?(1===h.options.uploadBatchSize&&h.removeEvents(o,a),h.options.uploadBatchSize=Math.ceil(r/2),h.sendEvents(t)):"function"===wt(t)&&t(e,n)}catch(t){}})},fr.prototype._mergeEventsAndIdentifys=function(t){for(var e=[],n=0,r=-1,i=0,o=-1;e.length<t;){var a,s=i>=this._unsentIdentifys.length,u=n>=this._unsentEvents.length;if(u&&s){jt.log.error("Merging Events and Identifys, less events and identifys than expected");break}s?(a=this._unsentEvents[n++],r=a.event_id):u?(a=this._unsentIdentifys[i++],o=a.event_id):!("sequence_number"in this._unsentEvents[n])||this._unsentEvents[n].sequence_number<this._unsentIdentifys[i].sequence_number?(a=this._unsentEvents[n++],r=a.event_id):(a=this._unsentIdentifys[i++],o=a.event_id),e.push(a)}return{eventsToSend:e,maxEventId:r,maxIdentifyId:o}},fr.prototype.setGlobalUserProperties=function(t){this.setUserProperties(t)},fr.prototype.__VERSION__="3.8.0";var wr=function(){this.options=nr({},lr),this._q=[],this._instances={}};wr.prototype.Identify=te,wr.prototype.Revenue=sr,wr.prototype.getInstance=function(t){t=jt.isEmptyString(t)?it.DEFAULT_INSTANCE:t.toLowerCase();var e=this._instances[t];return void 0===e&&(e=new fr(t),this._instances[t]=e),e},wr.prototype.init=function(t,e,n,r){this.getInstance().init(t,e,n,function(t){this.options=t.options,"function"===wt(r)&&r(t)}.bind(this))},wr.prototype.runQueuedFunctions=function(){for(var t=0;t<this._q.length;t++){var e=this[this._q[t][0]];"function"===wt(e)&&e.apply(this,this._q[t].slice(1))}this._q=[];for(var n in this._instances)this._instances.hasOwnProperty(n)&&this._instances[n].runQueuedFunctions()},wr.prototype.isNewSession=function(){return this.getInstance().isNewSession()},wr.prototype.getSessionId=function(){return this.getInstance().getSessionId()},wr.prototype.nextEventId=function(){return this.getInstance().nextEventId()},wr.prototype.nextIdentifyId=function(){return this.getInstance().nextIdentifyId()},wr.prototype.nextSequenceNumber=function(){return this.getInstance().nextSequenceNumber()},wr.prototype.saveEvents=function(){this.getInstance().saveEvents()},wr.prototype.setDomain=function(t){this.getInstance().setDomain(t)},wr.prototype.setUserId=function(t){this.getInstance().setUserId(t)},wr.prototype.setGroup=function(t,e){this.getInstance().setGroup(t,e)},wr.prototype.setOptOut=function(t){this.getInstance().setOptOut(t)},wr.prototype.regenerateDeviceId=function(){this.getInstance().regenerateDeviceId()},wr.prototype.setDeviceId=function(t){this.getInstance().setDeviceId(t)},wr.prototype.setUserProperties=function(t){this.getInstance().setUserProperties(t)},wr.prototype.clearUserProperties=function(){this.getInstance().clearUserProperties()},wr.prototype.identify=function(t,e){this.getInstance().identify(t,e)},wr.prototype.setVersionName=function(t){this.getInstance().setVersionName(t)},wr.prototype.logEvent=function(t,e,n){return this.getInstance().logEvent(t,e,n)},wr.prototype.logEventWithGroups=function(t,e,n,r){return this.getInstance().logEventWithGroups(t,e,n,r)},wr.prototype.logRevenueV2=function(t){return this.getInstance().logRevenueV2(t)},wr.prototype.logRevenue=function(t,e,n){return this.getInstance().logRevenue(t,e,n)},wr.prototype.removeEvents=function(t,e){this.getInstance().removeEvents(t,e)},wr.prototype.sendEvents=function(t){this.getInstance().sendEvents(t)},wr.prototype.setGlobalUserProperties=function(t){this.getInstance().setUserProperties(t)},wr.prototype.__VERSION__="3.8.0";var xr=window.amplitude||{},Sr=new wr;Sr._q=xr._q||[];for(var Tr in xr._iq)xr._iq.hasOwnProperty(Tr)&&(Sr.getInstance(Tr)._q=xr._iq[Tr]._q||[]);return Sr})}).call(e,n(81),n(184),n(311).Buffer)},function(t,e,n){"use strict";(function(e){function n(t){a.length||(o(),s=!0),a[a.length]=t}function r(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>c){for(var e=0,n=a.length-u;e<n;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,s=!1}function i(t){return function(){function e(){clearTimeout(n),clearInterval(r),t()}var n=setTimeout(e,0),r=setInterval(e,50)}}t.exports=n;var o,a=[],s=!1,u=0,c=1024,h="undefined"!==typeof e?e:self,l=h.MutationObserver||h.WebKitMutationObserver;o="function"===typeof l?function(t){var e=1,n=new l(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}
vendor: 17,896 bytes, line 1
1),function(){e=-e,r.data=e}}(r):i(r),n.requestFlush=o,n.makeRequestCallFromTimer=i}).call(e,n(81))},function(t,e,n){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-r(t)}function o(t){var e,n,i,o,a,s=t.length;o=r(t),a=new l(3*s/4-o),n=o>0?s-4:s;var u=0;for(e=0;e<n;e+=4)i=h[t.charCodeAt(e)]<<18|h[t.charCodeAt(e+1)]<<12|h[t.charCodeAt(e+2)]<<6|h[t.charCodeAt(e+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=h[t.charCodeAt(e)]<<2|h[t.charCodeAt(e+1)]>>4,a[u++]=255&i):1===o&&(i=h[t.charCodeAt(e)]<<10|h[t.charCodeAt(e+1)]<<4|h[t.charCodeAt(e+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function a(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function s(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(a(r));return i.join("")}function u(t){for(var e,n=t.length,r=n%3,i="",o=[],a=0,u=n-r;a<u;a+=16383)o.push(s(t,a,a+16383>u?u:a+16383));return 1===r?(e=t[n-1],i+=c[e>>2],i+=c[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=c[e>>10],i+=c[e>>4&63],i+=c[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=i,e.toByteArray=o,e.fromByteArray=u;for(var c=[],h=[],l="undefined"!==typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=f.length;d<p;++d)c[d]=f[d],h[f.charCodeAt(d)]=d;h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},function(t,e,n){"use strict";(function(t){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(r()<e)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=o.prototype):(null===t&&(t=new o(e)),t.length=e),t}function o(t,e,n){if(!o.TYPED_ARRAY_SUPPORT&&!(this instanceof o))return new o(t,e,n);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return a(this,t,e,n)}function a(t,e,n,r){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,n,r):"string"===typeof e?h(t,e,n):d(t,e)}function s(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e,n,r){return s(e),e<=0?i(t,e):void 0!==n?"string"===typeof r?i(t,e).fill(n,r):i(t,e).fill(n):i(t,e)}function c(t,e){if(s(e),t=i(t,e<0?0:0|p(e)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e,n){if("string"===typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|_(e,n);t=i(t,r);var a=t.write(e,n);return a!==r&&(t=t.slice(0,a)),t}function l(t,e){var n=e.length<0?0:0|p(e.length);t=i(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),o.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=o.prototype):t=l(t,e),t}function d(t,e){if(o.isBuffer(e)){var n=0|p(e.length);return t=i(t,n),0===t.length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||K(e.length)?i(t,0):l(t,e);if("Buffer"===e.type&&$(e.data))return l(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(t){if(t>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),o.alloc(+t)}function _(t,e){if(o.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(t).length;default:if(r)return G(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,n);case"utf8":case"utf-8":return M(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=o.from(e,r)),o.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,i);if("number"===typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var h=-1;for(c=n;c<s;c++)if(o(t,c)===o(e,-1===h?0:c-h)){if(-1===h&&(h=c),c-h+1===u)return h*a}else-1!==h&&(c-=c-h),h=-1}else for(n+u>s&&(n=s-u),c=n;c>=0;c--){for(var l=!0,f=0;f<u;f++)if(o(t,c+f)!==o(e,f)){l=!1;break}if(l)return c}return-1}function w(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function x(t,e,n,r){return q(G(e,t.length-n),t,n,r)}function S(t,e,n,r){return q(Y(e),t,n,r)}function T(t,e,n,r){return S(t,e,n,r)}function E(t,e,n,r){return q(X(e),t,n,r)}function P(t,e,n,r){return q(z(e,t.length-n),t,n,r)}function O(t,e,n){return 0===e&&n===t.length?Z.fromByteArray(t):Z.fromByteArray(t.slice(e,n))}function M(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,h,l;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128===(192&u)&&(l=(31&o)<<6|63&u)>127&&(a=l);break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(l=(15&o)<<12|(63&u)<<6|63&c)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:u=t[i+1],c=t[i+2],h=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&h)&&(l=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&h)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return C(r)}function C(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Q));return n}function A(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function R(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=V(t[o]);return i}function D(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(t,e,n){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,n,r,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function F(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(t,e,n,r,i){return i||B(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return i||B(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,n,r,52,8),n+8}function H(t){if(t=W(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function W(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function V(t){return t<16?"0"+t.toString(16):t.toString(16)}function G(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function z(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function X(t){return Z.toByteArray(H(t))}function q(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t){return t!==t}var Z=n(310),J=n(514),$=n(312);e.Buffer=o,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=r(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,n){return a(null,t,e,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,n){return u(null,t,e,n)},o.allocUnsafe=function(t){return c(null,t)},o.allocUnsafeSlow=function(t){return c(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!$(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=o.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},o.byteLength=_,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?M(this,0,t):m.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,e,n,r,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var a=i-r,s=n-e,u=Math.min(a,s),c=this.slice(r,i),h=t.slice(e,n),l=0;l<u;++l)if(c[l]!==h[l]){a=c[l],s=h[l];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},o.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},o.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},o.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"===typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return S(this,t,e,n);case"latin1":case"binary":return T(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r;if(o.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=o.prototype;else{var i=e-t;r=new o(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},o.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),J.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),J.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),J.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),J.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){k(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){k(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>
vendor: 4,226 bytes, line 1
18,this[e+1]=255&t):F(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&n<e&&e<r)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},o.prototype.fill=function(t,e,n,r){if("string"===typeof t){if("string"===typeof e?(r=e,e=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var a;if("number"===typeof t)for(a=e;a<n;++a)this[a]=t;else{var s=o.isBuffer(t)?t:G(new o(t,r).toString()),u=s.length;for(a=0;a<n-e;++a)this[a+e]=s[a%u]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,n(81))},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){function r(t){if(t)return i(t)}function i(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+t];
vendor: 7,005 bytes, line 1
1if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if((r=n[i])===e||r.fn===e){n.splice(i,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){var r=n(10),i=n(121),o=n(12)("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(8),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(t,e,n){"use strict";var r=n(3),i=n(58);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(87),i=n(125),o=n(108);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(196)}),n(74)("copyWithin")},function(t,e,n){"use strict";var r=n(0),i=n(54)(4);r(r.P+r.F*!n(51)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(145)}),n(74)("fill")},function(t,e,n){"use strict";var r=n(0),i=n(54)(2);r(r.P+r.F*!n(51)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(54)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(74)(o)},function(t,e,n){"use strict";var r=n(0),i=n(54)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(74)("find")},function(t,e,n){"use strict";var r=n(0),i=n(54)(0),o=n(51)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(50),i=n(0),o=n(26),a=n(207),s=n(153),u=n(20),c=n(147),h=n(169);i(i.S+i.F*!n(123)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,l,f=o(t),d="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,_=void 0!==g,m=0,y=h(f);if(_&&(g=r(g,p>2?arguments[2]:void 0,2)),void 0==y||d==Array&&s(y))for(e=u(f.length),n=new d(e);e>m;m++)c(n,m,_?g(f[m],m):f[m]);else for(l=y.call(f),n=new d;!(i=l.next()).done;m++)c(n,m,_?a(l,g,[i.value,m],!0):i.value);return n.length=m,n}})},function(t,e,n){"use strict";var r=n(0),i=n(117)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(51)(o)),"Array",{indexOf:function(t){return a?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(121)})},function(t,e,n){"use strict";var r=n(0),i=n(46),o=[].join;r(r.P+r.F*(n(107)!=Object||!n(51)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),i=n(46),o=n(57),a=n(20),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(51)(s)),"Array",{lastIndexOf:function(t){if(u)return s.apply(this,arguments)||0;var e=i(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){"use strict";var r=n(0),i=n(54)(1);r(r.P+r.F*!n(51)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(147);r(r.S+r.F*n(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),i=n(198);r(r.P+r.F*!n(51)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(0),i=n(198);r(r.P+r.F*!n(51)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var r=n(0),i=n(151),o=n(49),a=n(91),s=n(20),u=[].slice;r(r.P+r.F*n(8)(function(){i&&u.call(i)}),"Array",{slice:function(t,e){var n=s(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=a(t,n),c=a(e,n),h=s(c-i),l=Array(h),f=0;f<h;f++)l[f]="String"==r?this.charAt(i+f):this[i+f];return l}})},function(t,e,n){"use strict";var r=n(0),i=n(54)(3);r(r.P+r.F*!n(51)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(35),o=n(26),a=n(8),s=[].sort,u=[1,2,3];r(r.P+r.F*(a(function(){u.sort(void 0)})||!a(function(){u.sort(null)})||!n(51)(s)),"Array",{sort:function(t){return void 0===t?s.call(o(this)):s.call(o(this),i(t))}})},function(t,e,n){n(90)("Array")},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){var r=n(0),i=n(315);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(0),i=n(26),o=n(58);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(12)("toPrimitive"),i=Date.prototype;r in i||n(40)(i,r,n(316))},function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(41)(r,"toString",function(){var t=o.call(this);return t===t?i.call(this):"Invalid Date"})},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(199)})},function(t,e,n){"use strict";var r=n(10),i=n(45),o=n(12)("hasInstance"),a=Function.prototype;o in a||n(19).f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(19).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(18)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[
vendor: 4,917 bytes, line 1
11]}catch(t){return""}}})},function(t,e,n){var r=n(0),i=n(210),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=n(0),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(t,e,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),i=n(157);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(0),i=n(156);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(209)})},function(t,e,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,u=0;a<s;)n=i(arguments[a++]),u<n?(r=u/n,o=o*r*r+1,u=n):n>0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(t,e,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(8)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(210)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(157)})},function(t,e,n){var r=n(0),i=n(156),o=Math.exp;r(r.S+r.F*n(8)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),i=n(156),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){"use strict";var r=n(4),i=n(39),o=n(49),a=n(152),s=n(58),u=n(8),c=n(86).f,h=n(44).f,l=n(19).f,f=n(100).trim,d=r.Number,p=d,g=d.prototype,_="Number"==o(n(85)(g)),m="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=m?e.trim():f(e,3);var n,r,i,o=e.charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),c=0,h=u.length;c<h;c++)if((a=u.charCodeAt(c))<48||a>i)return NaN;return parseInt(u,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(_?u(function(){g.valueOf.call(n)}):"Number"!=o(n))?a(new p(y(e)),n,d):y(e)};for(var v,b=n(18)?c(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;b.length>w;w++)i(p,v=b[w])&&!i(d,v)&&l(d,v,h(p,v));d.prototype=g,g.constructor=d,n(41)(r,"Number",d)}},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),i=n(4).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(206)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),i=n(206),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),i=n(218);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(0),i=n(219);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){"use strict";var r=n(0),i=n(57),o=n(195),a=n(164),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],h="Number.toFixed: incorrect invocation!",l=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},f=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},p=function(t,e,n){return 0===e?n:e%2===1?p(t,e-1,n*t):p(t*t,e/2,n)},g=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(8)(function(){s.c
vendor: 4,242 bytes, line 1
1all({})})),"Number",{toFixed:function(t){var e,n,r,s,u=o(this,h),c=i(t),_="",m="0";if(c<0||c>20)throw RangeError(h);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(_="-",u=-u),u>1e-21)if(e=g(u*p(2,69,1))-69,n=e<0?u*p(2,-e,1):u/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(0,n),r=c;r>=7;)l(1e7,0),r-=7;for(l(p(10,r,1),0),r=e-1;r>=23;)f(1<<23),r-=23;f(1<<r),l(1,1),f(2),m=d()}else l(0,n),l(1<<-e,0),m=d()+a.call("0",c);return c>0?(s=m.length,m=_+(s<=c?"0."+a.call("0",c-s)+m:m.slice(0,s-c)+"."+m.slice(s-c))):m=_+m,m}})},function(t,e,n){"use strict";var r=n(0),i=n(8),o=n(195),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(212)})},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(85)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(18),"Object",{defineProperties:n(213)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(18),"Object",{defineProperty:n(19).f})},function(t,e,n){var r=n(10),i=n(75).onFreeze;n(56)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(46),i=n(44).f;n(56)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){n(56)("getOwnPropertyNames",function(){return n(214).f})},function(t,e,n){var r=n(26),i=n(45);n(56)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(10);n(56)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(10);n(56)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(10);n(56)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(318)})},function(t,e,n){var r=n(26),i=n(87);n(56)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(10),i=n(75).onFreeze;n(56)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(10),i=n(75).onFreeze;n(56)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(160).set})},function(t,e,n){"use strict";var r=n(106),i={};i[n(12)("toStringTag")]="z",i+""!="[object z]"&&n(41)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(0),i=n(218);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){var r=n(0),i=n(219);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){"use strict";var r,i,o,a,s=n(84),u=n(4),c=n(50),h=n(106),l=n(0),f=n(10),d=n(35),p=n(82),g=n(83),_=n(129),m=n(166).set,y=n(158)(),v=n(159),b=n(220),w=n(221),x=u.TypeError,S=u.process,T=u.Promise,E="process"==h(S),P=function(){},O=i=v.f,M=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[n(12)("species")]=function(t){t(P,P)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e}catch(t){}}(),C=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},A=function(t,e){if(!t._n){t._n=!0;var n=t._c;y(function(){for(var r=t._v,i=1==t._s,o=0;n.length>o;)!function(e){var n,o,a=i?e.ok:e.fail,s=e.resolve,u=e.reject,c=e.domain;try{a?(i||(2==t._h&&D(t),t._h=1),!0===a?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===e.promise?u(x("Promise-chain cycle")):(o=C(n))?o.call(n,s,u):s(n)):u(r)}catch(t){u(t)}}(n[o++]);t._c=[],t._n=!1,e&&!t._h&&I(t)})}},I=function(t){m.call(u,function(){var e,n,r,i=t._v,o=R(t);if(o&&(e=b(function(){E?S.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=E||R(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},R=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!R(e.promise))return!1;return!0},D=function(t){m.call(u,function(){var e;E?S.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},L=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),A(e,!0))},k=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;
vendor: 4,324 bytes, line 1
1try{if(n===t)throw x("Promise can't be resolved itself");(e=C(t))?y(function(){var r={_w:n,_d:!1};try{e.call(t,c(k,r,1),c(L,r,1))}catch(t){L.call(r,t)}}):(n._v=t,n._s=1,A(n,!1))}catch(t){L.call({_w:n,_d:!1},t)}}};M||(T=function(t){p(this,T,"Promise","_h"),d(t),r.call(this);try{t(c(k,this,1),c(L,this,1))}catch(t){L.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(89)(T.prototype,{then:function(t,e){var n=O(_(this,T));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(k,t,1),this.reject=c(L,t,1)},v.f=O=function(t){return t===T||t===a?new o(t):i(t)}),l(l.G+l.W+l.F*!M,{Promise:T}),n(99)(T,"Promise"),n(90)("Promise"),a=n(63).Promise,l(l.S+l.F*!M,"Promise",{reject:function(t){var e=O(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(s||!M),"Promise",{resolve:function(t){return w(s&&this===a?T:this,t)}}),l(l.S+l.F*!(M&&n(123)(function(t){T.all(t).catch(P)})),"Promise",{all:function(t){var e=this,n=O(e),r=n.resolve,i=n.reject,o=b(function(){var n=[],o=0,a=1;g(t,!1,function(t){var s=o++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=O(e),r=n.reject,i=b(function(){g(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){var r=n(0),i=n(35),o=n(3),a=(n(4).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(8)(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=i(t),u=o(n);return a?a(r,e,u):s.call(r,e,u)}})},function(t,e,n){var r=n(0),i=n(85),o=n(35),a=n(3),s=n(10),u=n(8),c=n(199),h=(n(4).Reflect||{}).construct,l=u(function(){function t(){}return!(h(function(){},[],t)instanceof t)}),f=!u(function(){h(function(){})});r(r.S+r.F*(l||f),"Reflect",{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(f&&!l)return h(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var u=n.prototype,d=i(s(u)?u:Object.prototype),p=Function.apply.call(t,d,e);return s(p)?p:d}})},function(t,e,n){var r=n(19),i=n(0),o=n(3),a=n(58);i(i.S+i.F*n(8)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){o(t),e=a(e,!0),o(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),i=n(44).f,o=n(3);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(0),i=n(3),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(154)(o,"Object",function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(44),i=n(0),o=n(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(0),i=n(45),o=n(3);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){function r(t,e){var n,s,h=arguments.length<3?t:arguments[2];return c(t)===h?t[e]:(n=i.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(h):void 0:u(s=o(t))?r(s,e,h):void 0}var i=n(44),o=n(45),a=n(39),s=n(0),u=n(10),c=n(3);s(s.S,"Reflect",{get:r})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),i=n(3),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(217)})},function(t,e,n){var r=n(0),i=n(3),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),i=n(160);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){function r(t,e,n){var u,f,d=arguments.length<4?t:
vendor: 6,437 bytes, line 1
1arguments[3],p=o.f(h(t),e);if(!p){if(l(f=a(t)))return r(f,e,n,d);p=c(0)}return s(p,"value")?!(!1===p.writable||!l(d))&&(u=o.f(d,e)||c(0),u.value=n,i.f(d,e,u),!0):void 0!==p.set&&(p.set.call(d,n),!0)}var i=n(19),o=n(44),a=n(45),s=n(39),u=n(0),c=n(88),h=n(3),l=n(10);u(u.S,"Reflect",{set:r})},function(t,e,n){var r=n(4),i=n(152),o=n(19).f,a=n(86).f,s=n(122),u=n(120),c=r.RegExp,h=c,l=c.prototype,f=/a/g,d=/a/g,p=new c(f)!==f;if(n(18)&&(!p||n(8)(function(){return d[n(12)("match")]=!1,c(f)!=f||c(d)==d||"/a/i"!=c(f,"i")}))){c=function(t,e){var n=this instanceof c,r=s(t),o=void 0===e;return!n&&r&&t.constructor===c&&o?t:i(p?new h(r&&!o?t.source:t,e):h((r=t instanceof c)?t.source:t,r&&o?u.call(t):e),n?this:l,c)};for(var g=a(h),_=0;g.length>_;)!function(t){t in c||o(c,t,{configurable:!0,get:function(){return h[t]},set:function(e){h[t]=e}})}(g[_++]);l.constructor=c,c.prototype=l,n(41)(r,"RegExp",c)}n(90)("RegExp")},function(t,e,n){n(119)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(119)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){n(119)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(119)("split",2,function(t,e,r){"use strict";var i=n(122),o=r,a=[].push,s="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[s]||2!="ab".split(/(?:ab)*/)[s]||4!=".".split(/(.?)(.?)/)[s]||".".split(/()()/)[s]>1||"".split(/.?/)[s]){var u=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(n,t,e);var r,c,h,l,f,d=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,_=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,p+"g");for(u||(r=new RegExp("^"+m.source+"$(?!\\s)",p));(c=m.exec(n))&&!((h=c.index+c[0][s])>g&&(d.push(n.slice(g,c.index)),!u&&c[s]>1&&c[0].replace(r,function(){for(f=1;f<arguments[s]-2;f++)void 0===arguments[f]&&(c[f]=void 0)}),c[s]>1&&c.index<n[s]&&a.apply(d,c.slice(1)),l=c[0][s],g=h,d[s]>=_));)m.lastIndex===c.index&&m.lastIndex++;return g===n[s]?!l&&m.test("")||d.push(""):d.push(n.slice(g)),d[s]>_?d.slice(0,_):d}}else"0".split(void 0,0)[s]&&(r=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(n,i){var o=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,n){"use strict";n(226);var r=n(3),i=n(120),o=n(18),a=/./.toString,s=function(t){n(41)(RegExp.prototype,"toString",t,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(t,e,n){"use strict";n(42)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(42)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(42)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(42)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(162)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(20),o=n(163),a="".endsWith;r(r.P+r.F*n(150)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),s=void 0===n?r:Math.min(i(n),r),u=String(t);return a?a.call(e,u,s):e.slice(s-u.length,s)===u}})},function(t,e,n){"use strict";n(42)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(42)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(42)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){var r=n(0),i=n(91),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){"use strict";var r=n(0),i=n(163);r(r.P+r.F*n(150)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";n(42)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";var r=n(162)(!0);n(155)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";n(42)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){var r=n(0),i=n(46),o=n(20);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(164)})},function(t,e,n){"use strict";n(42)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(20),o=n(163),a="".startsWith;r(r.P+r.F*n(150)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(42)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(42)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(42)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){"use strict";n(100)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(4),i=n(39),o=n(18),a=n(0),s=n(41),u=n(75).KEY,c=n(8),h=n(128),l=n(99),f=n(92),d=n(12),p=n(224),g=n(168),_=n(317),m=n(121
vendor: 9,623 bytes, line 1
1),y=n(3),v=n(46),b=n(58),w=n(88),x=n(85),S=n(214),T=n(44),E=n(19),P=n(87),O=T.f,M=E.f,C=S.f,A=r.Symbol,I=r.JSON,R=I&&I.stringify,D=d("_hidden"),L=d("toPrimitive"),k={}.propertyIsEnumerable,F=h("symbol-registry"),N=h("symbols"),B=h("op-symbols"),j=Object.prototype,U="function"==typeof A,H=r.QObject,W=!H||!H.prototype||!H.prototype.findChild,V=o&&c(function(){return 7!=x(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=O(j,e);r&&delete j[e],M(t,e,n),r&&t!==j&&M(j,e,r)}:M,G=function(t){var e=N[t]=x(A.prototype);return e._k=t,e},Y=U&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},z=function(t,e,n){return t===j&&z(B,e,n),y(t),e=b(e,!0),y(n),i(N,e)?(n.enumerable?(i(t,D)&&t[D][e]&&(t[D][e]=!1),n=x(n,{enumerable:w(0,!1)})):(i(t,D)||M(t,D,w(1,{})),t[D][e]=!0),V(t,e,n)):M(t,e,n)},X=function(t,e){y(t);for(var n,r=_(e=v(e)),i=0,o=r.length;o>i;)z(t,n=r[i++],e[n]);return t},q=function(t,e){return void 0===e?x(t):X(x(t),e)},K=function(t){var e=k.call(this,t=b(t,!0));return!(this===j&&i(N,t)&&!i(B,t))&&(!(e||!i(this,t)||!i(N,t)||i(this,D)&&this[D][t])||e)},Z=function(t,e){if(t=v(t),e=b(e,!0),t!==j||!i(N,e)||i(B,e)){var n=O(t,e);return!n||!i(N,e)||i(t,D)&&t[D][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=C(v(t)),r=[],o=0;n.length>o;)i(N,e=n[o++])||e==D||e==u||r.push(e);return r},$=function(t){for(var e,n=t===j,r=C(n?B:v(t)),o=[],a=0;r.length>a;)!i(N,e=r[a++])||n&&!i(j,e)||o.push(N[e]);return o};U||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===j&&e.call(B,n),i(this,D)&&i(this[D],t)&&(this[D][t]=!1),V(this,t,w(1,n))};return o&&W&&V(j,t,{configurable:!0,set:e}),G(t)},s(A.prototype,"toString",function(){return this._k}),T.f=Z,E.f=z,n(86).f=S.f=J,n(108).f=K,n(125).f=$,o&&!n(84)&&s(j,"propertyIsEnumerable",K,!0),p.f=function(t){return G(d(t))}),a(a.G+a.W+a.F*!U,{Symbol:A});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)d(Q[tt++]);for(var et=P(d.store),nt=0;et.length>nt;)g(et[nt++]);a(a.S+a.F*!U,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=A(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!U,"Object",{create:q,defineProperty:z,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:$}),I&&a(a.S+a.F*(!U||c(function(){var t=A();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!Y(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return e=r[1],"function"==typeof e&&(n=e),!n&&m(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!Y(e))return e}),r[1]=e,R.apply(I,r)}}}),A.prototype[L]||n(40)(A.prototype,L,A.prototype.valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){"use strict";var r=n(0),i=n(130),o=n(167),a=n(3),s=n(91),u=n(20),c=n(10),h=n(4).ArrayBuffer,l=n(129),f=o.ArrayBuffer,d=o.DataView,p=i.ABV&&h.isView,g=f.prototype.slice,_=i.VIEW;r(r.G+r.W+r.F*(h!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||c(t)&&_ in t}}),r(r.P+r.U+r.F*n(8)(function(){return!new f(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==g&&void 0===e)return g.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(l(this,f))(u(i-r)),c=new d(this),h=new d(o),p=0;r<i;)h.setUint8(p++,c.getUint8(r++));return o}}),n(90)("ArrayBuffer")},function(t,e,n){var r=n(0);r(r.G+r.W+r.F*!n(130).ABV,{DataView:n(167).DataView})},function(t,e,n){n(65)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(65)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(65)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(65)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(65)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(65)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(65)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(65)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(65)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){"use strict";var r=n(202),i=n(101);n(118)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),i=n(203),o=n(26),a=n(20),s=n(35),u=n(146);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return s(t),e=a(r.length),n=u(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(74)("flatMap")},function(t,e,n){"use strict";var r=n(0),i=n(203),o=n(26),a=n(20),s=n(57),u=n(146);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=a(e.length),r=u(e,0);return i(r,e,e,n,0,void 0===t?1:s(t)),r}}),n(74)("flatten")},function(t,e,n){"use strict";var r=n(0),i=n(117)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(74)("includes")},function(t,e,n){var r=n(0),i=n(158)(),o=n(4).process,a="process"==n(49)(o);r(r.G,{asap:function(t){var e=a&&o.domain;i(e?e.bind(t):t)}})},function(t,e,n){var r=n(0),i=n(49);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(0);r(r.G,{global:n(4)})},function(t,e,n){n(126)("Map")},function(t,e,n){n(127)("Map")},function(t,e,n){var r=n(0);r(r.P+r.R,"Map",{toJSON:n(201)("Map")})},function(t,e,n){var r=n(0);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(0),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},function(t,e,n){var r=n(0),i=n(211),o=n(209);r(r.S,"Math",{fscale:function(t,e,n,r,a){return o(i(t,e,n,r,a))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,o=e>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{imulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>16,s=r>>16,u=(a*o>>>0)+(i*o>>>16);return a*s+(u>>16)+((i*s>>>0)+(65535&u)>>16)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,o=e>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(0),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},function(t,e,n){var r=n(0);r(r.S,"Math",{scale:n(211)})},function(t,e,n){var r=n(0);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{umulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>>16,s=r>>>16,u=(a*o>>>0)+(i*o>>>16);return a*s+(u>>>16)+((i*s>>>0)+(65535&u)>>>16)}})},function(t,e,n){"use strict";var r=n(0),i=n(26),o=n(35),a=n(19);n(18)&&r(r.P+n(124),"Object",{__defineGetter__:function(t,e){a.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),i=n(26),o=n(35),a=n(19);n(18)&&r(r.P+n(124),"Object",{__defineSetter__:function(t,e){a.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(0),i=n(216)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){var r=n(0),i=n(217),o=n(46),a=n(44),s=n(147);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),u=a.f,c=i(r),h={},l=0;c.length>l;)void 0!==(n=u(r,e=c[l++]))&&s(h,e,n);return h}})},function(t,e,n){"use strict";var r=n(0),i=n(26),o=n(58),a=n(45),s=n(44).f;n(18)&&r(r.P+n(124),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.get}while(n=a(n))}})},function(t,e,n){"use strict";var r=n(0),i=n(26),o=n(58),a=n(45),s=n(44).f;n(18)&&r(r.P+n(124),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.set}while(n=a(n))}})},function(t,e,n){var r=n(0),i=n(216)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(0),i=n(4),o=n(63),a=n(158)(),s=n(12)("observable"),u=n(35),c=n(3),h=n(82),l=n(89),f=n(40),d=n(83),p=d.RETURN,g=function(t){return null==t?void 0:u(t)},_=function(t){var e=t._c;e&&(t._c=void 0,e())},m=function(t){return void 0===t._o},y=function(t){m(t)||(t._o=void 0,_(t))},v=function(t,e){c(t),this._c=void 0,this._o=t,t=new b(this);try{var n=e(t),r=n;null!=n&&("function"===typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(e){return void t.error(e)}m(this)&&_(this)};v.prototype=l({},{unsubscribe:function(){y(this)}});var b=function(t){this._s=t};b.prototype=l({},{next:function(t){var e=this._s;if(!m(e)){var n=e._o;try{var r=g(n.next);if(r)return r.call(n,t)}catch(t){try{y(e)}finally{throw t}}}},error:function(t){var e=this._s;if(m(e))throw t;var n=e._o;e._o=void 0;try{var r=g(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{_(e)}finally{throw t}}return _(e),t},complete:function(t){var e=this._s;if(!m(e)){var n=e._o;e._o=void 0;try{var r=g(n.complete);t=r?r.call(n,t):void 0}catch(t){try{_(e)}finally{throw t}}return _(e),t}}});var w=function(t){h(this,w,"Observable","_f")._f=u(t)};l(w.prototype,{subscribe:function(t){return new v(t,this._f)}
vendor: 6,851 bytes, line 1
1,forEach:function(t){var e=this;return new(o.Promise||i.Promise)(function(n,r){u(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:n})})}}),l(w,{from:function(t){var e="function"===typeof this?this:w,n=g(c(t)[s]);if(n){var r=c(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return a(function(){if(!n){try{if(d(t,!1,function(t){if(e.next(t),n)return p})===p)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=Array(e);t<e;)n[t]=arguments[t++];return new("function"===typeof this?this:w)(function(t){var e=!1;return a(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),f(w.prototype,s,function(){return this}),r(r.G,{Observable:w}),n(90)("Observable")},function(t,e,n){"use strict";var r=n(0),i=n(63),o=n(4),a=n(129),s=n(221);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(0),i=n(159),o=n(220);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(64),i=n(3),o=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,i(n),o(r))}})},function(t,e,n){var r=n(64),i=n(3),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var u=s.get(e);return u.delete(n),!!u.size||s.delete(e)}})},function(t,e,n){var r=n(227),i=n(197),o=n(64),a=n(3),s=n(45),u=o.keys,c=o.key,h=function(t,e){var n=u(t,e),o=s(t);if(null===o)return n;var a=h(o,e);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(t){return h(a(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var r=n(64),i=n(3),o=n(45),a=r.has,s=r.get,u=r.key,c=function(t,e,n){if(a(t,e,n))return s(t,e,n);var r=o(e);return null!==r?c(t,r,n):void 0};r.exp({getMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(64),i=n(3),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(64),i=n(3),o=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(64),i=n(3),o=n(45),a=r.has,s=r.key,u=function(t,e,n){if(a(t,e,n))return!0;var r=o(e);return null!==r&&u(t,r,n)};r.exp({hasMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(64),i=n(3),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(64),i=n(3),o=n(35),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?i:o)(n),a(r))}}})},function(t,e,n){n(126)("Set")},function(t,e,n){n(127)("Set")},function(t,e,n){var r=n(0);r(r.P+r.R,"Set",{toJSON:n(201)("Set")})},function(t,e,n){"use strict";var r=n(0),i=n(162)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(55),o=n(20),a=n(122),s=n(120),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(154)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(t.lastIndex),new c(r,e)}})},function(t,e,n){"use strict";var r=n(0),i=n(222);r(r.P,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";var r=n(0),i=n(222);r(r.P,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";n(100)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(100)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){n(168)("asyncIterator")},function(t,e,n){n(168)("observable")},function(t,e,n){var r=n(0);r(r.S,"System",{global:n(4)})},function(t,e,n){n(126)("WeakMap")},function(t,e,n){n(127)("WeakMap")},function(t,e,n){n(126)("WeakSet")},function(t,e,n){n(127)("WeakSet")},function(t,e,n){for(var r=n(170),i=n(87),o=n(41),a=n(4),s=n(40),u=n(98),c=n(12),h=c("iterator"),l=c("toStringTag"),f=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),g=0;g<p.length;g++){var _,m=p[g],y=d[m],v=a[m],b=v&&v.prototype;if(b&&(b[h]||s(b,h,f),b[l]||s(b,l,m),u[m]=f,y))for(_ in r)b[_]||o(b,_,r[_],!0)}},function(t,e,n){var r=n(0),i=n(166);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){var r=n(4),i=n(0),o=r.navigator,a=[].slice,s=!!o&&/MSIE .\./.test(o.userAgent),u=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(t,e,n){n(438),n(377),n(379),n(378),n(381),n(383),n(388),n(382),n(380),n(390),n(389),n(385),n(386),n(384),n(376),n(387),n(391),n(392),n(344),n(346),n(345),n(394),n(393),n(364),n(374),n(375),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(425),n(430),n(437),n(428),n(420),n(421),n(426),n(431),n(433),n(416),n(417),n(418),n(419),n(422),n(423),n(424),n(427),n(429),n(432),n(434),n(435),n(436),n(339),n(341),n(340),n(343),n(342),n(328),n(326),n(332),n(329),n(335),n(337),n(325),n(331),n(322),n(336),n(320),n(334),n(333),n(327),n(330),n(319),n(321),n(324),n(323),n(338),n(170),n(410),n(415),n(226),n(411),n(412),n(413),n(414),n(395),n(225),n(227),n(228),n(450),n(439),n(440),n(445),n(448),n(449),n(443),n(446),n(444),n(447),n(441),n(442),n(396),n(397),n(398),n(399),n(400),n(403),n(401),n(402),n(404),n(405),n(4
106),n(407),n(409),n(408),n(453),n(451),n(452),n(494),n(497),n(496),n(498),n(499),n(495),n(500),n(501),n(475),n(478),n(474),n(472),n(473),n(476),n(477),n(459),n(493),n(458),n(492),n(504),n(506),n(457),n(491),n(503),n(505),n(456),n(502),n(455),n(460),n(461),n(462),n(463),n(464),n(466),n(465),n(467),n(468),n(469),n(471),n(470),n(480),n(481),n(482),n(483),n(485),n(484),n(487),n(486),n(488),n(489),n(490),n(454),n(479),n(509),n(508),n(507),t.exports=n(63)},function(t,e){},function(t,e,n){(function(e){var n;n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},t.exports=n}).call(e,n(81))},function(t,e,n){(function(t){!function(){function t(){w=!0,clearTimeout(x),x=setTimeout(function(){w=!1},700)}function e(t,e){for(;t;){if(t.contains(e))return t;t=t.parentNode}return null}function n(t,n,r){for(var i=e(t,n),o=t,a=[];o&&o!==i;)f(o,"pointerenter")&&a.push(o),o=o.parentNode;for(;a.length>0;)r(a.pop())}function r(t,n,r){for(var i=e(t,n),o=t;o&&o!==i;)f(o,"pointerleave")&&r(o),o=o.parentNode}function i(t,e){["pointerdown","pointermove","pointerup","pointerover","pointerout"].forEach(function(n){window.addEventListener(t(n),function(t){!w&&d(t.target,n)&&e(t,n,!0)})}),void 0===window["on"+t("pointerenter").toLowerCase()]&&window.addEventListener(t("pointerover"),function(t){if(!w){var r=d(t.target,"pointerenter");r&&r!==window&&(r.contains(t.relatedTarget)||n(r,t.relatedTarget,function(n){e(t,"pointerenter",!1,n,t.relatedTarget)}))}}),void 0===window["on"+t("pointerleave").toLowerCase()]&&window.addEventListener(t("pointerout"),function(t){if(!w){var n=d(t.target,"pointerleave");n&&n!==window&&(n.contains(t.relatedTarget)||r(n,t.relatedTarget,function(n){e(t,"pointerleave",!1,n,t.relatedTarget)}))}})}if(!window.PointerEvent){Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e=Object(this),n=e.length>>>0;if(0===n)return-1;var r=0;if(arguments.length>0&&(r=Number(arguments[1]),r!==r?r=0:0!==r&&r!==1/0&&r!==-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r)))),r>=n)return-1;for(var i=r>=0?r:Math.max(n-Math.abs(r),0);i<n;i++)if(i in e&&e[i]===t)return i;return-1}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if(!this||!(t instanceof Function))throw new TypeError;for(var n=0;n<this.length;n++)t.call(e,this[n],n,this)}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"")});var o=["pointerdown","pointerup","pointermove","pointerover","pointerout","pointercancel","pointerenter","pointerleave"],a=["PointerDown","PointerUp","PointerMove","PointerOver","PointerOut","PointerCancel","PointerEnter","PointerLeave"],s={},u=function(t){for(;t&&!t.handjs_forcePreventDefault;)t=t.parentNode;return!!t||window.handjs_forcePreventDefault},c=function(t,e,n,r,i){var o;if(document.createEvent?(o=document.createEvent("MouseEvents"),o.initMouseEvent(e,n,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,i||t.relatedTarget)):(o=document.createEventObject(),o.screenX=t.screenX,o.screenY=t.screenY,o.clientX=t.clientX,o.clientY=t.clientY,o.ctrlKey=t.ctrlKey,o.altKey=t.altKey,o.shiftKey=t.shiftKey,o.metaKey=t.metaKey,o.button=t.button,o.relatedTarget=i||t.relatedTarget),void 0===o.offsetX&&(void 0!==t.offsetX?(Object&&void 0!==Object.defineProperty&&(Object.defineProperty(o,"offsetX",{writable:!0}),Object.defineProperty(o,"offsetY",{writable:!0})),o.offsetX=t.offsetX,o.offsetY=t.offsetY):Object&&void 0!==Object.defineProperty?(Object.defineProperty(o,"offsetX",{get:function(){return this.currentTarget&&this.currentTarget.offsetLeft?t.clientX-this.currentTarget.offsetLeft:t.clientX}}),Object.defineProperty(o,"offsetY",{get:function(){return this.currentTarget&&this.currentTarget.offsetTop?t.clientY-this.currentTarget.offsetTop:t.clientY}})):void 0!==t.layerX&&(o.offsetX=t.layerX-t.currentTarget.offsetLeft,o.offsetY=t.layerY-t.currentTarget.offsetTop)),void 0!==t.isPrimary?o.isPrimary=t.isPrimary:o.isPrimary=!0,t.pressure)o.pressure=t.pressure;else{var a=0;void 0!==t.which?a=t.which:void 0!==t.button&&(a=t.button),o.pressure=0===a?0:.5}if(t.rotation?o.rotation=t.rotation:o.rotation=0,t.hwTimestamp?o.hwTimestamp=t.hwTimestamp:o.hwTimestamp=0,t.tiltX?o.tiltX=t.tiltX:o.tiltX=0,t.tiltY?o.tiltY=t.tiltY:o.tiltY=0,t.height?o.height=t.height:o.height=0,t.width?o.width=t.width:o.width=0,o.preventDefault=function(){void 0!==t.preventDefault&&t.preventDefault()},void 0!==o.stopPropagation){var s=o.stopPropagation;o.stopPropagation=function(){void 0!==t.stopPropagation&&t.stopPropagation(),s.call(this)}}switch(o.pointerId=t.pointerId,o.pointerType=t.pointerType,o.pointerType){case 2:o.pointerType="touch";break;case 3:o.pointerType="pen";break;case 4:o.pointerType="mouse"}r?r.dispatchEvent(o):t.target?t.target.dispatchEvent(o):t.srcElement.fireEvent("on"+g(e),o)},h=function(t,e,n,r,i){t.pointerId=1,t.pointerType="mouse",c(t,e,n,r,i)},l=function(t,e,n,r,i,o){var a=e.identifier+2;e.pointerId=a,e.pointerType="touch",e.currentTarget=n,void 0!==r.preventDefault&&(e.preventDefault=function(){r.preventDefault()}),c(e,t,i,n,o)},f=function(t,e){return t.__handjsGlobalRegisteredEvents&&t.__handjsGlobalRegisteredEvents[e]},d=function(t,e){for(;t&&!f(t,e);)t=t.parentNode;return t||(f(window,e)?window:void 0)},p=function(t,e,n,r,i,o){d(n,t)&&l(t,e,n,r,i,o)},g=function(t){return t.toLowerCase().replace("pointer","mouse")},_=function(t,e){var n=o.indexOf(e);return t+a[n]},m=function(t,e,n,r){if(void 0===t.__handjsRegisteredEvents&&(t.__handjsRegisteredEvents=[]),r){if(void 0!==t.__handjsRegisteredEvents[e])return void t.__handjsRegisteredEvents[e]++;t.__handjsRegisteredEvents[e]=1,t.addEventListener(e,n,!1)}else{if(-1!==t.__handjsRegisteredEvents.indexOf(e)&&0!==--t.__handjsRegisteredEvents[e])return;t.removeEventListener(e,n),t.__handjsRegisteredEvents[e]=0}},y=function(t,e,n){if(t.__handjsGlobalRegisteredEvents||(t.__handjsGlobalRegisteredEvents=[]),n){if(void 0!==t.__handjsGlobalRegisteredEvents[e])return void t.__handjsGlobalRegisteredEvents[e]++;t.__handjsGlobalRegisteredEvents[e]=1}else void 0!==t.__handjsGlobalRegisteredEvents[e]&&--t.__handjsGlobalRegisteredEvents[e]<0&&(t.__handjsGlobalRegisteredEvents[e]=0);var r,i;switch(window.MSPointerEvent?(r=function(t){return _("MS",t)},i=c):(r=g,i=h),e){case"pointerenter":case"pointerleave":var o=r(e);void 0!==t["on"+o.toLowerCase()]&&m(t,o,function(t){i(t,e)},n)}},v=function(t){var e=t.prototype?t.prototype.addEventListener:t.addEventListener,n=function(t,n,r){-1!==o.indexOf(t)&&y(this,t,!0),void 0===e?this.attachEvent("on"+g(t),n):e.call(this,t,n,r)};t.prototype?t.prototype.addEventListener=n:t.addEventListener=n},b=function(t){var e=t.prototype?t.prototype.removeEventListener:t.removeEventListener,n=function(t,n,r){-1!==o.indexOf(t)&&y(this,t,!1),void 0===e?this.detachEvent(g(t),n):e.call(this,t,n,r)};t.prototype?t.prototype.removeEventListener=n:t.removeEventListener=n};v(window),v(window.HTMLElement||window.Element),v(document),navigator.isCocoonJS||(v(HTMLBodyElement),v(HTMLDivElement),v(HTMLImageElement),v(HTMLUListElement),v(HTMLAnchorElement),v(HTMLLIElement),v(HTMLTableElement),window.HTMLSpanElement&&v(HTMLSpanElement)),window.HTMLCanvasElement&&v(HTMLCanvasElement),!navigator.isCocoonJS&&window.SVGElement&&v(SVGElement),b(window),b(window.HTMLElement||window.Element),b(document),navigator.isCocoonJS||(b(HTMLBodyElement),b(HTMLDivElement),b(HTMLImageElement),b(HTMLUListElement),b(HTMLAnchorElement),b(HTMLLIElement),b(HTMLTableElement),window.HTMLSpanElement&&b(HTMLSpanElement)),window.HTMLCanvasElement&&b(HTMLCanvasElement),!navigator.isCocoonJS&&window.SVGElement&&b(SVGElement);var w=!1,x=-1;!function(){window.MSPointerEvent?i(function(t){return _("MS",t)},c):(i(g,h),void 0!==window.ontouchstart&&(window.addEventListener("touchstart",function(e){for(var r=0;r<e.changedTouches.length;++r){var i=e.changedTouches[r];s[i.identifier]=i.target,p("pointerover",i,i.target,e,!0),n(i.target,null,function(t){l("pointerenter",i,t,e,!1)}),p("pointerdown",i,i.target,e,!0)}t()}),window.addEventListener("touchend",function(e){for(var n=0;n<e.changedTouches.length;++n){var i=e.changedTouches[n],o=s[i.identifier];p("pointerup",i,o,e,!0),p("pointerout",i,o,e,!0),r(o,null,function(t){l("pointerleave",i,t,e,!1)})}t()}),window.addEventListener("touchmove",function(e){for(var i=0;i<e.changedTouches.length;++i){var o=e.changedTouches[i],a=document.elementFromPoint(o.clientX,o.clientY),c=s[o.identifier];if(c&&!0===u(c)&&e.preventDefault(),p("pointermove",o,c,e,!0),!navigator.isCocoonJS){var a=document.elementFromPoint(o.clientX,o.clientY);if(c===a)continue;c&&(p("pointerout",o,c,e,!0,a),c.contains(a)||r(c,a,function(t){l("pointerleave",o,t,e,!1,a)})),a&&(p("pointerover",o,a,e,!0,c),a.contains(c)||n(a,c,function(t){l("pointerenter",o,t,e,!1,c)}
1)),s[o.identifier]=a}}t()}),window.addEventListener("touchcancel",function(t){for(var e=0;e<t.changedTouches.length;++e){var n=t.changedTouches[e];p("pointercancel",n,s[n.identifier],t,!0)}})))}(),void 0===navigator.pointerEnabled&&(navigator.pointerEnabled=!0,navigator.msPointerEnabled&&(navigator.maxTouchPoints=navigator.msMaxTouchPoints))}}(),function(){window.PointerEvent||document.styleSheets&&document.addEventListener&&document.addEventListener("DOMContentLoaded",function(){if(void 0===document.body.style.touchAction){var e=new RegExp(".+?{.*?}","m"),n=new RegExp(".+?{","m"),r=function(t){var r=e.exec(t);if(r){var i=r[0];t=t.replace(i,"").trim();var o=n.exec(i)[0].replace("{","").trim();if(-1!==i.replace(/\s/g,"").indexOf("touch-action:none"))for(var a=document.querySelectorAll(o),s=0;s<a.length;s++){var u=a[s];void 0!==u.style.msTouchAction?u.style.msTouchAction="none":u.handjs_forcePreventDefault=!0}return t}},i=function(e){if(window.setImmediate)e&&t(i,r(e));else for(;e;)e=r(e)};try{for(var o=0;o<document.styleSheets.length;o++){var a=document.styleSheets[o];if(null!=a.href){var s=new XMLHttpRequest;s.open("get",a.href),s.send();var u=s.responseText.replace(/(\n|\r)/g,"");i(u)}}}catch(t){}for(var c=document.getElementsByTagName("style"),o=0;o<c.length;o++){var h=c[o],l=h.innerHTML.replace(/(\n|\r)/g,"").trim();i(l)}}},!1)}()}).call(e,n(621).setImmediate)},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,h=-7,l=n?i-1:0,f=n?-1:1,d=t[e+l];for(l+=f,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+t[e+l],l+=f,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=r;h>0;a=256*a+t[e+l],l+=f,h-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,h=(1<<c)-1,l=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+l>=1?f/u:f*Math.pow(2,1-l),e*u>=2&&(a++,u/=2),a+l>=h?(s=0,a=h):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*g}},function(t,e){PIXI.DISPLAY_FLAG={AUTO_CHILDREN:0,AUTO_CONTAINER:1,AUTO_OBJECT:2,MANUAL_CONTAINER:3};var n=PIXI.WebGLRenderer,r=PIXI.CanvasRenderer;Object.assign(PIXI.Container.prototype,{displayList:null,displayChildren:null,displayParent:null,updateTransform:function(){this.visible&&(this.containerUpdateTransform(),this.displayList&&this.displayList.update(this))},renderCanvas:function(t){return this.visible?(this.displayOrder=t.incDisplayOrder(),this.worldAlpha<=0||!this.renderable?void 0:this.displayList?void this.displayList.renderCanvas(this,t):void this.containerRenderCanvas(t)):void(this.displayOrder=0)},renderWebGL:function(t){return this.visible?(this.displayOrder=t.incDisplayOrder(),this.worldAlpha<=0||!this.renderable?void 0:this.displayList?void this.displayList.renderWebGL(this,t):void this.containerRenderWebGL(t)):void(this.displayOrder=0)},containerRenderWebGL:PIXI.Container.prototype.renderWebGL,containerRenderCanvas:PIXI.Container.prototype.renderCanvas});var i,o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)};!function(t){var e=PIXI.utils,n=function(t){function e(e,n){t.call(this),this.currentIndex=0,this.zIndex=0,this.enableSort=!1,this.computedChildren=[],this.currentDisplayList=null,this.currentIndex=0,this.zIndex=e||0,this.enableSort=!!n,"function"===typeof n&&this.on("add",n)}return o(e,t),e.compareZOrder=function(t,e){return t.zOrder<e.zOrder?1:t.zOrder>e.zOrder?-1:t.updateOrder-e.updateOrder},e.prototype.clear=function(){for(var t=this.computedChildren,e=0;e<t.length;e++){var n=t[e].displayChildren;if(n&&n.length>0){for(var r=0;r<n.length;r++)n[r].displayParent=null;n.length=0}t[e].displayParent=null}t.length=0,this.currentDisplayList=null,this.currentIndex=0},e.prototype.add=function(t){t.displayOrder=this.computedChildren.length,this.emit
1("add",t),this.computedChildren.push(t)},e.prototype.update=function(){this.emit("update"),this.enableSort&&this.computedChildren.length>1&&this.computedChildren.sort(e.compareZOrder)},e.prototype.renderWebGL=function(t,e){for(var n=this.computedChildren,r=0;r<n.length;r++){var i=n[r];if(i.displayFlag)i.renderWebGL(e);else{i.displayOrder=e.incDisplayOrder(),i._renderWebGL(e);var o=i.displayChildren;if(o&&o.length)for(var a=0;a<o.length;a++){var s=o[a];s.displayOrder=e.incDisplayOrder(),s.displayFlag?s.renderWebGL(e):s._renderWebGL(e)}}}},e.prototype.renderCanvas=function(t,e){for(var n=this.computedChildren,r=0;r<n.length;r++){var i=n[r];if(i.displayFlag)i.renderCanvas(e);else{i.displayOrder=e.incDisplayOrder(),i._renderCanvas(e);var o=i.displayChildren;if(o&&o.length)for(var a=0;a<o.length;a++){var s=o[a];s.displayOrder=e.incDisplayOrder(),s.displayFlag?s.renderCanvas(e):s._renderCanvas(e)}}}},e}(e.EventEmitter);t.DisplayGroup=n}(i||(i={}));var i;!function(t){var e=PIXI.utils,n=function(e){function n(){e.call(this),this.container=null,this.totalElements=0,this.displayGroups=[],this.defaultDisplayGroup=new t.DisplayGroup(0,!1)}return o(n,e),n.prototype.clear=function(){for(var t=this.displayGroups,e=0;e<t.length;e++)t[e].clear();t.length=0,this.totalElements=0,this.container=null},n.prototype.destroy=function(){this.clear()},n.compareZIndex=function(t,e){return t.zIndex!==e.zIndex?t.zIndex-e.zIndex:t.currentIndex-e.currentIndex},n.prototype._addRecursive=function(t,e){var n=t;if(n.visible&&n.renderable){var r=this.displayGroups,i=e.displayGroup;if(n.updateOrder=this.totalElements++,n.displayGroup?(i=n.displayGroup,i.currentDisplayList||(i.currentDisplayList=this,i.currentIndex=r.length,r.push(i)),i.add(n),n.displayParent=n):(n.displayParent=e,e.displayChildren||(e.displayChildren=[]),e.displayChildren.push(n)),n.displayFlag!==PIXI.DISPLAY_FLAG.MANUAL_CONTAINER){var o=n.children;if(o&&o.length>0)if(n._mask||n._filters&&n._filters.length||n.displayList)n.displayFlag=PIXI.DISPLAY_FLAG.AUTO_CONTAINER;else{n.displayFlag=PIXI.DISPLAY_FLAG.AUTO_CHILDREN;for(var a=0;a<o.length;a++)this._addRecursive(o[a],n.displayParent)}else n.displayFlag=PIXI.DISPLAY_FLAG.AUTO_OBJECT}}},n.prototype.update=function(t){this.clear();t.displayGroup;this.displayGroups.push(this.defaultDisplayGroup),this.defaultDisplayGroup.add(t),this.container=t;var e=t.children,r=0;for(r=0;r<e.length;r++)this._addRecursive(e[r],t);var i=this.displayGroups;for(i.sort(n.compareZIndex),r=0;r<i.length;r++)i[r].currentIndex=r,i[r].update();this.emit("afterUpdate")},n.prototype.renderWebGL=function(t,e){t.displayFlag=PIXI.DISPLAY_FLAG.AUTO_CHILDREN;for(var n=this.displayGroups,r=0;r<n.length;r++){n[r].renderWebGL(t,e)}},n.prototype.renderCanvas=function(t,e){for(var n=this.displayGroups,r=0;r<n.length;r++){n[r].renderCanvas(t,e)}},n}(e.EventEmitter);t.DisplayList=n}(i||(i={})),Object.assign(PIXI.DisplayObject.prototype,{displayGroup:null,displayFlag:PIXI.DISPLAY_FLAG.AUTO_CHILDREN,displayParent:null,zOrder:0,updateOrder:0,displayOrder:0});var i;!function(t){var e=PIXI.interaction.InteractionManager;Object.assign(e.prototype,{_queue:[[],[]],_displayProcessInteractive:function(t,e,n,r){if(!e||!e.visible)return 0;var i=0,o=r=e.interactive||r;e.hitArea&&(o=!1);var a=e._mask;n<1/0&&a&&(a.containsPoint(t)||(n=1/0)),n<1/0&&e.filterArea&&(e.filterArea.contains(t.x,t.y)||(n=1/0));var s=e.children;if(e.interactiveChildren&&s)for(var u=s.length-1;u>=0;u--){var c=s[u],h=this._displayProcessInteractive(t,c,n,o);if(h){if(!c.parent)continue;i=h,n=h}}return r&&(n<e.displayOrder&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(i=e.displayOrder)):e.containsPoint&&e.containsPoint(t)&&(i=e.displayOrder)),e.interactive&&this._queueAdd(e,i)),i},processInteractive:function(t,e,n,r,i){var o=null,a=null;t.data&&t.data.global?(o=t,a=o.data.global):a=t,this._startInteractionProcess(),this._displayProcessInteractive(a,e,r?0:1/0,!1),this._finishInteractionProcess(o,n)},_startInteractionProcess:function(){this._eventDisplayOrder=1,this._queue||(this._queue=[[],[]]),this._queue[0].length=0,this._queue[1].length=0},_queueAdd:function(t,e){var n=this._queue;if(e<this._eventDisplayOrder)n[0].push(t);else{if(e>this._eventDisplayOrder){this._eventDisplayOrder=e;for(var r=n[1],i=0;i<r.length;i++)n[0].push(r[i]);n[1].length=0}n[1].push(t)}},_finishInteractionProcess:function(t,e){for(var n=this._queue,r=n[0],i=0;i<r.length;i++)t?e(t,r[i],!1):e(r[i],!1);for(r=n[1],i=0;i<r.length;i++)t?(t.target||(t.target=r[i]),e(t,r[i],!0)):e(r[i],!0)}})}(i||(i={})),Object.assign(n.prototype,{_lastDisplayOrder:0,incDisplayOrder:function(){return++this._lastDisplayOrder},_oldRender:n.prototype.render,render:function(t,e,n,r,i){e||(this._lastDisplayOrder=0),this._oldRender(t,e,n,r,i)}}),Object.assign(r.prototype,{_lastDisplayOrder:0,incDisplayOrder:function(){return++this._lastDisplayOrder},_oldRender:r.prototype.render,render:function(t,e,n,r,i){e||(this._lastDisplayOrder=0),this._oldRender(t,e,n,r,i)}}),Object.assign(PIXI,{display:i,DisplayGroup:i.DisplayGroup,DisplayList:i.DisplayList})},function(t,e){var n=new ArrayBuffer(0),r=function(t,e,r,i){this.gl=t,this.buffer=t.createBuffer(),this.type=e||t.ARRAY_BUFFER,this.drawType=i||t.STATIC_DRAW,this.data=n,r&&this.upload(r),this._updateID=0};r.prototype.upload=function(t,e,n){n||this.bind();var r=this.gl;t=t||this.data,e=e||0,this.data.byteLength>=t.byteLength?r.bufferSubData(this.type,e,t):r.bufferData(this.type,t,this.drawType),this.data=t},r.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},r.createVertexBuffer=function(t,e,n){return new r(t,t.ARRAY_BUFFER,e,n)},r.createIndexBuffer=function(t,e,n){return new r(t,t.ELEMENT_ARRAY_BUFFER,e,n)},r.create=function(t,e,n,i){return new r(t,e,n,i)},r.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},t.exports=r},function(t,e,n){var r=n(233),i=function(t,e,n){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=n||100};i.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new r(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},i.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},i.prototype.clear=function(t,e,n,r){this.bind();var i=this.gl;i.clearColor(t,e,n,r),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},i.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},i.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},i.prototype.resize=function(t,e){var n=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,this.stencil),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t,e))},i.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},i.createRGBA=function(t,e,n,o){var a=r.fromData(t,null,e,n);a.enableNearestScaling(),a.enableWrapClamp();var s=new i(t,e,n);return s.enableTexture(a),s.unbind(),s},i.createFloat32=function(t,e,n,o){var a=new r.fromData(t,o,e,n);a.enableNearestScaling(),a.enableWrapClamp();var s=new i(t,e,n);return s.enableTexture(a),s.unbind(),s},t.exports=i},function(t,e,n){var r=n(235),i=n(237),o=n(238),a=n(241),s=n(239),u=function(t,e,n,u,c){this.gl=t,u&&(e=a(e,u),n=a(n,u)),this.program=r(t,e,n,c),this.attributes=i(t,this.program),this.uniformData=o(t,this.program),this.uniforms=s(t,this.uniformData)};u.prototype.bind=function(){return this.gl.useProgram(this.program),this},u.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},t.exports=u},function(t,e,n){function r(t,e){if(this.nativeVaoExtension=null,r.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var n=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(n),attribState:new Array(n)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var i=n(234);r.prototype.constructor=r,t.exports=r,r.FORCE_NATIVE=!1,r.prototype.bind=function(){return this.nativeVao?(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty&&(this.dirty=!1,this.activate())):this.activate(),this},r.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},r.prototype.activate=function(){for(var t=this.gl,e=null,n=0;n<this.attributes.length;n++){var r=this.attributes[n];e!==r.buffer&&(r.buffer.bind(),e=r.buffer),t.vertexAttribPointer(r.attribute.location,r.attribute.size,r.type||t.FLOAT,r.normalized||!1,r.stride||0,r.start||0
1)}return i(t,this.attributes,this.nativeState),this.indexBuffer&&this.indexBuffer.bind(),this},r.prototype.addAttribute=function(t,e,n,r,i,o){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:n||this.gl.FLOAT,normalized:r||!1,stride:i||0,start:o||0}),this.dirty=!0,this},r.prototype.addIndex=function(t){return this.indexBuffer=t,this.dirty=!0,this},r.prototype.clear=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},r.prototype.draw=function(t,e,n){var r=this.gl;return this.indexBuffer?r.drawElements(t,e||this.indexBuffer.data.length,r.UNSIGNED_SHORT,2*(n||0)):r.drawArrays(t,n,e||this.getSize()),this},r.prototype.destroy=function(){this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null},r.prototype.getSize=function(){var t=this.attributes[0];return t.buffer.data.length/(t.stride/4||t.attribute.size)}},function(t,e){var n=function(t,e){var n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e);if(!n)throw new Error("This browser does not support webGL. Try using the canvas renderer");return n};t.exports=n},function(t,e,n){t.exports={compileProgram:n(235),defaultValue:n(236),extractAttributes:n(237),extractUniforms:n(238),generateUniformAccessObject:n(239),setPrecision:n(241),mapSize:n(240),mapType:n(172)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=n(6),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=n(171),u=r(s),c=n(242),h=r(c);a.utils.mixins.delayMixin(a.DisplayObject.prototype,h.default);var l=100,f=0,d=0,p=2,g=function(){function t(e){i(this,t),!u.default.tablet&&!u.default.phone||navigator.isCocoonJS||this.createTouchHook();var n=document.createElement("div");n.style.width=l+"px",n.style.height=l+"px",n.style.position="absolute",n.style.top=f+"px",n.style.left=d+"px",n.style.zIndex=p,this.div=n,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=e,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessabillity=!1,window.addEventListener("keydown",this._onKeyDown,!1)}return t.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",function(){t.isMobileAccessabillity=!0,t.activate(),document.body.removeChild(e)}),document.body.appendChild(e)},t.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},t.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessabillity&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,n=e.length-1;n>=0;n--)this.updateAccessibleObjects(e[n])}},t.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,n=t.height/this.renderer.height,r=this.div;r.style.left=t.left+"px",r.style.top=t.top+"px",r.style.width=this.renderer.width+"px",r.style.height=this.renderer.height+"px";for(var i=0;i<this.children.length;i++){var o=this.children[i];if(o.renderId!==this.renderId)o._accessibleActive=!1,a.utils.removeItems(this.children,i,1),this.div.removeChild(o._accessibleDiv),this.pool.push(o._accessibleDiv),o._accessibleDiv=null,i--,0===this.children.length&&this.deactivate();else{r=o._accessibleDiv;var s=o.hitArea,u=o.worldTransform;o.hitArea?(r.style.left=(u.tx+s.x*u.a)*e+"px",r.style.top=(u.ty+s.y*u.d)*n+"px",r.style.width=s.width*u.a*e+"px",r.style.height=s.height*u.d*n+"px"):(s=o.getBounds(),this.capHitArea(s),r.style.left=s.x*e+"px",r.style.top=s.y*n+"px",r.style.width=s.width*e+"px",r.style.height=s.height*n+"px")}}this.renderId++}},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||(e=document.createElement("button"),e.style.width=l+"px",e.style.height=l+"px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=p,e.style.borderStyle="none",e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleTitle||t.accessibleHint||(e.title="displayObject "+this.tabIndex),t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(){this.deactivate()},t.prototype.destroy=function(){this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();e.default=g,a.WebGLRenderer.registerPlugin("accessibility",g),a.CanvasRenderer.registerPlugin("accessibility",g)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(242);Object.defineProperty(e,"accessibleTarget",{enumerable:!0,get:function(){return r(i).default}});var o=n(522);Object.defineProperty(e,"AccessibilityManager",{enumerable:!0,get:function(){return r(o).default}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(110),u=r(s),c=n(180),h=r(c),l=n(76),f=r(l),d=n(248),p=r(d),g=n(178),_=r(g),m=n(29),y=n(11),v=n(5),b=n(173),w=r(b),x=n(526),S=r(x),T=n(111),E=r(T),P=void 0,O=new m.Matrix,M=new m.Point,C=new Float32Array(4),A=new Float32Array(4),I=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];i(this,e);var r=o(this,t.call(this));return r.fillAlpha=1,r.lineWidth=0,r.nativeLines=n,r.lineColor=0,r.graphicsData=[],r.tint=16777215,r._prevTint=16777215,r.blendMode=v.BLEND_MODES.NORMAL,r.currentPath=null,r._webGL={},r.isMask=!1,r.boundsPadding=0,r._localBounds=new w.default,r.dirty=0,r.fastRectDirty=-1,r.clearDirty=0,r.boundsDirty=-1,r.cachedSpriteDirty=!1,r._spriteRect=null,r._fastRect=!1,r}return a(e,t),e.prototype.clone=function(){var t=new e;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var n=0;n<this.graphicsData.length;++n)t.graphicsData.push(this.graphicsData[n].clone());return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds(),t},e.prototype.lineStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=n,this.currentPath)if(this.currentPath.shape.points.length){var r=new m.Polygon(this.currentPath.shape.points.slice(-2));r.closed=!1,this.drawShape(r)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha;return this},e.prototype.moveTo=function(t,e){var n=new m.Polygon([t,e]);return n.closed=!1,this.drawShape(n),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.prototype.quadraticCurveTo=function(t,e,n,r){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var i=this.currentPath.shape.points,o=0,a=0;0===i.length&&this.moveTo(0,0);for(var s=i[i.length-2],u=i[i.length-1],c=1;c<=20;++c){var h=c/20;o=s+(t-s)*h,a=u+(e-u)*h,i.push(o+(t+(n-t)*h-o)*h,a+(e+(r-e)*h-a)*h)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,e,n,r,i,o){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var a=this.currentPath.shape.points,s=a[a.length-2],u=a[a.length-1];return a.length-=2,(0,S.default)(s,u,t,e,n,r,i,o,a),this.dirty++,this},e.prototype.arcTo=function(t,e,n,r,i){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,a=o[o.length-2],s=o[o.length-1],u=s-e,c=a-t,h=r-e,l=n-t,f=Math.abs(u*l-c*h);if(f<1e-8||0===i)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var d=u*u+c*c,p=h*h+l*l,g=u*h+c*l,_=i*Math.sqrt(d)/f,m=i*Math.sqrt(p)/f,y=_*g/d,v=m*g/p,b=_*l+m*c,w=_*h+m*u,x=c*(m+y),S=u*(m+y),T=l*(_+v),E=h*(_+v),P=Math.atan2(S-w,x-b),O=Math.atan2(E-w,T-b);this.arc(b+t,w+e,i,P,O,c*h>l*u)}return this.dirty++,this},e.prototype.arc=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(r===i)return this;!o&&i<=r?i+=2*Math.PI:o&&r<=i&&(r+=2*Math.PI);var a=i-r,s=40*Math.ceil(Math.abs(a)/(2*Math.PI));if(0===a)return this;var u=t+Math.cos(r)*n,c=e+Math.sin(r)*n,h=this.currentPath?this.currentPath.shape.points:null;h?h[h.length-2]===u&&h[h.length-1]===c||h.push(u,c):(this.moveTo(u,c),h=this.currentPath.shape.points);for(var l=a/(2*s),f=2*l,d=Math.cos(l),p=Math.sin(l),g=s-1,_=g%1/g,m=0;m<=g;++m){var y=m+_*m,v=l+r+f*y,b=Math.cos(v),w=-Math.sin(v);h.push((d*b+p*w)*n+t,(d*-w+p*b)*n+e)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.filling=!0,this.fillColor=t,this.fillAlpha=e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},e.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,n,r){return this.drawShape(new m.Rectangle(t,e,n,r)),this},e.prototype.drawRoundedRect=function(t,e,n,r,i){return this.drawShape(new m.RoundedRectangle(t,e,n,r,i)),this},e.prototype.drawCircle=function(t,e,n){return this.drawShape(new m.Circle(t,e,n)),this},e.prototype.drawEllipse=function(t,e,n,r){return this.drawShape(new m.Ellipse(t,e,n,r)),this},e.prototype.drawPolygon=function(t){var e=t,n=!0;if(e instanceof m.Polygon&&(n=e.closed,e=e.points),!Array.isArray(e)){e=ne
1w Array(arguments.length);for(var r=0;r<e.length;++r)e[r]=arguments[r]}var i=new m.Polygon(e);return i.closed=n,this.drawShape(i),this},e.prototype.clear=function(){return(this.lineWidth||this.filling||this.graphicsData.length>0)&&(this.lineWidth=0,this.filling=!1,this.boundsDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},e.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===v.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},e.prototype._renderSpriteRect=function(t){var e=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new _.default(new f.default(f.default.WHITE)));var n=this._spriteRect;if(16777215===this.tint)n.tint=this.graphicsData[0].fillColor;else{var r=C,i=A;(0,y.hex2rgb)(this.graphicsData[0].fillColor,r),(0,y.hex2rgb)(this.tint,i),r[0]*=i[0],r[1]*=i[1],r[2]*=i[2],n.tint=(0,y.rgb2hex)(r)}n.alpha=this.graphicsData[0].fillAlpha,n.worldAlpha=this.worldAlpha*n.alpha,n.blendMode=this.blendMode,n._texture._frame.width=e.width,n._texture._frame.height=e.height,n.transform.worldTransform=this.transform.worldTransform,n.anchor.set(-e.x/e.width,-e.y/e.height),n._onAnchorUpdate(),n._renderWebGL(t)},e.prototype._renderCanvas=function(t){!0!==this.isMask&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,M);for(var e=this.graphicsData,n=0;n<e.length;++n){var r=e[n];if(r.fill&&(r.shape&&r.shape.contains(M.x,M.y))){if(r.holes)for(var i=0;i<r.holes.length;i++){var o=r.holes[i];if(o.contains(M.x,M.y))return!1}return!0}}return!1},e.prototype.updateLocalBounds=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0;if(this.graphicsData.length)for(var i=0,o=0,a=0,s=0,u=0,c=0;c<this.graphicsData.length;c++){var h=this.graphicsData[c],l=h.type,f=h.lineWidth;if(i=h.shape,l===v.SHAPES.RECT||l===v.SHAPES.RREC)o=i.x-f/2,a=i.y-f/2,s=i.width+f,u=i.height+f,t=o<t?o:t,e=o+s>e?o+s:e,n=a<n?a:n,r=a+u>r?a+u:r;else if(l===v.SHAPES.CIRC)o=i.x,a=i.y,s=i.radius+f/2,u=i.radius+f/2,t=o-s<t?o-s:t,e=o+s>e?o+s:e,n=a-u<n?a-u:n,r=a+u>r?a+u:r;else if(l===v.SHAPES.ELIP)o=i.x,a=i.y,s=i.width+f/2,u=i.height+f/2,t=o-s<t?o-s:t,e=o+s>e?o+s:e,n=a-u<n?a-u:n,r=a+u>r?a+u:r;else for(var d=i.points,p=0,g=0,_=0,m=0,y=0,b=0,w=0,x=0,S=0;S+2<d.length;S+=2)o=d[S],a=d[S+1],p=d[S+2],g=d[S+3],_=Math.abs(p-o),m=Math.abs(g-a),u=f,(s=Math.sqrt(_*_+m*m))<1e-9||(y=(u/s*m+_)/2,b=(u/s*_+m)/2,w=(p+o)/2,x=(g+a)/2,t=w-y<t?w-y:t,e=w+y>e?w+y:e,n=x-b<n?x-b:n,r=x+b>r?x+b:r)}else t=0,e=0,n=0,r=0;var T=this.boundsPadding;this._localBounds.minX=t-T,this._localBounds.maxX=e+T,this._localBounds.minY=n-T,this._localBounds.maxY=r+T},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new p.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,t);return this.graphicsData.push(e),e.type===v.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getLocalBounds(),r=h.default.create(n.width,n.height,t,e);P||(P=new E.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(O),O.invert(),O.tx-=n.x,O.ty-=n.y,P.render(this,r,!0,O);var i=f.default.fromCanvas(r.baseTexture._canvasRenderTarget.canvas,t,"graphics");return i.baseTexture.resolution=e,i.baseTexture.update(),i},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var n=0;n<this.graphicsData.length;++n)this.graphicsData[n].destroy();for(var r in this._webgl)for(var i=0;i<this._webgl[r].data.length;++i)this._webgl[r].data[i].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webgl=null,this._localBounds=null},e}(u.default);e.default=I,I._SPRITE_TEXTURE=null},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(111),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=n(5),s=function(){function t(e){r(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,n=e.context,r=t.worldAlpha,i=t.transform.worldTransform,o=e.resolution;this._prevTint!==this.tint&&(this.dirty=!0),n.setTransform(i.a*o,i.b*o,i.c*o,i.d*o,i.tx*o,i.ty*o),t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1),e.setBlendMode(t.blendMode);for(var s=0;s<t.graphicsData.length;s++){var u=t.graphicsData[s],c=u.shape,h=u._fillTint,l=u._lineTint;if(n.lineWidth=u.lineWidth,u.type===a.SHAPES.POLY){n.beginPath(),this.renderPolygon(c.points,c.closed,n);for(var f=0;f<u.holes.length;f++)this.renderPolygon(u.holes[f].points,!0,n);u.fill&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.fill()),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),n.stroke())}else if(u.type===a.SHAPES.RECT)(u.fillColor||0===u.fillColor)&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.fillRect(c.x,c.y,c.width,c.height)),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),n.strokeRect(c.x,c.y,c.width,c.height));else if(u.type===a.SHAPES.CIRC)n.beginPath(),n.arc(c.x,c.y,c.radius,0,2*Math.PI),n.closePath(),u.fill&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.fill()),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),n.stroke());else if(u.type===a.SHAPES.ELIP){var d=2*c.width,p=2*c.height,g=c.x-d/2,_=c.y-p/2;n.beginPath();
1var m=d/2*.5522848,y=p/2*.5522848,v=g+d,b=_+p,w=g+d/2,x=_+p/2;n.moveTo(g,x),n.bezierCurveTo(g,x-y,w-m,_,w,_),n.bezierCurveTo(w+m,_,v,x-y,v,x),n.bezierCurveTo(v,x+y,w+m,b,w,b),n.bezierCurveTo(w-m,b,g,x+y,g,x),n.closePath(),u.fill&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.fill()),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),n.stroke())}else if(u.type===a.SHAPES.RREC){var S=c.x,T=c.y,E=c.width,P=c.height,O=c.radius,M=Math.min(E,P)/2|0;O=O>M?M:O,n.beginPath(),n.moveTo(S,T+O),n.lineTo(S,T+P-O),n.quadraticCurveTo(S,T+P,S+O,T+P),n.lineTo(S+E-O,T+P),n.quadraticCurveTo(S+E,T+P,S+E,T+P-O),n.lineTo(S+E,T+O),n.quadraticCurveTo(S+E,T,S+E-O,T),n.lineTo(S+O,T),n.quadraticCurveTo(S,T,S,T+O),n.closePath(),(u.fillColor||0===u.fillColor)&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),n.fill()),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),n.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,n=(t.tint>>8&255)/255,r=(255&t.tint)/255,i=0;i<t.graphicsData.length;++i){var o=t.graphicsData[i],a=0|o.fillColor,s=0|o.lineColor;o._fillTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*n*255<<8)+(255&a)/255*r*255,o._lineTint=((s>>16&255)/255*e*255<<16)+((s>>8&255)/255*n*255<<8)+(255&s)/255*r*255}},t.prototype.renderPolygon=function(t,e,n){n.moveTo(t[0],t[1]);for(var r=1;r<t.length/2;++r)n.lineTo(t[2*r],t[2*r+1]);e&&n.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();e.default=s,o.default.registerPlugin("graphics",s)},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[],c=0,h=0,l=0,f=0,d=0;u.push(t,e);for(var p=1,g=0;p<=20;++p)g=p/20,c=1-g,h=c*c,l=h*c,f=g*g,d=f*g,u.push(l*t+3*h*g*n+3*c*f*i+d*a,l*e+3*h*g*r+3*c*f*o+d*s);return u}e.__esModule=!0,e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(11),u=n(5),c=n(134),h=r(c),l=n(133),f=r(l),d=n(528),p=r(d),g=n(529),_=r(g),m=n(531),y=r(m),v=n(532),b=r(v),w=n(533),x=r(w),S=n(530),T=r(S),E=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.graphicsDataPool=[],r.primitiveShader=null,r.gl=n.gl,r.CONTEXT_UID=0,r}return a(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new _.default(this.gl)},e.prototype.destroy=function(){h.default.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy();this.graphicsDataPool=null},e.prototype.render=function(t){var e=this.renderer,n=e.gl,r=void 0,i=t._webGL[this.CONTEXT_UID];i&&t.dirty===i.dirty||(this.updateGraphics(t),i=t._webGL[this.CONTEXT_UID]);var o=this.primitiveShader;e.bindShader(o),e.state.setBlendMode(t.blendMode);for(var a=0,u=i.data.length;a<u;a++){r=i.data[a];var c=r.shader;e.bindShader(c),c.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),c.uniforms.tint=(0,s.hex2rgb)(t.tint),c.uniforms.alpha=t.worldAlpha,e.bindVao(r.vao),r.nativeLines?n.drawArrays(n.LINES,0,r.points.length/6):r.vao.draw(n.TRIANGLE_STRIP,r.indices.length)}},e.prototype.updateGraphics=function(t){var e=this.renderer.gl,n=t._webGL[this.CONTEXT_UID];if(n||(n=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),n.dirty=t.dirty,t.clearDirty!==n.clearDirty){n.clearDirty=t.clearDirty;for(var r=0;r<n.data.length;r++)this.graphicsDataPool.push(n.data[r]);n.data.length=0,n.lastIndex=0}for(var i=void 0,o=void 0,a=n.lastIndex;a<t.graphicsData.length;a++){var s=t.graphicsData[a];i=this.getWebGLData(n,0),s.nativeLines&&s.lineWidth&&(o=this.getWebGLData(n,0,!0),n.lastIndex++),s.type===u.SHAPES.POLY&&(0,y.default)(s,i,o),s.type===u.SHAPES.RECT?(0,b.default)(s,i,o):s.type===u.SHAPES.CIRC||s.type===u.SHAPES.ELIP?(0,T.default)(s,i,o):s.type===u.SHAPES.RREC&&(0,x.default)(s,i,o),n.lastIndex++}this.renderer.bindVao(null);for(var c=0;c<n.data.length;c++)i=n.data[c],i.dirty&&i.upload()},e.prototype.getWebGLData=function(t,e,n){var r=t.data[t.data.length-1];return(!r||r.nativeLines!==n||r.points.length>32e4)&&(r=this.graphicsDataPool.pop()||new p.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState),r.nativeLines=n,r.reset(e),t.data.push(r)),r.dirty=!0,r},e}(h.default);e.default=E,f.default.registerPlugin("graphics",E)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(47),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=function(){function t(e,n,i){r(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=o.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=o.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=n,this.vao=new o.default.VertexArrayObject(e,i).addIndex(this.indexBuffer).addAttribute(this.buffer,n.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,n.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function(){this.points.length=0,this.indices.length=0},t.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},t.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},t}();e.default=a},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(109),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n){return r(this,e),i(this,t.call(this,n,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n")))}return o(e,t),e}(s.default);e.default=u},function(t,e,n){"use strict";function r(t,e,n){var r=t.shape,i=r.x,u=r.y,c=void 0,h=void 0;if(t.type===a.SHAPES.CIRC?(c=r.radius,h=r.radius):(c=r.width,h=r.height),0!==c&&0!==h){var l=Math.floor(30*Math.sqrt(r.radius))||Math.floor(15*Math.sqrt(r.width+r.height)),f=2*Math.PI/l;if(t.fill){var d=(0,s.hex2rgb)(t.fillColor),p=t.fillAlpha,g=d[0]*p,_=d[1]*p,m=d[2]*p,y=e.points,v=e.indices,b=y.length/6;v.push(b);for(var w=0;w<l+1;w++)y.push(i,u,g,_,m,p),y.push(i+Math.sin(f*w)*c,u+Math.cos(f*w)*h,g,_,m,p),v.push(b++,b++);v.push(b-1)}if(t.lineWidth){var x=t.points;t.points=[];for(var S=0;S<l+1;S++)t.points.push(i+Math.sin(f*S)*c,u+Math.cos(f*S)*h);(0,o.default)(t,e,n),t.points=x}}}e.__esModule=!0,e.default=r;var i=n(132),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=n(5),s=n(11)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){t.points=t.shape.points.slice();var r=t.points;if(t.fill&&r.length>=6){for(var i=[],o=t.holes,u=0;u<o.length;u++){var h=o[u];i.push(r.length/2),r=r.concat(h.points)}var l=e.points,f=e.indices,d=r.length/2,p=(0,s.hex2rgb)(t.fillColor),g=t.fillAlpha,_=p[0]*g,m=p[1]*g,y=p[2]*g,v=(0,c.default)(r,i,2);
1if(!v)return;for(var b=l.length/6,w=0;w<v.length;w+=3)f.push(v[w]+b),f.push(v[w]+b),f.push(v[w+1]+b),f.push(v[w+2]+b),f.push(v[w+2]+b);for(var x=0;x<d;x++)l.push(r[2*x],r[2*x+1],_,m,y,g)}t.lineWidth>0&&(0,a.default)(t,e,n)}e.__esModule=!0,e.default=i;var o=n(132),a=r(o),s=n(11),u=n(229),c=r(u)},function(t,e,n){"use strict";function r(t,e,n){var r=t.shape,i=r.x,s=r.y,u=r.width,c=r.height;if(t.fill){var h=(0,a.hex2rgb)(t.fillColor),l=t.fillAlpha,f=h[0]*l,d=h[1]*l,p=h[2]*l,g=e.points,_=e.indices,m=g.length/6;g.push(i,s),g.push(f,d,p,l),g.push(i+u,s),g.push(f,d,p,l),g.push(i,s+c),g.push(f,d,p,l),g.push(i+u,s+c),g.push(f,d,p,l),_.push(m,m,m+1,m+2,m+3,m+3)}if(t.lineWidth){var y=t.points;t.points=[i,s,i+u,s,i+u,s+c,i,s+c,i,s],(0,o.default)(t,e,n),t.points=y}}e.__esModule=!0,e.default=r;var i=n(132),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=n(11)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){var r=t.shape,i=r.x,o=r.y,s=r.width,c=r.height,f=r.radius,d=[];if(d.push(i,o+f),a(i,o+c-f,i,o+c,i+f,o+c,d),a(i+s-f,o+c,i+s,o+c,i+s,o+c-f,d),a(i+s,o+f,i+s,o,i+s-f,o,d),a(i+f,o,i,o,i,o+f+1e-10,d),t.fill){for(var p=(0,l.hex2rgb)(t.fillColor),g=t.fillAlpha,_=p[0]*g,m=p[1]*g,y=p[2]*g,v=e.points,b=e.indices,w=v.length/6,x=(0,u.default)(d,null,2),S=0,T=x.length;S<T;S+=3)b.push(x[S]+w),b.push(x[S]+w),b.push(x[S+1]+w),b.push(x[S+2]+w),b.push(x[S+2]+w);for(var E=0,P=d.length;E<P;E++)v.push(d[E],d[++E],_,m,y,g)}if(t.lineWidth){var O=t.points;t.points=d,(0,h.default)(t,e,n),t.points=O}}function o(t,e,n){return t+(e-t)*n}function a(t,e,n,r,i,a){for(var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],u=s,c=0,h=0,l=0,f=0,d=0,p=0,g=0,_=0;g<=20;++g)_=g/20,c=o(t,n,_),h=o(e,r,_),l=o(n,i,_),f=o(r,a,_),d=o(c,l,_),p=o(h,f,_),u.push(d,p);return u}e.__esModule=!0,e.default=i;var s=n(229),u=r(s),c=n(132),h=r(c),l=n(11)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(177),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=n(5),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;r(this,t),this.x=e,this.y=n,this.radius=i,this.type=a.SHAPES.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-t,i=this.y-e;return r*=r,i*=i,r+i<=n},t.prototype.getBounds=function(){return new o.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(177),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=n(5),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.x=e,this.y=n,this.width=i,this.height=o,this.type=a.SHAPES.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var n=(t-this.x)/this.width,r=(e-this.y)/this.height;return n*=n,r*=r,n+r<=1},t.prototype.getBounds=function(){return new o.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(176),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=n(5),s=function(){function t(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];if(r(this,t),Array.isArray(n[0])&&(n=n[0]),n[0]instanceof o.default){for(var s=[],u=0,c=n.length;u<c;u++)s.push(n[u].x,n[u].y);n=s}this.closed=!0,this.points=n,this.type=a.SHAPES.POLY}return t.prototype.clone=function(){return new t(this.points.slice())},t.prototype.close=function(){var t=this.points;
1t[0]===t[t.length-2]&&t[1]===t[t.length-1]||t.push(t[0],t[1])},t.prototype.contains=function(t,e){for(var n=!1,r=this.points.length/2,i=0,o=r-1;i<r;o=i++){var a=this.points[2*i],s=this.points[2*i+1],u=this.points[2*o],c=this.points[2*o+1];s>e!==c>e&&t<(e-s)/(c-s)*(u-a)+a&&(n=!n)}return n},t}();e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(5),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;r(this,t),this.x=e,this.y=n,this.width=o,this.height=a,this.radius=s,this.type=i.SHAPES.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var n=t-(this.x+this.radius),r=e-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if((n=t-(this.x+this.width-this.radius))*n+r*r<=i)return!0;if(r=e-(this.y+this.height-this.radius),n*n+r*r<=i)return!0;if((n=t-(this.x+this.radius))*n+r*r<=i)return!0}return!1},t}();e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(5),o=function(){function t(e){r(this,t),this.renderer=e}return t.prototype.pushMask=function(t){var e=this.renderer;e.context.save();var n=t.alpha,r=t.transform.worldTransform,i=e.resolution;e.context.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i),t._texture||(this.renderGraphicsShape(t),e.context.clip()),t.worldAlpha=n},t.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,n=t.graphicsData.length;if(0!==n){e.beginPath();for(var r=0;r<n;r++){var o=t.graphicsData[r],a=o.shape;if(o.type===i.SHAPES.POLY){var s=a.points;e.moveTo(s[0],s[1]);for(var u=1;u<s.length/2;u++)e.lineTo(s[2*u],s[2*u+1]);s[0]===s[s.length-2]&&s[1]===s[s.length-1]&&e.closePath()}else if(o.type===i.SHAPES.RECT)e.rect(a.x,a.y,a.width,a.height),e.closePath();else if(o.type===i.SHAPES.CIRC)e.arc(a.x,a.y,a.radius,0,2*Math.PI),e.closePath();else if(o.type===i.SHAPES.ELIP){var c=2*a.width,h=2*a.height,l=a.x-c/2,f=a.y-h/2,d=c/2*.5522848,p=h/2*.5522848,g=l+c,_=f+h,m=l+c/2,y=f+h/2;e.moveTo(l,y),e.bezierCurveTo(l,y-p,m-d,f,m,f),e.bezierCurveTo(m+d,f,g,y-p,g,y),e.bezierCurveTo(g,y+p,m+d,_,m,_),e.bezierCurveTo(m-d,_,l,y+p,l,y),e.closePath()}else if(o.type===i.SHAPES.RREC){var v=a.x,b=a.y,w=a.width,x=a.height,S=a.radius,T=Math.min(w,x)/2|0;S=S>T?T:S,e.moveTo(v,b+S),e.lineTo(v,b+x-S),e.quadraticCurveTo(v,b+x,v+S,b+x),e.lineTo(v+w-S,b+x),e.quadraticCurveTo(v+w,b+x,v+w,b+x-S),e.lineTo(v+w,b+S),e.quadraticCurveTo(v+w,b,v+w-S,b),e.lineTo(v+S,b),e.quadraticCurveTo(v,b,v,b+S),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore(),t.invalidateBlendMode()},t.prototype.destroy=function(){},t}();e.default=o},function(t,e,n){"use strict";function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,a.default)()?(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="multiply",t[i.BLEND_MODES.SCREEN]="screen",t[i.BLEND_MODES.OVERLAY]="overlay",t[i.BLEND_MODES.DARKEN]="darken",t[i.BLEND_MODES.LIGHTEN]="lighten",t[i.BLEND_MODES.COLOR_DODGE]="color-dodge",t[i.BLEND_MODES.COLOR_BURN]="color-burn",t[i.BLEND_MODES.HARD_LIGHT]="hard-light",t[i.BLEND_MODES.SOFT_LIGHT]="soft-light",t[i.BLEND_MODES.DIFFERENCE]="difference",t[i.BLEND_MODES.EXCLUSION]="exclusion",t[i.BLEND_MODES.HUE]="hue",t[i.BLEND_MODES.SATURATION]="saturate",t[i.BLEND_MODES.COLOR]="color",t[i.BLEND_MODES.LUMINOSITY]="luminosity"):(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="source-over",t[i.BLEND_MODES.SCREEN]="source-over",t[i.BLEND_MODES.OVERLAY]="source-over",t[i.BLEND_MODES.DARKEN]="source-over",t[i.BLEND_MODES.LIGHTEN]="source-over",t[i.BLEND_MODES.COLOR_DODGE]="source-over",t[i.BLEND_MODES.COLOR_BURN]="source-over",t[i.BLEND_MODES.HARD_LIGHT]="source-over",t[i.BLEND_MODES.SOFT_LIGHT]="source-over",t[i.BLEND_MODES.DIFFERENCE]="source-over",t[i.BLEND_MODES.EXCLUSION]="source-over",t[i.BLEND_MODES.HUE]="source-over",t[i.BLEND_MODES.SATURATION]="source-over",t[i.BLEND_MODES.COLOR]="source-over",t[i.BLEND_MODES.LUMINOSITY]="source-over"),t[i.BLEND_MODES.NORMAL_NPM]=t[i.BLEND_MODES.NORMAL],t[i.BLEND_MODES.ADD_NPM]=t[i.BLEND_MODES.ADD],t[i.BLEND_MODES.SCREEN_NPM]=t[i.BLEND_MODES.SCREEN],t}e.__esModule=!0,e.default=r;var i=n(5),o=n(253),a=function(t){return t&&t.__esModule?t:{default:t}}(o)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(5),o=n(27),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(e){r(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=a.default.GC_MAX_IDLE,this.checkCountMax=a.default.GC_MAX_CHECK_COUNT,this.mode=a.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==i.GC_MODES.MANUAL&&++this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,n=!1,r=0;r<e.length;r++){var i=e[r];!i._glRenderTargets&&this.count-i.touched>
1this.maxIdle&&(t.destroyTexture(i,!0),e[r]=null,n=!0)}if(n){for(var o=0,a=0;a<e.length;a++)null!==e[a]&&(e[o++]=e[a]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture,!0);for(var n=t.children.length-1;n>=0;n--)this.unload(t.children[n])},t}();e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(47),o=n(5),a=n(135),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=n(11),c=function(){function t(e){r(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(t,e){var n=this.gl,r=!!t._glRenderTargets;if(!t.hasLoaded)return null;var a=this.renderer.boundTextures;if(void 0===e){e=0;for(var u=0;u<a.length;++u)if(a[u]===t){e=u;break}}a[e]=t,n.activeTexture(n.TEXTURE0+e);var c=t._glTextures[this.renderer.CONTEXT_UID];if(c)r?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):c.upload(t.source);else{if(r){var h=new s.default(this.gl,t.width,t.height,t.scaleMode,t.resolution);h.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=h,c=h.texture}else c=new i.GLTexture(this.gl,null,null,null,null),c.bind(e),c.premultiplyAlpha=!0,c.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=c,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&c.enableMipmap(),t.wrapMode===o.WRAP_MODES.CLAMP?c.enableWrapClamp():t.wrapMode===o.WRAP_MODES.REPEAT?c.enableWrapRepeat():c.enableWrapMirrorRepeat()):c.enableWrapClamp(),t.scaleMode===o.SCALE_MODES.NEAREST?c.enableNearestScaling():c.enableLinearScaling()}return c},t.prototype.destroyTexture=function(t,e){if(t=t.baseTexture||t,t.hasLoaded){var n=this.renderer.CONTEXT_UID,r=t._glTextures,i=t._glRenderTargets;if(r[n]&&(this.renderer.unbindTexture(t),r[n].destroy(),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete r[n],!e)){var o=this._managedTextures.indexOf(t);-1!==o&&(0,u.removeItems)(this._managedTextures,o,1)}i&&i[n]&&(i[n].destroy(),delete i[n])}},t.prototype.removeAll=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];e._glTextures[this.renderer.CONTEXT_UID]&&delete e._glTextures[this.renderer.CONTEXT_UID]}},t.prototype.destroy=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];this.destroyTexture(e,!0),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t}();e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(549),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=function(){function t(e){r(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,o.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.prototype.push=function(){var t=this.stack[this.stackIndex];t||(t=this.stack[this.stackIndex]=new Uint8Array(16)),++this.stackIndex;for(var e=0;e<this.activeState.length;e++)t[e]=this.activeState[e]},t.prototype.pop=function(){var t=this.stack[--this.stackIndex];this.setState(t)},t.prototype.setState=function(t){this.setBlend(t[0]),this.setDepthTest(t[1]),this.setFrontFace(t[2]),this.setCullFace(t[3]),this.setBlendMode(t[4])},t.prototype.setBlend=function(t){t=t?1:0,this.activeState[0]!==t&&(this.activeState[0]=t,this.gl[t?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(t){if(t!==this.activeState[4]){this.activeState[4]=t;var e=this.blendModes[t];2===e.length?this.gl.blendFunc(e[0],e[1]):this.gl.blendFuncSeparate(e[0],e[1],e[2],e[3])}},t.prototype.setDepthTest=function(t){t=t?1:0,this.activeState[1]!==t&&(this.activeState[1]=t,this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(t){t=t?1:0,this.activeState[3]!==t&&(this.activeState[3]=t,this.gl[t?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(t){t=t?1:0,this.activeState[2]!==t&&(this.activeState[2]=t,this.gl.frontFace(this.gl[t?"CW":"CCW"]))},t.prototype.resetAttributes=function(){for(var t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(var e=0;e<this.attribState.attribState.length;e++)this.attribState.attribState[e]=0;for(var n=1;n<this.maxAttribs;n++)this.gl.disableVertexAttribArray(n)},t.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var t=0;t<this.activeState.length;++t)this.activeState[t]=32;this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t}();e.default=a},function(t,e,n){"use strict";function r(t,e,n){var r=i(t),o=i(e);return Object.assign(r,o)}function i(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),n={},r=void 0,i=t.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o<i.length;o++){var a=i[o].trim();if(a.indexOf("uniform")>-1){var u=a.split(" "),c=u[1],h=u[2],l=1;h.indexOf("[")>-1&&(r=h.split(/\[|]/),h=r[0],l*=Number(r[1])),h.match(e)||(n[h]={value:s(c,l),name:h,type:c})}}return n}e.__esModule=!0,e.default=r;var o=n(47),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=a.default.shader.defaultValue},function(t,e,n){"use strict";function r(t,e,n){var r=t.identity();return r.translate(e.x/n.width,e.y/n.height),r.scale(n.width,n.height),r}function i(t,e,n){var r=t.identity();r.translate(e.x/n.width,e.y/n.height);
1var i=n.width/e.width,o=n.height/e.height;return r.scale(i,o),r}function o(t,e,n,r){var i=r._texture.orig,o=t.set(n.width,0,0,n.height,e.x,e.y),s=r.worldTransform.copy(a.Matrix.TEMP_MATRIX);return s.invert(),o.prepend(s),o.scale(1/i.width,1/i.height),o.translate(r.anchor.x,r.anchor.y),o}e.__esModule=!0,e.calculateScreenSpaceMatrix=r,e.calculateNormalizedScreenSpaceMatrix=i,e.calculateSpriteMatrix=o;var a=n(29)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var s=n(112),u=r(s),c=n(135),h=r(c),l=n(256),f=r(l),d=n(29),p=n(109),g=r(p),_=n(544),m=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(_),y=n(144),v=r(y),b=function t(){a(this,t),this.renderTarget=null,this.sourceFrame=new d.Rectangle,this.destinationFrame=new d.Rectangle,this.filters=[],this.target=null,this.resolution=1},w=function(t){function e(n){a(this,e);var r=i(this,t.call(this,n));return r.gl=r.renderer.gl,r.quad=new f.default(r.gl,n.state.attribState),r.shaderCache={},r.pool={},r.filterData=null,r.managedFilters=[],r}return o(e,t),e.prototype.pushFilter=function(t,e){var n=this.renderer,r=this.filterData;if(!r){r=this.renderer._activeRenderTarget.filterStack;var i=new b;i.sourceFrame=i.destinationFrame=this.renderer._activeRenderTarget.size,i.renderTarget=n._activeRenderTarget,this.renderer._activeRenderTarget.filterData=r={index:0,stack:[i]},this.filterData=r}var o=r.stack[++r.index];o||(o=r.stack[r.index]=new b);var a=e[0].resolution,s=0|e[0].padding,u=t.filterArea||t.getBounds(!0),c=o.sourceFrame,h=o.destinationFrame;c.x=(u.x*a|0)/a,c.y=(u.y*a|0)/a,c.width=(u.width*a|0)/a,c.height=(u.height*a|0)/a,r.stack[0].renderTarget.transform||e[0].autoFit&&c.fit(r.stack[0].destinationFrame),c.pad(s),h.width=c.width,h.height=c.height;var l=this.getPotRenderTarget(n.gl,c.width,c.height,a);o.target=t,o.filters=e,o.resolution=a,o.renderTarget=l,l.setFrame(h,c),n.bindRenderTarget(l),l.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],n=t.stack[t.index];this.quad.map(n.renderTarget.size,n.sourceFrame).upload();var r=n.filters;if(1===r.length)r[0].apply(this,n.renderTarget,e.renderTarget,!1,n),this.freePotRenderTarget(n.renderTarget);else{var i=n.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,n.sourceFrame.width,n.sourceFrame.height,n.resolution);o.setFrame(n.destinationFrame,n.sourceFrame),o.clear();var a=0;for(a=0;a<r.length-1;++a){r[a].apply(this,i,o,!0,n);var s=i;i=o,o=s}r[a].apply(this,i,e.renderTarget,!1,n),this.freePotRenderTarget(i),this.freePotRenderTarget(o)}0===--t.index&&(this.filterData=null)},e.prototype.applyFilter=function(t,e,n,r){var i=this.renderer,o=i.gl,a=t.glShaders[i.CONTEXT_UID];a||(t.glShaderKey?(a=this.shaderCache[t.glShaderKey])||(a=new g.default(this.gl,t.vertexSrc,t.fragmentSrc),t.glShaders[i.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=a):a=t.glShaders[i.CONTEXT_UID]=new g.default(this.gl,t.vertexSrc,t.fragmentSrc),this.managedFilters.push(t),i.bindVao(null),this.quad.initVao(a)),i.bindVao(this.quad.vao),i.bindRenderTarget(n),r&&(o.disable(o.SCISSOR_TEST),i.clear(),o.enable(o.SCISSOR_TEST)),n===i.maskManager.scissorRenderTarget&&i.maskManager.pushScissorMask(null,i.maskManager.scissorData),i.bindShader(a);var s=this.renderer.emptyTextures[0];this.renderer.boundTextures[0]=s,this.syncUniforms(a,t),i.state.setBlendMode(t.blendMode),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e.texture.texture),this.quad.vao.draw(this.renderer.gl.TRIANGLES,6,0),o.bindTexture(o.TEXTURE_2D,s._glTextures[this.renderer.CONTEXT_UID].texture)},e.prototype.syncUniforms=function(t,e){var n=e.uniformData,r=e.uniforms,i=1,o=void 0;if(t.uniforms.filterArea){o=this.filterData.stack[this.filterData.index];var a=t.uniforms.filterArea;a[0]=o.renderTarget.size.width,a[1]=o.renderTarget.size.height,a[2]=o.sourceFrame.x,a[3]=o.sourceFrame.y,t.uniforms.filterArea=a}if(t.uniforms.filterClamp){o=o||this.filterData.stack[this.filterData.index];var s=t.uniforms.filterClamp;
1s[0]=0,s[1]=0,s[2]=(o.sourceFrame.width-1)/o.renderTarget.size.width,s[3]=(o.sourceFrame.height-1)/o.renderTarget.size.height,t.uniforms.filterClamp=s}for(var u in n){var c=n[u].type;if("sampler2d"===c&&0!==r[u]){if(r[u].baseTexture)t.uniforms[u]=this.renderer.bindTexture(r[u].baseTexture,i);else{t.uniforms[u]=i;var h=this.renderer.gl;this.renderer.boundTextures[i]=this.renderer.emptyTextures[i],h.activeTexture(h.TEXTURE0+i),r[u].texture.bind()}i++}else if("mat3"===c)void 0!==r[u].a?t.uniforms[u]=r[u].toArray(!0):t.uniforms[u]=r[u];else if("vec2"===c)if(void 0!==r[u].x){var l=t.uniforms[u]||new Float32Array(2);l[0]=r[u].x,l[1]=r[u].y,t.uniforms[u]=l}else t.uniforms[u]=r[u];else"float"===c?t.uniforms.data[u].value!==n[u]&&(t.uniforms[u]=r[u]):t.uniforms[u]=r[u]}},e.prototype.getRenderTarget=function(t,e){var n=this.filterData.stack[this.filterData.index],r=this.getPotRenderTarget(this.renderer.gl,n.sourceFrame.width,n.sourceFrame.height,e||n.resolution);return r.setFrame(n.destinationFrame,n.sourceFrame),r},e.prototype.returnRenderTarget=function(t){this.freePotRenderTarget(t)},e.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return m.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},e.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return m.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},e.prototype.calculateSpriteMatrix=function(t,e){var n=this.filterData.stack[this.filterData.index];return m.calculateSpriteMatrix(t,n.sourceFrame,n.renderTarget.size,e)},e.prototype.destroy=function(){for(var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.renderer,n=this.managedFilters,r=0;r<n.length;r++)t||n[r].glShaders[e.CONTEXT_UID].destroy(),delete n[r].glShaders[e.CONTEXT_UID];this.shaderCache={},t?this.pool={}:this.emptyPool()},e.prototype.getPotRenderTarget=function(t,e,n,r){e=v.default.nextPow2(e*r),n=v.default.nextPow2(n*r);var i=(65535&e)<<16|65535&n;this.pool[i]||(this.pool[i]=[]);var o=this.pool[i].pop();if(!o){var a=this.renderer.boundTextures[0];t.activeTexture(t.TEXTURE0),o=new h.default(t,e,n,null,1),t.bindTexture(t.TEXTURE_2D,a._glTextures[this.renderer.CONTEXT_UID].texture)}return o.resolution=r,o.defaultFrame.width=o.size.width=e/r,o.defaultFrame.height=o.size.height=n/r,o},e.prototype.emptyPool=function(){for(var t in this.pool){var e=this.pool[t];if(e)for(var n=0;n<e.length;n++)e[n].destroy(!0)}this.pool={}},e.prototype.freePotRenderTarget=function(t){var e=t.size.width*t.resolution,n=t.size.height*t.resolution,r=(65535&e)<<16|65535&n;this.pool[r].push(t)},e}(u.default);e.default=w},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(112),u=r(s),c=n(255),h=r(c),l=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.scissor=!1,r.scissorData=null,r.scissorRenderTarget=null,r.enableScissor=!0,r.alphaMaskPool=[],r.alphaMaskIndex=0,r}return a(e,t),e.prototype.pushMask=function(t,e){if(e.texture)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&this.renderer._activeRenderTarget.root&&!this.renderer.stencilManager.stencilMaskStack.length&&e.isFastRect()){var n=e.worldTransform,r=Math.atan2(n.b,n.a);r=Math.round(r*(180/Math.PI)),r%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},e.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},e.prototype.pushSpriteMask=function(t,e){var n=this.alphaMaskPool[this.alphaMaskIndex];n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new h.default(e)]),n[0].resolution=this.renderer.resolution,n[0].maskSprite=e,t.filterArea=e.getBounds(!0),this.renderer.f
1ilterManager.pushFilter(t,n),this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(t)},e.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},e.prototype.pushScissorMask=function(t,e){e.renderable=!0;var n=this.renderer._activeRenderTarget,r=e.getBounds();r.fit(n.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var i=this.renderer.resolution;this.renderer.gl.scissor(r.x*i,(n.root?n.size.height-r.y-r.height:r.y)*i,r.width*i,r.height*i),this.scissorRenderTarget=n,this.scissorData=e,this.scissor=!0},e.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)},e}(u.default);e.default=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(112),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n){r(this,e);var o=i(this,t.call(this,n));return o.stencilMaskStack=null,o}return o(e,t),e.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},e.prototype.pushStencil=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer();var e=this.renderer.gl,n=this.stencilMaskStack.length;0===n&&e.enable(e.STENCIL_TEST),this.stencilMaskStack.push(t),e.colorMask(!1,!1,!1,!1),e.stencilFunc(e.EQUAL,n,this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.INCR),this.renderer.plugins.graphics.render(t),this._useCurrent()},e.prototype.popStencil=function(){this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var t=this.renderer.gl,e=this.stencilMaskStack.pop();0===this.stencilMaskStack.length?(t.disable(t.STENCIL_TEST),t.clear(t.STENCIL_BUFFER_BIT),t.clearStencil(0)):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),this.renderer.plugins.graphics.render(e),this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.stencilMaskStack.length,this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<<this.stencilMaskStack.length)-1},e.prototype.destroy=function(){s.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},e}(s.default);e.default=u},function(t,e,n){"use strict";function r(t,e){var n=!e;if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");if(n){var r=document.createElement("canvas");r.width=1,r.height=1,e=a.default.createContext(r)}for(var o=e.createShader(e.FRAGMENT_SHADER);;){var u=s.replace(/%forloop%/gi,i(t));if(e.shaderSource(o,u),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS))break;t=t/2|0}return n&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext(),t}function i(t){for(var e="",n=0;n<t;++n)n>0&&(e+="\nelse "),n<t-1&&(e+="if(test == "+n+".0){}");return e}e.__esModule=!0,e.default=r;var o=n(47),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n")},function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e[i.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[i.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[i.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.ADD_NPM]=[t.SRC_ALPHA,t.DST_ALPHA,t.ONE,t.DST_ALPHA],e[i.BLEND_MODES.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_COLOR],e}e.__esModule=!0,e.default=r;var i=n(5)},function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[i.DRAW_MODES.POINTS]=t.POINTS,e[i.DRAW_MODES.LINES]=t.LINES,e[i.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[i.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[i.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[i.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[i.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN,e}e.__esModule=!0,e.default=r;var i=n(5)},function(t,e,n){"use strict";function r(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}e.__esModule=!0,e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=n(111),a=r(o),s=n(5),u=n(29),c=n(179),h=r(c),l=new u.Matrix,f=function(){function t(e){i(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,n=this.renderer,r=e._frame.width,i=e._frame.height,o=t.transform.worldTransform,a=0,c=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(n.setBlendMode(t.blendMode),e.valid)){n.context.globalAlpha=t.worldAlpha;var f=e.baseTexture.scaleMode===s.SCALE_MODES.LINEAR;n.smoothProperty&&n.context[n.smoothProperty]!==f&&(n.context[n.smoothProperty]=f),e.trim?(a=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,c=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(a=(.5-t.anchor.x)*e.orig.width,c=(.5-t.anchor.y)*e.orig.height),e.rotate&&(o.copy(l),o=l,u.GroupD8.matrixAppendRotationInv(o,e.rotate,a,c),a=0,c=0),a-=r/2,c-=i/2,n.roundPixels?(n.context.setTransform(o.a,o.b,o.
1c,o.d,o.tx*n.resolution|0,o.ty*n.resolution|0),a|=0,c|=0):n.context.setTransform(o.a,o.b,o.c,o.d,o.tx*n.resolution,o.ty*n.resolution);var d=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=h.default.getTintedTexture(t,t.tint)),n.context.drawImage(t.tintedTexture,0,0,r*d,i*d,a*n.resolution,c*n.resolution,r*n.resolution,i*n.resolution)):n.context.drawImage(e.baseTexture.source,e._frame.x*d,e._frame.y*d,r*d,i*d,a*n.resolution,c*n.resolution,r*n.resolution,i*n.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();e.default=f,a.default.registerPlugin("sprite",f)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(e){r(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t}();e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(134),u=r(s),c=n(133),h=r(c),l=n(182),f=r(l),d=n(555),p=r(d),g=n(548),_=r(g),m=n(553),y=r(m),v=n(27),b=r(v),w=n(11),x=n(47),S=r(x),T=n(144),E=r(T),P=0,O=0,M=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));r.vertSize=5,r.vertByteSize=4*r.vertSize,r.size=b.default.SPRITE_BATCH_SIZE,r.buffers=[];for(var a=1;a<=E.default.nextPow2(r.size);a*=2)r.buffers.push(new y.default(4*a*r.vertByteSize));r.indices=(0,f.default)(r.size),r.shader=null,r.currentIndex=0,r.groups=[];for(var s=0;s<r.size;s++)r.groups[s]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return r.sprites=[],r.vertexBuffers=[],r.vaos=[],r.vaoMax=2,r.vertexCount=0,r.renderer.on("prerender",r.onPrerender,r),r}return a(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.renderer.legacy?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),b.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,_.default)(this.MAX_TEXTURES,t)),this.shader=(0,p.default)(t,this.MAX_TEXTURES),this.indexBuffer=S.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.renderer.bindVao(null);for(var e=this.shader.attributes,n=0;n<this.vaoMax;n++){var r=this.vertexBuffers[n]=S.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),i=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(r,e.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(r,e.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(r,e.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);e.aTextureId&&i.addAttribute(r,e.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[n]=i}this.vao=this.vaos[0],this.currentBlendMode=99999,this.boundTextures=new Array(this.MAX_TEXTURES)},e.prototype.onPrerender=function(){this.vertexCount=0},e.prototype.render=function(t){this.currentIndex>=this.size&&this.flush(),t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,n=E.default.nextPow2(this.currentIndex),r=E.default.log2(n),i=this.buffers[r],o=this.sprites,a=this.groups,s=i.float32View,u=i.uint32View,c=this.boundTextures,h=this.renderer.boundTextures,l=this.renderer.textureGC.count,f=0,d=void 0,p=void 0,g=1,_=0,m=a[0],y=void 0,v=void 0,x=w.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha?1:0][o[0].blendMode];m.textureCount=0,m.start=0,m.blend=x,P++;var T=void 0;for(T=0;T<e;++T)c[T]=h[T],c[T]._virtalBoundId=T;for(T=0;T<this.currentIndex;++T){var M=o[T];d=M._texture.baseTexture;var C=w.premultiplyBlendMode[Number(d.premultipliedAlpha)][M.blendMode];if(x!==C&&(x=C,p=null,_=e,P++),p!==d&&(p=d,d._enabled!==P)){if(_===e&&(P++,m.size=T-m.start,_=0,m=a[g++],m.blend=x,m.textureCount=0,m.start=T),d.touched=l,-1===d._virtalBoundId)for(var A=0;A<e;++A){var I=(A+O)%e,R=c[I];if(R._enabled!==P){O++,R._virtalBoundId=-1,d._virtalBoundId=I,c[I]=d;break}}d._enabled=P,m.textureCount++,m.ids[_]=d._virtalBoundId,m.textures[_++]=d}if(y=M.vertexData,v=M._texture._uvs.uvsUint32,this.renderer.roundPixels){var D=this.renderer.resolution;s[f]=(y[0]*D|0)/D,s[f+1]=(y[1]*D|0)/D,s[f+5]=(y[2]*D|0)/D,s[f+6]=(y[3]*D|0)/D,s[f+10]=(y[4]*D|0)/D,s[f+11]=(y[5]*D|0)/D,s[f+15]=(y[6]*D|0)/D,s[f+16]=(y[7]*D|0)/D}else s[f]=y[0],s[f+1]=y[1],s[f+5]=y[2],s[f+6]=y[3],s[f+10]=y[4],s[f+11]=y[5],s[f+15]=y[6],s[f+16]=y[7];u[f+2]=v[0],u[f+7]=v[1],u[f+12]=v[2],u[f+17]=v[3];var L=Math.min(M.worldAlpha,1),k=L<1&&d.premultipliedAlpha?(0,w.premultiplyTint)(M._tintRGB,L):M._tintRGB+(255*L<<24);u[f+3]=u[f+8]=u[f+13]=u[f+18]=k,s[f+4]=s[f+9]=s[f+14]=s[f+19]=d._virtalBoundId,f+=20}if(m.size=T-m.start,b.default.CAN_UPLOAD_SAME_BUFFER)this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!0);else{if(this.vaoMax<=this.vertexCount){this.vaoMax++;var F=this.shader.attributes,N=this.vertexBuffers[this.vertexCount]=S.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),B=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(N,F.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(N,F.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(N,F.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);F.aTextureId&&B.addAttribute(N,F.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[this.vertexCount]=B}this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!1),this.vertexCount++}for(T=0;T<e;++T)h[T]._virtalBoundId=-1;for(T=0;T<g;++T){for(var j=a[T],U=j.textureCount,H=0;H<U;H++)p=j.textures[H],h[j.ids[H]]!==p&&this.renderer.bindTexture(p,j.ids[H],!0),p._virtalBoundId=-1;this.renderer.state.setBlendMode(j.blend),t.drawElements(t.TRIANGLES,6*j.size,t.UNSIGNED_SHORT,6*j.start*2)}this.currentIndex=0}},e.prototype.start=function(){this.renderer.bindShader(this.shader),b.default.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind())},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy(),this.vaos[e]&&this.vaos[e].destroy();this.indexBuffer&&this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var n=0;n<this.buffers.length;++n)this.buffers[n].destroy()},e}(u.default);e.default=M,h.default.registerPlugin("sprite",M)},function(t,e,n){"use strict";function r(t,e){var n=s;n=n.replace(/%count%/gi,e),n=n.replace(/%forloop%/gi,i(e));for(var r=new a.default(t,"precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor;\n}\n",n),o=[],u=0;u<e;u++)o[u]=u;return r.bind(),r.uniforms.uSamplers=o,r}function i(t){var e="";e+="\n",e+="\n";for(var n=0;n<t;n++)n>0&&(e+="\nelse "),n<t-1&&(e+="if(textureId == "+n+".0)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+n+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"}e.__esModule=!0,e.default=r;var o=n(109),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=(n(60),["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","float textureId = floor(vTextureId+0.5);","%forloop%","gl_FragColor = color * vColor;","}"].join("\n"))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(178),c=r(u),h=n(76),l=r(h),f=n(29),d=n(11),p=n(5),g=n(27),_=r(g),m=n(258),y=r(m),v=n(257),b=r(v),w=n(565),x=r(w),S={texture:!0,children:!1,baseTexture:!0},T=function(t){function e(n,r,a){i(this,e),a=a||document.createElement("canvas"),a.width=3,a.height=3;var s=l.default.fromCanvas(a,_.default.SCALE_MODE,"text");s.orig=new f.Rectangle,s.trim=new f.Rectangle;var u=o(this,t.call(this,s));return l.default.addToCache(u._texture,u._texture.baseTexture.textureCacheIds[0]),u.canvas=a,u.context=u.canvas.getContext("2d"),u.resolution=_.default.RESOLUTION,u._text=null,u._style=null,u._styleListener=null,u._font="",u.text=n,u.style=r,u.localStyleID=-1,u}return a(e,t),e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString();var n=this.context,r=b.default.measureText(this._text,this._style,this._style.wordWrap,this.canvas),i=r.width,o=r.height,a=r.lines,s=r.lineHeight,u=r.lineWidths,c=r.maxLineWidth,h=r.fontProperties;this.canvas.width=Math.ceil((i+2*e.padding)*this.resolution),this.canvas.height=Math.ceil((o+2*e.padding)*this.resolution),n.scale(this.resolution,this.resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.strokeStyle=e.stroke,n.lineWidth=e.strokeThickness,n.textBaseline=e.textBaseline,n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit;var l=void 0,f=void 0;if(e.dropShadow){n.fillStyle=e.dropShadowColor,n.globalAlpha=e.dropShadowAlpha,n.shadowBlur=e.dropShadowBlur,e.dropShadowBlur>0&&(n.shadowColor=e.dropShadowColor);for(var d=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,p=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,g=0;g<a.length;g++)l=e.strokeThickness/2,f=e.strokeThickness/2+g*s+h.ascent,"right"===e.align?l+=c-u[g]:"center"===e.align&&(l+=(c-u[g])/2),e.fill&&(this.drawLetterSpacing(a[g],l+d+e.padding,f+p+e.padding),e.stroke&&e.strokeThickness&&(n.strokeStyle=e.dropShadowColor,this.drawLetterSpacing(a[g],l+d+e.padding,f+p+e.padding,!0),n.strokeStyle=e.stroke))}n.shadowBlur=0,n.globalAlpha=1,n.fillStyle=this._generateFillStyle(e,a);for(var _=0;_<a.length;_++)l=e.strokeThickness/2,f=e.strokeThickness/2+_*s+h.ascent,"right"===e.align?l+=c-u[_]:"center"===e.align&&(l+=(c-u[_])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(a[_],l+e.padding,f+e.padding,!0),e.fill&&this.drawLetterSpacing(a[_],l+e.padding,f+e.padding);this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._style,o=i.letterSpacing;if(0===o)return void(r?this.context.strokeText(t,e,n):this.context.fillText(t,e,n));for(var a=String.prototype.split.call(t,""),s=e,u=0,c="";u<t.length;)c=a[u++],r?this.context.strokeText(c,s,n):this.context.fillText(c,s,n),s+=this.context.measureText(c).width+o},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=(0,x.default)(t);t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0)}var n=this._texture,r=this._style,i=r.trim?0:r.padding,o=n.baseTexture;o.hasLoaded=!0,o.resolution=this.resolution,o.realWidth=t.width,o.realHeight=t.height,o.width=t.width/this.resolution,o.height=t.height/this.resolution,n.trim.width=n._frame.width=t.width/this.resolution,n.trim.height=n._frame.height=t.height/this.resolution,n.trim.x=-i,n.trim.y=-i,n.orig.width=n._frame.width-2*i,n.orig.height=n._frame.height-2*i,this._onTextureUpdate(),o.emit("update",o),this.dirty=!1},e.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype.renderWebGL.call(this,e)},e.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._renderCanvas.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(!Array.isArray(t.fill))return t.fill;if(navigator.isCocoonJS)return t.fill[0];var n=void 0,r=void 0,i=void 0,o=void 0,a=this.canvas.width/this.resolution,s=this.canvas.height/this.resolution,u=t.fill.slice(),c=t.fillGradientStops.slice();if(!c.length)for(var h=u.length+1,l=1;l<h;
1++l)c.push(l/h);if(u.unshift(t.fill[0]),c.unshift(0),u.push(t.fill[t.fill.length-1]),c.push(1),t.fillGradientType===p.TEXT_GRADIENT.LINEAR_VERTICAL){n=this.context.createLinearGradient(a/2,0,a/2,s),r=(u.length+1)*e.length,i=0;for(var f=0;f<e.length;f++){i+=1;for(var d=0;d<u.length;d++)o="number"===typeof c[d]?c[d]/e.length+f/e.length:i/r,n.addColorStop(o,u[d]),i++}}else{n=this.context.createLinearGradient(0,s/2,a,s/2),r=u.length+1,i=1;for(var g=0;g<u.length;g++)o="number"===typeof c[g]?c[g]:i/r,n.addColorStop(o,u[g]),i++}return n},e.prototype.destroy=function(e){"boolean"===typeof e&&(e={children:e}),e=Object.assign({},S,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},s(e,[{key:"width",get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=(0,d.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,d.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"style",get:function(){return this._style},set:function(t){t=t||{},t instanceof y.default?this._style=t:this._style=new y.default(t),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(t){t=String(""===t||null===t||void 0===t?" ":t),this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(c.default);e.default=T},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6),a=n(11),s=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r(this,t),this.baseTexture=e,this.textures={},this.data=n,this.resolution=this._updateResolution(i||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return i(t,null,[{key:"BATCH_SIZE",get:function(){return 1e3}}]),t.prototype._updateResolution=function(t){var e=this.data.meta.scale,n=(0,a.getResolutionOfUrl)(t,null);return null===n&&(n=void 0!==e?parseFloat(e):1),1!==n&&(this.baseTexture.resolution=n,this.baseTexture.update()),n},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var n=e,r=t.BATCH_SIZE,i=this.baseTexture.sourceScale;n-e<r&&n<this._frameKeys.length;){var a=this._frameKeys[n],s=this._frames[a].frame;if(s){var u=null,c=null,h=new o.Rectangle(0,0,Math.floor(this._frames[a].sourceSize.w*i)/this.resolution,Math.floor(this._frames[a].sourceSize.h*i)/this.resolution);u=this._frames[a].rotated?new o.Rectangle(Math.floor(s.x*i)/this.resolution,Math.floor(s.y*i)/this.resolution,Math.floor(s.h*i)/this.resolution,Math.floor(s.w*i)/this.resolution):new o.Rectangle(Math.floor(s.x*i)/this.resolution,Math.floor(s.y*i)/this.resolution,Math.floor(s.w*i)/this.resolution,Math.floor(s.h*i)/this.resolution),this._frames[a].trimmed&&(c=new o.Rectangle(Math.floor(this._frames[a].spriteSourceSize.x*i)/this.resolution,Math.floor(this._frames[a].spriteSourceSize.y*i)/this.resolution,Math.floor(s.w*i)/this.resolution,Math.floor(s.h*i)/this.resolution)),this.textures[a]=new o.Texture(this.baseTexture,u,h,c,this._frames[a].rotated?2:0),o.Texture.addToCache(this.textures[a],a)}n++}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout(function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():e._parseComplete()},0)},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];for(var e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&this.baseTexture.destroy(),this.baseTexture=null},t}();e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(27),s=r(a),u=n(5),c=n(559),h=r(c),l=function(){function t(){var e=this;i(this,t),this._head=new h.default(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/s.default.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.UPDATE_PRIORITY.NORMAL;return this._addListener(new h.default(t,e,n))},t.prototype.addOnce=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.UPDATE_PRIORITY.NORMAL;return this._addListener(new h.default(t,e,n,!0))},t.prototype._addListener=function(t){var e=this._head.next,n=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(n);break}n=e,e=e.next}t.previous||t.connect(n)}else t.connect(n);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var n=this._head.next;n;)n=n.match(t,e)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null},t.prototype.update=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now(),e=void 0;if(t>this.lastTime){e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*s.default.TARGET_FPMS*this.speed;for(var n=this._head,r=n.next;r;)r=r.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=t},o(t,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,s.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t}();e.default=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];r(this,t),this.fn=e,this.context=n,this.priority=i,this.once=o,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.
1next,t.next=this},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.previous;return this.next=t?null:e,this.previous=null,e},t}();e.default=i},function(t,e,n){"use strict";function r(){return!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}e.__esModule=!0,e.default=r},function(t,e,n){"use strict";function r(){for(var t=[],e=[],n=0;n<32;n++)t[n]=n,e[n]=n;t[i.BLEND_MODES.NORMAL_NPM]=i.BLEND_MODES.NORMAL,t[i.BLEND_MODES.ADD_NPM]=i.BLEND_MODES.ADD,t[i.BLEND_MODES.SCREEN_NPM]=i.BLEND_MODES.SCREEN,e[i.BLEND_MODES.NORMAL]=i.BLEND_MODES.NORMAL_NPM,e[i.BLEND_MODES.ADD]=i.BLEND_MODES.ADD_NPM,e[i.BLEND_MODES.SCREEN]=i.BLEND_MODES.SCREEN_NPM;var r=[];return r.push(e),r.push(t),r}e.__esModule=!0,e.default=r;var i=n(5)},function(t,e,n){"use strict";function r(t){return o.default.tablet||o.default.phone?4:t}e.__esModule=!0,e.default=r;var i=n(171),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";function r(t,e){if(t&&e)for(var n=Object.keys(e),r=0;r<n.length;++r){var i=n[r];Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}}function i(t,e){a.push(t,e)}function o(){for(var t=0;t<a.length;t+=2)r(a[t],a[t+1]);a.length=0}e.__esModule=!0,e.mixin=r,e.delayMixin=i,e.performMixins=o;var a=[]},function(t,e,n){"use strict";function r(t){t.__plugins={},t.registerPlugin=function(e,n){t.__plugins[e]=n},t.prototype.initPlugins=function(){this.plugins=this.plugins||{};for(var e in t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}e.__esModule=!0,e.default={mixin:function(t){r(t)}}},function(t,e,n){"use strict";function r(t){var e=t.width,n=t.height,r=t.getContext("2d"),i=r.getImageData(0,0,e,n),o=i.data,a=o.length,s={top:null,left:null,right:null,bottom:null},u=void 0,c=void 0,h=void 0;for(u=0;u<a;u+=4)0!==o[u+3]&&(c=u/4%e,h=~~(u/4/e),null===s.top&&(s.top=h),null===s.left?s.left=c:c<s.left&&(s.left=c),null===s.right?s.right=c+1:s.right<c&&(s.right=c+1),null===s.bottom?s.bottom=h:s.bottom<h&&(s.bottom=h));return e=s.right-s.left,n=s.bottom-s.top+1,{height:n,width:e,data:r.getImageData(s.left,s.top,e,n)}}e.__esModule=!0,e.default=r},function(t,e,n){"use strict";function r(t){var e=(new Error).stack;"undefined"===typeof e?console.warn("Deprecation Warning: ",t):(e=e.split("\n").splice(3).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cDeprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t),console.warn(e),console.groupEnd()):(console.warn("Deprecation Warning: ",t),console.warn(e)))}function i(t){var e=t.mesh,n=t.particles,i=t.extras,o=t.filters,a=t.prepare,s=t.loaders,u=t.interaction;Object.defineProperties(t,{SpriteBatch:{get:function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")}},AssetLoader:{get:function(){throw new ReferenceError("The loader system was overhauled in PixiJS v3, please see the new PIXI.loaders.Loader class.")}},Stage:{get:function(){return r("You do not need to use a PIXI Stage any more, you can simply render any container."),t.Container}},DisplayObjectContainer:{get:function(){return r("DisplayObjectContainer has been shortened to Container, please use Container from now on."),t.Container}},Strip:{get:function(){return r("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),e.Mesh}},Rope:{get:function(){return r("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),e.Rope}},ParticleContainer:{get:function(){return r("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."),n.ParticleContainer}},MovieClip:{get:function(){return r("The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite."),i.AnimatedSprite}},TilingSprite:{get:function(){return r("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),i.TilingSprite}},BitmapText:{get:function(){return r("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),i.BitmapText}},blendModes:{get:function(){return r("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),t.BLEND_MODES}},scaleModes:{get:function(){return r("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),t.SCALE_MODES}},BaseTextureCache:{get:function(){return r("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),t.utils.BaseTextureCache}},TextureCache:{get:function(){return r("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),t.utils.TextureCache}},math:{get:function(){return r("The math namespace is deprecated, please access members already accessible on PIXI."),t}},AbstractFilter:{get:function(){return r("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.Filter}},TransformManual:{get:function(){return r("TransformManual has been renamed to TransformBase, please update your pixi-spine"),t.TransformBase}},TARGET_FPMS:{get:function(){return r("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS},set:function(e){r("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS=e}},FILTER_RESOLUTION:{get:function(){return r("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION},set:function(e){r("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION=e}},RESOLUTION:{get:function(){return r("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION},set:function(e){r("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION=e}},MIPMAP_TEXTURES:{get:function(){return r("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES},set:function(e){r("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES=e}},SPRITE_BATCH_SIZE:{get:function(){return r("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE},set:function(e){r("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE=e}},SPRITE_MAX_TEXTURES:{get:function(){return r("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES},set:function(e){r("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES=e}},RETINA_PREFIX:{get:function(){return r("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX},set:function(e){r("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX=e}},DEFAULT_RENDER_OPTIONS:{get:function(){return r("PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS"),t.settings.RENDER_OPTIONS}}});for(var c=[{parent:"TRANSFORM_MODE",target:"TRANSFORM_MODE"},{parent:"GC_MODES",target:"GC_MODE"},{parent:"WRAP_MODES",target:"WRAP_MODE"},{parent:"SCALE_MODES",target:"SCALE_MODE"},{parent:"PRECISION",target:"PRECISION_FRAGMENT"}],h=0;h<c.length;h++)!function(e){var n=c[e];Object.defineProperty(t[n.parent],"DEFAULT",{get:function(){return r("PIXI."+n.parent+".DEFAULT has been deprecated, please use PIXI.settings."+n.target),t.settings[n.target]},set:function(e){r("PIXI."+n.parent+".DEFAULT has been deprecated, please use PIXI.settings."+n.target),t.settings[n.target]=e}})}(h);Object.defineProperties(t.settings,{PRECISION:{get:function(){return r("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT},set:function(e){r("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT=e}}}),i.AnimatedSprite&&Object.defineProperties(i,{MovieClip:{get:function(){return r("The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on."),i.AnimatedSprite}}}),i&&Object.defineProperties(i,{TextureTransform:{get:function(){return r("The TextureTransform class has been renamed to TextureMatrix, please use PIXI.TextureMatrix from now on."),t.TextureMatrix}}}),t.DisplayObject.prototype.generateTexture=function(t,e,n){return r("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"),t.generateTexture(this,e,n)},t.Graphics.prototype.generateTexture=function(t,e){return r("graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture"),this.generateCanvasTexture(t,e)},t.GroupD8.isSwapWidthHeight=function(e){return r("GroupD8.isSwapWidthHeight was renamed to GroupD8.isVertical"),t.GroupD8.isVertical(e)},t.RenderTexture.prototype.render=function(t,e,n,i){this.legacyRenderer.render(t,this,n,e,!i),r("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")},t.RenderTexture.prototype.getImage=function(t){return r("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"),this.legacyRenderer.extract.image(t)},t.RenderTexture.prototype.getBase64=function(t){return r("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"),this.legacyRenderer.extract.base64(t)},t.RenderTexture.prototype.getCanvas=function(t){return r("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"),this.legacyRenderer.extract.canvas(t)},t.RenderTexture.prototype.getPixels=function(t){return r("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"),this.legacyRenderer.pixels(t)},t.Sprite.prototype.setTexture=function(t){this.texture=t,r("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},i.BitmapText&&(i.BitmapText.prototype.setText=function(t){this.text=t,r("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")}),t.Text.prototype.setText=function(t){this.text=t,r("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},t.Text.calculateFontProperties=function(e){return r("Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont"),t.TextMetrics.measureFont(e)},Object.defineProperties(t.Text,{fontPropertiesCache:{get:function(){return r("Text.fontPropertiesCache is deprecated"),t.TextMetrics._fonts}},fontPropertiesCanvas:{get:function(){return r("Text.fontPropertiesCanvas is deprecated"),t.TextMetrics._canvas}},fontPropertiesContext:{get:function(){return r("Text.fontPropertiesContext is deprecated"),t.TextMetrics._context}}}),t.Text.prototype.setStyle=function(t){this.style=t,r("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},t.Text.prototype.determineFontProperties=function(e){return r("determineFontProperties is now deprecated, please use TextMetrics.measureFont method"),t.TextMetrics.measureFont(e)},t.Text.getFontStyle=function(e){return r("getFontStyle is now deprecated, please use TextStyle.toFontString() instead"),e=e||{},e instanceof t.TextStyle||(e=new t.TextStyle(e)),e.toFontString()},Object.defineProperties(t.TextStyle.prototype,{font:{get:function(){r("text style property 'font' is now deprecated, please use the 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant' and 'fontWeight' properties from now on");var t="number"===typeof this._fontSize?this._fontSize+"px":this._fontSize;return this._fontStyle+" "+this._fontVariant+" "+this._fontWeight+" "+t+" "+this._fontFamily},set:function(t){r("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on"),t.indexOf("italic")>1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e=t.split(" "),n=-1;this._fontSize=26;for(var i=0;i<e.length;++i)if(e[i].match(/(px|pt|em|%)/)){n=i,this._fontSize=e[i];break}this._fontWeight="normal";for(var o=0;o<n;++o)if(e[o].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=e[o];break}if(n>-1&&n<e.length-1){this._fontFamily="";for(var a=n+1;a<e.length;++a)this._fontFamily+=e[a]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),t.Texture.prototype.setFrame=function(t){this.frame=t,r("setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;")},t.Texture.addTextureToCache=function(e,n){t.Texture.addToCache(e,n),r("Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.")},t.Texture.removeTextureFromCache=function(e){return r("Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. For that, use BaseTexture.removeFromCache"),t.BaseTexture.removeFromCache(e),t.Texture.removeFromCache(e)},Object.defineProperties(o,{AbstractFilter:{get:function(){return r("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.AbstractFilter}},SpriteMaskFilter:{get:function(){return r("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),t.SpriteMaskFilter}},VoidFilter:{get:function(){return r("VoidFilter has been renamed to AlphaFilter, please use PIXI.filters.AlphaFilter"),o.AlphaFilter}}}),t.utils.uuid=function(){return r("utils.uuid() is deprecated, please use utils.uid() from now on."),t.utils.uid()},t.utils.canUseNewCanvasBlendModes=function(){return r("utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on"),t.CanvasTinter.canUseMultiply};var l=!0;if(Object.defineProperty(t.utils,"_saidHello",{set:function(t){t&&(r("PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()"),this.skipHello()),l=t},get:function(){return l}}),a.BasePrepare&&(a.BasePrepare.prototype.register=function(t,e){return r("renderer.plugins.prepare.register is now deprecated, please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook"),t&&this.registerFindHook(t),e&&this.registerUploadHook(e),this}),a.canvas&&Object.defineProperty(a.canvas,"UPLOADS_PER_FRAME",{set:function(){r("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return r("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}}),a.webgl&&Object.defineProperty(a.webgl,"UPLOADS_PER_FRAME",{set:function(){r("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return r("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}}),s.Loader){var f=s.Resource,d=s.Loader;Object.defineProperties(f.prototype,{isJson:{get:function(){return r("The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`."),this.type===f.TYPE.JSON}},isXml:{get:function(){return r("The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`."),this.type===f.TYPE.XML}},isImage:{get:function(){return r("The isImage property is deprecated, please use `resource.type === Resource.TYPE.I
1MAGE`."),this.type===f.TYPE.IMAGE}},isAudio:{get:function(){return r("The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`."),this.type===f.TYPE.AUDIO}},isVideo:{get:function(){return r("The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`."),this.type===f.TYPE.VIDEO}}}),Object.defineProperties(d.prototype,{before:{get:function(){return r("The before() method is deprecated, please use pre()."),this.pre}},after:{get:function(){return r("The after() method is deprecated, please use use()."),this.use}}})}u.interactiveTarget&&Object.defineProperty(u.interactiveTarget,"defaultCursor",{set:function(t){r("Property defaultCursor has been replaced with 'cursor'. "),this.cursor=t},get:function(){return r("Property defaultCursor has been replaced with 'cursor'. "),this.cursor}}),u.InteractionManager&&(Object.defineProperty(u.InteractionManager,"defaultCursorStyle",{set:function(t){r("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default=t},get:function(){return r("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default}}),Object.defineProperty(u.InteractionManager,"currentCursorStyle",{set:function(t){r("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode=t},get:function(){return r("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode}}))}e.__esModule=!0,e.default=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(6),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),a=new o.Rectangle,s=function(){function t(e){r(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,n=void 0,r=void 0,i=void 0,s=void 0;t&&(s=t instanceof o.RenderTexture?t:e.generateTexture(t)),s?(n=s.baseTexture._canvasRenderTarget.context,r=s.baseTexture._canvasRenderTarget.resolution,i=s.frame):(n=e.rootContext,i=a,i.width=this.renderer.width,i.height=this.renderer.height);var u=i.width*r,c=i.height*r,h=new o.CanvasRenderTarget(u,c),l=n.getImageData(i.x*r,i.y*r,u,c);return h.context.putImageData(l,0,0),h.canvas},t.prototype.pixels=function(t){var e=this.renderer,n=void 0,r=void 0,i=void 0,s=void 0;return t&&(s=t instanceof o.RenderTexture?t:e.generateTexture(t)),s?(n=s.baseTexture._canvasRenderTarget.context,r=s.baseTexture._canvasRenderTarget.resolution,i=s.frame):(n=e.rootContext,i=a,i.width=e.width,i.height=e.height),n.getImageData(0,0,i.width*r,i.height*r).data},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();e.default=s,o.CanvasRenderer.registerPlugin("extract",s)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(569);Object.defineProperty(e,"webgl",{enumerable:!0,get:function(){return r(i).default}});var o=n(567);Object.defineProperty(e,"canvas",{enumerable:!0,get:function(){return r(o).default}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(6),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),a=new o.Rectangle,s=function(){function t(e){r(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,n=void 0,r=void 0,i=void 0,s=!1,u=void 0;t&&(u=t instanceof o.RenderTexture?t:this.renderer.generateTexture(t)),u?(n=u.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],r=n.resolution,i=u.frame,s=!1):(n=this.renderer.rootRenderTarget,r=n.resolution,s=!0,i=a,i.width=n.size.width,i.height=n.size.height);
1var c=i.width*r,h=i.height*r,l=new o.CanvasRenderTarget(c,h);if(n){e.bindRenderTarget(n);var f=new Uint8Array(4*c*h),d=e.gl;d.readPixels(i.x*r,i.y*r,c,h,d.RGBA,d.UNSIGNED_BYTE,f);var p=l.context.getImageData(0,0,c,h);p.data.set(f),l.context.putImageData(p,0,0),s&&(l.context.scale(1,-1),l.context.drawImage(l.canvas,0,-h))}return l.canvas},t.prototype.pixels=function(t){var e=this.renderer,n=void 0,r=void 0,i=void 0,s=void 0;t&&(s=t instanceof o.RenderTexture?t:this.renderer.generateTexture(t)),s?(n=s.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],r=n.resolution,i=s.frame):(n=this.renderer.rootRenderTarget,r=n.resolution,i=a,i.width=n.size.width,i.height=n.size.height);var u=i.width*r,c=i.height*r,h=new Uint8Array(4*u*c);if(n){e.bindRenderTarget(n);var l=e.gl;l.readPixels(i.x*r,i.y*r,u,c,l.RGBA,l.UNSIGNED_BYTE,h)}return h},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();e.default=s,o.WebGLRenderer.registerPlugin("extract",s)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=function(t){function e(n,o){r(this,e);var a=i(this,t.call(this,n[0]instanceof u.Texture?n[0]:n[0].texture));return a._textures=null,a._durations=null,a.textures=n,a._autoUpdate=!1!==o,a.animationSpeed=1,a.loop=!0,a.onComplete=null,a.onFrameChange=null,a.onLoop=null,a._currentTime=0,a.playing=!1,a}return o(e,t),e.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&u.ticker.shared.remove(this.update,this))},e.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&u.ticker.shared.add(this.update,this,u.UPDATE_PRIORITY.HIGH))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t,n=this.currentFrame;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=e/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):n!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<n?this.onLoop():this.animationSpeed<0&&this.currentFrame>n&&this.onLoop()),this.updateTexture())},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.cachedTint=16777215,this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e)},e.fromFrames=function(t){for(var n=[],r=0;r<t.length;++r)n.push(u.Texture.fromFrame(t[r]));return new e(n)},e.fromImages=function(t){for(var n=[],r=0;r<t.length;++r)n.push(u.Texture.fromImage(t[r]));return new e(n)},a(e,[{key:"totalFrames",get:function(){return this._textures.length}},{key:"textures",get:function(){return this._textures},set:function(t){if(t[0]instanceof u.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this.gotoAndStop(0),this.updateTexture()}},{key:"currentFrame",get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}}]),e}(u.Sprite);e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(6),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),h=n(250),l=r(h),f=n(11),d=n(27),p=r(d),g=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,e);var a=o(this,t.call(this));return a._textWidth=0,a._textHeight=0,a._glyphs=[],a._font={tint:void 0!==r.tint?r.tint:16777215,align:r.align||"left",n
1ame:null,size:0},a.font=r.font,a._text=n,a._maxWidth=0,a._maxLineHeight=0,a._anchor=new l.default(function(){a.dirty=!0},a,0,0),a.dirty=!1,a.updateText(),a}return a(e,t),e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],n=this._font.size/t.size,r=new c.Point,i=[],o=[],a=null,s=0,u=0,h=0,l=-1,f=0,d=0,p=0,g=0;g<this.text.length;g++){var _=this.text.charCodeAt(g);if(/(\s)/.test(this.text.charAt(g))&&(l=g,f=s),/(?:\r\n|\r|\n)/.test(this.text.charAt(g)))o.push(s),u=Math.max(u,s),h++,r.x=0,r.y+=t.lineHeight,a=null;else if(-1!==l&&this._maxWidth>0&&r.x*n>this._maxWidth)c.utils.removeItems(i,l-d,g-l),g=l,l=-1,++d,o.push(f),u=Math.max(u,f),h++,r.x=0,r.y+=t.lineHeight,a=null;else{var m=t.chars[_];m&&(a&&m.kerning[a]&&(r.x+=m.kerning[a]),i.push({texture:m.texture,line:h,charCode:_,position:new c.Point(r.x+m.xOffset,r.y+m.yOffset)}),s=r.x+(m.texture.width+m.xOffset),r.x+=m.xAdvance,p=Math.max(p,m.yOffset+m.texture.height),a=_)}}o.push(s),u=Math.max(u,s);for(var y=[],v=0;v<=h;v++){var b=0;"right"===this._font.align?b=u-o[v]:"center"===this._font.align&&(b=(u-o[v])/2),y.push(b)}for(var w=i.length,x=this.tint,S=0;S<w;S++){var T=this._glyphs[S];T?T.texture=i[S].texture:(T=new c.Sprite(i[S].texture),this._glyphs.push(T)),T.position.x=(i[S].position.x+y[i[S].line])*n,T.position.y=i[S].position.y*n,T.scale.x=T.scale.y=n,T.tint=x,T.parent||this.addChild(T)}for(var E=w;E<this._glyphs.length;++E)this.removeChild(this._glyphs[E]);if(this._textWidth=u*n,this._textHeight=(r.y+t.lineHeight)*n,0!==this.anchor.x||0!==this.anchor.y)for(var P=0;P<w;P++)this._glyphs[P].x-=this._textWidth*this.anchor.x,this._glyphs[P].y-=this._textHeight*this.anchor.y;this._maxLineHeight=p*n},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},e.registerFont=function(t,n){var r={},i=t.getElementsByTagName("info")[0],o=t.getElementsByTagName("common")[0],a=t.getElementsByTagName("page")[0].getAttribute("file"),s=(0,f.getResolutionOfUrl)(a,p.default.RESOLUTION);r.font=i.getAttribute("face"),r.size=parseInt(i.getAttribute("size"),10),r.lineHeight=parseInt(o.getAttribute("lineHeight"),10)/s,r.chars={};for(var u=t.getElementsByTagName("char"),h=0;h<u.length;h++){var l=u[h],d=parseInt(l.getAttribute("id"),10),g=new c.Rectangle(parseInt(l.getAttribute("x"),10)/s+n.frame.x/s,parseInt(l.getAttribute("y"),10)/s+n.frame.y/s,parseInt(l.getAttribute("width"),10)/s,parseInt(l.getAttribute("height"),10)/s);r.chars[d]={xOffset:parseInt(l.getAttribute("xoffset"),10)/s,yOffset:parseInt(l.getAttribute("yoffset"),10)/s,xAdvance:parseInt(l.getAttribute("xadvance"),10)/s,kerning:{},texture:new c.Texture(n.baseTexture,g)}}for(var _=t.getElementsByTagName("kerning"),m=0;m<_.length;m++){var y=_[m],v=parseInt(y.getAttribute("first"),10)/s,b=parseInt(y.getAttribute("second"),10)/s,w=parseInt(y.getAttribute("amount"),10)/s;r.chars[b]&&(r.chars[b].kerning[v]=w)}return e.fonts[r.font]=r,r},s(e,[{key:"tint",get:function(){return this._font.tint},set:function(t){this._font.tint="number"===typeof t&&t>=0?t:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(t){"number"===typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"font",get:function(){return this._font},set:function(t){t&&("string"===typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"===typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},{key:"text",get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)}},{key:"maxLineHeight",get:function(){return this.validate(),this._maxLineHeight}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(c.Container);e.default=g,g.fonts={}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=n(179),h=function(t){return t&&t.__esModule?t:{default:t}}(c),l=new u.Point,f=function(t){function e(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;r(this,e);var s=i(this,t.call(this,n));return s.tileTransform=new u.TransformStatic,s._width=o,s._height=a,s._canvasPattern=null,
1s.uvTransform=n.transform||new u.TextureMatrix(n),s.pluginName="tilingSprite",s.uvRespectAnchor=!1,s}return o(e,t),e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture),this.cachedTint=16777215},e.prototype._renderWebGL=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvTransform.update(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var n=t.context,r=this.worldTransform,i=t.resolution,o=e.baseTexture,a=o.resolution,s=this.tilePosition.x/this.tileScale.x%e._frame.width*a,c=this.tilePosition.y/this.tileScale.y%e._frame.height*a;if(this._textureID!==this._texture._updateID||this.cachedTint!==this.tint){this._textureID=this._texture._updateID;var l=new u.CanvasRenderTarget(e._frame.width,e._frame.height,a);16777215!==this.tint?(this.tintedTexture=h.default.getTintedTexture(this,this.tint),l.context.drawImage(this.tintedTexture,0,0)):l.context.drawImage(o.source,-e._frame.x*a,-e._frame.y*a),this.cachedTint=this.tint,this._canvasPattern=l.context.createPattern(l.canvas,"repeat")}n.globalAlpha=this.worldAlpha,n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i),t.setBlendMode(this.blendMode),n.fillStyle=this._canvasPattern,n.scale(this.tileScale.x/a,this.tileScale.y/a);var f=this.anchor.x*-this._width,d=this.anchor.y*-this._height;this.uvRespectAnchor?(n.translate(s,c),n.fillRect(-s+f,-c+d,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a)):(n.translate(s+f,c+d),n.fillRect(-s,-c,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a))}},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,n=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,n,r)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._x),e||(this._localBoundsRect||(this._localBoundsRect=new u.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,l);var e=this._width,n=this._height,r=-e*this.anchor._x;if(l.x>=r&&l.x<r+e){var i=-n*this.anchor._y;if(l.y>=i&&l.y<i+n)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvTransform=null},e.from=function(t,n,r){return new e(u.Texture.from(t),n,r)},e.fromFrame=function(t,n,r){var i=u.utils.TextureCache[t];if(!i)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(i,n,r)},e.fromImage=function(t,n,r,i,o){return new e(u.Texture.fromImage(t,i,o),n,r)},a(e,[{key:"clampMargin",get:function(){return this.uvTransform.clampMargin},set:function(t){this.uvTransform.clampMargin=t,this.uvTransform.update(!0)}},{key:"tileScale",get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copy(t)}},{key:"tilePosition",get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copy(t)}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}}]),e}(u.Sprite);e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(6),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=n(76),u=r(s),c=n(102),h=r(c),l=n(11),f=a.DisplayObject,d=new a.Matrix;f.prototype._cacheAsBitmap=!1,f.prototype._cacheData=!1;var p=function t(){i(this,t),this.textureCacheId=null,this.originalRenderWebGL=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(f.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e=void 0;t?(this._cacheData||(this._cacheData=new p),e=this._cacheData,e.originalRenderWebGL=this.renderWebGL,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this._calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.renderWebGL=e.originalRenderWebGL,this.renderCanvas=e.originalRenderCanvas,this._calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}}),f.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite._transformID=-1,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderWebGL(t))},f.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.currentRenderer.flush();var n=this.getLocalBounds().clone();if(this._filters){var r=this._filters[0].padding;n.pad(r)}var i=t._activeRenderTarget,o=t.filterManager.filterStack,s=a.RenderTexture.create(0|n.width,0|n.height),c="cacheAsBitmap_"+(0,l.uid)();this._cacheData.textureCacheId=c,h.default.addToCache(s.baseTexture,c),u.default.addToCache(s,c);var f=d;f.tx=-n.x,f.ty=-n.y,this.transform.worldTransform.identity(),this.renderWebGL=this._cacheData.originalRenderWebGL,t.render(this,s,!0,f,!0),t.bindRenderTarget(i),t.filterManager.filterStack=o,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this._mask=null,this.filterArea=null;var p=new a.Sprite(s);p.transform.worldTransform=this.transform.worldTransform,p.anchor.x=-n.x/n.width,p.anchor.y=-n.y/n.height,p.alpha=e,p._bounds=this._bounds,this._calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._cacheData.sprite=p,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=p.containsPoint.bind(p)}},f.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite.renderCanvas(t))},f.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),n=this.alpha;this.alpha=1;var r=t.context,i=a.RenderTexture.create(0|e.width,0|e.height),o="cacheAsBitmap_"+(0,l.uid)();this._cacheData.textureCacheId=o,h.default.addToCache(i.baseTexture,o),u.default.addToCache(i,o);var s=d;this.transform.localTransform.copy(s),s.invert(),s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,i,!0,s,!1),t.context=r,this.renderCanvas=this._renderCachedCanvas,this._calculateBounds=this._calculateCachedBounds,this._mask=null,this.filterArea=null;var c=new a.Sprite(i);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-e.x/e.width,c.anchor.y=-e.y
1/e.height,c._bounds=this._bounds,c.alpha=n,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.updateTransform=this.displayObjectUpdateTransform,this._cacheData.sprite=c,this.containsPoint=c.containsPoint.bind(c)}},f.prototype._calculateCachedBounds=function(){this._cacheData.sprite._calculateBounds()},f.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},f.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,h.default.removeFromCache(this._cacheData.textureCacheId),u.default.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},f.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}},function(t,e,n){"use strict";var r=n(6),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(r);i.DisplayObject.prototype.name=null,i.Container.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null}},function(t,e,n){"use strict";var r=n(6),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(r);i.DisplayObject.prototype.getGlobalPosition=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new i.Point,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(6),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a),u=n(5),c=(n(60),new s.Matrix),h=function(t){function e(n){r(this,e);var o=i(this,t.call(this,n));return o.shader=null,o.simpleShader=null,o.quad=null,o}return o(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new s.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n"),this.simpleShader=new s.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n"),this.renderer.bindVao(null),this.quad=new s.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,n=this.quad;e.bindVao(n.vao);var r=n.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&(r=n.uvs,r[0]=r[6]=-t.anchor.x,r[1]=r[3]=-t.anchor.y,r[2]=r[4]=1-t.anchor.x,r[5]=r[7]=1-t.anchor.y),n.upload();var i=t._texture,o=i.baseTexture,a=t.tileTransform.localTransform,h=t.uvTransform,l=o.isPowerOfTwo&&i.frame.width===o.width&&i.frame.height===o.height;l&&(o._glTextures[e.CONTEXT_UID]?l=o.wrapMode!==u.WRAP_MODES.CLAMP:o.wrapMode===u.WRAP_MODES.CLAMP&&(o.wrapMode=u.WRAP_MODES.REPEAT));var f=l?this.simpleShader:this.shader;e.bindShader(f);var d=i.width,p=i.height,g=t._width,_=t._height;c.set(a.a*d/g,a.b*d/_,a.c*p/g,a.d*p/_,a.tx/g,a.ty/_),c.invert(),l?c.prepend(h.mapCoord):(f.uniforms.uMapCoord=h.mapCoord.toArray(!0),f.uniforms.uClampFrame=h.uClampFrame,f.uniforms.uClampOffset=h.uClampOffset),f.uniforms.uTransform=c.toArray(!0),f.uniforms.uColor=s.utils.premultiplyTintToRgba(t.tint,t.worldAlpha,f.uniforms.uColor,o.premultipliedAlpha),f.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),f.uniforms.uSampler=e.bindTexture(i),e.setBlendMode(s.utils.correctBlendMode(t.blendMode,o.premultipliedAlpha)),n.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(s.ObjectRenderer);e.default=h,s.WebGLRenderer.registerPlugin("tilingSprite",h)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=(n(60),function(t){function e(){r(this,e);var n=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"));return n.alpha=1,n.glShaderKey="alpha",n}return o(e,t),a(e,[{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(u.Filter));e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(6),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),h=n(265),l=r(h),f=n(266),d=r(f),p=function(t){function e(n,r,a,s){i(this,e);var u=o(this,t.call(this));return u.blurXFilter=new l.default(n,r,a,s),u.blurYFilter=new d.default(n,r,a,s),u.padding=0,u.resolution=a||c.settings.RESOLUTION,u.quality=r||4,u.blur=n||8,u}return a(e,t),e.prototype.apply=function(t,e,n){var r=t.getRenderTarget(!0);this.blurXFilter.apply(t,e,r,!0),this.blurYFilter.apply(t,r,n,!1),t.returnRenderTarget(r)},s(e,[{key:"blur",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"quality",get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t}},{key:"blurX",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blurY",get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blendMode",get:function(){return this.blurYFilter._blendMode},set:function(t){this.blurYFilter._blendMode=t}}]),e}(c.Filter);e.default=p},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=(n(60),function(t){function e(){r(this,e);var n=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"));return n.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],n.alpha=1,n}return o(e,t),e.prototype._loadMatrix=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t;e&&(this._multiply(n,this.uniforms.m,t),n=this._colorMatrix(n)),this.uniforms.m=n},e.prototype._multiply=function(t,e,n){return t[0]=e[0]*n[0]+e[1]*n[5]+e[2]*n[10]+e[3]*n[15],t[1]=e[0]*n[1]+e[1]*n[6]+e[2]*n[11]+e[3]*n[16],t[2]=e[0]*n[2]+e[1]*n[7]+e[2]*n[12]+e[3]*n[17],t[3]=e[0]*n[3]+e[1]*n[8]+e[2]*n[13]+e[3]*n[18],t[4]=e[0]*n[4]+e[1]*n[9]+e[2]*n[14]+e[3]*n[19]+e[4],t[5]=e[5]*n[0]+e[6]*n[5]+e[7]*n[10]+e[8]*n[15],t[6]=e[5]*n[1]+e[6]*n[6]+e[7]*n[11]+e[8]*n[16],t[7]=e[5]*n[2]+e[6]*n[7]+e[7]*n[12]+e[8]*n[17],t[8]=e[5]*n[3]+e[6]*n[8]+e[7]*n[13]+e[8]*n[18],t[9]=e[5]*n[4]+e[6]*n[9]+e[7]*n[14]+e[8]*n[19]+e[9],t[10]=e[10]*n[0]+e[11]*n[5]+e[12]*n[10]+e[13]*n[15],t[11]=e[10]*n[1]+e[11]*n[6]+e[12]*n[11]+e[13]*n[16],t[12]=e[10]*n[2]+e[11]*n[7]+e[12]*n[12]+e[13]*n[17],t[13]=e[10]*n[3]+e[11]*n[8]+e[12]*n[13]+e[13]*n[18],t[14]=e[10]*n[4]+e[11]*n[9]+e[12]*n[14]+e[13]*n[19]+e[14],t[15]=e[15]*n[0]+e[16]*n[5]+e[17]*n[10]+e[18]*n[15],t[16]=e[15]*n[1]+e[16]*n[6]+e[17]*n[11]+e[18]*n[16],t[17]=e[15]*n[2]+e[16]*n[7]+e[17]*n[12]+e[18]*n[17],t[18]=e[15]*n[3]+e[16]*n[8]+e[17]*n[13]+e[18]*n[18],t[19]=e[15]*n[4]+e[16]*n[9]+e[17]*n[14]+e[18]*n[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.greyscale=function(t,e){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.blackAndWhite=function(t){var e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var n=Math.cos(t),r=Math.sin(t),i=Math.sqrt,o=1/3,a=i(o),s=n+(1-n)*o,u=o*(1-n)-a*r,c=o*(1-n)+a*r,h=o*(1-n)+a*r,l=n+o*(1-n),f=o*(1-n)-a*r,d=o*(1-n)-a*r,p=o*(1-n)+a*r,g=n+o*(1-n),_=[s,u,c,0,0,h,l,f,0,0,d,p,g,0,0,0,0,0,1,0];this._loadMatrix(_,e)},e.prototype.contrast=function(t,e){var n=(t||0)+1,r=-.5*(n-1),i=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],n=2*t/3+1,r=-.5*(n-1),i=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){var e=[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.sepia=function(t){var e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.technicolor=function(t){var e=[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];this._loadMatrix(e,t)},e.prototype.polaroid=function(t){var e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.toBGR=function(t){var e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.kodachrome=function(t){var e=[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];this._loadMatrix(e,t)},e.prototype.browni=function(t){var e=[.5997023498159715,.34553243048391263,-.2708298674538
1042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.vintage=function(t){var e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.colorTone=function(t,e,n,r,i){t=t||.2,e=e||.15,n=n||16770432,r=r||3375104;var o=(n>>16&255)/255,a=(n>>8&255)/255,s=(255&n)/255,u=(r>>16&255)/255,c=(r>>8&255)/255,h=(255&r)/255,l=[.3,.59,.11,0,0,o,a,s,t,0,u,c,h,e,0,o-u,a-c,s-h,0,0];this._loadMatrix(l,i)},e.prototype.night=function(t,e){t=t||.1;var n=[-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.predator=function(t,e){var n=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},a(e,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(u.Filter));e.default=c,c.prototype.grayscale=c.prototype.greyscale},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=(n(60),function(t){function e(n,o){r(this,e);var a=new u.Matrix;n.renderable=!1;var s=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;\n vTextureCoord = aTextureCoord;\n}","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy *= scale;\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"));return s.maskSprite=n,s.maskMatrix=a,s.uniforms.mapSampler=n._texture,s.uniforms.filterMatrix=a,s.uniforms.scale={x:1,y:1},null!==o&&void 0!==o||(o=20),s.scale=new u.Point(o,o),s}return o(e,t),e.prototype.apply=function(t,e,n){var r=1/n.destinationFrame.width*(n.size.width/e.size.width);this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x*r,this.uniforms.scale.y=this.scale.y*r,t.applyFilter(this,e,n)},a(e,[{key:"map",get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}]),e}(u.Filter));e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(6),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a),u=(n(60),function(t){function e(){return r(this,e),i(this,t.call(this,"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n vec2 inverseVP = 1.0 / resolution.xy;\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n \n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n \n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n \n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n \n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);
1\n \n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))}return o(e,t),e}(s.Filter));e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(581);Object.defineProperty(e,"FXAAFilter",{enumerable:!0,get:function(){return r(i).default}});var o=n(583);Object.defineProperty(e,"NoiseFilter",{enumerable:!0,get:function(){return r(o).default}});var a=n(580);Object.defineProperty(e,"DisplacementFilter",{enumerable:!0,get:function(){return r(a).default}});var s=n(578);Object.defineProperty(e,"BlurFilter",{enumerable:!0,get:function(){return r(s).default}});var u=n(265);Object.defineProperty(e,"BlurXFilter",{enumerable:!0,get:function(){return r(u).default}});var c=n(266);Object.defineProperty(e,"BlurYFilter",{enumerable:!0,get:function(){return r(c).default}});var h=n(579);Object.defineProperty(e,"ColorMatrixFilter",{enumerable:!0,get:function(){return r(h).default}});var l=n(577);Object.defineProperty(e,"AlphaFilter",{enumerable:!0,get:function(){return r(l).default}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=(n(60),function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random();r(this,e);var a=i(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"));return a.noise=n,a.seed=o,a}return o(e,t),a(e,[{key:"noise",get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t}},{key:"seed",get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t}}]),e}(u.Filter));e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s="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},u=n(6),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),h=n(270),l=r(h),f=n(271),d=r(f),p=n(272),g=r(p),_=n(59),m=r(_),y=n(273),v=r(y);c.utils.mixins.delayMixin(c.DisplayObject.prototype,v.default);var b="MOUSE",w={target:null,data:{global:null}},x=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this));return r=r||{},a.renderer=n,a.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,a.interactionFrequency=r.interactionFrequency||10,a.mouse=new l.default,a.mouse.identifier=b,a.mouse.global.set(-999999),a.activeInteractionData={},a.activeInteractionData[b]=a.mouse,a.interactionDataPool=[],a.eventData=new d.default,a.interactionDOMElement=null,a.moveWhenInside=!1,a.eventsAdded=!1,a.mouseOverRenderer=!1,a.supportsTouchEvents="ontouchstart"in window,a.supportsPointerEvents=!!window.PointerEvent,a.onPointerUp=a.onPointerUp.bind(a),a.processPointerUp=a.processPointerUp.bind(a),a.onPointerCancel=a.onPointerCancel.bind(a),a.processPointerCancel=a.processPointerCancel.bind(a),a.onPointerDown=a.onPointerDown.bind(a),a.processPointerDown=a.processPointerDown.bind(a),a.onPointerMove=a.onPointerMove.bind(a),a.processPointerMove=a.processPointerMove.bind(a),a.onPointerOut=a.onPointerOut.bind(a),a.processPointerOverOut=a.processPointerOverOut.bind(a),a.onPointerOver=a.onPointerOver.bind(a),a.cursorStyles={default:"inherit",pointer:"pointer"},a.currentCursorMode=null,a.cursor=null,a._tempPoint=new c.Point,a.resolution=1,a.setTargetElement(a.renderer.view,a.renderer.resolution),a}return a(e,t),e.prototype.hitTest=function(t,e){return w.target=null,w.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(w,e,null,!0),w.target},e.prototype.setTargetElement=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(c.ticker.shared.add(this.update,this,c.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(c.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)}
1,e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement)){if(this.didMove)return void(this.didMove=!1);this.cursor=null;for(var e in this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(e)){var n=this.activeInteractionData[e];if(n.originalEvent&&"touch"!==n.pointerType){var r=this.configureInteractionEventForDOMEvent(this.eventData,n.originalEvent,n);this.processInteractive(r,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch("undefined"===typeof e?"undefined":s(e)){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e)}else"string"!==typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,n){n.stopped||(n.currentTarget=t,n.type=e,t.emit(e,n),t[e]&&t[e](n))},e.prototype.mapPositionToPoint=function(t,e,n){var r=void 0;r=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var i=navigator.isCocoonJS?this.resolution:1/this.resolution;t.x=(e-r.left)*(this.interactionDOMElement.width/r.width)*i,t.y=(n-r.top)*(this.interactionDOMElement.height/r.height)*i},e.prototype.processInteractive=function(t,e,n,r,i){if(!e||!e.visible)return!1;var o=t.data.global;i=e.interactive||i;var a=!1,s=i;if(e.hitArea?s=!1:r&&e._mask&&(e._mask.containsPoint(o)||(r=!1)),e.interactiveChildren&&e.children)for(var u=e.children,c=u.length-1;c>=0;c--){var h=u[c],l=this.processInteractive(t,h,n,r,s);if(l){if(!h.parent)continue;s=!1,l&&(t.target&&(r=!1),a=!0)}}return i&&(r&&!t.target&&(e.hitArea?(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(a=!0)):e.containsPoint&&e.containsPoint(o)&&(a=!0)),e.interactive&&(a&&!t.target&&(t.target=e),n&&n(t,e,!!a))),a},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&t.preventDefault();for(var n=e.length,r=0;r<n;r++){var i=e[r],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);if(a.data.originalEvent=t,this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",a),"touch"===i.pointerType)this.emit("touchstart",a);else if("mouse"===i.pointerType||"pen"===i.pointerType){var s=2===i.button;this.emit(s?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,n){var r=t.data,i=t.data.identifier;if(n)if(e.trackedPointers[i]||(e.trackedPointers[i]=new g.default(i)),this.dispatchEvent(e,"pointerdown",t),"touch"===r.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===r.pointerType||"pen"===r.pointerType){var o=2===r.button;o?e.trackedPointers[i].rightDown=!0:e.trackedPointers[i].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,n){for(var r=this.normalizeToPointerData(t),i=r.length,o=t.target!==this.interactionDOMElement?"outside":"",a=0;a<i;a++){var s=r[a],u=this.getInteractionDataForPointerId(s),c=this.configureInteractionEventForDOMEvent(this.eventData,s,u);if(c.data.originalEvent=t,this.processInteractive(c,this.renderer._lastObjectRendered,n,e||!o),this.emit(e?"pointercancel":"pointerup"+o,c),"mouse"===s.pointerType||"pen"===s.pointerType){var h=2===s.button;this.emit(h?"rightup"+o:"mouseup"+o,c)}
1else"touch"===s.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,c),this.releaseInteractionDataForPointerId(s.pointerId,u))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var n=t.data,r=t.data.identifier;void 0!==e.trackedPointers[r]&&(delete e.trackedPointers[r],this.dispatchEvent(e,"pointercancel",t),"touch"===n.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,n){var r=t.data,i=t.data.identifier,o=e.trackedPointers[i],a="touch"===r.pointerType;if("mouse"===r.pointerType||"pen"===r.pointerType){var s=2===r.button,u=g.default.FLAGS,c=s?u.RIGHT_DOWN:u.LEFT_DOWN,h=void 0!==o&&o.flags&c;n?(this.dispatchEvent(e,s?"rightup":"mouseup",t),h&&this.dispatchEvent(e,s?"rightclick":"click",t)):h&&this.dispatchEvent(e,s?"rightupoutside":"mouseupoutside",t),o&&(s?o.rightDown=!1:o.leftDown=!1)}n?(this.dispatchEvent(e,"pointerup",t),a&&this.dispatchEvent(e,"touchend",t),o&&(this.dispatchEvent(e,"pointertap",t),a&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),a&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[i]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"===e[0].pointerType&&(this.didMove=!0,this.cursor=null);for(var n=e.length,r=0;r<n;r++){var i=e[r],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);a.data.originalEvent=t;var s="touch"!==i.pointerType||this.moveWhenInside;this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerMove,s),this.emit("pointermove",a),"touch"===i.pointerType&&this.emit("touchmove",a),"mouse"!==i.pointerType&&"pen"!==i.pointerType||this.emit("mousemove",a)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,n){var r=t.data,i="touch"===r.pointerType,o="mouse"===r.pointerType||"pen"===r.pointerType;o&&this.processPointerOverOut(t,e,n),this.moveWhenInside&&!n||(this.dispatchEvent(e,"pointermove",t),i&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t),n=e[0];"mouse"===n.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var r=this.getInteractionDataForPointerId(n),i=this.configureInteractionEventForDOMEvent(this.eventData,n,r);i.data.originalEvent=n,this.processInteractive(i,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",i),"mouse"===n.pointerType||"pen"===n.pointerType?this.emit("mouseout",i):this.releaseInteractionDataForPointerId(r.identifier)}},e.prototype.processPointerOverOut=function(t,e,n){var r=t.data,i=t.data.identifier,o="mouse"===r.pointerType||"pen"===r.pointerType,a=e.trackedPointers[i];n&&!a&&(a=e.trackedPointers[i]=new g.default(i)),void 0!==a&&(n&&this.mouseOverRenderer?(a.over||(a.over=!0,this.dispatchEvent(e,"pointerover",t),o&&this.dispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):a.over&&(a.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),a.none&&delete e.trackedPointers[i]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t),n=e[0],r=this.getInteractionDataForPointerId(n),i=this.configureInteractionEventForDOMEvent(this.eventData,n,r);i.data.originalEvent=n,"mouse"===n.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",i),"mouse"!==n.pointerType&&"pen"!==n.pointerType||this.emit("mouseover",i)},e.prototype.getInteractionDataForPointerId=function(t){var e=t.pointerId,n=void 0;return e===b||"mouse"===t.pointerType?n=this.mouse:this.activeInteractionData[e]?n=this.activeInteractionData[e]:(n=this.interactionDataPool.pop()||new l.default,n.identifier=e,this.activeInteractionData[e]=n),n._copyEvent(t),n},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e._reset(),this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,n){return t.data=n,this.mapPositionToPoint(n.global,e.clientX,e.clientY),navigator.isCocoonJS&&"touch"===e.pointerType&&(n.global.x=n.global.x/this.resolution,n.global.y=n.global.y/this.resolution),"touch"===e.pointerType&&(e.globalX=n.global.x,e.globalY=n.global.y),n.originalEvent=e,t._reset(),t},e.prototype.normalizeToPointerData=function(t){var e=[];
1if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var n=0,r=t.changedTouches.length;n<r;n++){var i=t.changedTouches[n];"undefined"===typeof i.button&&(i.button=t.touches.length?1:0),"undefined"===typeof i.buttons&&(i.buttons=t.touches.length?1:0),"undefined"===typeof i.isPrimary&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),"undefined"===typeof i.width&&(i.width=i.radiusX||1),"undefined"===typeof i.height&&(i.height=i.radiusY||1),"undefined"===typeof i.tiltX&&(i.tiltX=0),"undefined"===typeof i.tiltY&&(i.tiltY=0),"undefined"===typeof i.pointerType&&(i.pointerType="touch"),"undefined"===typeof i.pointerId&&(i.pointerId=i.identifier||0),"undefined"===typeof i.pressure&&(i.pressure=i.force||.5),i.twist=0,i.tangentialPressure=0,"undefined"===typeof i.layerX&&(i.layerX=i.offsetX=i.clientX),"undefined"===typeof i.layerY&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,e.push(i)}else!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent?e.push(t):("undefined"===typeof t.isPrimary&&(t.isPrimary=!0),"undefined"===typeof t.width&&(t.width=1),"undefined"===typeof t.height&&(t.height=1),"undefined"===typeof t.tiltX&&(t.tiltX=0),"undefined"===typeof t.tiltY&&(t.tiltY=0),"undefined"===typeof t.pointerType&&(t.pointerType="mouse"),"undefined"===typeof t.pointerId&&(t.pointerId=b),"undefined"===typeof t.pressure&&(t.pressure=.5),t.twist=0,t.tangentialPressure=0,t.isNormalized=!0,e.push(t));return e},e.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this._tempPoint=null},e}(m.default);e.default=x,c.WebGLRenderer.registerPlugin("interaction",x),c.CanvasRenderer.registerPlugin("interaction",x)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(270);Object.defineProperty(e,"InteractionData",{enumerable:!0,get:function(){return r(i).default}});var o=n(584);Object.defineProperty(e,"InteractionManager",{enumerable:!0,get:function(){return r(o).default}});var a=n(273);Object.defineProperty(e,"interactiveTarget",{enumerable:!0,get:function(){return r(a).default}});var s=n(272);Object.defineProperty(e,"InteractionTrackingData",{enumerable:!0,get:function(){return r(s).default}});var u=n(271);Object.defineProperty(e,"InteractionEvent",{enumerable:!0,get:function(){return r(u).default}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.shared=e.Resource=e.textureParser=e.getResourcePath=e.spritesheetParser=e.parseBitmapFontData=e.bitmapFontParser=e.Loader=void 0;var i=n(274);Object.defineProperty(e,"bitmapFontParser",{enumerable:!0,get:function(){return r(i).default}}),Object.defineProperty(e,"parseBitmapFontData",{enumerable:!0,get:function(){return i.parse}});var o=n(275);Object.defineProperty(e,"spritesheetParser",{enumerable:!0,get:function(){return r(o).default}}),Object.defineProperty(e,"getResourcePath",{enumerable:!0,get:function(){return o.getResourcePath}});var a=n(276);Object.defineProperty(e,"textureParser",{enumerable:!0,get:function(){return r(a).default}});var s=n(114);Object.defineProperty(e,"Resource",{enumerable:!0,get:function(){return s.Resource}});var u=n(243),c=r(u),h=n(587),l=r(h);e.Loader=l.default;var f=new l.default;f.destroy=function(){},e.shared=f;var d=c.default.prototype;d._loader=null,Object.defineProperty(d,"loader",{get:function(){if(!this._loader){var t=this._options.sharedLoader;this._loader=t?f:new l.default}return this._loader}}),d._parentDestroy=d.destroy,d.destroy=function(t){this._loader&&(this._loader.destroy(),this._loader=null),this._parentDestroy(t)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(114),u=r(s),c=n(614),h=n(59),l=r(h),f=n(276),d=r(f),p=n(275),g=r(p),_=n(274),m=r(_),y=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this,n,r));l.default.call(a);for(var s=0;s<e._pixiMiddleware.length;++s)a.use(e._pixiMiddleware[s]());return a.onStart.add(function(t){return a.emit("start",t)}),a.onProgress.add(function(t,e){return a.emit("progress",t,e)}),a.onError.add(function(t,e,n){return a.emit("error",t,e,n)}),a.onLoad.add(function(t,e){return a.emit("load",t,e)}),a.onComplete.add(function(t,e){return a.emit("complete",t,e)}),a}return a(e,t),e.addPixiMiddleware=function(t){e._pixiMiddleware.push(t)},e.prototype.destroy=function(){this.removeAllListeners(),this.reset()},e}(u.default);e.default=y;for(var v in l.default.prototype)y.prototype[v]=l.default.prototype[v];y._pixiMiddleware=[c.blobMiddlewareFactory,d.default,g.default,m.default];var b=u.default.Resource;b.setExtensionXhrType("fnt",b.XHR_RESPONSE_TYPE.DOCUMENT)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(277),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=10,h=function(t){function e(n,o,a,s,u){r(this,e);var h=i(this,t.call(this,n,4,4));return h._origWidth=n.orig.width,h._origHeight=n.orig.height,h._width=h._origWidth,h._height=h._origHeight,h.leftWidth="undefined"!==typeof o?o:c,h.rightWidth="undefined"!==typeof s?s:c,h.topHeight="undefined"!==typeof a?a:c,h.bottomHeight="undefined"!==typeof u?u:c,h.refresh(!0),h}return o(e,t),e.prototype.updateHorizontalVertices=function(){var t=this.vertices;t[9]=t[11]=t[13]=t[15]=this._topHeight,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices;
1t[2]=t[10]=t[18]=t[26]=this._leftWidth,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._renderCanvas=function(t){var e=t.context;e.globalAlpha=this.worldAlpha;var n=this.worldTransform,r=t.resolution;t.roundPixels?e.setTransform(n.a*r,n.b*r,n.c*r,n.d*r,n.tx*r|0,n.ty*r|0):e.setTransform(n.a*r,n.b*r,n.c*r,n.d*r,n.tx*r,n.ty*r);var i=this._texture.baseTexture,o=i.source,a=i.width*i.resolution,s=i.height*i.resolution;this.drawSegment(e,o,a,s,0,1,10,11),this.drawSegment(e,o,a,s,2,3,12,13),this.drawSegment(e,o,a,s,4,5,14,15),this.drawSegment(e,o,a,s,8,9,18,19),this.drawSegment(e,o,a,s,10,11,20,21),this.drawSegment(e,o,a,s,12,13,22,23),this.drawSegment(e,o,a,s,16,17,26,27),this.drawSegment(e,o,a,s,18,19,28,29),this.drawSegment(e,o,a,s,20,21,30,31)},e.prototype.drawSegment=function(t,e,n,r,i,o,a,s){var u=this.uvs,c=this.vertices,h=(u[a]-u[i])*n,l=(u[s]-u[o])*r,f=c[a]-c[i],d=c[s]-c[o];h<1&&(h=1),l<1&&(l=1),f<1&&(f=1),d<1&&(d=1),t.drawImage(e,u[i]*n,u[o]*r,h,l,c[i],c[o],f,d)},e.prototype._refresh=function(){t.prototype._refresh.call(this);var e=this.uvs,n=this._texture;this._origWidth=n.orig.width,this._origHeight=n.orig.height;var r=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=r*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-r*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.dirty++,this.multiplyUvs()},a(e,[{key:"width",get:function(){return this._width},set:function(t){this._width=t,this._refresh()}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this._refresh()}},{key:"leftWidth",get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()}},{key:"rightWidth",get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()}},{key:"topHeight",get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()}},{key:"bottomHeight",get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()}}]),e}(u.default);e.default=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(113),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n,o){r(this,e);var a=i(this,t.call(this,n));return a.points=o,a.vertices=new Float32Array(4*o.length),a.uvs=new Float32Array(4*o.length),a.colors=new Float32Array(2*o.length),a.indices=new Uint16Array(2*o.length),a.autoUpdate=!0,a.refresh(),a}return o(e,t),e.prototype._refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){this.vertices.length/4!==t.length&&(this.vertices=new Float32Array(4*t.length),this.uvs=new Float32Array(4*t.length),this.colors=new Float32Array(2*t.length),this.indices=new Uint16Array(2*t.length));var e=this.uvs,n=this.indices,r=this.colors;e[0]=0,e[1]=0,e[2]=0,e[3]=1,r[0]=1,r[1]=1,n[0]=0,n[1]=1;for(var i=t.length,o=1;o<i;o++){var a=4*o,s=o/(i-1);e[a]=s,e[a+1]=0,e[a+2]=s,e[a+3]=1,a=2*o,r[a]=1,r[a+1]=1,a=2*o,n[a]=a,n[a+1]=a+1}this.dirty++,this.indexDirty++,this.multiplyUvs(),this.refreshVertices()}},e.prototype.refreshVertices=function(){var t=this.points;if(!(t.length<1))for(var e=t[0],n=void 0,r=0,i=0,o=this.vertices,a=t.length,s=0;s<a;s++){var u=t[s],c=4*s;n=s<t.length-1?t[s+1]:u,i=-(n.x-e.x),r=n.y-e.y;var h=10*(1-s/(a-1));h>1&&(h=1);var l=Math.sqrt(r*r+i*i),f=this._texture.height/2;
1r/=l,i/=l,r*=f,i*=f,o[c]=u.x+r,o[c+1]=u.y+i,o[c+2]=u.x-r,o[c+3]=u.y-i,e=u}},e.prototype.updateTransform=function(){this.autoUpdate&&this.refreshVertices(),this.containerUpdateTransform()},e}(s.default);e.default=u},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(6),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),a=n(113),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(){function t(e){r(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,n=e.context,r=t.worldTransform,i=e.resolution;e.roundPixels?n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i|0,r.ty*i|0):n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i),e.setBlendMode(t.blendMode),t.drawMode===s.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(t):this._renderTriangles(t)},t.prototype._renderTriangleMesh=function(t){for(var e=t.vertices.length/2,n=0;n<e-2;n++){var r=2*n;this._renderDrawTriangle(t,r,r+2,r+4)}},t.prototype._renderTriangles=function(t){for(var e=t.indices,n=e.length,r=0;r<n;r+=3){var i=2*e[r],o=2*e[r+1],a=2*e[r+2];this._renderDrawTriangle(t,i,o,a)}},t.prototype._renderDrawTriangle=function(t,e,n,r){var i=this.renderer.context,o=t.uvs,a=t.vertices,s=t._texture;if(s.valid){var u=s.baseTexture,c=u.source,h=u.width,l=u.height,f=void 0,d=void 0,p=void 0,g=void 0,_=void 0,m=void 0;if(t.uploadUvTransform){var y=t._uvTransform.mapCoord;f=(o[e]*y.a+o[e+1]*y.c+y.tx)*u.width,d=(o[n]*y.a+o[n+1]*y.c+y.tx)*u.width,p=(o[r]*y.a+o[r+1]*y.c+y.tx)*u.width,g=(o[e]*y.b+o[e+1]*y.d+y.ty)*u.height,_=(o[n]*y.b+o[n+1]*y.d+y.ty)*u.height,m=(o[r]*y.b+o[r+1]*y.d+y.ty)*u.height}else f=o[e]*u.width,d=o[n]*u.width,p=o[r]*u.width,g=o[e+1]*u.height,_=o[n+1]*u.height,m=o[r+1]*u.height;var v=a[e],b=a[n],w=a[r],x=a[e+1],S=a[n+1],T=a[r+1];if(t.canvasPadding>0){var E=t.canvasPadding/t.worldTransform.a,P=t.canvasPadding/t.worldTransform.d,O=(v+b+w)/3,M=(x+S+T)/3,C=v-O,A=x-M,I=Math.sqrt(C*C+A*A);v=O+C/I*(I+E),x=M+A/I*(I+P),C=b-O,A=S-M,I=Math.sqrt(C*C+A*A),b=O+C/I*(I+E),S=M+A/I*(I+P),C=w-O,A=T-M,I=Math.sqrt(C*C+A*A),w=O+C/I*(I+E),T=M+A/I*(I+P)}i.save(),i.beginPath(),i.moveTo(v,x),i.lineTo(b,S),i.lineTo(w,T),i.closePath(),i.clip();var R=f*_+g*p+d*m-_*p-g*d-f*m,D=v*_+g*w+b*m-_*w-g*b-v*m,L=f*b+v*p+d*w-b*p-v*d-f*w,k=f*_*w+g*b*p+v*d*m-v*_*p-g*d*w-f*b*m,F=x*_+g*T+S*m-_*T-g*S-x*m,N=f*S+x*p+d*T-S*p-x*d-f*T,B=f*_*T+g*S*p+x*d*m-x*_*p-g*d*T-f*S*m;i.transform(D/R,F/R,L/R,N/R,k/R,B/R),i.drawImage(c,0,0,h*u.resolution,l*u.resolution,0,0,h,l),i.restore(),this.renderer.invalidateBlendMode()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,n=t.vertices,r=n.length/2;e.beginPath();for(var i=1;i<r-2;++i){var o=2*i,a=n[o],s=n[o+1],u=n[o+2],c=n[o+3],h=n[o+4],l=n[o+5];e.moveTo(a,s),e.lineTo(u,c),e.lineTo(h,l)}e.fillStyle="#FF0000",e.fill(),e.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();e.default=u,o.CanvasRenderer.registerPlugin("mesh",u)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(113);Object.defineProperty(e,"Mesh",{enumerable:!0,get:function(){return r(i).default}});var o=n(592);Object.defineProperty(e,"MeshRenderer",{enumerable:!0,get:function(){return r(o).default}});var a=n(590);Object.defineProperty(e,"CanvasMeshRenderer",{enumerable:!0,get:function(){return r(a).default}});var s=n(277);Object.defineProperty(e,"Plane",{enumerable:!0,get:function(){return r(s).default}});var u=n(588);Object.defineProperty(e,"NineSlicePlane",{enumerable:!0,get:function(){return r(u).default}});var c=n(589);Object.defineProperty(e,"Rope",{enumerable:!0,get:function(){return r(c).default}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=n(47),h=r(c),l=n(113),f=r(l),d=(n(60),u.Matrix.IDENTITY),p=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.shader=null,r}return a(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new u.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n")},e.prototype.render=function(t){var e=this.renderer,n=e.gl,r=t._texture;if(r.valid){var i=t._glDatas[e.CONTEXT_UID];i||(e.bindVao(null),i={shader:this.shader,vertexBuffer:h.default.GLBuffer.createVertexBuffer(n,t.vertices,n.STREAM_DRAW),uvBuffer:h.default.GLBuffer.createVertexBuffer(n,t.uvs,n.STREAM_DRAW),indexBuffer:h.default.GLBuffer.createIndexBuffer(n,t.indices,n.STATIC_DRAW),vao:null,dirty:t.dirty,indexDirty:t.indexDirty},i.vao=new h.default.VertexArrayObject(n).addIndex(i.indexBuffer).addAttribute(i.vertexBuffer,i.shader.attributes.aVertexPosition,n.FLOAT,!1,8,0).addAttribute(i.uvBuffer,i.shader.attributes.aTextureCoord,n.FLOAT,!1,8,0),t._glDatas[e.CONTEXT_UID]=i),e.bindVao(i.vao),t.dirty!==i.dirty&&(i.dirty=t.dirty,i.uvBuffer.upload(t.uvs)),t.indexDirty!==i.indexDirty&&(i.indexDirty=t.indexDirty,i.indexBuffer.upload(t.indices)),i.vertexBuffer.upload(t.vertices),e.bindShader(i.shader),i.shader.uniforms.uSampler=e.bindTexture(r),e.state.setBlendMode(u.utils.correctBlendMode(t.blendMode,r.baseTexture.premultipliedAlpha)),i.shader.uniforms.uTransform&&(t.uploadUvTransform?i.shader.uniforms.uTransform=t._uvTransform.mapCoord.toArray(!0):i.shader.uniforms.uTransform=d.toArray(!0)),i.shader.uniforms.translationMatrix=t.worldTransform.toArray(!0),i.shader.uniforms.uColor=u.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,i.shader.uniforms.uColor,r.baseTexture.premultipliedAlpha);var o=t.drawMode===f.default.DRAW_MODES.TRIANGLE_MESH?n.TRIANGLE_STRIP:n.TRIANGLES;i.vao.draw(o,t.indices.length,0)}},e}(u.ObjectRenderer);e.default=p,u.WebGLRenderer.registerPlugin("mesh",p)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=n(11),h=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500,o=arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];r(this,e);var c=i(this,t.call(this));return a>16384&&(a=16384),a>n&&(a=n),c._properties=[!1,!0,!1,!1,!1],c._maxSize=n,c._batchSize=a,c._glBuffers={},c._bufferToUpdate=0,c.interactiveChildren=!1,c.blendMode=u.BLEND_MODES.NORMAL,c.autoResize=s,c.roundPixels=!0,c.baseTexture=null,c.setProperties(o),c._tint=0,c.tintRgb=new Float32Array(4),c.tint=16777215,c}return o(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t||"tint"in t?!!t.alpha||!!t.tint:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},e.prototype.renderWebGL=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);e<this._bufferToUpdate&&(this._bufferToUpdate=e)},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,n=this.worldTransform,r=!0,i=0,o=0,a=0,s=0;t.setBlendMode(this.blendMode),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var u=0;u<this.children.length;++u){var c=this.children[u];if(c.visible){var h=c._texture.frame;if(e.globalAlpha=this.worldAlpha*c.alpha,c.rotation%(2*Math.PI)===0)r&&(e.setTransform(n.a,n.b,n.c,n.d,n.tx*t.resolution,n.ty*t.resolution),r=!1),i=c.anchor.x*(-h.width*c.scale.x)+c.position.x+.5,o=c.anch
1or.y*(-h.height*c.scale.y)+c.position.y+.5,a=h.width*c.scale.x,s=h.height*c.scale.y;else{r||(r=!0),c.displayObjectUpdateTransform();var l=c.worldTransform;t.roundPixels?e.setTransform(l.a,l.b,l.c,l.d,l.tx*t.resolution|0,l.ty*t.resolution|0):e.setTransform(l.a,l.b,l.c,l.d,l.tx*t.resolution,l.ty*t.resolution),i=c.anchor.x*-h.width+.5,o=c.anchor.y*-h.height+.5,a=h.width,s=h.height}var f=c._texture.baseTexture.resolution;e.drawImage(c._texture.baseTexture.source,h.x*f,h.y*f,h.width*f,h.height*f,i*t.resolution,o*t.resolution,a*t.resolution,s*t.resolution)}}}},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._buffers)for(var n=0;n<this._buffers.length;++n)this._buffers[n].destroy();this._properties=null,this._buffers=null},a(e,[{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,(0,c.hex2rgb)(t,this.tintRgb)}}]),e}(u.Container);e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(593);Object.defineProperty(e,"ParticleContainer",{enumerable:!0,get:function(){return r(i).default}});var o=n(596);Object.defineProperty(e,"ParticleRenderer",{enumerable:!0,get:function(){return r(o).default}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=n(47),a=r(o),s=n(182),u=r(s),c=function(){function t(e,n,r,o){i(this,t),this.gl=e,this.size=o,this.dynamicProperties=[],this.staticProperties=[];for(var a=0;a<n.length;++a){var s=n[a];s={attribute:s.attribute,size:s.size,uploadFunction:s.uploadFunction,unsignedByte:s.unsignedByte,offset:s.offset},r[a]?this.dynamicProperties.push(s):this.staticProperties.push(s)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.initBuffers()}return t.prototype.initBuffers=function(){var t=this.gl,e=0;this.indices=(0,u.default)(this.size),this.indexBuffer=a.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.dynamicStride=0;for(var n=0;n<this.dynamicProperties.length;++n){var r=this.dynamicProperties[n];r.offset=e,e+=r.size,this.dynamicStride+=r.size}var i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=a.default.GLBuffer.createVertexBuffer(t,i,t.STREAM_DRAW);var o=0;this.staticStride=0;for(var s=0;s<this.staticProperties.length;++s){var c=this.staticProperties[s];c.offset=o,o+=c.size,this.staticStride+=c.size}var h=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(h),this.staticDataUint32=new Uint32Array(h),this.staticBuffer=a.default.GLBuffer.createVertexBuffer(t,h,t.STATIC_DRAW),this.vao=new a.default.VertexArrayObject(t).addIndex(this.indexBuffer);for(var l=0;l<this.dynamicProperties.length;++l){var f=this.dynamicProperties[l];f.unsignedByte?this.vao.addAttribute(this.dynamicBuffer,f.attribute,t.UNSIGNED_BYTE,!0,4*this.dynamicStride,4*f.offset):this.vao.addAttribute(this.dynamicBuffer,f.attribute,t.FLOAT,!1,4*this.dynamicStride,4*f.offset)}for(var d=0;d<this.staticProperties.length;++d){var p=this.staticProperties[d];p.unsignedByte?this.vao.addAttribute(this.staticBuffer,p.attribute,t.UNSIGNED_BYTE,!0,4*this.staticStride,4*p.offset):this.vao.addAttribute(this.staticBuffer,p.attribute,t.FLOAT,!1,4*this.staticStride,4*p.offset)}},t.prototype.uploadDynamic=function(t,e,n){for(var r=0;r<this.dynamicProperties.length;r++){var i=this.dynamicProperties[r];i.uploadFunction(t,e,n,i.unsignedByte?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,i.offset)}this.dynamicBuffer.upload()},t.prototype.uploadStatic=function(t,e,n){for(var r=0;r<this.staticProperties.length;r++){var i=this.staticProperties[r];i.uploadFunction(t,e,n,i.unsignedByte?this.staticDataUint32:this.staticData,this.staticStride,i.offset)}this.staticBuffer.upload()},t.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicData=null,this.dynamicBuffer.destroy(),this.staticProperties=null,this.staticData=null,this.staticBuffer.destroy()},t}();e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=n(597),h=r(c),l=n(595),f=r(l),d=n(11),p=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.shader=null,r.indexBuffer=null,r.properties=null,r.tempMatrix=new u.Matrix,r.CONTEXT_UID=0,r}return a(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new h.default(t),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,unsignedByte:!0,uploadFunction:this.uploadTint,offset:0}]},e.prototype.start=function(){this.renderer.bindShader(this.shader)},e.prototype.render=function(t){var e=t.children,n=t._maxSize,r=t._batchSize,i=this.renderer,o=e.length;if(0!==o){o>n&&(o=n);var a=t._glBuffers[i.CONTEXT_UID];a||(a=t._glBuffers[i.CONTEXT_UID]=this.generateBuffers(t));var s=e[0]._texture.baseTexture;this.renderer.setBlendMode(u.utils.correctBlendMode(t.blendMode,s.premultipliedAlpha));var c=i.gl,h=t.worldTransform.copy(this.tempMatrix);h.prepend(i._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=h.toArray(!0),this.shader.uniforms.uColor=u.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,s.premultipliedAlpha),this.shader.uniforms.uSampler=i.bindTexture(s);for(var l=0,f=0;l<o;l+=r,f+=1){var d=o-l;if(d>r&&(d=r),f>=a.length){if(!t.autoResize)break;a.push(this._generateOneMoreBuffer(t))}var p=a[f];p.uploadDynamic(e,l,d),t._bufferToUpdate===f&&(p.uploadStatic(e,l,d),t._bufferToUpdate=f+1),i.bindVao(p.vao),p.vao.draw(c.TRIANGLES,6*d)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,n=[],r=t._maxSize,i=t._batchSize,o=t._properties,a=0;a<r;a+=i)n.push(new f.default(e,this.properties,o,i));return n},e.prototype._generateOneMoreBuffer=function(t){var e=this.renderer.gl,n=t._batchSize,r=t._properties;return new f.default(e,this.properties,r,n)},e.prototype.uploadVertices=function(t,e,n,r,i,o){for(var a=0,s=0,u=0,c=0,h=0;h<n;++h){var l=t[e+h],f=l._texture,d=l.scale.x,p=l.scale.y,g=f.trim,_=f.orig;g?(s=g.x-l.anchor.x*_.width,a=s+g.width,c=g.y-l.anchor.y*_.height,u=c+g.height):(a=_.width*(1-l.anchor.x),s=_.width*-l.anchor.x,u=_.height*(1-l.anchor.y),c=_.height*-l.anchor.y),r[o]=s*d,r[o+1]=c*p,r[o+i]=a*d,r[o+i+1]=c*p,r[o+2*i]=a*d,r[o+2*i+1]=u*p,r[o+3*i]=s*d,r[o+3*i+1]=u*p,o+=4*i}},e.prototype.uploadPosition=function(t,e,n,r,i,o){for(var a=0;a<n;a++){var s=t[e+a].position;r[o]=s.x,r[o+1]=s.y,r[o+i]=s.x,r[o+i+1]=s.y,r[o+2*i]=s.x,r[o+2*i+1]=s.y,r[o+3*i]=s.x,r[o+3*i+1]=s.y,o+=4*i}},e.prototype.uploadRotation=function(t,e,n,r,i,o){for(var a=0;a<n;a++){var s=t[e+a].rotation;r[o]=s,r[o+i]=s,r[o+2*i]=s,r[o+3*i]=s,o+=4*i}},e.prototype.uploadUvs=function(t,e,n,r,i,o){for(var a=0;a<n;++a){var s=t[e+a]._texture._uvs;s?(r[o]=s.x0,r[o+1]=s.y0,r[o+i]=s.x1,r[o+i+1]=s.y1,r[o+2*i]=s.x2,r[o+2*i+1]=s.y2,r[o+3*i]=s.x3,r[o+3*i+1]=s.y3,o+=4*i):(r[o]=0,r[o+1]=0,r[o+i]=0,r[o+i+1]=0,r[o+2*i]=0,r[o+2*i+1]=0,r[o+3*i]=0,r[o+3*i+1]=0,o+=4*i)}},e.prototype.uploadTint=function(t,e,n,r,i,o){for(var a=0;a<n;++a){var s=t[e+a],u=s._texture.baseTexture.premultipliedAlpha,c=s.alpha,h=c<1&&u?(0,d.premultiplyTint)(s._tintRGB,c):s._tintRGB+(255*c<<24);r[o]=h,r[o+i]=h,r[o+2*i]=h,r[o+3*i]=h,o+=4*i}},e.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),t.prototype.destroy.call(this),this.shader.destroy(),this.indices=null,this.tempMatrix=null},e}(u.ObjectRenderer);e.default=p,u.WebGLRenderer.registerPlugin("particle",p)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(109),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(t){function e(n){return r(this,e),i(this,t.call(this,n,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","attribute vec2 aPositionCoord;","attribute vec2 aScale;","attribute float aRotation;","uniform mat3 projectionMatrix;","uniform vec4 uColor;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," vec2 v = aVertexPosition;"," v.x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);"," v.y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);"," v = v + aPositionCoord;"," gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = aColor * uColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void){"," vec4 color = texture2D(uSampler, vTextureCoord) * vColor;"," if (color.a == 0.0) discard;"," gl_FragColor = color;","}"].join("\n")))}return o(e,t),e}(s.default);e.default=u},function(t,e,n){"use strict";Math.sign||(Math.sign=function(t){return t=Number(t),0===t||isNaN(t)?t:t>0?1:-1})},function(t,e,n){"use strict";var r=n(231),i=function(t){return t&&t.__esModule?t:{default:t}}(r);Object.assign||(Object.assign=i.default)},function(t,e,n){"use strict";n(599),n(601),n(598),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},function(t,e,n){"use strict";(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}
1for(var n=Date.now(),r=["ms","moz","webkit","o"],i=0;i<r.length&&!t.requestAnimationFrame;++i){var o=r[i];t.requestAnimationFrame=t[o+"RequestAnimationFrame"],t.cancelAnimationFrame=t[o+"CancelAnimationFrame"]||t[o+"CancelRequestAnimationFrame"]}t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!==typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),r=16+n-e;return r<0&&(r=0),n=e,setTimeout(function(){n=Date.now(),t(performance.now())},r)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){return clearTimeout(t)})}).call(e,n(81))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(e instanceof u.BaseTexture){var n=e.source,r=0===n.width?t.canvas.width:Math.min(t.canvas.width,n.width),i=0===n.height?t.canvas.height:Math.min(t.canvas.height,n.height);return t.ctx.drawImage(n,0,0,r,i,0,0,t.canvas.width,t.canvas.height),!0}return!1}e.__esModule=!0;var s=n(6),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=n(183),h=function(t){return t&&t.__esModule?t:{default:t}}(c),l=16,f=function(t){function e(n){r(this,e);var o=i(this,t.call(this,n));return o.uploadHookHelper=o,o.canvas=document.createElement("canvas"),o.canvas.width=l,o.canvas.height=l,o.ctx=o.canvas.getContext("2d"),o.registerUploadHook(a),o}return o(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(h.default);e.default=f,u.CanvasRenderer.registerPlugin("prepare",f)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(605);Object.defineProperty(e,"webgl",{enumerable:!0,get:function(){return r(i).default}});var o=n(602);Object.defineProperty(e,"canvas",{enumerable:!0,get:function(){return r(o).default}});var a=n(183);Object.defineProperty(e,"BasePrepare",{enumerable:!0,get:function(){return r(a).default}});var s=n(278);Object.defineProperty(e,"CountLimiter",{enumerable:!0,get:function(){return r(s).default}});var u=n(604);Object.defineProperty(e,"TimeLimiter",{enumerable:!0,get:function(){return r(u).default}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(e){r(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds},t}();e.default=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){return e instanceof h.BaseTexture&&(e._glTextures[t.CONTEXT_UID]||t.textureManager.updateTexture(e),!0)}function s(t,e){return e instanceof h.Graphics&&((e.dirty||e.clearDirty||!e._webGL[t.plugins.graphics.CONTEXT_UID])&&t.plugins.graphics.updateGraphics(e),!0)}function u(t,e){return t instanceof h.Graphics&&(e.push(t),!0)}e.__esModule=!0;var c=n(6),h=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(c),l=n(183),f=function(t){return t&&t.__esModule?t:{default:t}}(l),d=function(t){function e(n){r(this,e);var o=i(this,t.call(this,n));return o.uploadHookHelper=o.renderer,o.registerFindHook(u),o.registerUploadHook(a),o.registerUploadHook(s),o}return o(e,t),e}(f.default);e.default=d,h.WebGLRenderer.registerPlugin("prepare",d)},function(t,e,n){(function(t,r){var i;!function(o){function a(t){throw new RangeError(R[t])}function s(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function u(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(I,"."),r+s(t.split("."),e).join(".")}function c(t){for(var e,n,r=[],i=0,o=t.length;i<o;)e=t.charCodeAt(i++),e>=55296&&e<=56319&&i<o?(n=t.charCodeAt(i++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--)):r.push(e);return r}function h(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=k(t>>
vendor: 3,778 bytes, line 1
1>10&1023|55296),t=56320|1023&t),e+=k(t)}).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:w}function f(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,n){var r=0;for(t=n?L(t/E):t>>1,t+=L(t/e);t>D*S>>1;r+=w)t=L(t/D);return L(r+(D+1)*t/(t+T))}function p(t){var e,n,r,i,o,s,u,c,f,p,g=[],_=t.length,m=0,y=O,v=P;for(n=t.lastIndexOf(M),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&a("not-basic"),g.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<_;){for(o=m,s=1,u=w;i>=_&&a("invalid-input"),c=l(t.charCodeAt(i++)),(c>=w||c>L((b-m)/s))&&a("overflow"),m+=c*s,f=u<=v?x:u>=v+S?S:u-v,!(c<f);u+=w)p=w-f,s>L(b/p)&&a("overflow"),s*=p;e=g.length+1,v=d(m-o,e,0==o),L(m/e)>b-y&&a("overflow"),y+=L(m/e),m%=e,g.splice(m++,0,y)}return h(g)}function g(t){var e,n,r,i,o,s,u,h,l,p,g,_,m,y,v,T=[];for(t=c(t),_=t.length,e=O,n=0,o=P,s=0;s<_;++s)(g=t[s])<128&&T.push(k(g));for(r=i=T.length,i&&T.push(M);r<_;){for(u=b,s=0;s<_;++s)(g=t[s])>=e&&g<u&&(u=g);for(m=r+1,u-e>L((b-n)/m)&&a("overflow"),n+=(u-e)*m,e=u,s=0;s<_;++s)if(g=t[s],g<e&&++n>b&&a("overflow"),g==e){for(h=n,l=w;p=l<=o?x:l>=o+S?S:l-o,!(h<p);l+=w)v=h-p,y=w-p,T.push(k(f(p+v%y,0))),h=L(v/y);T.push(k(f(h,0))),o=d(n,m,r==i),n=0,++r}++n,++e}return T.join("")}function _(t){return u(t,function(t){return C.test(t)?p(t.slice(4).toLowerCase()):t})}function m(t){return u(t,function(t){return A.test(t)?"xn--"+g(t):t})}var y=("object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType,"object"==typeof r&&r);var v,b=2147483647,w=36,x=1,S=26,T=38,E=700,P=72,O=128,M="-",C=/^xn--/,A=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=w-x,L=Math.floor,k=String.fromCharCode;v={version:"1.4.1",ucs2:{decode:c,encode:h},decode:p,encode:g,toASCII:m,toUnicode:_},void 0!==(i=function(){return v}.call(e,n,e,t))&&(t.exports=i)}()}).call(e,n(305)(t),n(81))},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!==typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"===typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var h=0;h<c;++h){var l,f,d,p,g=t[h].replace(s,"%20"),_=g.indexOf(n);_>=0?(l=g.substr(0,_),f=g.substr(_+1)):(l=g,f=""),d=decodeURIComponent(l),p=decodeURIComponent(f),r(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function r(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?r(a(t),function(a){var s=encodeURIComponent(i(a))+n;return o(t[a])?r(t[a],function(t){return s+encodeURIComponent(i(t))}).join(e):s+encodeURIComponent(i(t[a]))}).join(e):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){"use strict";e.decode=e.parse=n(607),e.encode=e.stringify=n(608)},function(t,e,n){"use strict";function r(t){var e=new i(i._61);return e._81=1,e._65=t,e}var i=n(279);t.exports=i;var o=r(!0),a=r(!1),s=r(null),u=r(void 0),c=r(0),h=r("");i.resolve=function(t){if(t instanceof i)return t;if(null===t)return s;if(void 0===t)return u;if(!0===t)return o;if(!1===t)return a;
1if(0===t)return c;if(""===t)return h;if("object"===typeof t||"function"===typeof t)try{var e=t.then;if("function"===typeof e)return new i(e.bind(t))}catch(t){return new i(function(e,n){n(t)})}return r(t)},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,n){function r(a,s){if(s&&("object"===typeof s||"function"===typeof s)){if(s instanceof i&&s.then===i.prototype.then){for(;3===s._81;)s=s._65;return 1===s._81?r(a,s._65):(2===s._81&&n(s._65),void s.then(function(t){r(a,t)},n))}var u=s.then;if("function"===typeof u){return void new i(u.bind(s)).then(function(t){r(a,t)},n)}}e[a]=s,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,a=0;a<e.length;a++)r(a,e[a])})},i.reject=function(t){return new i(function(e,n){n(t)})},i.race=function(t){return new i(function(e,n){t.forEach(function(t){i.resolve(t).then(e,n)})})},i.prototype.catch=function(t){return this.then(null,t)}},function(t,e,n){"use strict";function r(){c=!1,s._10=null,s._97=null}function i(t){function e(e){(t.allRejections||a(l[e].error,t.whitelist||u))&&(l[e].displayId=h++,t.onUnhandled?(l[e].logged=!0,t.onUnhandled(l[e].displayId,l[e].error)):(l[e].logged=!0,o(l[e].displayId,l[e].error)))}function n(e){l[e].logged&&(t.onHandled?t.onHandled(l[e].displayId,l[e].error):l[e].onUnhandled||(console.warn("Promise Rejection Handled (id: "+l[e].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+l[e].displayId+".")))}t=t||{},c&&r(),c=!0;var i=0,h=0,l={};s._10=function(t){2===t._81&&l[t._72]&&(l[t._72].logged?n(t._72):clearTimeout(l[t._72].timeout),delete l[t._72])},s._97=function(t,n){0===t._45&&(t._72=i++,l[t._72]={displayId:null,error:n,timeout:setTimeout(e.bind(null,t._72),a(n,u)?100:2e3),logged:!1})}}function o(t,e){console.warn("Possible Unhandled Promise Rejection (id: "+t+"):"),((e&&(e.stack||e))+"").split("\n").forEach(function(t){console.warn(" "+t)})}function a(t,e){return e.some(function(e){return t instanceof e})}var s=n(279),u=[ReferenceError,TypeError,RangeError],c=!1;e.disable=r,e.enable=i},function(t,e,n){"use strict";t.exports=function(t,e,n){var r,i=t.length;if(!(e>=i||0===n)){n=e+n>i?i-e:n;var o=i-n;for(r=e;r<o;++r)t[r]=t[r+n];t.length=o}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o="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},a=n(230),s=r(a),u=n(232),c=r(u),h=n(280),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(h),f=n(185),d=r(f),p=/(#[\w-]+)?$/,g=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;i(this,t),this.baseUrl=n,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,n){return e._loadResource(t,n)},this._queue=l.queue(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new s.default,this.onError=new s.default,this.onLoad=new s.default,this.onStart=new s.default,this.onComplete=new s.default}return t.prototype.add=function(t,e,n,r){if(Array.isArray(t)){for(var i=0;i<t.length;++i)this.add(t[i]);return this}if("object"===("undefined"===typeof t?"undefined":o(t))&&(r=e||t.callback||t.onComplete,n=t,e=t.url,t=t.name||t.key||t.url),"string"!==typeof e&&(r=n,n=e,e=t),"string"!==typeof e)throw new Error("No url passed to add resource to loader.");if("function"===typeof n&&(r=n,n=null),this.loading&&(!n||!n.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new d.default(t,e,n),"function"===typeof r&&this.resources[t].onAfterMiddleware.once(r),this.loading){for(var a=n.parentResource,s=[],u=0;u<a.children.length;++u)a.children[u].isComplete||s.push(a.children[u]);var c=a.progressChunk*(s.length+1),h=c/(s.length+2);a.children.push(this.resources[t]),a.progressChunk=h;for(var l=0;l<s.length;++l)s[l].progressChunk=h;this.resources[t].progressChunk=h}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause();for(var t in this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},t.prototype.load=function(t){if("function"===typeof t&&this.onComplete.once(t),this.loading)return this;for(var e=100/this._queue._tasks.length,n=0;n<this._queue._tasks.length;++n)this._queue._tasks[n].data.progressChunk=e;return this.loading=!0,this.onStart.dispatch(this),this._queue.resume(),this},t.prototype._prepareUrl=function(t){var e=(0,c.default)(t,{strictMode:!0}),n=void 0;if(n=e.protocol||!e.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var r=p.exec(n)[0];n=n.substr(0,n.length-r.length),-1!==n.indexOf("?")?n+="&"+this.defaultQueryString:n+="?"+this.defaultQueryString,n+=r}return n},t.prototype._loadResource=function(t,e){var n=this;t._dequeue=e,l.eachSeries(this._beforeMiddleware,function(e,r){e.call(n,t,function(){r(t.isComplete?{}:null)})},function(){t.isComplete?n._onLoad(t):(t._onLoadBinding=t.onComplete.once(n._onLoad,n),t.load())},!0)},t.prototype._onComplete=function(){this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),l.eachSeries(this._afterMiddleware,function(n,r){n.call(e,t,r)},function(){t.onAfterMiddleware.dispatch(t),e.progress+=t.progressChunk,e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&(e.progress=100,e._onComplete())},!0)},t}();e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){return function(t,e){if(!t.data)return void e();if(t.xhr&&t.xhrType===s.default.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!==typeof t.data){if(0===t.data.type.indexOf("image")){var n=function(){var n=h.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=n,t.type=s.default.TYPE.IMAGE,t.data.onload=function(){h.revokeObjectURL(n),t.data.onload=null,e()},{v:void 0}}();if("object"===("undefined"===typeof n?"undefined":o(n)))return n.v}}else{var r=t.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return t.data=new Image,t.data.src="data:"+r+";base64,"+c.default.encodeBinary(t.xhr.responseText),t.type=s.default.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}}e.__esModule=!0;var o="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};e.blobMiddlewareFactory=i;var a=n(185),s=r(a),u=n(281),c=r(u),h=window.URL||window.webkitURL},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return c[u]=r,s(u),u++}function i(t){delete c[t]}function o(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}function a(t){if(h)setTimeout(a,0,t);else{var e=c[t];if(e){h=!0;try{o(e)}finally{i(t),h=!1}}}}if(!t.setImmediate){var s,u=1,c={},h=!1,l=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"===typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():l&&"onreadystatechange"in l.createElement("script")?function(){var t=l.documentElement;s=function(e){var n=l.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),f.setImmediate=r,f.clearImmediate=i}}("undefined"===typeof self?"undefined"===typeof t?this:t:self)}).call(e,n(81),n(184))},function(t,e){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(t){n.prototype[t]=function(){return this._defaults.push({fn:t,arguments:arguments}),this}}
vendor: 16,180 bytes, line 1
1),n.prototype._setDefaults=function(t){this._defaults.forEach(function(e){t[e.fn].apply(t,e.arguments)})},t.exports=n},function(t,e,n){function r(){}function i(t){if(!g(t))return t;var e=[];for(var n in t)o(e,n,t[n]);return e.join("&")}function o(t,e,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){o(t,e,n)});else if(g(n))for(var r in n)o(t,e+"["+r+"]",n[r]);else t.push(encodeURIComponent(e)+"="+encodeURIComponent(n));else null===n&&t.push(encodeURIComponent(e))}function a(t){for(var e,n,r={},i=t.split("&"),o=0,a=i.length;o<a;++o)e=i[o],n=e.indexOf("="),-1==n?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function s(t){for(var e,n,r,i,o=t.split(/\r?\n/),a={},s=0,u=o.length;s<u;++s)n=o[s],-1!==(e=n.indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),i=v(n.slice(e+1)),a[r]=i);return a}function u(t){return/[\/+]json\b/.test(t)}function c(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"===typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.header=this.headers=s(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function h(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t=null,e=null;try{e=new c(n)}catch(e){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=e,n.xhr?(t.rawResponse="undefined"==typeof n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",e);var r;try{n._isResponseOK(e)||(r=new Error(e.statusText||"Unsuccessful HTTP response"))}catch(t){r=t}r?(r.original=t,r.response=e,r.status=e.status,n.callback(r,e)):n.callback(null,e)})}function l(t,e,n){var r=y("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}var f;"undefined"!==typeof window?f=window:"undefined"!==typeof self?f=self:(console.warn("Using browser-only version of superagent in non-browser environment"),f=this);var d=n(313),p=n(618),g=n(282),_=n(619),m=n(616),y=e=t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1==arguments.length?new e.Request("GET",t):new e.Request(t,n)};e.Request=h,y.getXHR=function(){if(!(!f.XMLHttpRequest||f.location&&"file:"==f.location.protocol&&f.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw Error("Browser-only version of superagent could not find XHR")};var v="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};y.serializeObject=i,y.parseString=a,y.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},y.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},y.parse={"application/x-www-form-urlencoded":a,"application/json":JSON.parse},_(c.prototype),c.prototype._parseBody=function(t){var e=y.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&u(this.type)&&(e=y.parse["application/json"]),e&&t&&(t.length||t instanceof Object)?e(t):null)},c.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot "+e+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=e,i.url=n,i},y.Response=c,d(h.prototype),p(h.prototype),h.prototype.type=function(t){return this.set("Content-Type",y.types[t]||t),this},h.prototype.accept=function(t){return this.set("Accept",y.types[t]||t),this},h.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===typeof e&&null!==e&&(n=e,e=""),n||(n={type:"function"===typeof btoa?"basic":"auto"});var r=function(t){if("function"===typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,r)},h.prototype.query=function(t){return"string"!=typeof t&&(t=i(t)),t&&this._query.push(t),this},h.prototype.attach=function(t,e,n){if(e){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},h.prototype._getFormData=function(){return this._formData||(this._formData=new f.FormData),this._formData},h.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},h.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},h.prototype.buffer=h.prototype.ca=h.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},h.prototype.pipe=h.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},h.prototype._isHost=function(t){return t&&"object"===typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},h.prototype.end=function(t){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||r,this._finalizeQueryString(),this._end()},h.prototype._end=function(){var t=this,e=this.xhr=y.getXHR(),n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4==n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.onprogress=r.bind(null,"download"),e.upload&&(e.upload.onprogress=r.bind(null,"upload"))}catch(t){}try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],o=this._serializer||y.serialize[i?i.split(";")[0]:""];!o&&u(i)&&(o=y.serialize["application/json"]),o&&(n=o(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&e.setRequestHeader(a,this.header[a]);return this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send("undefined"!==typeof n?n:null),this},y.agent=function(){return new m},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(t){m.prototype[t.toLowerCase()]=function(e,n){var r=new y.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}}),m.prototype.del=m.prototype.delete,y.get=function(t,e,n){var r=y("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},y.head=function(t,e,n){var r=y("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},y.options=function(t,e,n){var r=y("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},y.del=l,y.delete=l,y.patch=function(t,e,n){var r=y("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},y.post=function(t,e,n){var r=y("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},y.put=function(t,e,n){var r=y("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e,n){"use strict";function r(t){if(t)return i(t)}function i(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}var o=n(282);t.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},r.prototype.parse=function(t){return this._parser=t,this},r.prototype.responseType=function(t){return this._responseType=t,this},r.prototype.serialize=function(t){return this._serializer=t,this},r.prototype.timeout=function(t){if(!t||"object"!==typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var e in t)switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",e)}return this},r.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];r.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!=e.status)return!0;if(t){if(t.code&&~a.indexOf(t.code))return!0;if(t.timeout&&"ECONNABORTED"==t.code)return!0;if(t.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(t,e){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(t,e){n.end(function(n,r){n?e(n):t(r)})})}return this._fullfilledPromise.then(t,e)},r.prototype.catch=function(t){return this.then(void 0,t)},r.prototype.use=function(t){return t(this),this},r.prototype.ok=function(t){if("function"!==typeof t)throw Error("Callback required");return this._okCallback=t,this},r.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},r.prototype.get=function(t){return this._header[t.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(t,e){if(o(t)){for(var n in t)this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},r.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},r.prototype.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(t)){for(var n in t)this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)this.field(t,e[r]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return"boolean"===typeof e&&(e=""+e),this._getFormData().append(t,e),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(t+":"+e));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer "+t)}return this},r.prototype.withCredentials=function(t){return void 0==t&&(t=!0),this._withCredentials=t,this},r.prototype.redirects=function(t){return this._maxRedirects=t,this},r.prototype.maxResponseSize=function(t){if("number"!==typeof t)throw TypeError("Invalid argument");return this._maxResponseSize=t,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(t){var e=o(t),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(e&&o(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(t){return this._sort="undefined"===typeof t||t,this},r.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.substring(e+1).split("&");"function"===typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,e)+"?"+n.join("&")}}},r.prototype._appendQueryString=function(){console.trace("Unsupported")},r.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error(t+e+"ms exceeded");r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},r.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(t,e,n){"use strict";function r(t){if(t)return i(t)}function i(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}var o=n(620);t.exports=r,r.prototype.get=function(t){return this.header[t.toLowerCase()]},r.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=o.type(e);var n=o.params(e);for(var r in n)this[r]=n[r];this.links={};try{t.link&&(this.links=o.parseLinks(t.link))}catch(t){}},r.prototype._setStatusProperties=function(t){var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.redirect=3==e,this.clientError=4==e,this.serverError=5==e,this.error=(4==e||5==e)&&this.toError(),this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.forbidden=403==t,this.notFound=404==t}},function(t,e,n){"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce(function(t,e){var n=e.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(t[r]=i),t},{})},e.parseLinks=function(t){return t.split(/ *, */).reduce(function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t},{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},function(t,e,n){function r(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(615);var o=n(512);
1e.setImmediate=o.setImmediate,e.clearImmediate=o.clearImmediate},function(t,e,n){"use strict";function r(t,e){var n=e.get(t);if(void 0===n)throw new Error("the requested stat is not in the inputs.");return n}n.d(e,"a",function(){return o});var i=n(1),o=function(){return[{output:i.b.CurrentHealth,input:[i.b.HealthPercentage,i.b.MaxHealth],compute:function(t){return r(i.b.HealthPercentage,t)*r(i.b.MaxHealth,t)}},{output:i.b.CurrentMana,input:[i.b.ManaPercentage,i.b.MaxMana],compute:function(t){return r(i.b.ManaPercentage,t)*r(i.b.MaxMana,t)}},{output:i.b.MaxExperience,input:[i.b.Level],compute:function(t){var e=r(i.b.Level,t);return e<4?10*e:4===e?60+20*(e-1):e>4&&e<=10?Math.round(150*e-460):e>10&&e<24?Math.round(160*Math.exp(.2*e)):Math.round(10*Math.exp(.32*e))}},{output:i.b.PhysicalDamageReduce,input:[i.b.Armor,i.b.Level],compute:function(t){var e=r(i.b.Armor,t);return e/(e+100*r(i.b.Level,t))}}]}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(32),i=n(285),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDamageFactor=function(){return r.O},e.prototype.getDamageDistance=function(){return r.P},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(287),i=n(32),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDamageFactor=function(){return i.Q},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(61),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n){var r=t.call(this,e)||this;return r._duration=n,r}return i(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){},e.prototype.updateAction=function(){},e.prototype.endAction=function(){},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(61),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n){var r=t.call(this,e)||this;return r._duration=n,r}return i(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){this.character.animationController.playState("idle")},e.prototype.updateAction=function(){},e.prototype.endAction=function(){},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r=n(61),i=n(1),o=n(78),a=n(15),s=n(32),u=n(660),c=n(28),h=n(62),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(t){function e(e){var n=t.call(this,e)||this;return n._lastDamageTime=Number.MIN_VALUE,n._scaleEffect={stat:i.b.Scale,type:i.d.Absolute,value:0},n.statModifiers.push(n._scaleEffect),n}return l(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return s.s},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){this._casterOriginalRotation=this.character.rotationController.characterRotation,this.character.animationController.playState("idle"),this._effect=new u.a(this.character),this._sound=this.character.level.soundManager.createSound("whirl",!0,!0)},e.prototype.updateAction=function(){this._timeSinceCreated-this._lastDamageTime>=1e3*s.t&&(this.character.level.combat.dealDamageToRadiusAroundSource({source:this.character,target:this.character,min:this.character.statsController.getStatValue(i.b.MinDamage).final*s.u,max:this.character.statsController.getStatValue(i.b.MaxDamage).final*s.u,attackType:o.a.Spell,damageType:o.b.Physical,fromSpell:a.a.SpinKill},s.v),this._lastDamageTime=this._timeSinceCreated,this.character.team===c.a.Player&&this.character.game.getService(h.a).takeScreenshot(h.b.AMAZING)),this._progress<.1&&
1(this._scaleEffect.value=10*this._progress),this._progress>.9&&(this._scaleEffect.value=.5-(this._progress-1+.1)/.1),this.character.rotationController.characterRotation=this._casterOriginalRotation+18*this._progress*2*Math.PI},e.prototype.endAction=function(){this._effect.dispose(),this.character.rotationController.characterRotation=this._casterOriginalRotation,this._sound&&this.character.level.soundManager.putBackIntoPool("whirl",this._sound)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return p});var r=n(61),i=n(1),o=n(33),a=n(32),s=n(34),u=n(657),c=n(655),h=n(78),l=n(15),f=n(96),d=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(t){function e(e){var n=t.call(this,e)||this;if(!e.targetController.targetCharacter)throw new Error("this spell requires a target character.");return n._target=e.targetController.targetCharacter,n._damageDealt=!1,n}return d(e,t),Object.defineProperty(e.prototype,"duration",{get:function(){return this.character.statsController.getStatValue(i.b.AttackInterval).final},enumerable:!0,configurable:!0}),e.prototype.startAction=function(){var t=this._duration<2?2/this._duration:1;this.character.animationController.playState("smash",t);var e=this.character.equipmentController.equipments.get(s.a.Weapon);e?(this._weaponMesh=e.meshes[0],this._weaponBaseScale=e.meshes[0].scaling.x):this._weaponMesh=null},e.prototype.updateAction=function(){var t=this;if(this._progress>=a.D&&!this._damageDealt){if(!this._target.disposed&&this._target.lifeStateController.state===o.a.Alive){var e=new u.a(this.character.level);new c.a(this.character,this._target,e,function(){t.character.level.combat.dealDamage({source:t.character,target:t._target,min:t.character.statsController.getStatValue(i.b.MinDamage).final*a.E,max:t.character.statsController.getStatValue(i.b.MaxDamage).final*a.E,attackType:h.a.Spell,damageType:h.b.Physical,fromSpell:l.a.StunAttack}),t.character.game.getService(f.a).shakeStrength+=10,window.setTimeout(function(){t.character.game.getService(f.a).shakeStrength-=10},1e3)})}this._damageDealt=!0}if(this._weaponMesh){var n=2;this._progress<.2?n=1+5*this._progress:this._progress>a.D&&(n=1+(1-this._progress)/(1-a.D)),this._weaponMesh.scaling.set(this._weaponBaseScale*n,this._weaponBaseScale*n,this._weaponBaseScale*n)}},e.prototype.endAction=function(){this._weaponMesh&&this._weaponMesh.scaling.set(this._weaponBaseScale,this._weaponBaseScale,this._weaponBaseScale)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r,i=n(66),o=n(15),a=n(284),s=n(292),u=n(32),c=n(138),h=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Waiting=0]="Waiting",t[t.Warning=1]="Warning",t[t.Interrupted=2]="Interrupted"}(r||(r={}));var l=function(t){function e(e,n,a,s){var u=t.call(this,e,"Shockwave",i.a.Behavior,[],Number.MAX_SAFE_INTEGER,o.a.Shockwave)||this;return u.interval=n,u.warningDuration=a,u.initialDelay=s,u._state=r.Waiting,u._lastTimeMark=1e3*(-n+s),u}return h(e,t),e.prototype.startBuff=function(){},e.prototype.updateBuff=function(t){switch(this._state){case r.Waiting:if(this._timeSinceCreated-this._lastTimeMark>=1e3*this.interval&&this.character.actionController.activeAction instanceof c.a){this._state=r.Warning,this._lastTimeMark=this._timeSinceCreated;new a.a(this.character,2e3*this.warningDuration).start(),this._warningEffect=new s.a(this.character,this.character.position,this.character.mesh.rotation.y,u.P,1e3*this.warningDuration)}break;case r.Warning:if(this._timeSinceCreated-this._lastTimeMark>=1e3*this.warningDuration)if(this.character.actionController.activeAction instanceof a.a){var e=o.b.getSpell(o.a.BossShockwave);e.cast(this.character),this._state=r.Waiting,this._lastTimeMark=this._timeSinceCreated}else this._state=r.Interrupted;break;case r.Interrupted:this.character.actionController.activeAction instanceof c.a&&(this._state=r.Waiting,this._lastTimeMark=this._timeSinceCreated-1e3*this.interval)}},e.prototype.endBuff=function(){},e}(i.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r,i=n(66),o=n(15),a=n(284),s=n(292),u=n(32),c=n(138),h=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Waiting=0]="Waiting",t[t.Warning=1]="Warning",t[t.Interrupted=2]="Interrupted"}(r||(r={}));var l=function(t){function e(e,n,a,s){var u=t.call(this,e,"Stomp",i.a.Behavior,[],Number.MAX_SAFE_INTEGER,o.a.Stomp)||this;return u.interval=n,u.warningDuration=a,u.initialDelay=s,u._state=r.Waiting,u._lastTimeMark=1e3*(-n+s),u}return h(e,t),e.prototype.startBuff=function(){},e.prototype.updateBuff=function(t){switch(this._state){case r.Waiting:if(this._timeSinceCreated-this._lastTimeMark>=1e3*this.interval&&this.character.actionController.activeAction instanceof c.a){this._state=r.Warning,this._lastTimeMark=this._timeSinceCreated;new a.a(this.character,2e3*this.warningDuration).start(),new s.b(this.character,this.character.position,this.character.boundingRadius+u.S,1e3*this.warningDuration)}break;case r.Warning:if(this._timeSinceCreated-this._lastTimeMark>=1e3*this.warningDuration)if(this.character.actionController.activeAction instanceof a.a){var e=o.b.getSpell(o.a.BossStomp);e.cast(this.character),this._state=r.Waiting,this._lastTimeMark=this._timeSinceCreated}else this._state=r.Interrupted;break;case r.Interrupted:this.character.actionController.activeAction instanceof c.a&&(this._state=r.Waiting,this._lastTimeMark=this._timeSinceCreated-1e3*this.interval)}},e.prototype.endBuff=function(){},e}(i.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(66),i=n(289),o=n(32),a=n(15),s=n(1),u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(t){function e(e,n,i,o){var s=t.call(this,e,"Strong",r.a.Behavior,[],Number.MAX_SAFE_INTEGER,a.a.Strong)||this;return s.interval=n,s.duration=i,s.initialDelay=o,s._lastTimeMark=1e3*(-n+o),s}return u(e,t),e.prototype.startBuff=function(){this.character.statsController.setBaseStat(s.b.Scale,.5)},e.prototype.updateBuff=function(t){this._timeSinceCreated-this._lastTimeMark>=1e3*this.interval&&(this._lastTimeMark=this._timeSinceCreated,this.cast())},e.prototype.endBuff=function(){},e.prototype.cast=function(){var t=this.character.statsController.getStatValue(s.b.Level).final<10,e=t?o._0:o._1,n=t?o._2:o._3,r=new i.a(this.character,e,n,o._4,this.duration,o._5,o._6);this.character.buffController.addBuff(r)},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n(66),i=n(1),o=n(28),a=n(33),s=n(15),u=n(288),c=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(t){function e(e,n,i,o,a){var u=t.call(this,e,"Summon",r.a.Behavior,[],Number.MAX_SAFE_INTEGER,s.a.Clone)||this;return u.interval=n,u.initialDelay=i,u.creepBaseStats=o,u.creepBehavior=a,u._lastTimeMark=1e3*(-n+i),u._wavesSummoned=0,u._lastWave=[],u}return c(e,t),e.prototype.startBuff=function(){var t=this;this.character.events.on("died",function(){t._lastWave.forEach(function(t){t.active&&t.lifeStateController.state===a.a.Alive&&t.statsController.setBaseStat(i.b.HealthPercentage,0)})})},e.prototype.updateBuff=function(t){this._timeSinceCreated-this._lastTimeMark>=1e3*this.interval&&this._lastWave.every(function(t){return!t.active})&&!(this.character.actionController.activeAction instanceof u.a)&&(this._lastTimeMark=this._timeSinceCreated,this.summon())},e.prototype.endBuff=function(){},e.prototype.summon=function(){var t=3;1===this._wavesSummoned?t=4:this._wavesSummoned>=2&&(t=5);var e=this.character.level.player;this._lastWave=[];for(var n=0;n<t;++n){var r={modelId:this.character.config.modelId,team:o.a.SummonnedByMonsters,baseStats:this.creepBaseStats,position:new BABYLON.Vector3(e.position.x+(e.boundingRadius+160)*Math.sin(n/t*Math.PI*2),0,e.position.z+(e.boundingRadius+160)*Math.cos(n/t*Math.PI*2)),postActivate:this.creepBehavior,dropItem:function(){return null}},i=this.character.level.createAndActivateCharacter(r);this._lastWave.push(i)}},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n(66),i=n(32),o=n(1),a=n(78),s=n(15),u=n(652),c=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(t){function e(e){var n=t.call(this,e,"Burn!",r.a.Buff,[],i.K,s.a.Burn)||this;return n._lastDamageTime=Number.MIN_VALUE,n}return c(e,t),e.prototype.startBuff=function(){this._effect=new u.a(this.character),this.character.level.soundManager.playOnce("magic_2")},e.prototype.updateBuff=function(t){this._timeSinceCreated-this._lastDamageTime>=1e3*i.L&&(this.character.level.combat.dealDamageToRadiusAroundSource({source:this.character,target:this.character,min:this.character.statsController.getStatValue(o.b.MinDamage).final*i.M,max:this.character.statsController.getStatValue(o.b.MaxDamage).final*i.M,attackType:a.a.Spell,damageType:a.b.Earth,fromSpell:s.a.Burn},i.N),this._lastDamageTime=this._timeSinceCreated)},e.prototype.endBuff=function(){this._effect.dispose()},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(66),i=n(32),o=n(1),a=n(28),s=n(15),u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(t){function e(e){var n=t.call(this,e,"Clone!",r.a.Buff,[],i.w,s.a.Clone)||this;return n._clonedCharacters=[],n}return u(e,t),e.prototype.startBuff=function(){var t=this;this.character.level.soundManager.playOnce("magic_1");for(var e=this.character.level.cache.getItem("cloned_character_material",function(t){var e=new BABYLON.StandardMaterial("cloned_character_material",t.scene);return e.diffuseTexture=t.modelManager.textureManager.getTexture("atlas"),e.emissiveColor=new BABYLON.Color3(13/255,71/255,161/255),e.useEmissiveAsIllumination=!0,e.freeze(),e}),n=this,r=0;r<i.y;++r)!function(r){var s=new Map;
1n.character.game.getService(o.a).baseStats.forEach(function(e){var n=t.character.statsController.getStatValue(e).final;e===o.b.DamageFactor?s.set(e,n*i.x):s.set(e,n)});var u=new BABYLON.Vector3(2*n.character.boundingRadius*Math.sin(n.character.rotationController.characterRotation),0,2*n.character.boundingRadius*Math.cos(n.character.rotationController.characterRotation)),c=n.character.level.createAndActivateCharacter({baseStats:s,modelId:n.character.config.modelId,position:n.character.position.add(u),team:a.a.SummonnedByPlayer,postActivate:function(){}});n.character.equipmentController.equipments.forEach(function(t){c.equipmentController.equip({baseModel:t.item.baseModel,itemLevel:t.item.itemLevel,sellResource1:0,sellResource2:0,rarity:t.item.rarity,statOverrides:t.item.statOverrides,statModifiers:[]})}),n._clonedCharacters.push(c),c.meshInfo.meshWithSkeleton&&(c.meshInfo.meshWithSkeleton.material=e)}()},e.prototype.updateBuff=function(t){},e.prototype.endBuff=function(){var t=this;this._clonedCharacters.forEach(function(e){e.meshInfo.meshWithSkeleton&&(e.meshInfo.meshWithSkeleton.material=e.level.modelManager.atlasMaterial),t.character.level.characterPool.add(e.config.modelId,e)})},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(66),i=n(1),o=n(15),a=n(52),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function e(e){return t.call(this,e,"Playing With Friends",r.a.Buff,[{stat:i.b.DamageFactor,type:i.d.Absolute,value:a.f},{stat:i.b.AttackInterval,type:i.d.Percentage,value:-a.g},{stat:i.b.Scale,type:i.d.Percentage,value:a.h}],Number.MAX_SAFE_INTEGER,o.a.PlayingWithFriends)||this}return s(e,t),e.prototype.startBuff=function(){},e.prototype.updateBuff=function(t){},e.prototype.endBuff=function(){},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r=n(66),i=n(1),o=n(15),a=n(77),s=n(7),u=n(2),c=n(23),h=n(17),l=n(13),f=n(31),d=n(43),p=n(16),g=n(79),_=n(62),m=n(297),y=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(t){function e(e){return t.call(this,e,"Coins!",r.a.Buff,[],a.q,o.a.Empty)||this}return y(e,t),e.prototype.startBuff=function(){var t=this;p.a.logEvent("super_coin_creep_spawned",new Map([["island_level",this.character.level.index.toFixed()]]),null),this.character.statsController.setBaseStat(i.b.Scale,1.6),this.character.statsController.setBaseStat(i.b.Resource1DropProbability,1);var e=this.character.statsController.getStatValue(i.b.Resource1).original*a.r,n=this.character.statsController.getStatValue(i.b.Resource1).original*a.s;this.character.statsController.setBaseStat(i.b.Resource1,n),this._pixiLayer=this.character.game.getService(f.a),this._countdownText=new h.a(this.character.game,"",l.a,h.b.Center,{strokeThickness:4}),this._countdown=new s.b(this.character.game,[new u.a(this.character.game,[new u.a(this.character.game,[new d.a(this.character.game,3*this._pixiLayer.unitSize)],{paddingTop:"50%",paddingLeft:"50%"}),new c.a(this.character.game,"coin_single")],{preferredHeight:"100%",preferredWidth:"100h",forceSquare:!0}),new u.a(this.character.game,[this._countdownText])],{crossDirectionAlign:u.d.Center}),this._countdown.ensureConstructed(),this._countdown.resize(2*this._pixiLayer.unitSize,this._pixiLayer.unitSize),this._pixiLayer.gameLayer.addChild(this._countdown.element),this._onHit=function(){for(var n=e,r=0;n>15;)new m.b(t.character,r*Math.random()*100,10,2),n-=10,r++;for(var i=0;i<n;++i)new m.b(t.character,r*Math.random()*100),r++},this.character.events.on("received_damage",this._onHit),this.character.events.once("died",function(){t._countdown&&t._countdown.dispose(),Math.sqrt(Math.pow(t.character.position.x-g.b,2)+Math.pow(t.character.position.z-g.b,2))<=1.2*g.c&&(t.character.game.getService(_.a).takeScreenshot(_.b.AMAZING,800),p.a.logEvent("super_coin_creep_killed",new Map([["island_level",t.character.level.index.toFixed()]]),null))})},e.prototype.updateBuff=function(t){this._countdown&&(this._countdown.element.position.set(this.character.statBar.container.position.x-this._pixiLayer.unitSize,this.character.statBar.container.position.y-1.5*this._pixiLayer.unitSize),this._countdownText.text=""+this.remainingDuration.toFixed(1))},e.prototype.endBuff=function(){this._countdown&&this._countdown.dispose(),this.character.events.off("received_damage",this._onHit);var t=Math.random()*Math.PI*2;this.character.moveController.targetPosition=new BABYLON.Vector3(g.b+g.b*Math.sin(t),0,g.b+g.b*Math.cos(t))},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return g});var r=n(138),i=n(33),o=n(15),a=n(625),s=n(32),u=n(68),c=n(30),h=n(653),l=n(28),f=n(288),d=n(656),p=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(t){function e(e){var n=t.call(this,e)||this;return n._character.events.on("received_damage",function(t){n.onReceiveDamage(t)}),n}return p(e,t),e.prototype.activateComponent=function(){this._activeAction=null},e.prototype.deactivateComponent=function(){this._activeAction&&this._activeAction.end(),this._activeAction=null},e.prototype.updateComponent=function(t){if(this._character.level.state===u.a.Started){if(this._character.lifeStateController.state!==i.a.Alive)return void(this._activeAction&&this._activeAction.end());if(this._activeAction)return void this._activeAction.update(t);if(!this._character.moveController.targetPosition&&this._character.targetController.targetCharacter&&this._character.targetController.isTargetInAttackRange){this._character.rotationController.rotateTo(Math.atan2(this._character.targetController.targetCharacter.position.x-this._character.position.x,this._character.targetController.targetCharacter.position.z-this._character.position.z)),this._character.moveController.movingDirection.x=0,this._character.moveController.movingDirection.z=0;var e=new r.a(this._character,this._character.targetController.targetCharacter);this.activeAction=e}}},e.prototype.disposeComponent=function(){},Object.defineProperty(e.prototype,"activeAction",{get:function(){return this._activeAction},set:function(t){this._activeAction=t},enumerable:!0,configurable:!0}),e.prototype.onReceiveDamage=function(t){if((this._character.teamGroup===l.b.Monsters||this._character===this._character.level.player&&this._character.level.enemySpawner.bossSpawned)&&new h.a(this._character),t.fromSpell===o.a.Smash){if(!this._character.actionController.activeAction||this._character.actionController.activeAction instanceof r.a){var e=new a.a(this._character,s.U);e.start()}new d.a(this._character,t.source,s.U,s.V)}if(t.fromSpell===o.a.Stomp){var n=s.W+s.X*Math.random();if(!this._character.actionController.activeAction||this._character.actionController.activeAction instanceof r.a){var e=new a.a(this._character,s.Y);e.start()}new d.a(this._character,t.source,s.Y,n)}if(t.fromSpell===o.a.StunAttack){new f.a(t.target,s.Z).start()}},e}(c.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}
1);var r=n(30),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n){var r=t.call(this,e)||this;return r._config=n,r._currentStateName=null,r._skeleton=r._character.mesh.getChildMeshes(!0)[0].getChildMeshes(!0)[0].skeleton,r}return i(e,t),e.prototype.playState=function(t,e){var n=this;void 0===e&&(e=1);var r=this._config[t];if(t!==this._currentStateName&&(null===this._currentStateName||this._config[this._currentStateName].defendingPriority<=r.offendingPriority)){this._currentStateName=t;var i=this.getAnimationFramesInfo(this._config[t].type);this._character.level.scene.beginAnimation(this._skeleton,i.firstFrame,i.lastFrame,!1,i.baseSpeed*e,function(){n.onCurrentStateEnd(t)})}},Object.defineProperty(e.prototype,"currentState",{get:function(){return this._currentStateName},enumerable:!0,configurable:!0}),e.prototype.activateComponent=function(){this.playState("idle")},e.prototype.deactivateComponent=function(){},e.prototype.updateComponent=function(t){},e.prototype.disposeComponent=function(){},e.prototype.onCurrentStateEnd=function(t){if(!this.disposed&&t===this._currentStateName){var e=this._config[t].transitionToState;this._currentStateName=null,null!==e&&this.playState(e)}},e.prototype.getAnimationFramesInfo=function(t){var e=this._character.meshInfo.animations.get(t);if(!e)throw new Error("the specified animation type does not exist.");return e},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(30),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(n){var r=this,i=e.prepareTemplate(n);return r=t.call(this,n)||this,r._mesh=i.createInstance("bounding_box_"+n.id),r._mesh.setEnabled(!1),r}return i(e,t),e.prototype.activateComponent=function(){this._mesh.setEnabled(!0),this.refreshTransform()},e.prototype.deactivateComponent=function(){this._mesh.setEnabled(!1)},e.prototype.updateComponent=function(t){this.refreshTransform()},e.prototype.disposeComponent=function(){this._mesh.dispose()},e.prototype.refreshTransform=function(){this._mesh.scaling.set(this._character.boundingRadius/50,this._character.height/100,this._character.boundingRadius/50),this._mesh.position.set(this._character.position.x,this._character.position.y+this._character.height/2,this._character.position.z)},e.prepareTemplate=function(t){return t.level.cache.getItem("bounding_box_template",function(e){var n=t.level.cache.getItem("bounding_box_material",function(e){var n=new BABYLON.StandardMaterial("bounding_box_material",t.level.scene);return n.alpha=.7,n.diffuseColor=new BABYLON.Color3(.5,.5,.5),n.freeze(),n}
1),r=BABYLON.MeshBuilder.CreateCylinder("bounding_box_template",{diameter:100,height:100},t.level.scene);return r.material=n,r.setEnabled(!1),r})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(30),i=n(28),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n._buffs=[],n}return o(e,t),e.prototype.endAllBuffs=function(){this.forEachActiveBuff(function(t){t.end()}),this._buffs=[]},e.prototype.activateComponent=function(){},e.prototype.deactivateComponent=function(){this.endAllBuffs()},e.prototype.updateComponent=function(t){this._buffs.forEach(function(e){e.isEnded||e.update(t)})},e.prototype.disposeComponent=function(){this._buffs.forEach(function(t){t.end()})},e.prototype.forEachActiveBuff=function(t){this._buffs.forEach(function(e){e.isEnded||t(e)})},e.prototype.addBuff=function(t){this._buffs.push(t),this._character.events.emit("buff_added",t),this._character.team===i.a.Player&&this._character.game.events.emit("player_buff_added",t)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r,i=n(52),o=n(1),a=n(30),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.OutOfCombat=0]="OutOfCombat",t[t.InCombat=1]="InCombat"}(r=r||(r={}));var u=function(t){function e(e){var n=t.call(this,e)||this;return n._combatState=r.OutOfCombat,n._lastCombatTimePassed=0,n._character.events.on("attempted_damage",function(){n._combatState=r.InCombat,n._lastCombatTimePassed=0}),n._character.events.on("received_damage",function(){n._combatState=r.InCombat,n._lastCombatTimePassed=0}),n}return s(e,t),e.prototype.activateComponent=function(){},e.prototype.deactivateComponent=function(){this._combatState=r.OutOfCombat,this._lastCombatTimePassed=0},e.prototype.updateComponent=function(t){switch(this._combatState){case r.OutOfCombat:if(!this._character.level.enemySpawner.bossSpawned){var e=this._character.statsController.getStatValue(o.b.HealthPercentage),n=t/1e3/this._character.statsController.getStatValue(o.b.NonCombatHealTime).final;this._character.statsController.setBaseStat(o.b.HealthPercentage,Math.min(1,e.original+n))}break;case r.InCombat:this._lastCombatTimePassed>=1e3*i.n?this._combatState=r.OutOfCombat:this._lastCombatTimePassed+=t}},e.prototype.disposeComponent=function(){},Object.defineProperty(e.prototype,"combatState",{get:function(){return this._combatState},enumerable:!0,configurable:!0}),e}(a.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(30),i=n(24),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n._cooldowns=new Map,n}return o(e,t),e.prototype.activateComponent=function(){},e.prototype.deactivateComponent=function(){this._cooldowns=new Map},e.prototype.updateComponent=function(t){this._cooldowns.forEach(function(e){var n=e.remaining-t/1e3;e.remaining=Math.max(n,0)})},e.prototype.disposeComponent=function(){},e.prototype.triggerSpellCooldown=function(t){this.game.config.getBooleanConfig(i.a.disable_cooldown)||this._cooldowns.set(t.id,{remaining:t.cooldown,total:t.cooldown})},Object.defineProperty(e.prototype,"cooldowns",{get:function(){return this._cooldowns},enumerable:!0,configurable:!0}),e.prototype.getSpellCooldown=function(t){return this._cooldowns.get(t)||{remaining:0,total:1}},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(1),i=n(30),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(n){var r=this,i=e.prepareTemplate(n);return r=t.call(this,n)||this,r._mesh=i.createInstance("fake_shadow_"+n.id),r._mesh.rotation.x=Math.PI/2,r._mesh.setEnabled(!1),r}return o(e,t),e.prototype.activateComponent=function(){this._mesh.setEnabled(!0),this.refreshShadowTransform()},e.prototype.deactivateComponent=function(){this._mesh.setEnabled(!1)},e.prototype.updateComponent=function(t){this.refreshShadowTransform()},e.prototype.disposeComponent=function(){this._mesh.dispose()},e.prototype.refreshShadowTransform=function(){var t=.8*(this._character.boundingRadius+.3*this._character.position.y);this._mesh.position.x=this._character.position.x-t,this._mesh.position.z=this._character.position.z;var e=60/512*this._character.statsController.getStatValue(r.b.Scale).final;this._mesh.scaling.set(1.5*e,1.45*e,e)},e.prepareTemplate=function(t){return t.level.cache.getItem("fake_shadow_template",function(e){var n=t.level.cache.getItem("fake_shadow_material",function(e){var n=new BABYLON.StandardMaterial("material_fake_shadow",t.level.scene);return n.diffuseTexture=t.level.modelManager.textureManager.getTexture("shadow"),n.diffuseTexture.hasAlpha=!0,n.useAlphaFromDiffuseTexture=!0,n.freeze(),n}
1),r=BABYLON.MeshBuilder.CreatePlane("fake_shadow_template",{width:512,height:512},t.level.scene);return r.material=n,r.setEnabled(!1),r})},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(1),i=n(30),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n._lastHealTime=0,n}return o(e,t),e.prototype.activateComponent=function(){this._lastHealTime=0},e.prototype.deactivateComponent=function(){},e.prototype.updateComponent=function(t){this._timeSinceCreated-this._lastHealTime>=1e3&&(this.healOnce(),this._lastHealTime=this._timeSinceCreated)},e.prototype.disposeComponent=function(){},e.prototype.healOnce=function(){var t=this._character.statsController.getStatValue(r.b.HealPerSecond).final;if(0!==t){var e=this._character.statsController.getStatValue(r.b.HealthPercentage),n={original:Math.min(1,Math.max(0,e.original+t)),final:Math.min(1,Math.max(0,e.final+t))};this._character.statsController.setBaseStat(r.b.HealthPercentage,n.original)}},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return p});var r=n(283),i=n(1),o=n(654),a=n(30),s=n(28),u=n(15),c=n(187),h=n(9),l=n(13),f=n(16),d=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.activateComponent=function(){},e.prototype.deactivateComponent=function(){},e.prototype.updateComponent=function(t){if(this._character.team===s.a.Player){this._character.statsController.getStatValue(i.b.CurrentExperience).final>=this._character.statsController.getStatValue(i.b.MaxExperience).final&&this.levelUp()}},e.prototype.disposeComponent=function(){},e.prototype.levelUp=function(){var t=this;new o.a(this._character);var e=this._character.statsController.getStatValue(i.b.Level).original,a=e+1;n.i(r.a)(a).forEach(function(e,n){t._character.statsController.setBaseStat(n,e)}),this._character.statsController.setBaseStat(i.b.Level,a),this._character.statsController.setBaseStat(i.b.CurrentExperience,0),this._character.statsController.setBaseStat(i.b.HealthPercentage,1),this._character.events.emit("level_up",a),this._character===this._character.level.player&&this._character.game.events.emit("player_level_up",a),new c.a(this._character,"Lv. "+a+"!",!0,l.c,500),u.b.listSpells().forEac
1h(function(e){e.levelRequirement===a&&(t._character.events.emit("unlocked_spell",e),t.game.getService(h.a).spellSlots[e.slot]===u.a.Empty&&t.game.getService(h.a).setSpellSlot(e.slot,e.id),t._character.team===s.a.Player&&t._character.game.events.emit("player_unlocked_spell",e))}),f.a.logEvent("player_level_up",new Map([["reach_new_playerlevel",a.toFixed()]]),null)},e}(a.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r,i=n(1),o=n(33),a=n(68),s=n(30),u=n(28),c=n(52),h=n(79),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Idle=0]="Idle",t[t.InAction=1]="InAction",t[t.MovingToTargetCharacter=2]="MovingToTargetCharacter",t[t.MovingToTargetPosition=3]="MovingToTargetPosition",t[t.HoldingAtTargetPosition=4]="HoldingAtTargetPosition"}(r||(r={}));var f=function(t){function e(e){var n=t.call(this,e)||this;return n._state=r.Idle,n._targetPosition=null,n._movingDirection=BABYLON.Vector3.Zero(),n._lastFootStepTime=0,n._tempTargetPosVec=BABYLON.Vector3.Zero(),n}return l(e,t),e.prototype.activateComponent=function(){this._state=r.Idle,this._lastStateSwitchTime=this._timeSinceCreated},e.prototype.deactivateComponent=function(){this._targetPosition=null,this._movingDirection.set(0,0,0),this._state=r.Idle},e.prototype.updateComponent=function(t){if(this._character.level.state===a.a.Started&&this._character.lifeStateController.state===o.a.Alive)switch(this._state){case r.Idle:this._character.actionController.activeAction?this.switchState(r.InAction,t):this._targetPosition?(this.switchState(r.MovingToTargetPosition,t),this.moveTowardsTargetPosition(t)):this._character.targetController.hasTarget&&!this._character.targetController.isTargetInAttackRange&&this.switchState(r.MovingToTargetCharacter,t);break;case r.InAction:this._character.actionController.activeAction||this.switchState(r.Idle,t);break;case r.MovingToTargetPosition:this._character.actionController.activeAction?this.switchState(r.InAction,t):this._targetPosition?(this.moveTowardsTargetPosition(t),this._character.position.equals(this._targetPosition)&&(Math.sqrt(Math.pow(this._character.position.x-h.b,2)+Math.pow(this._character.position.z-h.b,2))>h.c+300?this._character.statsController.setBaseStat(i.b.HealthPercentage,0):this.switchState(r.HoldingAtTargetPosition,t))):this.switchState(r.Idle,t);break;case r.MovingToTargetCharacter:this._character.actionController.activeAction?this.switchState(r.InAction,t):this._targetPosition?this.switchState(r.MovingToTargetPosition,t):!this._character.targetController.hasTarget||this._character.targetController.isTargetInAttackRange?this.switchState(r.Idle,t):this.moveTowardsTargetCharacter(t);break;case r.HoldingAtTargetPosition:if(this._character.actionController.activeAction)this.switchState(r.InAction,t);else if(this._targetPosition)this.switchState(r.MovingToTargetPosition,t),this.moveTowardsTargetPosition(t);else if(this._timeSinceCreated-this._lastStateSwitchTime>=c.o)this.switchState(r.Idle,t);else if(this._character.targetController.hasTarget){var e=this._character.targetController.targetCharacter;this._tempTargetPosVec.x=e.position.x-this._character.position.x,this._tempTargetPosVec.y=0,this._tempTargetPosVec.z=e.position.z-this._character.position.z,this._tempTargetPosVec.normalize(),this._character.rotationController.rotateTo(Math.atan2(this._tempTargetPosVec.x,this._tempTargetPosVec.z))}}},e.prototype.disposeComponent=function(){},e.prototype.clearHoldingState=function(){this._state===r.HoldingAtTargetPosition&&this.switchState(r.Idle,0)},Object.defineProperty(e.prototype,"targetPosition",{get:function(){return this._targetPosition},set:function(t){this._targetPosition=t,t&&this._character.actionController.activeAction&&(this._character.actionController.activeAction.end(),this._character.actionController.activeAction=null)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isMoving",{get:function(){return 0!==this._movingDirection.x||0!==this._movingDirection.z},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"movingDirection",{get:function(){return this._movingDirection},enumerable:!0,configurable:!0}),e.prototype.switchState=function(t,e){if(this._state!==t)switch(this._state=t,this._lastStateSwitchTime=this._timeSinceCreated,t){case r.Idle:this._movingDirection.x=0,this._movingDirection.z=0,this._character.animationController.playState("idle");break;case r.MovingToTargetPosition:this.moveTowardsTargetPosition(e);break;case r.MovingToTargetCharacter:this.moveTowardsTargetCharacter(e);break;case r.HoldingAtTargetPosition:this._targetPosition=null,this._character.team===u.a.Player&&(this._character.level.moveTargetIndicator.clearTarget(),this._movingDirection.x=0,this._movingDirection.z=0,this._character.animationController.playState("idle"))}},e.prototype.moveTowardsTargetPosition=function(t){this._targetPosition&&this.moveTowardsPoint(t,this._targetPosition.x,this._targetPosition.z)&&this._character.targetController.findTarget()},e.prototype.moveTowardsTargetCharacter=function(t){this._character.targetController.targetCharacter&&this.moveTowardsPoint(t,this._character.targetController.targetCharacter.position.x,this._character.targetController.targetCharacter.position.z)},e.prototype.moveTowardsPoint=function(t,e,n){this._tempTargetPosVec.set(e,0,n);var r=this._character.statsController.getStatValue(i.b.MoveSpeed).final;"run"!==this._character.animationController.currentState&&this._character.animationController.playState("run"),this._character.team===u.a.Player&&this._timeSinceCreated-this._lastFootStepTime>68e3/r&&(this._character.level.soundManager.playOnce("footstep"),this._lastFootStepTime=this._timeSinceCreated),this._movingDirection.x=this._tempTargetPosVec.x-this._character.position.x,this._movingDirection.z=this._tempTargetPosVec.z-this._character.position.z,this._movingDirection.normalize(),this._character.rotationController.rotateTo(Math.atan2(this._movingDirection.x,this._movingDirection.z));var o=r*(t/1e3);if(o<BABYLON.Vector3.Distance(this._character.position,this._tempTargetPosVec)){var a=this._character.position.x+this._movingDirection.x*o,s=this._character.position.z+this._movingDirection.z*o;return this._character.team===u.a.Player&&Math.sqrt(Math.pow(a-h.b,2)+Math.pow(s-h.b,2))>h.c+50?(this._character.moveController.targetPosition=null,this._character.targetController.findTarget(),!1):(this._character.position.x=a,this._character.position.z=s,!1)}return this._character.position.x=this._tempTargetPosVec.x,this._character.position.z=this._tempTargetPosVec.z,!0},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(33),i=n(30),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=2*Math.PI,s=function(t){function e(e){var n=t.call(this,e)||this;return n._characterRotation=0,n._targetCharacterRotation=0,n}return o(e,t),e.prototype.activateComponent=function(){},e.prototype.deactivateComponent=function(){this._characterRotation=0,this._targetCharacterRotation=0},e.prototype.updateComponent=function(t){this._character.lifeStateController.state===r.a.Alive&&(this.updateRotate(t),this._character.mesh.rotation.y=this._characterRotation)},e.prototype.disposeComponent=function(){},Object.defineProperty(e.prototype,"characterRotation",{get:function(){return this._characterRotation},set:function(t){this._characterRotation=t,this._targetCharacterRotation=t},enumerable:!0,configurable:!0}),e.prototype.rotateTo=function(t){this._targetCharacterRotation=t},e.prototype.updateRotate=function(t){if(this._targetCharacterRotation!==this._characterRotation){this._targetCharacterRotation-this._characterRotation>Math.PI?this._characterRotation+=2*Math.PI:this._characterRotation-this._targetCharacterRotation>Math.PI&&(this._characterRotation-=2*Math.PI);var e=(this._targetCharacterRotation-this._characterRotation)/Math.abs(this._targetCharacterRotation-this._characterRotation),n=a*t/1e3;n>=Math.abs(this._targetCharacterRotation-this._characterRotation)?this._characterRotation=this._targetCharacterRotation:this._characterRotation+=e*n}},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(31),i=n(1),o=n(30),a=n(28),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function e(n){var i=t.call(this,n)||this;i._tempPosVec=BABYLON.Vector3.Zero(),i._identityMatrix=BABYLON.Matrix.Identity();var o=i.game.getService(r.a),a=2*o.unitSize,s=a/7;return e.initializeTextures(i.game,a,s,2),i._container=new PIXI.Sprite(e.containerTexture),i._container.anchor.set(.5,.5),i._container.visible=!1,o.gameLayer.addChild(i._container),i._hpBar=new PIXI.Sprite(e.hpBarTexture),i._container.addChild(i._hpBar),i._hpBar.anchor.set(.5,.5),i._hpBarTotalWidth=i._hpBar.width,i}return s(e,t),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),e.prototype.activateComponent=function(){this._container.visible=!0,this._character.team!==a.a.Player?this._container.scale.set(.5,.5):this._container.scale.set(1,1)},e.prototype.deactivateComponent=function(){this._container.visible=!1},e.prototype.updateComponent=function(){var t=1.5*this._character.height;this._tempPosVec.set(this._character.mesh.position.x,this._character.mesh.position.y+t,this._character.mesh.position.z);var e=BABYLON.Vector3.Project(this._tempPosVec,this._identityMatrix,this._character.level.scene.getTransformMatrix(),this._character.level.scene.activeCamera.viewport.toGlobal(this.game.engine.getRenderWidth(),this.game.engine.getRenderHeight()));this._container.position.x=e.x,this._container.position.y=e.y;var n=this._character.statsController.getStatValue(i.b.HealthPercentage).final;this._hpBar.width=n*this._hpBarTotalWidth,this._hpBar.position.x=-this._hpBarTotalWidth/2*(1-n)},e.prototype.disposeComponent=function(){this._container.destroy(),this._hpBar.destroy()},Object.defineProperty(e.prototype,"visible",{set:function(t){this._container.visible=t},enumerable:!0,configurable:!0}),e.initializeTextures=function(t,n,r,i){if(!e.containerTexture){var o=new PIXI.Graphics;o.beginFill(16777215),o.drawRect(0,0,n,r),o.endFill(),e.containerTexture=o.generateCanvasTexture(),o.destroy();var a=new PIXI.Graphics;a.beginFill(16733986),a.drawRect(i,i,n-2*i,r-2*i),a.endFill(),e.hpBarTexture=a.generateCanvasTexture(),a.destroy()}},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(1),i=n(30),o=n(9),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(t){function e(e){var n=t.call(this,e)||this;return n._engine=n.game.getService(r.a),n}return a(e,t),e.prototype.setBaseStat=function(t,e){this._baseStats.set(t,e),this.game.getService(o.a).setBaseStat(t,e)},e.prototype.getStatValue=function(t){var e=this._statValues.get(t);if(!e)throw new Error("the requested stat has not been computed.");return e},e.prototype.activateComponent=function(){this._baseStats=new Map(this._character.config.baseStats),this._statValues=this._engine.compute(this._character.config.baseStats,this.getAllModifiers())},e.prototype.deactivateComponent=function(){this._baseStats.clear(),this._statValues.clear()},e.prototype.updateComponent=function(t){this._statValues=this._engine.compute(this._baseStats,this.getAllModifiers())},e.prototype.disposeComponent=function(){},e.prototype.getAllModifiers=function(){var t=[];return this._character.buffController.forEachActiveBuff(function(e){e.statModifiers.forEac
1h(function(e){t.push(e)})}),this._character.equipmentController.equipments.forEach(function(e){(e.item.statModifiers||[]).forEach(function(e){t.push(e)})}),this._character.actionController.activeAction&&!this._character.actionController.activeAction.isEnded&&this._character.actionController.activeAction.statModifiers.forEach(function(e){t.push(e)}),t},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(1),i=n(33),o=n(68),a=n(30),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function e(e){var n=t.call(this,e)||this;return n._targetCharacter=null,n}return s(e,t),e.prototype.activateComponent=function(){},e.prototype.deactivateComponent=function(){this._targetCharacter=null},e.prototype.updateComponent=function(t){if(this._character.level.state===o.a.Started)return this._character.lifeStateController.state!==i.a.Alive?void(this.targetCharacter=null):void(this.targetCharacter&&this.targetCharacter.active&&this.targetCharacter.lifeStateController.state===i.a.Alive||this.findTarget())},e.prototype.disposeComponent=function(){},Object.defineProperty(e.prototype,"targetCharacter",{get:function(){return this._targetCharacter},set:function(t){this._targetCharacter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTarget",{get:function(){return!!this._targetCharacter&&(this._targetCharacter.active?this._targetCharacter.lifeStateController.state===i.a.Alive:(this._targetCharacter=null,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isTargetInAttackRange",{get:function(){if(!this._targetCharacter||!this.hasTarget)return!1;var t=this._character.statsController.getStatValue(r.b.AttackRange).final;return BABYLON.Vector3.Distance(this._character.position,this._targetCharacter.position)-this._character.boundingRadius-this._targetCharacter.boundingRadius<=t},enumerable:!0,configurable:!0}),e.prototype.findTarget=function(){var t=this,e=null,n=Number.MAX_VALUE;this._character.level.allCharacters.forEach(function(r){if(r.teamGroup!==t._character.teamGroup&&r.active&&r.lifeStateController.state===i.a.Alive){var o=BABYLON.Vector3.Distance(r.position,t._character.position);o<n&&(n=o,e=r)}}),this.targetCharacter=e},e}(a.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return O});var r=n(67),i=n(648),o=n(24),a=n(647),s=n(646),u=n(637),c=n(640),h=n(642),l=n(638),f=n(645),d=n(1),p=n(649),g=n(33),_=n(650),m=n(641),y=n(643),v=n(290),b=n(28),w=n(30),x=n(639),S=n(48),T=n(644),E=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P={idle:{type:o.b.Idle,transitionToState:"idle",defendingPriority:1,offendingPriority:128},run:{type:o.b.Run,transitionToState:"run",defendingPriority:1,offendingPriority:128},attack1:{type:o.b.Attack1,transitionToState:"idle",defendingPriority:64,offendingPriority:128},attack2:{type:o.b.Attack2,transitionToState:"idle",defendingPriority:64,offendingPriority:128},hit:{type:o.b.Hit,transitionToState:"idle",defendingPriority:1,offendingPriority:32},forcedHit:{type:o.b.Hit,transitionToState:"idle",defendingPriority:128,offendingPriority:128},stunned:{type:o.b.Die,transitionToState:null,defendingPriority:64,offendingPriority:128},die:{type:o.b.Die,transitionToState:null,defendingPriority:256,offendingPriority:256},stomp:{type:o.b.Stomp,transitionToState:"idle",defendingPriority:64,offendingPriority:128},victory1:{type:o.b.Victory1,transitionToState:"victory1",defendingPriority:128,offendingPriority:128},smash:{type:o.b.Smash,transitionToState:"idle",defendingPriority:64,offendingPriority:128},cast:{type:o.b.Cast,transitionToState:"cast",defendingPriority:64,offendingPriority:128}},O=function(t){function e(e,n){var r=t.call(this,e.game)||this;return r._level=e,r.config=n,r._team=n.team,r.createCharacterMesh(),r._mesh.setEnabled(!1),r._statBar=new i.a(r),r._rotationController=new a.a(r),r._moveController=new s.a(r),r._actionController=new u.a(r),r._buffController=new c.a(r),r._cooldownController=new h.a(r),r._animationController=new l.a(r,P),r._levelUpController=new f.a(r),r._statsController=new p.a(r),r._healPerSecondController=new T.a(r),r._equipmentC
1ontroller=new v.a(r),r._lifeStateController=new g.b(r),r._targetController=new _.a(r),r._combatStateController=new m.a(r),S.a.graphics!==S.b.Low&&(r._fakeShadow=new y.a(r)),r.game.config.getBooleanConfig(o.a.show_bounding_box)&&(r._boundingBox=new x.a(r)),r._active=!1,r}return E(e,t),e.prototype.activate=function(){this._team=this.config.team,this._mesh.position.copyFrom(this.config.position),this._mesh.computeWorldMatrix(!0),this._mesh.setEnabled(!0),this._active=!0,this.components.forEach(function(t){t instanceof w.a&&t.activate()}),this._level.allCharacters.push(this),this.config.postActivate(this)},e.prototype.deactivate=function(){for(var t=0;t<this._level.allCharacters.length;++t)if(this._level.allCharacters[t]===this){this._level.allCharacters.splice(t,1);break}this.components.forEach(function(t){t instanceof w.a&&t.deactivate()}),this._active=!1,this._mesh.setEnabled(!1)},e.prototype.isActivated=function(){return this._active},e.prototype.updateGameDisplayObject=function(t){var e=this._statsController.getStatValue(d.b.Scale).final;this._mesh.scaling.x=e,this._mesh.scaling.y=e,this._mesh.scaling.z=e},e.prototype.disposeGameDisplayObject=function(){this._meshInfo.meshWithSkeleton&&this._meshInfo.meshWithSkeleton.skeleton&&this._meshInfo.meshWithSkeleton.skeleton.dispose(),this._mesh&&this._mesh.getChildMeshes(!1).forEach(function(t){t.character=null})},Object.defineProperty(e.prototype,"mesh",{get:function(){return this._mesh},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"team",{get:function(){return this._team},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"teamGroup",{get:function(){return b.c.get(this._team)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"level",{get:function(){return this._level},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"boundingRadius",{get:function(){return this._statsController.getStatValue(d.b.Scale).final*this._meshInfo.boundingRadius},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationController",{get:function(){return this._rotationController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"moveController",{get:function(){return this._moveController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionController",{get:function(){return this._actionController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"buffController",{get:function(){return this._buffController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cooldownController",{get:function(){return this._cooldownController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationController",{get:function(){return this._animationController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statsController",{get:function(){return this._statsController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lifeStateController",{get:function(){return this._lifeStateController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statBar",{get:function(){return this._statBar},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"targetController",{get:function(){return this._targetController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fakeShadow",{get:function(){return this._fakeShadow},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"meshInfo",{get:function(){return this._meshInfo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"equipmentController",{get:function(){return this._equipmentController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.statsController.getStatValue(d.b.Scale).final*this._meshInfo.boundingHeight},enumerable:!0,configurable:!0}),e.prototype.createCharacterMesh=function(){var t=this,e=this._level.modelManager.createMeshFromModel(this.config.modelId,"character_"+this.id);this._mesh=e.root,this._meshInfo=e,this._mesh.getChildMeshes(!1).forEac
1h(function(e){e.getBoundingInfo().isLocked=!0,e.alwaysSelectAsActiveMesh=!0,e.character=t})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n(67),i=n(1),o=n(94),a=n(32),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=5,c=3e3,h=function(t){function e(e){var n=t.call(this,e.game)||this;n._character=e,n._noise=new o.a,n._sps=new BABYLON.SolidParticleSystem("sps_burn_effect",e.level.scene);var r=n.createParticleTemplate();return n._sps.addShape(r,u),n._mesh=n._sps.buildMesh(),n._sps.initParticles=function(){for(var t=0;t<n._sps.nbParticles;++t){var e=n._sps.particles[t],r=2*Math.PI*t/u;e.uvs.x=.05,e.uvs.y=.28,e.uvs.z=.08,e.uvs.w=.3,e.__angle__=r}},n._sps.updateParticle=function(t){var e=n._timeSinceCreated%c/c,r=t.__angle__,i=r+e*Math.PI*2,o=n._character.meshInfo.boundingRadius+a.N-15;t.position.set(Math.sin(i)*o,0,Math.cos(i)*o),t.rotation.set(n._noise.simplex3(100*r,n._timeSinceCreated/1e3,100),n._noise.simplex3(100*r,n._timeSinceCreated/1e3,200),n._noise.simplex3(100*r,n._timeSinceCreated/1e3,300));var s=n._noise.simplex3(100*r,n._timeSinceCreated/1e3,400);return t.scaling.set(17+5*s,17+5*s,17+5*s),t},n._sps.initParticles(),n._sps.setParticles(),n._sps.isAlwaysVisible=!0,n._mesh.material=n._character.level.modelManager.atlasMaterial,n._mesh.position.set(0,n._character.height/2,0),n}return s(e,t),e.prototype.updateGameDisplayObject=function(t){var e=this._character.statsController.getStatValue(i.b.Scale).final;this._mesh.position.set(this._character.position.x,this._character.height/2,this._character.position.z),this._mesh.scaling.set(e,e,e),this._mesh.rotation.y+=t/c*Math.PI*2},e.prototype.disposeGameObject=function(){this._mesh.setEnabled(!1)},e.prototype.createParticleTemplate=function(){return this._character.level.modelManager.getLoadedModel("irregular_rock").meshes[0]},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(67),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=64,a=function(t){function e(n,r){void 0===r&&(r=160);var i=this,a=e.prepareTemplate(n);return i=t.call(this,n.game)||this,i._duration=r,i._mesh=a.createInstance("hit_"+i.id),i._mesh.billboardMode=BABYLON.Mesh.BILLBOARDMODE_ALL,i._mesh.position.set(n.position.x,n.height/2,n.position.z),i._baseScale=30/o,i._mesh.scaling.set(i._baseScale,i._baseScale,1),i._mesh.rotation.z=Math.random()*Math.PI,i}return i(e,t),e.prototype.updateGameDisplayObject=function(t){var e=this._timeSinceCreated/this._duration;this._mesh.scaling.x=this._baseScale*(.1+.9*e),this._mesh.scaling.y=this._mesh.scaling.x,e>=1&&this.dispose()},e.prepareTemplate=function(t){return t.level.cache.getItem("hit_effect_template",function(e){var n=t.level.cache.getItem("hit_effect_material",function(e){var n=t.level.cache.getItem("hit_effect_texture",function(t){var e=t.modelManager.textureManager.getTexture("hit");return e.hasAlpha=!0,e}),r=new BABYLON.StandardMaterial("material_hit_effect",t.level.scene);return r.diffuseTexture=n,r.backFaceCulling=!1,r.useAlphaFromDiffuseTexture=!0,r.freeze(),r}),r=BABYLON.MeshBuilder.CreatePlane("hit_effect_template",{width:o,height:64},t.level.scene);return r.setEnabled(!1),r.material=n,r.renderingGroupId=2,r})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(104),i=n(22),o=n(94),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=3e3,u=new BABYLON.Color3(235/255,156/255,63/255),c=function(t){function e(e,n){void 0===n&&(n=s);var i=t.call(this,e.game)||this;return i._character=e,i._duration=n,i._particles=new r.a(e.level,e.level.modelManager.vfxMaterial),i._particles.addParticleGroup({emitRate:1,uvs:new BABYLON.Vector4(0,.75,.25,1),life:function(){return 1200},rotate:function(t){t.particle.rotation.set(Math.PI/2,0,t.emitIndex*Math.PI/4+t.progressInLife*Math.PI/6)},scale:function(t){0===t.progressInLife&&t.particle.scale.set(1.5,1.5,1.5)},color:function(t){t.particle.color.a=Math.sin(t.progressInLife*Math.PI),t.particle.color.r=u.r,t.particle.color.g=u.g,t.particle.color.b=u.b}},4),i._particles.addParticleGroup({emitRate:1,uvs:new BABYLON.Vector4(.25,.75,.5,1),life:function(){return 1e3},rotate:function(t){0===t.progressInLife&&t.particle.rotation.set(Math.PI/2,0,0)},scale:function(t){t.particle.scale.set(1.6*t.progressInLife,1.6*t.progressInLife,1.6*t.progressInLife)},color:function(t){t.particle.color.a=Math.sin(t.progressInLife*Math.PI),t.particle.color.r=u.r,t.particle.color.g=u.g,t.particle.color.b=u.b}},4),i._particles.addParticleGroup({emitRate:16,uvs:new BABYLON.Vector4(.5,.75,.75,1),life:function(){return 300+200*Math.random()},rotate:function(t){0===t.progressInLife&&t.particle.rotation.set(0,Math.PI/4,0)},scale:function(t){if(0===t.progressInLife){var e=1+.5*Math.random();t.particle.scale.set(.05*e,e,.05*e)}},translate:function(t){var e=t.context.startPosition=t.context.startPosition||new BABYLON.Vector3(100*(Math.random()-.5),100*Math.random(),100*(Math.random()-.5)),n=t.context.movement=t.context.movement||.5+1.5*Math.random();t.particle.position.set(e.x,e.y+t.progressInLife*n*100,e.z)},color:function(t){t.particle.color.a=Math.sin(t.progressInLife*Math.PI),t.particle.color.r=u.r,t.particle.color.g=u.g,t.particle.color.b=u.b}},32),i._particles.addParticleGroup({emitRate:16,uvs:new BABYLON.Vector4(0,.25,.25,.5),life:function(){return 1e3+200*Math.random()},rotate:function(t){0===t.progressInLife&&t.particle.rotation.set(2*Math.PI*Math.random(),Math.PI/4,0)},scale:function(t){if(0===t.progressInLife){var e=.7+.3*Math.random();t.particle.scale.set(.25*e,.25*e,.25*e)}},translate:function(t){var e=t.context.noise=t.context.noise||new o.a,n=t.context.angleOffset=t.context.angleOffset||Math.random()*Math.PI*2,r=t.context.loops=t.context.loops||Math.PI/8+Math.random()*Math.PI/8,i=t.context.height=t.context.height||50+150*Math.random(),a=t.context.radius=t.context.radius||20+140*Math.random(),s=n+t.progressInLife*Math.PI*r;t.particle.position.set(Math.sin(s)*t.progressInLife*a+20*e.simplex2(t.progressInLife,0),i*t.progressInLife+e.simplex2(t.progressInLife,5e3)*i/5,Math.cos(s)*t.progressInLife*a+20*e.simplex2(t.progressInLife,1e3))},color:function(t){t.particle.color.a=1-t.progressInLife,t.particle.color.r=u.r,t.particle.color.g=u.g,t.particle.color.b=u.b}},32),i._particles.start(),i._character.level.soundManager.playOnce("level_up"),i}return a(e,t),e.prototype.updateGameObject=function(t){if(this._character.disposed||!this._character.isActivated())return void this.dispose();this._particles.mesh.position.set(this._character.position.x,0,this._character.position.z),this._timeSinceCreated/this._duration>=1&&this.dispose()},e.prototype.disposeGameObject=function(){this._particles.stopThenDispose()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(22),i=n(33),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e,n,r,i,o){void 0===o&&(o=300);var a=t.call(this,e.game)||this;return a.source=e,a.target=n,a.display=r,a._onHit=i,a.speed=o,a._tempTargetPosVec=BABYLON.Vector3.Zero(),r.mesh.position.set(e.position.x,.5*e.height,e.position.z),a}return o(e,t),e.prototype.updateGameObject=function(t){if(!this.target.active||this.target.lifeStateController.state!==i.a.Alive)return void this.dispose();this._tempTargetPosVec.set(this.target.position.x,this.target.position.y+this.target.height/2,this.target.position.z);var e=BABYLON.Vector3.Distance(this.display.position,this._tempTargetPosVec),n=t/1e3*this.speed;n>=e?(this._onHit(),this.dispose()):(this._tempTargetPosVec.set(this.target.position.x-this.display.position.x,this.target.position.y+this.target.height/2-this.display.position.y,this.target.position.z-this.display.position.z),this._tempTargetPosVec.normalize(),this._tempTargetPosVec.x*=n,this._tempTargetPosVec.y*=n,this._tempTargetPosVec.z*=n,this.display.position.addInPlace(this._tempTargetPosVec))},e.prototype.disposeGameObject=function(){this.display.dispose()},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(79),i=n(22),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e,n,r,i){var o=t.call(this,e.game)||this;return o.character=e,o.pusher=n,o.duration=r,o.distance=i,o._originalPosition=e.position.clone(),o._pushDirection=e.position.subtract(n.position),o._pushDirection.y=0,o._pushDirection.normalize(),o._tempVec=BABYLON.Vector3.Zero(),e.animationController.playState("forcedHit"),o}return o(e,t),e.prototype.updateGameObject=function(){var t=this._timeSinceCreated/this.duration/1e3;if(t>1)return void this.dispose();var e=this.distance*Math.log10(1+9*t);this._tempVec.set(this._originalPosition.x+this._pushDirection.x*e,this._originalPosition.y+this._pushDirection.y*e,this._originalPosition.z+this._pushDirection.z*e),Math.pow(this._tempVec.x-r.b,2)+Math.pow(this._tempVec.z-r.b,2)>Math.pow(.85*r.c,2)||this.character.position.copyFrom(this._tempVec)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}
1);var r=n(67),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e){var n=t.call(this,e.game)||this;return n._mesh=e.modelManager.createMeshFromModel("irregular_rock","rock_projectile_"+n.id).root,n._mesh.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI),n._mesh.scaling.set(.3,.3,.3),n}return i(e,t),e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(104),i=n(22),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=new BABYLON.Color3(235/255,156/255,63/255),s=function(t){function e(e,n,i){var o=t.call(this,e.game)||this;return o._character=e,o._duration=n,o._distance=i,o._particles=new r.a(e.level,e.level.modelManager.vfxMaterial),o._particles.addParticleGroup({emitRate:32,totalEmit:4,uvs:new BABYLON.Vector4(.25,.5,.5,.75),life:function(){return o._duration},rotate:function(t){0===t.progressInLife&&(t.particle.rotation.x=Math.PI/2,t.particle.rotation.y=-Math.PI/2)},scale:function(t){t.particle.scale.set(1.5,1.2+.5*t.progressInLife,1)},translate:function(t){0===t.progressInLife&&(t.particle.position.y=o._character.height/2),t.particle.position.z=o._distance*t.progressInLife},color:function(t){0===t.progressInLife&&(t.particle.color.r=a.r,t.particle.color.g=a.g,t.particle.color.b=a.b),t.particle.color.a=1-t.progressInLife}},4),o._particles.start(),o._particles.position.copyFrom(o._character.position),o._particles.rotation.set(o._character.mesh.rotation.x,o._character.mesh.rotation.y,o._character.mesh.rotation.z),o}return o(e,t),e.prototype.updateGameObject=function(t){this._timeSinceCreated/this._duration>=1&&this.dispose()},e.prototype.disposeGameObject=function(){this._particles.stopThenDispose()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(67),i=n(1),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=512,s=function(t){function e(n,r){var o=this,s=e.prepareTemplate(n);o=t.call(this,n.game)||this,o._character=n,o._radius=1.2*n.boundingRadius,o._duration=r,o._mesh=s.createInstance("slash_"+o.id),o._mesh.rotation.x=Math.PI/2,o._mesh.rotation.y=(Math.random()-.5)*Math.PI/4,o._initialRotation=-n.rotationController.characterRotation,o._mesh.rotation.z=o._initialRotation;var u=100/a*n.statsController.getStatValue(i.b.Scale).final;return o._mesh.scaling.set(u,u,1),o}return o(e,t),e.prototype.updateGameDisplayObject=function(t){var e=this._timeSinceCreated/this._duration,n=this._initialRotation+(e-.5)*Math.PI/8;this._mesh.rotation.z=n,this._mesh.position.set(this._character.position.x+this._radius*Math.sin(-n),this._character.position.y+this._character.height/2,this._character.position.z+this._radius*Math.cos(-n)),e>=1&&this.dispose()},e.prepareTemplate=function(t){return t.level.cache.getItem("slash_template",function(e){var n=t.level.cache.getItem("slash_material",function(e){var n=t.level.cache.getItem("slash_texture",function(t){var e=t.modelManager.textureManager.getTexture("slash");return e.hasAlpha=!0,e}),r=new BABYLON.StandardMaterial("material_slash_effect",t.level.scene);return r.diffuseTexture=n,r.backFaceCulling=!1,r.useAlphaFromDiffuseTexture=!0,r.freeze(),r}),r=BABYLON.MeshBuilder.CreatePlane("slash_template",{width:a,height:256},t.level.scene);return r.setEnabled(!1),r.material=n,r})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(104),i=n(22),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=[new BABYLON.Color3(1,152/255,0),new BABYLON.Color3(245/255,127/255,23/255),new BABYLON.Color3(235/255,156/255,63/255)],s=function(t){function e(e){var n=t.call(this,e.game)||this;return n._character=e,n._particles=new r.a(e.level,e.level.modelManager.vfxMaterial),n._particles.addParticleGroup({emitRate:16,uvs:new BABYLON.Vector4(0,.5,.25,.75),life:function(){return 500+200*Math.random()},rotate:function(t){0===t.progressInLife&&(t.particle.rotation.x=Math.PI/2+(Math.random()-.5)*Math.PI/8);var e=t.context.startRotation=t.context.startRotation||Math.random()*Math.PI;t.particle.rotation.z=e+t.progressInLife*Math.PI*6},scale:function(t){var e=t.context.startScale=t.context.startScale||2+.2*Math.random();t.particle.scale.set(e*(1+.5*t.progressInLife),e*(1+.5*t.progressInLife),1)},color:function(t){if(0===t.progressInLife){var e=a[Math.floor(Math.random()*a.length)];t.particle.color.r=e.r,t.particle.color.g=e.g,t.particle.color.b=e.b}t.particle.color.a=1-t.progressInLife}},32),n._particles.start(),n}return o(e,t),e.prototype.updateGameObject=function(t){if(this._character.disposed||!this._character.isActivated())return void this.dispose();this._particles.position.set(this._character.position.x,this._character.position.y+this._character.height/2,this._character.position.z)},e.prototype.disposeGameObject=function(){this._particles.stopThenDispose()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(67),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=12,a=2e3,s=function(t){function e(e){var n=t.call(this,e.game)||this;n._sps=new BABYLON.SolidParticleSystem("sps_stomp_effect",e.level.scene);var r=e.level.modelManager.getLoadedModel("irregular_rock").meshes[0];return n._sps.addShape(r,o),n._mesh=n._sps.buildMesh(),n._sps.initParticles=function(){for(var t=0;t<n._sps.nbParticles;++t){var e=n._sps.particles[t],r=t/o,i=new BABYLON.Vector3(Math.sin(r*Math.PI*2),1,Math.cos(r*Math.PI*2)).normalize(),a=.5*Math.random()+1.2,s=.05*Math.random()+.18,u=new BABYLON.Vector3(.3*(Math.random()-.5),0,.3*(Math.random()-.5));
1e.scaling.set(s,a,s),e.position=i.multiplyByFloats(-a/2,-a/2,-a/2).add(u),e.rotation.set(Math.PI/4,r*Math.PI*2,0),e.uvs.x=.05,e.uvs.y=.25,e.uvs.z=.05,e.uvs.w=.28,e.__direction__=i,e.__length__=a,e.__offset__=u,e.__delay__=200*(Math.random()-.7)}},n._sps.updateParticle=function(t){var e=t.__direction__,r=t.__length__,i=t.__delay__,o=t.__offset__,s=(n._timeSinceCreated-i)/a;if(s<0)return t;var u=s<.1?10*s:s>.75?4*(1-s):1;return t.position.set(e.x*(-r/2*(1-u))+o.x,e.y*(-r/2*(1-u))+o.y,e.z*(-r/2*(1-u))+o.z),t},n._sps.initParticles(),n._sps.setParticles(),n._sps.isAlwaysVisible=!0,n._sps.computeParticleRotation=!0,n._sps.computeParticleTexture=!0,n._sps.computeParticleColor=!1,n._sps.computeParticleVertex=!1,n.position.copyFrom(e.position),n.position.y=-1.4*e.boundingRadius,n._mesh.scaling.set(3*e.boundingRadius,3*e.boundingRadius,3*e.boundingRadius),n._mesh.material=e.level.modelManager.atlasMaterial,n}return i(e,t),e.prototype.updateGameDisplayObject=function(t){if(this._timeSinceCreated/a>1)return void this.dispose();this._sps.setParticles()},e.prototype.disposeGameObject=function(){this._mesh.setEnabled(!1)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(22),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=new BABYLON.Color3(183/255,28/255,28/255),a=function(t){function e(e){var n=t.call(this,e.game)||this;n._character=e;var r=n._character.level.cache.getItem("strong_effect_material",function(t){var e=new BABYLON.StandardMaterial("strong_effect_material",t.scene);return e.emissiveTexture=t.modelManager.textureManager.getTexture("atlas"),e.diffuseColor=o,e.freeze(),e});return e.meshInfo.meshWithSkeleton&&(n._originalMaterial=e.meshInfo.meshWithSkeleton.material,e.meshInfo.meshWithSkeleton.material=r),n}return i(e,t),e.prototype.updateGameObject=function(t){},e.prototype.disposeGameObject=function(){this._originalMaterial&&this._character.meshInfo.meshWithSkeleton&&(this._character.meshInfo.meshWithSkeleton.material=this._originalMaterial)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(104),i=n(22),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=BABYLON.Color3.FromHexString("#eb9c3f"),s=function(t){function e(e){var n=t.call(this,e.game)||this;return n._character=e,n._particles=new r.a(e.level,e.level.modelManager.vfxMaterial),n._particles.addParticleGroup({emitRate:6,uvs:new BABYLON.Vector4(.5,.5,.75,.75),life:function(){return 700},rotate:function(t){0===t.progressInLife&&(t.particle.rotation.x=Math.PI/2+(Math.random()-.5)*Math.PI/8);var e=t.context.startRotation=t.context.startRotation||Math.random()*Math.PI;t.particle.rotation.z=e+t.progressInLife*Math.PI*2},scale:function(t){0===t.progressInLife&&t.particle.scale.set(.6,.6,.6)},color:function(t){t.particle.color.r=0,t.particle.color.g=0,t.particle.color.b=0,t.particle.color.a=1}},8),n._particles.addParticleGroup({emitRate:1024,uvs:new BABYLON.Vector4(.75,.5,1,.75),life:function(){return 1e3},rotate:function(t){0===t.progressInLife&&(t.particle.rotation.x=Math.PI/2+(Math.random()-.5)*Math.PI/8,t.particle.rotation.y=Math.PI/4)},scale:function(t){0===t.progressInLife&&t.particle.scale.set(.1,.1,.1)},translate:function(t){var e=t.emitIndex%5/5*Math.PI*2+t.progressInLife*Math.PI;t.particle.position.x=30*Math.sin(e),t.particle.position.z=30*Math.cos(e)},color:function(t){t.particle.color.r=a.r,t.particle.color.g=a.g,t.particle.color.b=a.b,t.particle.color.a=Math.sin(t.progressInLife*Math.PI)}},5),n._particles.start(),n}return o(e,t),e.prototype.updateGameObject=function(t){if(this._character.disposed||!this._character.isActivated())return void this.dispose();this._particles.position.set(this._character.position.x,this._character.height,this._character.position.z)},e.prototype.disposeGameObject=function(){this._particles.stopThenDispose()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"c",function(){return r}),n.d(e,"a",function(){return u}),n.d(e,"b",function(){return c}),n.d(e,"d",function(){return h});var r,i=n(33),o=n(15),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Slot0=0]="Slot0",t[t.Slot1=1]="Slot1",t[t.Slot2=2]="Slot2",t[t.Slot3=3]="Slot3",t[t.Any=101]="Any"}(r=r||(r={}));var s=function(){function t(t,e,n,r,i,o,a,s){this.id=t,this.displayName=e,this.description=n,this.cooldown=r,this.levelRequirement=i,this.slot=o,this._castabilityTest=a,this.isForPlayer=s}return t.prototype.cast=function(t){return t.lifeStateController.state===i.a.Alive&&(!(t.cooldownController.getSpellCooldown(this.id).remaining>0)&&(!!this._castabilityTest(t)&&(t.cooldownController.triggerSpellCooldown(this),this.castSpell(t),!0)))},t.prototype.canCast=function(t){return this._castabilityTest(t)},t}(),u=function(t){function e(){return t.call(this,o.a.Empty,"","",0,0,r.Any,function(){return!0},!1)||this}return a(e,t),e.prototype.castSpell=function(t){},e}(s),c=function(t){function e(e,n,r,i,o,a,s,u,c){var h=t.call(this,e,n,r,i,o,a,s,u)||this;return h.isForPlayer=u,h.actionFactory=c,h}return a(e,t),e.prototype.castSpell=function(t){new this.actionFactory(t).start()},e}(s),h=function(t){function e(e,n,r,i,o,a,s,u,c){var h=t.call(this,e,n,r,i,o,a,s,u)||this;return h.isForPlayer=u,h.buffFactory=c,h}return a(e,t),e.prototype.castSpell=function(t){var e=new this.buffFactory(t);t.buffController.addBuff(e)},e}(s)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}
1);var r=n(93),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e){var n=t.call(this,e)||this;return n._level=e,n._cached=new Map,n}return i(e,t),e.prototype.updateComponent=function(){},e.prototype.disposeComponent=function(){this._cached.forEach(function(t){t.dispose&&t.dispose()})},e.prototype.getItem=function(t,e){var n=this._cached.get(t);if(null===n||void 0===n){var r=e(this._level);return this._cached.set(t,r),r}return n},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r,i=n(93),o=n(68),a=n(28),s=n(33),u=n(1),c=n(193),h=n(16),l=n(137),f=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.CreepWaves=0]="CreepWaves",t[t.BossApproaching=1]="BossApproaching",t[t.BossWave=2]="BossWave",t[t.Done=3]="Done"}(r||(r={}));var d=function(t){function e(e){var n=t.call(this,e)||this;return n._level=e,n._enemyWavesSpawned=0,n._lastStateSwitchTime=0,n._state=r.CreepWaves,n}return f(e,t),Object.defineProperty(e.prototype,"enemyWavesSpawned",{get:function(){return this._enemyWavesSpawned},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bossSpawned",{get:function(){return this._state===r.BossWave},enumerable:!0,configurable:!0}),e.prototype.updateComponent=function(){var t=this;if(this._level.state===o.a.Started){var e=this.allEnemiesDead();switch(this._state){case r.CreepWaves:if(e)if(this._enemyWavesSpawned===this._level.config.enemyWaveCount-1&&l.a.has(this._level.index))this._state=r.BossApproaching,this._lastStateSwitchTime=this._timeSinceCreated,new c.a(this.game,"BOSS APPROACHING!"),this._level.events.emit("boss_approaching"),this._level.soundManager.playOnce("drum"),this._level.player.statsController.setBaseStat(u.b.HealthPercentage,1);else if(this._enemyWavesSpawned===this._level.config.enemyWaveCount){this._state=r.Done;var n=new c.b(this.game,"NEXT ISLAND",3e3);n.events.once("ended",function(){t._level.end()})}else this.spawnEnemyWave();break;case r.BossApproaching:if(this._timeSinceCreated-this._lastStateSwitchTime>=1e3){var i=this.spawnEnemyWave();this.game.events.emit("boss_spawned",i[0]),this._state=r.BossWave,this._lastStateSwitchTime=this._timeSinceCreated,h.a.logEvent("boss_spawned",new Map([["island_level",this._level.index.toFixed()]]),null)}break;case r.BossWave:if(e){this._level.events.emit("boss_killed"),h.a.logEvent("boss_killed",new Map([["island_level",this._level.index.toFixed()]]),null),this._state=r.Done;var n=new c.b(this.game,"NEXT ISLAND",5e3);n.events.once("ended",function(){t._level.end()})}}}},e.prototype.disposeComponent=function(){this._state=r.Done},e.prototype.spawnEnemyWave=function(){for(var t=[],e=this._level.config.enemiesFactory(this._level,this._enemyWavesSpawned),n=0;n<e.length;++n){var r=e[n];r.position.copyFrom(this.getEnemySpawnPosition(this._enemyWavesSpawned,n)),t.push(this._level.createAndActivateCharacter(r))}return this._enemyWavesSpawned+=1,t},e.prototype.allEnemiesDead=function(){var t=!0;return this._level.allCharacters.forEach(function(e){e.team===a.a.Monsters&&e.active&&e.lifeStateController.state!==s.a.Dying&&e.lifeStateController.state!==s.a.Dead&&(t=!1)}),t},e.prototype.getEnemySpawnPosition=function(t,e){var n=this._level.index,r=this._level.config,i=this._level.player.position.x,o=this._level.player.position.z;if(1===n&&0===t)return new BABYLON.Vector3(i,0,o+250);if(1===n&&1===t&&0===e)return new BABYLON.Vector3(i,0,o-500);if(l.a.has(n)&&t===r.enemyWaveCount-1)return new BABYLON.Vector3(i-500,0,o);var a=n*Math.PI*2/7+t*Math.PI*2/3+e*Math.PI/12+Math.random()*Math.PI/12,s=i+500*Math.sin(a),u=o+500*Math.cos(a);return new BABYLON.Vector3(s,0,u)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return u}),n.d(e,"c",function(){return c}),n.d(e,"a",function(){return h});var r=n(93),i=n(79),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(){function t(t){this._data=t}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),t}(),s=function(t){function e(e){return t.call(this,e)||this}return o(e,t),Object.defineProperty(e.prototype,"spellId",{get:function(){return this._data},enumerable:!0,configurable:!0}),e}(a),u=function(t){function e(e){return t.call(this,e)||this}return o(e,t),Object.defineProperty(e.prototype,"targetPosition",{get:function(){return this._data},enumerable:!0,configurable:!0}),e.prototype.isTargetPositionWalkable=function(t){return!(Math.pow(this.targetPosition.x-i.b,2)+Math.pow(this.targetPosition.z-i.b,2)>=Math.pow(i.c+100,2))},e}(a),c=function(t){function e(e){return t.call(this,e)||this}return o(e,t),Object.defineProperty(e.prototype,"targetCharacter",{get:function(){return this._data},enumerable:!0,configurable:!0}),e}(a),h=function(t){function e(e){var n=t.call(this,e)||this;return n._level=e,n._inputQueue=[],n}return o(e,t),e.prototype.enqueue=function(t){this._inputQueue.push(t)},e.prototype.dequeue=function(){if(this._inputQueue.length){var t=this._inputQueue[0];return this._inputQueue.splice(0,1),t}return null},e.prototype.updateComponent=function(){var t=this.dequeue();t&&(t instanceof u?this._level.player&&t.isTargetPositionWalkable(this._level)&&(this._level.player.moveController.targetPosition=t.targetPosition,this._level.moveTargetIndicator.setTarget(t.targetPosition)):t instanceof s?this._level.combat.playerCastSpell(t.spellId):t instanceof c&&this._level.player&&(this._level.player.moveController.targetPosition=null,this._level.player.moveController.clearHoldingState(),this._level.player.targetController.targetCharacter=t.targetCharacter,this._level.moveTargetIndicator.setTargetCharacter(t.targetCharacter)))},e.prototype.disposeComponent=function(){},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(93),i=n(68),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=0,s=function(t){function e(e){var n=t.call(this,e)||this;return n._level=e,n._absoluteTime=0,n}return o(e,t),e.prototype.setTarget=function(t,e){void 0===e&&(e=1),this._mesh.setEnabled(!0),this._mesh.position.copyFrom(t),this._mesh.position.y=1,this._lastActiveTime=this._absoluteTime,this._lastIndicatorLoops=e,this._lastIndicatorCharacter=null},e.prototype.setTargetCharacter=function(t,e){void 0===e&&(e=1),this._mesh.setEnabled(!0),this._mesh.position.copyFrom(t.position),this._mesh.position.y=1,this._lastActiveTime=this._absoluteTime,this._lastIndicatorLoops=e,this._lastIndicatorCharacter=t},e.prototype.clearTarget=function(){this._mesh.setEnabled(!1),this._lastIndicatorCharacter=null},e.prototype.updateComponent=function(t){if(this._level.state===i.a.WarmingUp&&!this._mesh){var n=e.prepareTemplate(this._level);this._mesh=n.createInstance("move_target_"+(a++).toFixed()),this._baseScale=50/256,this._mesh.scaling.set(this._baseScale,this._baseScale,this._baseScale),this._mesh.rotation.x=-Math.PI/2,this._mesh.setEnabled(!1),this._lastActiveTime=0}if(this._level.state===i.a.Started){var r=(this._absoluteTime-this._lastActiveTime)/1e3;if(r>this._lastIndicatorLoops)this._mesh.setEnabled(!1),this._lastIndicatorCharacter=null;else if(this._lastIndicatorCharacter){var o=this._lastIndicatorCharacter.boundingRadius/50*3,s=.5*(Math.cos(r*Math.PI*2*1.5)+1)+.5;this._mesh.scaling.set(s*this._baseScale*o,s*this._baseScale*o,s*this._baseScale*o),this._mesh.position.copyFrom(this._lastIndicatorCharacter.position),this._mesh.position.y=1}else{var s=.5*(Math.cos(r*Math.PI*2*1.5)+1)+.5;this._mesh.scaling.set(s*this._baseScale,s*this._baseScale,s*this._baseScale)}}this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.disposeComponent=function(){this._mesh&&this._mesh.dispose()},e.prepareTemplate=function(t){return t.cache.getItem("move_target_indicator_template",function(t){var e=BABYLON.MeshBuilder.CreatePlane("move_target_indicator_template",{width:256,height:256,sideOrientation:BABYLON.Mesh.DOUBLESIDE,frontUVs:new BABYLON.Vector4(.75,0,1,.25),backUVs:new BABYLON.Vector4(0,0,.01,.01)},t.scene);return e.material=t.modelManager.vfxMaterial,e.setEnabled(!1),e})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return u}),n.d(e,"a",function(){return c});var r=n(675),i=n(24),o=n(79),a=new Map([[i.c.Earth,["Tree_1","Tree_2","Tree_1","Rock_1","Rock_2","Rock_3","Plant_1"]
1],[i.c.Fire,["Tree_3","Tree_3","Tree_3","Rock_1_fire","Rock_2_fire","Rock_3_fire","Plant_1_fire"]]]),s=["Mushroom_1","Mushroom_2"],u=function(t){var e=[];if(h(t,e,s,300,5,3,function(t,e){return Math.pow(t-o.b,2)+Math.pow(e-o.b,2)<=Math.pow(o.c-100,2)}),h(t,e,a.get(t.config.theme)||[],300,20,3,function(t,e){return Math.pow(t-o.b,2)+Math.pow(e-o.b,2)<=Math.pow(o.c-100,2)}),0===e.length){var n=new r.a(t,"Mushroom_1",new BABYLON.Vector3(o.b,-5,o.b));n.manuallyUpdateWorldMatrix(),e.push(n)}return e},c=function(t){var e=[];h(t,e,s,300,5,3,function(t,e){return Math.pow(t-o.b,2)+Math.pow(e-o.b,2)<=Math.pow(o.c-100,2)}),h(t,e,a.get(t.config.theme)||[],300,20,3,function(t,e){var n=Math.sqrt(Math.pow(t-o.b,2)+Math.pow(e-o.b,2));return n>=300&&n<=o.c-100});var n=new r.a(t,"Tree_1",new BABYLON.Vector3(o.b-130,0,o.b-160));n.scaling.set(1,1,1),n.rotation.y=Math.random()*Math.PI*2,n.manuallyUpdateWorldMatrix(),e.push(n);var i=new r.a(t,"Tree_1",new BABYLON.Vector3(o.b-180,0,o.b-170));i.scaling.set(1.2,1.2,1.2),i.rotation.y=Math.random()*Math.PI*2,i.manuallyUpdateWorldMatrix(),e.push(i);var u=new r.a(t,"Rock_1",new BABYLON.Vector3(o.b+150,0,o.b+120));return u.scaling.set(1,1,1),u.rotation.y=Math.random()*Math.PI*2,u.manuallyUpdateWorldMatrix(),e.push(u),e},h=function(t,e,n,i,a,s,u){for(var c=0;c<2*o.b;c+=i)for(var h=0;h<2*o.b;h+=i){var l=(Math.random()-.5)*i+c,f=(Math.random()-.5)*i+h;if(u(l,f))for(var d=n[Math.floor(Math.random()*n.length)],p=1+Math.round(Math.random()*(s-1)),g=a+Math.random()*a/2,_=Math.random()*Math.PI,m=0;m<p;++m){var y=m/p*Math.PI*2+_,v=.2*Math.random()+.8,b=Math.random()*Math.PI*2,w=new r.a(t,d,new BABYLON.Vector3(l+Math.sin(y)*g,-5,f+Math.cos(y)*g));w.scaling.set(v,v,v),w.rotation.y=b,w.manuallyUpdateWorldMatrix(),e.push(w)}}}},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o});var r=[{id:"Mushroom_1",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Mushroom_2",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0}],i=r.concat([{id:"Tree_1",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Tree_2",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Rock_1",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Rock_2",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Rock_3",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Plant_1",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0}]),o=r.concat([{id:"Tree_3",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Rock_1_fire",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Rock_2_fire",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Rock_3_fire",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{id:"Plant_1_fire",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0}])},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=[{inCharacterPreview:!0,id:"Stick_1",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{inCharacterPreview:!0,id:"Stick_2",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{inCharacterPreview:!0,id:"Stick_3",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0}],i=r.concat([{inCharacterPreview:!0,id:"Helmet_1",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{inCharacterPreview:!0,id:"Helmet_2",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{inCharacterPreview:!0,id:"Helmet_3",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{inCharacterPreview:!0,id:"Boots_1_L",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(42,25,42),t.position.set(-6,0,0)},useAtlasTexture:!0},{inCharacterPreview:!0,id:"Boots_1_R",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(42,25,42),t.position.set(6,0,0)},useAtlasTexture:!0},{inCharacterPreview:!0,id:"Armor_1_male",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0},{inCharacterPreview:!0,id:"Armor_1_female",directory:"models/",fileName:"essentials.json",transforms:function(t){t.scaling.set(30,30,30)},useAtlasTexture:!0}])},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){var e=new BABYLON.HemisphericLight("light_environment",new BABYLON.Vector3(0,1,0),t.scene);e.diffuse=new BABYLON.Color3(1,1,1),e.specular=new BABYLON.Color3(0,0,0),e.groundColor=new BABYLON.Color3(.5,.5,.5),e.intensity=.5;var n=new BABYLON.DirectionalLight("light_sun",new BABYLON.Vector3(-1,-2,.8),t.scene);return n.diffuse=new BABYLON.Color3(1,1,1),n.specular=new BABYLON.Color3(0,0,0),n.intensity=.5,[e,n]}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=[{id:"irregular_rock",directory:"models/",fileName:"essentials.json",postProcessImports:function(t){t.convertToFlatShadedMesh()},transforms:function(t){t.scaling.set(100,100,100)},useAtlasTexture:!0},{id:"coin",directory:"models/",fileName:"essentials.json",postProcessImports:function(t){},transforms:function(t){t.scaling.set(15,15,15),t.rotation.set(Math.PI/2,0,0)},useAtlasTexture:!0},{id:"diamond",directory:"models/",fileName:"essentials.json",postProcessImports:function(t){t.convertToFlatShadedMesh()},transforms:function(t){t.scaling.set(20,20,20)},useAtlasTexture:!0},{id:"heart",directory:"models/",fileName:"essentials.json",postProcessImports:function(t){},transforms:function(t){t.rotation.z=Math.PI/2,t.scaling.set(10,10,10)},useAtlasTexture:!0}]},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(136),i=(n.n(r),n(22)),o=n(31),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=5,u=function(t){function e(e){var n=t.call(this,e.game)||this;n._tempGravityVec=BABYLON.Vector2.Zero();var i=r.loader.resources.atlas.textures.item_Chest,a=n.game.getService(o.a);n._pixiLayer=a;var u=BABYLON.Vector3.Project(new BABYLON.Vector3(e.mesh.position.x,e.mesh.position.y,e.mesh.position.z),BABYLON.Matrix.Identity(),e.level.scene.getTransformMatrix(),e.level.scene.activeCamera.viewport.toGlobal(n.game.engine.getRenderWidth(),n.game.engine.getRenderHeight()));return n._particle=new r.Sprite(i),a.gameLayer.addChild(n._particle),n._particle.position.set(u.x+(Math.random()-.5)*a.unitSize,u.y+(Math.random()-.5)*a.unitSize),n._particle.width=2*a.unitSize,n._particle.height=2*a.unitSize,n._particle.__velocity__={x:(.5+.5*Math.random())*a.unitSize*s,y:a.unitSize*s},n}return a(e,t),e.prototype.updateGameObject=function(t){var e={x:this._pixiLayer.unitSize,y:4*this._pixiLayer.unitSize},n=this._particle.__velocity__;this._particle.position.x+=n.x*t/1e3,this._particle.position.y+=n.y*t/1e3;var r=Math.sqrt(Math.pow(e.x-this._particle.position.x,2)+Math.pow(e.y-this._particle.position.y,2));if(r<this._pixiLayer.unitSize/2||this._particle.position.x<=0)return this.events.emit("ended"),void this.dispose();this._particle.width=this._pixiLayer.unitSize*(1.5+r/(5*this._pixiLayer.unitSize)*1),this._particle.height=this._particle.width,this._tempGravityVec.set(e.x-this._particle.position.x,e.y-this._particle.position.y),this._tempGravityVec.normalize(),this._tempGravityVec.x*=this._pixiLayer.unitSize,this._tempGravityVec.y*=this._pixiLayer.unitSize,n.x+=16*this._tempGravityVec.x*t/1e3,n.y+=16*this._tempGravityVec.y*t/1e3},e.prototype.disposeGameObject=function(){this._particle.destroy()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}
1);var r=n(67),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n,r){var i=t.call(this,e.game)||this;return i._modelId=n,i._mesh=e.modelManager.createMeshFromModel(i._modelId,"environment_object_"+r.x.toFixed()+"_"+r.z.toFixed()).root,i._mesh.position.copyFrom(r),i}return i(e,t),e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(22),i=n(104),o=n(9),a=n(699),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=new BABYLON.Color3(235/255,156/255,63/255),c=function(t){function e(e,n){var r=t.call(this,e.level.game)||this;return r._male=e,r._female=n,r._selected=o.b.Male,r._particles=new i.a(e.level,e.level.modelManager.vfxMaterial),r._particles.addParticleGroup({emitRate:1,uvs:new BABYLON.Vector4(.25,.75,.5,1),life:function(){return 1e3},rotate:function(t){0===t.progressInLife&&t.particle.rotation.set(Math.PI/2,0,0)},scale:function(t){0===t.progressInLife&&t.particle.scale.set(1.2,1.2,1.2)},color:function(t){t.particle.color.a=.5+.5*Math.sin(t.progressInLife*Math.PI),t.particle.color.r=u.r,t.particle.color.g=u.g,t.particle.color.b=u.b}},1),r._particles.addParticleGroup({emitRate:16,uvs:new BABYLON.Vector4(.5,.75,.75,1),life:function(){return 300+200*Math.random()},rotate:function(t){0===t.progressInLife&&t.particle.rotation.set(0,Math.PI/4,0)},scale:function(t){if(0===t.progressInLife){var e=1+.5*Math.random();t.particle.scale.set(.05*e,e,.05*e)}},translate:function(t){var e=t.context.startPosition=t.context.startPosition||new BABYLON.Vector3(100*(Math.random()-.5),100*Math.random(),100*(Math.random()-.5)),n=t.context.movement=t.context.movement||.5+1.5*Math.random();t.particle.position.set(e.x,e.y+t.progressInLife*n*100,e.z)},color:function(t){t.particle.color.a=Math.sin(t.progressInLife*Math.PI),t.particle.color.r=u.r,t.particle.color.g=u.g,t.particle.color.b=u.b}},32),r._particles.start(),r._ui=new a.a(r.game),r._ui.events.on("gender_confirmed",function(){r.events.emit("gender_confirmed",r._selected)}),r}return s(e,t),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t},enumerable:!0,configurable:!0}),e.prototype.updateGameObject=function(t){this._ui.update(t),this._selected===o.b.Male?this._particles.position.copyFrom(this._male.position):this._selected===o.b.Female&&this._particles.position.copyFrom(this._female.position)},e.prototype.disposeGameObject=function(){this._particles.stopThenDispose(),this._ui.dispose()},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(22),i=n(33),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e,n,r,i){var o=t.call(this,e.game)||this;return o.level=e,o._damage=n,o.position=r,o.radius=i,o._damagedCharacterIds=new Set,o}return o(e,t),e.prototype.updateGameObject=function(t){var e=this;this.level.allCharacters.forEach(function(t){if(!e._damagedCharacterIds.has(t.id)&&t.teamGroup!==e._damage.source.teamGroup&&t.lifeStateController.state===i.a.Alive){BABYLON.Vector3.Distance(t.position,e.position)<=e.radius+e._damage.target.boundingRadius&&(e.level.combat.dealDamage({target:t,source:e._damage.source,min:e._damage.min,max:e._damage.max,attackType:e._damage.attackType,damageType:e._damage.damageType,fromSpell:e._damage.fromSpell}),e._damagedCharacterIds.add(t.id))}})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(673),i=n(671),o=n(296),a=n(672),s=n(669),u=n(9),c=n(679),h=n(24),l=n(670),f=n(137),d=function(t,e){var d=e.getService(u.a).model,p=n.i(c.a)(t),g=p===h.c.Earth?"sound/earth.mp3":"sound/earth_battle.mp3",_=n.i(c.b)(t),m=f.a.get(t);return{theme:p,music:g,title:"Island "+t,allModels:r.a.concat(l.a,l.b,i.a,d===u.b.Unknown?o.a.concat(o.b):d===u.b.Male?o.a.slice():o.b.slice(),[_],m?[m.model]:[]),lightsFactory:a.a,environmentObjectsFactory:function(t){return d===u.b.Unknown?n.i(s.a)(t):n.i(s.b)(t)},enemiesFactory:function(e,r){for(var i=[],o=n.i(c.c)(t,r),a=m&&r===n.i(c.d)(t)-1,s=0;s<o;++s){var u=a&&m?m.model:_;i.push(n.i(c.e)(t,r,s,u,0,0))}return i},enemyWaveCount:n.i(c.d)(t)}}},function(t,e,n){"use strict";n.d(e,"a",function(){return h}),n.d(e,"b",function(){return f}),n.d(e,"e",function(){return _}),n.d(e,"c",function(){return m}),n.d(e,"d",function(){return y});var r=n(295),i=n(186),o=n(28),a=n(24),s=n(77),u=n(636),c=n(137),h=function(t){switch(t%2){default:case 1:return a.c.Earth;case 0:return a.c.Fire}},l=[r.h,r.i,r.j,r.k,r.l,r.m,r.n],f=function(t){var e=h(t);return l[(t-1)%l.length](e,t)},d=function(t){t.buffController.addBuff(new u.a(t))},p=function(){},g=function(t,e,n){return 1===t?p:2===t?1===e&&0===n?d:p:Math.random()<s.p?d:p},_=function(t,e,r,a,s,u){var h=c.a.get(t),l=h&&e===y(t)-1,f=l&&h?h.behavior:g(t,e,r);return{modelId:a.id,team:o.a.Monsters,baseStats:l?n.i(i.c)(t,e):n.i(i.d)(t,e,r),position:new BABYLON.Vector3(s,0,u),postActivate:f}},m=function(t,e){if(1===t)switch(e){default:case 0:return 1;case 1:return 2;case 2:return 3;case 3:return 1}if(c.a.has(t)&&e===y(t)-1)return 1;switch(e){default:case 0:return 3;case 1:return 4;case 2:return 5;case 3:return 6}},y=function(t){return 4}},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(308),i=(n.n(r),n(189)),o=n(293),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Prom
1ise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},u=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},c=function(t){function e(){var e=t.call(this,i.a.FBINSTANT)||this;return e._customUpdateQuota=1,e}return a(e,t),e.prototype.initializeAsync=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return[4,window.FBInstant.initializeAsync()];case 1:return e.sent(),r.getInstance().init("b29b99412e78c1d9d25cdf8c2f1107c3",this.getPlayerID()),this.setupErrorReporting(),this.setUserProperties(),t=new o.a,[2,t]}})})},e.prototype.getOS=function(){return window.FBInstant.getPlatform()},e.prototype.setLoadingProgress=function(t){window.FBInstant.setLoadingProgress(t)},e.prototype.startGameAsync=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,window.FBInstant.startGameAsync()];case 1:return t.sent(),[2]}})})},e.prototype.getPlayerID=function(){return window.FBInstant.player.getID()},e.prototype.getPlayerName=function(){return window.FBInstant.player.getName()},e.prototype.getPlayerPhotoURL=function(){return window.FBInstant.player.getPhoto()},e.prototype.getPlayerDataAsync=function(t){return s(this,void 0,void 0,function(){var e,n;return u(this,function(r){switch(r.label){case 0:return e=new Map,[4,window.FBInstant.player.getDataAsync(t)];case 1:return n=r.sent(),Object.keys(n).forEach(function(t){e.set(t,n[t])}),[2,e]}})})},e.prototype.setPlayerDataAsync=function(t){return s(this,void 0,void 0,function(){var e,n;return u(this,function(r){switch(r.label){case 0:e={},t.forEach(function(t,n){e[n]=t}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,window.FBInstant.player.setDataAsync(e)];case 2:return r.sent(),[3,4];case 3:return n=r.sent(),this.logEvent("exception",new Map([["description",JSON.stringify(n)],["fatal","false"]]),null),[3,4];case 4:return[2]}})})},e.prototype.flushPlayerDataAsync=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,window.FBInstant.player.flushDataAsync()];case 1:return t.sent(),[2]}})})},e.prototype.postUpdate=function(t,e,n,r,i,o,a){if(!(this._customUpdateQuota<=0)){var s={text:e,image:n,template:t,action:"CUSTOM",strategy:a?"IMMEDIATE_CLEAR":"LAST",notification:o?"PUSH":"NO_PUSH"};r&&(s.cta=r),i&&(s.data=i),a&&(this._customUpdateQuota-=1),window.FBInstant.updateAsync(s)}},e.prototype.shareAsync=function(t,e,n){var r=this;return this.chooseContextAsync(!1).then(function(){r.postUpdate("Share",t,e,"Play",n,!0,!0)}).catch(function(i){if(!i||"SAME_CONTEXT"!==i.code)throw i;r.postUpdate("Share",t,e,"Play",n,!0,!0)})},e.prototype.getFriendsAsync=function(){return s(this,void 0,void 0,function(){var t,e;return u(this,function(n){switch(n.label){case 0:return[4,window.FBInstant.player.getConnectedPlayersAsync()];case 1:return t=n.sent(),e=new Map,t.forEach(function(t){e.set(t.getID(),{id:t.getID(),name:t.getName(),photoUrl:t.getPhoto()})}),[2,e]}})})},e.prototype.getContextType=function(){return window.FBInstant.context.getType()},e.prototype.getContextID=function(){return window.FBInstant.context.getID()||null},e.prototype.getContextPlayersAsync=function(){return s(this,void 0,void 0,function(){var t,e;return u(this,function(n){switch(n.label){case 0:return[4,window.FBInstant.context.getPlayersAsync()];case 1:return t=n.sent(),e=new Map,t.forEach(function(t){e.set(t.getID(),{id:t.getID(),name:t.getName(),photoUrl:t.getPhoto()})}),[2,e]}})})},e.prototype.chooseContextAsync=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return t?[4,window.FBInstant.context.chooseAsync({filters:["NEW_CONTEXT_ONLY"]})]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,window.FBInstant.context.chooseAsync()];case 3:e.sent(),e.label=4;case 4:return this._customUpdateQuota=1,[2,this.getContextID()]}})})},e.prototype.logEvent=function(t,e,n){var i={};e&&e.forEach(function(t,e){i[e]=t}),null!==n&&(i.value=n);try{r.getInstance().logEvent(t,i)}catch(t){}},e.prototype.getEntryPointData=function(){return window.FBInstant.getEntryPointData()},e.prototype.setUserProperty=function(t){var e=new r.Identify;
1Object.keys(t).forEach(function(n){e.set(n,t[n])}),r.identify(e)},e.prototype.quit=function(){window.FBInstant.quit()},e.prototype.setupErrorReporting=function(){var t=this,e=new Set;window.onerror=function(n,r,i,o,a){e.has(n)||(t.logEvent("exception",new Map([["description",n],["fatal","true"]]),null),e.add(n))}},e.prototype.setUserProperties=function(){try{var t=this.getEntryPointData(),e=t&&t.source||this.getContextType(),n=(new r.Identify).setOnce("initial_source",e).set("locale",window.FBInstant.getLocale());r.identify(n)}catch(t){this.logEvent("exception",new Map([["description",JSON.stringify(t)],["fatal","false"]]),null)}},e}(i.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(189),i=n(293),o=n(24),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},u=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},c=function(t){function e(){var e=t.call(this,r.a.HTML)||this;return e._contextId=null,e}return a(e,t),e.prototype.initializeAsync=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return this.setupCrashReporter(),[4,this.getConfig()];case 1:return t=e.sent(),this._contextId=t.getBooleanConfig(o.a.in_context)?"HTML_PLATFORM_FAKE_CONTEXT_ID":null,this._loadingScreen=document.createElement("div"),this._loadingScreen.id="loadingScreen",document.body.appendChild(this._loadingScreen),this._loadingProgressText=document.createElement("div"),this._loadingProgressText.id="loadingText",this._loadingProgressText.innerText="Loading...",this._loadingProgressText.style.color="#000000",this._loadingProgressText.style.fontSize="24px",this._loadingScreen.appendChild(this._loadingProgressText),[2,t]}})})},e.prototype.getOS=function(){return"UNKNOWN"},e.prototype.setLoadingProgress=function(t){this._loadingProgressText&&(this._loadingProgressText.innerText="Loading... "+t.toFixed()+"%")},e.prototype.startGameAsync=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return this._loadingScreen.remove(),[2,Promise.resolve()]})})},e.prototype.getPlayerID=function(){var t=window.localStorage.getItem("LOCAL_PLAYER_ID");if(t)return t;var e="LOCAL_"+Math.random().toFixed(8);return window.localStorage.setItem("LOCAL_PLAYER_ID",e),e},e.prototype.getPlayerName=function(){return this.getPlayerID()},e.prototype.getPlayerPhotoURL=function(){return"textures/default_player_photo.png"},e.prototype.getPlayerDataAsync=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){return e=new Map,t.forEach(function(t){e.set(t,window.localStorage.getItem(t)||"")}),[2,e]})})},e.prototype.setPlayerDataAsync=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){return t.forEach(function(t,e){window.localStorage.setItem(e,t)}),[2]})})},e.prototype.flushPlayerDataAsync=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return[2]})})},e.prototype.postUpdate=function(t,e,n,r,i,o,a){console.log("Posting Custom Update: "),console.log(e),console.log(n)},e.prototype.getFriendsAsync=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return[2,new Map([["LOCAL_0.32205651",{id:"LOCAL_0.32205651",name:"Fake Player 1",photoUrl:"textures/default_player_photo.png"}]])]})})},e.prototype.shareAsync=function(t,e,n){return Promise.resolve()},e.prototype.getContextType=function(){return this._contextId?"THREAD":"SOLO"},e.prototype.getContextID=function(){return this._contextId},e.prototype.getContextPlayersAsync=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return[2,new Map([["HTML_PLATFORM_FAKE_PLAYER_1",{id:"HTML_PLATFORM_FAKE_PLAYER_1",name:"Fake Player 1",photoUrl:"textures/default_player_photo.png"}],["HTML_PLATFORM_FAKE_PLAYER_2",{id:"HTML_PLATFORM_FAKE_PLAYER_2",name:"Fake Player 2",photoUrl:"textures/default_player_photo.png"}],["HTML_PLATFORM_FAKE_PLAYER_3",{id:"HTML_PLATFORM_FAKE_PLAYER_3",name:"Fake Player 3",photoUrl:"textures/default_player_photo.png"}]])]})})},e.prototype.chooseContextAsync=function(t){return window.confirm("switch into context?")?(this._contextId="HTML_PLATFORM_FAKE_CONTEXT_ID",console.log("[Platform] [Switching context...]"),Promise.resolve(this._contextId)):Promise.reject(new Error("rejected"))},e.prototype.logEvent=function(t,e,n){console.log("[Analytics] ["+t+"] ["+JSON.stringify(e)+"] [Value: "+JSON.stringify(n)+"]")},e.prototype.getEntryPointData=function(){return null},e.prototype.setUserProperty=function(t){console.log("[Analytics] [UserProperty] "+JSON.stringify(t))},e.prototype.quit=function(){window.location.reload(!0)},e.prototype.setupCrashReporter=function(){window.onerror=function(t,e,n,r,i){var o=document.createElement("div");o.id="errorReport";var a=document.createElement("div");a.className="title",a.innerText="We Crashed!",o.appendChild(a);var s=document.createElement("pre");s.innerText="\nMessage:\n"+t+"\n\nUrl:\n"+e+"\n\nLine:\n"+n+"\n\nCol:\n"+r+"\n\nError:\n"+(i?i.stack:"not available")+"\n ",o.appendChild(s),document.body.appendChild(o)}},e.prototype.getConfig=function(){var t=new i.a;return new Promise(function(e){var n=document.createElement("div");n.id="options",document.body.appendChild(n);for(var r=0,i=t.keys;r<i.length;
1r++){var a=i[r],s=o.a[a],u=document.createElement("div");u.className="row",n.appendChild(u);var c=document.createElement("div");if(c.className="label",c.innerText=s,u.appendChild(c),a===o.a.test_scene_level||a===o.a.test_character_level||a===o.a.test_equipment_level){var h=document.createElement("input");h.id="textbox_"+a,h.type="textbox",h.value=t.getNumberConfig(a).toFixed(),u.appendChild(h)}else{var l=document.createElement("input");l.id="checkbox_"+a,l.type="checkbox",l.checked=t.getBooleanConfig(a),u.appendChild(l)}}var f=document.createElement("div");f.className="row",n.appendChild(f);var d=document.createElement("button");d.id="buttonStartGame",d.innerText="Start",f.appendChild(d),d.onclick=function(){for(var r=0,i=t.keys;r<i.length;r++){var a=i[r];if(a===o.a.test_scene_level||a===o.a.test_character_level||a===o.a.test_equipment_level){var s=document.getElementById("textbox_"+a);t.setConfig(a,Number(s.value))}else{var u=document.getElementById("checkbox_"+a);t.setConfig(a,u.checked?1:0)}}n.remove(),e(t)}})},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(21),i=n(137),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e){var n=t.call(this,e)||this;return n.initBossConfigs(),n}return o(e,t),Object.defineProperty(e.prototype,"defaultBossConfigs",{get:function(){return i.a},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bossConfigs",{get:function(){return this._bossConfigs},enumerable:!0,configurable:!0}),e.prototype.initBossConfigs=function(){this._bossConfigs=i.a},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r,i=n(31),o=n(22),a=n(94),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Shown=0]="Shown",t[t.Showing=1]="Showing",t[t.TriggerShown=2]="TriggerShown",t[t.Hidden=3]="Hidden",t[t.Hiding=4]="Hiding",t[t.TriggerHidden=5]="TriggerHidden"}(r=r||(r={}));var u=function(t){function e(e){var n=t.call(this,e)||this;return n._absoluteTime=0,n._state=r.Shown,n._container=new PIXI.Container,n._panel1=new PIXI.particles.ParticleContainer,n._panel2=new PIXI.particles.ParticleContainer,n._container.addChild(n._panel1),n._container.addChild(n._panel2),n.redraw(),n.game.getService(i.a).topmostLayer.addChild(n._container),n.game.events.on("resize",function(){n.redraw()}),n}return s(e,t),e.prototype.show=function(){this._state=r.Shown,this._panel1.position.set(0,0),this._panel2.position.set(this.game.engine.getRenderWidth(),this.game.engine.getRenderHeight())},e.prototype.showWithTransition=function(t){this._state=r.Showing,this._transitionStartTime=this._absoluteTime,this.events.once("shown",t)},e.prototype.hide=function(){this._state=r.Hidden,this._container.visible=!1},e.prototype.hideWithTransition=function(t){this._state=r.Hiding,this._transitionStartTime=this._absoluteTime,this.events.once("hidden",t)},e.prototype.disposeGameObject=function(){this._container.destroy({children:!0})},e.prototype.updateGameObject=function(t){switch(this._container.visible=this._state!==r.Hidden,this._state){case r.Shown:case r.Hidden:break;case r.TriggerShown:this._state=r.Shown,this.events.emit("shown");break;case r.TriggerHidden:this._state=r.Hidden,this.events.emit("hidden");break;case r.Showing:var e=(this._absoluteTime-this._transitionStartTime)/1200;e>=1?(this._state=r.TriggerShown,this._panel1.position.set(this.game.engine.getRenderWidth()/2,this.game.engine.getRenderHeight()/2),this._panel2.position.set(this.game.engine.getRenderWidth()/2,this.game.engine.getRenderHeight()/2)):(this._panel1.position.x=this.game.engine.getRenderWidth()/2+(e-1)*this._squareEdge,this._panel1.position.y=this.game.engine.getRenderHeight()/2+(e-1)*this._squareEdge,this._panel2.position.x=this.game.engine.getRenderWidth()/2+(1-e)*this._squareEdge,this._panel2.position.y=this.game.engine.getRenderHeight()/2+(1-e)*this._squareEdge);break;case r.Hiding:var e=(this._absoluteTime-this._transitionStartTime)/1200;e>=1?this._state=r.TriggerHidden:(this._panel1.position.x=this.game.engine.getRenderWidth()/2-e*this._squareEdge,this._panel1.position.y=this.game.engine.getRenderHeight()/2-e*this._squareEdge,this._panel2.position.x=this.game.engine.getRenderWidth()/2+e*this._squareEdge,this._panel2.position.y=this.game.engine.getRenderHeight()/2+e*this._squareEdge)}this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.redraw=function(){this._panel1.removeChildren(),this._panel2.removeChildren(),this._squareEdge=Math.sqrt(2)*Math.max(this.game.engine.getRenderWidth(),this.game.engine.getRenderHeight());for(var t=PIXI.loader.resources.atlas.textures.cloud,e=new a.a,n=-this._squareEdge/2;n<=this._squareEdge/2;n+=128)for(var r=-this._squareEdge/2;r<=this._squareEdge/2;r+=128){for(var i=n*Math.cos(Math.PI/4)-r*Math.sin(Math.PI/4),o=r*Math.cos(Math.PI/4)+n*Math.sin(Math.PI/4),s=(e.simplex2(n/this._squareEdge*2,r/this._squareEdge*2)+1)/2,u=4*Math.pow(Math.random(),2)+(2-s),c=6*Math.pow(Math.random(),2)+(2-s),h=Math.floor(4*s),l=Math.max(0,3-h),f=0;f<h;++f){var d=new PIXI.Sprite(t);d.anchor.set(.5,.5),d.rotation=Math.PI/4,d.position.set(i,o),d.scale.set(u,c),this._panel1.addChild(d)}for(var f=0;f<l;++f){var d=new PIXI.Sprite(t);d.anchor.set(.5,.5),d.rotation=Math.PI/4,d.position.set(i,o),d.scale.set(u,c),this._panel2.addChild(d)}}this._panel1.position.set(0,0),this._panel2.position.set(this.game.engine.getRenderWidth(),this.game.engine.getRenderHeight())},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return C});var r,i=n(2),o=n(38),a=n(7),s=n(72),u=n(17),c=n(14),h=n(23),l=n(13),f=n(52),d=n(69),p=n(141),g=n(689),_=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};!function(t){t[t.Hidden=0]="Hidden",t[t.Showing=1]="Showing",t[t.Shown=2]="Shown",t[t.Hiding=3]="Hiding",t[t.PrepareToHide=4]="PrepareToHide"}(r||(r={}));var y=function(t){function e(e,n){var c=this,h=new i.a(e,[new u.a(e,"SAVING PROGRESS... DO NOT EXIT",2171169)],{paddingTop:"2u",preferredHeight:"2.75u"});return c=t.call(this,e,[new o.a(e,16777215),new a.a(e,n.concat([h]),{flexDirectionAlign:i.b.Center,crossDirectionAlign:i.d.Center})],{},s.a.Topmost)||this,c._loadingText=h,c._state=r.Hidden,c.element.visible=!1,
1c.element.alpha=0,c._absoluteTime=0,c._pendingUserInput=!1,c._lastStateSwitchTime=0,c}return _(e,t),e.prototype.showWithTransitionAsync=function(){var t=this;return this._state!==r.Hidden?Promise.reject(new Error("the tip is already shown or in a transition")):new Promise(function(e){t._promiseResolve=e,t.switchState(r.Showing)})},e.prototype.hideWithTransitionAsync=function(){var t=this;return this._state!==r.Shown?Promise.reject(new Error("the tip is already hidden or in a transition")):new Promise(function(e){t._promiseResolve=e,t.switchState(r.PrepareToHide)})},e.prototype.updateElement=function(t){var e=(this._absoluteTime-this._lastStateSwitchTime)/300;switch(this._state){case r.PrepareToHide:this._pendingUserInput||this.switchState(r.Hiding);break;case r.Hidden:break;case r.Hiding:e<1?this.element.alpha=1-e:this.switchState(r.Hidden);break;case r.Showing:e<1?this.element.alpha=e:this.switchState(r.Shown);break;case r.Shown:}this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.switchState=function(t){if(this._state!==t)switch(this._state=t,this._lastStateSwitchTime=this._timeSinceCreated,t){case r.Hidden:this.element.alpha=0,this.element.visible=!1,this._promiseResolve(),this.dispose();break;case r.Hiding:case r.PrepareToHide:this.element.visible=!0;break;case r.Shown:this.element.visible=!0,this.element.alpha=1,this._promiseResolve();break;case r.Showing:this.element.visible=!0}},e}(s.b),v=function(t,e,n,r){return new i.a(t,[new u.a(t,e,n,u.b.Center,{strokeThickness:4,dropShadow:!0}
1)],{preferredHeight:r})},b=(function(t){function e(e){var n=e.getService(d.a).data.score,r=e.getService(p.a).postIslandLevel(n),o=new u.a(e,n.toFixed(),l.n,u.b.Center,{strokeThickness:4,dropShadow:!0});return t.call(this,e,[new i.a(e,[new u.c(e,"Current Score")],{preferredHeight:"2u"}),new i.a(e,[o],{preferredHeight:"3u"})].concat(r.higherThanPlayerEntry?[new i.a(e,[new u.a(e,"NEXT TARGET",l.f,u.b.Center,{strokeThickness:4,dropShadow:!0})],{paddingTop:"2u",preferredHeight:"2.75u"}),new g.a(e,r.higherThanPlayerEntry,!1,{paddingTop:"0.2u",preferredHeight:"2.2u"})]:[]))||this}_(e,t)}(y),function(t){function e(e){return t.call(this,e,[new a.b(e,[new a.a(e,[new i.a(e,[new u.a(e,"Lv.10",16777215,u.b.Center,{strokeThickness:4})],{preferredHeight:"0.75u",preferredWidth:c.a.largeSizeValue}),new i.a(e,[new h.a(e,"button_1"),new h.a(e,"item_Stick_1")],m({},c.a.largeSquare))]),new i.a(e,[new u.a(e,"+",l.h)],{preferredHeight:"2.5u",preferredWidth:"3u"}),new a.a(e,[new i.a(e,[new u.a(e,"Lv.10",16777215,u.b.Center,{strokeThickness:4})],{preferredHeight:"0.75u",preferredWidth:c.a.largeSizeValue}),new i.a(e,[new h.a(e,"button_1"),new h.a(e,"item_Stick_1")],m({},c.a.largeSquare))])],m({},c.a.largePadding,{crossDirectionAlign:i.d.Center})),new i.a(e,[new h.a(e,"button_2"),new h.a(e,"anvil")],m({},c.a.extraLargeSquare,c.a.largePadding)),new i.a(e,[new h.a(e,"arrow",16777215,Math.PI)],m({},c.a.extraLargeSquare,c.a.largePadding)),new i.a(e,[new u.a(e,"Lv.11",16777215,u.b.Center,{strokeThickness:4})],{preferredHeight:"1u",preferredWidth:c.a.largeSizeValue}),new i.a(e,[new h.a(e,"button_1"),new h.a(e,"item_Stick_2")],m({},c.a.extraLargeSquare))])||this}return _(e,t),e}(y)),w=function(t){function e(e){return t.call(this,e,[v(e,"Your Hero",16777215,"1.5u"),v(e,"Keeps Fighting",16750592,"2u"),v(e,"Even When You Are",16777215,"1.5u"),v(e,"Away",16733986,"2u")])||this}return _(e,t),e}(y),x=function(t){function e(e){return t.call(this,e,[v(e,"Walala Is",16777215,"1u"),v(e,"More Fun",16750592,"2u"),v(e,"When You Play",16777215,"1.5u"),v(e,"With Friends!",16733986,"2u")])||this}return _(e,t),e}(y),S=function(t){function e(e){return t.call(this,e,[v(e,"Adjust Settings",16750592,"2u"),new i.a(e,[new h.a(e,"button_2"),new h.a(e,"gear")],m({},c.a.extraLargeSquare,c.a.largePadding)),v(e,"To Get",16777215,"1.5u"),v(e,"Optimal",16733986,"2u"),v(e,"Experience",16733986,"2u")])||this}return _(e,t),e}(y),T=function(t){function e(e){return t.call(this,e,[v(e,"Watch Out For",16777215,"1u"),v(e,"Spell Alerts",16733986,"2u"),v(e,"In Boss Fights",16750592,"1.5u")])||this}return _(e,t),e}(y),E=function(t){function e(e){return t.call(this,e,[v(e,"Use Your Spells",16777215,"1.5u"),v(e,"Wisely",16750592,"2u"),v(e,"To Defeat",16777215,"1.5u"),v(e,"Your Enemies",16733986,"2u")])||this}return _(e,t),e}(y),P=function(t){function e(e){return t.call(this,e,[v(e,"Sometimes",16750592,"2u"),v(e,"You Just Gotta",16777215,"1.5u"),v(e,"Run!",16733986,"2u")])||this}return _(e,t),e}(y),O=(function(t){function e(e){return t.call(this,e,[v(e,"You Are",16777215,"1u"),v(e,"Revived!",16733986,"2u"),v(e,"Try Again!",16750592,"1.5u")])||this}_(e,t)}(y),function(t){function e(e){return t.call(this,e,[v(e,"Revived With",16777215,"1u"),v(e,"Team Bonus!",16733986,"2u"),new i.a(e,[new h.a(e,"button_2"),new i.a(e,[new h.a(e,"spell_10001")],{paddingTop:"11%",paddingBottom:"11%",paddingLeft:"11%",paddingRight:"11%"})],m({},c.a.extraLargeSquare)),new i.a(e,[new u.a(e,"+"+(100*f.f).toFixed()+"% Damage",16750592,u.b.Center,{strokeThickness:4})],{preferredHeight:"0.75u"}),new i.a(e,[new u.a(e,"+"+(100*f.g).toFixed()+"% Attack Speed",16750592,u.b.Center,{strokeThickness:4})],{preferredHeight:"0.75u"}),new i.a(e,[new u.a(e,"Become "+(100*f.h).toFixed()+"% Bigger!",16750592,u.b.Center,{strokeThickness:4})],{preferredHeight:"0.75u"})])||this}_(e,t)}(y),new Map([[2,function(t){return new S(t)}],[3,function(t){return new P(t)}],[4,function(t){return new T(t)}],[5,function(t){return new x(t)}],[6,function(t){return new w(t)}],[7,function(t){return new b(t)}]])),M=[function(t){return new b(t)},function(t){return new x(t)},function(t){return new S(t)},function(t){return new T(t)},function(t){return new E(t)},function(t){return new w(t)}],C=function(t,e){var n=O.get(e);return n?n(t):M[Math.floor(Math.random()*M.length)](t)}},function(t,e,n){"use strict";function r(t,e){var n=new BABYLON.ShaderMaterial("water_"+i.c[e]+"_shader_material",t.scene,{vertex:"water",fragment:"water"},{needAlphaBlending:!0,attributes:["position","normal","uv"],uniforms:["time","world","worldView","worldViewProjection"]});switch(n.backFaceCulling=!1,e){case i.c.Earth:n.setVector3("waveColor",new BABYLON.Vector3(41/255,182/255,246/255));break;case i.c.Fire:n.setVector3("waveColor",new BABYLON.Vector3(1,55/255,5/255))}return n.setFloat("waveHeight",15),n.setFloat("waveLength",20),n.setFloat("waveSpeed",1.2),n.setFloat("randomHeight",8),n.setFloat("randomSpeed",.7),n}e.a=r;var i=n(24);BABYLON.Effect.ShadersStore.waterVertexShader="\nprecision highp float;\n\nattribute vec3 position;\n\nuniform mat4 worldView;\nuniform mat4 worldViewProjection;\nuniform float time;\nuniform float waveHeight;\nuniform float waveLength;\nuniform float waveSpeed;\nuniform float randomHeight;\nuniform float randomSpeed;\n\nvarying float vCurrentTime;\nvarying vec3 vWorldViewPosition;\n\nfloat rand(vec3 v)\n{\n return fract(sin(dot(v.xyz ,vec3(12.9898,78.233,45.5432))) * 43758.5453);\n}\n\nfloat rand2(vec3 v)\n{\n return fract(sin(dot(v.xyz ,vec3(19.9128,75.2,34.5122))) * 12765.5213);\n}\n\nvoid main(void) {\n vCurrentTime = time / 1000.0;\n\n float phase0 = waveHeight * sin(\n (vCurrentTime * waveSpeed) +\n (position.x * waveLength) +\n (position.z * waveLength) +\n rand2(position.xzz)\n );\n float phase1 = randomHeight * sin(\n cos(rand(position.xzz) *\n randomHeight * cos(vCurrentTime * randomSpeed * sin(rand(position.xxz))))\n );\n\n vec4 actualPos =\n vec4(position.x, position.y + phase0 + phase1 - waveHeight - randomHeight, position.z, 1.0);\n\n vWorldViewPosition = (worldView * actualPos).xyz;\n gl_Position = worldViewProjection * actualPos;\n}\n",BABYLON.Effect.ShadersStore.waterFragmentShader="\n#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n\nuniform vec3 waveColor;\n\nvarying float vCurrentTime;\nvarying vec3 vWorldViewPosition;\n\nvec3 faceNormal(vec3 worldViewPos) {\n vec3 fdx = dFdx(worldViewPos);\n vec3 fdy = dFdy(worldViewPos);\n return normalize(cross(fdx, fdy));\n}\n\nvoid main(void) {\n float lightIntensity = 0.95;\n vec3 lightDirection = normalize(vec3(-1.0, -3.0, 0.8));\n\n vec3 normal = faceNormal(vWorldViewPosition);\n\n gl_FragColor = vec4(\n mix(waveColor, waveColor * (dot(lightDirection, normal)), lightIntensity),\n 0.90\n );\n}\n"},function(t,e,n){"use strict";n.d(e,"b",function(){return o}
1),n.d(e,"c",function(){return a}),n.d(e,"a",function(){return s});var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},i=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},o=[{id:"atlas",fileName:"textures/atlas.png"},{id:"slash",fileName:"textures/slash.png"},{id:"shadow",fileName:"textures/shadow.png"},{id:"hit",fileName:"textures/hit.png"},{id:"vfx",fileName:"textures/vfx.png"}],a=[{id:"atlas",fileName:"textures/atlas.png"}],s=function(){function t(t){this._assetManager=new BABYLON.AssetsManager(t),this._loadedTextures=new Map}return t.prototype.add=function(t){this.loadResource(t)},t.prototype.hasTexture=function(t){return Boolean(this._loadedTextures.get(t))},t.prototype.getTexture=function(t){var e=this._loadedTextures.get(t);if(!e)throw new Error("the requested texture does not exist.");return e},t.prototype.loadAsync=function(){return r(this,void 0,void 0,function(){var t=this;return i(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,n){t._assetManager.useDefaultLoadingScreen=!1,t._assetManager.onFinish=function(){e()},t._assetManager.load()})];case 1:return e.sent(),[2]}})})},t.prototype.dispose=function(){this._loadedTextures.forEach(function(t){t.dispose()})},t.prototype.loadResource=function(t){var e=this,n=this._assetManager.addTextureTask("task_"+t.id,t.fileName);n.onSuccess=function(){e._loadedTextures.set(t.id,n.texture)}},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(53),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.pointingAt=n,i.pointingFrom=r,i._absoluteTime=0,i._direction=new BABYLON.Vector2(n.x-r.x,n.y-r.y).normalize(),i}return i(e,t),e.prototype.updateElement=function(t){this._element.position.set(this.pointingFrom.x+this._direction.x*this._pixiLayer.unitSize/2*Math.sin(this._absoluteTime%500/500*Math.PI),this.pointingFrom.y+this._direction.y*this._pixiLayer.unitSize/2*Math.sin(this._absoluteTime%500/500*Math.PI)),this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.constructElement=function(){var t=PIXI.loader.resources.atlas.textures.arrow;this._sprite=new PIXI.Sprite(t),this._sprite.scale.set(2*this._pixiLayer.unitSize/t.width),this._sprite.anchor.set(.5,.5),this._element.addChild(this._sprite),this._element.position.copy(this.pointingFrom),this._sprite.rotation=Math.PI/2+Math.atan2(this.pointingAt.y-this.pointingFrom.y,this.pointingAt.x-this.pointingFrom.x),this._pixiLayer.topmostLayer.addChild(this._element)},e.prototype.resizeElement=function(){},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n(38),i=n(2),o=n(14),a=n(302),s=n(143),u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},h=function(t){function e(e,n,s){void 0===n&&(n=[]),void 0===s&&(s=c({},o.a.smallPadding));var u=new r.a(e,0,0);u.element.interactive=!0;var h=new a.a(e,"dialog_corner","dialog_edge","dialog_bg",.3);return h.element.interactive=!0,t.call(this,e,[new i.a(e,[u]),new i.a(e,[h,new i.a(e,n,c({},o.a.extraLargePadding))],s)])||this}return u(e,t),e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(7),i=n(2),o=n(690),a=n(17),s=n(13),u=n(691),c=n(23),h=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(t){function e(e,n,h,l){var f=this,d=new a.a(e,""+n.score.toFixed(),h?s.n:16777215,a.b.Left,{strokeThickness:4,dropShadow:!0}
1);return f=t.call(this,e,[new r.b(e,[new i.a(e,[new c.a(e,0===n.rank?"medal_first_place":"medal"),new i.a(e,[new a.a(e,(n.rank+1).toFixed())],{paddingTop:"16%",paddingBottom:"40%"})],{preferredWidth:"100h",preferredHeight:"100%",forceSquare:!0}),new i.a(e,[new o.a(e,h?PIXI.loader.resources.player_photo.texture:PIXI.Texture.fromImage(n.player.photoUrl))],{preferredWidth:"100h",preferredHeight:"100%",forceSquare:!0})],{flex:1,flexDirectionAlign:i.b.End}),new r.a(e,[new i.a(e,[new a.a(e,n.player.name,s.f,a.b.Left,{strokeThickness:4,dropShadow:!0})],{preferredHeight:"0.5u"}),new i.a(e,[d],{flex:1})],{flex:1,paddingLeft:"0.5u"})],l)||this,h&&new u.a(d,0,n.score,function(t){return t.toFixed()},1500),f}return h(e,t),e}(r.b);!function(t){function e(e,n){return t.call(this,e,(n.higherThanPlayerEntry?[new l(e,n.higherThanPlayerEntry,!1,{preferredHeight:"1.5u"})]:[]).concat([new l(e,n.playerEntry,!0,{paddingTop:"0.2u",preferredHeight:"2.4u",paddingBottom:"0.2u"})],n.lowerThanPlayerEntry?[new l(e,n.lowerThanPlayerEntry,!1,{preferredHeight:"1.5u"})]:[]),{crossDirectionAlign:i.d.Center})||this}h(e,t)}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(53),i=n(31),o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e,n,r){void 0===r&&(r=8);var i=t.call(this,e)||this;return i.innerTexture=n,i.cornerRadius=r,i}return o(e,t),e.prototype.constructElement=function(){this._outerFrame=new PIXI.Sprite(n.i(i.b)("button_2")),this._element.addChild(this._outerFrame),this._mask=new PIXI.Graphics,this._element.addChild(this._mask),this._innerSprite=new PIXI.Sprite(this.innerTexture),this._innerSprite.position.set(this.cornerRadius,this.cornerRadius),this._innerSprite.mask=this._mask,this._element.addChild(this._innerSprite)},e.prototype.resizeElement=function(){this._outerFrame.scale.set(this._width/this._outerFrame.texture.width,this._height/this._outerFrame.texture.height),this._mask.clear(),this._mask.beginFill(16777215),this._mask.drawRoundedRect(this.cornerRadius,this.cornerRadius,this._width-2*this.cornerRadius,this._height-2*this.cornerRadius,this.cornerRadius),this._mask.endFill(),this._innerSprite.width=this._width-2*this.cornerRadius,this._innerSprite.height=this._height-2*this.cornerRadius},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(22),i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n,r,i,o){var a=t.call(this,e.game)||this;return a.uiText=e,a.beginValue=n,a.endValue=r,a.textTemplate=i,a.duration=o,a._absoluteTime=0,a}return i(e,t),e.prototype.updateGameObject=function(t){var e=Math.min(1,this._absoluteTime/this.duration),n=this.beginValue+(this.endValue-this.beginValue)*e,r=this.textTemplate(n);if(this.uiText.text=r,this._absoluteTime+=this.game.engine.getDeltaTime(),e>=1)return void this.dispose()},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(72),i=n(7),o=n(2),a=n(17),s=n(13),u=n(36),c=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=3e3,l=function(t){function e(e){var n=this,r=new a.a(e,(h/1e3).toFixed(),16777215,a.b.Center,{strokeThickness:4,dropShadow:!0}
1);return n=t.call(this,e,[new i.a(e,[new o.a(e,[new a.a(e,"KNOCKED DOWN!",s.f,a.b.Center,{strokeThickness:4,dropShadow:!0})],{preferredHeight:"2u"}),new o.a(e,[r],{preferredHeight:"1.5u"}),new o.a(e,[],{preferredHeight:"4u"}),new o.a(e,[new a.a(e,"Remember to upgrade your items.",16777215,a.b.Center,{strokeThickness:4,dropShadow:!0})],{preferredHeight:"0.75u"})],{flexDirectionAlign:o.b.Center})])||this,n._absoluteTime=0,n._countdown=r,n}return c(e,t),e.prototype.updateElement=function(){if(this._absoluteTime>=h)return this.dispose(),void this.game.getService(u.a).restart(!0);this._countdown.text=Math.ceil((h-this._absoluteTime)/1e3).toFixed(),this._absoluteTime+=this.game.engine.getDeltaTime()},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(25),i=n(301),o=n(7),a=n(2),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.constructElement=function(){var t=this;this._timers=[],this._children.forEach(function(t){t.dispose()}),this._children=[],this._timers=[],this.game.events.on("player_buff_added",function(e){var n=new r.a(t.game,function(){},"spell_"+e.iconId,"button_2");n.events.on("click",function(){});var o=new i.a(t.game);o.buff=e,t._timers.push(o),t.addChild(new a.a(t.game,[n,o],{preferredWidth:"0.7u",preferredHeight:"0.7u",paddingBottom:"0.1u",paddingLeft:"0.1u"}))})},e.prototype.updateElement=function(t){for(var e=[],n=[],r=0;r<this._children.length;++r){var i=this._timers[r].buff;i.isEnded?(this._timers[r].dispose(),this._children[r].dispose()):(e.push(this._children[r]),n.push(this._timers[r]),this._timers[r].percentageMasked=1-i.remainingDuration/i.duration)}e.length!==this._children.length&&(this._children=e,this._timers=n,this.resizeElement())},e}(o.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(43),i=n(25),o=n(9),a=n(34),s=n(80),u=n(7),c=n(2),h=n(13),l=n(37),f=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(t){function e(e){return t.call(this,e,[],{paddingTop:"0.3u",paddingBottom:"0.3u",paddingLeft:"0.3u",paddingRight:"0.3u"})||this}return f(e,t),Object.defineProperty(e.prototype,"button",{get:function(){return this._button},enumerable:!0,configurable:!0}),e.prototype.updateElement=function(){var t=!1,e=0;if(this.game.getService(o.a).inventorySlots.forEach(function(n){n&&n.baseModel.type===a.a.Chest&&(t=!0,e=Math.max(e,n.rarity))}),t)switch(e){case a.b.Common:this._shine.tint=h.i;break;case a.b.Rare:this._shine.tint=h.j;break;case a.b.Epic:this._shine.tint=h.k;break;case a.b.Legendary:this._shine.tint=h.l}this.element.visible=t},e.prototype.constructElement=function(){var t=this;this._shine=new r.a(this.game,5*this._pixiLayer.unitSize,Number.MAX_SAFE_INTEGER);var e=PIXI.loader.resources.atlas.textures.item_Chest;this._button=new i.f(this.game,function(){t.game.getService(l.a).mainDialog.showWithTransitionAsync(s.b.Character)},e);var n=new c.a(this.game,[new c.a(this.game,[this._shine],{paddingTop:"0.75u",paddingLeft:"0.75u"}),this._button],{preferredWidth:"1.5u",preferredHeight:"1.5u"});this.addChild(n)},e}(u.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r=n(697),i=n(698),o=n(693),a=n(696),s=n(694),u=n(72),c=n(7),h=n(2),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(t){function e(e){var n=this,u=new i.a(e),l=new a.a(e),f=new s.a(e),d=new o.a(e),p=new r.a(e);return n=t.call(this,e,[new c.a(e,[u,l,f,new h.a(e,[],{flex:1}),d,p])])||this,n.topRow=u,n.topRow.element.visible=!1,n.secondRow=l,n.secondRow.element.visible=!1,n.chestNotification=f,n.chestNotification.element.visible=!1,n.buffRow=d,n.spellButtons=p,n.spellButtons.element.visible=!1,n}return l(e,t),e}(u.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return y});var r=n(194),i=n(25),o=n(80),a=n(7),s=n(2),u=n(14),c=n(1),h=n(43),l=n(9),f=n(37),d=n(68),p=n(36),g=n(95),_=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},y=function(t){function e(e){var n=this,a=new r.a(e,r.b.Red,16777215),c=new i.a(e,function(){e.getService(f.a).mainDialog.showWithTransitionAsync(o.b.Character)},"bag","button_2"),l=new i.a(e,function(){n._shineSpells.end(),e.getService(f.a).mainDialog.showWithTransitionAsync(o.b.Spells)},"book","button_2"),d=new h.a(e,e.engine.getRenderWidth()),p=new i.a(e,function(){n._shineShopping.end(),e.getService(f.a).mainDialog.showWithTransitionAsync(o.b.Shopping)},"item_Chest","button_2"),g=new h.a(e,2*e.engine.getRenderWidth()),_=new i.a(e,function(){e.getService(f.a).mainDialog.showWithTransitionAsync(o.b.Settings)},"gear","button_2"),y=m({},u.a.mediumPadding,{preferredWidth:u.a.largeSizeValue,preferredHeight:u.a.largeSizeValue});return n=t.call(this,e,[new s.a(e,[c],y),new s.a(e,[new s.a(e,[d],{paddingTop:"50%",paddingLeft:"50%"}),l],y),new s.a(e,[a],{flex:1,preferredHeight:"1u"}),new s.a(e,[new s.a(e,[g],{paddingTop:"50%",paddingLeft:"50%"}),p],y),new s.a(e,[_],y)],{preferredWidth:"100%",preferredHeight:u.a.largeSizeValue,crossDirectionAlign:s.d.Center})||this,n._levelBar=a,n._shineSpells=d,n._shineSpells.element.visible=!1,n._shineShopping=g,n._shineShopping.element.visible=!1,n._trackingCharacter=null,n._buttonShopping=p,n._shineShopping.element.visible=!1,n.game.events.on("level_started",function(t){n._levelBar.text=t.config.title,n._trackingCharacter=null}
1),n.game.events.on("boss_spawned",function(t){n._trackingCharacter=t}),n.game.events.on("player_unlocked_spell",function(t){t.levelRequirement>=14&&(n._shineSpells.element.visible=!0)}),n}return _(e,t),e.prototype.updateElement=function(t){var e=this.game.getService(p.a).currentLevel;if(this._element.visible=null!=e&&e.state===d.a.Started&&e.tutorial.state>=g.a.WaitingForIslandTwo&&(this.game.getService(l.a).baseStats.get(c.b.Level)||0)>=4&&!this.game.getService(f.a).mainDialog.isFullyShown,this._element.visible)if(this._trackingCharacter&&this._trackingCharacter.active){var n=this._trackingCharacter.statsController.getStatValue(c.b.MaxHealth).final,r=this._trackingCharacter.statsController.getStatValue(c.b.CurrentHealth).final;this._levelBar.progress=n>0?r/n:0}else this._trackingCharacter=null,this._levelBar.progress=0},Object.defineProperty(e.prototype,"levelBar",{get:function(){return this._levelBar},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shoppingButton",{get:function(){return this._buttonShopping},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shoppingShine",{get:function(){return this._shineShopping},enumerable:!0,configurable:!0}),e}(a.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return x});var r=n(25),i=n(15),o=n(301),a=n(9),s=n(7),u=n(2),c=n(14),h=n(23),l=n(43),f=n(13),d=n(80),p=n(1),g=n(36),_=n(37),m=n(95),y=n(193),v=n(68),b=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},x=function(t){function e(e){for(var n=this,p=[],m=[],v=[],b=[],x=0;x<4;++x)!function(t){var n=new u.a(e,[],{paddingTop:"50%",paddingLeft:"50%"}),s=new r.a(e,function(){var r=n.getChildAt(0);r&&r.end();var o=e.getService(g.a).currentLevel;if(o&&o.player){var s=e.getService(a.a).spellSlots[t];i.b.getSpell(s).cast(o.player)}},"button_1","button_2",{paddingTop:"11%",paddingBottom:"11%",paddingLeft:"11%",paddingRight:"11%"}),h=new o.a(e);v.push(n),p.push(h),m.push(s),b.push(new u.a(e,[n,s,new u.a(e,[h],{paddingTop:"11%",paddingLeft:"11%",paddingRight:"11%",paddingBottom:"11%"})],w({},c.a.mediumPadding,c.a.extraLargeSquare)))}(x);var S=new r.a(e,function(){n._bagShine.element.visible&&(n._bagShine.element.visible=!1),e.getService(_.a).mainDialog.showWithTransitionAsync(d.b.Character)},"bag","button_2",{paddingTop:"5%",paddingLeft:"5%",paddingRight:"5%",paddingBottom:"5%"}),T=new h.a(e,"background_2",16777215,Math.PI);T.element.interactive=!0;var E=new l.a(e,2*e.engine.getRenderWidth()),P=new h.a(e,"plus");return n=t.call(this,e,[new s.b(e,[new u.a(e,[T,new s.b(e,b,w({},c.a.mediumPadding,{paddingLeft:c.a.extraLargePaddingValue,paddingRight:c.a.extraLargePaddingValue}))])],{flex:1,flexDirectionAlign:u.b.Center}),new u.a(e,[new u.a(e,[new u.a(e,[E],{paddingTop:"50%",paddingLeft:"50%"}),S,new u.a(e,[P],{paddingLeft:"60%",paddingBottom:"60%",preferredWidth:"40%",preferredHeight:"40%"})],{preferredWidth:"1.7u",preferredHeight:"1.7u"})],{paddingRight:c.a.smallPaddingValue})],{preferredWidth:"100%",crossDirectionAlign:u.d.Center})||this,n._shineSlots=v,n._buttons=m,n._bagButton=S,n._timers=p,n._bagBadge=P,n._bagShine=E,n._bagShine.element.visible=!1,n._onSpellSlotsUpdated=function(){n.updateIcons()},n.game.events.on("spell_slots_updated",n._onSpellSlotsUpdated),n.game.events.on("player_unlocked_spell",function(t){for(var r=n.game.getService(a.a).spellSlots,o=0;o<4;++o)if(r[o]===t.id){n._shineSlots[o].clearChildren(),n._shineSlots[o].addChild(new l.a(e,2*e.engine.getRenderWidth(),Number.MAX_SAFE_INTEGER,f.p)),t.id!==i.a.Smash&&new y.a(n.game,t.displayName+"!");break}}),n}return b(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){return this._buttons},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bagButton",{get:function(){return this._bagButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bagShine",{get:function(){return this._bagShine},enumerable:!0,configurable:!0}),e.prototype.constructElement=function(){this.updateIcons()},e.prototype.updateElement=function(t){var e=this.game.getService(g.a).currentLevel;if(this.element.visible=null!=e&&e.state===v.a.Started&&e.tutorial.state>=m.a.WaitingForSpellCast&&!this.game.getService(_.a).mainDialog.
1isFullyShown,this.element.visible){for(var n=this.game.getService(a.a).spellSlots,r=0;r<4;++r)if(e&&e.player){var i=this._timers[r],o=n[r],s=e.player.cooldownController.getSpellCooldown(o);i.percentageMasked=s.remaining/s.total,s.remaining<=5.5?i.secondsLeft=s.remaining:i.secondsLeft=0}this._bagBadge.element.visible=null!=e&&this._bagButton.element.visible&&(e.player.statsController.getStatValue(p.b.Level).final>=4&&e.index>=2||e.player.statsController.getStatValue(p.b.Level).final>=5)&&this.game.getService(a.a).isAnyEquipmentUpgradable(),this._bagBadge.element.visible&&(this._bagBadge.scale=1+.3*(1+Math.sin(this._timeSinceCreated/1e3*Math.PI*4)))}},e.prototype.disposeElement=function(){this.game.events.off("spell_slots_updated",this._onSpellSlotsUpdated)},e.prototype.updateIcons=function(){for(var t=this.game.getService(a.a).spellSlots,e=0;e<4;++e)t[e]===i.a.Empty?this._buttons[e].foreground.textureName="button_1":this._buttons[e].foreground.textureName="spell_"+t[e].toFixed()},e}(s.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(1),i=n(194),o=n(7),a=n(2),s=n(14),u=n(36),c=n(68),h=n(95),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d=function(t){function e(e){var n=this,r=new i.a(e,i.b.Blue,16777215,"cup"),o=new i.a(e,14126407,16777215,"coin_single"),u=new i.a(e,14126407,16777215,"diamond");o.progress=0,u.progress=0;var c=f({},s.a.mediumPadding,{paddingBottom:0,flex:1});return n=t.call(this,e,[new a.a(e,[r],c),new a.a(e,[u],c),new a.a(e,[o],c)],{preferredWidth:"100%",preferredHeight:"0.8u"})||this,n._experienceBar=r,n._resource1Bar=o,n._resource2Bar=u,n}return l(e,t),e.prototype.updateElement=function(t){var e=this.game.getService(u.a).currentLevel;if(this.element.visible=null!=e&&e.state===c.a.Started&&e.tutorial.state>=h.a.WaitingForIslandTwo,e&&this.element.visible){var n=e.player.statsController.getStatValue(r.b.Level).final;this._experienceBar.text="Lv. "+n;var i=e.player.statsController.getStatValue(r.b.CurrentExperience).final,o=e.player.statsController.getStatValue(r.b.MaxExperience).final,a=Math.min(1,i/o);this._experienceBar.progress=a;var s=e.player.statsController.getStatValue(r.b.Resource1).final,l=e.player.statsController.getStatValue(r.b.Resource2).final;this._resource1Bar.text=s.toFixed(),this._resource2Bar.text=l.toFixed()}},e}(o.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n(25),i=n(72),o=n(2),a=n(7),s=n(17),u=n(14),c=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(t){function e(e){var n=t.call(this,e,[new o.a(e,[new a.a(e,[new o.a(e,[new s.c(e,"Choose Your Hero")],{preferredHeight:u.a.extraLargeSizeValue}),new o.a(e,[],{preferredHeight:"40%"}),new o.a(e,[new r.b(e,function(){n.events.emit("gender_confirmed")},"START","plank_1")],{preferredHeight:"1u",paddingLeft:"3u",paddingRight:"3u"}),new o.a(e,[],{preferredHeight:"10%"})],{flexDirectionAlign:o.b.Center})])])||this;return n}return c(e,t),e}(i.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(37),i=n(300),o=n(190),a=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.shouldBeVisible=function(){return this.game.getService(r.a).mainDialog.
1isFullyShown&&this.game.getService(r.a).mainDialog.charactersTab.element.visible&&!this.game.getService(r.a).mainDialog.charactersTab.previewArea.itemUI&&!this.game.getService(o.a).visible&&this._element.visible},e.prototype.renderedHeight=function(){return 210},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(710),i=n(116),o=n(700),a=n(2),s=n(7),u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(t){function e(e){var n=this,r=new a.a(e,[]);return n=t.call(this,e,[new o.a(e),new s.a(e,[new a.a(e,[],{flex:1}),r,new a.a(e,[],{flex:1})])],{flex:1})||this,n._itemUIContainer=r,n}return u(e,t),Object.defineProperty(e.prototype,"itemUI",{get:function(){return this._itemUI},enumerable:!0,configurable:!0}),e.prototype.clearItemUI=function(){this._itemUIContainer.clearChildren(),this._itemUI=null},e.prototype.showChestDetails=function(t,e){this.clearItemUI();var n=new r.a(this.game,t,e);return this._itemUIContainer.addChild(n),this._itemUI=n,n.showWithTransitionAsync(),n},e.prototype.showUpgradeAnimation=function(t,e){this.clearItemUI();var n=new r.b(this.game,t,e);return this._itemUIContainer.addChild(n),this._itemUI=n,n.showWithTransitionAsync(),n},e.prototype.showItemDetails=function(t,e){this.clearItemUI();var n=new i.a(this.game,t,e);return this._itemUIContainer.addChild(n),this._itemUI=n,n.showWithTransitionAsync().then(function(){}),n},e}(a.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r=n(34),i=n(704),o=n(701),a=n(7),s=n(2),u=n(14),c=n(303),h=n(9),l=n(38),f=n(116),d=n(25),p=n(43),g=n(37),_=n(80),m=n(95),y=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(t){function e(e){var n=this,h=new o.a(e),f=new c.a(e);f.events.on("click",function(t){n.onSlotClicked(t)});var m=new p.a(e,2*e.engine.getRenderWidth()),y=new a.b(e,[new s.a(e,[new s.a(e,[m],{paddingTop:"50%",paddingLeft:"50%"}),new d.b(e,function(){e.getService(g.a).mainDialog.switchTab(_.b.Shopping)},"SHOP","plank_1")],{preferredWidth:"3u",preferredHeight:"1.5u"})],{flexDirectionAlign:s.b.Center,crossDirectionAlign:s.d.Center,paddingTop:"1.5u",paddingBottom:"1.5u"}),v=new l.a(e,0,0,0);return v.element.interactive=!0,v.element.on("mousedown",function(){h.clearItemUI()}),v.element.on("touchstart",function(){h.clearItemUI()}),n=t.call(this,e,[v,new a.a(e,[new a.b(e,[new a.a(e,[new i.a(e,r.a.Helmet),new i.a(e,r.a.Weapon)],{flexDirectionAlign:s.b.Center}),h,new a.a(e,[new i.a(e,r.a.Torso),new i.a(e,r.a.Boots)],{flexDirectionAlign:s.b.Center})],{flex:1,paddingLeft:u.a.largePaddingValue,paddingRight:u.a.largePaddingValue}),new s.a(e,[f,y])],{crossDirectionAlign:s.d.Center})])||this,n.previewArea=h,n.inventorySlots=f,n._shopButtonContainer=y,n._shopShine=m,n}return y(e,t),Object.defineProperty(e.prototype,"inventorySlotButtons",{get:function(){return this.inventorySlots.inventorySlotButtons},enumerable:!0,configurable:!0}),e.prototype.onSlotClicked=function(t){if(this.previewArea.itemUI instanceof f.a&&this.previewArea.itemUI.sourceSlot===t)this.previewArea.clearItemUI();else{var e=this.game.getService(h.a).getInventoryItem(t);e?e.baseModel.type===r.a.Chest?this.previewArea.showChestDetails(e,t):this.previewArea.showItemDetails(e,t):this.game.getService(g.a).mainDialog.switchTab(_.b.Shopping)}},e.prototype.updateElement=function(){var t=this.game.getService(h.a);t.isInventoryEmpty()?(this.inventorySlots.element.visible=!1,this._shopButtonContainer.element.visible=!0):(this.inventorySlots.element.visible=!0,this._shopButtonContainer.element.visible=!1),this._shopButtonContainer.element.visible&&(this._shopShine.element.visible=0===t.chestsPurchased&&t.tutorialState===m.a.WaitingForItemEquip)},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return w});var r,i=n(72),o=n(2),a=n(31),s=n(38),u=n(23),c=n(43),h=n(73),l=n(9),f=n(139),d=n(7),p=n(25),g=n(14),_=n(80),m=n(17),y=n(37),v=n(70),b=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(t){function e(e,n){var r=this,a=new p.b(e,function(){r.dispose(),e.getService(y.a).mainDialog.switchTab(_.b.Character)},"OKAY","plank_1"),u=new m.a(e,"TAP TO OPEN");r=t.call(this,e,[new s.a(e,0,.7),new d.a(e,[new o.a(e,[a,u],{preferredHeight:g.a.largeSizeValue})],{flexDirectionAlign:o.b.End,paddingBottom:"10%",paddingLeft:"30%",paddingRight:"30%"})],{},i.a.Topmost)||this,a.element.visible=!1,r._chestAnimations=[];for(var c=0,h=0;h<n.length;++h){var l=new x(e,n[h],0===h?0:500*Math.random());if(r._chestAnimations.push(l),r.element.addChild(l.element),l.events.once("completed",function(){++c>=n.length&&(a.element.visible=!0,u.element.visible=!1)}),1===n.length)l.element.position.set(r.game.engine.getRenderWidth()/2-r._pixiLayer.unitSize,r.game.engine.getRenderHeight()/2-r._pixiLayer.unitSize);else{var f=2*Math.PI*h/n.length+Math.PI,v=r.game.engine.getRenderWidth()/3;l.element.position.set(Math.sin(f)*v+r.game.engine.getRenderWidth()/2-r._pixiLayer.unitSize,Math.cos(f)*v+r.game.engine.getRenderHeight()/2-r._pixiLayer.unitSize)}}return r}return b(e,t),e.prototype.disposeElement=function(){this._chestAnimations.forEach(function(t){t.dispose()})},e}(i.b);!function(t){t[t.ShowingUp=0]="ShowingUp",t[t.WaitingForClick=1]="WaitingForClick",t[t.ItemArriving=2]="ItemArriving",t[t.Result=3]="Result"}(r||(r={}));var x=function(t){function e(e,n,i){var s=this,c=new u.a(e,"item_Chest"),h=new o.a(e,[],{paddingTop:"50%",paddingLeft:"50%"});s=t.call(this,e,[h,c])||this,s.ensureConstructed();var l=2*e.getService(a.a).unitSize;return s.resize(l,l),c.element.interactive=!0,c.element.on("mousedown",function(){s.onClick()}),c.element.on("touchstart",function(){s.onClick()}),s._absoluteTime=-i,s._slot=n,s._state=r.ShowingUp,s._lastStateSwitchTime=0,s._itemIcon=c,s._shineContainer=h,s}return b(e,t),e.prototype.updateElement=function(t){switch(this._state){case r.ShowingUp:var e=this.game.engine.getRenderHeight();this._itemIcon.element.position.y=n.i(f.a)(Math.max(0,this._absoluteTime),1200,-e,e),this._absoluteTime>=1200&&(this._state=r.WaitingForClick);break;case r.WaitingForClick:this._itemIcon.scale=1+.1*(Math.sin(this._absoluteTime/1e3*Math.PI*2+3*Math.PI/2)+1);break;case r.ItemArriving:var i=(this._absoluteTime-this._lastStateSwitchTime)/200;this._itemIcon.scale=10*(1-Math.min(1,i))+1,i>=1&&(this._state=r.Result,this.events.emit("completed"));break;case r.Result:}this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.onClick=function(){if(this._state<=r.WaitingForClick){this._state=r.ItemArriving,this._lastStateSwitchTime=this._absoluteTime;var t=this.game.getService(l.a).getInventoryItem(this._slot);if(t&&t.chestOutput){this.game.getService(v.a).playOnce("magic_1");var e=n.i(h.a)(t.chestOutput);this._itemIcon.textureName=e.iconName;var i=this.game.getService(l.a).openChestFromSlot(this._slot);i&&!this.game.getService(l.a).getEquipment(i.baseModel.type)&&this.game.getService(l.a).equipItemFromSlot(this._slot),this.game.getService(y.a).mainDialog.charactersTab.previewArea.clearItemUI();var o=new c.a(this.game,this.game.engine.getRenderWidth()*(.6+.4*Math.random()));this._shineContainer.addChild(o),o.tint=e.rarityColor}}},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return g});var r=n(25),i=n(9),o=n(34),a=n(116),s=n(2),u=n(14),c=n(23),h=n(43),l=n(80),f=n(37),d=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},g=function(t){function e(e,n){var a=this,l=e.getService(i.a).getEquipment(n),f=new r.e(e,function(){a.onClick()},l),d=new c.a(e,"plus"),g="";switch(n){default:case o.a.Torso:g="shadow_armor";break;case o.a.Boots:g="shadow_boots";break;case o.a.Helmet:g="shadow_helmet"}var _=new c.a(e,g),m=new h.a(e,e.engine.getRenderWidth());return m.element.visible=!1,a=t.call(this,e,[new s.a(e,[new s.a(e,[m],{paddingTop:"50%",paddingLeft:"50%"}),f,new s.a(e,[_],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"}),new s.a(e,[d],{paddingLeft:"60%",paddingBottom:"60%",preferredWidth:"40%",preferredHeight:"40%"})],p({},u.a.largeSquare,{forceSquare:!0}))],p({},u.a.mediumPadding,{paddingBottom:u.a.extraLargePaddingValue}))||this,a._equipmentType=n,a._icon=f,a._shine=m,a._typeMask=_,a._typeMask.element.visible=!l,a._bagBadge=d,a._absoluteTime=0,a._onSlotUpdated=function(t,e){t>=i.c&&e.baseModel.type===a._equipmentType&&(a._icon.item=e,a._typeMask.element.visible=!e)},a.game.events.on("player_inventory_slot_updated",a._onSlotUpdated),a}return d(e,t),e.prototype.updateElement=function(t){this._typeMask.element.visible||0!==this.game.getService(i.a).itemsUpgraded||this.game.getService(f.a).mainDialog.charactersTab.previewArea.itemUI?this._shine.element.visible=!1:this._shine.element.visible=!0;var e=this.game.getService(f.a).mainDialog.charactersTab.previewArea.itemUI;e instanceof a.a&&e.sourceSlot===this.game.getService(i.a).getEquipmentSlotInInventory(this._equipmentType)?this._icon.highlight=!0:this._icon.highlight=!1;var n=this.game.getService(i.a);this._bagBadge.element.visible=n.isSlotUpgradable(n.getEquipmentSlotInInventory(this._equipmentType)),this._bagBadge.element.visible&&(this._bagBadge.scale=1+.3*(1+Math.sin(this._absoluteTime/1e3*Math.PI*4))),this._absoluteTime+=this.game.engine.getDeltaTime()},e.prototype.onClick=function(){var t=this.game.getService(f.a).mainDialog.charactersTab.previewArea.itemUI;if(t instanceof a.a&&t.sourceSlot===this.game.getService(i.a).getEquipmentSlotInInventory(this._equipmentType))this.game.getService(f.a).mainDialog.charactersTab.previewArea.clearItemUI();else{var e=this.game.getService(i.a).getEquipment(this._equipmentType);e?this.game.getService(f.a).mainDialog.charactersTab.previewArea.showItemDetails(e,this.game.getService(i.a).getEquipmentSlotInInventory(e.baseModel.type)):this.game.getService(f.a).mainDialog.switchTab(l.b.Shopping)}},e.prototype.disposeElement=function(){this.game.events.off("player_inventory_slot_updated",this._onSlotUpdated)},e}(s.a);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}d(e,t),e.prototype.onClick=function(){var t=this;this.game.getService(f.a).mainDialog.showWithTransitionAsync(l.b.Character).then(function(){t.game.getService(f.a).mainDialog.charactersTab.previewArea.clearItemUI();var e=t.game.getService(i.a).getEquipment(t._equipmentType);e?t.game.getService(f.a).mainDialog.charactersTab.previewArea.showItemDetails(e,t.game.getService(i.a).getEquipmentSlotInInventory(e.baseModel.type)):t.game.getService(f.a).mainDialog.switchTab(l.b.Shopping)})}}(g)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(72),i=n(2),o=n(38),a=n(73),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function e(e,s){var u=this,c=new i.a(e,[new o.a(e,0,.7)],{preferredWidth:"100%",preferredHeight:"100%"});c.element.interactive=!0,u=t.call(this,e,[c],{},r.a.Modal)||this;var h=n.i(a.a)(s);return u._icon1=new PIXI.Sprite(PIXI.loader.resources.atlas.textures[h.iconName]),u._icon1.scale.set(3*u._pixiLayer.unitSize/u._icon1.texture.width,3*u._pixiLayer.unitSize/u._icon1.texture.height),u._icon1.anchor.set(.5),u._pixiLayer.topmostLayer.addChild(u._icon1),u._icon2=new PIXI.Sprite(PIXI.loader.resources.atlas.textures[h.iconName]),u._icon2.scale.set(3*u._pixiLayer.unitSize/u._icon2.texture.width,3*u._pixiLayer.unitSize/u._icon2.texture.height),u._icon2.anchor.set(.5),u._pixiLayer.topmostLayer.addChild(u._icon2),u._absoluteTime=0,u}return s(e,t),e.prototype.disposeElement=function(){this._icon1.destroy(),this._icon2.destroy()},e.prototype.updateElement=function(t){var e=this._absoluteTime/2e3;if(e>=1)return this.events.emit("completed"),void this.dispose();this._icon1.position.set(this._width/2*Math.sin(e*Math.PI/2),this._height/2),this._icon2.position.set(this._width-this._width/2*Math.sin(e*Math.PI/2),this._height/2),this._absoluteTime+=this.game.engine.getDeltaTime()},e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return T});var r=n(71),i=n(9),o=n(7),a=n(2),s=n(14),u=n(23),c=n(17),h=n(13),l=n(77),f=n(1),d=n(25),p=n(708),g=n(705),_=n(16),m=n(73),y=n(70),v=n(36),b=n(37),w=n(105),x=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},T=function(t){function e(e,r,x,T){var E=this,P=e.getService(i.a),O=P.getInventoryItem(r),M=P.getInventoryItem(x),C=n.i(m.a)(O),A=n.i(m.a)(M),I=n.i(m.a)(T),R=n.i(l.o)(O),D=(P.baseStats.get(f.b.Resource1)||0)>=R.resource1,L=(P.baseStats.get(f.b.Resource2)||0)>=R.resource2,k=new d.b(e,function(){if(D&&L){_.a.logEvent("forge_item_confirmed",new Map([["forge_item_playerlevel",(e.getService(i.a).baseStats.get(f.b.Level)||0).toFixed()]]),null),E.close(),e.getService(y.a).playOnce("forge");new g.a(e,O).events.on("completed",function(){P.destroyItemAtSlot(r),P.destroyItemAtSlot(x);var t=e.getService(v.a).currentLevel;t&&(t.player.statsController.setBaseStat(f.b.Resource1,(P.baseStats.get(f.b.Resource1)||0)-R.resource1),t.player.statsController.setBaseStat(f.b.Resource2,(P.baseStats.get(f.b.Resource2)||0)-R.resource2)),P.putItemIntoInventory(T,Math.max(r,x)),e.getService(b.a).mainDialog.charactersTab.previewArea.clearItemUI(),e.getService(b.a).mainDialog.charactersTab.previewArea.showItemDetails(T,Math.max(r,x)),new p.a(e,T).showWithTransitionAsync()})}else e.getService(y.a).playOnce("warning"),e.getService(w.a).pushText(D?"REQUIRES "+R.resource2+" DIAMONDS":"REQUIRES "+R.resource1+" COINS",!0,.5,h.a,3e3,!1)},"FORGE","plank_1");return k.text.color=D&&L?16777215:h.a,E=t.call(this,e,[new o.a(e,[new o.b(e,[new a.a(e,[new u.a(e,"rounded_square_white",C.rarityColor),new a.a(e,[new u.a(e,"button_1"),new u.a(e,C.iconName),n.i(m.c)(e,O)],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],S({},s.a.largeSquare)),new a.a(e,[new c.a(e,"+",h.h)],{preferredWidth:"3u",preferredHeight:"3u"}),new a.a(e,[new u.a(e,"rounded_square_white",A.rarityColor),new a.a(e,[new u.a(e,"button_1"),new u.a(e,A.iconName),n.i(m.c)(e,M)],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],S({},s.a.largeSquare))],{flexDirectionAlign:a.b.Center,crossDirectionAlign:a.d.Center}),new a.a(e,[new c.a(e,"RESULT",h.g)],{preferredHeight:"0.75u"}),new a.a(e,[new c.a(e,""+T.baseModel.name,I.rarityColor,c.b.Center,{strokeThickness:4})],{preferredHeight:"0.7u",paddingBottom:"0.1u"}),new a.a(e,[new u.a(e,"rounded_square_white",I.rarityColor),new a.a(e,[new u.a(e,"button_1"),new u.a(e,C.iconName),n.i(m.c)(e,T)],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],S({},s.a.extraLargeSquare)),new a.a(e,[new
1 c.a(e,"COST",h.g)],{preferredHeight:"1u",paddingTop:"0.25u"}),new o.a(e,[new o.b(e,[new o.b(e,[new a.a(e,[new c.a(e,R.resource1.toFixed(),D?16777215:h.a,c.b.Right)],{preferredHeight:s.a.smallSizeValue,preferredWidth:"100%",paddingLeft:s.a.mediumPaddingValue})],{flex:1,flexDirectionAlign:a.b.End,paddingRight:s.a.mediumPaddingValue}),new o.b(e,[new a.a(e,[new u.a(e,"coin_single")],S({},s.a.smallSquare))],{flex:1})],S({},s.a.mediumPadding)),new o.b(e,[new o.b(e,[new a.a(e,[new c.a(e,R.resource2.toFixed(),L?16777215:h.a,c.b.Right)],{preferredHeight:s.a.smallSizeValue,preferredWidth:"100%",paddingLeft:s.a.mediumPaddingValue})],{flex:1,flexDirectionAlign:a.b.End,paddingRight:s.a.mediumPaddingValue}),new o.b(e,[new a.a(e,[new u.a(e,"diamond")],S({},s.a.smallSquare))],{flex:1})],S({},s.a.mediumPadding))]),new a.a(e,[k],{preferredWidth:"30%",preferredHeight:"1.7u",paddingTop:s.a.largePaddingValue,paddingBottom:s.a.extraLargePaddingValue})],{crossDirectionAlign:a.d.Center})])||this}return x(e,t),e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return y});var r=n(71),i=n(23),o=n(7),a=n(2),s=n(14),u=n(73),c=n(17),h=n(13),l=n(38),f=n(303),d=n(9),p=n(706),g=n(103),_=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},y=function(t){function e(e,r,i){var a=this,s=e.getService(d.a),h=new f.a(e,function(t){var e=s.getInventoryItem(t);return!(!e||t===i||e.baseModel.modelId!==r.baseModel.modelId||e.baseModel.name!==r.baseModel.name||e.rarity!==r.rarity||e.itemLevel!==r.itemLevel)});h.events.on("click",function(t){var e=n.i(g.p)(r);e&&a.showForgeConfirmation(i,t,e)});var l=n.i(u.a)(r);return a=t.call(this,e,[new o.a(e,[new o.b(e,[new c.a(e,""+r.baseModel.name,l.rarityColor,c.b.Center,{strokeThickness:4})],{preferredHeight:"0.6u"}),b(e,r),v(e),h])])||this}return _(e,t),e.prototype.showForgeConfirmation=function(t,e,n){this.close(),this.dispose(),new p.a(this.game,t,e,n).showWithTransitionAsync().then(function(){}).catch(function(){})},e}(r.b),v=function(t){return new a.a(t,[new l.a(t,h.o,1,10),new o.a(t,[new a.a(t,[new c.a(t,"CHOOSE FORGE MATERIAL",h.g)],{preferredHeight:"0.5u"}),new a.a(t,[new c.a(t,"Forging requires another identical item.",h.h)],{preferredHeight:"0.5u"})],m({},s.a.mediumPadding,{paddingBottom:s.a.largePaddingValue}))],m({},s.a.extraLargePadding,{paddingTop:s.a.largePaddingValue,paddingBottom:s.a.largePaddingValue}))},b=function(t,e){var r=n.i(u.a)(e),c=new i.a(t,"rounded_square_white",r.rarityColor),h=new i.a(t,"button_1"),l=new i.a(t,r.iconName);return new o.b(t,[new o.b(t,[new a.a(t,[c,new a.a(t,[h,l,n.i(u.c)(t,e)],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],m({},s.a.largeSquare,{forceSquare:!0}))],{flex:1,flexDirectionAlign:a.b.End}),new o.a(t,n.i(u.b)(t,e),{flex:1,preferredHeight:s.a.largeSizeValue,flexDirectionAlign:a.b.Center,paddingLeft:s.a.largePaddingValue,paddingRight:s.a.largePaddingValue})],m({},s.a.largePadding))}},function(t,e,n){"use strict";n.d(e,"a",function(){return m});var r=n(71),i=n(7),o=n(2),a=n(17),s=n(13),u=n(14),c=n(73),h=n(116),l=n(23),f=n(43),d=n(25),p=n(38),g=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},m=function(t){function e(e,r){var g=this,m=n.i(c.a)(r),y=new d.b(e,function(){g.close()},"OKAY","plank_1");return g=t.call(this,e,[new i.a(e,[new o.a(e,[new a.a(e,"CONGRATULATIONS!",
1s.g)],{preferredHeight:"1u"}),new o.a(e,[new o.a(e,[new p.a(e,s.o,1,16)]),new i.a(e,[new i.b(e,[new a.a(e,""+r.baseModel.name,m.rarityColor,a.b.Center,{strokeThickness:4})],{preferredHeight:"0.6u"}),new i.b(e,[new o.a(e,[new l.a(e,"rounded_square_white",m.rarityColor),new o.a(e,[new l.a(e,"button_1"),new l.a(e,m.iconName),n.i(c.c)(e,r)],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],_({},u.a.largeSquare)),new i.a(e,n.i(c.b)(e,r),{preferredHeight:u.a.largeSizeValue,flex:1,flexDirectionAlign:o.b.Center,paddingLeft:u.a.largePaddingValue})],_({},u.a.largePadding)),n.i(h.b)(e,r)],_({},u.a.mediumPadding))],{preferredWidth:"60%"}),new i.b(e,[new o.a(e,[y],{preferredWidth:"2.7u",preferredHeight:"1u",paddingRight:"0.3u"})],{flexDirectionAlign:o.b.Center,paddingTop:u.a.extraLargePaddingValue,paddingBottom:u.a.extraLargePaddingValue})],{crossDirectionAlign:o.d.Center})])||this,g._rarityColor=m.rarityColor,g.shineContainer.addChild(new f.a(g.game,g.game.engine.getRenderHeight(),Number.MAX_SAFE_INTEGER,g._rarityColor)),g}return g(e,t),e}(r.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(25),i=n(9),o=n(2),a=n(14),s=n(116),u=n(43),c=n(69),h=n(37),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d=function(t){function e(e,n){var s=this,u=e.getService(i.a).getInventoryItem(n),c=new r.e(e,function(){s.onClick()},u),h=new o.a(e,[],{paddingTop:"50%",paddingLeft:"50%"});return s=t.call(this,e,[h,c],f({},a.a.smallPadding,{preferredWidth:"1.2u",preferredHeight:"1.2u",forceSquare:!0}))||this,s._icon=c,s._slot=n,s._shineContainer=h,s._shine=null,s._onSlotUpdated=function(t){if(t===s._slot&&!s.disposed){var e=s.game.getService(i.a).getInventoryItem(t);s._icon.item=e}},s.game.events.on("player_inventory_slot_updated",s._onSlotUpdated),e.events.on("player_level_up",function(){if(!s.disposed){var t=s.game.getService(i.a).getInventoryItem(s._slot);s._icon.item=t}}),s}return l(e,t),Object.defineProperty(e.prototype,"slot",{get:function(){return this._slot},set:function(t){t!==this._slot&&(this._slot=t,this._onSlotUpdated(t))},enumerable:!0,configurable:!0}),e.prototype.updateElement=function(t){var e=this.game.getService(h.a).mainDialog.charactersTab.previewArea.itemUI;e instanceof s.a&&e.sourceSlot===this._slot?this._icon.highlight=!0:this._icon.highlight=!1,this.game.getService(c.a).data.shineItemAtSlot===this._slot&&(this._shine||(this._shine=new u.a(this.game,this.game.engine.getRenderWidth()),this._shineContainer.addChild(this._shine)))},e.prototype.onClick=function(){this._slot>=0&&this._slot<i.c+i.d&&(this.events.emit("click",this._slot),this._shine&&(this._shine.dispose(),this._shine=null),this.game.getService(c.a).data.shineItemAtSlot===this._slot&&(this.game.getService(c.a).data.shineItemAtSlot=-1))},e.prototype.disposeElement=function(){this.game.events.off("player_inventory_slot_updated",this._onSlotUpdated)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return b}),n.d(e,"b",function(){return w});var r=n(23),i=n(9),o=n(194),a=n(43),s=n(94),u=n(7),c=n(2),h=n(143),l=n(73),f=n(1),d=n(77),p=n(16),g=n(70),_=n(37),m=n(36),y=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(t){function e(e,i,h){var f=this,d=n.i(l.a)(i),p=new o.a(e,o.b.Blue),_=new r.b(e,PIXI.loader.resources.atlas.textures[d.iconName]);return f=t.call(this,e,[new u.a(e,[new u.b(e,[new u.a(e,[new c.a(e,[new c.a(e,[new a.a(e,e.engine.getRenderHeight(),Number.MAX_SAFE_INTEGER,d.rarityColor)],{paddingTop:"50%",paddingLeft:"50%"}),_],{preferredWidth:"3u",preferredHeight:"3u",forceSquare:!0})],{flexDirectionAlign:c.b.Center})],{flex:1,flexDirectionAlign:c.b.Center}),new c.a(e,[p],{preferredHeight:"1u"})])])||this,f._slot=h,f._item=i,f._progress=p,f._progress.text=f.getProgressText(),f._itemIcon=_,f._noise=new s.a,f.game.getService(g.a).playOnce(f.getSound()),f}return y(e,t),e.prototype.updateElement=function(e){t.prototype.updateElement.call(this,e);var n=Math.min(1,this._absoluteTime/2600);this._progress.progress=n,n>=1?this.open():this._itemIcon.element.position.set(this._noise.simplex2(35*n,0)*this._pixiLayer.unitSize/7,this._noise.simplex2(35*n,1e3)*this._pixiLayer.unitSize/7)},e}(h.a),b=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return y(e,t),e.prototype.getProgressText=function(){return"Opening"},e.prototype.getSound=function(){return"open_chest"},e.prototype.open=function(){var t=this.game.getService(i.a).openChestFromSlot(this._slot);t&&this.game.getService(_.a).mainDialog.charactersTab.previewArea.showItemDetails(t,this._slot)},e}(v),w=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return y(e,t),e.prototype.getProgressText=function(){return"Upgrading"},e.prototype.getSound=function(){return"open_chest"},e.prototype.open=function(){var t=this.game.getService(i.a),e=n.i(d.a)(this._item),r=t.upgradeItemAtSlot(this._slot),o=this.game.getService(m.a).currentLevel;r&&o&&(o.player.statsController.setBaseStat(f.b.Resource1,(t.baseStats.get(f.b.Resource1)||0)-e),t.recordItemUpgrade(),this.game.getService(_.a).mainDialog.charactersTab.previewArea.showItemDetails(r,this._slot),this.game.events.emit("player_upgraded_item",r),p.a.logEvent("item_upgraded",new Map([["base_model",r.baseModel.modelId],["new_level",r.itemLevel.toFixed()]]),null))},e}(v)},function(t,e,n){"use strict";n.d(e,"a",function(){return g});var r=n(17),i=n(7),o=n(2),a=n(14),s=n(25),u=n(48),c=n(16),h=n(13),l=n(71),f=n(36),d=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},g=function(t){function e(e){var n=this,l=function(t){var r=new s.c(e,function(){n.switchGraphics(t)},u.b[t]);return u.a.graphics===t&&(r.isChecked=!0),r},d=function(t){var r=t?.5:0,i=new s.c(e,function(){u.a.musicVolume=r;var i=e.getService(f.a).currentLevel;i&&(i.musicVolume=r),t?(n._musicOnButton.isChecked=!0,n._musicOffButton.isChecked=!1):(n._musicOffButton.isChecked=!0,n._musicOnButton.isChecked=!1,c.a.logEvent("music_turn_off",null,null))},t?"On":"Off");return u.a.musicVolume===r&&(i.isChecked=!0),i},g=function(t){var r=t?1:0,i=new s.c(e,function(){u.a.soundVolume=r,t?(n._soundOnButton.isChecked=!0,n._soundOffButton.isChecked=!1):(n._soundOffButton.isChecked=!0,n._soundOnButton.isChecked=!1,c.a.logEvent("sound_turn_off",null,null))},t?"On":"Off");return u.a.soundVolume===r&&(i.isChecked=!0),i},_=l(u.b.Low),m=l(u.b.Mid),y=l(u.b.High),v=d(!0),b=d(!1),w=g(!0),x=g(!1);return n=t.call(this,e,[new i.b(e,[new o.a(e,[new r.a(e,"Graphics",h.h,r.b.Left)],p({},a.a.largePadding,{flex:1,preferredHeight:"1.2u"})),new o.a(e,[_],{preferredWidth:"1.2u",preferredHeight:"1.2u",paddingLeft:"0.1u",paddingRight:"0.1u"}),new o.a(e,[m],{preferredWidth:"1.2u",preferredHeight:"1.2u",paddingLeft:"0.1u",paddingRight:"0.1u"}),new o.a(e,[y],{preferredWidth:"1.2u",preferredHeight:"1.2u",paddingLeft:"0.1u",paddingRight:"0.1u"})]),new i.b(e,[new o.a(e,[new r.a(e,"Music",h.h,r.b.Left)],p({},a.a.largePadding,{flex:1,preferredHeight:"1.2u"})),new o.a(e,[v],{preferredWidth:"1.2u",preferredHeight:"1.2u",paddingLeft:"0.1u",paddingRight:"0.1u"}),new o.a(e,[b],{preferredWidth:"1.2u",preferredHeight:"1.2u",paddingLeft:"0.1u",paddingRight:"0.1u"})],{paddingTop:a.a.extraLargePaddingValue}),new i.b(e,[new o.a(e,[new r.a(e,"Sound Effects",h.h,r.b.Left)],p({},a.a.largePadding,{flex:1,preferredHeight:"1.2u"})),new o.a(e,[w],{preferredWidth:"1.2u",preferredHeight:"1.2u",paddingLeft:"0.1u",paddingRight:"0.1u"}),new o.a(e,[x],{preferredWidth:"1.2u",preferredHeight:"1.2u",paddingLeft:"0.1u",paddingRight:"0.1u"})],{paddingTop:a.a.extraLargePaddingValue})],p({},a.a.extraLargePadding,{paddingTop:"1.5u"}))||this,n._musicOnButton=v,n._musicOffButton=b,n._soundOnButton=w,n._soundOffButton=x,n}return d(e,t),e.prototype.switchGraphics=function(t){u.a.graphics!==t&&l.a.showModal(this.game,"OKAY",[new o.a(this.game,[new r.a(this.game,"Changing graphics settings\nrequires restarting the game.\nExit now?",h.h,r.b.Center,{align:"center"})],{preferredHeight:"2u"})]).then(function(){c.a.logEvent("change_graphics_setting",new Map([["from_graphics_setting",u.a.graphics.toFixed()],["to_graphics_setting",t.toFixed()]]),null),u.a.graphics=t,c.a.quit()}).catch(function(){})},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return T});var r=n(7),i=n(2),o=n(14),a=n(34),s=n(13),u=n(77),c=n(103),h=n(38),l=n(23),f=n(17),d=n(25),p=n(9),g=n(1),_=n(703),m=n(43),y=n(16),v=n(70),b=n(105),w=n(36),x=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},T=function(t){function e(e){return t.call(this,e,[],S({},o.a.extraLargePadding))||this}return x(e,t),e.prototype.rerfreshEntries=function(){var t=this;this.clearChildren();var e=0===this.game.getService(p.a).chestsPurchased;[new E(this.game,"Common Chest",s.i,"item_Chest","","90% COMMON",s.i,"10% RARE",s.j,e?0:u.e,e?0:u.f,function(t){return e?[n.i(c.e)(1,a.b.Common)]:n.i(c.i)()}),new E(this.game,"Rare Chest",s.j,"item_Chest","","90% RARE",s.j,"10%
1EPIC",s.k,u.g,u.h,function(t){return n.i(c.j)()}),new E(this.game,"Rare Chest x 5",s.j,"item_Chest","x5","90% RARE",s.j,"10% EPIC",s.k,u.i,u.j,function(t){return n.i(c.k)()}),new E(this.game,"Epic Chest",s.k,"item_Chest","","100% EPIC",s.k,"",s.k,u.k,u.l,function(t){return n.i(c.l)()}),new E(this.game,"Epic Chest x 5",s.k,"item_Chest","x5","100% EPIC",s.k,"",s.k,u.m,u.n,function(t){return n.i(c.m)()})].forEach(function(e){t.addChild(e)})},e}(r.a),E=function(t){function e(e,n,a,u,c,p,g,_,y,v,b,w){var x=t.call(this,e,[new h.a(e,s.o,1,6),new r.a(e,[new r.b(e,[new i.a(e,[new l.a(e,"rounded_square_white",a),new i.a(e,[new l.a(e,"button_1"),new l.a(e,u),new i.a(e,[new f.a(e,c,16777215,f.b.Right,{strokeThickness:4})],{paddingTop:"55%",paddingRight:"10%",paddingBottom:"5%"})],{paddingTop:"5%",paddingBottom:"5%",paddingLeft:"5%",paddingRight:"5%"})],{preferredHeight:"100%",preferredWidth:"1h",forceSquare:!0}),new r.a(e,[new i.a(e,[new f.a(e,p,g,f.b.Left)],{preferredHeight:"0.5u"})].concat(_?[new i.a(e,[new f.a(e,_,y,f.b.Left)],{preferredHeight:"0.5u"})]:[]),{flex:2,crossDirectionAlign:i.d.Start,flexDirectionAlign:i.b.Center,paddingLeft:o.a.largePaddingValue}),new r.a(e,[new r.b(e,[new i.a(e,[new f.a(e,""+(v||b?v?v.toFixed():b.toFixed():"FREE"),v||b?16777215:s.n,f.b.Right,{strokeThickness:4})],{flex:1,paddingRight:"0.1u"}),new i.a(e,[new l.a(e,b?"diamond":"coin_single")],{preferredHeight:"100%",preferredWidth:"1h",forceSquare:!0,paddingTop:"10%",paddingLeft:"10%",paddingRight:"10%",paddingBottom:"10%"})],{flex:1}),new i.a(e,[],{flex:.5}),new i.a(e,(v||b?[]:[new i.a(e,[new m.a(e,e.engine.getRenderWidth())],{paddingTop:"50%",paddingLeft:"50%"})]).concat([new d.b(e,function(){x.buy()},"BUY","plank_1")]),{preferredWidth:"80%",flex:1.5})],{flex:1,crossDirectionAlign:i.d.End})],S({},o.a.largePadding,{flex:1}))])],S({},o.a.largePadding,{flex:1}))||this;return x.name=n,x.color=a,x.iconName=u,x.iconText=c,x.descText1=p,x.descText1Color=g,x.descText2=_,x.descText2Color=y,x.priceResource1=v,x.priceResource2=b,x.productFactory=w,x}return x(e,t),e.prototype.buy=function(){var t=this.game.getService(p.a),e=t.baseStats.get(g.b.Resource1)||0,r=e>=this.priceResource1,i=t.baseStats.get(g.b.Resource2)||0,o=i>=this.priceResource2;if(r&&o){for(var a=this.productFactory(this.game),u=0,h=0;h<p.c;++h)t.getInventoryItem(h)||u++;if(u>=a.length){var l=this.game.getService(w.a).currentLevel;l&&(l.player.statsController.setBaseStat(g.b.Resource1,e-this.priceResource1),l.player.statsController.setBaseStat(g.b.Resource2,i-this.priceResource2));var f=[];a.forEach(function(e){f.push(t.putItemIntoInventory(n.i(c.n)(e)))}),new _.a(this.game,f),t.recordChestPurchase(),y.a.logEvent("chest_purchased",new Map([["product",this.name]]),null)}else this.game.getService(v.a).playOnce("warning"),this.game.getService(b.a).pushText("INVENTORY IS FULL",!0,.5,s.a,3e3,!1)}else this.game.getService(v.a).playOnce("warning"),this.game.getService(b.a).pushText(r?"REQUIRES "+this.priceResource2+" DIAMONDS":"REQUIRES "+this.priceResource1+" COINS",!0,.5,s.a,3e3,!1)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return x});var r,i=n(25),o=n(15),a=n(9),s=n(2),u=n(14),c=n(7),h=n(17),l=n(23),f=n(1),d=n(71),p=n(13),g=n(38),_=n(16),m=n(36),y=n(105),v=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};!function(t){t[t.Left=0]="Left",t[t.Right=1]="Right"}(r=r||(r={}));var w=function(t,e){return e===r.Right?t.reverse():t},x=function(t){function e(e,n,d,_){var m=this,y=o.b.getSpell(n),v=new g.a(e,0,.5,16),x=new s.a(e,[v,new c.a(e,[new c.b(e,[new s.a(e,[new l.a(e,"lock")],{preferredWidth:"0.75u",preferredHeight:"0.75u"})],{flexDirectionAlign:s.b.Center}),new c.b(e,[new s.a(e,[new h.a(e,"Lv. "+y.levelRequirement.toFixed(),16777215,h.b.Center,{strokeThickness:3})],{preferredHeight:"0.5u"})],{flexDirectionAlign:s.b.Center})],{flexDirectionAlign:s.b.Center})]),S=new c.a(e,[new s.a(e,[new h.a(e,("Slot "+(d+1).toFixed()).toUpperCase(),p.h,_===r.Left?h.b.Right:h.b.Left)],{preferredHeight:"0.35u"}),new s.a(e,[new h.a(e,y.displayName.toUpperCase(),p.g,_===r.Left?h.b.Right:h.b.Left,{fontWeight:"bold"})],{preferredHeight:"0.5u"})],{flexDirectionAlign:s.b.Center,flex:1}),T=new i.a(e,function(){m.onSpellButtonClick()},"spell_"+n,"button_2",{paddingTop:"11%",paddingBottom:"11%",paddingLeft:"11%",paddingRight:"11%"}),E=new s.a(e,[new i.a(e,function(){m.onDescButtonClick()},"exit","button_2_corner",{paddingTop:"15%",paddingRight:"15%",paddingLeft:"50%",paddingBottom:"50%"},Math.PI/4)],{paddingLeft:"60%",paddingBottom:"60%"});return m=t.call(this,e,w([S,new s.a(e,[T,x,E],b({},u.a.mediumPadding,u.a.extraLargeSquare,{preferredWidth:"2u",preferredHeight:"2u",forceSquare:!0}))],_),{flex:1})||this,m._spell=y,m._spellId=n,m._slot=d,m._lockedMask=x,m._text=S,m._button=T,m._lockedMask.element.visible=!1,e.events.on("level_started",function(t){m._lockedMask.element.visible=t.player.statsController.getStatValue(f.b.Level).final<o.b.getSpell(m._spellId).levelRequirement,m._button.element.alpha=m._text.element.alpha=m.game.getService(a.a).spellSlots[m._slot]===m._spellId?1:.5}),e.events.on("player_unlocked_spell",function(t){t.id===m._spellId&&(m._lockedMask.element.visible=!1)}),m._spellSlotsUpdatedHandler=function(){m._button.element.alpha=m._text.element.alpha=m.game.getService(a.a).spellSlots[m._slot]===m._spellId?1:.5},m.game.events.on("spell_slots_updated",m._spellSlotsUpdatedHandler),m}return v(e,t),e.prototype.disposeElement=function(){this.game.events.off("spell_slots_updated",this._spellSlotsUpdatedHandler)},e.prototype.onSpellButtonClick=function(){if(!this._lockedMask.element.visible&&1!==this._button.element.alpha){var t=this.game.getService(a.a),e=t.spellSlots[this._slot],n=this.game.getService(m.a).currentLevel;n&&e!==o.a.Empty&&n.player.cooldownController.getSpellCooldown(e).remaining>0?(this.game.getService(y.a).pushText("SLOT "+(this._slot+1).toFixed()+" IN COOLDOWN",!0,.6,p.a,3e3,!1),n.soundManager.playOnce("warning")):(this.game.getService(a.a).setSpellSlot(this._slot,this._spellId),_.a.logEvent("spell_get_selected",new Map([["select_spell_id",this._spellId.toFixed()]]),null))}},e.prototype.onDescButtonClick=function(){d.a.showModal(this.game,"OKAY",[new c.a(this.game,[new c.b(this.game,[new s.a(this.game,[new h.a(this.game,this._spell.displayName,p.g)],{preferredHeight:"1u"})],{flexDirectionAlign:s.b.Center,paddingBottom:u.a.largePaddingValue}),new c.b(this.game,[new s.a(this.game,[new l.a(this.game,"spell_"+this._spellId)],b({},u.a.extraLargeSquare))],{flexDirectionAlign:s.b.Center}),new s.a(this.game,[new h.a(this.game,this._spell.description,p.h,h.b.Center,{align:"center"})],{preferredHeight:"2u"})],b({},u.a.mediumPadding))])},e}(c.b)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(15),i=n(713),o=n(7),a=n(2),s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function e(e){for(var n=[],s=0;s<4;++s)!function(t){var a=[];
1if(r.b.listSpells().forEach(function(e){e.slot===t&&e.isForPlayer&&a.push(e)}),2!==a.length)throw new Error("each slot must have 2 spells right now");var s=new i.a(e,a[0].id,t,i.b.Left),u=new i.a(e,a[1].id,t,i.b.Right);n.push(new o.b(e,[s,u],{preferredWidth:"100%"}))}(s);return t.call(this,e,n,{flexDirectionAlign:a.b.Center})||this}return s(e,t),e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return y});var r=n(7),i=n(2),o=n(17),a=n(188),s=n(1),u=n(9),c=n(71),h=n(13),l=n(14),f=n(23),d=n(674),p=n(16),g=n(36),_=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},y=function(t){function e(e,n,a,s){var u=t.call(this,e,"OKAY",[new r.a(e,[new i.a(e,[new o.a(e,"GREETINGS",h.g)],{preferredHeight:"0.75u"}),new i.a(e,[new o.a(e,"While you were away...",h.h)],{preferredHeight:"0.5u"}),new i.a(e,[new o.a(e,"Your hero killed "+n+" enemies!",h.h)],{preferredHeight:"0.5u"}),new r.b(e,[new i.a(e,[new f.a(e,"button_2"),new r.a(e,[new i.a(e,[new f.a(e,"coin_single")],m({},l.a.largeSquare,l.a.largePadding)),new i.a(e,[new o.a(e,"+"+a.toFixed(),16777215)],{preferredHeight:"0.5u"})],{flexDirectionAlign:i.b.Center,crossDirectionAlign:i.d.Center})],m({preferredWidth:"3.5u",preferredHeight:"3.5u"},l.a.extraLargePadding)),new i.a(e,[new f.a(e,"button_2"),new r.a(e,[new i.a(e,[new f.a(e,"item_Chest")],m({},l.a.largeSquare)),new i.a(e,[new o.a(e,"+"+s.length.toFixed(),16777215)],{preferredHeight:"0.5u"})],{flexDirectionAlign:i.b.Center,crossDirectionAlign:i.d.Center})],m({preferredWidth:"3.5u",preferredHeight:"3.5u"},l.a.extraLargePadding))],{flexDirectionAlign:i.b.Center})])])||this;return u.enemyKills=n,u.resource1Reward=a,u.itemReward=s,u}return _(e,t),e.prototype.showWithTransitionAsync=function(){var e=this;return t.prototype.showWithTransitionAsync.call(this).then(function(){e.claimRewards()}).catch(function(){e.claimRewards()})},e.prototype.claimRewards=function(){var t=this,e=this.game.getService(g.a).currentLevel;if(e){var n=e.player.statsController.getStatValue(s.b.Resource1).original;e.player.statsController.setBaseStat(s.b.Resource1,n+this.resource1Reward),this.game.getService(u.a).triggerActiveTime(),new a.a(e.player,1024),this.itemReward.length&&(new d.a(e.player),this.itemReward.forEach(function(e){t.game.getService(u.a).putItemIntoInventory(e)}))}p.a.logEvent("offline_bonus_claimed",new Map([["bonus_resource1",this.resource1Reward.toFixed()],["bonus_items",this.itemReward.length.toFixed()]]),this.resource1Reward)},e}(c.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(7),i=n(2),o=n(17),a=n(71),s=n(13),u=n(25),c=n(14),h=n(52),l=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d=function(t){function e(e){return t.call(this,e,"OKAY",[new r.a(e,[new i.a(e,[new o.a(e,"ONE MORE CHANCE",s.g)],{preferredHeight:"1u"}),new i.a(e,[new o.a(e,"Heroes never fight alone!",s.h)],{preferredHeight:"1u",paddingBottom:"0.25u"}),new i.a(e,[new o.a(e,"TEAM BONUS",s.g)],{preferredHeight:"0.5u"}),new i.a(e,[new u.a(e,function(){},"spell_10001","button_2",{paddingTop:"11%",paddingBottom:"11%",paddingLeft:"11%",paddingRight:"11%"})],f({},c.a.extraLargeSquare)),new i.a(e,[new o.a(e,"+"+(100*h.f).toFixed()+"% Damage",s.h)],{preferredHeight:"0.5u"}),new i.a(e,[new o.a(e,"+"+(100*h.g).toFixed()+"% Attack Speed",s.h)],{preferredHeight:"0.5u"}),new i.a(e,[new o.a(e,"Become "+(100*h.h).toFixed()+"% Bigger!",s.h)],{preferredHeight:"0.5u"}),new i.a(e,[],{preferredHeight:"0.25u"}),new i.a(e,[new o.a(e,"Pick friends to join you and try again with team bonus!",s.h)],{preferredHeight:"0.5u"})],{crossDirectionAlign:i.d.Center})])||this}return l(e,t),e}(a.a)},function(t,e,n){"use strict";
vendor: 7,555 bytes, lines 1-2
1t.exports={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e){!function(t){"use strict";function e(t){if("string"!==typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!==typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return m.iterable&&(e[Symbol.iterator]=function(){return e}),e}function i(t){this.map={},t instanceof i?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function o(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function a(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function s(t){var e=new FileReader,n=a(e);return e.readAsArrayBuffer(t),n}function u(t){var e=new FileReader,n=a(e);return e.readAsText(t),n}function c(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}function h(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function l(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"===typeof t)this._bodyText=t;else if(m.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(m.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(m.arrayBuffer&&m.blob&&v(t))this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!b(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=h(t)}else this._bodyText="";this.headers.get("content-type")||("string"===typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(t){var e=t.toUpperCase();return w.indexOf(e)>-1?e:t}function d(t,e){e=e||{};var n=e.body;if(t instanceof d){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new i(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new i(e.headers)),this.method=f(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function p(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function g(t){var e=new i;return t.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}function _(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new i(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var m={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(m.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&y.indexOf(Object.prototype.toString.call(t))>-1};i.prototype.append=function(t,r){t=e(t),r=n(r);var i=this.map[t];this.map[t]=i?i+","+r:r},i.prototype.delete=function(t){delete this.map[e(t)]},i.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},i.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},i.prototype.set=function(t,r){this.map[e(t)]=n(r)},i.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},i.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},i.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},i.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},m.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},l.call(d.prototype),l.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];_.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},t.Headers=i,t.Request=d,t.Response=_,t.fetch=function(t,e){return new Promise(function(n,r){var i=new d(t,e),o=new XMLHttpRequest;o.onload=function(){var t={status:o.status,statusText:o.statusText,headers:g(o.getAllResponseHeaders()||"")};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var e="response"in o?o.response:o.responseText;n(new _(e,t))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&m.blob&&(o.responseType="blob"),i.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(t,e,n){n(306),t.exports=n(307)}]); 2//# sourceMappingURL=main.52b80d32.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.