PageSourceSearch

https://sunmarkweb.com/_next/static/chunks/7407.bc4b2eb2c23b3f97.js

js sunmarkweb.com collected 2026-10-04 07:56:31 UTC 449,401 bytes, 517 lines download raw bytes

1!function(){try{var t="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[(new t.Error).stack]=function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}({},t._sentryModuleMetadata[(new t.Error).stack],{"_sentryBundlerPluginAppKey:note-front-custom-domain":!0});var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c48d10c7-d619-46e7-94f6-7e73f51d230b",t._sentryDebugIdIdentifier="sentry-dbid-c48d10c7-d619-46e7-94f6-7e73f51d230b")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7407],{530:(t,e,r)=>{"use strict";let{pipeline:i}=r(27608),n=r(20140),{destroyer:s}=r(67436),{isNodeStream:o,isReadable:a,isWritable:l,isWebStream:h,isTransformStream:u,isWritableStream:d,isReadableStream:c}=r(71343),{AbortError:f,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:g}}=r(60577),m=r(86650);t.exports=function(...t){let e,r,y,b,_;if(0===t.length)throw new g("streams");if(1===t.length)return n.from(t[0]);let v=[...t];if("function"==typeof t[0]&&(t[0]=n.from(t[0])),"function"==typeof t[t.length-1]){let e=t.length-1;t[e]=n.from(t[e])}for(let e=0;e<t.length;++e)if(o(t[e])||h(t[e])){if(e<t.length-1&&!(a(t[e])||c(t[e])||u(t[e])))throw new p(`streams[${e}]`,v[e],"must be readable");if(e>0&&!(l(t[e])||d(t[e])||u(t[e])))throw new p(`streams[${e}]`,v[e],"must be writable")}let x=t[0],w=i(t,function(t){let e=b;b=null,e?e(t):t?_.destroy(t):S||A||_.destroy()}),A=!!(l(x)||d(x)||u(x)),S=!!(a(w)||c(w)||u(w));if(_=new n({writableObjectMode:!!(null!=x&&x.writableObjectMode),readableObjectMode:!!(null!=w&&w.readableObjectMode),writable:A,readable:S}),A){if(o(x))_._write=function(t,r,i){x.write(t,r)?i():e=i},_._final=function(t){x.end(),r=t},x.on("drain",function(){if(e){let t=e;e=null,t()}});else if(h(x)){let t=(u(x)?x.writable:x).getWriter();_._write=async function(e,r,i){try{await t.ready,t.write(e).catch(()=>{}),i()}catch(t){i(t)}},_._final=async function(e){try{await t.ready,t.close().catch(()=>{}),r=e}catch(t){e(t)}}}m(u(w)?w.readable:w,()=>{if(r){let t=r;r=null,t()}})}if(S){if(o(w))w.on("readable",function(){if(y){let t=y;y=null,t()}}),w.on("end",function(){_.push(null)}),_._read=function(){for(;;){let t=w.read();if(null===t){y=_._read;return}if(!_.push(t))return}};else if(h(w)){let t=(u(w)?w.readable:w).getReader();_._read=async function(){for(;;)try{let{value:e,done:r}=await t.read();if(!_.push(e))return;if(r)return void _.push(null)}catch{return}}}}return _._destroy=function(t,i){t||null===b||(t=new f),y=null,e=null,r=null,null===b?i(t):(b=i,o(w)&&s(w,t))},_}},2589:(t,e,r)=>{"use strict";let{ArrayIsArray:i,ObjectSetPrototypeOf:n}=r(34418),{EventEmitter:s}=r(97788);function o(t){s.call(this,t)}function a(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?i(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}n(o.prototype,s.prototype),n(o,s),o.prototype.pipe=function(t,e){let r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function n(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",n),t._isStdio||e&&!1===e.end||(r.on("end",l),r.on("close",h));let o=!1;function l(){o||(o=!0,t.end())}function h(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){d(),0===s.listenerCount(this,"error")&&this.emit("error",t)}function d(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",l),r.removeListener("close",h),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",d),r.removeListener("close",d),t.removeListener("close",d)}return a(r,"error",u),a(t,"error",u),r.on("end",d),r.on("close",d),t.on("close",d),t.emit("pipe",r),t}
1,t.exports={Stream:o,prependListener:a}},3092:(t,e,r)=>{"use strict";r.d(e,{mc:()=>O,u:()=>R,ig:()=>I,fR:()=>L});var i=r(66888),n=r(73608),s=r(34943),o=r(19677),a=r(63454),l=r(92068),h=r(44571),u=r(70242),d=r(75408),c=r(18717),f=r(43179);class p{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let e=0;e<this._tests.length;e++){let r=this._tests[e];if(r.test(t))return d.Z.get(r.maskClass,t)}return t}returnMaskEffect(t){d.Z.return(t)}}let g=new p;s.XO.handleByList(s.Ag.MaskEffect,g._effectClasses);var m=r(20060),y=r(32974);let b=new o.u;var _=r(50461),v=r(44495);function x(t){return((255&t)<<16)+(65280&t)+(t>>16&255)}var w=r(56809);let A=new o.u;function S(t,e){return t._zIndex-e._zIndex}var T=r(94521),C=r(5162),E=r(11627);class k{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new o.u,this.worldColorAlpha=0xffffffff,this.worldColor=0xffffff,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new C.L,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(t){this.root=t,t._onRender&&this.addOnRender(t),t.didChange=!0;let e=t.children;for(let t=0;t<e.length;t++){let r=e[t];r._updateFlags=15,this.addChild(r)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(E.W.returnTexture(this.texture),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0}reset(){for(let t in this.renderGroupChildren.length=0,this.childrenToUpdate){let e=this.childrenToUpdate[t];e.list.fill(null),e.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){let e=this.renderGroupChildren.indexOf(t);e>-1&&this.renderGroupChildren.splice(e,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t.parentRenderGroup=this,t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t.didChange=!0,this.onChildUpdate(t),t.renderGroup)return void this.addRenderGroupChild(t.renderGroup);t._onRender&&this.addOnRender(t);let e=t.children;for(let t=0;t<e.length;t++)this.addChild(e[t])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&!t.renderGroup&&this.removeOnRender(t),t.parentRenderGroup=null,t.renderGroup)return void this._removeRenderGroupChild(t.renderGroup);let e=t.children;for(let t=0;t<e.length;t++)this.removeChild(e[t])}removeChildren(t){for(let e=0;e<t.length;e++)this.removeChild(t[e])}onChildUpdate(t){let e=this.childrenToUpdate[t.relativeRenderGroupDepth];e||(e=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),e.list[e.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t),t.didViewUpdate=!1)}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}get isRenderable(){return 7===this.root.localDisplayStatus&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(t){for(let e=0;e<this._onRenderContainers.length;e++)this._onRenderContainers[e]._onRender(t)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(t=[]){let e=this.root.children;for(let r=0;r<e.length;r++)this._getChildren(e[r],t);return t}_getChildren(t,e=[]){if(e.push(t),t.renderGroup)return e;let r=t.children;for(let t=0;t<r.length;t++)this._getChildren(r[t],e);return e}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(1&this._matrixDirty)==0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new o.u),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(2&this._matrixDirty)==0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new o.u),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((4&this._matrixDirty)==0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;let t=this._parentCacheAsTextureRenderGroup;return t?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new o.u),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(t.inverseWorldTransform).translate(-t._textureBounds.x,-t._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}let M=new l.o(null),B=new l.o(null),P=new l.o(null,1,1),I=1,R=2,L=4;class O extends i.A{constructor(t={}){super(),this.uid=(0,h.L)("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.updateTick=-1,this.localTransform=new o.u,this.relativeGroupTransform=new o.u,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new l.o(this,0,0),this._scale=P,this._pivot=B,this._skew=M,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=0xffffff,this.localAlpha=1,this.groupAlpha=1,this.groupColor=0xffffff,this.groupColorAlpha=0xffffffff,this.localBlendM
1ode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],function(t,e,r={}){for(let i in e)r[i]||void 0===e[i]||(t[i]=e[i])}(this,t,{children:!0,parent:!0,effects:!0}),t.children?.forEach(t=>this.addChild(t)),t.parent?.addChild(this)}static mixin(t){(0,u.t6)("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),s.XO.mixin(O,t)}set _didChangeId(t){this._didViewChangeTick=t>>12&4095,this._didContainerChangeTick=4095&t}get _didChangeId(){return 4095&this._didContainerChangeTick|(4095&this._didViewChangeTick)<<12}addChild(...t){if(this.allowChildren||(0,u.t6)(u.lj,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let e=0;e<t.length;e++)this.addChild(t[e]);return t[0]}let e=t[0],r=this.renderGroup||this.parentRenderGroup;return e.parent===this?(this.children.splice(this.children.indexOf(e),1),this.children.push(e),r&&(r.structureDidChange=!0)):(e.parent&&e.parent.removeChild(e),this.children.push(e),this.sortableChildren&&(this.sortDirty=!0),e.parent=this,e.didChange=!0,e._updateFlags=15,r&&r.addChild(e),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this),this._didViewChangeTick++,0!==e._zIndex&&e.depthOfChildModified()),e}removeChild(...t){if(t.length>1){for(let e=0;e<t.length;e++)this.removeChild(t[e]);return t[0]}let e=t[0],r=this.children.indexOf(e);return r>-1&&(this._didViewChangeTick++,this.children.splice(r,1),this.renderGroup?this.renderGroup.removeChild(e):this.parentRenderGroup&&this.parentRenderGroup.removeChild(e),e.parentRenderLayer&&e.parentRenderLayer.detach(e),e.parent=null,this.emit("childRemoved",e,this,r),e.emit("removed",this)),e}_onUpdate(t){t&&t===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(t){!!this.renderGroup!==t&&(t?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;let t=this.parentRenderGroup;t?.removeChild(this),this.renderGroup=d.Z.get(k,this),this.groupTransform=o.u.IDENTITY,t?.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;let t=this.parentRenderGroup;t?.removeChild(this),d.Z.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,t?.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&0===this.effects.length}get worldTransform(){return this._worldTransform||(this._worldTransform=new o.u),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(t){this._position.x=t}get y(){return this._position.y}set y(t){this._position.y=t}get position(){return this._position}set position(t){this._position.copyFrom(t)}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this._onUpdate(this._skew))}get angle(){return this.rotation*a.bO}set angle(t){this.rotation=t*a.Td}get pivot(){return this._pivot===B&&(this._pivot=new l.o(this,0,0)),this._pivot}set pivot(t){this._pivot===B&&(this._pivot=new l.o(this,0,0)),"number"==typeof t?this._pivot.set(t):this._pivot.copyFrom(t)}get skew(){return this._skew===M&&(this._skew=new l.o(this,0,0)),this._skew}set skew(t){this._skew===M&&(this._skew=new l.o(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===P&&(this._scale=new l.o(this,1,1)),this._scale}set scale(t){this._scale===P&&(this._scale=new l.o(this,0,0)),"number"==typeof t?this._scale.set(t):this._scale.copyFrom(t)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(t){let e=this.getLocalBounds().width;this._setWidth(t,e)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){let e=this.getLocalBounds().height;this._setHeight(t,e)}getSize(t){t||(t={});let e=this.getLocalBounds();return t.width=Math.abs(this.scale.x*e.width),t.height=Math.abs(this.scale.y*e.height),t}setSize(t,e){let r=this.getLocalBounds();"object"==typeof t?(e=t.height??t.width,t=t.width):e??(e=t),void 0!==t&&this._setWi
1dth(t,r.width),void 0!==e&&this._setHeight(e,r.height)}_updateSkew(){let t=this._rotation,e=this._skew;this._cx=Math.cos(t+e._y),this._sx=Math.sin(t+e._y),this._cy=-Math.sin(t-e._x),this._sy=Math.cos(t-e._x)}updateTransform(t){return this.position.set("number"==typeof t.x?t.x:this.position.x,"number"==typeof t.y?t.y:this.position.y),this.scale.set("number"==typeof t.scaleX?t.scaleX||1:this.scale.x,"number"==typeof t.scaleY?t.scaleY||1:this.scale.y),this.rotation="number"==typeof t.rotation?t.rotation:this.rotation,this.skew.set("number"==typeof t.skewX?t.skewX:this.skew.x,"number"==typeof t.skewY?t.skewY:this.skew.y),this.pivot.set("number"==typeof t.pivotX?t.pivotX:this.pivot.x,"number"==typeof t.pivotY?t.pivotY:this.pivot.y),this}setFromMatrix(t){t.decompose(this)}updateLocalTransform(){let t=this._didContainerChangeTick;if(this._didLocalTransformChangeId===t)return;this._didLocalTransformChangeId=t;let e=this.localTransform,r=this._scale,i=this._pivot,n=this._position,s=r._x,o=r._y,a=i._x,l=i._y;e.a=this._cx*s,e.b=this._sx*s,e.c=this._cy*o,e.d=this._sy*o,e.tx=n._x-(a*e.a+l*e.c),e.ty=n._y-(a*e.b+l*e.d)}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=I,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){let e=n.Q.shared.setValue(t??0xffffff).toBgrNumber();e!==this.localColor&&(this.localColor=e,this._updateFlags|=I,this._onUpdate())}get tint(){return x(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=R,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(2&this.localDisplayStatus)}set visible(t){(2&this.localDisplayStatus)!=2*!!t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=L,this.localDisplayStatus^=2,this._onUpdate())}get culled(){return!(4&this.localDisplayStatus)}set culled(t){(4&this.localDisplayStatus)!=4*!t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=L,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(1&this.localDisplayStatus)}set renderable(t){(1&this.localDisplayStatus)!=+!!t&&(this._updateFlags|=L,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return 7===this.localDisplayStatus&&this.groupAlpha>0}destroy(t=!1){let e;if(!this.destroyed){if(this.destroyed=!0,this.children.length&&(e=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),("boolean"==typeof t?t:t?.children)&&e)for(let r=0;r<e.length;++r)e[r].destroy(t);this.renderGroup?.destroy(),this.renderGroup=null}}}s.XO.mixin(O,{allowChildren:!0,removeChildren(t=0,e){let r=e??this.children.length,i=r-t,n=[];if(i>0&&i<=r){for(let e=r-1;e>=t;e--){let t=this.children[e];t&&(n.push(t),t.parent=null)}(0,c.d)(this.children,t,r);let e=this.renderGroup||this.parentRenderGroup;e&&e.removeChildren(n);for(let t=0;t<n.length;++t)this.emit("childRemoved",n[t],this,t),n[t].emit("removed",this);return n.length>0&&this._didViewChangeTick++,n}if(0===i&&0===this.children.length)return n;throw RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(t){let e=this.getChildAt(t);return this.removeChild(e)},getChildAt(t){if(t<0||t>=this.children.length)throw Error(`getChildAt: Index (${t}) does not exist.`);return this.children[t]},setChildIndex(t,e){if(e<0||e>=this.children.length)throw Error(`The index ${e} supplied is out of bounds ${this.children.length}`);this.getChildIndex(t),this.addChildAt(t,e)},getChildIndex(t){let e=this.children.indexOf(t);if(-1===e)throw Error("The supplied Container must be a child of the caller");return e},addChildAt(t,e){this.allowChildren||(0,u.t6)(u.lj,"addChildAt: Only Containers will be allowed to add children in v8.0.0");let{children:r}=this;if(e<0||e>r.length)throw Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${r.length}`);if(t.parent){let r=t.parent.children.indexOf(t);if(t.parent===this&&r===e)return t;-1!==r&&t.parent.children.splice(r,1)}e===r.length?r.push(t):r.splice(e,0,t),t.parent=this,t.didChange=!0,t._updateFlags=15;let i=this.renderGroup||this.parentRenderGroup;return i&&i.addChild(t),this.sortableChildren&&(this.sortDirty=!0),this.emit
1("childAdded",t,this,e),t.emit("added",this),t},swapChildren(t,e){if(t===e)return;let r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t;let n=this.renderGroup||this.parentRenderGroup;n&&(n.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...t){return 1===t.length?this.reparentChildAt(t[0],this.children.length):(t.forEach(t=>this.reparentChildAt(t,this.children.length)),t[0])},reparentChildAt(t,e){if(t.parent===this)return this.setChildIndex(t,e),t;let r=t.worldTransform.clone();t.removeFromParent(),this.addChildAt(t,e);let i=this.worldTransform.clone();return i.invert(),r.prepend(i),t.setFromMatrix(r),t}},{getFastGlobalBounds(t,e){e||(e=new m.c),e.clear(),this._getGlobalBoundsRecursive(!!t,e,this.parentRenderLayer),e.isValid||e.set(0,0,0,0);let r=this.renderGroup||this.parentRenderGroup;return e.applyMatrix(r.worldTransform),e},_getGlobalBoundsRecursive(t,e,r){let i=e;if(t&&this.parentRenderLayer&&this.parentRenderLayer!==r||7!==this.localDisplayStatus||!this.measurable)return;let n=!!this.effects.length;if((this.renderGroup||n)&&(i=y.o.get().clear()),this.boundsArea)e.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){let t=this.bounds;i.addFrame(t.minX,t.minY,t.maxX,t.maxY,this.groupTransform)}let e=this.children;for(let n=0;n<e.length;n++)e[n]._getGlobalBoundsRecursive(t,i,r)}if(n){let t=!1,r=this.renderGroup||this.parentRenderGroup;for(let e=0;e<this.effects.length;e++)this.effects[e].addBounds&&(t||(t=!0,i.applyMatrix(r.worldTransform)),this.effects[e].addBounds(i,!0));t&&(i.applyMatrix(r.worldTransform.copyTo(b).invert()),e.addBounds(i,this.relativeGroupTransform)),e.addBounds(i),y.o.return(i)}else this.renderGroup&&(e.addBounds(i,this.relativeGroupTransform),y.o.return(i))}},{getGlobalPosition(t=new T.b,e=!1){return this.parent?this.parent.toGlobal(this._position,t,e):(t.x=this._position.x,t.y=this._position.y),t},toGlobal(t,e,r=!1){let i=this.getGlobalTransform(y.u.get(),r);return e=i.apply(t,e),y.u.return(i),e},toLocal(t,e,r,i){e&&(t=e.toGlobal(t,r,i));let n=this.getGlobalTransform(y.u.get(),i);return r=n.applyInverse(t,r),y.u.return(n),r}},{_onRender:null,set onRender(func){let t=this.renderGroup||this.parentRenderGroup;if(!func){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=func},get onRender(){return this._onRender}},{_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(t,e){let r=Math.sign(this.scale.x)||1;0!==e?this.scale.x=t/e*r:this.scale.x=r},_setHeight(t,e){let r=Math.sign(this.scale.y)||1;0!==e?this.scale.y=t/e*r:this.scale.y=r},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new m.c});let t=this._localBoundsCacheData;return t.index=1,t.didChange=!1,t.data[0]!==this._didViewChangeTick&&(t.didChange=!0,t.data[0]=this._didViewChangeTick),!function t(e,r){let i=e.children;for(let e=0;e<i.length;e++){let n=i[e],s=n.uid,o=(65535&n._didViewChangeTick)<<16|65535&n._didContainerChangeTick,a=r.index;(r.data[a]!==s||r.data[a+1]!==o)&&(r.data[r.index]=s,r.data[r.index+1]=o,r.didChange=!0),r.index=a+2,n.children.length&&t(n,r)}return r.didChange}(this,t),t.didChange&&(0,w.n)(this,t.localBounds,A),t.localBounds},getBounds(t,e){return(0,_.fB)(this,t,e||new m.c)}},{_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){let t=this.renderGroup||this.parentRenderGroup;t&&(t.structureDidChange=!0)},addEffect(t){-1===this.effects.indexOf(t)&&(this.effects.push(t),this.effects.sort((t,e)=>t.priority-e.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(t){let e=this.effects.indexOf(t);-1!==e&&(this.effects.splice(e,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(value){let t=this._maskEffect;if(t?.mask===value||(t&&(this.removeEffect(t),g.returnMaskEffect(t),this._maskEffect=null),null==value))return;this._maskEffect=g.getMaskEffect(value),this.addEffect(this._maskEffect)},setMask(t){this._maskOptions={...this._maskOptions,...t},t.mask&&(this.mask=t.mask),this._markStructureAsChanged()},get mask(){return this._maskEffect?.mask},set filters(value){!Array.isArray(value)&&value&&(value=[value]);let t=this._filterEffect||(this._filterEffect=new f.a),e=value?.length>0,r=t.filters?.length>0;t.filters=Object.freeze(value=Array.isArray(value)?value.slice(0):value),e!==r&&(e?this.addEffect(t):(this.removeEffect(t),t.filters=value??null))},get filters(){return this._filterEffect?.filters},set filterArea(value){this._filterEffect||(this._filterEffect=new f.a),this._filterEffect.filterArea=value},get filterArea(){return this._filterEffect?.filterArea}},{label:null,get name(){return(0,u.t6)(u.lj,"Container.name property has been removed, use Container.label instead"),this.label},set name(value){(0,u.t6)(u.lj,"Container.name property has been removed, use Container.label instead"),this.label=value},getChildByName(t,e=!1){return this.getChildByLabel(t,e)},getChildByLabel(t,e=!1){let r=this.children;for(let e=0;e<r.length;e++){let i=r[e];if(i.label===t||t instanceof RegExp&&t.test(i.label))return i}if(e)for(let e=0;e<r.length;e++){let i=r[e].getChildByLabel(t,!0);if(i)return i}return null},getChildrenByLabel(t,e=!1,r=[]){let i=this.children;for(let e=0;e<i.length;e++){let n=i[e];(n.label===t||t instanceof RegExp&&t.test(n.label))&&r.push(n)}if(e)for(let e=0;e<i.length;e++)i[e].getChildrenByLabel(t,!0,r);return r}},{_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(value){if(this._zIndex===value)return;this._zIndex=value,this.depthOfChildModified()},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(S))}}
1,{cullArea:null,cullable:!1,cullableChildren:!0},{get isCachedAsTexture(){return!!this.renderGroup?.isCachedAsTexture},cacheAsTexture(t){"boolean"==typeof t&&!1===t?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(!0===t?{}:t))},updateCacheTexture(){this.renderGroup?.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(val){(0,u.t6)("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(val)}},{getGlobalAlpha(t){if(t)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let e=this.alpha,r=this.parent;for(;r;)e*=r.alpha,r=r.parent;return e},getGlobalTransform(t,e){if(e)return t.copyFrom(this.worldTransform);this.updateLocalTransform();let r=(0,_.Ek)(this,y.u.get().identity());return t.appendFrom(this.localTransform,r),y.u.return(r),t},getGlobalTint(t){if(t)return this.renderGroup?x(this.renderGroup.worldColor):this.parentRenderGroup?x((0,v.j)(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let e=this.localColor,r=this.parent;for(;r;)e=(0,v.j)(e,r.localColor),r=r.parent;return x(e)}},{collectRenderables(t,e,r){this.parentRenderLayer&&this.parentRenderLayer!==r||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(t,e,r):this.renderGroup?e.renderPipes.renderGroup.addRenderGroup(this.renderGroup,t):this.collectRenderablesWithEffects(t,e,r))},collectRenderablesSimple(t,e,r){let i=this.children,n=i.length;for(let s=0;s<n;s++)i[s].collectRenderables(t,e,r)},collectRenderablesWithEffects(t,e,r){let{renderPipes:i}=e;for(let e=0;e<this.effects.length;e++){let r=this.effects[e];i[r.pipe].push(r,this,t)}this.collectRenderablesSimple(t,e,r);for(let e=this.effects.length-1;e>=0;e--){let r=this.effects[e];i[r.pipe].pop(r,this,t)}}})},5134:(t,e,r)=>{"use strict";function i(t,e){let r=t.byteLength/8|0,i=new Float64Array(t,0,r);new Float64Array(e,0,r).set(i);let n=t.byteLength-8*r;if(n>0){let i=new Uint8Array(t,8*r,n);new Uint8Array(e,8*r,n).set(i)}}r.d(e,{W:()=>i})},5162:(t,e,r)=>{"use strict";r.d(e,{L:()=>n});var i=r(44571);class n{constructor(){this.uid=(0,i.L)("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}},6376:(t,e,r)=>{"use strict";function i(t){let e={};for(let r in t)void 0!==t[r]&&(e[r]=t[r]);return e}r.d(e,{S:()=>i})},7258:(t,e,r)=>{"use strict";r.d(e,{k:()=>l});var i=r(44571),n=r(32816);let s=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],o=s.reduce((t,e)=>(t[e]=!0,t),{}),a=class t{constructor(e,r){this._touched=0,this.uid=(0,i.L)("uniform"),this._resourceType="uniformGroup",this._resourceId=(0,i.L)("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,r={...t.defaultOptions,...r},this.uniformStructures=e;const a={};for(const t in e){const r=e[t];if(r.name=t,r.size=r.size??1,!o[r.type])throw Error(`Uniform type ${r.type} is not supported. Supported uniform types are: ${s.join(", ")}`);r.value??(r.value=function(t,e){switch(t){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*e);case"vec3<f32>":return new Float32Array(3*e);case"vec4<f32>":return new Float32Array(4*e);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}(r.type,r.size)),a[t]=r.value}this.uniforms=a,this._dirtyId=1,this.ubo=r.ubo,this.isStatic=r.isStatic,this._signature=(0,n.X)(Object.keys(a).map(t=>`${t}-${e[t].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};a.defaultOptions={ubo:!1,isStatic:!1};let l=a},7475:(t,e,r)=>{"use strict";r.d(e,{W:()=>n});var i,n=((i=n||{})[i.WEBGL=1]="WEBGL",i[i.WEBGPU=2]="WEBGPU",i[i.BOTH=3]="BOTH",i)},7926:(t,e,r)=>{"use strict";let i,n=r(37811),{ArrayPrototypeSlice:s,Error:o,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:l,ObjectDefineProperties:h,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:
1d,Symbol:c,SymbolHasInstance:f}=r(34418);t.exports=O,O.WritableState=R;let{EventEmitter:p}=r(97788),g=r(2589).Stream,{Buffer:m}=r(96244),y=r(67436),{addAbortSignal:b}=r(46185),{getHighWaterMark:_,getDefaultHighWaterMark:v}=r(52039),{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:A,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:C,ERR_STREAM_NULL_VALUES:E,ERR_STREAM_WRITE_AFTER_END:k,ERR_UNKNOWN_ENCODING:M}=r(60577).codes,{errorOrDestroy:B}=y;function P(){}u(O.prototype,g.prototype),u(O,g);let I=c("kOnFinished");function R(t,e,i){"boolean"!=typeof i&&(i=e instanceof r(20140)),this.objectMode=!!(t&&t.objectMode),i&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?_(this,t,"writableHighWaterMark",i):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let n=!!(t&&!1===t.decodeStrings);this.decodeStrings=!n,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=N.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,L(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[I]=[]}function L(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function O(t){let e=this instanceof r(20140);if(!e&&!a(O,this))return new O(t);this._writableState=new R(t,this,e),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&b(t.signal,this)),g.call(this,t),y.construct(this,()=>{let t=this._writableState;t.writing||W(this,t),V(this,t)})}function F(t,e,r,i){var s,o,a,l,h;let u,d,c,f=t._writableState;if("function"==typeof r)i=r,r=f.defaultEncoding;else{if(r){if("buffer"!==r&&!m.isEncoding(r))throw new M(r)}else r=f.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===e)throw new E;if(!f.objectMode)if("string"==typeof e)!1!==f.decodeStrings&&(e=m.from(e,r),r="buffer");else if(e instanceof m)r="buffer";else if(g._isUint8Array(e))e=g._uint8ArrayToBuffer(e),r="buffer";else throw new x("chunk",["string","Buffer","Uint8Array"],e);return(f.ending?c=new k:f.destroyed&&(c=new T("write")),c)?(n.nextTick(i,c),B(t,c,!0),c):(f.pendingcb++,s=t,o=f,a=e,l=r,h=i,u=o.objectMode?1:a.length,o.length+=u,(d=o.length<o.highWaterMark)||(o.needDrain=!0),o.writing||o.corked||o.errored||!o.constructed?(o.buffered.push({chunk:a,encoding:l,callback:h}),o.allBuffers&&"buffer"!==l&&(o.allBuffers=!1),o.allNoop&&h!==P&&(o.allNoop=!1)):(o.writelen=u,o.writecb=h,o.writing=!0,o.sync=!0,s._write(a,l,o.onwrite),o.sync=!1),d&&!o.errored&&!o.destroyed)}function U(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new T("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function D(t,e,r,i){--e.pendingcb,i(r),$(e),B(t,r)}function N(t,e){let r=t._writableState,i=r.sync,s=r.writecb;"function"!=typeof s?B(t,new A):(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,e?(e.stack,r.errored||(r.errored=e),t._readableState&&!t._readableState.errored&&(t._readableState.errored=e),i?n.nextTick(D,t,r,e,s):D(t,r,e,s)):(r.buffered.length>r.bufferedIndex&&W(t,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===s?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:s,stream:t,state:r},n.nextTick(z,r.afterWriteTickInfo)):j(t,r,1,s)))}function z({stream:t,state:e,count:r,cb:i}){return e.afterWriteTickInfo=null,j(t,e,r,i)}function j(t,e,r,i){for(e.ending||t.destroyed||0!==e.length||!e.needDrain||(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,i();e.destroyed&&$(e),V(t,e)}function $(t){var e,r;if(t.writing)return;for(let r=t.bufferedIndex;r<t.buffered.length;++r){let{chunk:i,callback:n}=t.buffered[r],s=t.objectMode?1:i.length;t.length-=s,n(null!=(e=t.errored)?e:new T("write"))}let i=t[I].splice(0);for(let e=0;e<i.length;e++)i[e](null!=(r=t.errored)?r:new T("end"));L(t)}function W(t,e){if(e.corked||e.bufferProcessing||e.destroyed||!e.constructed)return;let{buffered:r,bufferedIndex:i,objectMode:n}=e,o=r.length-i;if(!o)return;let a=i;if(e.bufferProcessing=!0,o>1&&t._writev){e.pendingcb-=o-1;let i=e.allNoop?P:t=>{for(let e=a;
1e<r.length;++e)r[e].callback(t)},n=e.allNoop&&0===a?r:s(r,a);n.allBuffers=e.allBuffers,U(t,e,!0,e.length,n,"",i),L(e)}else{do{let{chunk:i,encoding:s,callback:o}=r[a];r[a++]=null,U(t,e,!1,n?1:i.length,i,s,o)}while(a<r.length&&!e.writing);a===r.length?L(e):a>256?(r.splice(0,a),e.bufferedIndex=0):e.bufferedIndex=a}e.bufferProcessing=!1}function G(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function V(t,e,r){if(G(e)){if(!e.prefinished&&!e.finalCalled)if("function"!=typeof t._final||e.destroyed)e.prefinished=!0,t.emit("prefinish");else{e.finalCalled=!0;let r=!1;function i(i){if(r)return void B(t,null!=i?i:A());if(r=!0,e.pendingcb--,i){let r=e[I].splice(0);for(let t=0;t<r.length;t++)r[t](i);B(t,i,e.sync)}else G(e)&&(e.prefinished=!0,t.emit("prefinish"),e.pendingcb++,n.nextTick(H,t,e))}e.sync=!0,e.pendingcb++;try{t._final(i)}catch(t){i(t)}e.sync=!1}0===e.pendingcb&&(r?(e.pendingcb++,n.nextTick((t,e)=>{G(e)?H(t,e):e.pendingcb--},t,e)):G(e)&&(e.pendingcb++,H(t,e)))}}function H(t,e){e.pendingcb--,e.finished=!0;let r=e[I].splice(0);for(let t=0;t<r.length;t++)r[t]();if(t.emit("finish"),e.autoDestroy){let e=t._readableState;(!e||e.autoDestroy&&(e.endEmitted||!1===e.readable))&&t.destroy()}}R.prototype.getBuffer=function(){return s(this.buffered,this.bufferedIndex)},l(R.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),l(O,f,{__proto__:null,value:function(t){return!!a(this,t)||this===O&&t&&t._writableState instanceof R}}),O.prototype.pipe=function(){B(this,new S)},O.prototype.write=function(t,e,r){return!0===F(this,t,e,r)},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||W(this,t))},O.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=d(t)),!m.isEncoding(t))throw new M(t);return this._writableState.defaultEncoding=t,this},O.prototype._write=function(t,e,r){if(this._writev)this._writev([{chunk:t,encoding:e}],r);else throw new w("_write()")},O.prototype._writev=null,O.prototype.end=function(t,e,r){let i,s=this._writableState;if("function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t){let r=F(this,t,e);r instanceof o&&(i=r)}return s.corked&&(s.corked=1,this.uncork()),i||(s.errored||s.ending?s.finished?i=new C("end"):s.destroyed&&(i=new T("end")):(s.ending=!0,V(this,s,!0),s.ended=!0)),"function"==typeof r&&(i||s.finished?n.nextTick(r,i):s[I].push(r)),this},h(O.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){let t=this._writableState;return!!t&&!1!==t.writable&&!t.destroyed&&!t.errored&&!t.ending&&!t.ended},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){let t=this._writableState;return!!t&&!t.destroyed&&!t.ending&&t.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(!1!==this._writableState.writable&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});let Y=y.destroy;function X(){return void 0===i&&(i={}),i}O.prototype.destroy=function(t,e){let r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[I].length)&&n.nextTick($,r),Y.call(this,t,e),this},O.prototype._undestroy=y.undestroy,O.prototype._destroy=function(t,e){e(t)},O.prototype[p.captureRejectionSymbol]=function(t){this.destroy(t)},O.fromWeb=function(t,e){return X().newStreamWritableFromWritableStream(t,e)},O.toWeb=function(t){return X().newWritableStreamFromStreamWritable(t)}},8139:(t,e,r)=>{"use strict";r.d(e,{e:()=>h});var i=r(34943),n=r(13887),s=r(7258),o=r(72612);let a={f32:`if (cv !== v) {
2            cu.value = v;
3            gl.uniform1f(location, v);
4        }`,"vec2<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
5            cv[0] = v[0];
6            cv[1] = v[1];
7            gl.uniform2f(location, v[0], v[1]);
8        }`,"vec3<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
9            cv[0] = v[0];
10            cv[1] = v[1];
11            cv[2] = v[2];
12            gl.uniform3f(location, v[0], v[1], v[2]);
13        }`,"vec4<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
14            cv[0] = v[0];
15            cv[1] = v[1];
16            cv[2] = v[2];
17            cv[3] = v[3];
18            gl.uniform4f(location, v[0], v[1], v[2], v[3]);
19        }`,i32:`if (cv !== v) {
20            cu.value = v;
21            gl.uniform1i(location, v);
22        }`,"vec2<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
23            cv[0] = v[0];
24            cv[1] = v[1];
25            gl.uniform2i(location, v[0], v[1]);
26        }`,"vec3<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
27            cv[0] = v[0];
28            cv[1] = v[1];
29            cv[2] = v[2];
30            gl.uniform3i(location, v[0], v[1], v[2]);
31        }`,"vec4<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
32            cv[0] = v[0];
33            cv[1] = v[1];
34            cv[2] = v[2];
35            cv[3] = v[3];
36            gl.uniform4i(location, v[0], v[1], v[2], v[3]);
37        }`,u32:`if (cv !== v) {
38            cu.value = v;
39            gl.uniform1ui(location, v);
40        }`,"vec2<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
41            cv[0] = v[0];
42            cv[1] = v[1];
43            gl.uniform2ui(location, v[0], v[1]);
44        }`,"vec3<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
45            cv[0] = v[0];
46            cv[1] = v[1];
47            cv[2] = v[2];
48            gl.uniform3ui(location, v[0], v[1], v[2]);
49        }`,"vec4<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
50            cv[0] = v[0];
51            cv[1] = v[1];
52            cv[2] = v[2];
53            cv[3] = v[3];
54            gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
55        }`,bool:`if (cv !== v) {
56            cu.value = v;
57            gl.uniform1i(location, v);
58        }`,"vec2<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
59            cv[0] = v[0];
60            cv[1] = v[1];
61            gl.uniform2i(location, v[0], v[1]);
62        }`,"vec3<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
63            cv[0] = v[0];
64            cv[1] = v[1];
65            cv[2] = v[2];
66            gl.uniform3i(location, v[0], v[1], v[2]);
67        }`,"vec4<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
68            cv[0] = v[0];
69            cv[1] = v[1];
70            cv[2] = v[2];
71            cv[3] = v[3];
72            gl.uniform4i(location, v[0], v[1], v[2], v[3]);
73        }`,"mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);"},l={f32:"gl.uniform1fv(location, v);","vec2<f32>":"gl.uniform2fv(location, v);","vec3<f32>":"gl.uniform3fv(location, v);","vec4<f32>":"gl.uniform4fv(location, v);","mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);",i32:"gl.uniform1iv(location, v);","vec2<i32>":"gl.uniform2iv(location, v);","vec3<i32>":"gl.uniform3iv(location, v);","vec4<i32>":"gl.uniform4iv(location, v);",u32:"gl.uniform1iv(location, v);","vec2<u32>":"gl.uniform2iv(location, v);","vec3<u32>":"gl.uniform3iv(location, v);","vec4<u32>":"gl.uniform4iv(location, v);",bool:"gl.uniform1iv(location, v);","vec2<bool>":"gl.uniform2iv(location, v);","vec3<bool>":"gl.uniform3iv(location, v);","vec4<bool>":"gl.uniform4iv(location, v);"};class h{constructor(t){this._cache={},this._uniformGroupSyncHash={},this._renderer=t,this.gl=null,this._cache={}}contextChange(t){this.gl=t}updateUniformGroup(t,e,r){let i=this._renderer.shader._getProgramData(e);t.isStatic&&t._dirtyId===i.uniformDirtyGroups[t.uid]||(i.uniformDirtyGroups[t.uid]=t._dirtyId,this._getUniformSyncFunction(t,e)(i.uniformData,t.uniforms,this._renderer,r))}_getUniformSyncFunction(t,e){return this._uniformGroupSyncHash[t._signature]?.[e._key]||this._createUniformSyncFunction(t,e)}_createUniformSyncFunction(t,e){let r=this._uniformGroupSyncHash[t._signature]||(this._uniformGroupSyncHash[t._signature]={}),i=this._getSignature(t,e._uniformData,"u");return this._cache[i]||(this._cache[i]=this._generateUniformsSync(t,e._uniformData)),r[e._key]=this._cache[i],r[e._key]}_generateUniformsSync(t,e){return function(t,e){let r=[`
74        var v = null;
75        var cv = null;
76        var cu = null;
77        var t = 0;
78        var gl = renderer.gl;
79        var name = null;
80    `];for(let i in t.uniforms){if(!e[i]){t.uniforms[i]instanceof s.k?t.uniforms[i].ubo?r.push(`
81                        renderer.shader.bindUniformBlock(uv.${i}, "${i}");
82                    `):r.push(`
83                        renderer.shader.updateUniformGroup(uv.${i});
84                    `):t.uniforms[i]instanceof n.d&&r.push(`
85                        renderer.shader.bindBufferResource(uv.${i}, "${i}");
86                    `);continue}let h=t.uniformStructures[i],u=!1;for(let t=0;t<o.$.length;t++){let e=o.$[t];if(h.type===e.type&&e.test(h)){r.push(`name = "${i}";`,o.$[t].uniform),u=!0;break}}if(!u){let t=(1===h.size?a:l)[h.type].replace("location",`ud["${i}"].location`);r.push(`
87            cu = ud["${i}"];
88            cv = cu.value;
89            v = uv["${i}"];
90            ${t};`)}}return Function("ud","uv","renderer","syncData",r.join("\n"))}(t,e)}_getSignature(t,e,r){let i=t.uniforms,n=[`${r}-`];for(let t in i)n.push(t),e[t]&&n.push(e[t].type);return n.join("-")}destroy(){this._renderer=null,this._cache=null}}h.extension={type:[i.Ag.WebGLSystem],name:"uniformGroup"}},8483:(t,e,r)=>{"use strict";r.d(e,{xv:()=>i}),r(66888);let i="8.9.1"},9138:(t,e,r)=>{"use strict";let i,n=r(37811),{ArrayPrototypeIndexOf:s,NumberIsInteger:o,NumberIsNaN:a,NumberParseInt:l,ObjectDefineProperties:h,ObjectKeys:u,ObjectSetPrototypeOf:d,Promise:c,SafeSet:f,SymbolAsyncDispose:p,SymbolAsyncIterator:g,Symbol
90:m}=r(34418);t.exports=W,W.ReadableState=$;let{EventEmitter:y}=r(97788),{Stream:b,prependListener:_}=r(2589),{Buffer:v}=r(96244),{addAbortSignal:x}=r(46185),w=r(86650),A=r(43006).debuglog("stream",t=>{A=t}),S=r(93685),T=r(67436),{getHighWaterMark:C,getDefaultHighWaterMark:E}=r(52039),{aggregateTwoErrors:k,codes:{ERR_INVALID_ARG_TYPE:M,ERR_METHOD_NOT_IMPLEMENTED:B,ERR_OUT_OF_RANGE:P,ERR_STREAM_PUSH_AFTER_EOF:I,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:R},AbortError:L}=r(60577),{validateObject:O}=r(72639),F=m("kPaused"),{StringDecoder:U}=r(12737),D=r(62606);d(W.prototype,b.prototype),d(W,b);let N=()=>{},{errorOrDestroy:z}=T;function j(t){return{enumerable:!1,get(){return(this.state&t)!=0},set(e){e?this.state|=t:this.state&=~t}}}function $(t,e,i){"boolean"!=typeof i&&(i=e instanceof r(20140)),this.state=6192,t&&t.objectMode&&(this.state|=1),i&&t&&t.readableObjectMode&&(this.state|=1),this.highWaterMark=t?C(this,t,"readableHighWaterMark",i):E(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[F]=null,t&&!1===t.emitClose&&(this.state&=-2049),t&&!1===t.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new U(t.encoding),this.encoding=t.encoding)}function W(t){if(!(this instanceof W))return new W(t);let e=this instanceof r(20140);this._readableState=new $(t,this,e),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!e&&x(t.signal,this)),b.call(this,t),T.construct(this,()=>{this._readableState.needReadable&&q(this,this._readableState)})}function G(t,e,r,i){let n;A("readableAddChunk",e);let s=t._readableState;if((1&s.state)==0&&("string"==typeof e?(r=r||s.defaultEncoding,s.encoding!==r&&(i&&s.encoding?e=v.from(e,r).toString(s.encoding):(e=v.from(e,r),r=""))):e instanceof v?r="":b._isUint8Array(e)?(e=b._uint8ArrayToBuffer(e),r=""):null!=e&&(n=new M("chunk",["string","Buffer","Uint8Array"],e))),n)z(t,n);else if(null===e)s.state&=-9,function(t,e){if(A("onEofChunk"),!e.ended){if(e.decoder){let t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?Y(t):(e.needReadable=!1,e.emittedReadable=!0,X(t))}}(t,s);else if((1&s.state)!=0||e&&e.length>0)if(i)if((4&s.state)!=0)z(t,new R);else{if(s.destroyed||s.errored)return!1;V(t,s,e,!0)}else if(s.ended)z(t,new I);else{if(s.destroyed||s.errored)return!1;s.state&=-9,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?V(t,s,e,!1):q(t,s)):V(t,s,e,!1)}else i||(s.state&=-9,q(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function V(t,e,r,i){e.flowing&&0===e.length&&!e.sync&&t.listenerCount("data")>0?((65536&e.state)!=0?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),(64&e.state)!=0&&Y(t)),q(t,e)}function H(t,e){return t<=0||0===e.length&&e.ended?0:(1&e.state)!=0?1:a(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}function Y(t){let e=t._readableState;A("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(A("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(X,t))}function X(t){let e=t._readableState;A("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,tt(t)}function q(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,n.nextTick(K,t,e))}function K(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){let r=e.length;if(A("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function Z(t){let e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!1===e[F]?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function Q(t){A("readable nexttick read 0"),t.read(0)}function J(t,e){A("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),tt(t),e.flowing&&!e.reading&&t.read(0)}function tt(t){let e=t._readableState;for(A("flow",e.flowing);e.flowing&&null!==t.read(););}function te(t,e){"function"!=typeof t.read&&(t=W.wrap(t,{objectMode:!0}));let r=tr(t,e);return r.stream=t,r}async function*tr(t,e){let r,i=N;function n(e){this===t?(i(),i=N):i=e}t.on("readable",n);let s=w(t,{writable:!1},t=>{r=t?k(r,t):null,i(),i=N});try{for(;;){let e=t.destroyed?null:t.read();if(null!==e)yield e;else if(r)throw r;else{if(null===r)return;await new c(n)}}}catch(t){throw r=k(r,t)}finally{(r||(null==e?void 0:e.destroyOnReturn)!==!1)&&(void 0===r||t._readableState.autoDestroy)?T.destroyer(t,null):(t.off("readable",n),s())}}function ti(t,e){let r;return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r)}function tn(t){let e=t._readableState;A("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(ts,e,t))}function ts(t,e){if(A("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&0===t.length){if(t.endEmitted=!0,e.emit("end"),e.writable&&!1===e.allowHalfOpen)n.nextTick(to,e);else if(t.autoDestroy){let t=e._writableState;(!t||t.autoDestroy&&(t.finished||!1===t.writable))&&e.destroy()}}}function to(t){!t.writable||t.writableEnded||t.destroyed||t.end()}function ta(){return void 0===i&&(i={}),i}h($.prototype,{objectMode:j(1),ended:j(2),endEmitted:j(4),reading:j(8),constructed:j(16),sync:j(32),needReadable:j(64),emittedReadable:j(128),readableListening:j(256),resumeScheduled:j(512),errorEmitted:j(1024),emitClose:j(2048),autoDestroy:j(4096),destroyed:j(8192),closed:j(16384),closeEmitted:j(32768),multiAwaitDrain:j(65536),readingMore:j(131072),dataEmitted:j(262144)}),W.prototype.destroy=T.destroy,W.prototype._undestroy=T.undestroy,W.prototype._destroy=function(t,e){e(t)},W.prototype[y.captureRejectionSymbol]=function(t){this.destroy(t)},W.prototype[p]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new L,this.destroy(t)),new c((e,r)=>w(this,i=>i&&i!==t?r(i):e(null)))},W.prototype.push=function(t,e){return G(this,t,e,!1)},W.prototype.unshift=function(t,e){return G(this,t,e,!0)},W.prototype.isPaused=function(){let t=this._readableState;return!0===t[F]||!1===t.flowing},W.prototype.setEncoding=function(t){let e=new U(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,i="";for(let t of r)i+=e.write(t);return r.clear(),""!==i&&r.push(i),this._readableState.length=i.length,this},W.prototype.read=function(t){let e;A("read",t),void 0===t?t=NaN:o(t)||(t=l(t,10));let r=this._readableState,i=t;if(t>r.highWaterMark&&(r.highWaterMark=function(t){if(t>0x40000000)throw new P("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}
90(t)),0!==t&&(r.state&=-129),0===t&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return A("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?tn(this):Y(this),null;if(0===(t=H(t,r))&&r.ended)return 0===r.length&&tn(this),null;let n=(64&r.state)!=0;if(A("need readable",n),(0===r.length||r.length-t<r.highWaterMark)&&A("length less than watermark",n=!0),r.ended||r.reading||r.destroyed||r.errored||!r.constructed)A("reading, ended or constructing",n=!1);else if(n){A("do read"),r.state|=40,0===r.length&&(r.state|=64);try{this._read(r.highWaterMark)}catch(t){z(this,t)}r.state&=-33,r.reading||(t=H(i,r))}return null===(e=t>0?ti(t,r):null)?(r.needReadable=r.length<=r.highWaterMark,t=0):(r.length-=t,r.multiAwaitDrain?r.awaitDrainWriters.clear():r.awaitDrainWriters=null),0===r.length&&(r.ended||(r.needReadable=!0),i!==t&&r.ended&&tn(this)),null===e||r.errorEmitted||r.closeEmitted||(r.dataEmitted=!0,this.emit("data",e)),e},W.prototype._read=function(t){throw new B("_read()")},W.prototype.pipe=function(t,e){let r,i=this,s=this._readableState;1!==s.pipes.length||s.multiAwaitDrain||(s.multiAwaitDrain=!0,s.awaitDrainWriters=new f(s.awaitDrainWriters?[s.awaitDrainWriters]:[])),s.pipes.push(t),A("pipe count=%d opts=%j",s.pipes.length,e);let o=e&&!1===e.end||t===n.stdout||t===n.stderr?g:a;function a(){A("onend"),t.end()}s.endEmitted?n.nextTick(o):i.once("end",o),t.on("unpipe",function e(n,o){A("onunpipe"),n===i&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,A("cleanup"),t.removeListener("close",c),t.removeListener("finish",p),r&&t.removeListener("drain",r),t.removeListener("error",d),t.removeListener("unpipe",e),i.removeListener("end",a),i.removeListener("end",g),i.removeListener("data",u),l=!0,r&&s.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&r())});let l=!1;function h(){var e,n;l||(1===s.pipes.length&&s.pipes[0]===t?(A("false write response, pause",0),s.awaitDrainWriters=t,s.multiAwaitDrain=!1):s.pipes.length>1&&s.pipes.includes(t)&&(A("false write response, pause",s.awaitDrainWriters.size),s.awaitDrainWriters.add(t)),i.pause()),r||(e=i,n=t,r=function(){let t=e._readableState;t.awaitDrainWriters===n?(A("pipeOnDrain",1),t.awaitDrainWriters=null):t.multiAwaitDrain&&(A("pipeOnDrain",t.awaitDrainWriters.size),t.awaitDrainWriters.delete(n)),(!t.awaitDrainWriters||0===t.awaitDrainWriters.size)&&e.listenerCount("data")&&e.resume()},t.on("drain",r))}
90function u(e){A("ondata");let r=t.write(e);A("dest.write",r),!1===r&&h()}function d(e){if(A("onerror",e),g(),t.removeListener("error",d),0===t.listenerCount("error")){let r=t._writableState||t._readableState;r&&!r.errorEmitted?z(t,e):t.emit("error",e)}}function c(){t.removeListener("finish",p),g()}function p(){A("onfinish"),t.removeListener("close",c),g()}function g(){A("unpipe"),i.unpipe(t)}return i.on("data",u),_(t,"error",d),t.once("close",c),t.once("finish",p),t.emit("pipe",i),!0===t.writableNeedDrain?h():s.flowing||(A("pipe resume"),i.resume()),t},W.prototype.unpipe=function(t){let e=this._readableState;if(0===e.pipes.length)return this;if(!t){let t=e.pipes;e.pipes=[],this.pause();for(let e=0;e<t.length;e++)t[e].emit("unpipe",this,{hasUnpiped:!1});return this}let r=s(e.pipes,t);return -1===r||(e.pipes.splice(r,1),0===e.pipes.length&&this.pause(),t.emit("unpipe",this,{hasUnpiped:!1})),this},W.prototype.on=function(t,e){let r=b.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"!==t||i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,A("on readable",i.length,i.reading),i.length?Y(this):i.reading||n.nextTick(Q,this)),r},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(t,e){let r=b.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(Z,this),r},W.prototype.off=W.prototype.removeListener,W.prototype.removeAllListeners=function(t){let e=b.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&n.nextTick(Z,this),e},W.prototype.resume=function(){var t,e;let r=this._readableState;return r.flowing||(A("resume"),r.flowing=!r.readableListening,t=this,(e=r).resumeScheduled||(e.resumeScheduled=!0,n.nextTick(J,t,e))),r[F]=!1,this},W.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[F]=!0,this},W.prototype.wrap=function(t){let e=!1;t.on("data",r=>{!this.push(r)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",t=>{z(this,t)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};let r=u(t);for(let e=1;e<r.length;e++){let i=r[e];void 0===this[i]&&"function"==typeof t[i]&&(this[i]=t[i].bind(t))}return this},W.prototype[g]=function(){return te(this)},W.prototype.iterator=function(t){return void 0!==t&&O(t,"options"),te(this,t)},h(W.prototype,{readable:{__proto__:null,get(){let t=this._readableState;
90return!!t&&!1!==t.readable&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(!1!==this._readableState.readable&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),h($.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[F]},set(t){this[F]=!!t}}}),W._fromList=ti,W.from=function(t,e){return D(W,t,e)},W.fromWeb=function(t,e){return ta().newStreamReadableFromReadableStream(t,e)},W.toWeb=function(t,e){return ta().newReadableStreamFromStreamReadable(t,e)},W.wrap=function(t,e){var r,i;return new W({objectMode:null==(r=null!=(i=t.readableObjectMode)?i:t.objectMode)||r,...e,destroy(e,r){T.destroyer(t,e),r(e)}}).wrap(t)}},10303:(t,e,r)=>{"use strict";r.d(e,{z:()=>u});var i=r(34943),n=r(65179),s=r(86256),o=r(73599),a=r(32092);function l(t,e){let r=Math.max(s.K[t.data.type]/16,1),i=t.data.value.length/t.data.size,n=(4-i%4)%4,o=t.data.type.indexOf("i32")>=0?"dataInt32":"data";return`
91        v = uv.${t.data.name};
92        offset += ${e};
93
94        arrayOffset = offset;
95
96        t = 0;
97
98        for(var i=0; i < ${t.data.size*r}; i++)
99        {
100            for(var j = 0; j < ${i}; j++)
101            {
102                ${o}[arrayOffset++] = v[t++];
103            }
104            ${0!==n?`arrayOffset += ${n};`:""}
105        }
106    `}function h(t){return(0,o.E)(t,"uboStd40",l,a.g)}class u extends n.W{constructor(){super({createUboElements:s.l,generateUboSync:h})}}u.extension={type:[i.Ag.WebGLSystem],name:"ubo"}},10380:(t,e,r)=>{"use strict";r.d(e,{N:()=>o});var i=r(47397),n=r(27539);class s{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,e){let r=i.e.get().createCanvas();r.width=t,r.height=e;let n=r.getContext("2d");return{canvas:r,context:n}}getOptimalCanvasAndContext(t,e,r=1){t=Math.ceil(t*r-1e-6),e=Math.ceil(e*r-1e-6),t=(0,n.U5)(t),e=(0,n.U5)(e);let i=(t<<17)+(e<<1);this._canvasPool[i]||(this._canvasPool[i]=[]);let s=this._canvasPool[i].pop();return s||(s=this._createCanvasAndContext(t,e)),s}returnCanvasAndContext(t){let{width:e,height:r}=t.canvas,i=(e<<17)+(r<<1);t.context.clearRect(0,0,e,r),this._canvasPool[i].push(t)}clear(){this._canvasPool={}}}let o=new s},10601:t=>{"use strict";var e=Object.prototype.hasOwnProperty,r="~";function i(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function s(t,e,i,s,o){if("function"!=typeof i)throw TypeError("The listener must be a function");var a=new n(i,s||t,o),l=r?r+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],a]:t._events[l].push(a):(t._events[l]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1)),a.prototype.eventNames=function(){var t,i,n=[];if(0===this._eventsCount)return n;for(i in t=this._events)e.call(t,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,o=Array(s);n<s;n++)o[n]=i[n].fn;return o},a.prototype.listenerCount=function(t){var e=r?r+t:t,i=this._events[e];return i?i.fn?1:i.length:0}
106,a.prototype.emit=function(t,e,i,n,s,o){var a=r?r+t:t;if(!this._events[a])return!1;var l,h,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,i),!0;case 4:return u.fn.call(u.context,e,i,n),!0;case 5:return u.fn.call(u.context,e,i,n,s),!0;case 6:return u.fn.call(u.context,e,i,n,s,o),!0}for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];u.fn.apply(u.context,l)}else{var c,f=u.length;for(h=0;h<f;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),d){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,e);break;case 3:u[h].fn.call(u[h].context,e,i);break;case 4:u[h].fn.call(u[h].context,e,i,n);break;default:if(!l)for(c=1,l=Array(d-1);c<d;c++)l[c-1]=arguments[c];u[h].fn.apply(u[h].context,l)}}return!0},a.prototype.on=function(t,e,r){return s(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return s(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,i,n){var s=r?r+t:t;if(!this._events[s])return this;if(!e)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==e||n&&!a.once||i&&a.context!==i||o(this,s);else{for(var l=0,h=[],u=a.length;l<u;l++)(a[l].fn!==e||n&&!a[l].once||i&&a[l].context!==i)&&h.push(a[l]);h.length?this._events[s]=1===h.length?h[0]:h:o(this,s)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&o(this,e)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a},10620:(t,e,r)=>{"use strict";r.d(e,{z:()=>i});let i=(t,e,r=!1)=>(Array.isArray(t)||(t=[t]),e)?t.map(t=>"string"==typeof t||r?e(t):t):t},11278:(t,e,r)=>{"use strict";r.d(e,{S:()=>v});var i=r(34943),n=r(60175),s=r(13887),o=r(7258),a=r(28513),l=r(53670);class h{constructor(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBlockBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBlockBindings=null,this.program=null}}function u(t,e,r){let i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),i}function d(t){let e=Array(t);for(let t=0;t<e.length;t++)e[t]=!1;return e}function c(t,e){switch(t){case"float":case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return d(2*e);case"bvec3":return d(3*e);case"bvec4":return d(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])}return null}var f=r(68176);let p=null,g={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"},m={float:"float32",vec2:"float32x2",vec3:"float32x3",vec4:"float32x4",int:"sint32",ivec2:"sint32x2",ivec3:"sint32x3",ivec4:"sint32x4",uint:"uint32",uvec2:"uint32x2",uvec3:"uint32x3",uvec4:"uint32x4",bool:"uint32",bvec2:"uint32x2",bvec3:"uint32x3",bvec4:"uint32x4"};function y(t,e){if(!p){let e=Object.keys(g);p={};for(let r=0;r<e.length;++r){let i=e[r];p[t[i]]=g[i]}}return p[e]}function b(t,e){let r=t.getShaderSource(e).split("\n").map((t,e)=>`${e}: ${t}`),i=t.getShaderInfoLog(e),n=i.split("\n"),s={},o=n.map(t=>
106parseFloat(t.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(t=>!!t&&!s[t]&&(s[t]=!0,!0)),a=[""];o.forEach(t=>{r[t-1]=`%c${r[t-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});let l=r.join("\n");a[0]=l,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}let _={textureCount:0,blockIndex:0};class v{constructor(t){this._activeProgram=null,this._programDataHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_programDataHash")}contextChange(t){this._gl=t,this._programDataHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._activeProgram=null,this.maxTextures=(0,n.a)()}bind(t,e){if(this._setProgram(t.glProgram),e)return;_.textureCount=0,_.blockIndex=0;let r=this._shaderSyncFunctions[t.glProgram._key];r||(r=this._shaderSyncFunctions[t.glProgram._key]=this._generateShaderSync(t,this)),this._renderer.buffer.nextBindBase(!!t.glProgram.transformFeedbackVaryings),r(this._renderer,t,_)}updateUniformGroup(t){this._renderer.uniformGroup.updateUniformGroup(t,this._activeProgram,_)}bindUniformBlock(t,e,r=0){let i=this._renderer.buffer,n=this._getProgramData(this._activeProgram),s=t._bufferResource;s||this._renderer.ubo.updateUniformGroup(t);let o=t.buffer,a=i.updateBuffer(o),l=i.freeLocationForBufferBase(a);if(s){let{offset:e,size:r}=t;0===e&&r===o.data.byteLength?i.bindBufferBase(a,l):i.bindBufferRange(a,l,e)}else i.getLastBindBaseLocation(a)!==l&&i.bindBufferBase(a,l);let h=this._activeProgram._uniformBlockData[e].index;n.uniformBlockBindings[r]!==l&&(n.uniformBlockBindings[r]=l,this._renderer.gl.uniformBlockBinding(n.program,h,l))}_setProgram(t){if(this._activeProgram===t)return;this._activeProgram=t;let e=this._getProgramData(t);this._gl.useProgram(e.program)}_getProgramData(t){return this._programDataHash[t._key]||this._createProgramData(t)}_createProgramData(t){let e=t._key;return this._programDataHash[e]=function(t,e){let r=u(t,t.VERTEX_SHADER,e.vertex),i=u(t,t.FRAGMENT_SHADER,e.fragment),n=t.createProgram();t.attachShader(n,r),t.attachShader(n,i);let s=e.transformFeedbackVaryings;s&&("function"!=typeof t.transformFeedbackVaryings?(0,l.R)("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(n,s.names,"separate"===s.bufferMode?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(n),!t.getProgramParameter(n,t.LINK_STATUS)&&(t.getProgramParameter(n,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||b(t,r),t.getShaderParameter(i,t.COMPILE_STATUS)||b(t,i),console.error("PixiJS Error: Could not initialize shader."),""!==t.getProgramInfoLog(n)&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(n)))),e._attributeData=function(t,e,r=!1){let i={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r<n;r++){let n=e.getActiveAttrib(t,r);if(n.name.startsWith("gl_"))continue;let s=m[y(e,n.type)]||"float32";i[n.name]={location:0,format:s,stride:(0,f.m)(s).stride,offset:0,instance:!1,start:0}}let s=Object.keys(i);if(r){s.sort((t,e)=>t>e?1:-1);for(let r=0;r<s.length;r++)i[s[r]].location=r,e.bindAttribLocation(t,r,s[r]);e.linkProgram(t)}else for(let r=0;r<s.length;r++)i[s[r]].location=e.getAttribLocation(t,s[r]);return i}(n,t,!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertex)),e._uniformData=function(t,e){let r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let n=0;n<i;n++){let i=e.getActiveUniform(t,n),s=i.name.replace(/\[.*?\]$/,""),o=!!i.name.match(/\[.*?\]$/),a=y(e,i.type);r[s]={name:s,index:n,type:a,size:i.size,isArray:o,value:c(a,i.size)}}return r}(n,t),e._uniformBlockData=function(t,e){if(!e.ACTIVE_UNIFORM_BLOCKS)return{};let r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORM_BLOCKS);for(let n=0;n<i;n++){let i=e.getActiveUniformBlockName(t,n),s=e.getUniformBlockIndex(t,i),o=e.getActiveUniformBlockParameter(t,n,e.UNIFORM_BLOCK_DATA_SIZE);r[i]={name:i,index:s,size:o}}return r}(n,t),t.deleteShader(r),t.deleteShader(i);let o={};for(let r in e._uniformData){let i=e._uniformData[r];o[r]={location:t.getUniformLocation(n,r),value:c(i.type,i.size)}}return new h(n,o)}(this._gl,t),this._programDataHash[e]}destroy(){for(let t of Object.keys(this._programDataHash))this._programDataHash[t].destroy(),this._programDataHash[t]=null;this._programDataHash=null}_generateShaderSync(t,e){return function(t,e){let r=[],i=[`
107        var g = s.groups;
108        var sS = r.shader;
109        var p = s.glProgram;
110        var ugS = r.uniformGroup;
111        var resources;
112    `],n=!1,l=0,h=e._getProgramData(t.glProgram);for(let u in t.groups){let d=t.groups[u];for(let c in r.push(`
113            resources = g[${u}].resources;
114        `),d.resources){let f=d.resources[c];if(f instanceof o.k)if(f.ubo){let e=t._uniformBindMap[u][Number(c)];r.push(`
115                        sS.bindUniformBlock(
116                            resources[${c}],
117                            '${e}',
118                            ${t.glProgram._uniformBlockData[e].index}
119                        );
120                    `)}else r.push(`
121                        ugS.updateUniformGroup(resources[${c}], p, sD);
122                    `);else if(f instanceof s.d){let e=t._uniformBindMap[u][Number(c)];r.push(`
123                    sS.bindUniformBlock(
124                        resources[${c}],
125                        '${e}',
126                        ${t.glProgram._uniformBlockData[e].index}
127                    );
128                `)}else if(f instanceof a.v){let s=t._uniformBindMap[u][c],o=h.uniformData[s];o&&(n||(n=!0,i.push(`
129                        var tS = r.texture;
130                        `)),e._gl.uniform1i(o.location,l),r.push(`
131                        tS.bind(resources[${c}], ${l});
132                    `),l++)}}}return Function("r","s","sD",[...i,...r].join("\n"))}(t,e)}resetState(){this._activeProgram=null}}v.extension={type:[i.Ag.WebGLSystem],name:"shader"}},11627:(t,e,r)=>{"use strict";r.d(e,{W:()=>l});var i=r(27539),n=r(28513),s=r(46480);let o=0;class a{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1}createTexture(t,e,r){let i=new n.v({...this.textureOptions,width:t,height:e,resolution:1,antialias:r,autoGarbageCollect:!1});return new s.g({source:i,label:`texturePool_${o++}`})}getOptimalTexture(t,e,r=1,n){let s=Math.ceil(t*r-1e-6),o=Math.ceil(e*r-1e-6),a=((s=(0,i.U5)(s))<<17)+((o=(0,i.U5)(o))<<1)+ +!!n;this._texturePool[a]||(this._texturePool[a]=[]);let l=this._texturePool[a].pop();return l||(l=this.createTexture(s,o,n)),l.source._resolution=r,l.source.width=s/r,l.source.height=o/r,l.source.pixelWidth=s,l.source.pixelHeight=o,l.frame.x=0,l.frame.y=0,l.frame.width=t,l.frame.height=e,l.updateUvs(),this._poolKeyHash[l.uid]=a,l}getSameSizeTexture(t,e=!1){let r=t.source;return this.getOptimalTexture(t.width,t.height,r._resolution,e)}returnTexture(t){let e=this._poolKeyHash[t.uid];this._texturePool[e].push(t)}clear(t){if(t=!1!==t)for(let t in this._texturePool){let e=this._texturePool[t];if(e)for(let t=0;t<e.length;t++)e[t].destroy(!0)}this._texturePool={}}}let l=new a},12737:(t,e,r)=>{"use strict";var i=r(33345).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(t){var e;switch(this.encoding=function(t){var e=function(t){var e;if(!t)return"utf8";for(;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";
132case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=h,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=u,this.end=d,e=3;break;default:this.write=c,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if((192&e[0])!=128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((192&e[1])!=128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(192&e[2])!=128)return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length)}function l(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=s,s.prototype.write=function(t){var e,r;if(0===t.length)return"";if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},s.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},s.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var n=o(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||-2===n?0:(n=o(e[i]))>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||-2===n?0:(n=o(e[i]))>=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},13113:(t,e,r)=>{"use strict";r.d(e,{x:()=>a});var i=r(53670),n=r(76301),s=r(10620),o=r(52165);class a{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,e)=>`${t}${this._bundleIdConnector}${e}`,extractAssetIdFromBundle:(t,e)=>e.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,"bar"!==this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar")))throw Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){"string"==typeof t?this._defaultSearchParams=t:this._defaultSearchParams=Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}getAlias(t){let{alias:e,src:r}=t;return(0,s.z)(e||r,t=>"string"==typeof t?t:Array.isArray(t)?t.map(t=>t?.src??t):t?.src?t.src:t,!0)}addManifest(t){this._manifest&&(0,i.R)("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEac
132h(t=>{this.addBundle(t.name,t.assets)})}addBundle(t,e){let r=[],i=e;Array.isArray(e)||(i=Object.entries(e).map(([t,e])=>"string"==typeof e||Array.isArray(e)?{alias:t,src:e}:{alias:t,...e})),i.forEach(e=>{let i,n=e.src,s=e.alias;if("string"==typeof s){let e=this._createBundleAssetId(t,s);r.push(e),i=[s,e]}else{let e=s.map(e=>this._createBundleAssetId(t,e));r.push(...e),i=[...s,...e]}this.add({...e,alias:i,src:n})}),this._bundles[t]=r}add(t){let e,r=[];Array.isArray(t)?r.push(...t):r.push(t),e=t=>{this.hasKey(t)&&(0,i.R)(`[Resolver] already has key: ${t} overwriting`)},(0,s.z)(r).forEach(t=>{let{src:r}=t,{data:i,format:n,loadParser:o}=t,a=(0,s.z)(r).map(t=>{if("string"==typeof t){let e=t.match(/\{(.*?)\}/g),r=[];if(e){let i=[];e.forEach(t=>{let e=t.substring(1,t.length-1).split(",");i.push(e)}),function t(e,r,i,n,s){let o=r[i];for(let a=0;a<o.length;a++){let l=o[a];i<r.length-1?t(e.replace(n[i],l),r,i+1,n,s):s.push(e.replace(n[i],l))}}(t,i,0,e,r)}else r.push(t);return r}return Array.isArray(t)?t:[t]}),l=this.getAlias(t);Array.isArray(l)?l.forEach(e):e(l);let h=[];a.forEach(t=>{t.forEach(t=>{let e={};if("object"!=typeof t){e.src=t;for(let r=0;r<this._parsers.length;r++){let i=this._parsers[r];if(i.test(t)){e=i.parse(t);break}}}else i=t.data??i,n=t.format??n,o=t.loadParser??o,e={...e,...t};if(!l)throw Error(`[Resolver] alias is undefined for this asset: ${e.src}`);e=this._buildResolvedAsset(e,{aliases:l,data:i,format:n,loadParser:o}),h.push(e)})}),l.forEach(t=>{this._assetMap[t]=h})})}resolveBundle(t){let e=(0,o.a)(t);t=(0,s.z)(t);let r={};return t.forEach(t=>{let e=this._bundles[t];if(e){let i=this.resolve(e),n={};for(let e in i){let r=i[e];n[this._extractAssetIdFromBundle(t,e)]=r}r[t]=n}}),e?r[t[0]]:r}resolveUrl(t){let e=this.resolve(t);if("string"!=typeof t){let t={};for(let r in e)t[r]=e[r].src;return t}return e.src}resolve(t){let e=(0,o.a)(t);t=(0,s.z)(t);let r={};return t.forEach(t=>{if(!this._resolverHash[t])if(this._assetMap[t]){let e=this._assetMap[t],r=this._getPreferredOrder(e);r?.priority.forEach(t=>{r.params[t].forEach(r=>{let i=e.filter(e=>!!e[t]&&e[t]===r);i.length&&(e=i)})}),this._resolverHash[t]=e[0]}else this._resolverHash[t]=this._buildResolvedAsset({alias:[t],src:t},{});r[t]=this._resolverHash[t]}),e?r[t[0]]:r}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let e=0;e<t.length;e++){let r=t[e],i=this._preferredOrder.find(t=>t.params.format.includes(r.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;let e=/\?/.test(t)?"&":"?";return`${t}${e}${this._defaultSearchParams}`}
132_buildResolvedAsset(t,e){let{aliases:r,data:i,loadParser:s,format:o}=e;return(this._basePath||this._rootPath)&&(t.src=n.A.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=r??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...i||{},...t.data},t.loadParser=s??t.loadParser,t.format=o??t.format??t.src.split(".").pop().split("?").shift().split("#").shift(),t}}a.RETINA_PREFIX=/@([0-9\.]+)x/},13887:(t,e,r)=>{"use strict";r.d(e,{d:()=>s});var i=r(66888),n=r(44571);class s extends i.A{constructor({buffer:t,offset:e,size:r}){super(),this.uid=(0,n.L)("buffer"),this._resourceType="bufferResource",this._touched=0,this._resourceId=(0,n.L)("resource"),this._bufferResource=!0,this.destroyed=!1,this.buffer=t,this.offset=0|e,this.size=r,this.buffer.on("change",this.onBufferChange,this)}onBufferChange(){this._resourceId=(0,n.L)("resource"),this.emit("change",this)}destroy(t=!1){this.destroyed=!0,t&&this.buffer.destroy(),this.emit("change",this),this.buffer=null}}},14920:(t,e,r)=>{"use strict";function i(t,e){return 0xffffff!==t&&e?0xffffff!==e&&t?((t>>16&255)*(e>>16&255)/255<<16)+((t>>8&255)*(e>>8&255)/255<<8)+((255&t)*(255&e)/255|0):t:e}r.d(e,{u:()=>i})},16434:(t,e,r)=>{"use strict";r.d(e,{M:()=>s});var i=r(94521);let n=[new i.b,new i.b,new i.b,new i.b];class s{constructor(t=0,e=0,r=0,i=0){this.type="rectangle",this.x=Number(t),this.y=Number(e),this.width=Number(r),this.height=Number(i)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new s(0,0,0,0)}clone(){return new s(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(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)}strokeContains(t,e,r,i=.5){let{width:n,height:s}=this;if(n<=0||s<=0)return!1;let o=this.x,a=this.y,l=r*(1-i),h=r-l;return t>=o-l&&t<=o+n+l&&e>=a-l&&e<=a+s+l&&!(t>o+h&&t<o+n-h&&e>a+h&&e<a+s-h)}intersects(t,e){if(!e){let e=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=e)return!1;let r=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>r}let r=this.left,i=this.right,s=this.top,o=this.bottom;if(i<=r||o<=s)return!1;let a=n[0].set(t.left,t.top),l=n[1].set(t.left,t.bottom),h=n[2].set(t.right,t.top),u=n[3].set(t.right,t.bottom);if(h.x<=a.x||l.y<=a.y)return!1;let d=Math.sign(e.a*e.d-e.b*e.c);if(0===d||(e.apply(a,a),e.apply(l,l),e.apply(h,h),e.apply(u,u),Math.max(a.x,l.x,h.x,u.x)<=r||Math.min(a.x,l.x,h.x,u.x)>=i||Math.max(a.y,l.y,h.y,u.y)<=s||Math.min(a.y,l.y,h.y,u.y)>=o))return!1;let c=d*(l.y-a.y),f=d*(a.x-l.x),p=c*r+f*s,g=c*i+f*s,m=c*r+f*o,y=c*i+f*o;if(Math.max(p,g,m,y)<=c*a.x+f*a.y||Math.min(p,g,m,y)>=c*u.x+f*u.y)return!1;let b=d*(a.y-h.y),_=d*(h.x-a.x),v=b*r+_*s,x=b*i+_*s,w=b*r+_*o,A=b*i+_*o;return!(Math.max(v,x,w,A)<=b*a.x+_*a.y||Math.min(v,x,w,A)>=b*u.x+_*u.y)}pad(t=0,e=t){return this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this}fit(t){let e=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(r-e,0),this.y=i,this.height=Math.max(n-i,0),this}ceil(t=1,e=.001){let r=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=i-this.y,this}enlarge(t){let e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=r-e,this.y=i,this.height=n-i,this}getBounds(t){return t||(t=new s),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;let e=t.x,r=t.y,i=t.x+t.width,n=t.y+t.height;return e>=this.x&&e<this.x+this.width&&r>=this.y&&r<this.y+this.height&&i>=this.x&&i<this.x+this.width&&n>=this.y&&n<this.y+this.height}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}},17004:(t,e,r)=>{"use strict";r.d(e,{J:()=>I});var i=r(34943),n=r(44571),s=r(21124),o=r(5134),a=r(50121),l=r(60175);class h{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){let e=this.textures[t];this.textures[t]=null,this.ids[e.uid]=null}this.count=0}}class u{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new h,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null}}let d=[],c=0;function f(){return c>0?d[--c]:new u}let p=0,g=class t{constructor(e={}){this.uid=(0,n.L)("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t.defaultOptions.maxTextures=t.defaultOptions.maxTextures??(0,l.a)();const{maxTextures:r,attributesInitialSize:i,indicesInitialSize:o}=e={...t.defaultOptions,...e};this.attributeBuffer=new s.u(4*i),this.indexBuffer=new Uint16Array(o),this.maxTextures=r}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let e=0;e<this.batchIndex;e++){var t;t=this.batches[e],d[c++]=t}this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t._indexStart=this.indexSize,t._attributeStart=this.attributeSize,t._batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.attributeSize*this.vertexSize}checkAndUpdateTexture(t,e){let r=t._batch.textures.ids[e._source.uid];return(!!r||0===r)&&(t._textureId=r,t.texture=e,!0)}updateElement(t){this.dirty=!0;let e=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,e.float32View,e.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,e.float32View,e.uint32View,t._attributeStart,t._textureId)}break(t){let e=this._elements;if(!e[this.elementStart])return;let r=f(),i=r.textures;i.clear();let n=e[this.elementStart],s=(0,a.i)(n.blendMode,n.texture._source),o=n.topology;4*this.attributeSize>this.attributeBuffer.size&&this._resizeAttributeBuffer(4*this.attributeSize),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);let l=this.attributeBuffer.float32View,h=this.attributeBuffer.uint32View,u=this.indexBuffer,d=this._batchIndexSize,c=this._batchIndexStart,g="startBatch",m=this.maxTextures;for(let n=this.elementStart;n<this.elementSize;++n){let y=e[n];e[n]=null;let b=y.texture._source,_=(0,a.i)(y.blendMode,b),v=s!==_||o!==y.topology;if(b._batchTick===p&&!v){y._textureId=b._textureBindLocation,d+=y.indexSize,y.packAsQuad?(this.packQuadAttributes(y,l,h,y._attributeStart,y._textureId),this.packQuadIndex(u,y._indexStart,y._attributeStart/this.vertexSize)):(this.packAttributes(y,l,h,y._attributeStart,y._textureId),this.packIndex(y,u,y._indexStart,y._attributeStart/this.vertexSize)),y._batch=r;continue}b._batchTick=p,(i.count>=m||v)&&(this._finishBatch(r,c,d-c,i,s,o,t,g),g="renderBatch",c=d,s=_,o=y.topology,(i=(r=f()).textures).clear(),++p),y._textureId=b._textureBindLocation=i.count,i.ids[b.uid]=i.count,i.textures[i.count++
132]=b,y._batch=r,d+=y.indexSize,y.packAsQuad?(this.packQuadAttributes(y,l,h,y._attributeStart,y._textureId),this.packQuadIndex(u,y._indexStart,y._attributeStart/this.vertexSize)):(this.packAttributes(y,l,h,y._attributeStart,y._textureId),this.packIndex(y,u,y._indexStart,y._attributeStart/this.vertexSize))}i.count>0&&(this._finishBatch(r,c,d-c,i,s,o,t,g),c=d,++p),this.elementStart=this.elementSize,this._batchIndexStart=c,this._batchIndexSize=d}_finishBatch(t,e,r,i,n,s,o,a){t.gpuBindGroup=null,t.bindGroup=null,t.action=a,t.batcher=this,t.textures=i,t.blendMode=n,t.topology=s,t.start=e,t.size=r,++p,this.batches[this.batchIndex++]=t,o.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){4*t<=this.attributeBuffer.size||this._resizeAttributeBuffer(4*t)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){let e=Math.max(t,2*this.attributeBuffer.size),r=new s.u(e);(0,o.W)(this.attributeBuffer.rawBinaryData,r.rawBinaryData),this.attributeBuffer=r}_resizeIndexBuffer(t){let e=this.indexBuffer,r=Math.max(t,1.5*e.length);r+=r%2;let i=r>65535?new Uint32Array(r):new Uint16Array(r);if(i.BYTES_PER_ELEMENT!==e.BYTES_PER_ELEMENT)for(let t=0;t<e.length;t++)i[t]=e[t];else(0,o.W)(e.buffer,i.buffer);this.indexBuffer=i}packQuadIndex(t,e,r){t[e]=r+0,t[e+1]=r+1,t[e+2]=r+2,t[e+3]=r+0,t[e+4]=r+2,t[e+5]=r+3}packIndex(t,e,r,i){let n=t.indices,s=t.indexSize,o=t.indexOffset,a=t.attributeOffset;for(let t=0;t<s;t++)e[r++]=i+n[t+o]-a}destroy(){for(let e=0;e<this.batches.length;e++){var t;t=this.batches[e],d[c++]=t}this.batches=null;for(let t=0;t<this._elements.length;t++)this._elements[t]._batch=null;this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}};g.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let m=g;var y=r(52819),b=r(30204),_=r(97786);let v=new Float32Array(1),x=new Uint32Array(1);class w extends _.V{constructor(){const t=new y.h({data:v,label:"attribute-batch-buffer",usage:b.S.VERTEX|b.S.COPY_DST,shrinkToFit:!1});super({attributes:{aPosition:{buffer:t,format:"float32x2",stride:24,offset:0},aUV:{buffer:t,format:"float32x2",stride:24,offset:8},aColor:{buffer:t,format:"unorm8x4",stride:24,offset:16},aTextureIdAndRound:{buffer:t,format:"uint16x2",stride:24,offset:20}},indexBuffer:new y.h({data:x,label:"index-batch-buffer",usage:b.S.INDEX|b.S.COPY_DST,shrinkToFit:!1})})}}var A=r(70728),S=r(17897),T=r(32360),C=r(24555),E=r(33026),k=r(96197);class M extends k.M{constructor(t){super({glProgram:(0,A.I)({name:"batch",bits:[S.a,(0,T.P)(t),C.m]}),gpuProgram:(0,A.v)({name:"batch",bits:[S.F,(0,T._)(t),C.b]}),resources:{batchSamplers:(0,E.n)(t)}})}}let B=null,P=class t extends m{constructor(){super(...arguments),this.geometry=new w,this.shader=B||(B=new M(this.maxTextures)),this.name=t.extension.name,this.vertexSize=6}packAttributes(t,e,r,i,n){let s=n<<16|65535&t.roundPixels,o=t.transform,a=o.a,l=o.b,h=o.c,u=o.d,d=o.tx,c=o.ty,{positions:f,uvs:p}=t,g=t.color,m=t.attributeOffset,y=m+t.attributeSize;for(let t=m;t<y;t++){let n=2*t,o=f[n],m=f[n+1];e[i++]=a*o+h*m+d,e[i++]=u*m+l*o+c,e[i++]=p[n],e[i++]=p[n+1],r[i++]=g,r[i++]=s}}packQuadAttributes(t,e,r,i,n){let s=t.texture,o=t.transform,a=o.a,l=o.b,h=o.c,u=o.d,d=o.tx,c=o.ty,f=t.bounds,p=f.maxX,g=f.minX,m=f.maxY,y=f.minY,b=s.uvs,_=t.color,v=n<<16|65535&t.roundPixels;e[i+0]=a*g+h*y+d,e[i+1]=u*y+l*g+c,e[i+2]=b.x0,e[i+3]=b.y0,r[i+4]=_,r[i+5]=v,e[i+6]=a*p+h*y+d,e[i+7]=u*y+l*p+c,e[i+8]=b.x1,e[i+9]=b.y1,r[i+10]=_,r[i+11]=v,e[i+12]=a*p+h*m+d,e[i+13]=u*m+l*p+c,e[i+14]=b.x2,e[i+15]=b.y2,r[i+16]=_,r[i+17]=v,e[i+18]=a*g+h*m+d,e[i+19]=u*m+l*g+c,e[i+20]=b.x3,e[i+21]=b.y3,r[i+22]=_,r[i+23]=v}};P.extension={type:[i.Ag.Batcher],name:"default"};let I=P},17011:(t,e,r)=>{"use strict";r.d(e,{V:()=>n,f:()=>i});let i={i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},f16:{align:2,size:2},"vec2<i32>":{align:8,size:8},"vec2<u32>":{align:8,size:8},"vec2<f32>":{align:8,size:8},"vec2<f16>":{align:4,size:4},"vec3<i32>":{align:16,size:12},"vec3<u32>":{align:16,size:12},"vec3<f32>":{align:16,size:12},"vec3<f16>":{align:8,size:6},"vec4<i32>":{align:16,size:16},"vec4<u32>":{align:16,size:16},"vec4<f32>":{align:16,size:16},"vec4<f16>":{align:8,size:8},"mat2x2<f32>":{align:8,size:16},"mat2x2<f16>":{align:4,size:8},"mat3x2<f32>":{align:8,size:24},"mat3x2<f16>":{align:4,size:12},"mat4x2<f32>":{align:8,size:32},"mat4x2<f16>":{align:4,size:16},"mat2x3<f32>":{align:16,size:32},"mat2x3<f16>
132":{align:8,size:16},"mat3x3<f32>":{align:16,size:48},"mat3x3<f16>":{align:8,size:24},"mat4x3<f32>":{align:16,size:64},"mat4x3<f16>":{align:8,size:32},"mat2x4<f32>":{align:16,size:32},"mat2x4<f16>":{align:8,size:16},"mat3x4<f32>":{align:16,size:48},"mat3x4<f16>":{align:8,size:24},"mat4x4<f32>":{align:16,size:64},"mat4x4<f16>":{align:8,size:32}};function n(t){let e=t.map(t=>({data:t,offset:0,size:0})),r=0;for(let t=0;t<e.length;t++){let n=e[t],s=i[n.data.type].size,o=i[n.data.type].align;if(!i[n.data.type])throw Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${n.data.type}`);n.data.size>1&&(s=Math.max(s,o)*n.data.size),r=Math.ceil(r/o)*o,n.size=s,n.offset=r,r+=s}return{uboElements:e,size:r=16*Math.ceil(r/16)}}},17897:(t,e,r)=>{"use strict";r.d(e,{F:()=>i,a:()=>n});let i={name:"color-bit",vertex:{header:`
133            @in aColor: vec4<f32>;
134        `,main:`
135            vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
136        `}},n={name:"color-bit",vertex:{header:`
137            in vec4 aColor;
138        `,main:`
139            vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
140        `}}},18717:(t,e,r)=>{"use strict";function i(t,e,r){let i,n=t.length;if(e>=n||0===r)return;r=e+r>n?n-e:r;let s=n-r;for(i=e;i<s;++i)t[i]=t[i+r];t.length=s}r.d(e,{d:()=>i})},19677:(t,e,r)=>{"use strict";r.d(e,{u:()=>s});var i=r(63454),n=r(94521);class s{constructor(t=1,e=0,r=0,i=1,n=0,s=0){this.array=null,this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=s}fromArray(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]}set(t,e,r,i,n,s){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=s,this}toArray(t,e){this.array||(this.array=new Float32Array(9));let r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0),r[8]=1,r}apply(t,e){e=e||new n.b;let r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e}applyInverse(t,e){e=e||new n.b;let r=this.a,i=this.b,s=this.c,o=this.d,a=this.tx,l=this.ty,h=1/(r*o+-(s*i)),u=t.x,d=t.y;return e.x=o*h*u+-s*h*d+(l*s-a*o)*h,e.y=r*h*d+-i*h*u+(-l*r+a*i)*h,e}translate(t,e){return this.tx+=t,this.ty+=e,this}scale(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this}rotate(t){let e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,s=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=s*e-this.ty*r,this.ty=s*r+this.ty*e,this}append(t){let e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this}appendFrom(t,e){let r=t.a,i=t.b,n=t.c,s=t.d,o=t.tx,a=t.ty,l=e.a,h=e.b,u=e.c,d=e.d;return this.a=r*l+i*u,this.b=r*h+i*d,this.c=n*l+s*u,this.d=n*h+s*d,this.tx=o*l+a*u+e.tx,this.ty=o*h+a*d+e.ty,this}setTransform(t,e,r,i,n,s,o,a,l){return this.a=Math.cos(o+l)*n,this.b=Math.sin(o+l)*n,this.c=-Math.sin(o-a)*s,this.d=Math.cos(o-a)*s,this.tx=t-(r*this.a+i*this.c),this.ty=e-(r*this.b+i*this.d),this}prepend(t){let e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){let e=this.a,r=this.c;this.a=e*t.a+this.b*t.c,this.b=e*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}decompose(t){let e=this.a,r=this.b,n=this.c,s=this.d,o=t.pivot,a=-Math.atan2(-n,s),l=Math.atan2(r,e),h=Math.abs(a+l);return h<1e-5||1e-5>Math.abs(i.TO-h)?(t.rotation=l,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=l),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(n*n+s*s),t.position.x=this.tx+(o.x*e+o.y*n),t.position.y=this.ty+(o.x*r+o.y*s),t}invert(){let t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,s=t*i-e*r;return this.a=i/s,this.b=-e/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*n)/s,this.ty=-(t*this.ty-e*n)/s,this}isIdentity(){return 1===this.a&&0===this.b&&0===this.c&&1===this.d&&0===this.tx&&0===this.ty}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let t=new s;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}copyTo(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}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(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}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return a.identity()}static get shared(){return o.identity()}}let o=new s,a=new s},19777:(t,e,r)=>{"use strict";r.d(e,{h:()=>u});var i=r(52819),n=r(30204),s=r(97786),o=r(68176),a=r(21124);function l(t,e=null){let r=6*t;if(r>65535?e||(e=new Uint32Array(r)):e||(e=new Uint16Array(r)),e.length!==r)throw Error(`Out buffer length is incorrect, got ${e.length} and expected ${r}`);for(let t=0,i=0;t<r;t+=6,i+=4)e[t+0]=i+0,e[t+1]=i+1,e[t+2]=i+2,e[t+3]=i+0,e[t+4]=i+2,e[t+5]=i+3;return e}function h(t,e){let r=[];r.push(`
141      
142        var index = 0;
143
144        for (let i = 0; i < ps.length; ++i)
145        {
146            const p = ps[i];
147
148            `);let i=0;for(let n in t){let s=t[n];e===s.dynamic&&(r.push(`offset = index + ${i}`),r.push(s.code),i+=(0,o.m)(s.format).stride/4)}return r.push(`
149            index += stride * 4;
150        }
151    `),r.unshift(`
152        var stride = ${i};
153    `),Function("ps","f32v","u32v",r.join("\n"))}class u{constructor(t){this._size=0,this._generateParticleUpdate
153Cache={};const e=this._size=t.size??1e3,r=t.properties;let h=0,u=0;for(const t in r){const e=r[t],i=(0,o.m)(e.format);e.dynamic?u+=i.stride:h+=i.stride}this._dynamicStride=u/4,this._staticStride=h/4,this.staticAttributeBuffer=new a.u(4*e*h),this.dynamicAttributeBuffer=new a.u(4*e*u),this.indexBuffer=l(e);const d=new s.V;let c=0,f=0;for(const t in this._staticBuffer=new i.h({data:new Float32Array(1),label:"static-particle-buffer",shrinkToFit:!1,usage:n.S.VERTEX|n.S.COPY_DST}),this._dynamicBuffer=new i.h({data:new Float32Array(1),label:"dynamic-particle-buffer",shrinkToFit:!1,usage:n.S.VERTEX|n.S.COPY_DST}),r){const e=r[t],i=(0,o.m)(e.format);e.dynamic?(d.addAttribute(e.attributeName,{buffer:this._dynamicBuffer,stride:4*this._dynamicStride,offset:4*c,format:e.format}),c+=i.size):(d.addAttribute(e.attributeName,{buffer:this._staticBuffer,stride:4*this._staticStride,offset:4*f,format:e.format}),f+=i.size)}d.addIndex(this.indexBuffer);const p=this.getParticleUpdate(r);this._dynamicUpload=p.dynamicUpdate,this._staticUpload=p.staticUpdate,this.geometry=d}getParticleUpdate(t){let e=function(t){let e=[];for(let r in t){let i=t[r];e.push(r,i.code,i.dynamic?"d":"s")}return e.join("_")}(t);return this._generateParticleUpdateCache[e]||(this._generateParticleUpdateCache[e]=this.generateParticleUpdate(t)),this._generateParticleUpdateCache[e]}generateParticleUpdate(t){return{dynamicUpdate:h(t,!0),staticUpdate:h(t,!1)}}update(t,e){t.length>this._size&&(e=!0,this._size=Math.max(t.length,1.5*this._size|0),this.staticAttributeBuffer=new a.u(this._size*this._staticStride*16),this.dynamicAttributeBuffer=new a.u(this._size*this._dynamicStride*16),this.indexBuffer=l(this._size),this.geometry.indexBuffer.setDataWithSize(this.indexBuffer,this.indexBuffer.byteLength,!0));let r=this.dynamicAttributeBuffer;if(this._dynamicUpload(t,r.float32View,r.uint32View),this._dynamicBuffer.setDataWithSize(this.dynamicAttributeBuffer.float32View,t.length*this._dynamicStride*4,!0),e){let e=this.staticAttributeBuffer;this._staticUpload(t,e.float32View,e.uint32View),this._staticBuffer.setDataWithSize(e.float32View,t.length*this._staticStride*4,!0)}}destroy(){this._staticBuffer.destroy(),this._dynamicBuffer.destroy(),this.geometry.destroy()}}},20060:(t,e,r)=>{"use strict";r.d(e,{c:()=>o});var i=r(19677),n=r(16434);let s=new i.u;class o{constructor(t=1/0,e=1/0,r=-1/0,i=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=s,this.minX=t,this.minY=e,this.maxX=r,this.maxY=i}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new n.M);let t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=s,this}set(t,e,r,i){this.minX=t,this.minY=e,this.maxX=r,this.maxY=i}addFrame(t,e,r,i,n){n||(n=this.matrix);let s=n.a,o=n.b,a=n.c,l=n.d,h=n.tx,u=n.ty,d=this.minX,c=this.minY,f=this.maxX,p=this.maxY,g=s*t+a*e+h,m=o*t+l*e+u;g<d&&(d=g),m<c&&(c=m),g>f&&(f=g),m>p&&(p=m),g=s*r+a*e+h,m=o*r+l*e+u,g<d&&(d=g),m<c&&(c=m),g>f&&(f=g),m>p&&(p=m),g=s*t+a*i+h,m=o*t+l*i+u,g<d&&(d=g),m<c&&(c=m),g>f&&(f=g),m>p&&(p=m),g=s*r+a*i+h,m=o*r+l*i+u,g<d&&(d=g),m<c&&(c=m),g>f&&(f=g),m>p&&(p=m),this.minX=d,this.minY=c,this.maxX=f,this.maxY=p}addRect(t,e){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,e)}addBounds(t,e){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,e)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){let e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,{a:s,b:o,c:a,d:l,tx:h,ty:u}=t,d=s*e+a*r+h,c=o*e+l*r+u;this.minX=d,this.minY=c,this.maxX=d,this.maxY=c,d=s*i+a*r+h,c=o*i+l*r+u,this.minX=d<this.minX?d:this.minX,this.minY=c<this.minY?c:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=c>this.maxY?c:this.maxY,d=s*e+a*n+h,c=o*e+l*n+u,this.minX=d<this.minX?d:this.minX,this.minY=c<this.minY?c:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=c>this.maxY?c:this.maxY,d=s*i+a*n+h,c=o*i+l*n+u,this.minX=d<this.minX?d:this.minX,this.minY=c<this.minY?c:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=c>this.maxY?c:this.maxY}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,e,r,i){return this.minX<t&&(this.minX=t),this.maxX>e&&(this.maxX=e),this.minY<r&&(this.minY=r),this.maxY>i&&(this.maxY=i),this}pad(t,e=t){return this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new o(this.minX,this.minY,this.maxX,this.maxY)}scale(t,e=t){return this.minX*=t,this.minY*=e,this.maxX*=t,this.maxY*=e,this}get x(){return this.minX}set x(t){let e=this.maxX-this.minX;this.minX=t,this.maxX=t+e}get y(){return this.minY}set y(t){let e=this.maxY-this.minY;this.minY=t,this.maxY=t+e}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}
153addVertexData(t,e,r,i){let n=this.minX,s=this.minY,o=this.maxX,a=this.maxY;i||(i=this.matrix);let l=i.a,h=i.b,u=i.c,d=i.d,c=i.tx,f=i.ty;for(let i=e;i<r;i+=2){let e=t[i],r=t[i+1],p=l*e+u*r+c,g=h*e+d*r+f;n=p<n?p:n,s=g<s?g:s,o=p>o?p:o,a=g>a?g:a}this.minX=n,this.minY=s,this.maxX=o,this.maxY=a}containsPoint(t,e){return!!(this.minX<=t)&&!!(this.minY<=e)&&!!(this.maxX>=t)&&!!(this.maxY>=e)}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}},20140:(t,e,r)=>{"use strict";let i,n,{ObjectDefineProperties:s,ObjectGetOwnPropertyDescriptor:o,ObjectKeys:a,ObjectSetPrototypeOf:l}=r(34418);t.exports=d;let h=r(9138),u=r(7926);l(d.prototype,h.prototype),l(d,h);{let t=a(u.prototype);for(let e=0;e<t.length;e++){let r=t[e];d.prototype[r]||(d.prototype[r]=u.prototype[r])}}function d(t){if(!(this instanceof d))return new d(t);h.call(this,t),u.call(this,t),t?(this.allowHalfOpen=!1!==t.allowHalfOpen,!1===t.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===t.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}function c(){return void 0===i&&(i={}),i}s(d.prototype,{writable:{__proto__:null,...o(u.prototype,"writable")},writableHighWaterMark:{__proto__:null,...o(u.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...o(u.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...o(u.prototype,"writableBuffer")},writableLength:{__proto__:null,...o(u.prototype,"writableLength")},writableFinished:{__proto__:null,...o(u.prototype,"writableFinished")},writableCorked:{__proto__:null,...o(u.prototype,"writableCorked")},writableEnded:{__proto__:null,...o(u.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...o(u.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}}),d.fromWeb=function(t,e){return c().newStreamDuplexFromReadableWritablePair(t,e)},d.toWeb=function(t){return c().newReadableWritablePairFromDuplex(t)},d.from=function(t){return n||(n=r(57714)),n(t,"body")}},21124:(t,e,r)=>{"use strict";r.d(e,{u:()=>i});class i{constructor(t){"number"==typeof t?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this.uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw Error(`${t} isn't a valid view type`)}}}},22236:(t,e,r)=>{"use strict";let i;r.d(e,{M:()=>d});var n=r(32816),s=r(79662);let o={},a={},l={stripVersion:function(t,e){return e?t.replace("#version 300 es",""):t},ensurePrecision:function(t,e,r){let i=r?e.maxSupportedFragmentPrecision:e.maxSupportedVertexPrecision;if("precision"!==t.substring(0,9)){let n=r?e.requestedFragmentPrecision:e.requestedVertexPrecision;return"highp"===n&&"highp"!==i&&(n="mediump"),`precision ${n} float;
154${t}`}return"highp"!==i&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t},addProgramDefines:function(t,e,r){return e?t:r?(t=t.replace("out vec4 finalColor;",""),`
155        
156        #ifdef GL_ES // This checks if it is WebGL1
157        #define in varying
158        #define finalColor gl_FragColor
159        #define texture texture2D
160        #endif
161        ${t}
162        `):`
163        
164        #ifdef GL_ES // This checks if it is WebGL1
165        #define in attribute
166        #define out varying
167        #endif
168        ${t}
169        `},setProgramName:function(t,{name:e="pixi-program"},r=!0){e=e.replace(/\s+/g,"-")+(r?"-fragment":"-vertex");let i=r?o:a;if(i[e]?(i[e]++,e+=`-${i[e]}`):i[e]=1,-1!==t.indexOf("#define SHADER_NAME"))return t;let n=`#define SHADER_NAME ${e}`;return`${n}
170${t}`},insertVersion:function(t,e){return e?`#version 300 es
171${t}`:t}},h=Object.create(null),u=class t{constructor(e){const r=-1!==(e={...t.defaultOptions,...e}).fragment.indexOf("#version 300 es"),o={stripVersion:r,ensurePrecision:{requestedFragmentPrecision:e.preferredFragmentPrecision,requestedVertexPrecision:e.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:function(){if(!i){i="mediump";let t=(0,s.W)();t&&t.getShaderPrecisionFormat&&(i=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?"highp":"mediump")}return i}()},setProgramName:{name:e.name},addProgramDefines:r,insertVersion:r};let a=e.fragment,h=e.vertex;Object.keys(l).forEach(t=>{let e=o[t];a=l[t](a,e,!0),h=l[t](h,e,!1)}),this.fragment=a,this.vertex=h,this.transformFeedbackVaryings=e.transformFeedbackVaryings,this._key=(0,n.X)(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null}static from(e){let r=`${e.vertex}:${e.fragment}`;return h[r]||(h[r]=new t(e)),h[r]}};u.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let d=u},22388:(t,e)=>{"use strict";e.byteLength=function(t){var e=l(t),r=e[0],i=e[1];
171return(r+i)*3/4-i},e.toByteArray=function(t){var e,r,s=l(t),o=s[0],a=s[1],h=new n((o+a)*3/4-a),u=0,d=a>0?o-4:o;for(r=0;r<d;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],h[u++]=e>>16&255,h[u++]=e>>8&255,h[u++]=255&e;return 2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,h[u++]=255&e),1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,h[u++]=e>>8&255,h[u++]=255&e),h},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,s=[],o=0,a=i-n;o<a;o+=16383)s.push(function(t,e,i){for(var n,s=[],o=e;o<i;o+=3)n=(t[o]<<16&0xff0000)+(t[o+1]<<8&65280)+(255&t[o+2]),s.push(r[n>>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return s.join("")}(t,o,o+16383>a?a:o+16383));return 1===n?s.push(r[(e=t[i-1])>>2]+r[e<<4&63]+"=="):2===n&&s.push(r[(e=(t[i-2]<<8)+t[i-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),s.join("")};for(var r=[],i=[],n="u">typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)r[o]=s[o],i[s.charCodeAt(o)]=o;function l(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var i=r===e?0:4-r%4;return[r,i]}i[45]=62,i[95]=63},22732:(t,e,r)=>{"use strict";r.d(e,{_:()=>f});var i=r(73608),n=r(47397),s=r(19677),o=r(40171),a=r(46480),l=r(44571),h=r(70242),u=r(6376);let d=[{offset:0,color:"white"},{offset:1,color:"black"}],c=class t{constructor(...e){this.uid=(0,l.L)("fillGradient"),this.type="linear",this.colorStops=[];let r=function(t){let e=t[0]??{};return("number"==typeof e||t[1])&&((0,h.t6)("8.5.2","use options object instead"),e={type:"linear",start:{x:t[0],y:t[1]},end:{x:t[2],y:t[3]},textureSpace:t[4],textureSize:t[5]??f.defaultLinearOptions.textureSize}),e}(e);r={..."radial"===r.type?t.defaultRadialOptions:t.defaultLinearOptions,...(0,u.S)(r)},this._textureSize=r.textureSize,"radial"===r.type?(this.center=r.center,this.outerCenter=r.outerCenter??this.center,this.innerRadius=r.innerRadius,this.outerRadius=r.outerRadius,this.scale=r.scale,this.rotation=r.rotation):(this.start=r.start,this.end=r.end),this.textureSpace=r.textureSpace,this.type=r.type,r.colorStops.forEach(t=>{this.addColorStop(t.offset,t.color)})}addColorStop(t,e){return this.colorStops.push({offset:t,color:i.Q.shared.setValue(e).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let t=this.colorStops.length?this.colorStops:d,e=this._textureSize,{canvas:r,context:i}=g(e,1),n=i.createLinearGradient(0,0,this._textureSize,0);p(n,t),i.fillStyle=n,i.fillRect(0,0,e,1),this.texture=new a.g({source:new o.b({resource:r})});let{x:l,y:h}=this.start,{x:u,y:c}=this.end,f=new s.u,m=u-l,y=c-h,b=Math.sqrt(m*m+y*y),_=Math.atan2(y,m);f.scale(b/e,1),f.rotate(_),f.translate(l,h),"local"===this.textureSpace&&f.scale(e,e),this.transform=f}buildGradient(){"linear"===this.type?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;let t=this.colorStops.length?this.colorStops:d,e=this._textureSize,{canvas:r,context:i}=g(e,e),{x:n,y:l}=this.center,{x:h,y:u}=this.outerCenter,c=this.innerRadius,f=this.outerRadius,m=h-f,y=u-f,b=e/(2*f),_=(n-m)*b,v=(l-y)*b,x=i.createRadialGradient(_,v,c*b,(h-m)*b,(u-y)*b,f*b);p(x,t),i.fillStyle=t[t.length-1].color,i.fillRect(0,0,e,e),i.fillStyle=x,i.translate(_,v),i.rotate(this.rotation),i.scale(1,this.scale),i.translate(-_,-v),i.fillRect(0,0,e,e),this.texture=new a.g({source:new o.b({resource:r,addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"})});let w=new s.u;w.scale(1/b,1/b),w.translate(m,y),"local"===this.textureSpace&&w.scale(e,e),this.transform=w}get styleKey(){return this.uid}destroy(){this.texture?.destroy(!0),this.texture=null}};c.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256},c.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256};let f=c;function p(t,e){for(let r=0;r<e.length;r++){let i=e[r];t.addColorStop(i.offset,i.color)}}function g(t,e){let r=n.e.get().createCanvas(t,e),i=r.getContext("2d");return{canvas:r,context:i}}},24462:(t,e,r)=>{"use strict";r.d(e,{u:()=>u});var i=r(34943),n=r(65179),s=r(17011),o=r(73599),a=r(32092);function l(t,e){let{size:r,align:i}=s.f[t.data.type],n=(i-r)/4,o=t.data.type.indexOf("i32")>=0?"dataInt32":"data";return`
172         v = uv.${t.data.name};
173         ${0!==e?`offset += ${e};`:""}
174
175         arrayOffset = offset;
176
177         t = 0;
178
179         for(var i=0; i < ${t.data.size*(r/4)}; i++)
180         {
181             for(var j = 0; j < ${r/4}; j++)
182             {
183                 ${o}[arrayOffset++] = v[t++];
184             }
185             ${0!==n?`arrayOffset += ${n};`:""}
186         }
187     `}function h(t){return(0,o.E)(t,"uboWgsl",l,a._)}class u extends n.W{constructor(){super({createUboElements:s.V,generateUboSync:h})}}u.extension={type:[i.Ag.WebGPUSystem],name:"ubo"}},24555:(t,e,r)=>{"use strict";r.d(e,{b:()=>i,m:()=>n});
187let i={name:"round-pixels-bit",vertex:{header:`
188            fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32> 
189            {
190                return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
191            }
192        `}},n={name:"round-pixels-bit",vertex:{header:`   
193            vec2 roundPixels(vec2 position, vec2 targetSize)
194            {       
195                return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
196            }
197        `}}},24793:(t,e,r)=>{"use strict";r.d(e,{l:()=>o});var i=r(53670),n=r(10620);class s{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){let e=this._cache.get(t);return e||(0,i.R)(`[Assets] Asset id ${t} was not found in the Cache`),e}set(t,e){let r,s=(0,n.z)(t);for(let t=0;t<this.parsers.length;t++){let i=this.parsers[t];if(i.test(e)){r=i.getCacheableAssets(s,e);break}}let o=new Map(Object.entries(r||{}));
197r||s.forEach(t=>{o.set(t,e)});let a=[...o.keys()],l={cacheKeys:a,keys:s};s.forEach(t=>{this._cacheMap.set(t,l)}),a.forEach(t=>{let n=r?r[t]:e;this._cache.has(t)&&this._cache.get(t)!==n&&(0,i.R)("[Cache] already has key:",t),this._cache.set(t,o.get(t))})}remove(t){if(!this._cacheMap.has(t))return void(0,i.R)(`[Assets] Asset id ${t} was not found in the Cache`);let e=this._cacheMap.get(t);e.cacheKeys.forEach(t=>{this._cache.delete(t)}),e.keys.forEach(t=>{this._cacheMap.delete(t)})}get parsers(){return this._parsers}}let o=new s},24996:(t,e,r)=>{"use strict";r.d(e,{P:()=>a});var i=r(47397),n=r(60018);let s={willReadFrequently:!0},o=class t{static get experimentalLetterSpacingSupported(){let e=t._experimentalLetterSpacingSupported;if(void 0!==e){let r=i.e.get().getCanvasRenderingContext2D().prototype;e=t._experimentalLetterSpacingSupported="letterSpacing"in r||"textLetterSpacing"in r}return e}constructor(t,e,r,i,n,s,o,a,l){this.text=t,this.style=e,this.width=r,this.height=i,this.lines=n,this.lineWidths=s,this.lineHeight=o,this.maxLineWidth=a,this.fontProperties=l}static measureText(e=" ",r,i=t._canvas,s=r.wordWrap){let o=`${e}:${r.styleKey}`;if(t._measurementCache[o])return t._measurementCache[o];let a=(0,n.Z)(r),l=t.measureFont(a);0===l.fontSize&&(l.fontSize=r.fontSize,l.ascent=r.fontSize);let h=t.__context;h.font=a;
197let u=(s?t._wordWrap(e,r,i):e).split(/(?:\r\n|\r|\n)/),d=Array(u.length),c=0;for(let e=0;e<u.length;e++){let i=t._measureText(u[e],r.letterSpacing,h);d[e]=i,c=Math.max(c,i)}let f=r._stroke?.width||0,p=c+f;r.dropShadow&&(p+=r.dropShadow.distance);let g=r.lineHeight||l.fontSize,m=Math.max(g,l.fontSize+f)+(u.length-1)*(g+r.leading);return r.dropShadow&&(m+=r.dropShadow.distance),new t(e,r,p,m,u,d,g+r.leading,c,l)}static _measureText(e,r,i){let n=!1;t.experimentalLetterSpacingSupported&&(t.experimentalLetterSpacing?(i.letterSpacing=`${r}px`,i.textLetterSpacing=`${r}px`,n=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let s=i.measureText(e),o=s.width,a=-s.actualBoundingBoxLeft,l=s.actualBoundingBoxRight-a;if(o>0)if(n)o-=r,l-=r;else{let i=(t.graphemeSegmenter(e).length-1)*r;o+=i,l+=i}return Math.max(o,l)}static _wordWrap(e,r,i=t._canvas){let n=i.getContext("2d",s),o=0,a="",l="",h=Object.create(null),{letterSpacing:u,whiteSpace:d}=r,c=t._collapseSpaces(d),f=t._collapseNewlines(d),p=!c,g=r.wordWrapWidth+u,m=t._tokenize(e);for(let e=0;e<m.length;e++){let i=m[e];if(t._isNewline(i)){if(!f){l+=t._addLine(a),p=!c,a="",o=0;continue}i=" "}if(c){let e=t.isBreakingSpace(i),r=t.isBreakingSpace(a[a.length-1]);if(e&&r)continue}let s=t._getFromCache(i,u,h,n);if(s>g)if(""!==a&&(l+=t._addLine(a),a="",o=0),t.canBreakWords(i,r.breakWords)){let e=t.wordWrapSplit(i);for(let s=0;s<e.length;s++){let d=e[s],c=d,f=1;for(;e[s+f];){let n=e[s+f];if(t.canBreakChars(c,n,i,s,r.breakWords))break;d+=n,c=n,f++}s+=f-1;let m=t._getFromCache(d,u,h,n);m+o>g&&(l+=t._addLine(a),p=!1,a="",o=0),a+=d,o+=m}}else{a.length>0&&(l+=t._addLine(a),a="",o=0);let r=e===m.length-1;l+=t._addLine(i,!r),p=!1,a="",o=0}else s+o>g&&(p=!1,l+=t._addLine(a),a="",o=0),(a.length>0||!t.isBreakingSpace(i)||p)&&(a+=i,o+=s)}return l+t._addLine(a,!1)}static _addLine(e,r=!0){return e=t._trimRight(e),e=r?`${e}
198`:e}static _getFromCache(e,r,i,n){let s=i[e];return"number"!=typeof s&&(s=t._measureText(e,r,n)+r,i[e]=s),s}static _collapseSpaces(t){return"normal"===t||"pre-line"===t}static _collapseNewlines(t){return"normal"===t}static _trimRight(e){if("string"!=typeof e)return"";for(let r=e.length-1;r>=0;r--){let i=e[r];if(!t.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static _isNewline(e){return"string"==typeof e&&t._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,r){return"string"==typeof e&&t._breakingSpaces.includes(e.charCodeAt(0))}static _tokenize(e){let r=[],i="";if("string"!=typeof e)return r;for(let n=0;n<e.length;n++){let s=e[n],o=e[n+1];if(t.isBreakingSpace(s,o)||t._isNewline(s)){""!==i&&(r.push(i),i=""),r.push(s);continue}i+=s}return""!==i&&r.push(i),r}static canBreakWords(t,e){return e}static canBreakChars(t,e,r,i,n){return!0}static wordWrapSplit(e){return t.graphemeSegmenter(e)}static measureFont(e){if(t._fonts[e])return t._fonts[e];let r=t._context;r.font=e;let i=r.measureText(t.METRICS_STRING+t.BASELINE_SYMBOL),n={ascent:i.actualBoundingBoxAscent,descent:i.actualBoundingBoxDescent,fontSize:i.actualBoundingBoxAscent+i.actualBoundingBoxDescent};return t._fonts[e]=n,n}static clearMetrics(e=""){e?delete t._fonts[e]:t._fonts={}}static get _canvas(){if(!t.__canvas){let e;try{let r=new OffscreenCanvas(0,0),n=r.getContext("2d",s);if(n?.measureText)return t.__canvas=r,r;e=i.e.get().createCanvas()}catch(t){e=i.e.get().createCanvas()}e.width=e.height=10,t.__canvas=e}return t.__canvas}static get _context(){return t.__context||(t.__context=t._canvas.getContext("2d",s)),t.__context}};o.METRICS_STRING="|\xc9q\xc5",o.BASELINE_SYMBOL="M",o.BASELINE_MULTIPLIER=1.4,o.HEIGHT_MULTIPLIER=2,o.graphemeSegmenter=(()=>{if("function"==typeof Intl?.Segmenter){let t=new Intl.Segmenter;return e=>[...t.segment(e)].map(t=>t.segment)}return t=>[...t]})(),o.experimentalLetterSpacing=!1,o._fonts={},o._newlines=[10,13],o._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],o._measurementCache={};let a=o},26709:(t,e,r)=>{"use strict";r.d(e,{P:()=>s});var i=r(34943),n=r(28513);class s extends n.v{constructor(t){const e=t.resource||new Float32Array(t.width*t.height*4);let r=t.format;r||(e instanceof Float32Array?r="rgba32float":e instanceof Int32Array||e instanceof Uint32Array?r="rgba32uint":e instanceof Int16Array||e instanceof Uint16Array?r="rgba16uint":(Int8Array,r="bgra8unorm")),super({...t,resource:e,format:r}),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}s.extension=i.Ag.TextureSource},27539:(t,e,r)=>{"use strict";function i(t){return t+=+(0===t),--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function n(t){return!(t&t-1)&&!!t}r.d(e,{U5:()=>i,f3:()=>n})},27608:(t,e,r)=>{"use strict";let i,n,s,o=r(37811),{ArrayIsArray:a,Promise:l,SymbolAsyncIterator:h,SymbolDispose:u}
198=r(34418),d=r(86650),{once:c}=r(43006),f=r(67436),p=r(20140),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:y,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:_,ERR_STREAM_PREMATURE_CLOSE:v},AbortError:x}=r(60577),{validateFunction:w,validateAbortSignal:A}=r(72639),{isIterable:S,isReadable:T,isReadableNodeStream:C,isNodeStream:E,isTransformStream:k,isWebStream:M,isReadableStream:B,isReadableFinished:P}=r(71343),I=globalThis.AbortController||r(30214).AbortController;function R(t,e,r){let i=!1;return t.on("close",()=>{i=!0}),{destroy:e=>{i||(i=!0,f.destroyer(t,e||new _("pipe")))},cleanup:d(t,{readable:e,writable:r},t=>{i=!t})}}function L(t){if(S(t))return t;if(C(t))return O(t);throw new m("val",["Readable","Iterable","AsyncIterable"],t)}async function*O(t){n||(n=r(9138)),yield*n.prototype[h].call(t)}async function F(t,e,r,{end:i}){let n,s=null,o=t=>{if(t&&(n=t),s){let t=s;s=null,t()}},a=()=>new l((t,e)=>{n?e(n):s=()=>{n?e(n):t()}});e.on("drain",o);let h=d(e,{readable:!1},o);try{for await(let r of(e.writableNeedDrain&&await a(),t))e.write(r)||await a();i&&(e.end(),await a()),r()}catch(t){r(n!==t?g(n,t):t)}finally{h(),e.off("drain",o)}}async function U(t,e,r,{end:i}){k(e)&&(e=e.writable);let n=e.getWriter();try{for await(let e of t)await n.ready,n.write(e).catch(()=>{});await n.ready,i&&await n.close(),r()}catch(t){try{await n.abort(t),r(t)}catch(t){r(t)}}}function D(t,e,n){let l,h,c,f;if(1===t.length&&a(t[0])&&(t=t[0]),t.length<2)throw new b("streams");let g=new I,_=g.signal,w=null==n?void 0:n.signal,O=[];function D(){$(new x)}A(w,"options.signal"),s=s||r(43006).addAbortListener,w&&(l=s(w,D));let N=[],z=0;function j(t){$(t,0==--z)}function $(t,r){var i;if(t&&(!h||"ERR_STREAM_PREMATURE_CLOSE"===h.code)&&(h=t),h||r){for(;N.length;)N.shift()(h);null==(i=l)||i[u](),g.abort(),r&&(h||O.forEach(t=>t()),o.nextTick(e,h,c))}}for(let e=0;e<t.length;e++){let s=t[e],a=e<t.length-1,l=e>0,h=a||(null==n?void 0:n.end)!==!1,u=e===t.length-1;if(E(s)){if(h){let{destroy:t,cleanup:e}=R(s,a,l);N.push(t),T(s)&&u&&O.push(e)}function W(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&j(t)}s.on("error",W),T(s)&&u&&O.push(()=>{s.removeListener("error",W)})}if(0===e)if("function"==typeof s){if(!S(f=s({signal:_})))throw new y("Iterable, AsyncIterable or Stream","source",f)}else f=S(s)||C(s)||k(s)?s:p.from(s);else if("function"==typeof s){var G,V;if(f=s(f=k(f)?L(null==(G=f)?void 0:G.readable):L(f),{signal:_}),a){if(!S(f,!0))throw new y("AsyncIterable",`transform[${e-1}]`,f)}else{i||(i=r(81344));let t=new i({objectMode:!0}),e=null==(V=f)?void 0:V.then;if("function"==typeof e)z++,e.call(f,e=>{c=e,null!=e&&t.write(e),h&&t.end(),o.nextTick(j)},e=>{t.destroy(e),o.nextTick(j,e)});else if(S(f,!0))z++,F(f,t,j,{end:h});else if(B(f)||k(f)){let e=f.readable||f;z++,F(e,t,j,{end:h})}else throw new y("AsyncIterable or Promise","destination",f);let{destroy:n,cleanup:s}=R(f=t,!1,!0);N.push(n),u&&O.push(s)}}else if(E(s)){if(C(f)){z+=2;let t=function(t,e,r,{end:i}){let n=!1;if(e.on("close",()=>{n||r(new v)}),t.pipe(e,{end:!1}),i){function s(){n=!0,e.end()}P(t)?o.nextTick(s):t.once("end",s)}else r();return d(t,{readable:!0,writable:!1},e=>{let i=t._readableState;e&&"ERR_STREAM_PREMATURE_CLOSE"===e.code&&i&&i.ended&&!i.errored&&!i.errorEmitted?t.once("end",r).once("error",r):r(e)}),d(e,{readable:!1,writable:!0},r)}(f,s,j,{end:h});T(s)&&u&&O.push(t)}else if(k(f)||B(f)){let t=f.readable||f;z++,F(t,s,j,{end:h})}else if(S(f))z++,F(f,s,j,{end:h});else throw new m("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],f);f=s}else if(M(s)){if(C(f))z++,U(L(f),s,j,{end:h});else if(B(f)||S(f))z++,U(f,s,j,{end:h});else if(k(f))z++,U(f.readable,s,j,{end:h});else throw new m("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],f);f=s}else f=p.from(s)}return(null!=_&&_.aborted||null!=w&&w.aborted)&&o.nextTick(D),f}t.exports={pipelineImpl:D,pipeline:function(...t){return D(t,c((w(t[t.length-1],"streams[stream.length - 1]"),t.pop())))}}},28513:(t,e,r)=>{"use strict";r.d(e,{v:()=>h});var i=r(66888),n=r(27539),s=r(6376),o=r(44571),a=r(53934);let l=class t extends i.A{constructor(e={}){super(),this.options=e,this.uid=(0,o.L)("textureSource"),this._resourceType="textureSource",this._resourceId=(0,o.L)("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,e={...t.defaultOptions,...e},this.label=e.label??"",this.resource=e.resource,this.autoGarbageCollect=e.autoGarbageCollect,this._resolution=e.resolution,e.width?this.pixelWidth=e.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,e.height?this.pixelHeight=e.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=e.format,this.dimension=e.dimensions,this.mipLevelCount=e.mipLevelCount,this.autoGenerateMipmaps=e.autoGenerateMipmaps,this.sampleCount=e.sampleC
198ount,this.antialias=e.antialias,this.alphaMode=e.alphaMode,this.style=new a.n((0,s.S)(e)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){this.style!==t&&(this._style?.off("change",this._onStyleChange,this),this._style=t,this._style?.on("change",this._onStyleChange,this),this._onStyleChange())}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){let t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){this._resourceId=(0,o.L)("resource"),this.emit("change",this),this.emit("unload",this)}get resourceWidth(){let{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){let{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,e,r){r||(r=this._resolution),t||(t=this.width),e||(e=this.height);let i=Math.round(t*r),n=Math.round(e*r);return this.width=i/r,this.height=n/r,this._resolution=r,(this.pixelWidth!==i||this.pixelHeight!==n)&&(this._refreshPOT(),this.pixelWidth=i,this.pixelHeight=n,this.emit("resize",this),this._resourceId=(0,o.L)("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=(0,n.f3)(this.pixelWidth)&&(0,n.f3)(this.pixelHeight)}static test(t){throw Error("Unimplemented")}};l.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let h=l},29762:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(70242),n=r(82347),s=r(63800);class o extends n.l{constructor(t){t instanceof s.T&&(t={context:t});const{context:e,roundPixels:r,...i}=t||{};super({label:"Graphics",...i}),this.renderPipeId="graphics",e?this._context=e:this._context=this._ownedContext=new s.T,this._context.on("update",this.onViewUpdate,this),this.allowChildren=!1,this.roundPixels=r??!1}set context(t){t!==this._context&&(this._context.off("update",this.onViewUpdate,this),this._context=t,this._context.on("update",this.onViewUpdate,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(t){return this._context.containsPoint(t)}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(!0===t||t?.context===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_callContextMethod(t,e){return this.context[t](...e),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}
198roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new o(this._context.clone()):(this._ownedContext=null,new o(this._context))}lineStyle(t,e,r){(0,i.t6)(i.lj,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");let n={};return t&&(n.width=t),e&&(n.color=e),r&&(n.alpha=r),this.context.strokeStyle=n,this}beginFill(t,e){(0,i.t6)(i.lj,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");let r={};return void 0!==t&&(r.color=t),void 0!==e&&(r.alpha=e),this.context.fillStyle=r,this}endFill(){(0,i.t6)(i.lj,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();let t=this.context.strokeStyle;return(t.width!==s.T.defaultStrokeStyle.width||t.color!==s.T.defaultStrokeStyle.color||t.alpha!==s.T.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return(0,i.t6)(i.lj,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return(0,i.t6)(i.lj,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return(0,i.t6)(i.lj,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return(0,i.t6)(i.lj,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return(0,i.t6)(i.lj,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return(0,i.t6)(i.lj,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}},30204:(t,e,r)=>{"use strict";r.d(e,{S:()=>n});var i,n=((i=n||{})[i.MAP_READ=1]="MAP_READ",i[i.MAP_WRITE=2]="MAP_WRITE",i[i.COPY_SRC=4]="COPY_SRC",i[i.COPY_DST=8]="COPY_DST",i[i.INDEX=16]="INDEX",i[i.VERTEX=32]="VERTEX",i[i.UNIFORM=64]="UNIFORM",i[i.STORAGE=128]="STORAGE",i[i.INDIRECT=256]="INDIRECT",i[i.QUERY_RESOLVE=512]="QUERY_RESOLVE",i[i.STATIC=1024]="STATIC",i)},30214:t=>{"use strict";let{AbortController:e,AbortSignal}="u">typeof self?self:"u">typeof window?window:void 0;t.exports=e,t.exports.AbortSignal=AbortSignal,t.exports.default=e},30498:(t,e,r)=>{t=r.nmd(t);var i,n,s,o,a,l,h,u,d,c,f,p,g,m,y,b,_,v,x,w,A,S,T,C,E,k,M,B,P,I,R,L,O,F,U,D,N,z,j,$,W,G,V,H,Y,X,q,K,Z,Q,J,tt,te,tr,ti,tn,ts,to,ta=r(37811),tl=r(96244).Buffer;(i=to||(to={})).runningInNodeJS=function(){return"object"==typeof ta&&"object"==typeof ta.versions&&"string"==typeof ta.versions.node},i.runningInMainNodeJSModule=function(){return i.runningInNodeJS()&&r.c[r.s]===t},i.commonJSAvailable=function(){return"object"==typeof t.exports},i.runningInWebWorker=function(){return"u"<typeof window&&"object"==typeof self&&"function"==typeof self.addEventListener&&"function"==typeof self.close},i.runningInNodeChildProcess=function(){return i.runningInNodeJS()&&"function"==typeof ta.send},i.runningInNullOrigin=function(){return"object"==typeof window&&"object"==typeof window.location&&"object"==typeof document&&"http:"!==document.location.protocol&&"https:"!==document.location.protocol},i.webWorkersAvailable=function(){return!("function"!=typeof Worker||i.runningInNullOrigin()||i.runningInNodeJS()||navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Android 4.3")>=0)},i.log=function(t,e){void 0===e&&(e=!1),"object"==typeof console&&(console.log(t),e&&"object"==typeof document&&(document.body.innerHTML+=t+"<br/>"))},i.createErrorMessage=function(t,e){if(void 0===e&&(e="Unhandled exception"),null==t)return e;if(e+=": ","object"==typeof t.content)if(i.runningInNodeJS())return e+t.content.stack;else{var r=JSON.stringify(t.content);return"{}"!==r?e+r:e+t.content}return"string"==typeof t.content?e+t.content:e+t},i.printExceptionAndStackTraceToConsole=function(t,e){void 0===e&&(e="Unhandled exception"),i.log(i.createErrorMessage(t,e))},i.getGlobalObject=function(){return"object"==typeof r.g?r.g:"object"==typeof window?window:"object"==typeof self?self:{}},i.toString=Object.prototype.toString,i.commonJSAvailable()&&(t.exports=i),function(t){if("function"==typeof Uint8Array&&0!==new Uint8Array(1).subarray(1).byteLength){var e=function(t,e){var r=function(t,e,r){return t<e?e:t>
198r?r:t};t|=0,e|=0,arguments.length<1&&(t=0),arguments.length<2&&(e=this.length),t<0&&(t=this.length+t),e<0&&(e=this.length+e),t=r(t,0,this.length);var i=(e=r(e,0,this.length))-t;return i<0&&(i=0),new this.constructor(this.buffer,this.byteOffset+t*this.BYTES_PER_ELEMENT,i)},r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"],i=void 0;if("object"==typeof window?i=window:"object"==typeof self&&(i=self),void 0!==i)for(var n=0;n<r.length;n++)i[r[n]]&&(i[r[n]].prototype.subarray=e)}}(ts||(ts={})),n=to||(to={}),s=function(){function t(){}return t.compressAsync=function(t,e,r){var i=new n.Timer,s=new n.Compressor;if(!r)throw TypeError("compressAsync: No callback argument given");if("string"==typeof t)t=n.encodeUTF8(t);else if(null==t||!(t instanceof Uint8Array))return void r(void 0,TypeError("compressAsync: Invalid input argument, only 'string' and 'Uint8Array' are supported"));var o=n.ArrayTools.splitByteArray(t,e.blockSize),a=[],l=function(t){if(t<o.length){var h=void 0;try{h=s.compressBlock(o[t])}catch(t){r(void 0,t);return}a.push(h),20>=i.getElapsedTime()?l(t+1):(n.enqueueImmediate(function(){return l(t+1)}),i.restart())}else{var u=n.ArrayTools.concatUint8Arrays(a);n.enqueueImmediate(function(){var t;try{t=n.CompressionCommon.encodeCompressedBytes(u,e.outputEncoding)}catch(t){r(void 0,t);return}n.enqueueImmediate(function(){return r(t)})})}};n.enqueueImmediate(function(){return l(0)})},t.createCompressionStream=function(){var t=new n.Compressor,e=new(r(43146)).Transform({decodeStrings:!0,highWaterMark:65536});return e._transform=function(r,i,s){var o;try{o=n.BufferTools.uint8ArrayToBuffer(t.compressBlock(n.BufferTools.bufferToUint8Array(r)))}catch(t){e.emit("error",t);return}e.push(o),s()},e},t}(),n.AsyncCompressor=s,o=to||(to={}),a=function(){function t(){}return t.decompressAsync=function(t,e,r){if(!r)throw TypeError("decompressAsync: No callback argument given");var i=new o.Timer;try{t=o.CompressionCommon.decodeCompressedBytes(t,e.inputEncoding)}catch(t){r(void 0,t);return}var n=new o.Decompressor,s=o.ArrayTools.splitByteArray(t,e.blockSize),a=[],l=function(t){if(t<s.length){var h=void 0;try{h=n.decompressBlock(s[t])}catch(t){r(void 0,t);return}a.push(h),20>=i.getElapsedTime()?l(t+1):(o.enqueueImmediate(function(){return l(t+1)}),i.restart())}else{var u=o.ArrayTools.concatUint8Arrays(a);o.enqueueImmediate(function(){var t;try{t=o.CompressionCommon.encodeDecompressedBytes(u,e.outputEncoding)}catch(t){r(void 0,t);return}o.enqueueImmediate(function(){return r(t)})})}};o.enqueueImmediate(function(){return l(0)})},t.createDecompressionStream=function(){var t=new o.Decompressor,e=new(r(43146)).Transform({decodeStrings:!0,highWaterMark:65536});return e._transform=function(r,i,n){var s;try{s=o.BufferTools.uint8ArrayToBuffer(t.decompressBlock(o.BufferTools.bufferToUint8Array(r)))}catch(t){e.emit("error",t);return}e.push(s),n()},e},t}(),o.AsyncDecompressor=a,(u=h=(l=to||(to={})).WebWorker||(l.WebWorker={})).compressAsync=function(t,e,r){if("ByteArray"==e.inputEncoding&&!(t instanceof Uint8Array))return void r(void 0,TypeError("compressAsync: input is not a Uint8Array"));var i={token:Math.random().toString(),type:"compress",data:t,inputEncoding:e.inputEncoding,outputEncoding:e.outputEncoding},n=function(t){var e=t.data;e&&e.token==i.token&&(u.globalWorker.removeEventListener("message",n),"error"==e.type?r(void 0,Error(e.error)):r(e.data))};u.globalWorker.addEventListener("message",n),u.globalWorker.postMessage(i,[])},u.decompressAsync=function(t,e,r){var i={token:Math.random().toString(),type:"decompress",data:t,inputEncoding:e.inputEncoding,outputEncoding:e.outputEncoding},n=function(t){var e=t.data;e&&e.token==i.token&&(u.globalWorker.removeEventListener("message",n),"error"==e.type?r(void 0,Error(e.error)):r(e.data))};u.globalWorker.addEventListener("message",n),u.globalWorker.postMessage(i,[])},u.installWebWorkerIfNeeded=function(){"object"==typeof self&&void 0===self.document&&void 0!=self.addEventListener&&(self.addEventListener("message",function(t){var e=t.data;if("compress"==e.type){var r=void 0;try{r=l.compress(e.data,{outputEncoding:e.outputEncoding})}catch(t){self.postMessage({token:e.token,type:"error",error:l.createErrorMessage(t)},[]);return}var i={token:e.token,type:"compressionResult",data:r,encoding:e.outputEncoding};i.data instanceof Uint8Array&&-1===navigator.appVersion.indexOf("MSIE 10")?self.postMessage(i,[i.data.buffer]):self.postMessage(i,[])}else if("decompress"==e.type){var n=void 0;try{n=l.decompress(e.data,{inputEncoding:e.inputEncoding,outputEncoding:e.outputEncoding})}catch(t){self.postMessage({token:e.token,type:"error",error:l.createErrorMessage(t)},[]);return}var i={token:e.token,type:"decompressionResult",data:n,encoding:e.outputEncoding};i.data instanceof Uint8Array&&-1===navigator.appVersion.indexOf("MSIE 10")?self.postMessage(i,[i.data.buffer]):self.postMessage(i,[])}}),self.addEventListener("error",function(t){l.log(l.createErrorMessage(t.error,"Unexpected LZUTF8 WebWorker exception"))}))},u.createGlobalWorkerIfNeeded=function(){if(u.globalWorker)return!0;
198if(!l.webWorkersAvailable())return!1;if(!u.scriptURI&&"object"==typeof document){var t=document.getElementById("lzutf8");null!=t&&(u.scriptURI=t.getAttribute("src")||void 0)}return!!u.scriptURI&&(u.globalWorker=new Worker(u.scriptURI),!0)},u.terminate=function(){u.globalWorker&&(u.globalWorker.terminate(),u.globalWorker=void 0)},h.installWebWorkerIfNeeded(),(to||(to={})).ArraySegment=function(){function t(t,e,r){this.container=t,this.startPosition=e,this.length=r}return t.prototype.get=function(t){return this.container[this.startPosition+t]},t.prototype.getInReversedOrder=function(t){return this.container[this.startPosition+this.length-1-t]},t.prototype.set=function(t,e){this.container[this.startPosition+t]=e},t}(),(c=(d=to||(to={})).ArrayTools||(d.ArrayTools={})).copyElements=function(t,e,r,i,n){for(;n--;)r[i++]=t[e++]},c.zeroElements=function(t,e,r){for(;r--;)t[e++]=0},c.countNonzeroValuesInArray=function(t){for(var e=0,r=0;r<t.length;r++)t[r]&&e++;return e},c.truncateStartingElements=function(t,e){if(t.length<=e)throw RangeError("truncateStartingElements: Requested length should be smaller than array length");for(var r=t.length-e,i=0;i<e;i++)t[i]=t[r+i];t.length=e},c.doubleByteArrayCapacity=function(t){var e=new Uint8Array(2*t.length);return e.set(t),e},c.concatUint8Arrays=function(t){for(var e=0,r=0;r<t.length;r++){var i=t[r];e+=i.length}for(var n=new Uint8Array(e),s=0,o=0;o<t.length;o++){var i=t[o];n.set(i,s),s+=i.length}return n},c.splitByteArray=function(t,e){for(var r=[],i=0;i<t.length;){var n=Math.min(e,t.length-i);r.push(t.subarray(i,i+n)),i+=n}return r},(p=(f=to||(to={})).BufferTools||(f.BufferTools={})).convertToUint8ArrayIfNeeded=function(t){return"function"==typeof tl&&tl.isBuffer(t)?p.bufferToUint8Array(t):t},p.uint8ArrayToBuffer=function(t){if(tl.prototype instanceof Uint8Array){var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return Object.setPrototypeOf(e,tl.prototype),e}for(var r=t.length,i=new tl(r),n=0;n<r;n++)i[n]=t[n];return i},p.bufferToUint8Array=function(t){if(tl.prototype instanceof Uint8Array)return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);for(var e=t.length,r=new Uint8Array(e),i=0;i<e;i++)r[i]=t[i];return r},(m=(g=to||(to={})).CompressionCommon||(g.CompressionCommon={})).getCroppedBuffer=function(t,e,r,i){void 0===i&&(i=0);var n=new Uint8Array(r+i);return n.set(t.subarray(e,e+r)),n},m.getCroppedAndAppendedByteArray=function(t,e,r,i){return g.ArrayTools.concatUint8Arrays([t.subarray(e,e+r),i])},m.detectCompressionSourceEncoding=function(t){if(null==t)throw TypeError("detectCompressionSourceEncoding: input is null or undefined");if("string"==typeof t)return"String";if(t instanceof Uint8Array||"function"==typeof tl&&tl.isBuffer(t))return"ByteArray";throw TypeError("detectCompressionSourceEncoding: input must be of type 'string', 'Uint8Array' or 'Buffer'")},m.encodeCompressedBytes=function(t,e){switch(e){case"ByteArray":return t;case"Buffer":return g.BufferTools.uint8ArrayToBuffer(t);case"Base64":return g.encodeBase64(t);case"BinaryString":return g.encodeBinaryString(t);case"StorageBinaryString":return g.encodeStorageBinaryString(t);default:throw TypeError("encodeCompressedBytes: invalid output encoding requested")}},m.decodeCompressedBytes=function(t,e){if(null==e)throw TypeError("decodeCompressedData: Input is null or undefined");switch(e){case"ByteArray":case"Buffer":var r=g.BufferTools.convertToUint8ArrayIfNeeded(t);if(!(r instanceof Uint8Array))throw TypeError("decodeCompressedData: 'ByteArray' or 'Buffer' input type was specified but input is not a Uint8Array or Buffer");return r;case"Base64":if("string"!=typeof t)throw TypeError("decodeCompressedData: 'Base64' input type was specified but input is not a string");return g.decodeBase64(t);case"BinaryString":if("string"!=typeof t)throw TypeError("decodeCompressedData: 'BinaryString' input type was specified but input is not a string");return g.decodeBinaryString(t);case"StorageBinaryString":if("string"!=typeof t)throw TypeError("decodeCompressedData: 'StorageBinaryString' input type was specified but input is not a string");return g.decodeStorageBinaryString(t);
198default:throw TypeError("decodeCompressedData: invalid input encoding requested: '".concat(e,"'"))}},m.encodeDecompressedBytes=function(t,e){switch(e){case"String":return g.decodeUTF8(t);case"ByteArray":return t;case"Buffer":if("function"!=typeof tl)throw TypeError("encodeDecompressedBytes: a 'Buffer' type was specified but is not supported at the current envirnment");return g.BufferTools.uint8ArrayToBuffer(t);default:throw TypeError("encodeDecompressedBytes: invalid output encoding requested")}},_=b=(y=to||(to={})).EventLoop||(y.EventLoop={}),x=[],_.enqueueImmediate=function(t){x.push(t),1===x.length&&v()},_.initializeScheduler=function(){var t=function(){for(var t=0;t<x.length;t++){var e=x[t];try{e.call(void 0)}catch(t){y.printExceptionAndStackTraceToConsole(t,"enqueueImmediate exception")}}x.length=0};if(y.runningInNodeJS())v=function(){return setImmediate(function(){return t()})};else if("object"==typeof window&&"function"==typeof window.addEventListener&&"function"==typeof window.postMessage){var e,r="enqueueImmediate-"+Math.random().toString();window.addEventListener("message",function(e){e.data===r&&t()}),e=y.runningInNullOrigin()?"*":window.location.href,v=function(){return window.postMessage(r,e)}}else if("function"==typeof MessageChannel&&"function"==typeof MessagePort){var i=new MessageChannel;i.port1.onmessage=function(){return t()},v=function(){return i.port2.postMessage(0)}}else v=function(){return setTimeout(function(){return t()},0)}},_.initializeScheduler(),y.enqueueImmediate=function(t){return b.enqueueImmediate(t)},(A=(w=to||(to={})).ObjectTools||(w.ObjectTools={})).override=function(t,e){return A.extend(t,e)},A.extend=function(t,e){if(null==t)throw TypeError("obj is null or undefined");if("object"!=typeof t)throw TypeError("obj is not an object");if(null==e&&(e={}),"object"!=typeof e)throw TypeError("newProperties is not an object");if(null!=e)for(var r in e)t[r]=e[r];return t},(S=to||(to={})).getRandomIntegerInRange=function(t,e){return t+Math.floor(Math.random()*(e-t))},S.getRandomUTF16StringOfLength=function(t){for(var e="",r=0;r<t;r++){var i=void 0;do i=S.getRandomIntegerInRange(0,1114112);while(i>=55296&&i<=57343);e+=S.Encoding.CodePoint.decodeToString(i)}return e},(to||(to={})).StringBuilder=function(){function t(t){void 0===t&&(t=1024),this.outputBufferCapacity=t,this.outputPosition=0,this.outputString="",this.outputBuffer=new Uint16Array(this.outputBufferCapacity)}return t.prototype.appendCharCode=function(t){this.outputBuffer[this.outputPosition++]=t,this.outputPosition===this.outputBufferCapacity&&this.flushBufferToOutputString()},t.prototype.appendCharCodes=function(t){for(var e=0,r=t.length;e<r;e++)this.appendCharCode(t[e])},t.prototype.appendString=function(t){for(var e=0,r=t.length;e<r;e++)this.appendCharCode(t.charCodeAt(e))},t.prototype.appendCodePoint=function(t){if(t<=65535)this.appendCharCode(t);else if(t<=1114111)this.appendCharCode(55296+(t-65536>>>10)),this.appendCharCode(56320+(t-65536&1023));else throw Error("appendCodePoint: A code point of ".concat(t," cannot be encoded in UTF-16"))},t.prototype.getOutputString=function(){return this.flushBufferToOutputString(),this.outputString},t.prototype.flushBufferToOutputString=function(){this.outputPosition===this.outputBufferCapacity?this.outputString+=String.fromCharCode.apply(null,this.outputBuffer):this.outputString+=String.fromCharCode.apply(null,this.outputBuffer.subarray(0,this.outputPosition)),this.outputPosition=0},t}(),T=to||(to={}),C=function(){function t(){this.restart()}return t.prototype.restart=function(){this.startTime=t.getTimestamp()},t.prototype.getElapsedTime=function(){return t.getTimestamp()-this.startTime},t.prototype.getElapsedTimeAndRestart=function(){var t=this.getElapsedTime();return this.restart(),t},t.prototype.logAndRestart=function(t,e){void 0===e&&(e=!0);var r=this.getElapsedTime(),i="".concat(t,": ").concat(r.toFixed(3),"ms");return T.log(i,e),this.restart(),r},t.getTimestamp=function(){return this.timestampFunc||this.createGlobalTimestampFunction(),this.timestampFunc()},t.getMicrosecondTimestamp=function(){return Math.floor(1e3*t.getTimestamp())},t.createGlobalTimestampFunction=function(){if("object"==typeof ta&&"function"==typeof ta.hrtime){var t=0;this.timestampFunc=function(){var e=ta.hrtime(),r=1e3*e[0]+e[1]/1e6;return t+r},t=Date.now()-this.timestampFunc()}else if("object"==typeof chrome&&chrome.Interval){var e=Date.now(),r=new chrome.Interval;r.start(),this.timestampFunc=function(){return e+r.microseconds()/1e3}}else if("object"==typeof performance&&performance.now){var i=Date.now()-performance.now();this.timestampFunc=function(){return i+performance.now()}}else Date.now?this.timestampFunc=function(){return Date.now()}:this.timestampFunc=function(){return new Date().getTime()}},t}(),T.Timer=C,E=to||(to={}),k=function(){function t(t){void 0===t&&(t=!0),this.MinimumSequenceLength=4,this.MaximumSequenceLength=31,this.MaximumMatchDistance=32767,this.PrefixHashTableSize=65537,this.inputBufferStreamOffset=1,t&&"function"==typeof Uint32Array?this.prefixHashTable=new E.CompressorCustomHashTable(this.PrefixHashTableSize):this.prefixHashTable=new E.CompressorSimpleHashTable(this.PrefixHashTableSize)}return t.prototype.compressBlock=function(t){if(null==t)throw TypeError("compressBlock: undefined or null input received");return"string"==typeof t&&(t=E.encodeUTF8(t)),t=E.BufferTools.convertToUint8ArrayIfNeeded(t),this.compressUtf8Block(t)},t.prototype.compressUtf8Block=function(t){if(!t||0==t.length)return new Uint8Array(0);var e=this.cropAndAddNewBytesToInputBuffer(t),r=this.inputBuffer,i=this.inputBuffer.length;this.outputBuffer=new Uint8Array(t.length),this.outputBufferPosition=0;for(var n=0,s=e;s<i;s++){var o=r[s],a=s<n;if(s>i-this.MinimumSequenceLength){a||this.outputRawByte(o);continue}var l=this.getBucketIndexForPrefix(s);if(!a){var h=this.findLongestMatch(s,l);null!=h&&(this.outputPointerBytes(h.length,h.distance),n=s+h.length,a=!0)}a||this.outputRawByte(o);var u=this.inputBufferStreamOffset+s;this.prefixHashTable.addValueToBucket(l,u)}return this.outputBuffer.subarray(0,this.outputBufferPosition)},t.prototype.findLongestMatch=function(t,e){var r,i=this.prefixHashTable.getArraySegmentForBucketIndex(e,this.reusableArraySegmentObject);if(null==i)return null;for(var n=this.inputBuffer,s=0,o=0;o<i.length;o++){var a=i.getInReversedOrder(o)-this.inputBufferStreamOffset,l=t-a,h=void 0;if(h=void 0===r?this.MinimumSequenceLength-1:r<128&&l>=128?s+(s>>>1):s,l>this.MaximumMatchDistance||h>=this.MaximumSequenceLength||t+h>=n.length)break;if(n[a+h]===n[t+h]){for(var u=0;;u++)if(t+u===n.length||n[a+u]!==n[t+u]){u>
198h&&(r=l,s=u);break}else if(u===this.MaximumSequenceLength)return{distance:l,length:this.MaximumSequenceLength}}}return void 0!==r?{distance:r,length:s}:null},t.prototype.getBucketIndexForPrefix=function(t){return(7880599*this.inputBuffer[t]+39601*this.inputBuffer[t+1]+199*this.inputBuffer[t+2]+this.inputBuffer[t+3])%this.PrefixHashTableSize},t.prototype.outputPointerBytes=function(t,e){e<128?(this.outputRawByte(192|t),this.outputRawByte(e)):(this.outputRawByte(224|t),this.outputRawByte(e>>>8),this.outputRawByte(255&e))},t.prototype.outputRawByte=function(t){this.outputBuffer[this.outputBufferPosition++]=t},t.prototype.cropAndAddNewBytesToInputBuffer=function(t){if(void 0===this.inputBuffer)return this.inputBuffer=t,0;var e=Math.min(this.inputBuffer.length,this.MaximumMatchDistance),r=this.inputBuffer.length-e;return this.inputBuffer=E.CompressionCommon.getCroppedAndAppendedByteArray(this.inputBuffer,r,e,t),this.inputBufferStreamOffset+=r,e},t}(),E.Compressor=k,M=to||(to={}),B=function(){function t(t){this.minimumBucketCapacity=4,this.maximumBucketCapacity=64,this.bucketLocators=new Uint32Array(2*t),this.storage=new Uint32Array(2*t),this.storageIndex=1}return t.prototype.addValueToBucket=function(t,e){t<<=1,this.storageIndex>=this.storage.length>>>1&&this.compact();var r,i=this.bucketLocators[t];if(0===i)i=this.storageIndex,r=1,this.storage[this.storageIndex]=e,this.storageIndex+=this.minimumBucketCapacity;else{(r=this.bucketLocators[t+1])===this.maximumBucketCapacity-1&&(r=this.truncateBucketToNewerElements(i,r,this.maximumBucketCapacity/2));var n=i+r;0===this.storage[n]?(this.storage[n]=e,n===this.storageIndex&&(this.storageIndex+=r)):(M.ArrayTools.copyElements(this.storage,i,this.storage,this.storageIndex,r),i=this.storageIndex,this.storageIndex+=r,this.storage[this.storageIndex++]=e,this.storageIndex+=r),r++}this.bucketLocators[t]=i,this.bucketLocators[t+1]=r},t.prototype.truncateBucketToNewerElements=function(t,e,r){return M.ArrayTools.copyElements(this.storage,t+e-r,this.storage,t,r),M.ArrayTools.zeroElements(this.storage,t+r,e-r),r},t.prototype.compact=function(){var t=this.bucketLocators,e=this.storage;this.bucketLocators=new Uint32Array(this.bucketLocators.length),this.storageIndex=1;for(var r=0;r<t.length;r+=2){var i=t[r+1];0!==i&&(this.bucketLocators[r]=this.storageIndex,this.bucketLocators[r+1]=i,this.storageIndex+=Math.max(Math.min(2*i,this.maximumBucketCapacity),this.minimumBucketCapacity))}this.storage=new Uint32Array(8*this.storageIndex);for(var r=0;r<t.length;r+=2){var n=t[r];if(0!==n){var s=this.bucketLocators[r],o=this.bucketLocators[r+1];M.ArrayTools.copyElements(e,n,this.storage,s,o)}}},t.prototype.getArraySegmentForBucketIndex=function(t,e){t<<=1;var r=this.bucketLocators[t];return 0===r?null:(void 0===e&&(e=new M.ArraySegment(this.storage,r,this.bucketLocators[t+1])),e)},t.prototype.getUsedBucketCount=function(){return Math.floor(M.ArrayTools.countNonzeroValuesInArray(this.bucketLocators)/2)},t.prototype.getTotalElementCount=function(){for(var t=0,e=0;e<this.bucketLocators.length;e+=2)t+=this.bucketLocators[e+1];return t},t}(),M.CompressorCustomHashTable=B,P=to||(to={}),I=function(){function t(t){this.maximumBucketCapacity=64,this.buckets=Array(t)}return t.prototype.addValueToBucket=function(t,e){var r=this.buckets[t];void 0===r?this.buckets[t]=[e]:(r.length===this.maximumBucketCapacity-1&&P.ArrayTools.truncateStartingElements(r,this.maximumBucketCapacity/2),r.push(e))},t.prototype.getArraySegmentForBucketIndex=function(t,e){var r=this.buckets[t];return void 0===r?null:(void 0===e&&(e=new P.ArraySegment(r,0,r.length)),e)},t.prototype.getUsedBucketCount=function(){return P.ArrayTools.countNonzeroValuesInArray(this.buckets)},t.prototype.getTotalElementCount=function(){for(var t=0,e=0;e<this.buckets.length;e++)void 0!==this.buckets[e]&&(t+=this.buckets[e].length);return t},t}(),P.CompressorSimpleHashTable=I,R=to||(to={}),L=function(){function t(){this.MaximumMatchDistance=32767,this.outputPosition=0}return t.prototype.decompressBlockToString=function(t){return t=R.BufferTools.convertToUint8ArrayIfNeeded(t),R.decodeUTF8(this.decompressBlock(t))},t.prototype.decompressBlock=function(t){this.inputBufferRemainder&&(t=R.ArrayTools.concatUint8Arrays([this.inputBufferRemainder,t]),this.inputBufferRemainder=void 0);for(var e=this.cropOutputBufferToWindowAndInitialize(Math.max(4*t.length,1024)),r=0,i=t.length;r<i;r++){var n=t[r];
198if(n>>>6!=3){this.outputByte(n);continue}var s=n>>>5;if(r==i-1||r==i-2&&7==s){this.inputBufferRemainder=t.subarray(r);break}if(t[r+1]>>>7==1)this.outputByte(n);else{var o=31&n,a=void 0;6==s?(a=t[r+1],r+=1):(a=t[r+1]<<8|t[r+2],r+=2);for(var l=this.outputPosition-a,h=0;h<o;h++)this.outputByte(this.outputBuffer[l+h])}}return this.rollBackIfOutputBufferEndsWithATruncatedMultibyteSequence(),R.CompressionCommon.getCroppedBuffer(this.outputBuffer,e,this.outputPosition-e)},t.prototype.outputByte=function(t){this.outputPosition===this.outputBuffer.length&&(this.outputBuffer=R.ArrayTools.doubleByteArrayCapacity(this.outputBuffer)),this.outputBuffer[this.outputPosition++]=t},t.prototype.cropOutputBufferToWindowAndInitialize=function(t){if(!this.outputBuffer)return this.outputBuffer=new Uint8Array(t),0;var e=Math.min(this.outputPosition,this.MaximumMatchDistance);if(this.outputBuffer=R.CompressionCommon.getCroppedBuffer(this.outputBuffer,this.outputPosition-e,e,t),this.outputPosition=e,this.outputBufferRemainder){for(var r=0;r<this.outputBufferRemainder.length;r++)this.outputByte(this.outputBufferRemainder[r]);this.outputBufferRemainder=void 0}return e},t.prototype.rollBackIfOutputBufferEndsWithATruncatedMultibyteSequence=function(){for(var t=1;t<=4&&this.outputPosition-t>=0;t++){var e=this.outputBuffer[this.outputPosition-t];if(t<4&&e>>>3==30||t<3&&e>>>4==14||t<2&&e>>>5==6){this.outputBufferRemainder=this.outputBuffer.subarray(this.outputPosition-t,this.outputPosition),this.outputPosition-=t;return}}},t}(),R.Decompressor=L,U=(F=(O=to||(to={})).Encoding||(O.Encoding={})).Base64||(F.Base64={}),D=new Uint8Array([65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47]),N=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,255,255,255,255]),U.encode=function(t){return t&&0!=t.length?O.runningInNodeJS()?O.BufferTools.uint8ArrayToBuffer(t).toString("base64"):U.encodeWithJS(t):""},U.decode=function(t){return t?O.runningInNodeJS()?O.BufferTools.bufferToUint8Array(tl.from(t,"base64")):U.decodeWithJS(t):new Uint8Array(0)},U.encodeWithJS=function(t,e){if(void 0===e&&(e=!0),!t||0==t.length)return"";for(var r,i=new O.StringBuilder,n=0,s=t.length;n<s;n+=3)n<=s-3?(r=t[n]<<16|t[n+1]<<8|t[n+2],i.appendCharCode(D[r>>>18&63]),i.appendCharCode(D[r>>>12&63]),i.appendCharCode(D[r>>>6&63]),i.appendCharCode(D[63&r]),r=0):n===s-2?(r=t[n]<<16|t[n+1]<<8,i.appendCharCode(D[r>>>18&63]),i.appendCharCode(D[r>>>12&63]),i.appendCharCode(D[r>>>6&63]),e&&i.appendCharCode(61)):n===s-1&&(r=t[n]<<16,i.appendCharCode(D[r>>>18&63]),i.appendCharCode(D[r>>>12&63]),e&&(i.appendCharCode(61),i.appendCharCode(61)));return i.getOutputString()},U.decodeWithJS=function(t,e){if(!t||0==t.length)return new Uint8Array(0);var r=t.length%4;if(1===r)throw Error("Invalid Base64 string: length % 4 == 1");2===r?t+="==":3===r&&(t+="="),e||(e=new Uint8Array(t.length));for(var i=0,n=t.length,s=0;s<n;s+=4){var o=N[t.charCodeAt(s)]<<18|N[t.charCodeAt(s+1)]<<12|N[t.charCodeAt(s+2)]<<6|N[t.charCodeAt(s+3)];e[i++]=o>>>16&255,e[i++]=o>>>8&255,e[i++]=255&o}return 61==t.charCodeAt(n-1)&&i--,61==t.charCodeAt(n-2)&&i--,e.subarray(0,i)},($=(j=(z=to||(to={})).Encoding||(z.Encoding={})).BinaryString||(j.BinaryString={})).encode=function(t){if(null==t)throw TypeError("BinaryString.encode: undefined or null input received");if(0===t.length)return"";for(var e=t.length,r=new z.StringBuilder,i=0,n=1,s=0;s<e;s+=2){var o=void 0;o=s==e-1?t[s]<<8:t[s]<<8|t[s+1],r.appendCharCode(i<<16-n|o>>>n),i=o&(1<<n)-1,15===n?(r.appendCharCode(i),i=0,n=1):n+=1,s>=e-2&&r.appendCharCode(i<<16-n)}return r.appendCharCode(32768|e%2),r.getOutputString()},$.decode=function(t){if("string"!=typeof t)throw TypeError("BinaryString.decode: invalid input type");if(""==t)return new Uint8Array(0);for(var e=new Uint8Array(3*t.length),r=0,i=0,n=0,s=0;s<t.length;s++){var o,a=t.charCodeAt(s);if(a>=32768){32769==a&&r--,n=0;continue}0==n?i=a:(o=i<<n|a>>>15-n,e[r++]=o>>>8,e[r++]=255&o,i=a&(1<<15-n)-1),15==n?n=0:n+=1}return e.subarray(0,r)},(V=(G=(W=to||(to={})).Encoding||(W.Encoding={})).CodePoint||(G.CodePoint={})).encodeFromString=function(t,e){var r=t.charCodeAt(e);if(r<55296||r>56319)return r;var i=t.charCodeAt(e+1);if(i>=56320&&i<=57343)return 65536+((r-55296<<10)+(i-56320));throw Error("getUnicodeCodePoint: Received a lead surrogate character, char code ".concat(r,", followed by ").concat(i,", which is not a trailing surrogate character code."))},V.decodeToString=function(t){if(t<=65535)return String.fromCharCode(t);if(t<=1114111)return String.fromCharCode(55296+(t-65536>>>10),56320+(t-65536&1023));throw Error("getStringFromUnicodeCodePoint: A code point of ".concat(t," cannot be encoded in UTF-16"))},X=(Y=(H=to||(to={})).Encoding||(H.Encoding={})).DecimalString||(Y.DecimalString={}),q=["000","001","002","003","004","005","006","007","008","009","010","011","012","013","014","015","016","017","018","019","020","021","022","023","024","025","026","027","028","029","030","031","032","033","034","035","036","037","038","039","040","041","042","043","044","045","046","047","048","049","050","051","052","053","054","055","056","057","058","059","060","061","062","063","064","065","066","067","068","069","070","071","072","073","074","075","076","077","078","079","080","081","082","083","084","085","086","087","088","089","090","091","092","093","094","095","096","097","098","099","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255"],X.encode=function(t){for(var e=[],r=0;r<t.length;r++)e.push(q[t[r]]);return e.join(" ")},(Q=(Z=(K=to||(to={})).Encoding||(K.Encoding={})).StorageBinaryString||(Z.StorageBinaryString={})).encode=function(t){return Z.BinaryString.encode(t).replace(/\0/g,"耂")},Q.decode=function(t){return Z.BinaryString.decode(t.replace(/\u8002/g,"\0"))},(te=(tt=(J=to||(to={})).Encoding||(J.Encoding={})).UTF8||(tt.UTF8={})).encode=function(t){return t&&0!=t.length?J.runningInNodeJS()?J.BufferTools.bufferToUint8Array(tl.from(t,"utf8")):te.createNativeTextEncoderAndDecoderIfAvailable()?tr.encode(t):te.encodeWithJS(t):new Uint8Array(0)},te.decode=function(t){return t&&0!=t.length?J.runningInNodeJS()?J.BufferTools.uint8ArrayToBuffer(t).toString("utf8"):te.createNativeTextEncoderAndDecoderIfAvailable()?ti.decode(t):te.decodeWithJS(t):""},te.encodeWithJS=function(t,e){if(!t||0==t.length)return new Uint8Array(0);e||(e=new Uint8Array(4*t.length));for(var r=0,i=0;i<t.length;i++){var n=tt.CodePoint.encodeFromString(t,i);if(n<=127)e[r++]=n;else if(n<=2047)e[r++]=192|n>>>6,e[r++]=128|63&n;else if(n<=65535)e[r++]=224|n>>>12,e[r++]=128|n>>>6&63,e[r++]=128|63&n;else if(n<=1114111)e[r++]=240|n>>>18,e[r++]=128|n>>>12&63,e[r++]=128|n>>>6&63,e[r++]=128|63&n,i++;else throw Error("Invalid UTF-16 string: Encountered a character unsupported by UTF-8/16 (RFC 3629)")}return e.subarray(0,r)},te.decodeWithJS=function(t,e,r){if(void 0===e&&(e=0),!t||0==t.length)return"";void 0===r&&(r=t.length);for(var i,n,s=new J.StringBuilder,o=e,a=r;o<a;){if((n=t[o])>>>7==0)i=n,o+=1;else if(n>>>5==6){if(o+1>=r)throw Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+o);i=(31&n)<<6|63&t[o+1],o+=2}else if(n>>>4==14){if(o+2>=r)throw Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+o);i=(15&n)<<12|(63&t[o+1])<<6|63&t[o+2],o+=3}else if(n>>>3==30){if(o+3>=r)throw Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+o);i=(7&n)<<18|(63&t[o+1])<<12|(63&t[o+2])<<6|63&t[o+3],o+=4}else throw Error("Invalid UTF-8 stream: An invalid lead byte value encountered at position "+o);s.appendCodePoint(i)}return s.getOutputString()},te.createNativeTextEncoderAndDecoderIfAvailable=function(){return!!tr||"function"==typeof TextEncoder&&(tr=new TextEncoder("utf-8"),ti=new TextDecoder("utf-8"),!0)},(tn=to||(to={})).compress=function(t,e){if(void 0===e&&(e={}),null==t)throw TypeError("compress: undefined or null input received");var r=tn.CompressionCommon.detectCompressionSourceEncoding(t);e=tn.ObjectTools.override({inputEncoding:r,outputEncoding:"ByteArray"},e);var i=new tn.Compressor().compressBlock(t);return tn.CompressionCommon.encodeCompressedBytes(i,e.outputEncoding)},tn.decompress=function(t,e){if(void 0===e&&(e={}),null==t)throw TypeError("decompress: undefined or null input received");e=tn.ObjectTools.override({inputEncoding:"ByteArray",outputEncoding:"Str
198ing"},e);var r=tn.CompressionCommon.decodeCompressedBytes(t,e.inputEncoding),i=new tn.Decompressor().decompressBlock(r);return tn.CompressionCommon.encodeDecompressedBytes(i,e.outputEncoding)},tn.compressAsync=function(t,e,r){var i;null==r&&(r=function(){});try{i=tn.CompressionCommon.detectCompressionSourceEncoding(t)}catch(t){r(void 0,t);return}e=tn.ObjectTools.override({inputEncoding:i,outputEncoding:"ByteArray",useWebWorker:!0,blockSize:65536},e),tn.enqueueImmediate(function(){e.useWebWorker&&tn.WebWorker.createGlobalWorkerIfNeeded()?tn.WebWorker.compressAsync(t,e,r):tn.AsyncCompressor.compressAsync(t,e,r)})},tn.decompressAsync=function(t,e,r){if(null==r&&(r=function(){}),null==t)return void r(void 0,TypeError("decompressAsync: undefined or null input received"));e=tn.ObjectTools.override({inputEncoding:"ByteArray",outputEncoding:"String",useWebWorker:!0,blockSize:65536},e);var i=tn.BufferTools.convertToUint8ArrayIfNeeded(t);tn.EventLoop.enqueueImmediate(function(){e.useWebWorker&&tn.WebWorker.createGlobalWorkerIfNeeded()?tn.WebWorker.decompressAsync(i,e,r):tn.AsyncDecompressor.decompressAsync(t,e,r)})},tn.createCompressionStream=function(){return tn.AsyncCompressor.createCompressionStream()},tn.createDecompressionStream=function(){return tn.AsyncDecompressor.createDecompressionStream()},tn.encodeUTF8=function(t){return tn.Encoding.UTF8.encode(t)},tn.decodeUTF8=function(t){return tn.Encoding.UTF8.decode(t)},tn.encodeBase64=function(t){return tn.Encoding.Base64.encode(t)},tn.decodeBase64=function(t){return tn.Encoding.Base64.decode(t)},tn.encodeBinaryString=function(t){return tn.Encoding.BinaryString.encode(t)},tn.decodeBinaryString=function(t){return tn.Encoding.BinaryString.decode(t)},tn.encodeStorageBinaryString=function(t){return tn.Encoding.StorageBinaryString.encode(t)},tn.decodeStorageBinaryString=function(t){return tn.Encoding.StorageBinaryString.decode(t)}},30953:(t,e,r)=>{"use strict";r.d(e,{Y:()=>i});let i=(t,e)=>{let r=e.split("?")[1];return r&&(t+=`?${r}`),t}},31112:(t,e,r)=>{"use strict";r.d(e,{q:()=>o});var i=r(47397),n=r(34943),s=r(28513);class o extends s.v{constructor(t){t.resource||(t.resource=i.e.get().createCanvas()),!t.width&&(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),!t.height&&(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity,this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,e=this.height,r=this._resolution){let i=super.resize(t,e,r);return i&&this.resizeCanvas(),i}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}o.extension=n.Ag.TextureSource},32092:(t,e,r)=>{"use strict";function i(t,e){return`
199        for (let i = 0; i < ${t*e}; i++) {
200            data[offset + (((i / ${t})|0) * 4) + (i % ${t})] = v[i];
201        }
202    `}r.d(e,{_:()=>s,g:()=>n});let n={f32:`
203        data[offset] = v;`,i32:`
204        dataInt32[offset] = v;`,"vec2<f32>":`
205        data[offset] = v[0];
206        data[offset + 1] = v[1];`,"vec3<f32>":`
207        data[offset] = v[0];
208        data[offset + 1] = v[1];
209        data[offset + 2] = v[2];`,"vec4<f32>":`
210        data[offset] = v[0];
211        data[offset + 1] = v[1];
212        data[offset + 2] = v[2];
213        data[offset + 3] = v[3];`,"vec2<i32>":`
214        dataInt32[offset] = v[0];
215        dataInt32[offset + 1] = v[1];`,"vec3<i32>":`
216        dataInt32[offset] = v[0];
217        dataInt32[offset + 1] = v[1];
218        dataInt32[offset + 2] = v[2];`,"vec4<i32>":`
219        dataInt32[offset] = v[0];
220        dataInt32[offset + 1] = v[1];
221        dataInt32[offset + 2] = v[2];
222        dataInt32[offset + 3] = v[3];`,"mat2x2<f32>":`
223        data[offset] = v[0];
224        data[offset + 1] = v[1];
225        data[offset + 4] = v[2];
226        data[offset + 5] = v[3];`,"mat3x3<f32>":`
227        data[offset] = v[0];
228        data[offset + 1] = v[1];
229        data[offset + 2] = v[2];
230        data[offset + 4] = v[3];
231        data[offset + 5] = v[4];
232        data[offset + 6] = v[5];
233        data[offset + 8] = v[6];
234        data[offset + 9] = v[7];
235        data[offset + 10] = v[8];`,"mat4x4<f32>":`
236        for (let i = 0; i < 16; i++) {
237            data[offset + i] = v[i];
238        }`,"mat3x2<f32>":i(3,2),"mat4x2<f32>":i(4,2),"mat2x3<f32>":i(2,3),"mat4x3<f32>":i(4,3),"mat2x4<f32>":i(2,4),"mat3x4<f32>":i(3,4)},s={...n,"mat2x2<f32>":`
239        data[offset] = v[0];
240        data[offset + 1] = v[1];
241        data[offset + 2] = v[2];
242        data[offset + 3] = v[3];
243    `}},32360:(t,e,r)=>{"use strict";r.d(e,{P:()=>o,_:()=>n});let i={};function n(t){return i[t]||(i[t]={name:"texture-batch-bit",vertex:{header:`
244                @in aTextureIdAndRound: vec2<u32>;
245                @out @interpolate(flat) vTextureId : u32;
246            `,main:`
247                vTextureId = aTextureIdAndRound.y;
248            `,end:`
249                if(aTextureIdAndRound.x == 1)
250                {
251                    vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
252                }
253            `},fragment:{header:`
254                @in @interpolate(flat) vTextureId: u32;
255
256                ${function(t){let e=[];
256if(1===t)e.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),e.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let r=0;for(let i=0;i<t;i++)e.push(`@group(1) @binding(${r++}) var textureSource${i+1}: texture_2d<f32>;`),e.push(`@group(1) @binding(${r++}) var textureSampler${i+1}: sampler;`)}return e.join("\n")}(t)}
257            `,main:`
258                var uvDx = dpdx(vUV);
259                var uvDy = dpdy(vUV);
260
261                ${function(t){let e=[];if(1===t)e.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{e.push("switch vTextureId {");for(let r=0;r<t;r++)r===t-1?e.push("  default:{"):e.push(`  case ${r}:{`),e.push(`      outColor = textureSampleGrad(textureSource${r+1}, textureSampler${r+1}, vUV, uvDx, uvDy);`),e.push("      break;}");e.push("}")}return e.join("\n")}(t)}
262            `}}),i[t]}let s={};function o(t){return s[t]||(s[t]={name:"texture-batch-bit",vertex:{header:`
263                in vec2 aTextureIdAndRound;
264                out float vTextureId;
265
266            `,main:`
267                vTextureId = aTextureIdAndRound.y;
268            `,end:`
269                if(aTextureIdAndRound.x == 1.)
270                {
271                    gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
272                }
273            `},fragment:{header:`
274                in float vTextureId;
275
276                uniform sampler2D uTextures[${t}];
277
278            `,main:`
279
280                ${function(t){let e=[];for(let r=0;r<t;r++)r>0&&e.push("else"),r<t-1&&e.push(`if(vTextureId < ${r}.5)`),e.push("{"),e.push(`	outColor = texture(uTextures[${r}], vUV);`),e.push("}");return e.join("\n")}(t)}
281            `}}),s[t]}},32816:(t,e,r)=>{"use strict";r.d(e,{X:()=>s});let i=Object.create(null),n=Object.create(null);function s(t,e){let r=n[t];return void 0===r&&(void 0===i[e]&&(i[e]=1),n[t]=r=i[e]++),r}},32974:(t,e,r)=>{"use strict";r.d(e,{o:()=>a,u:()=>o});var i=r(19677),n=r(64833),s=r(20060);let o=new n.b(i.u),a=new n.b(s.c)},33026:(t,e,r)=>{"use strict";r.d(e,{n:()=>s});var i=r(7258);let n={};function s(t){let e=n[t];if(e)return e;let r=new Int32Array(t);for(let e=0;e<t;e++)r[e]=e;return n[t]=new i.k({uTextures:{value:r,type:"i32",size:t}},{isStatic:!0})}},33345:(t,e,r)=>{var i=r(96244),n=i.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(s(i,e),e.Buffer=o),o.prototype=Object.create(n.prototype),s(n,o),o.from=function(t,e,r){if("number"==typeof t)throw TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return i.SlowBuffer(t)}},34418:t=>{"use strict";t.exports={ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,r)=>t.slice(e,r),Error,FunctionPrototypeCall:(t,e,...r)=>t.call(e,...r),FunctionPrototypeSymbolHasInstance:(t,e)=>Function.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,r)=>Object.defineProperty(t,e,r),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,r)=>t.then(e,r),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String,StringPrototypeSlice:(t,e,r)=>t.slice(e,r),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,e,r)=>t.set(e,r),Boolean:Boolean,Uint8Array}},34943:(t,e,r)=>{"use strict";r.d(e,{Ag:()=>n,XO:()=>a});var i,n=((i=n||{}).Application="application",i.WebGLPipes="webgl-pipes",i.WebGLPipesAdaptor="webgl-pipes-adaptor",i.WebGLSystem="webgl-system",i.WebGPUPipes="webgpu-pipes",i.WebGPUPipesAdaptor="webgpu-pipes-adaptor",i.WebGPUSystem="webgpu-system",i.CanvasSystem="canvas-system",i.CanvasPipesAdaptor="canvas-pipes-adaptor",i.CanvasPipes="canvas-pipes",i.Asset="asset",i.LoadParser="load-parser",i.ResolveParser="resolve-parser",i.CacheParser="cache-parser",i.DetectionParser="detection-parser",i.MaskEffect="mask-effect",i.BlendMode="blend-mode",i.TextureSource="texture-source",i.Environment="environment",i.ShapeBuilder="shape-builder",i.Batcher="batcher",i);let s=t=>{if("function"==typeof t||"object"==typeof t&&t.extension){if(!t.extension)throw Error("Extension class must have an extension object");t={..."object"!=typeof t.extension?{type:t.extension}:t.extension,ref:t}}if("object"==typeof t)t={...t};else throw Error("Invalid extension type");return"string"==typeof t.type&&(t.type=[t.type]),t},o=(t,e)=>s(t).priority??e,a={_addHandlers:{},_removeHandlers:{},_queue:{}
281,remove(...t){return t.map(s).forEach(t=>{t.type.forEach(e=>this._removeHandlers[e]?.(t))}),this},add(...t){return t.map(s).forEach(t=>{t.type.forEach(e=>{let r=this._addHandlers,i=this._queue;r[e]?r[e]?.(t):(i[e]=i[e]||[],i[e]?.push(t))})}),this},handle(t,e,r){let i=this._addHandlers,n=this._removeHandlers;if(i[t]||n[t])throw Error(`Extension type ${t} already has a handler`);i[t]=e,n[t]=r;let s=this._queue;return s[t]&&(s[t]?.forEach(t=>e(t)),delete s[t]),this},handleByMap(t,e){return this.handle(t,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByNamedList(t,e,r=-1){return this.handle(t,t=>{e.findIndex(e=>e.name===t.name)>=0||(e.push({name:t.name,value:t.ref}),e.sort((t,e)=>o(e.value,r)-o(t.value,r)))},t=>{let r=e.findIndex(e=>e.name===t.name);-1!==r&&e.splice(r,1)})},handleByList(t,e,r=-1){return this.handle(t,t=>{e.includes(t.ref)||(e.push(t.ref),e.sort((t,e)=>o(e,r)-o(t,r)))},t=>{let r=e.indexOf(t.ref);-1!==r&&e.splice(r,1)})},mixin(t,...e){for(let r of e)Object.defineProperties(t.prototype,Object.getOwnPropertyDescriptors(r))}}},36710:(t,e,r)=>{"use strict";r.d(e,{GH:()=>O});var i=r(34943),n=r(68251),s=r(17004),o=r(5162),a=r(70242),l=r(75408),h=r(19677),u=r(16434);function d(t,e,r,i,n){let s=e.a,o=e.b,a=e.c,l=e.d,h=e.tx,u=e.ty;r||(r=0),i||(i=2),n||(n=t.length/i-r);let d=r*i;for(let e=0;e<n;e++){let e=t[d],r=t[d+1];t[d]=s*e+a*r+h,t[d+1]=o*e+l*r+u,d+=i}}var c=r(46480),f=r(50098);let p={extension:{type:i.Ag.ShapeBuilder,name:"circle"},build(t,e){let r,i,n,s,o,a;if("circle"===t.type)r=t.x,i=t.y,o=a=t.radius,n=s=0;else if("ellipse"===t.type)r=t.x,i=t.y,o=t.halfWidth,a=t.halfHeight,n=s=0;else{let e=t.width/2,l=t.height/2;r=t.x+e,i=t.y+l,o=a=Math.max(0,Math.min(t.radius,Math.min(e,l))),n=e-o,s=l-a}if(!(o>=0&&a>=0&&n>=0&&s>=0))return e;let l=Math.ceil(2.3*Math.sqrt(o+a)),h=8*l+4*!!n+4*!!s;if(0===h)return e;if(0===l)return e[0]=e[6]=r+n,e[1]=e[3]=i+s,e[2]=e[4]=r-n,e[5]=e[7]=i-s,e;let u=0,d=4*l+2*!!n+2,c=d,f=h,p=n+o,g=s,m=r+p,y=r-p,b=i+g;if(e[u++]=m,e[u++]=b,e[--d]=b,e[--d]=y,s){let t=i-g;e[c++]=y,e[c++]=t,e[--f]=t,e[--f]=m}for(let t=1;t<l;t++){let h=Math.PI/2*(t/l),p=n+Math.cos(h)*o,g=s+Math.sin(h)*a,m=r+p,y=r-p,b=i+g,_=i-g;e[u++]=m,e[u++]=b,e[--d]=b,e[--d]=y,e[c++]=y,e[c++]=_,e[--f]=_,e[--f]=m}p=n,g=s+a,m=r+p,y=r-p,b=i+g;let _=i-g;return e[u++]=m,e[u++]=b,e[--f]=_,e[--f]=m,n&&(e[u++]=y,e[u++]=b,e[--f]=_,e[--f]=y),e},triangulate(t,e,r,i,n,s){if(0===t.length)return;let o=0,a=0;for(let e=0;e<t.length;e+=2)o+=t[e],a+=t[e+1];o/=t.length/2,a/=t.length/2;let l=i;e[l*r]=o,e[l*r+1]=a;let h=l++;for(let i=0;i<t.length;i+=2)e[l*r]=t[i],e[l*r+1]=t[i+1],i>0&&(n[s++]=l,n[s++]=h,n[s++]=l-1),l++;n[s++]=h+1,n[s++]=h,n[s++]=l-1}},g={...p,extension:{...p.extension,name:"ellipse"}},m={...p,extension:{...p.extension,name:"roundedRectangle"}};var y=r(94521);function b(t,e,r,i,n,s,o,a){let l,h;o?(l=i,h=-r):(l=-i,h=r);let u=t-r*n+l,d=e-i*n+h,c=t+r*s+l,f=e+i*s+h;return a.push(u,d),a.push(c,f),2}function _(t,e,r,i,n,s,o,a){let l=r-t,h=i-e,u=Math.atan2(l,h),d=Math.atan2(n-t,s-e);a&&u<d?u+=2*Math.PI:!a&&u>d&&(d+=2*Math.PI);let c=u,f=d-u,p=Math.sqrt(l*l+h*h),g=(15*Math.abs(f)*Math.sqrt(p)/Math.PI|0)+1,m=f/g;if(c+=m,a){o.push(t,e),o.push(r,i);for(let r=1,i=c;r<g;r++,i+=m)o.push(t,e),o.push(t+Math.sin(i)*p,e+Math.cos(i)*p);o.push(t,e),o.push(n,s)}else{o.push(r,i),o.push(t,e);for(let r=1,i=c;r<g;r++,i+=m)o.push(t+Math.sin(i)*p,e+Math.cos(i)*p),o.push(t,e);o.push(n,s),o.push(t,e)}return 2*g}var v=r(78214);function x(t,e,r,i,n,s,o){let a=v(t,e,2);if(!a)return;for(let t=0;t<a.length;t+=3)s[o++]=a[t]+n,s[o++]=a[t+1]+n,s[o++]=a[t+2]+n;let l=n*i;for(let e=0;e<t.length;e+=2)r[l]=t[e],r[l+1]=t[e+1],l+=i}let w=[],A={extension:{type:i.Ag.ShapeBuilder,name:"polygon"},build(t,e){for(let r=0;r<t.points.length;r++)e[r]=t.points[r];return e},triangulate(t,e,r,i,n,s){x(t,w,e,r,i,n,s)}},S={extension:{type:i.Ag.ShapeBuilder,name:"rectangle"},build(t,e){let r=t.x,i=t.y,n=t.width,s=t.height;return n>=0&&s>=0&&(e[0]=r,e[1]=i,e[2]=r+n,e[3]=i,e[4]=r+n,e[5]=i+s,e[6]=r,e[7]=i+s),e},triangulate(t,e,r,i,n,s){let o=0;e[(i*=r)+o]=t[0],e[i+o+1]=t[1],o+=r,e[i+o]=t[2],e[i+o+1]=t[3],o+=r,e[i+o]=t[6],e[i+o+1]=t[7],o+=r,e[i+o]=t[4],e[i+o+1]=t[5],o+=r;let a=i/r;
281n[s++]=a,n[s++]=a+1,n[s++]=a+2,n[s++]=a+1,n[s++]=a+3,n[s++]=a+2}},T={extension:{type:i.Ag.ShapeBuilder,name:"triangle"},build:(t,e)=>(e[0]=t.x,e[1]=t.y,e[2]=t.x2,e[3]=t.y2,e[4]=t.x3,e[5]=t.y3,e),triangulate(t,e,r,i,n,s){let o=0;e[(i*=r)+o]=t[0],e[i+o+1]=t[1],o+=r,e[i+o]=t[2],e[i+o+1]=t[3],o+=r,e[i+o]=t[4],e[i+o+1]=t[5];let a=i/r;n[s++]=a,n[s++]=a+1,n[s++]=a+2}},C=new h.u,E=new u.M,k={};i.XO.handleByMap(i.Ag.ShapeBuilder,k),i.XO.add(S,A,T,p,g,m);let M=new u.M,B=new h.u;function P(t,e,r,i,n){let{vertices:s,uvs:o,indices:a}=n;t.shapePrimitives.forEach(({shape:t,transform:h,holes:u})=>{let p=a.length,g=s.length/2,m=[],v=k[t.type],w="triangle-list";if(v.build(t,m),h&&d(m,h),r){let r=t.closePath??!0;e.pixelLine?(!function(t,e,r,i){if(0===t.length)return;let n=t[0],s=t[1],o=t[t.length-2],a=t[t.length-1],l=e||1e-4>Math.abs(n-o)&&1e-4>Math.abs(s-a),h=t.length/2,u=r.length/2;for(let e=0;e<h;e++)r.push(t[2*e]),r.push(t[2*e+1]);for(let t=0;t<h-1;t++)i.push(u+t,u+t+1);l&&i.push(u+h-1,u)}(m,r,s,a),w="line-list"):function(t,e,r,i,n,s){if(0===t.length)return;let o=e.alignment;if(.5!==e.alignment){let e=function(t){let e=t.length;if(e<6)return 1;let r=0;for(let i=0,n=t[e-2],s=t[e-1];i<e;i+=2){let e=t[i],o=t[i+1];r+=(e-n)*(o+s),n=e,s=o}return r<0?-1:1}(t);r&&(e*=-1),o=(o-.5)*e+.5}let a=new y.b(t[0],t[1]),l=new y.b(t[t.length-2],t[t.length-1]),h=1e-4>Math.abs(a.x-l.x)&&1e-4>Math.abs(a.y-l.y);if(i){t=t.slice(),h&&(t.pop(),t.pop(),l.set(t[t.length-2],t[t.length-1]));let e=(a.x+l.x)*.5,r=(l.y+a.y)*.5;t.unshift(e,r),t.push(e,r)}let u=t.length/2,d=t.length,c=n.length/2,f=e.width/2,p=f*f,g=e.miterLimit*e.miterLimit,m=t[0],v=t[1],x=t[2],w=t[3],A=0,S=0,T=-(v-w),C=m-x,E=0,k=0,M=Math.sqrt(T*T+C*C);T/=M,C/=M,T*=f,C*=f;let B=o,P=(1-B)*2,I=2*B;i||("round"===e.cap?d+=_(m-T*(P-I)*.5,v-C*(P-I)*.5,m-T*P,v-C*P,m+T*I,v+C*I,n,!0)+2:"square"===e.cap&&(d+=b(m,v,T,C,P,I,!0,n))),n.push(m-T*P,v-C*P),n.push(m+T*I,v+C*I);for(let r=1;r<u-1;++r){m=t[(r-1)*2],v=t[(r-1)*2+1],x=t[2*r],w=t[2*r+1],A=t[(r+1)*2],S=t[(r+1)*2+1],M=Math.sqrt((T=-(v-w))*T+(C=m-x)*C),T/=M,C/=M,T*=f,C*=f,M=Math.sqrt((E=-(w-S))*E+(k=x-A)*k),E/=M,k/=M,E*=f,k*=f;let i=x-m,s=v-w,o=x-A,a=S-w,l=i*o+s*a,h=s*o-a*i,u=h<0;if(Math.abs(h)<.001*Math.abs(l)){n.push(x-T*P,w-C*P),n.push(x+T*I,w+C*I),l>=0&&("round"===e.join?d+=_(x,w,x-T*P,w-C*P,x-E*P,w-k*P,n,!1)+4:d+=2,n.push(x-E*I,w-k*I),n.push(x+E*P,w+k*P));continue}let c=(-T+m)*(-C+w)-(-T+x)*(-C+v),y=(-E+A)*(-k+w)-(-E+x)*(-k+S),b=(i*y-o*c)/h,B=(a*c-s*y)/h,R=(b-x)*(b-x)+(B-w)*(B-w),L=x+(b-x)*P,O=w+(B-w)*P,F=x-(b-x)*I,U=w-(B-w)*I,D=u?P:I;R<=Math.min(i*i+s*s,o*o+a*a)+D*D*p?"bevel"===e.join||R/p>g?(u?(n.push(L,O),n.push(x+T*I,w+C*I),n.push(L,O),n.push(x+E*I,w+k*I)):(n.push(x-T*P,w-C*P),n.push(F,U),n.push(x-E*P,w-k*P),n.push(F,U)),d+=2):"round"===e.join?u?(n.push(L,O),n.push(x+T*I,w+C*I),d+=_(x,w,x+T*I,w+C*I,x+E*I,w+k*I,n,!0)+4,n.push(L,O),n.push(x+E*I,w+k*I)):(n.push(x-T*P,w-C*P),n.push(F,U),d+=_(x,w,x-T*P,w-C*P,x-E*P,w-k*P,n,!1)+4,n.push(x-E*P,w-k*P),n.push(F,U)):(n.push(L,O),n.push(F,U)):(n.push(x-T*P,w-C*P),n.push(x+T*I,w+C*I),"round"===e.join?u?d+=_(x,w,x+T*I,w+C*I,x+E*I,w+k*I,n,!0)+2:d+=_(x,w,x-T*P,w-C*P,x-E*P,w-k*P,n,!1)+2:"miter"===e.join&&R/p<=g&&(u?(n.push(F,U),n.push(F,U)):(n.push(L,O),n.push(L,O)),d+=2),n.push(x-E*P,w-k*P),n.push(x+E*I,w+k*I),d+=2)}m=t[(u-2)*2],v=t[(u-2)*2+1],x=t[(u-1)*2],M=Math.sqrt((T=-(v-(w=t[(u-1)*2+1])))*T+(C=m-x)*C),T/=M,C/=M,T*=f,C*=f,n.push(x-T*P,w-C*P),n.push(x+T*I,w+C*I),i||("round"===e.cap?d+=_(x-T*(P-I)*.5,w-C*(P-I)*.5,x-T*P,w-C*P,x+T*I,w+C*I,n,!1)+2:"square"===e.cap&&(d+=b(x,w,T,C,P,I,!1,n)));let R=1e-4*1e-4;for(let t=c;t<d+c-2;++t)m=n[2*t],v=n[2*t+1],x=n[(t+1)*2],w=n[(t+1)*2+1],A=n[(t+2)*2],Math.abs(m*(w-(S=n[(t+2)*2+1]))+x*(S-v)+A*(v-w))<R||s.push(t,t+1,t+2)}(m,e,!1,r,s,a)}else if(u){let t=[],e=m.slice();(function(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r].shape,n=[];k[i.type].build(i,n),e.push(n)}return e})(u).forEach(r=>{t.push(e.length/2),e.push(...r)}),x(e,t,s,2,g,a,p)}else v.triangulate(m,s,2,g,a,p);let A=o.length/2,S=e.texture;if(S!==c.g.WHITE){let r=function(t,e,r,i){let n=e.matrix?t.copyFrom(e.matrix).invert():t.identity();if("local"===e.textureSpace){let t=r.getBounds(E);n.translate(-t.x,-t.y),n.scale(1/t.width,1/t.height)}else{n.translate(e.texture.frame.x,e.texture.frame.y),n.scale(1/e.texture.source.width,1/e.texture.source.height);let t=e.texture.source.style;"clamp-to-edge"===t.addressMode&&(t.addressMode="repeat",t.update(
281))}return i&&n.append(C.copyFrom(i).invert()),n}(B,e,t,h);!function(t,e,r,i,n,s=null){let o=0;e*=2,i*=2;let a=s.a,l=s.b,h=s.c,u=s.d,d=s.tx,c=s.ty;for(;o<n;){let n=t[e],s=t[e+1];r[i]=a*n+h*s+d,r[i+1]=l*n+u*s+c,i+=2,e+=2,o++}}(s,g,o,A,s.length/2-g,r)}else{var T=A,M=s.length/2-g;let t=0;for(T*=2;t<M;)o[T]=0,o[T+1]=0,T+=2,t++}let P=l.Z.get(f.G);P.indexOffset=p,P.indexSize=a.length-p,P.attributeOffset=g,P.attributeSize=s.length/2-g,P.baseColor=e.color,P.alpha=e.alpha,P.texture=S,P.geometryData=n,P.topology=w,i.push(P)})}class I{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}}class R{constructor(){this.batcher=new s.J,this.instructions=new o.L}init(){this.instructions.reset()}get geometry(){return(0,a.t6)(a.Ek,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}}let L=class t{constructor(t){this._gpuContextHash={},this._graphicsDataContextHash=Object.create(null),t.renderableGC.addManagedHash(this,"_gpuContextHash"),t.renderableGC.addManagedHash(this,"_graphicsDataContextHash")}init(e){t.defaultOptions.bezierSmoothness=e?.bezierSmoothness??t.defaultOptions.bezierSmoothness}getContextRenderData(t){return this._graphicsDataContextHash[t.uid]||this._initContextRenderData(t)}updateGpuContext(t){let e=this._gpuContextHash[t.uid]||this._initContext(t);if(t.dirty){e?this._cleanGraphicsContextData(t):e=this._initContext(t),function(t,e){let{geometryData:r,batches:i}=e;i.length=0,r.indices.length=0,r.vertices.length=0,r.uvs.length=0;for(let e=0;e<t.instructions.length;e++){let n=t.instructions[e];if("texture"===n.action)!function(t,e,r){let{vertices:i,uvs:n,indices:s}=r,o=s.length,a=i.length/2,h=[],u=k.rectangle,c=t.image;M.x=t.dx,M.y=t.dy,M.width=t.dw,M.height=t.dh;let p=t.transform;u.build(M,h),p&&d(h,p),u.triangulate(h,i,2,a,s,o);let g=c.uvs;n.push(g.x0,g.y0,g.x1,g.y1,g.x3,g.y3,g.x2,g.y2);let m=l.Z.get(f.G);m.indexOffset=o,m.indexSize=s.length-o,m.attributeOffset=a,m.attributeSize=i.length/2-a,m.baseColor=t.style,m.alpha=t.alpha,m.texture=c,m.geometryData=r,e.push(m)}(n.data,i,r);else if("fill"===n.action||"stroke"===n.action){let t="stroke"===n.action,e=n.data.path.shapePath,s=n.data.style,o=n.data.hole;t&&o&&P(o.shapePath,s,!0,i,r),o&&(e.shapePrimitives[e.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),P(e,s,t,i,r)}}}(t,e);let r=t.batchMode;t.customShader||"no-batch"===r?e.isBatchable=!1:"auto"===r&&(e.isBatchable=e.geometryData.vertices.length<400),t.dirty=!1}return e}getGpuContext(t){return this._gpuContextHash[t.uid]||this._initContext(t)}_initContextRenderData(t){let e=l.Z.get(R),{batches:r,geometryData:i}=this._gpuContextHash[t.uid],s=i.vertices.length,o=i.indices.length;for(let t=0;t<r.length;t++)r[t].applyTransform=!1;let a=e.batcher;a.ensureAttributeBuffer(s),a.ensureIndexBuffer(o),a.begin();for(let t=0;t<r.length;t++){let e=r[t];a.add(e)}a.finish(e.instructions);let h=a.geometry;h.indexBuffer.setDataWithSize(a.indexBuffer,a.indexSize,!0),h.buffers[0].setDataWithSize(a.attributeBuffer.float32View,a.attributeSize,!0);let u=a.batches;for(let t=0;t<u.length;t++){let e=u[t];e.bindGroup=(0,n.w)(e.textures.textures,e.textures.count)}return this._graphicsDataContextHash[t.uid]=e,e}_initContext(t){let e=new I;return e.context=t,this._gpuContextHash[t.uid]=e,t.on("destroy",this.onGraphicsContextDestroy,this),this._gpuContextHash[t.uid]}onGraphicsContextDestroy(t){this._cleanGraphicsContextData(t),t.off("destroy",this.onGraphicsContextDestroy,this),this._gpuContextHash[t.uid]=null}_cleanGraphicsContextData(t){let e=this._gpuContextHash[t.uid];!e.isBatchable&&this._graphicsDataContextHash[t.uid]&&(l.Z.return(this.getContextRenderData(t)),this._graphicsDataContextHash[t.uid]=null),e.batches&&e.batches.forEach(t=>{l.Z.return(t)})}destroy(){for(let t in this._gpuContextHash)this._gpuContextHash[t]&&this.onGraphicsContextDestroy(this._gpuContextHash[t].context)}};L.extension={type:[i.Ag.WebGLSystem,i.Ag.WebGPUSystem,i.Ag.CanvasSystem],name:"graphicsContext"},L.defaultOptions={bezierSmoothness:.5};let O=L},40171:(t,e,r)=>{"use strict";r.d(e,{b:()=>a});var i=r(47397),n=r(34943),s=r(53670),o=r(28513);class a extends o.v{constructor(t){if(t.resource&&globalThis.HTMLImageElement&&t.resource instanceof HTMLImageElement){const e=i.e.get().createCanvas(t.resource.width,t.resource.height);e.getContext("2d").drawImage(t.resource,0,0,t.resource.width,t.resource.height),t.resource=e,(0,s.R)("ImageSource: Image element passed, converting to canvas. Use CanvasSource instead.")}super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||"u">typeof ImageBitmap&&t instanceof ImageBitmap||globalThis.VideoFrame&&t instanceof VideoFrame}}a.extension=n.Ag.TextureSource},42460:(t,e,r)=>{"use strict";let i;async function n(){return i??(i=(async()=>{let t=document.createElement("canvas").getContext("webgl");
281if(!t)return"premultiply-alpha-on-upload";let e=await new Promise(t=>{let e=document.createElement("video");e.onloadeddata=()=>t(e),e.onerror=()=>t(null),e.autoplay=!1,e.crossOrigin="anonymous",e.preload="auto",e.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",e.load()});if(!e)return"premultiply-alpha-on-upload";let r=t.createTexture();t.bindTexture(t.TEXTURE_2D,r);let i=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,i),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e);let n=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,n),t.deleteFramebuffer(i),t.deleteTexture(r),t.getExtension("WEBGL_lose_context")?.loseContext(),n[0]<=n[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),i}r.d(e,{C:()=>n})},43006:(t,e,r)=>{"use strict";let i=r(96244),{kResistStopPropagation:n,SymbolDispose:s}=r(34418),AbortSignal=globalThis.AbortSignal||r(30214).AbortSignal,o=globalThis.AbortController||r(30214).AbortController,a=Object.getPrototypeOf(async function(){}).constructor,l=globalThis.Blob||i.Blob,h=(t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new ER
281R_INVALID_ARG_TYPE(e,"AbortSignal",t)};class u extends Error{constructor(t){if(!Array.isArray(t))throw TypeError(`Expected input to be an Array, got ${typeof t}`);let e="";for(let r=0;r<t.length;r++)e+=`    ${t[r].stack}
282`;super(e),this.name="AggregateError",this.errors=t}}t.exports={AggregateError:u,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}},promisify:t=>new Promise((e,r)=>{t((t,...i)=>t?r(t):e(...i))}),debuglog:()=>function(){},format:(t,...e)=>t.replace(/%([sdifj])/g,function(...[t,r]){let i=e.shift();if("f"===r)return i.toFixed(6);if("j"===r)return JSON.stringify(i);if("s"!==r||"object"!=typeof i)return i.toString();{let t=i.constructor!==Object?i.constructor.name:"";return`${t} {}`.trim()}}),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;else if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":if(isNaN(t))return"NaN";if(Object.is(t,-0))return String(t);return t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction:t=>t instanceof a,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:void 0!==l?function(t){return t instanceof l}:function(t){return!1},deprecate:(t,e)=>t,addAbortListener:r(97788).addAbortListener||function(t,e){let r;
282if(void 0===t)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",t);h(t,"signal");if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e);return t.aborted?queueMicrotask(()=>e()):(t.addEventListener("abort",e,{__proto__:null,once:!0,[n]:!0}),r=()=>{t.removeEventListener("abort",e)}),{__proto__:null,[s](){var t;null==(t=r)||t()}}},AbortSignalAny:AbortSignal.any||function(t){if(1===t.length)return t[0];let e=new o,r=()=>e.abort();return t.forEach(t=>{h(t,"signals"),t.addEventListener("abort",r,{once:!0})}),e.signal.addEventListener("abort",()=>{t.forEach(t=>t.removeEventListener("abort",r))},{once:!0}),e.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},43146:(t,e,r)=>{"use strict";let i=r(45426),n=r(98733),s=i.Readable.destroy;t.exports=i.Readable,t.exports._uint8ArrayToBuffer=i._uint8ArrayToBuffer,t.exports._isUint8Array=i._isUint8Array,t.exports.isDisturbed=i.isDisturbed,t.exports.isErrored=i.isErrored,t.exports.isReadable=i.isReadable,t.exports.Readable=i.Readable,t.exports.Writable=i.Writable,t.exports.Duplex=i.Duplex,t.exports.Transform=i.Transform,t.exports.PassThrough=i.PassThrough,t.exports.addAbortSignal=i.addAbortSignal,t.exports.finished=i.finished,t.exports.destroy=i.destroy,t.exports.destroy=s,t.exports.pipeline=i.pipeline,t.exports.compose=i.compose,Object.defineProperty(i,"promises",{configurable:!0,enumerable:!0,get:()=>n}),t.exports.Stream=i.Stream,t.exports.default=t.exports},43179:(t,e,r)=>{"use strict";r.d(e,{a:()=>i});class i{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}},44495:(t,e,r)=>{"use strict";r.d(e,{j:()=>n});var i=r(14920);function n(t,e){return 0xffffff===t?e:0xffffff===e?t:(0,i.u)(t,e)}},44571:(t,e,r)=>{"use strict";r.d(e,{L:()=>n});let i={default:-1};function n(t="default"){return void 0===i[t]&&(i[t]=-1),++i[t]}},45426:(t,e,r)=>{"use strict";let{Buffer:i}=r(96244),{ObjectDefineProperty:n,ObjectKeys:s,ReflectApply:o}=r(34418),{promisify:{custom:a}}=r(43006),{streamReturningOperators:l,promiseReturningOperators:h}=r(47299),{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=r(60577),d=r(530),{setDefaultHighWaterMark:c,getDefaultHighWaterMark:f}=r(52039),{pipeline:p}=r(27608),{destroyer:g}=r(67436),m=r(86650),y=r(98733),b=r(71343),_=t.exports=r(2589).Stream;for(let t of(_.isDestroyed=b.isDestroyed,_.isDisturbed=b.isDisturbed,_.isErrored=b.isErrored,_.isReadable=b.isReadable,_.isWritable=b.isWritable,_.Readable=r(9138),s(l))){let e=l[t];function v(...t){if(new.target)throw u();return _.Readable.from(o(e,this,t))}n(v,"name",{__proto__:null,value:e.name}),n(v,"length",{__proto__:null,value:e.length}),n(_.Readable.prototype,t,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}for(let t of s(h)){let e=h[t];function v(...t){if(new.target)throw u();return o(e,this,t)}n(v,"name",{__proto__:null,value:e.name}),n(v,"length",{__proto__:null,value:e.length}),n(_.Readable.prototype,t,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}_.Writable=r(7926),_.Duplex=r(20140),_.Transform=r(85394),_.PassThrough=r(81344),_.pipeline=p;let{addAbortSignal:x}=r(46185);_.addAbortSignal=x,_.finished=m,_.destroy=g,_.compose=d,_.setDefaultHighWaterMark=c,_.getDefaultHighWaterMark=f,n(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),n(p,a,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),n(m,a,{__proto__:null,enumerable:!0,get:()=>y.finished}),_.Stream=_,_._isUint8Array=function(t){return t instanceof Uint8Array},_._uint8ArrayToBuffer=function(t){return i.from(t.buffer,t.byteOffset,t.byteLength)}},46120:(t,e,r)=>{"use strict";r.d(e,{m:()=>o});var i=r(19677),n=r(44571);let s={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}};class o{constructor(t,e){this.uid=(0,n.L)("fillPattern"),this.transform=new i.u,this._styleKey=null,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),e&&(t.source.style.addressModeU=s[e].addressModeU,t.source.style.addressModeV=s[e].addressModeV)}setTransform(t){let e=this.texture;this.transform.copyFrom(t),this.transform.invert(),this.transform.scale(1/e.frame.width,1/e.frame.height),this._styleKey=null}get styleKey(){return this._styleKey||(this._styleKey=`fill-pattern-${this.uid}-${this.texture.uid}-${this.transform.toArray().join("-")}`),this._styleKey}}},46185:(t,e,r)=>{"use strict";let i,{SymbolDispose:n}=r(34418),{AbortError:s,codes:o}
282=r(60577),{isNodeStream:a,isWebStream:l,kControllerErrorFunction:h}=r(71343),u=r(86650),{ERR_INVALID_ARG_TYPE:d}=o;t.exports.addAbortSignal=function(e,r){if("object"!=typeof e||!("aborted"in e))throw new d("signal","AbortSignal",e);if(!a(r)&&!l(r))throw new d("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(t,e){if("object"!=typeof t||!("aborted"in t))return e;let o=a(e)?()=>{e.destroy(new s(void 0,{cause:t.reason}))}:()=>{e[h](new s(void 0,{cause:t.reason}))};return t.aborted?o():u(e,(i=i||r(43006).addAbortListener)(t,o)[n]),e}},46480:(t,e,r)=>{"use strict";r.d(e,{g:()=>v});var i=r(66888),n=r(19677);let s=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],o=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],a=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],l=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],h=[],u=[],d=Math.sign;!function(){for(let t=0;t<16;t++){let e=[];h.push(e);for(let r=0;r<16;r++){let i=d(s[t]*s[r]+a[t]*o[r]),n=d(o[t]*s[r]+l[t]*o[r]),h=d(s[t]*a[r]+a[t]*l[r]),u=d(o[t]*a[r]+l[t]*l[r]);for(let t=0;t<16;t++)if(s[t]===i&&o[t]===n&&a[t]===h&&l[t]===u){e.push(t);break}}}for(let t=0;t<16;t++){let e=new n.u;e.set(s[t],o[t],a[t],l[t],0,0),u.push(e)}}();let c={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:t=>s[t],uY:t=>o[t],vX:t=>a[t],vY:t=>l[t],inv:t=>8&t?15&t:7&-t,add:(t,e)=>h[t][e],sub:(t,e)=>h[t][c.inv(e)],rotate180:t=>4^t,isVertical:t=>(3&t)==2,byDirection:(t,e)=>2*Math.abs(t)<=Math.abs(e)?e>=0?c.S:c.N:2*Math.abs(e)<=Math.abs(t)?t>0?c.E:c.W:e>0?t>0?c.SE:c.SW:t>0?c.NE:c.NW,matrixAppendRotationInv:(t,e,r=0,i=0)=>{let n=u[c.inv(e)];n.tx=r,n.ty=i,t.append(n)}};var f=r(16434),p=r(44571),g=r(70242);let m=()=>{};var y=r(26709),b=r(28513),_=r(82646);class v extends i.A{constructor({source:t,label:e,frame:r,orig:i,trim:n,defaultAnchor:s,defaultBorders:o,rotate:a,dynamic:l}={}){if(super(),this.uid=(0,p.L)("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new f.M,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=e,this.source=t?.source??new b.v,this.noFrame=!r,r)this.frame.copyFrom(r);else{const{width:t,height:e}=this._source;this.frame.width=t,this.frame.height=e}this.orig=i||this.frame,this.trim=n,this.rotate=a??0,this.defaultAnchor=s,this.defaultBorders=o,this.destroyed=!1,this.dynamic=l||!1,this.updateUvs()}set source(t){this._source&&this._source.off("resize",this.update,this),this._source=t,t.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new _.N(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){let{uvs:t,frame:e}=this,{width:r,height:i}=this._source,n=e.x/r,s=e.y/i,o=e.width/r,a=e.height/i,l=this.rotate;if(l){let e=o/2,r=a/2,i=n+e,h=s+r;l=c.add(l,c.NW),t.x0=i+e*c.uX(l),t.y0=h+r*c.uY(l),l=c.add(l,2),t.x1=i+e*c.uX(l),t.y1=h+r*c.uY(l),l=c.add(l,2),t.x2=i+e*c.uX(l),t.y2=h+r*c.uY(l),l=c.add(l,2),t.x3=i+e*c.uX(l),t.y3=h+r*c.uY(l)}else t.x0=n,t.y0=s,t.x1=n+o,t.y1=s,t.x2=n+o,t.y2=s+a,t.x3=n,t.y3=s+a}destroy(t=!1){this._source&&t&&(this._source.destroy(),this._source=null),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return(0,g.t6)(g.lj,"Texture.baseTexture is now Texture.source"),this._source}}v.EMPTY=new v({label:"EMPTY",source:new b.v({label:"EMPTY"})}),v.EMPTY.destroy=m,v.WHITE=new v({source:new y.P({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"}),v.WHITE.destroy=m},46508:(t,e,r)=>{"use strict";r.d(e,{k:()=>g});var i=r(73608),n=r(34943);let s=[];async function o(t){if(!t)for(let t=0;t<s.length;t++){let e=s[t];if(e.value.test())return void await e.value.load()}}n.XO.handleByNamedList(n.Ag.Environment,s);var a=r(3092),l=r(50301),h=r(70242),u=r(81935),d=r(98471),c=r(66888);let f=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","render
282Start","render","update","postrender","prerender"],p=class t extends c.A{constructor(t){super(),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name,this.config=t;const e=[...f,...this.config.runners??[]];this._addRunners(...e),this._unsafeEvalCheck()}async init(e={}){let r=!0===e.skipExtensionImports||!1===e.manageImports;for(let t in await o(r),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors),this._systemsHash)e={...this._systemsHash[t].constructor.defaultOptions,...e};e={...t.defaultOptions,...e},this._roundPixels=+!!e.roundPixels;for(let t=0;t<this.runners.init.items.length;t++)await this.runners.init.items[t].init(e);this._initOptions=e}render(t,e){let r=t;if(r instanceof a.mc&&(r={container:r},e&&((0,h.t6)(h.lj,"passing a second argument is deprecated, please use render options instead"),r.target=e.renderTexture)),r.target||(r.target=this.view.renderTarget),r.target===this.view.renderTarget&&(this._lastObjectRendered=r.container,r.clearColor??(r.clearColor=this.background.colorRgba),r.clear??(r.clear=this.background.clearBeforeRender)),r.clearColor){let t=Array.isArray(r.clearColor)&&4===r.clearColor.length;r.clearColor=t?r.clearColor:i.Q.shared.setValue(r.clearColor).toArray()}r.transform||(r.container.updateLocalTransform(),r.transform=r.container.localTransform),r.container.enableRenderGroup(),this.runners.prerender.emit(r),this.runners.renderStart.emit(r),this.runners.render.emit(r),this.runners.renderEnd.emit(r),this.runners.postrender.emit(r)}resize(t,e,r){let i=this.view.resolution;this.view.resize(t,e,r),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),void 0!==r&&r!==i&&this.runners.resolutionChange.emit(r)}clear(t={}){t.target||(t.target=this.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=u.u.ALL);let{clear:e,clearColor:r,target:n}=t;i.Q.shared.setValue(r??this.background.colorRgba),this.renderTarget.clear(n,e,i.Q.shared.toArray())}get resolution(){return this.view.resolution}set resolution(t){this.view.resolution=t,this.runners.resolutionChange.emit(t)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...t){t.forEach(t=>{this.runners[t]=new d.C(t)})}_addSystems(t){let e;for(e in t){let r=t[e];this._addSystem(r.value,r.name)}}_addSystem(t,e){let r=new t(this);if(this[e])throw Error(`Whoops! The name "${e}" is already in use`);for(let t in this[e]=r,this._systemsHash[e]=r,this.runners)this.runners[t].add(r);return this}_addPipes(t,e){let r=e.reduce((t,e)=>(t[e.name]=e.value,t),{});t.forEach(t=>{let e=t.value,i=t.name,n=r[i];this.renderPipes[i]=new e(this,n?new n:null)})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash=null,this.renderPipes=null}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!(0,l.f)())throw Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};p.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let g=p},46915:(t,e,r)=>{"use strict";r.d(e,{M:()=>s,d:()=>o});var i=r(34943),n=r(8483);class s{static init(){globalThis.__PIXI_APP_INIT__?.(this,n.xv)}static destroy(){}}s.extension=i.Ag.Application;class o{constructor(t){this._renderer=t}init(){globalThis.__PIXI_RENDERER_INIT__?.(this._renderer,n.xv)}destroy(){this._renderer=null}}o.extension={type:[i.Ag.WebGLSystem,i.Ag.WebGPUSystem],name:"initHook",priority:-10}},47299:(t,e,r)=>{"use strict";
282let i=globalThis.AbortController||r(30214).AbortController,{codes:{ERR_INVALID_ARG_VALUE:n,ERR_INVALID_ARG_TYPE:s,ERR_MISSING_ARGS:o,ERR_OUT_OF_RANGE:a},AbortError:l}=r(60577),{validateAbortSignal:h,validateInteger:u,validateObject:d}=r(72639),c=r(34418).Symbol("kWeak"),f=r(34418).Symbol("kResistStopPropagation"),{finished:p}=r(86650),g=r(530),{addAbortSignalNoValidate:m}=r(46185),{isWritable:y,isNodeStream:b}=r(71343),{deprecate:_}=r(43006),{ArrayPrototypePush:v,Boolean:x,MathFloor:w,Number:A,NumberIsNaN:S,Promise:T,PromiseReject:C,PromiseResolve:E,PromisePrototypeThen:k,Symbol:M}=r(34418),B=M("kEmpty"),P=M("kEof");function I(t,e){if("function"!=typeof t)throw new s("fn",["Function","AsyncFunction"],t);null!=e&&d(e,"options"),(null==e?void 0:e.signal)!=null&&h(e.signal,"options.signal");let i=1;(null==e?void 0:e.concurrency)!=null&&(i=w(e.concurrency));let n=i-1;return(null==e?void 0:e.highWaterMark)!=null&&(n=w(e.highWaterMark)),u(i,"options.concurrency",1),u(n,"options.highWaterMark",0),n+=i,(async function*(){let s,o,a=r(43006).AbortSignalAny([null==e?void 0:e.signal].filter(x)),h=this,u=[],d={signal:a},c=!1,f=0;function p(){c=!0,g()}function g(){f-=1,m()}function m(){o&&!c&&f<i&&u.length<n&&(o(),o=null)}!async function(){try{for await(let e of h){if(c)return;if(a.aborted)throw new l;try{if((e=t(e,d))===B)continue;e=E(e)}catch(t){e=C(t)}f+=1,k(e,g,p),u.push(e),s&&(s(),s=null),!c&&(u.length>=n||f>=i)&&await new T(t=>{o=t})}u.push(P)}catch(e){let t=C(e);k(t,g,p),u.push(t)}finally{c=!0,s&&(s(),s=null)}}();try{for(;;){for(;u.length>0;){let t=await u[0];if(t===P)return;if(a.aborted)throw new l;t!==B&&(yield t),u.shift(),m()}await new T(t=>{s=t})}}finally{c=!0,o&&(o(),o=null)}}).call(this)}async function R(t,e){for await(let r of U.call(this,t,e))return!0;return!1}async function L(t,e){if("function"!=typeof t)throw new s("fn",["Function","AsyncFunction"],t);return!await R.call(this,async(...e)=>!await t(...e),e)}async function O(t,e){for await(let r of U.call(this,t,e))return r}async function F(t,e){if("function"!=typeof t)throw new s("fn",["Function","AsyncFunction"],t);async function r(e,r){return await t(e,r),B}for await(let t of I.call(this,r,e));}function U(t,e){if("function"!=typeof t)throw new s("fn",["Function","AsyncFunction"],t);async function r(e,r){return await t(e,r)?e:B}return I.call(this,r,e)}class D extends o{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function N(t,e,r){var n,o;if("function"!=typeof t)throw new s("reducer",["Function","AsyncFunction"],t);null!=r&&d(r,"options"),(null==r?void 0:r.signal)!=null&&h(r.signal,"options.signal");let a=arguments.length>1;if(null!=r&&null!=(n=r.signal)&&n.aborted){let t=new l(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await p(this.destroy(t)),t}let u=new i,g=u.signal;null!=r&&r.signal&&r.signal.addEventListener("abort",()=>u.abort(),{once:!0,[c]:this,[f]:!0});let m=!1;try{for await(let i of this){if(m=!0,null!=r&&null!=(o=r.signal)&&o.aborted)throw new l;a?e=await t(e,i,{signal:g}):(e=i,a=!0)}if(!m&&!a)throw new D}finally{u.abort()}return e}async function z(t){null!=t&&d(t,"options"),(null==t?void 0:t.signal)!=null&&h(t.signal,"options.signal");let e=[];for await(let i of this){var r;if(null!=t&&null!=(r=t.signal)&&r.aborted)throw new l(void 0,{cause:t.signal.reason});v(e,i)}return e}function j(t){if(S(t=A(t)))return 0;if(t<0)throw new a("number",">= 0",t);return t}t.exports.streamReturningOperators={asIndexedPairs:_(function(t){return null!=t&&d(t,"options"),(null==t?void 0:t.signal)!=null&&h(t.signal,"options.signal"),(async function*(){let e=0;for await(let i of this){var r;if(null!=t&&null!=(r=t.signal)&&r.aborted)throw new l({cause:t.signal.reason});yield[e++,i]}}).call(this)},"readable.asIndexedPairs will be removed in a future version."),drop:function(t,e){return null!=e&&d(e,"options"),(null==e?void 0:e.signal)!=null&&h(e.signal,"options.signal"),t=j(t),(async function*(){var r,i;if(null!=e&&null!=(r=e.signal)&&r.aborted)throw new l;for await(let r of this){if(null!=e&&null!=(i=e.signal)&&i.aborted)throw new l;t--<=0&&(yield r)}}).call(this)},filter:U,flatMap:function(t,e){let r=I.call(this,t,e);return(async function*(){for await(let t of r)yield*t}).call(this)},map:I,take:function(t,e){return null!=e&&d(e,"options"),(null==e?void 0:e.signal)!=null&&h(e.signal,"options.signal"),t=j(t),(async function*(){var r,i;if(null!=e&&null!=(r=e.signal)&&r.aborted)throw new l;for await(let r of this){if(null!=e&&null!=(i=e.signal)&&i.aborted)throw new l;if(t-- >0&&(yield r),t<=0)return}}).call(this)},compose:function(t,e){if(null!=e&&d(e,"options"),(null==e?void 0:e.signal)!=null&&h(e.signal,"options.signal"),b(t)&&!y(t))throw new n("stream",t,"must be writable");let r=g(this,t);return null!=e&&e.signal&&m(e.signal,r),r}},t.exports.promiseReturningOperators={every:L,forEach:F,reduce:N,toArray:z,some:R,find:O}},47397:(t,e,r)=>{"use strict";r.d(e,{e:()=>n});let i={createCanvas:(t,e)=>{let r=document.createElement("canvas");return r.width=t,r.height=e,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")},n={get:()=>i,set(t){i=t}}},48342:(t,e,r)=>{"use strict";r.d(e,{T:()=>c,w:()=>d});var i=r(73608),n=r(46480),s=r(22732),o=r(46120);function a(t){return t instanceof o.m}function l(t){return t instanceof s._}function h(t,e,r){return t.fill=e,t.color=0xffffff,t.texture=e.texture,t.matrix=e.transform,{...r,...t}}function u(t,e,r){return e.buildGradient(),t.fill=e,t.color=0xffffff,t.texture=e.texture,t.matrix=e.transform,t.textureSpace
282=e.textureSpace,{...r,...t}}function d(t,e){let r,s;if(null==t)return null;let o={};if(i.Q.isColorLike(t)){let r;return o.color=(r=i.Q.shared.setValue(t??0)).toNumber(),o.alpha=1===r.alpha?e.alpha:r.alpha,o.texture=n.g.WHITE,{...e,...o}}if(t instanceof n.g)return o.texture=t,{...e,...o};if(a(t))return h(o,t,e);if(l(t))return u(o,t,e);else if(t.fill&&a(t.fill))return h(t,t.fill,e);else if(t.fill&&l(t.fill))return u(t,t.fill,e);return r={...e,...t},s=i.Q.shared.setValue(r.color),r.alpha*=s.alpha,r.color=s.toNumber(),r}function c(t,e){let{width:r,alignment:i,miterLimit:n,cap:s,join:o,pixelLine:a,...l}=e,h=d(t,l);return h?{width:r,alignment:i,miterLimit:n,cap:s,join:o,pixelLine:a,...h}:null}},50098:(t,e,r)=>{"use strict";r.d(e,{G:()=>o});var i=r(19677),n=r(14920);let s=new i.u;class o{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){let t=this.baseColor,e=t>>16|65280&t|(255&t)<<16,r=this.renderable;return r?(0,n.u)(e,r.groupColor)+(this.alpha*r.groupAlpha*255<<24):e+(255*this.alpha<<24)}get transform(){return this.renderable?.groupTransform||s}copyTo(t){t.indexOffset=this.indexOffset,t.indexSize=this.indexSize,t.attributeOffset=this.attributeOffset,t.attributeSize=this.attributeSize,t.baseColor=this.baseColor,t.alpha=this.alpha,t.texture=this.texture,t.geometryData=this.geometryData,t.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}}},50121:(t,e,r)=>{"use strict";r.d(e,{i:()=>n});var i=r(99359);function n(t,e){return"no-premultiply-alpha"===e.alphaMode&&i.Q[t]||t}},50301:(t,e,r)=>{"use strict";let i;function n(){if("boolean"==typeof i)return i;try{let t=Function("param1","param2","param3","return param1[param2] === param3;");i=!0===t({a:"b"},"a","b")}catch(t){i=!1}return i}r.d(e,{f:()=>n})},50461:(t,e,r)=>{"use strict";r.d(e,{Ek:()=>o,fB:()=>s});var i=r(19677),n=r(32974);function s(t,e,r){let s,a;return r.clear(),s=t.parent?e?t.parent.worldTransform:o(t,a=n.u.get().identity()):i.u.IDENTITY,function t(e,r,s,o){let a;if(!e.visible||!e.measurable)return;o?a=e.worldTransform:(e.updateLocalTransform(),(a=n.u.get()).appendFrom(e.localTransform,s));let l=r,h=!!e.effects.length;if(h&&(r=n.o.get().clear()),e.boundsArea)r.addRect(e.boundsArea,a);else{e.bounds&&(r.matrix=a,r.addBounds(e.bounds));for(let i=0;i<e.children.length;i++)t(e.children[i],r,a,o)}if(h){for(let t=0;t<e.effects.length;t++)e.effects[t].addBounds?.(r);l.addBounds(r,i.u.IDENTITY),n.o.return(r)}o||n.u.return(a)}(t,r,s,e),a&&n.u.return(a),r.isValid||r.set(0,0,0,0),r}function o(t,e){let r=t.parent;return r&&(o(r,e),r.updateLocalTransform(),e.append(r.localTransform)),e}},52039:(t,e,r)=>{"use strict";let{MathFloor:i,NumberIsInteger:n}=r(34418),{validateInteger:s}=r(72639),{ERR_INVALID_ARG_VALUE:o}=r(60577).codes,a=16384,l=16;function h(t){return t?l:a}t.exports={getHighWaterMark:function(t,e,r,s){let a=null!=e.highWaterMark?e.highWaterMark:s?e[r]:null;if(null!=a){if(!n(a)||a<0)throw new o(s?`options.${r}`:"options.highWaterMark",a);return i(a)}return h(t.objectMode)},getDefaultHighWaterMark:h,setDefaultHighWaterMark:function(t,e){s(e,"value",0),t?l=e:a=e}}},52165:(t,e,r)=>{"use strict";r.d(e,{a:()=>i});let i=t=>!Array.isArray(t)},52819:(t,e,r)=>{"use strict";r.d(e,{h:()=>o});var i=r(66888),n=r(44571),s=r(30204);class o extends i.A{constructor(t){let{data:e,size:r}=t;const{usage:i,label:s,shrinkToFit:o}=t;super(),this.uid=(0,n.L)("buffer"),this._resourceType="buffer",this._resourceId=(0,n.L)("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,e instanceof Array&&(e=new Float32Array(e)),this._data=e,r??(r=e?.byteLength);const a=!!e;this.descriptor={size:r,usage:i,mappedAtCreation:a,label:s},this.shrinkToFit=o??!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&s.S.STATIC)}set static(t){t?this.descriptor.usage|=s.S.STATIC:this.descriptor.usage&=~s.S.STATIC}setDataWithSize(t,e,r){if(this._updateID++,this._updateSize=e*t.BYTES_PER_ELEMENT,this._data===t){r&&this.emit
282("update",this);return}let i=this._data;(this._data=t,this._dataInt32=null,i&&i.length===t.length)?r&&this.emit("update",this):!this.shrinkToFit&&i&&t.byteLength<i.byteLength?r&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=(0,n.L)("resource"),this.emit("change",this))}update(t){this._updateSize=t??this._updateSize,this._updateID++,this.emit("update",this)}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}},53670:(t,e,r)=>{"use strict";r.d(e,{R:()=>n});let i=0;function n(...t){500!==i&&(500==++i?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...t))}},53934:(t,e,r)=>{"use strict";r.d(e,{n:()=>l});var i=r(66888),n=r(44571),s=r(70242);let o=Object.create(null),a=class t extends i.A{constructor(e={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,e={...t.defaultOptions,...e},this.addressMode=e.addressMode,this.addressModeU=e.addressModeU??this.addressModeU,this.addressModeV=e.addressModeV??this.addressModeV,this.addressModeW=e.addressModeW??this.addressModeW,this.scaleMode=e.scaleMode,this.magFilter=e.magFilter??this.magFilter,this.minFilter=e.minFilter??this.minFilter,this.mipmapFilter=e.mipmapFilter??this.mipmapFilter,this.lodMinClamp=e.lodMinClamp,this.lodMaxClamp=e.lodMaxClamp,this.compare=e.compare,this.maxAnisotropy=e.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){(0,s.t6)(s.lj,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this.emit("change",this),this._sharedResourceId=null}_generateResourceId(){let t,e=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=(void 0===(t=o[e])&&(o[e]=(0,n.L)("resource")),t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};a.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let l=a},56809:(t,e,r)=>{"use strict";r.d(e,{n:()=>s});var i=r(19677),n=r(32974);function s(t,e,r){return e.clear(),r||(r=i.u.IDENTITY),function t(e,r,s,o,a){let l;if(a)l=n.u.get(),l=s.copyTo(l);else{if(!e.visible||!e.measurable)return;e.updateLocalTransform();let t=e.localTransform;(l=n.u.get()).appendFrom(t,s)}let h=r,u=!!e.effects.length;if(u&&(r=n.o.get().clear()),e.boundsArea)r.addRect(e.boundsArea,l);else{e.renderPipeId&&(r.matrix=l,r.addBounds(e.bounds));let i=e.children;for(let e=0;e<i.length;e++)t(i[e],r,l,o,!1)}if(u){for(let t=0;t<e.effects.length;t++)e.effects[t].addLocalBounds?.(r,o);h.addBounds(r,i.u.IDENTITY),n.o.return(r)}n.u.return(l)}(t,e,r,t,!0),e.isValid||e.set(0,0,0,0),e}},57391:(t,e,r)=>{"use strict";r.d(e,{T:()=>n});var i,n=((i=n||{})[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i)},57714:(t,e,r)=>{"use strict";let i=r(37811),n=r(96244),{isReadable:s,isWritable:o,isIterable:a,isNodeStream:l,isReadableNodeStream:h,isWritableNodeStream:u,isDuplexNodeStream:d,isReadableStream:c,isWritableStream:f}=r(71343),p=r(86650),{AbortError:g,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:y}}=r(60577),{destroyer:b}=r(67436),_=r(20140),v=r(9138),x=r(7926),{createDeferredPromise:w}=r(43006),A=r(62606),S=globalThis.Blob||n.Blob,T=void 0!==S?function(t){return t instanceof S}:function(t){return!1},C=globalThis.AbortController||r(30214).AbortController,{FunctionPrototypeCall:E}=r(34418);class k extends _{constructor(t){super(t),(null==t?void 0:t.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(null==t?void 0:t.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function M(t){let e,r,i,n,a,l=t.readable&&"function"!=typeof t.readable.read?v.wrap(t.readable):t.readable,h=t.writable,u=!!s(l),d=!!o(h);function c(t){let e=n;n=null,e?e(t):t&&a.destroy(t)}return a=new k({readableObjectMode:!!(null!=l&&l.readableObjectMode),writableObjectMode:!!(null!=h&&h.writableObjectMode),readable:u,writable:d}),d&&(p(h,t=>{d=!1,t&&b(l,t),c(t)}),a._write=function(t,r,i){h.write(t,r)?i():e=i},a._final=function(t){h.end(),r=t},h.on("drain",function(){if(e){let t=e;e=null,t()}}),h.on("finish",function(){if(r){let t=r;r=null,t()}})),u&&(p(l,t=>{u=!1,t&&b(l,t),c(t)}),l.on("readable",function(){if(i){let t=i;i=null,t()}}),l.on("end",function(){a.push(null)}),a._read=function(){for(;;){let t=l.read();if(null===t){i=a._read;return}if(!a.push(t))return}}),a._destroy=function(t,s){t||null===n||(t=new g),i=null,e=null,r=null,null===n?s(t):(n=s,b(h,t),b(l,t))},a}t.exports=function t(e,r){if(d(e))return e;if(h(e))return M({readable:e});if(u(e))return M({writable:e});if(l(e))return M({writable:!1,readable:!1});if(c(e))return M({readable:v.fromWeb(e)});if(f(e))return M({writable:x.fromWeb(e)});if("function"==typeof e){let{value:t,write:n,final:s,destroy:o}=function(t){let{promise:e,resolve:r}=w(),n=new C,s=n.signal;return{value:t(async function*(){for(;;){let t=e;e=null;let{chunk:n,done:o,cb:a}=await t;if(i.nextTick(a),o)return;if(s.aborted)throw new g(void 0,{cause:s.reason});({promise:e,resolve:r}=w()),yield n}}(),{signal:s}),write(t,e,i){let n=r;r=null,n({chunk:t,done:!1,cb:i})},final(t){let e=r;r=null,e({done:!0,cb:t})},destroy(t,e){n.abort(),e(t)}
282}}(e);if(a(t))return A(k,t,{objectMode:!0,write:n,final:s,destroy:o});let l=null==t?void 0:t.then;if("function"==typeof l){let e,r=E(l,t,t=>{if(null!=t)throw new y("nully","body",t)},t=>{b(e,t)});return e=new k({objectMode:!0,readable:!1,write:n,final(t){s(async()=>{try{await r,i.nextTick(t,null)}catch(e){i.nextTick(t,e)}})},destroy:o})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,t)}if(T(e))return t(e.arrayBuffer());if(a(e))return A(k,e,{objectMode:!0,writable:!1});if(c(null==e?void 0:e.readable)&&f(null==e?void 0:e.writable))return k.fromWeb(e);if("object"==typeof(null==e?void 0:e.writable)||"object"==typeof(null==e?void 0:e.readable))return M({readable:null!=e&&e.readable?h(null==e?void 0:e.readable)?null==e?void 0:e.readable:t(e.readable):void 0,writable:null!=e&&e.writable?u(null==e?void 0:e.writable)?null==e?void 0:e.writable:t(e.writable):void 0});let n=null==e?void 0:e.then;if("function"==typeof n){let t;return E(n,e,e=>{null!=e&&t.push(e),t.push(null)},e=>{b(t,e)}),t=new k({objectMode:!0,writable:!1,read(){}})}throw new m(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)}},57737:(t,e)=>{e.read=function(t,e,r,i,n){var s,o,a=8*n-i-1,l=(1<<a)-1,h=l>>1,u=-7,d=r?n-1:0,c=r?-1:1,f=t[e+d];for(d+=c,s=f&(1<<-u)-1,f>>=-u,u+=a;u>0;s=256*s+t[e+d],d+=c,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=i;u>0;o=256*o+t[e+d],d+=c,u-=8);if(0===s)s=1-h;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),s-=h}return(f?-1:1)*o*Math.pow(2,s-i)},e.write=function(t,e,r,i,n,s){var o,a,l,h=8*s-n-1,u=(1<<h)-1,d=u>>1,c=5960464477539062e-23*(23===n),f=i?0:s-1,p=i?1:-1,g=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(a=+!!isNaN(e),o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?e+=c/l:e+=c*Math.pow(2,1-d),e*l>=2&&(o++,l/=2),o+d>=u?(a=0,o=u):o+d>=1?(a=(e*l-1)*Math.pow(2,n),o+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;t[r+f]=255&a,f+=p,a/=256,n-=8);for(o=o<<n|a,h+=n;h>0;t[r+f]=255&o,f+=p,o/=256,h-=8);t[r+f-p]|=128*g}},60018:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});let i=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function n(t){let e="number"==typeof t.fontSize?`${t.fontSize}px`:t.fontSize,r=t.fontFamily;Array.isArray(t.fontFamily)||(r=t.fontFamily.split(","));for(let t=r.length-1;t>=0;t--){let e=r[t].trim();/([\"\'])[^\'\"]+\1/.test(e)||i.includes(e)||(e=`"${e}"`),r[t]=e}return`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${e} ${r.join(",")}`}},60175:(t,e,r)=>{"use strict";r.d(e,{a:()=>s});var i=r(79662);let n=null;function s(){if(n)return n;let t=(0,i.W)();return n=function(t,e){if(0===t)throw Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");let r=e.createShader(e.FRAGMENT_SHADER);try{for(;;){let i="precision mediump float;\nvoid main(void){\nfloat test = 0.1;\n%forloop%\ngl_FragColor = vec4(0.0);\n}".replace(/%forloop%/gi,function(t){let e="";for(let r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+=`if(test == ${r}.0){}`);return e}(t));if(e.shaderSource(r,i),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS))break;t=t/2|0}}finally{e.deleteShader(r)}return t}(n=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),t),t.getExtension("WEBGL_lose_context")?.loseContext(),n}},60577:(t,e,r)=>{"use strict";let{format:i,inspect:n,AggregateError:s}=r(43006),o=globalThis.AggregateError||s,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],h=/^([A-Z][a-z0-9]*)+$/,u={};function d(t,e){if(!t)throw new u.ERR_INTERNAL_ASSERTION(e)}function c(t){let e="",r=t.length,i=+("-"===t[0]);for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function f(t,e,r){r||(r=Error);class n extends r{constructor(...r){super(function(t,e,r){if("function"==typeof e)return d(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return(d(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),0===r.length)?e:i(e,...r)}(t,e,r))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,
282configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[a]=!0,u[t]=n}function p(t){let e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t}class g extends Error{constructor(t="The operation was aborted",e){if(void 0!==e&&"object"!=typeof e)throw new u.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}}f("ERR_ASSERTION","%s",Error),f("ERR_INVALID_ARG_TYPE",(t,e,r)=>{d("string"==typeof t,"'name' must be a string"),Array.isArray(e)||(e=[e]);let i="The ";t.endsWith(" argument")?i+=`${t} `:i+=`"${t}" ${t.includes(".")?"property":"argument"} `,i+="must be ";let s=[],o=[],a=[];for(let t of e)d("string"==typeof t,"All expected entries have to be of type string"),l.includes(t)?s.push(t.toLowerCase()):h.test(t)?o.push(t):(d("object"!==t,'The value "object" should be written as "Object"'),a.push(t));if(o.length>0){let t=s.indexOf("object");-1!==t&&(s.splice(s,t,1),o.push("Object"))}if(s.length>0){switch(s.length){case 1:i+=`of type ${s[0]}`;break;case 2:i+=`one of type ${s[0]} or ${s[1]}`;break;default:{let t=s.pop();i+=`one of type ${s.join(", ")}, or ${t}`}}(o.length>0||a.length>0)&&(i+=" or ")}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;
282default:{let t=o.pop();i+=`an instance of ${o.join(", ")}, or ${t}`}}a.length>0&&(i+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(i+="an "),i+=`${a[0]}`;break;case 2:i+=`one of ${a[0]} or ${a[1]}`;break;default:{let t=a.pop();i+=`one of ${a.join(", ")}, or ${t}`}}if(null==r)i+=`. Received ${r}`;else if("function"==typeof r&&r.name)i+=`. Received function ${r.name}`;else if("object"==typeof r){var u;if(null!=(u=r.constructor)&&u.name)i+=`. Received an instance of ${r.constructor.name}`;else{let t=n(r,{depth:-1});i+=`. Received ${t}`}}else{let t=n(r,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),i+=`. Received type ${typeof r} (${t})`}return i},TypeError),f("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let i=n(e);i.length>128&&(i=i.slice(0,128)+"...");let s=t.includes(".")?"property":"argument";return`The ${s} '${t}' ${r}. Received ${i}`},TypeError),f("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var i;let n=null!=r&&null!=(i=r.constructor)&&i.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${n}.`},TypeError),f("ERR_MISSING_ARGS",(...t)=>{let e;d(t.length>0,"At least one arg needs to be specified");let r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(t=>`"${t}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let r=t.pop();e+=`The ${t.join(", ")}, and ${r} arguments`}}return`${e} must be specified`},TypeError),f("ERR_OUT_OF_RANGE",(t,e,r)=>{let i;return d(e,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>0x100000000?i=c(String(r)):"bigint"==typeof r?(i=String(r),(r>2n**32n||r<-(2n**32n))&&(i=c(i)),i+="n"):i=n(r),`The value of "${t}" is out of range. It must be ${e}. Received ${i}`},RangeError),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),f("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),f("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),f("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),f("ERR_STREAM_WRITE_AFTER_END","write after end",Error),f("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exp
282orts={AbortError:g,aggregateTwoErrors:p(function(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new o([e,t],e.message);return r.code=e.code,r}return t||e}),hideStackFrames:p,codes:u}},60687:(t,e,r)=>{"use strict";r.d(e,{B:()=>u});var i,n=r(32816),s=r(68176);let o={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"};function a(t){let e=/@group\((\d+)\)/,r=/@binding\((\d+)\)/,i=/var(<[^>]+>)? (\w+)/,n=/:\s*(\w+)/,s=/(\w+)\s*:\s*([\w\<\>]+)/g,o=/struct\s+(\w+)/,a=t.match(/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g)?.map(t=>({group:parseInt(t.match(e)[1],10),binding:parseInt(t.match(r)[1],10),name:t.match(i)[2],isUniform:"<uniform>"===t.match(i)[1],type:t.match(n)[1]}));if(!a)return{groups:[],structs:[]};let l=t.match(/struct\s+(\w+)\s*{([^}]+)}/g)?.map(t=>{let e=t.match(o)[1],r=t.match(s).reduce((t,e)=>{let[r,i]=e.split(":");return t[r.trim()]=i.trim(),t},{});return r?{name:e,members:r}:null}).filter(({name:t})=>a.some(e=>e.type===t))??[];return{groups:a,structs:l}}var l=((i=l||{})[i.VERTEX=1]="VERTEX",i[i.FRAGMENT=2]="FRAGMENT",i[i.COMPUTE=4]="COMPUTE",i);let h=Object.create(null);class u{constructor(t){this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:e,vertex:r,layout:i,gpuLayout:n,name:s}=t;if(this.name=s,this.fragment=e,this.vertex=r,e.source===r.source){const t=a(e.source);this.structsAndGroups=t}else{const t=a(r.source),i=a(e.source);this.structsAndGroups=function(t,e){let r=new Set,i=new Set;return{structs:[...t.structs,...e.structs].filter(t=>!r.has(t.name)&&(r.add(t.name),!0)),groups:[...t.groups,...e.groups].filter(t=>{let e=`${t.name}-${t.binding}`;return!i.has(e)&&(i.add(e),!0)})}}(t,i)}this.layout=i??function({groups:t}){let e=[];for(let r=0;r<t.length;r++){let i=t[r];e[i.group]||(e[i.group]={}),e[i.group][i.name]=i.binding}return e}(this.structsAndGroups),this.gpuLayout=n??function({groups:t}){let e=[];for(let r=0;r<t.length;r++){let i=t[r];e[i.group]||(e[i.group]=[]),i.isUniform?e[i.group].push({binding:i.binding,visibility:l.VERTEX|l.FRAGMENT,buffer:{type:"uniform"}}):"sampler"===i.type?e[i.group].push({binding:i.binding,visibility:l.FRAGMENT,sampler:{type:"filtering"}}):"texture_2d"===i.type&&e[i.group].push({binding:i.binding,visibility:l.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}})}return e}(this.structsAndGroups),this.autoAssignGlobalUniforms=this.layout[0]?.globalUniforms!==void 0,this.autoAssignLocalUniforms=this.layout[1]?.localUniforms!==void 0,this._generateProgramKey()}_generateProgramKey(){let{vertex:t,fragment:e}=this,r=t.source+e.source+t.entryPoint+e.entryPoint;this._layoutKey=(0,n.X)(r,"program")}get attributeData(){return this._attributeData??(this._attributeData=function({source:t,entryPoint:e}){let r={},i=t.indexOf(`fn ${e}`);if(-1!==i){let e=t.indexOf("->",i);if(-1!==e){let n,a=t.substring(i,e),l=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|$)/g;for(;null!==(n=l.exec(a));){let t=o[n[3]]??"float32";r[n[2]]={location:parseInt(n[1],10),format:t,stride:(0,s.m)(t).stride,offset:0,instance:!1,start:0}}}}return r}(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null}static from(t){let e=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return h[e]||(h[e]=new u(t)),h[e]}}},62057:(t,e,r)=>{"use strict";r.d(e,{$:()=>l});var i=r(34943),n=r(78128),s=r(42460),o=r(28513);let a=class t extends o.v{constructor(e){super(e),this.isReady=!1,this.uploadMethodId="video",e={...t.defaultOptions,...e},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=!1!==e.autoPlay,this.alphaMode=e.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),!1!==e.autoLoad&&this.load()}
282updateFrame(){if(!this.destroyed){if(this._updateFPS){let t=n.R.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;let t=this.resource,e=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(e.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await (0,s.C)(),this._load=new Promise((r,i)=>{this.isValid?r(this):(this._resolve=r,this._reject=i,void 0!==e.preloadTimeoutMs&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${e.preloadTimeoutMs}ms`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){let t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){let t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();let t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(n.R.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),null===this._videoFrameRequestCallbackHandle&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(null!==this._videoFrameRequestCallbackHandle&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(n.R.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(null!==this._videoFrameRequestCallbackHandle&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(n.R.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};a.extension=i.Ag.TextureSource,a.defaultOptions={...o.v.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},a.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let l=a},62606:(t,e,r)=>{"use strict";let i=r(37811),{PromisePrototypeThen:n,SymbolAsyncIterator:s,SymbolIterator:o}=r(34418),{Buffer:a}=r(96244),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:h}=r(60577).codes;t.exports=function(t,e,r){let u,d;if("string"==typeof e||e instanceof a)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});if(e&&e[s])d=!0,u=e[s]();else if(e&&e[o])d=!1,u=e[o]();else throw new l("iterable",["Iterable"],e);let c=new t({objectMode:!0,highWaterMark:1,...r}),f=!1;async function p(t){let e=null!=t,r="function"==typeof u.throw;if(e&&r){let{value:e,done:r}=await u.throw(t);if(await e,r)return}if("function"==typeof u.return){let{value:t}=await u.return();await t}}async function g(){for(;;){try{let{value:t,done:e}=d?await u.next():u.next();if(e)c.push(null);else{let e=t&&"function"==typeof t.then?await t:t;if(null===e)throw f=!1,new h;if(c.push(e))continue;f=!1}}catch(t){c.destroy(t)}break}}return c._read=function(){f||(f=!0,g())},c._destroy=function(t,e){n(p(t),()=>i.nextTick(e,t),r=>i.nextTick(e,r||t))},c}},63454:(t,e,r)=>{"use strict";r.d(e,{TO:()=>i,Td:()=>s,bO:()=>n});let i=2*Math.PI,n=180/Math.PI,s=Math.PI/180},63800:(t,e,r)=>{"use strict";let i,n;r.d(e,{T:()=>$});
282var s=r(66888),o=r(73608),a=r(19677),l=r(94521),h=r(46480),u=r(44571),d=r(70242),c=r(20060),f=r(53670),p=r(80830),g=r(16434);class m{constructor(t=0,e=0,r=0){this.type="circle",this.x=t,this.y=e,this.radius=r}clone(){return new m(this.x,this.y,this.radius)}contains(t,e){if(this.radius<=0)return!1;let r=this.radius*this.radius,i=this.x-t,n=this.y-e;return i*=i,n*=n,i+n<=r}strokeContains(t,e,r,i=.5){if(0===this.radius)return!1;let n=this.x-t,s=this.y-e,o=this.radius,a=(1-i)*r,l=Math.sqrt(n*n+s*s);return l<=o+a&&l>o-(r-a)}getBounds(t){return t||(t=new g.M),t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=2*this.radius,t.height=2*this.radius,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class y{constructor(t=0,e=0,r=0,i=0){this.type="ellipse",this.x=t,this.y=e,this.halfWidth=r,this.halfHeight=i}clone(){return new y(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,e){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let r=(t-this.x)/this.halfWidth,i=(e-this.y)/this.halfHeight;return r*=r,i*=i,r+i<=1}strokeContains(t,e,r,i=.5){let{halfWidth:n,halfHeight:s}=this;if(n<=0||s<=0)return!1;let o=r*(1-i),a=r-o,l=n-a,h=s-a,u=n+o,d=s+o,c=t-this.x,f=e-this.y;return c*c/(l*l)+f*f/(h*h)>1&&c*c/(u*u)+f*f/(d*d)<=1}getBounds(t){return t||(t=new g.M),t.x=this.x-this.halfWidth,t.y=this.y-this.halfHeight,t.width=2*this.halfWidth,t.height=2*this.halfHeight,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}class b{constructor(...t){this.type="polygon";let e=Array.isArray(t[0])?t[0]:t;if("number"!=typeof e[0]){const t=[];for(let r=0,i=e.length;r<i;r++)t.push(e[r].x,e[r].y);e=t}this.points=e,this.closePath=!0}isClockwise(){let t=0,e=this.points,r=e.length;for(let i=0;i<r;i+=2){let n=e[i],s=e[i+1];t+=(e[(i+2)%r]-n)*(e[(i+3)%r]+s)}return t<0}containsPolygon(t){let e=this.getBounds(i),r=t.getBounds(n);if(!e.containsRect(r))return!1;let s=t.points;for(let t=0;t<s.length;t+=2){let e=s[t],r=s[t+1];if(!this.contains(e,r))return!1}return!0}clone(){let t=new b(this.points.slice());return t.closePath=this.closePath,t}contains(t,e){let r=!1,i=this.points.length/2;for(let n=0,s=i-1;n<i;s=n++){let i=this.points[2*n],o=this.points[2*n+1],a=this.points[2*s],l=this.points[2*s+1];o>e!=l>e&&t<(e-o)/(l-o)*(a-i)+i&&(r=!r)}return r}strokeContains(t,e,r,i=.5){let n=r*r,s=n*(1-i),o=n-s,{points:a}=this,l=a.length-2*!this.closePath;for(let r=0;r<l;r+=2){let i=a[r],n=a[r+1],l=a[(r+2)%a.length],h=a[(r+3)%a.length];if(function(t,e,r,i,n,s){let o,a,l=n-r,h=s-i,u=l*l+h*h,d=-1;0!==u&&(d=((t-r)*l+(e-i)*h)/u),d<0?(o=r,a=i):d>1?(o=n,a=s):(o=r+d*l,a=i+d*h);let c=t-o,f=e-a;return c*c+f*f}(t,e,i,n,l,h)<=(0>Math.sign((l-i)*(e-n)-(h-n)*(t-i))?o:s))return!0}return!1}getBounds(t){t||(t=new g.M);let e=this.points,r=1/0,i=-1/0,n=1/0,s=-1/0;for(let t=0,o=e.length;t<o;t+=2){let o=e[t],a=e[t+1];r=o<r?o:r,i=o>i?o:i,n=a<n?a:n,s=a>s?a:s}return t.x=r,t.width=i-r,t.y=n,t.height=s-n,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((t,e)=>`${t}, ${e}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return this.points[this.points.length-2]}get y(){return this.points[this.points.length-1]}}let _=(t,e,r,i,n,s,o)=>{let a=t-r,l=e-i,h=Math.sqrt(a*a+l*l);return h>=n-s&&h<=n+o};class v{constructor(t=0,e=0,r=0,i=0,n=20){this.type="roundedRectangle",this.x=t,this.y=e,this.width=r,this.height=i,this.radius=n}getBounds(t){return t||(t=new g.M),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new v(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(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){let r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(e>=this.y+r&&e<=this.y+this.height-r||t>=this.x+r&&t<=this.x+this.width-r)return!0;let i=t-(this.x+r),n=e-(this.y+r),s=r*r;if(i*i+n*n<=s||(i=t-(this.x+this.width-r))*i+n*n<=s||i*i+(n=e-(this.y+this.height-r))*n<=s||(i=t-(this.x+r))*i+n*n<=s)return!0}return!1}strokeContains(t,e,r,i=.5){let{x:n,y:s,width:o,height:a,radius:l}=this,h=r*(1-i),u=r-h,d=n+l,c=s+l,f=o-2*l,p=a-2*l,g=n+o,m=s+a;return(t>=n-h&&t<=n+u||t>=g-u&&t<=g+h)&&e>=c&&e<=c+p||(e>=s-h&&e<=s+u||e>=m-u&&e<=m+h)&&t>=d&&t<=d+f||t<d&&e<c&&_(t,e,d,c,l,u,h)||t>g-l&&e<c&&_(t,e,g-l,c,l,u,h)||t>g-l&&e>m-l&&_(t,e,g-l,m-l,l,u,h)||t<d&&e>m-l&&_(t,e,d,m-l,l,u,h)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}var x=r(36710);function w(t,e,r,i,n,s,o,a,l,h){var u,d,c;let f=(1-Math.min(.99,Math.max(0,h??x.GH.defaultOptions.bezierSmoothness)))/1;return f*=f,function t(e,r,i,n,s,o,a,l,h,u,d){if(d>8)return;let c=(e+i)/2,f=(r+n)/2,p=(i+s)/2,g=(n+o)/2,m=(s+a)/2,y=(o+l)/2,b=(c+p)/2,_=(f+g)/2,v=(p+m)/2,x=(g+y)/2,w=(b+v)/2,A=(_+x)/2;if(d>0){let t=a-e,d=l-r,c=Math.abs((i-a)*d-(n-l)*t),f=Math.abs((s-a)*d-(o-l)*t);if(c>11920929e-14&&f>11920929e-14){if((c+f)*(c+f)<=u*(t*t+d*d))return void h.push(w,A)}else if(c>11920929e-14){if(c*c<=u*(t*t+d*d))return void h.push(w,A)}else if(f>11920929e-14){if(f*f<=u*(t*t+d*d))return void h.push(w,A)}else if((t=w-(e+a)/2)*t+(d=A-(r+l)/2)*d<=u)return void h.push(w,A)}t(e,r,c,f,b,_,w,A,h,u,d+1),t(w,A,v,x,m,y,a,l,h,u,d+1)}(e,r,i,n,s,o,u=a,d=l,c=t,f,0),c.push(u,d),t}function A(t,e,r,i,n,s,o,a){let l=Math.abs(n-s);!o&&n>s?l=2*Math.PI-l:o&&s>n&&(l=2*Math.PI-l),a||(a=Math.max(6,Math.floor(6*Math.pow(i,1/3)*(l/Math.PI))));let h=l/(a=Math.max(a,3)),u=n;h*=o?-1:1;for(let n=0;n<a+1;n++){let n=e+Math.cos(u)*i,s=r+Math.sin(u)*i;t.push(n,s),u+=h}}let S=2*Math.PI,T={centerX:0,centerY:0,ang1:0,ang2:0},C=({x:t,y:e},r,i,n,s,o,a,l)=>{let h=n*(t*=r)-s*(e*=i),u=s*t+n*e;return l.x=h+o,l.y=u+a,l},E=(t,e,r,i)=>{let n=t*r+e*i;return n>1&&(n=1),n<-1&&(n=-1),(t*i-e*r<0?-1:1)*Math.acos(n)},k=new g.M;class M{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new c.c,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,e){return this.startPoly(t,e),this}lineTo(t,e){this._ensurePoly();let r=this._currentPoly.points,i=r[r.length-2],n=r[r.length-1];return(i!==t||n!==e)&&r.push(t,e),this}arc(t,e,r,i,n,s){return this._ensurePoly(!1),A(this._currentPoly.points,t,e,r,i,n,s),this}arcTo(t,e,r,i,n){return this._ensurePoly(),!function(t,e,r,i,n,s){let o=t[t.length-2],a=t[t.length-1]-r,l=o-e,h=n-r,u=i-e,d=Math.abs(a*u-l*h);if(d<1e-8||0===s){(t[t.length-2]!==e||t[t.length-1]!==r)&&t.push(e,r);return}let c=a*a+l*l,f=h*h+u*u,p=a*h+l*u,g=s*Math.sqrt(c)/d,m=s*Math.sqrt(f)/d,y=g*p/c,b=m*p/f,_=g*u+m*l,v=g*h+m*a,x=Math.atan2(a*(m+y)-v,l*(m+y)-_),w=Math.atan2(h*(g+b)-v,u*(g+b)-_);A(t,_+e,v+r,s,x,w,l*h>u*a)}(this._currentPoly.points,t,e,r,i,n),this}arcToSvg(t,e,r,i,n,s,o){return!function(t,e,r,i,n,s,o,a=0,l=0,h=0){var u,d;let c,f,p,g,m,y,b,_,v,x,A;
282if(0===s||0===o)return;let k=Math.sin(a*S/360),M=Math.cos(a*S/360),B=M*(e-i)/2+k*(r-n)/2,P=-k*(e-i)/2+M*(r-n)/2;if(0===B&&0===P)return;let I=Math.pow(B,2)/Math.pow(s=Math.abs(s),2)+Math.pow(P,2)/Math.pow(o=Math.abs(o),2);I>1&&(s*=Math.sqrt(I),o*=Math.sqrt(I)),u=s,d=o,c=Math.pow(u,2),f=Math.pow(d,2),p=Math.pow(B,2),(m=c*f-c*(g=Math.pow(P,2))-f*p)<0&&(m=0),m/=c*g+f*p,y=(m=Math.sqrt(m)*(l===h?-1:1))*u/d*P,b=-(m*d)/u*B,x=E(1,0,_=(B-y)/u,v=(P-b)/d),A=E(_,v,(-B-y)/u,(-P-b)/d),0===h&&A>0&&(A-=S),1===h&&A<0&&(A+=S),T.centerX=M*y-k*b+(e+i)/2,T.centerY=k*y+M*b+(r+n)/2,T.ang1=x,T.ang2=A;let{ang1:R,ang2:L}=T,{centerX:O,centerY:F}=T,U=Math.abs(L)/(S/4);1e-7>Math.abs(1-U)&&(U=1);let D=Math.max(Math.ceil(U),1);L/=D;let N=t[t.length-2],z=t[t.length-1],j={x:0,y:0};for(let e=0;e<D;e++){let e=function(t,e){let r=-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),i=1.5707963267948966===e?.551915024494:r,n=Math.cos(t),s=Math.sin(t),o=Math.cos(t+e),a=Math.sin(t+e);return[{x:n-s*i,y:s+n*i},{x:o+a*i,y:a-o*i},{x:o,y:a}]}(R,L),{x:r,y:i}=C(e[0],s,o,M,k,O,F,j),{x:n,y:a}=C(e[1],s,o,M,k,O,F,j),{x:l,y:h}=C(e[2],s,o,M,k,O,F,j);w(t,N,z,r,i,n,a,l,h),N=l,z=h,R+=L}}(this._currentPoly.points,this._currentPoly.lastX,this._currentPoly.lastY,s,o,t,e,r,i,n),this}bezierCurveTo(t,e,r,i,n,s,o){this._ensurePoly();let a=this._currentPoly;return w(this._currentPoly.points,a.lastX,a.lastY,t,e,r,i,n,s,o),this}quadraticCurveTo(t,e,r,i,n){var s,o,a,l,h,u,d,c,f,p,g;let m;this._ensurePoly();let y=this._currentPoly;return s=this._currentPoly.points,o=y.lastX,a=y.lastY,m=(1-Math.min(.99,Math.max(0,n??x.GH.defaultOptions.bezierSmoothness)))/1,l=o,h=a,u=t,d=e,c=r,f=i,p=s,g=m*=m,function t(e,r,i,n,s,o,a,l,h){if(h>8)return;let u=(r+n)/2,d=(i+s)/2,c=(n+o)/2,f=(s+a)/2,p=(u+c)/2,g=(d+f)/2,m=o-r,y=a-i,b=Math.abs((n-o)*y-(s-a)*m);if(b>11920929e-14){if(b*b<=l*(m*m+y*y))return void e.push(p,g)}else if((m=p-(r+o)/2)*m+(y=g-(i+a)/2)*y<=l)return void e.push(p,g);t(e,r,i,u,d,p,g,l,h+1),t(e,p,g,c,f,o,a,l,h+1)}(p,l,h,u,d,c,f,g,0),p.push(c,f),this}closePath(){return this.endPoly(!0),this}addPath(t,e){this.endPoly(),e&&!e.isIdentity()&&(t=t.clone(!0)).transform(e);let r=this.shapePrimitives,i=r.length;for(let e=0;e<t.instructions.length;e++){let r=t.instructions[e];this[r.action](...r.data)}if(t.checkForHoles&&r.length-i>1){let t=null;for(let e=i;e<r.length;e++){let i=r[e];if("polygon"===i.shape.type){let n=i.shape,s=t?.shape;s&&s.containsPolygon(n)?(t.holes||(t.holes=[]),t.holes.push(i),r.copyWithin(e,e+1),r.length--,e--):t=i}}}return this}finish(t=!1){this.endPoly(t)}rect(t,e,r,i,n){return this.drawShape(new g.M(t,e,r,i),n),this}circle(t,e,r,i){return this.drawShape(new m(t,e,r),i),this}poly(t,e,r){let i=new b(t);return i.closePath=e,this.drawShape(i,r),this}regularPoly(t,e,r,i,n=0,s){let o=-1*Math.PI/2+n,a=2*Math.PI/(i=Math.max(0|i,3)),l=[];for(let n=0;n<i;n++){let i=o-n*a;l.push(t+r*Math.cos(i),e+r*Math.sin(i))}return this.poly(l,!0,s),this}roundPoly(t,e,r,i,n,s=0,o){if(i=Math.max(0|i,3),n<=0)return this.regularPoly(t,e,r,i,s);n=Math.min(n,r*Math.sin(Math.PI/i)-.001);let a=-1*Math.PI/2+s,l=2*Math.PI/i,h=(i-2)*Math.PI/i/2;for(let s=0;s<i;s++){let i=s*l+a,u=t+r*Math.cos(i),d=e+r*Math.sin(i),c=i+Math.PI+h,f=i-Math.PI-h,p=u+n*Math.cos(c),g=d+n*Math.sin(c),m=u+n*Math.cos(f),y=d+n*Math.sin(f);0===s?this.moveTo(p,g):this.lineTo(p,g),this.quadraticCurveTo(u,d,m,y,o)}return this.closePath()}roundShape(t,e,r=!1,i){return t.length<3?this:(r?!function(t,e,r,i){let n=(t,e)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),s=(t,e,r)=>({x:t.x+(e.x-t.x)*r,y:t.y+(e.y-t.y)*r}),o=e.length;for(let a=0;a<o;a++){let l,h,u=e[(a+1)%o],d=u.radius??r;if(d<=0){0===a?t.moveTo(u.x,u.y):t.lineTo(u.x,u.y);continue}let c=e[a],f=e[(a+2)%o],p=n(c,u);l=p<1e-4?u:s(u,c,Math.min(p/2,d)/p);let g=n(f,u);h=g<1e-4?u:s(u,f,Math.min(g/2,d)/g),0===a?t.moveTo(l.x,l.y):t.lineTo(l.x,l.y),t.quadraticCurveTo(u.x,u.y,h.x,h.y,i)}}(this,t,e,i):!function(t,e,r){let i=(t,e)=>{let r=e.x-t.x,i=e.y-t.y,n=Math.sqrt(r*r+i*i);return{len:n,nx:r/n,ny:i/n}},n=(e,r)=>{0===e?t.moveTo(r.x,r.y):t.lineTo(r.x,r.y)},s=e[e.length-1];for(let o=0;o<e.length;o++){let a,l=e[o%e.length],h=l.radius??r;if(h<=0){n(o,l),s=l;continue}let u=e[(o+1)%e.length],d=i(l,s),c=i(l,u);if(d.len<1e-4||c.len<1e-4){n(o,l),s=l;continue}let f=Math.asin(d.nx*c.ny-d.ny*c.nx),p=1,g=!1;d.nx*c.nx- -(d.ny*c.ny)<0?f<0?f=Math.PI+f:(f=Math.PI-f,p=-1,g=!0):f>0&&(p=-1,g=!0);let m=f/2,y=Math.abs(Math.cos(m)*h/Math.sin(m));a=y>Math.min(d.len/2,c.len/2)?Math.abs((y=Math.min(d.len/2,c.len/2))*Math.sin(m)/Math.cos(m)):h;let b=l.x+c.nx*y+-c.ny*a*p,_=l.y+c.ny*y+c.nx*a*p,v=Math.atan2(d.ny,d.nx)+Math.PI/2*p,x=Math.atan2(c.ny,c.nx)-Math.PI/2*p;
2820===o&&t.moveTo(b+Math.cos(v)*a,_+Math.sin(v)*a),t.arc(b,_,a,v,x,g),s=l}}(this,t,e),this.closePath())}filletRect(t,e,r,i,n){if(0===n)return this.rect(t,e,r,i);let s=Math.min(r,i)/2,o=Math.min(s,Math.max(-s,n)),a=t+r,l=e+i,h=o<0?-o:0,u=Math.abs(o);return this.moveTo(t,e+u).arcTo(t+h,e+h,t+u,e,u).lineTo(a-u,e).arcTo(a-h,e+h,a,e+u,u).lineTo(a,l-u).arcTo(a-h,l-h,t+r-u,l,u).lineTo(t+u,l).arcTo(t+h,l-h,t,l-u,u).closePath()}chamferRect(t,e,r,i,n,s){if(n<=0)return this.rect(t,e,r,i);let o=Math.min(n,Math.min(r,i)/2),a=t+r,l=e+i,h=[t+o,e,a-o,e,a,e+o,a,l-o,a-o,l,t+o,l,t,l-o,t,e+o];for(let t=h.length-1;t>=2;t-=2)h[t]===h[t-2]&&h[t-1]===h[t-3]&&h.splice(t-1,2);return this.poly(h,!0,s)}ellipse(t,e,r,i,n){return this.drawShape(new y(t,e,r,i),n),this}roundRect(t,e,r,i,n,s){return this.drawShape(new v(t,e,r,i,n),s),this}drawShape(t,e){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:e}),this}startPoly(t,e){let r=this._currentPoly;return r&&this.endPoly(),(r=new b).points.push(t,e),this._currentPoly=r,this}endPoly(t=!1){let e=this._currentPoly;return e&&e.points.length>2&&(e.closePath=t,this.shapePrimitives.push({shape:e})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new b,t)){let t=this.shapePrimitives[this.shapePrimitives.length-1];if(t){let e=t.shape.x,r=t.shape.y;if(t.transform&&!t.transform.isIdentity()){let i=t.transform,n=e;e=i.a*e+i.c*r+i.tx,r=i.b*n+i.d*r+i.ty}this._currentPoly.points.push(e,r)}else this._currentPoly.points.push(0,0)}}buildPath(){let t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let e=0;e<t.instructions.length;e++){let r=t.instructions[e];this[r.action](...r.data)}this.finish()}get bounds(){let t=this._bounds;t.clear();let e=this.shapePrimitives;for(let r=0;r<e.length;r++){let i=e[r],n=i.shape.getBounds(k);i.transform?t.addRect(n,i.transform):t.addRect(n)}return t}}class B{constructor(t,e=!1){this.instructions=[],this.uid=(0,u.L)("graphicsPath"),this._dirty=!0,this.checkForHoles=e,"string"==typeof t?function(t,e){let r=p(t),i=[],n=null,s=0,o=0;for(let t=0;t<r.length;t++){let a=r[t],l=a[0];switch(l){case"M":s=a[1],o=a[2],e.moveTo(s,o);break;case"m":s+=a[1],o+=a[2],e.moveTo(s,o);break;case"H":s=a[1],e.lineTo(s,o);break;case"h":s+=a[1],e.lineTo(s,o);break;case"V":o=a[1],e.lineTo(s,o);break;case"v":o+=a[1],e.lineTo(s,o);break;case"L":s=a[1],o=a[2],e.lineTo(s,o);break;case"l":s+=a[1],o+=a[2],e.lineTo(s,o);break;case"C":s=a[5],o=a[6],e.bezierCurveTo(a[1],a[2],a[3],a[4],s,o);break;case"c":e.bezierCurveTo(s+a[1],o+a[2],s+a[3],o+a[4],s+a[5],o+a[6]),s+=a[5],o+=a[6];break;case"S":s=a[3],o=a[4],e.bezierCurveToShort(a[1],a[2],s,o);break;case"s":e.bezierCurveToShort(s+a[1],o+a[2],s+a[3],o+a[4]),s+=a[3],o+=a[4];break;case"Q":s=a[3],o=a[4],e.quadraticCurveTo(a[1],a[2],s,o);break;case"q":e.quadraticCurveTo(s+a[1],o+a[2],s+a[3],o+a[4]),s+=a[3],o+=a[4];break;case"T":s=a[1],o=a[2],e.quadraticCurveToShort(s,o);break;case"t":s+=a[1],o+=a[2],e.quadraticCurveToShort(s,o);break;case"A":s=a[6],o=a[7],e.arcToSvg(a[1],a[2],a[3],a[4],a[5],s,o);break;case"a":s+=a[6],o+=a[7],e.arcToSvg(a[1],a[2],a[3],a[4],a[5],s,o);break;case"Z":case"z":e.closePath(),i.length>0&&((n=i.pop())?(s=n.startX,o=n.startY):(s=0,o=0)),n=null;break;default:(0,f.R)(`Unknown SVG path command: ${l}`)}"Z"!==l&&"z"!==l&&null===n&&(n={startX:s,startY:o},i.push(n))}}(t,this):this.instructions=t?.slice()??[]}get shapePath(){return this._shapePath||(this._shapePath=new M(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,e){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,e]}),this._dirty=!0,this}arc(...t){return this.instructions.push({action:"arc",data:t}),this._dirty=!0,this}arcTo(...t){return this.instructions.push({action:"arcTo",data:t}),this._dirty=!0,this}arcToSvg(...t){return this.instructions.push({action:"arcToSvg",data:t}),this._dirty=!0,this}bezierCurveTo(...t){return this.instructions.push({action:"bezierCurveTo",data:t}),this._dirty=!0,this}bezierCurveToShort(t,e,r,i,n){let s=this.instructions[this.instructions.length-1],o=this.getLastPoint(l.b.shared),a=0,h=0;if(s&&"bezierCurveTo"===s.action){a=s.data[2],h=s.data[3];
282let t=o.x,e=o.y;a=t+(t-a),h=e+(e-h)}else a=o.x,h=o.y;return this.instructions.push({action:"bezierCurveTo",data:[a,h,t,e,r,i,n]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...t){return this.instructions.push({action:"ellipse",data:t}),this._dirty=!0,this}lineTo(...t){return this.instructions.push({action:"lineTo",data:t}),this._dirty=!0,this}moveTo(...t){return this.instructions.push({action:"moveTo",data:t}),this}quadraticCurveTo(...t){return this.instructions.push({action:"quadraticCurveTo",data:t}),this._dirty=!0,this}quadraticCurveToShort(t,e,r){let i=this.instructions[this.instructions.length-1],n=this.getLastPoint(l.b.shared),s=0,o=0;if(i&&"quadraticCurveTo"===i.action){s=i.data[0],o=i.data[1];let t=n.x,e=n.y;s=t+(t-s),o=e+(e-o)}else s=n.x,o=n.y;return this.instructions.push({action:"quadraticCurveTo",data:[s,o,t,e,r]}),this._dirty=!0,this}rect(t,e,r,i,n){return this.instructions.push({action:"rect",data:[t,e,r,i,n]}),this._dirty=!0,this}circle(t,e,r,i){return this.instructions.push({action:"circle",data:[t,e,r,i]}),this._dirty=!0,this}roundRect(...t){return this.instructions.push({action:"roundRect",data:t}),this._dirty=!0,this}poly(...t){return this.instructions.push({action:"poly",data:t}),this._dirty=!0,this}regularPoly(...t){return this.instructions.push({action:"regularPoly",data:t}),this._dirty=!0,this}roundPoly(...t){return this.instructions.push({action:"roundPoly",data:t}),this._dirty=!0,this}roundShape(...t){return this.instructions.push({action:"roundShape",data:t}),this._dirty=!0,this}filletRect(...t){return this.instructions.push({action:"filletRect",data:t}),this._dirty=!0,this}chamferRect(...t){return this.instructions.push({action:"chamferRect",data:t}),this._dirty=!0,this}star(t,e,r,i,n,s,o){n||(n=i/2);let a=-1*Math.PI/2+s,l=2*r,h=2*Math.PI/l,u=[];for(let r=0;r<l;r++){let s=r%2?n:i,o=r*h+a;u.push(t+s*Math.cos(o),e+s*Math.sin(o))}return this.poly(u,!0,o),this}clone(t=!1){let e=new B;if(e.checkForHoles=this.checkForHoles,t)for(let t=0;t<this.instructions.length;t++){let r=this.instructions[t];e.instructions.push({action:r.action,data:r.data.slice()})}else e.instructions=this.instructions.slice();return e}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;let e=t.a,r=t.b,i=t.c,n=t.d,s=t.tx,o=t.ty,a=0,l=0,h=0,u=0,d=0,c=0,p=0,g=0;for(let m=0;m<this.instructions.length;m++){let y=this.instructions[m],b=y.data;switch(y.action){case"moveTo":case"lineTo":a=b[0],l=b[1],b[0]=e*a+i*l+s,b[1]=r*a+n*l+o;break;case"bezierCurveTo":h=b[0],u=b[1],d=b[2],c=b[3],a=b[4],l=b[5],b[0]=e*h+i*u+s,b[1]=r*h+n*u+o,b[2]=e*d+i*c+s,b[3]=r*d+n*c+o,b[4]=e*a+i*l+s,b[5]=r*a+n*l+o;break;case"quadraticCurveTo":h=b[0],u=b[1],a=b[2],l=b[3],b[0]=e*h+i*u+s,b[1]=r*h+n*u+o,b[2]=e*a+i*l+s,b[3]=r*a+n*l+o;break;case"arcToSvg":a=b[5],l=b[6],p=b[0],g=b[1],b[0]=e*p+i*g,b[1]=r*p+n*g,b[5]=e*a+i*l+s,b[6]=r*a+n*l+o;break;case"circle":b[4]=P(b[3],t);break;case"rect":b[4]=P(b[4],t);break;case"ellipse":b[8]=P(b[8],t);break;case"roundRect":b[5]=P(b[5],t);break;case"addPath":b[0].transform(t);break;case"poly":b[2]=P(b[2],t);break;default:(0,f.R)("unknown transform action",y.action)}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let e=this.instructions.length-1,r=this.instructions[e];if(!r)return t.x=0,t.y=0,t;for(;"closePath"===r.action;){if(--e<0)return t.x=0,t.y=0,t;r=this.instructions[e]}switch(r.action){case"moveTo":case"lineTo":t.x=r.data[0],t.y=r.data[1];break;case"quadraticCurveTo":t.x=r.data[2],t.y=r.data[3];break;case"bezierCurveTo":t.x=r.data[4],t.y=r.data[5];break;case"arc":case"arcToSvg":t.x=r.data[5],t.y=r.data[6];break;case"addPath":r.data[0].getLastPoint(t)}return t}}function P(t,e){return t?t.prepend(e):e.clone()}var I=r(22732);function R(t,e,r){let i=t.getAttribute(e);return i?Number(i):r}function L(t){let e=t.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return e?e[1]:""}let O={fill:{type:"paint",default:0},"fill-opacity":{type:"number",default:1},stroke:{type:"paint",default:0},"stroke-width":{type:"number",default:1},"stroke-opacity":{type:"number",default:1},"stroke-linecap":{type:"string",default:"butt"},"stroke-linejoin":{type:"string",default:"miter"},"stroke-miterlimit":{type:"number",default:10},"stroke-dasharray":{type:"string",default:"none"},"stroke-dashoffset":{type:"number",default:0},opacity:{type:"number",default:1}};function F(t,e){let r=t.getAttribute("style"),i={},n={},s={strokeStyle:i,fillStyle:n,useFill:!1,useStroke:!1};for(let r in O){let i=t.getAttribute(r);i&&U(e,s,r,i.trim())}if(r){let t=r.split(";");for(let r=0;r<t.length;r++){let[i,n]=t[r].trim().split(":");O[i]&&U(e,s,i,n.trim())}}return{strokeStyle:s.useStroke?i:null,fillStyle:s.useFill?n:null,useFill:s.useFill,useStroke:s.useStroke}}
282function U(t,e,r,i){switch(r){case"stroke":if("none"!==i){if(i.startsWith("url(")){let r=L(i);e.strokeStyle.fill=t.defs[r]}else e.strokeStyle.color=o.Q.shared.setValue(i).toNumber();e.useStroke=!0}break;case"stroke-width":e.strokeStyle.width=Number(i);break;case"fill":if("none"!==i){if(i.startsWith("url(")){let r=L(i);e.fillStyle.fill=t.defs[r]}else e.fillStyle.color=o.Q.shared.setValue(i).toNumber();e.useFill=!0}break;case"fill-opacity":e.fillStyle.alpha=Number(i);break;case"stroke-opacity":e.strokeStyle.alpha=Number(i);break;case"opacity":e.fillStyle.alpha=Number(i),e.strokeStyle.alpha=Number(i)}}var D=r(48342);let N=new l.b,z=new a.u,j=class t extends s.A{constructor(){super(...arguments),this.uid=(0,u.L)("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this._activePath=new B,this._transform=new a.u,this._fillStyle={...t.defaultFillStyle},this._strokeStyle={...t.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new c.c,this._boundsDirty=!0}clone(){let e=new t;return e.batchMode=this.batchMode,e.instructions=this.instructions.slice(),e._activePath=this._activePath.clone(),e._transform=this._transform.clone(),e._fillStyle={...this._fillStyle},e._strokeStyle={...this._strokeStyle},e._stateStack=this._stateStack.slice(),e._bounds=this._bounds.clone(),e._boundsDirty=!0,e}get fillStyle(){return this._fillStyle}set fillStyle(e){this._fillStyle=(0,D.w)(e,t.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(e){this._strokeStyle=(0,D.T)(e,t.defaultStrokeStyle)}setFillStyle(e){return this._fillStyle=(0,D.w)(e,t.defaultFillStyle),this}setStrokeStyle(e){return this._strokeStyle=(0,D.w)(e,t.defaultStrokeStyle),this}texture(t,e,r,i,n,s){return this.instructions.push({action:"texture",data:{image:t,dx:r||0,dy:i||0,dw:n||t.frame.width,dh:s||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:e?o.Q.shared.setValue(e).toNumber():0xffffff}}),this.onUpdate(),this}beginPath(){return this._activePath=new B,this}fill(e,r){let i,n=this.instructions[this.instructions.length-1];return(i=0===this._tick&&n&&"stroke"===n.action?n.data.path:this._activePath.clone())&&(null!=e&&(void 0!==r&&"number"==typeof e&&((0,d.t6)(d.lj,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),e={color:e,alpha:r}),this._fillStyle=(0,D.w)(e,t.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:i}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0),this}_initNextPathLocation(){let{x:t,y:e}=this._activePath.getLastPoint(l.b.shared);this._activePath.clear(),this._activePath.moveTo(t,e)}stroke(e){let r,i=this.instructions[this.instructions.length-1];return(r=0===this._tick&&i&&"fill"===i.action?i.data.path:this._activePath.clone())&&(null!=e&&(this._strokeStyle=(0,D.T)(e,t.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:r}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0),this}cut(){for(let t=0;t<2;t++){let e=this.instructions[this.instructions.length-1-t],r=this._activePath.clone();if(e&&("stroke"===e.action||"fill"===e.action))if(e.data.hole)e.data.hole.addPath(r);else{e.data.hole=r;break}}return this._initNextPathLocation(),this}arc(t,e,r,i,n,s){this._tick++;let o=this._transform;return this._activePath.arc(o.a*t+o.c*e+o.tx,o.b*t+o.d*e+o.ty,r,i,n,s),this}arcTo(t,e,r,i,n){this._tick++;let s=this._transform;return this._activePath.arcTo(s.a*t+s.c*e+s.tx,s.b*t+s.d*e+s.ty,s.a*r+s.c*i+s.tx,s.b*r+s.d*i+s.ty,n),this}arcToSvg(t,e,r,i,n,s,o){this._tick++;let a=this._transform;return this._activePath.arcToSvg(t,e,r,i,n,a.a*s+a.c*o+a.tx,a.b*s+a.d*o+a.ty),this}bezierCurveTo(t,e,r,i,n,s,o){this._tick++;let a=this._transform;return this._activePath.bezierCurveTo(a.a*t+a.c*e+a.tx,a.b*t+a.d*e+a.ty,a.a*r+a.c*i+a.tx,a.b*r+a.d*i+a.ty,a.a*n+a.c*s+a.tx,a.b*n+a.d*s+a.ty,o),this}closePath(){return this._tick++,this._activePath?.closePath(),this}ellipse(t,e,r,i){return this._tick++,this._activePath.ellipse(t,e,r,i,this._transform.clone()),this}circle(t,e,r){return this._tick++,this._activePath.circle(t,e,r,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,e){this._tick++;let r=this._transform;return this._activePath.lineTo(r.a*t+r.c*e+r.tx,r.b*t+r.d*e+r.ty),this}moveTo(t,e){this._tick++;let r=this._transform,i=this._activePath.instructions,n=r.a*t+r.c*e+r.tx,s=r.b*t+r.d*e+r.ty;return 1===i.length&&"moveTo"===i[0].action?(i[0].data[0]=n,i[0].data[1]=s):this._activePath.moveTo(n,s),this}quadraticCurveTo(t,e,r,i,n){this._tick++;let s=this._transform;return this._activePath.quadraticCurveTo(s.a*t+s.c*e+s.tx,s.b*t+s.d*e+s.ty,s.a*r+s.c*i+s.tx,s.b*r+s.d*i+s.ty,n),this}rect(t,e,r,i){return this._tick++,this._activePath.rect(t,e,r,i,this._transform.clone()),this}
282roundRect(t,e,r,i,n){return this._tick++,this._activePath.roundRect(t,e,r,i,n,this._transform.clone()),this}poly(t,e){return this._tick++,this._activePath.poly(t,e,this._transform.clone()),this}regularPoly(t,e,r,i,n=0,s){return this._tick++,this._activePath.regularPoly(t,e,r,i,n,s),this}roundPoly(t,e,r,i,n,s){return this._tick++,this._activePath.roundPoly(t,e,r,i,n,s),this}roundShape(t,e,r,i){return this._tick++,this._activePath.roundShape(t,e,r,i),this}filletRect(t,e,r,i,n){return this._tick++,this._activePath.filletRect(t,e,r,i,n),this}chamferRect(t,e,r,i,n,s){return this._tick++,this._activePath.chamferRect(t,e,r,i,n,s),this}star(t,e,r,i,n=0,s=0){return this._tick++,this._activePath.star(t,e,r,i,n,s,this._transform.clone()),this}svg(t){return this._tick++,!function(t,e){if("string"==typeof t){let e=document.createElement("div");e.innerHTML=t.trim(),t=e.querySelector("svg")}let r={context:e,defs:{},path:new B};!function(t,e){let r=t.querySelectorAll("defs");for(let t=0;t<r.length;t++){let i=r[t];for(let t=0;t<i.children.length;t++){let r=i.children[t];switch(r.nodeName.toLowerCase()){case"lineargradient":e.defs[r.id]=function(t){let e=R(t,"x1",0),r=R(t,"y1",0),i=R(t,"x2",1),n=R(t,"y2",0),s=t.getAttribute("gradientUnits")||"objectBoundingBox",a=new I._(e,r,i,n,"objectBoundingBox"===s?"local":"global");for(let e=0;e<t.children.length;e++){let r=t.children[e],i=R(r,"offset",0),n=o.Q.shared.setValue(r.getAttribute("stop-color")).toNumber();a.addColorStop(i,n)}return a}(r);break;case"radialgradient":e.defs[r.id]=((0,f.R)("[SVG Parser] Radial gradients are not yet supported"),new I._(0,0,1,0))}}}}(t,r);let i=t.children,{fillStyle:n,strokeStyle:s}=F(t,r);for(let t=0;t<i.length;t++){let e=i[t];"defs"!==e.nodeName.toLowerCase()&&function t(e,r,i,n){let s,o,a,l,h,u,d,c,p,g,m,y,b,_,v,x,w=e.children,{fillStyle:A,strokeStyle:S}=F(e,r);A&&i?i={...i,...A}:A&&(i=A),S&&n?n={...n,...S}:S&&(n=S);let T=!i&&!n;switch(T&&(i={color:0}),e.nodeName.toLowerCase()){case"path":b=e.getAttribute("d"),"evenodd"===e.getAttribute("fill-rule")&&(0,f.R)("SVG Evenodd fill rule not supported, your svg may render incorrectly"),_=new B(b,!0),r.context.path(_),i&&r.context.fill(i),n&&r.context.stroke(n);break;case"circle":d=R(e,"cx",0),c=R(e,"cy",0),p=R(e,"r",0),r.context.ellipse(d,c,p,p),i&&r.context.fill(i),n&&r.context.stroke(n);break;case"rect":s=R(e,"x",0),o=R(e,"y",0),v=R(e,"width",0),x=R(e,"height",0),g=R(e,"rx",0),m=R(e,"ry",0),g||m?r.context.roundRect(s,o,v,x,g||m):r.context.rect(s,o,v,x),i&&r.context.fill(i),n&&r.context.stroke(n);break;case"ellipse":d=R(e,"cx",0),c=R(e,"cy",0),g=R(e,"rx",0),m=R(e,"ry",0),r.context.beginPath(),r.context.ellipse(d,c,g,m),i&&r.context.fill(i),n&&r.context.stroke(n);break;case"line":a=R(e,"x1",0),l=R(e,"y1",0),h=R(e,"x2",0),u=R(e,"y2",0),r.context.beginPath(),r.context.moveTo(a,l),r.context.lineTo(h,u),n&&r.context.stroke(n);break;case"polygon":y=e.getAttribute("points").match(/\d+/g).map(t=>parseInt(t,10)),r.context.poly(y,!0),i&&r.context.fill(i),n&&r.context.stroke(n);break;case"polyline":y=e.getAttribute("points").match(/\d+/g).map(t=>parseInt(t,10)),r.context.poly(y,!1),n&&r.context.stroke(n);break;case"g":case"svg":break;default:(0,f.R)(`[SVG parser] <${e.nodeName}> elements unsupported`)}T&&(i=null);for(let e=0;e<w.length;e++)t(w[e],r,i,n)}(e,r,n,s)}}(t,this),this}restore(){let t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,e=t){return this._transform.scale(t,e),this}setTransform(t,e,r,i,n,s){return t instanceof a.u?this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty):this._transform.set(t,e,r,i,n,s),this}transform(t,e,r,i,n,s){return t instanceof a.u?this._transform.append(t):(z.set(t,e,r,i,n,s),this._transform.append(z)),this}translate(t,e=t){return this._transform.translate(t,e),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}
282onUpdate(){this.dirty||(this.emit("update",this,16),this.dirty=!0,this._boundsDirty=!0)}get bounds(){if(!this._boundsDirty)return this._bounds;let t=this._bounds;t.clear();for(let e=0;e<this.instructions.length;e++){let r=this.instructions[e],i=r.action;if("fill"===i){let e=r.data;t.addBounds(e.path.bounds)}else if("texture"===i){let e=r.data;t.addFrame(e.dx,e.dy,e.dx+e.dw,e.dy+e.dh,e.transform)}if("stroke"===i){let e=r.data,i=e.style.alignment,n=e.style.width*(1-i),s=e.path.bounds;t.addFrame(s.minX-n,s.minY-n,s.maxX+n,s.maxY+n)}}return t}containsPoint(t){if(!this.bounds.containsPoint(t.x,t.y))return!1;let e=this.instructions,r=!1;for(let i=0;i<e.length;i++){let n=e[i],s=n.data,o=s.path;if(!n.action||!o)continue;let a=s.style,l=o.shapePath.shapePrimitives;for(let e=0;e<l.length;e++){let i=l[e].shape;if(!a||!i)continue;let o=l[e].transform,h=o?o.applyInverse(t,N):t;r="fill"===n.action?i.contains(h.x,h.y):i.strokeContains(h.x,h.y,a.width,a.alignment);let u=s.hole;if(u){let t=u.shapePath?.shapePrimitives;if(t)for(let e=0;e<t.length;e++)t[e].shape.contains(h.x,h.y)&&(r=!1)}if(r)return!0}}return r}destroy(t=!1){if(this._stateStack.length=0,this._transform=null,this.emit("destroy",this),this.removeAllListeners(),"boolean"==typeof t?t:t?.texture){let e="boolean"==typeof t?t:t?.textureSource;this._fillStyle.texture&&this._fillStyle.texture.destroy(e),this._strokeStyle.texture&&this._strokeStyle.texture.destroy(e)}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};j.defaultFillStyle={color:0xffffff,alpha:1,texture:h.g.WHITE,matrix:null,fill:null,textureSpace:"local"},j.defaultStrokeStyle={width:1,color:0xffffff,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:h.g.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let $=j},64833:(t,e,r)=>{"use strict";r.d(e,{b:()=>i});class i{constructor(t,e){this._pool=[],this._count=0,this._index=0,this._classType=t,e&&this.prepopulate(e)}prepopulate(t){for(let e=0;e<t;e++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){let e;return e=this._index>0?this._pool[--this._index]:new this._classType,e.init?.(t),e}return(t){t.reset?.(),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){this._pool.length=0,this._index=0}}},65179:(t,e,r)=>{"use strict";r.d(e,{W:()=>o});var i=r(50301),n=r(52819),s=r(30204);class o{constructor(t){this._syncFunctionHash=Object.create(null),this._adaptor=t,this._systemCheck()}_systemCheck(){if(!(0,i.f)())throw Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}ensureUniformGroup(t){let e=this.getUniformGroupData(t);t.buffer||(t.buffer=new n.h({data:new Float32Array(e.layout.size/4),usage:s.S.UNIFORM|s.S.COPY_DST}))}getUniformGroupData(t){return this._syncFunctionHash[t._signature]||this._initUniformGroup(t)}_initUniformGroup(t){let e=t._signature,r=this._syncFunctionHash[e];if(!r){let i=Object.keys(t.uniformStructures).map(e=>t.uniformStructures[e]),n=this._adaptor.createUboElements(i),s=this._generateUboSync(n.uboElements);r=this._syncFunctionHash[e]={layout:n,syncFunction:s}}return this._syncFunctionHash[e]}_generateUboSync(t){return this._adaptor.generateUboSync(t)}syncUniformGroup(t,e,r){let i=this.getUniformGroupData(t);t.buffer||(t.buffer=new n.h({data:new Float32Array(i.layout.size/4),usage:s.S.UNIFORM|s.S.COPY_DST}));let o=null;return e||(e=t.buffer.data,o=t.buffer.dataInt32),r||(r=0),i.syncFunction(t.uniforms,e,o,r),!0}updateUniformGroup(t){if(t.isStatic&&!t._dirtyId)return!1;t._dirtyId=0;let e=this.syncUniformGroup(t);return t.buffer.update(),e}destroy(){this._syncFunctionHash=null}}},65724:(t,e,r)=>{"use strict";r.d(e,{k:()=>l});var i=r(92068),n=r(46480),s=r(83460),o=r(70242),a=r(82347);class l extends a.l{constructor(t=n.g.EMPTY){t instanceof n.g&&(t={texture:t});const{texture:e=n.g.EMPTY,anchor:r,roundPixels:s,width:o,height:a,...l}=t;super({label:"Sprite",...l}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new i.o({_onUpdate:()=>{this.onViewUpdate()}}),r?this.anchor=r:e.defaultAnchor&&(this.anchor=e.defaultAnchor),this.texture=e,this.allowChildren=!1,this.roundPixels=s??!1,void 0!==o&&(this.width=o),void 0!==a&&(this.height=a)}static from(t,e=!1){return new l(t instanceof n.g?t:n.g.from(t,e))}set texture(t){t||(t=n.g.EMPTY);let e=this._texture;e!==t&&(e&&e.dynamic&&e.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this._width&&this._setWi
282dth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return(0,s.y)(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return(0,o.t6)("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){let t=this._anchor,e=this._texture,r=this._bounds,{width:i,height:n}=e.orig;r.minX=-t._x*i,r.maxX=r.minX+i,r.minY=-t._y*n,r.maxY=r.minY+n}destroy(t=!1){if(super.destroy(t),"boolean"==typeof t?t:t?.texture){let e="boolean"==typeof t?t:t?.textureSource;this._texture.destroy(e)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width),this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height),this._height=t}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,e){"object"==typeof t?(e=t.height??t.width,t=t.width):e??(e=t),void 0!==t&&this._setWidth(t,this._texture.orig.width),void 0!==e&&this._setHeight(e,this._texture.orig.height)}}},66888:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=r(10601)},67436:(t,e,r)=>{"use strict";let i=r(37811),{aggregateTwoErrors:n,codes:{ERR_MULTIPLE_CALLBACK:s},AbortError:o}=r(60577),{Symbol:a}=r(34418),{kIsDestroyed:l,isDestroyed:h,isFinished:u,isServerRequest:d}=r(71343),c=a("kDestroy"),f=a("kConstruct");function p(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function g(t,e,r){let n=!1;function s(e){if(n)return;n=!0;let s=t._readableState,o=t._writableState;p(e,o,s),o&&(o.closed=!0),s&&(s.closed=!0),"function"==typeof r&&r(e),e?i.nextTick(m,t,e):i.nextTick(y,t)}try{t._destroy(e||null,s)}catch(t){s(t)}}function m(t,e){b(t,e),y(t)}function y(t){let e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(null!=r&&r.emitClose||null!=e&&e.emitClose)&&t.emit("close")}function b(t,e){let r=t._readableState,i=t._writableState;null!=i&&i.errorEmitted||null!=r&&r.errorEmitted||(i&&(i.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function _(t,e,r){let n=t._readableState,s=t._writableState;if(null!=s&&s.destroyed||null!=n&&n.destroyed)return this;null!=n&&n.autoDestroy||null!=s&&s.autoDestroy?t.destroy(e):e&&(e.stack,s&&!s.errored&&(s.errored=e),n&&!n.errored&&(n.errored=e),r?i.nextTick(b,t,e):b(t,e))}function v(t){let e=!1;function r(r){if(e)return void _(t,null!=r?r:new s);e=!0;let n=t._readableState,o=t._writableState,a=o||n;n&&(n.constructed=!0),o&&(o.constructed=!0),a.destroyed?t.emit(c,r):r?_(t,r,!0):i.nextTick(x,t)}try{t._construct(t=>{i.nextTick(r,t)})}catch(t){i.nextTick(r,t)}}function x(t){t.emit(f)}function w(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function A(t){t.emit("close")}function S(t,e){t.emit("error",e),i.nextTick(A,t)}t.exports={construct:function(t,e){if("function"!=typeof t._construct)return;let r=t._readableState,n=t._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),t.once(f,e),t.listenerCount(f)>1||i.nextTick(v,t)},destroyer:function(t,e){!(!t||h(t))&&(e||u(t)||(e=new o),d(t)?(t.socket=null,t.destroy(e)):w(t)?t.abort():w(t.req)?t.req.abort():"function"==typeof t.destroy?t.destroy(e):"function"==typeof t.close?t.close():e?i.nextTick(S,t,e):i.nextTick(A,t),t.destroyed||(t[l]=!0))},destroy:function(t,e){let r=this._readableState,i=this._writableState,s=i||r;return null!=i&&i.destroyed||null!=r&&r.destroyed?"function"==typeof e&&e():(p(t,i,r),i&&(i.destroyed=!0),r&&(r.destroyed=!0),s.constructed?g(this,t,e):this.once(c,function(r){g(this,n(r,t),e)})),this},undestroy:function(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=!1===e.writable,e.ending=!1===e.writable,e.finished=!1===e.writable)},errorOrDestroy:_}},67506:(t,e,r)=>{"use strict";r.d(e,{r:()=>h});var i=r(73608),n=r(19677),s=r(46480),o=r(53670),a=r(22732),l=r(46120);function h(t,e,r,u=0){if(t.texture===s.g.WHITE&&!t.fill)return i.Q.shared.setValue(t.color).setAlpha(t.alpha??1).toHexa();if(t.fill){if(t.fill instanceof l.m){let r=t.fill,i=e.createPattern(r.texture.source.resource,"repeat"),s=r.transform.copyTo(n.u.shared);return s.scale(r.texture.frame.width,r.texture.frame.height),i.setTransform(s),i}else if(t.fill instanceof a._){let n,s=t.fill,o="linear"===s.type,a="local"===s.textureSpace,l=1,h=1;a&&r&&(l=r.width+u,h=r.height+u);let d=!1;if(o){let{start:t,end:r}=s;n=e.createLinearGradient(t.x*l,t.y*h,r.x*l,r.y*h),d=Math.abs(r.x-t.x)<Math.abs((r.y-t.y)*.1)}else{let{center:t,innerRadius:r,outerCenter:i,outerRadius:o}=s;n=e.createRadialGradient(t.x*l,t.y*h,r*l,i.x*l,i.y*h,o*l)}if(d&&a&&r){let t=r.lineHeight/h;for(let e=0;e<r.lines.length;e++){let o=(e*r.lineHeight+u/2)/h;
282s.colorStops.forEach(e=>{let r=o+e.offset*t;n.addColorStop(Math.floor(1e5*r)/1e5,i.Q.shared.setValue(e.color).toHex())})}}else s.colorStops.forEach(t=>{n.addColorStop(t.offset,i.Q.shared.setValue(t.color).toHex())});return n}}else{let r=e.createPattern(t.texture.source.resource,"repeat"),i=t.matrix.copyTo(n.u.shared);return i.scale(t.texture.frame.width,t.texture.frame.height),r.setTransform(i),r}return(0,o.R)("FillStyle not recognised",t),"red"}},68021:(t,e,r)=>{"use strict";var i=r(34943),n=r(65724),s=r(20060),o=r(50461);let a=new s.c;function l(t,e,r){t.measurable=!0,(0,o.fB)(t,r,a),e.addBoundsMask(a),t.measurable=!1}var h=r(56809),u=r(32974),d=r(53670);function c(t,e,r){let i=u.o.get();t.measurable=!0;let n=u.u.get().identity(),s=function t(e,r,i){return e?e!==r&&(t(e.parent,r,i),e.updateLocalTransform(),i.append(e.localTransform)):(0,d.R)("Mask bounds, renderable is not inside the root container"),i}(t,r,n);(0,h.n)(t,i,s),t.measurable=!1,e.addBoundsMask(i),u.u.return(n),u.o.return(i)}class f{constructor(t){this.priority=0,this.inverse=!1,this.pipe="alphaMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof n.k),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask.measurable=!0,this.mask=null}addBounds(t,e){this.inverse||l(this.mask,t,e)}addLocalBounds(t,e){c(this.mask,t,e)}containsPoint(t,e){return e(this.mask,t)}destroy(){this.reset()}static test(t){return t instanceof n.k}}f.extension=i.Ag.MaskEffect;class p{constructor(t){this.priority=0,this.pipe="colorMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return"number"==typeof t}}p.extension=i.Ag.MaskEffect;var g=r(3092);class m{constructor(t){this.priority=0,this.pipe="stencilMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null}addBounds(t,e){l(this.mask,t,e)}addLocalBounds(t,e){c(this.mask,t,e)}containsPoint(t,e){return e(this.mask,t)}destroy(){this.reset()}static test(t){return t instanceof g.mc}}m.extension=i.Ag.MaskEffect;var y=r(26709),b=r(31112),_=r(40171),v=r(62057);r(80115),i.XO.add(f,p,m,v.$,_.b,b.q,y.P)},68176:(t,e,r)=>{"use strict";r.d(e,{m:()=>n});let i={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function n(t){return i[t]??i.float32}},68251:(t,e,r)=>{"use strict";r.d(e,{w:()=>a});var i=r(76055),n=r(46480),s=r(60175);let o={};function a(t,e){let r=0x811c9dc5;for(let i=0;i<e;
282i++)r^=t[i].uid,r=Math.imul(r,0x1000193)>>>0;return o[r]||function(t,e,r){let a={},h=0;l||(l=(0,s.a)());for(let r=0;r<l;r++){let i=r<e?t[r]:n.g.EMPTY.source;a[h++]=i.source,a[h++]=i.style}let u=new i.T(a);return o[r]=u,u}(t,e,r)}let l=0},68401:(t,e,r)=>{"use strict";var i=r(34943),n=r(57391),s=r(13113),o=r(30953),a=r(46480),l=r(76301),h=r(16434);let u=class t{constructor(t,e){this.linkedSheets=[],this._texture=t instanceof a.g?t:null,this.textureSource=t.source,this.textures={},this.animations={},this.data=e;const r=parseFloat(e.meta.scale);r?(this.resolution=r,t.source.resolution=this.resolution):this.resolution=t.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let r=e,i=t.BATCH_SIZE;for(;r-e<i&&r<this._frameKeys.length;){let t=this._frameKeys[r],e=this._frames[t],i=e.frame;if(i){let r=null,n=null,s=!1!==e.trimmed&&e.sourceSize?e.sourceSize:e.frame,o=new h.M(0,0,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution);r=e.rotated?new h.M(Math.floor(i.x)/this.resolution,Math.floor(i.y)/this.resolution,Math.floor(i.h)/this.resolution,Math.floor(i.w)/this.resolution):new h.M(Math.floor(i.x)/this.resolution,Math.floor(i.y)/this.resolution,Math.floor(i.w)/this.resolution,Math.floor(i.h)/this.resolution),!1!==e.trimmed&&e.spriteSourceSize&&(n=new h.M(Math.floor(e.spriteSourceSize.x)/this.resolution,Math.floor(e.spriteSourceSize.y)/this.resolution,Math.floor(i.w)/this.resolution,Math.floor(i.h)/this.resolution)),this.textures[t]=new a.g({source:this.textureSource,frame:r,orig:o,trim:n,rotate:2*!!e.rotated,defaultAnchor:e.anchor,defaultBorders:e.borders,label:t.toString()})}r++}}_processAnimations(){let t=this.data.animations||{};for(let e in t){this.animations[e]=[];for(let r=0;r<t[e].length;r++){let i=t[e][r];this.animations[e].push(this.textures[i])}}}_parseComplete(){let t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*t.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){for(let t in this.textures)this.textures[t].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};u.BATCH_SIZE=1e3;let d=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"],c={extension:i.Ag.Asset,cache:{test:t=>t instanceof u,getCacheableAssets:(t,e)=>(function t(e,r,i){let n={};if(e.forEach(t=>{n[t]=r}),Object.keys(r.textures).forEach(t=>{n[t]=r.textures[t]}),!i){let i=l.A.dirname(e[0]);r.linkedSheets.forEach((e,s)=>{Object.assign(n,t([`${i}/${r.data.meta.related_multi_packs[s]}`],e,!0))})}return n})(t,e,!1)},resolver:{extension:{type:i.Ag.ResolveParser,name:"resolveSpritesheet"},test:t=>{let e=t.split("?")[0].split("."),r=e.pop(),i=e.pop();return"json"===r&&d.includes(i)},parse:t=>{let e=t.split(".");return{resolution:parseFloat(s.x.RETINA_PREFIX.exec(t)?.[1]??"1"),format:e[e.length-2],src:t}}},loader:{name:"spritesheetLoader",extension:{type:i.Ag.LoadParser,priority:n.T.Normal,name:"spritesheetLoader"},testParse:async(t,e)=>".json"===l.A.extname(e.src).toLowerCase()&&!!t.frames,async parse(t,e,r){let i,{texture:n,imageFilename:s,textureOptions:h}=e?.data??{},d=l.A.dirname(e.src);if(d&&d.lastIndexOf("/")!==d.length-1&&(d+="/"),n instanceof a.g)i=n;else{let n=(0,o.Y)(d+(s??t.meta.image),e.src);i=(await r.load([{src:n,data:h}]))[n]}let c=new u(i.source,t);await c.parse();let f=t?.meta?.related_multi_packs;if(Array.isArray(f)){let t=[];for(let i of f){if("string"!=typeof i)continue;let n=d+i;e.data?.ignoreMultiPack||(n=(0,o.Y)(n,e.src),t.push(r.load({src:n,data:{textureOptions:h,ignoreMultiPack:!0}})))}let i=await Promise.all(t);
282c.linkedSheets=i,i.forEach(t=>{t.linkedSheets=[c].concat(c.linkedSheets.filter(e=>e!==t))})}return c},async unload(t,e,r){await r.unload(t.textureSource._sourceOrigin),t.destroy(!1)}}};i.XO.add(c)},70242:(t,e,r)=>{"use strict";r.d(e,{Ek:()=>s,lj:()=>n,t6:()=>o});let i={},n="8.0.0",s="8.3.4";function o(t,e,r=3){if(i[e])return;let n=Error().stack;void 0===n?console.warn("PixiJS Deprecation Warning: ",`${e}
283Deprecated since v${t}`):(n=n.split("\n").splice(r).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
284Deprecated since v${t}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
285Deprecated since v${t}`),console.warn(n))),i[e]=!0}},70728:(t,e,r)=>{"use strict";r.d(e,{I:()=>T,v:()=>S});var i=r(22236),n=r(60687),s=r(53670);function o(t,e,r){if(t)for(let i in t){let n=e[i.toLocaleLowerCase()];if(n){let e=t[i];"header"===i&&(e=e.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),r&&n.push(`//----${r}----//`),n.push(e)}else(0,s.R)(`${i} placement hook does not exist in shader`)}}let a=/\{\{(.*?)\}\}/g;function l(t){let e={};return(t.match(a)?.map(t=>t.replace(/[{()}]/g,""))??[]).forEach(t=>{e[t]=[]}),e}function h(t,e){let r,i=/@in\s+([^;]+);/g;for(;null!==(r=i.exec(t));)e.push(r[1])}function u(t,e,r=!1){let i=[];h(e,i),t.forEach(t=>{t.header&&h(t.header,i)}),r&&i.sort();let n=i.map((t,e)=>`       @location(${e}) ${t},`).join("\n"),s=e.replace(/@in\s+[^;]+;\s*/g,"");return s.replace("{{in}}",`
286${n}
287`)}function d(t,e){let r,i=/@out\s+([^;]+);/g;for(;null!==(r=i.exec(t));)e.push(r[1])}function c(t,e){let r=t;for(let t in e){let i=e[t];r=i.join("\n").length?r.replace(`{{${t}}}`,`//-----${t} START-----//
288${i.join("\n")}
289//----${t} FINISH----//`):r.replace(`{{${t}}}`,"")}return r}let f=Object.create(null),p=new Map,g=0;function m(t,e){return e.map(t=>(p.has(t)||p.set(t,g++),p.get(t))).sort((t,e)=>t-e).join("-")+t.vertex+t.fragment}function y(t,e,r){let i=l(t),n=l(e);return r.forEach(t=>{o(t.vertex,i,t.name),o(t.fragment,n,t.name)}),{vertex:c(t,i),fragment:c(e,n)}}let b=`
290    @in aPosition: vec2<f32>;
291    @in aUV: vec2<f32>;
292
293    @out @builtin(position) vPosition: vec4<f32>;
294    @out vUV : vec2<f32>;
295    @out vColor : vec4<f32>;
296
297    {{header}}
298
299    struct VSOutput {
300        {{struct}}
301    };
302
303    @vertex
304    fn main( {{in}} ) -> VSOutput {
305
306        var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
307        var modelMatrix = mat3x3<f32>(
308            1.0, 0.0, 0.0,
309            0.0, 1.0, 0.0,
310            0.0, 0.0, 1.0
311          );
312        var position = aPosition;
313        var uv = aUV;
314
315        {{start}}
316        
317        vColor = vec4<f32>(1., 1., 1., 1.);
318
319        {{main}}
320
321        vUV = uv;
322
323        var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
324
325        vPosition =  vec4<f32>((modelViewProjectionMatrix *  vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
326       
327        vColor *= globalUniforms.uWorldColorAlpha;
328
329        {{end}}
330
331        {{return}}
332    };
333`,_=`
334    @in vUV : vec2<f32>;
335    @in vColor : vec4<f32>;
336   
337    {{header}}
338
339    @fragment
340    fn main(
341        {{in}}
342      ) -> @location(0) vec4<f32> {
343        
344        {{start}}
345
346        var outColor:vec4<f32>;
347      
348        {{main}}
349        
350        var finalColor:vec4<f32> = outColor * vColor;
351
352        {{end}}
353
354        return finalColor;
355      };
356`,v=`
357    in vec2 aPosition;
358    in vec2 aUV;
359
360    out vec4 vColor;
361    out vec2 vUV;
362
363    {{header}}
364
365    void main(void){
366
367        mat3 worldTransformMatrix = uWorldTransformMatrix;
368        mat3 modelMatrix = mat3(
369            1.0, 0.0, 0.0,
370            0.0, 1.0, 0.0,
371            0.0, 0.0, 1.0
372          );
373        vec2 position = aPosition;
374        vec2 uv = aUV;
375        
376        {{start}}
377        
378        vColor = vec4(1.);
379        
380        {{main}}
381        
382        vUV = uv;
383        
384        mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
385
386        gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0
386)).xy, 0.0, 1.0);
387
388        vColor *= uWorldColorAlpha;
389
390        {{end}}
391    }
392`,x=`
393   
394    in vec4 vColor;
395    in vec2 vUV;
396
397    out vec4 finalColor;
398
399    {{header}}
400
401    void main(void) {
402        
403        {{start}}
404
405        vec4 outColor;
406      
407        {{main}}
408        
409        finalColor = outColor * vColor;
410        
411        {{end}}
412    }
413`,w={name:"global-uniforms-bit",vertex:{header:`
414        struct GlobalUniforms {
415            uProjectionMatrix:mat3x3<f32>,
416            uWorldTransformMatrix:mat3x3<f32>,
417            uWorldColorAlpha: vec4<f32>,
418            uResolution: vec2<f32>,
419        }
420
421        @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
422        `}},A={name:"global-uniforms-bit",vertex:{header:`
423          uniform mat3 uProjectionMatrix;
424          uniform mat3 uWorldTransformMatrix;
425          uniform vec4 uWorldColorAlpha;
426          uniform vec2 uResolution;
427        `}};function S({bits:t,name:e}){let r=function({template:t,bits:e}){let r=m(t,e);if(f[r])return f[r];let{vertex:i,fragment:n}=function(t,e){var r;let i,n,s,o,a,l=e.map(t=>t.vertex).filter(t=>!!t),h=e.map(t=>t.fragment).filter(t=>!!t),c=u(l,t.vertex,!0);return i=[],d(r=c,i),l.forEach(t=>{t.header&&d(t.header,i)}),n=0,s=i.sort().map(t=>t.indexOf("builtin")>-1?t:`@location(${n++}) ${t}`).join(",\n"),o=i.sort().map(t=>`       var ${t.replace(/@.*?\s+/g,"")};`).join("\n"),a=`return VSOutput(
428            ${i.sort().map(t=>{let e;return` ${(e=/\b(\w+)\s*:/g.exec(t))?e[1]:""}`}).join(",\n")});`,{vertex:c=r.replace(/@out\s+[^;]+;\s*/g,"").replace("{{struct}}",`
429${s}
430`).replace("{{start}}",`
431${o}
432`).replace("{{return}}",`
433${a}
434`),fragment:u(h,t.fragment,!0)}}(t,e);return f[r]=y(i,n,e),f[r]}({template:{fragment:_,vertex:b},bits:[w,...t]});return n.B.from({name:e,vertex:{source:r.vertex,entryPoint:"main"},fragment:{source:r.fragment,entryPoint:"main"}})}function T({bits:t,name:e}){return new i.M({name:e,...function({template:t,bits:e}){let r=m(t,e);return f[r]||(f[r]=y(t.vertex,t.fragment,e)),f[r]}({template:{vertex:v,fragment:x},bits:[A,...t]})})}},71343:(t,e,r)=>{"use strict";let{SymbolAsyncIterator:i,SymbolIterator:n,SymbolFor:s}=r(34418),o=s("nodejs.stream.destroyed"),a=s("nodejs.stream.errored"),l=s("nodejs.stream.readable"),h=s("nodejs.stream.writable"),u=s("nodejs.stream.disturbed"),d=s("nodejs.webstream.isClosedPromise");function c(t,e=!1){var r;return!!(t&&"function"==typeof t.pipe&&"function"==typeof t.on&&(!e||"function"==typeof t.pause&&"function"==typeof t.resume)&&(!t._writableState||(null==(r=t._readableState)?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function f(t){var e;return!!(t&&"function"==typeof t.write&&"function"==typeof t.on&&(!t._readableState||(null==(e=t._writableState)?void 0:e.writable)!==!1))}function p(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function g(t){return!!(t&&!p(t)&&"function"==typeof t.pipeThrough&&"function"==typeof t.getReader&&"function"==typeof t.cancel)}function m(t){return!!(t&&!p(t)&&"function"==typeof t.getWriter&&"function"==typeof t.abort)}function y(t){return!!(t&&!p(t)&&"object"==typeof t.readable&&"object"==typeof t.writable)}function b(t){if(!p(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return!!(t.destroyed||t[o]||null!=i&&i.destroyed)}function _(t){if(!f(t))return null;if(!0===t.writableEnded)return!0;let e=t._writableState;return(null==e||!e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)}function v(t,e){if(!c(t))return null;let r=t._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===e&&!0===r.ended&&0===r.length))}function x(t){return t&&null!=t[l]?t[l]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!b(t)&&c(t)&&t.readable&&!v(t)}function w(t){return t&&null!=t[h]?t[h]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!b(t)&&f(t)&&t.writable&&!_(t)}function A(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function S(t){return"boolean"==typeof t._sent100&&A(t)}t.exports={isDestroyed:b,kIsDestroyed:o,isDisturbed:function(t){var e;return!!(t&&(null!=(e=t[u])?e:t.readableDidRead||t.readableAborted))},kIsDisturbed:u,isErrored:function(t){var e,r,i,n,s,o,l,h,u,d;return!!(t&&(null!=(e=null!=(r=null!=(i=null!=(n=null!=(s=null!=(o=t[a])?o:t.readableErrored)?s:t.writableErrored)?n:null==(l=t._readableState)?void 0:l.errorEmitted)?i:null==(h=t._writableState)?void 0:h.errorEmitted)?r:null==(u=t._readableState)?void 0:u.errored)?e:null==(d=t._writableState)?void 0:d.errored))},kIsErrored:a,isReadable:x,kIsReadable:l,kIsClosedPromise:d,kControllerErrorFunction:s("nodejs.webstream.controllerErrorFunction"),kIsWritable:h,isClosed:function(t){if(!p(t))return null;if("boolean"==typeof t.closed)return t.closed;let e=t._writableState,r=t._readableState;return"boolean"==typeof(null==e?void 0:e.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==e?void 0:e.closed)||(null==r?void 0:r.closed):"boolean"==typeof t._closed&&A(t)?t._closed:null}
434,isDuplexNodeStream:function(t){return!!(t&&"function"==typeof t.pipe&&t._readableState&&"function"==typeof t.on&&"function"==typeof t.write)},isFinished:function(t,e){return p(t)?!!b(t)||!((null==e?void 0:e.readable)!==!1&&x(t)||(null==e?void 0:e.writable)!==!1&&w(t)):null},isIterable:function(t,e){return null!=t&&(!0===e?"function"==typeof t[i]:!1===e?"function"==typeof t[n]:"function"==typeof t[i]||"function"==typeof t[n])},isReadableNodeStream:c,isReadableStream:g,isReadableEnded:function(t){if(!c(t))return null;if(!0===t.readableEnded)return!0;let e=t._readableState;return!!e&&!e.errored&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)},isReadableFinished:v,isReadableErrored:function(t){var e,r;return p(t)?t.readableErrored?t.readableErrored:null!=(e=null==(r=t._readableState)?void 0:r.errored)?e:null:null},isNodeStream:p,isWebStream:function(t){return g(t)||m(t)||y(t)},isWritable:w,isWritableNodeStream:f,isWritableStream:m,isWritableEnded:_,isWritableFinished:function(t,e){if(!f(t))return null;if(!0===t.writableFinished)return!0;let r=t._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===e&&!0===r.ended&&0===r.length))},isWritableErrored:function(t){var e,r;return p(t)?t.writableErrored?t.writableErrored:null!=(e=null==(r=t._writableState)?void 0:r.errored)?e:null:null},isServerRequest:function(t){var e;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&(null==(e=t.req)?void 0:e.upgradeOrConnect)===void 0},isServerResponse:S,willEmitClose:function(t){if(!p(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return!i&&S(t)||!!(i&&i.autoDestroy&&i.emitClose&&!1===i.closed)},isTransformStream:y}},71678:(t,e,r)=>{"use strict";function i(t,e,{signal:r,edges:n=["leading","trailing"]}={}){let s=null,o=function(t,e,{signal:r,edges:i}={}){let n,s=null,o=null!=i&&i.includes("leading"),a=null==i||i.includes("trailing"),l=()=>{null!==s&&(t.apply(n,s),n=void 0,s=null)},h=null,u=()=>{null!=h&&clearTimeout(h),h=setTimeout(()=>{h=null,a&&l(),c()},e)},d=()=>{null!==h&&(clearTimeout(h),h=null)},c=()=>{d(),n=void 0,s=null},f=function(...t){if(r?.aborted)return;n=this,s=t;let e=null==h;u(),o&&e&&l()};return f.schedule=u,f.cancel=c,f.flush=()=>{d(),l()},r?.addEventListener("abort",c,{once:!0}),f}(t,e,{signal:r,edges:n}),a=function(...t){null==s?s=Date.now():Date.now()-s>=e&&(s=Date.now(),o.cancel(),o(...t)),o(...t)};return a.cancel=o.cancel,a.flush=o.flush,a}r.d(e,{n:()=>i})},72010:(t,e,r)=>{"use strict";
434var i=r(10303),n=r(11278),s=r(8139),o=r(24462),a=r(65179),l=r(46508),h=r(19777),u=r(68176);let d={aVertex:(t,e,r,i,n)=>{let s=0,o=0,a=0,l=0;for(let r=0;r<t.length;++r){let h=t[r],u=h.texture,d=h.scaleX,c=h.scaleY,f=h.anchorX,p=h.anchorY,g=u.trim,m=u.orig;g?(s=(o=g.x-f*m.width)+g.width,a=(l=g.y-p*m.height)+g.height):(s=m.width*(1-f),o=-(m.width*f),a=m.height*(1-p),l=-(m.height*p)),e[i]=o*d,e[i+1]=l*c,e[i+n]=s*d,e[i+n+1]=l*c,e[i+2*n]=s*d,e[i+2*n+1]=a*c,e[i+3*n]=o*d,e[i+3*n+1]=a*c,i+=4*n}},aPosition:(t,e,r,i,n)=>{for(let r=0;r<t.length;++r){let s=t[r],o=s.x,a=s.y;e[i]=o,e[i+1]=a,e[i+n]=o,e[i+n+1]=a,e[i+2*n]=o,e[i+2*n+1]=a,e[i+3*n]=o,e[i+3*n+1]=a,i+=4*n}},aRotation:(t,e,r,i,n)=>{for(let r=0;r<t.length;++r){let s=t[r].rotation;e[i]=s,e[i+n]=s,e[i+2*n]=s,e[i+3*n]=s,i+=4*n}},aUV:(t,e,r,i,n)=>{for(let r=0;r<t.length;++r){let s=t[r].texture.uvs;e[i]=s.x0,e[i+1]=s.y0,e[i+n]=s.x1,e[i+n+1]=s.y1,e[i+2*n]=s.x2,e[i+2*n+1]=s.y2,e[i+3*n]=s.x3,e[i+3*n+1]=s.y3,i+=4*n}},aColor:(t,e,r,i,n)=>{for(let e=0;e<t.length;++e){let s=t[e].color;r[i]=s,r[i+n]=s,r[i+2*n]=s,r[i+3*n]=s,i+=4*n}}};function c(t){let e=0,r=[];for(let i=0;i<t.length;i++){let n=t[i],s=(0,u.m)(n.format).stride/4;e+=s,r.push({stride:s,updateFunction:n.updateFunction||d[n.attributeName]})}return(t,i,n)=>{let s=0;for(let o=0;o<r.length;o++){let a=r[o];a.updateFunction(t,i,n,s,e),s+=a.stride}}}var f=r(13887),p=r(7258),g=r(28513),m=r(53934);function y(t,e,r){let i=t.gl,n=t.shader,s=n._getProgramData(e.glProgram);for(let o in e.groups){let a=e.groups[o];for(let l in a.resources){let h=a.resources[l];if(h instanceof p.k)h.ubo?n.bindUniformBlock(h,e._uniformBindMap[o][l],r.blockIndex++):n.updateUniformGroup(h);else if(h instanceof f.d)n.bindUniformBlock(h,e._uniformBindMap[o][l],r.blockIndex++);else if(h instanceof g.v){t.texture.bind(h,r.textureCount);let n=e._uniformBindMap[o][l],a=s.uniformData[n];a&&(a.value!==r.textureCount&&i.uniform1i(a.location,r.textureCount),r.textureCount++)}else m.n}}}var b=r(86256),_=r(17011),v=r(72612);let x=[(t,e,r,i,n)=>{let s=i[t].toArray(!0);e[r]=s[0],e[r+1]=s[1],e[r+2]=s[2],e[r+4]=s[3],e[r+5]=s[4],e[r+6]=s[5],e[r+8]=s[6],e[r+9]=s[7],e[r+10]=s[8]},(t,e,r,i,n)=>{n=i[t],e[r]=n.x,e[r+1]=n.y,e[r+2]=n.width,e[r+3]=n.height},(t,e,r,i,n)=>{n=i[t],e[r]=n.x,e[r+1]=n.y},(t,e,r,i,n)=>{n=i[t],e[r]=n.red,e[r+1]=n.green,e[r+2]=n.blue,e[r+3]=n.alpha},(t,e,r,i,n)=>{n=i[t],e[r]=n.red,e[r+1]=n.green,e[r+2]=n.blue}
vendor: 6,065 bytes, line 434
434],w={f32:(t,e,r,i,n)=>{e[r]=n},i32:(t,e,r,i,n)=>{e[r]=n},"vec2<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1]},"vec3<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2]},"vec4<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+3]=n[3]},"mat2x2<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+3]=n[3]},"mat3x3<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+4]=n[3],e[r+5]=n[4],e[r+6]=n[5],e[r+8]=n[6],e[r+9]=n[7],e[r+10]=n[8]},"mat4x4<f32>":(t,e,r,i,n)=>{for(let t=0;t<16;t++)e[r+t]=n[t]},"mat3x2<f32>":(t,e,r,i,n)=>{for(let t=0;t<6;t++)e[r+(t/3|0)*4+t%3]=n[t]},"mat4x2<f32>":(t,e,r,i,n)=>{for(let t=0;t<8;t++)e[r+(t/4|0)*4+t%4]=n[t]},"mat2x3<f32>":(t,e,r,i,n)=>{for(let t=0;t<6;t++)e[r+(t/2|0)*4+t%2]=n[t]},"mat4x3<f32>":(t,e,r,i,n)=>{for(let t=0;t<12;t++)e[r+(t/4|0)*4+t%4]=n[t]},"mat2x4<f32>":(t,e,r,i,n)=>{for(let t=0;t<8;t++)e[r+(t/2|0)*4+t%2]=n[t]},"mat3x4<f32>":(t,e,r,i,n)=>{for(let t=0;t<12;t++)e[r+(t/3|0)*4+t%3]=n[t]}},A={f32:(t,e,r,i,n)=>{e[r]=n},i32:(t,e,r,i,n)=>{e[r]=n},"vec2<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1]},"vec3<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2]},"vec4<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+3]=n[3]},"mat2x2<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1],e[r+4]=n[2],e[r+5]=n[3]},"mat3x3<f32>":(t,e,r,i,n)=>{e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+4]=n[3],e[r+5]=n[4],e[r+6]=n[5],e[r+8]=n[6],e[r+9]=n[7],e[r+10]=n[8]},"mat4x4<f32>":(t,e,r,i,n)=>{for(let t=0;t<16;t++)e[r+t]=n[t]},"mat3x2<f32>":(t,e,r,i,n)=>{for(let t=0;t<6;t++)e[r+(t/3|0)*4+t%3]=n[t]},"mat4x2<f32>":(t,e,r,i,n)=>{for(let t=0;t<8;t++)e[r+(t/4|0)*4+t%4]=n[t]},"mat2x3<f32>":(t,e,r,i,n)=>{for(let t=0;t<6;t++)e[r+(t/2|0)*4+t%2]=n[t]},"mat4x3<f32>":(t,e,r,i,n)=>{for(let t=0;t<12;t++)e[r+(t/4|0)*4+t%4]=n[t]},"mat2x4<f32>":(t,e,r,i,n)=>{for(let t=0;t<8;t++)e[r+(t/2|0)*4+t%2]=n[t]},"mat3x4<f32>":(t,e,r,i,n)=>{for(let t=0;t<12;t++)e[r+(t/3|0)*4+t%3]=n[t]}};function S(t,e,r){let i={};for(let n in t){let s=t[n],o=s.data,a=!1;i[o.name]={offset:s.offset/4,func:null};for(let t=0;t<v.$.length;t++){let e=v.$[t];if(o.type===e.type&&e.test(o)){i[o.name].func=x[t],a=!0;break}}a||(1===o.size?i[o.name].func=e[o.type]:i[o.name].func=r(s))}return(t,e,r)=>{for(let n in i)i[n].func(n,e,r+i[n].offset,t,t[n])}}let T={f32(t,e,r,i,n,s,o){r!==i&&(e.value=i,o.uniform1f(n[t].location,i))},"vec2<f32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1])&&(r[0]=i[0],r[1]=i[1],o.uniform2f(n[t].location,i[0],i[1]))},"vec3<f32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2])&&(r[0]=i[0],r[1]=i[1],r[2]=i[2],o.uniform3f(n[t].location,i[0],i[1],i[2]))},"vec4<f32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2]||r[3]!==i[3])&&(r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],o.uniform4f(n[t].location,i[0],i[1],i[2],i[3]))},i32(t,e,r,i,n,s,o){r!==i&&(e.value=i,o.uniform1i(n[t].location,i))},"vec2<i32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1])&&(r[0]=i[0],r[1]=i[1],o.uniform2i(n[t].location,i[0],i[1]))},"vec3<i32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2])&&(r[0]=i[0],r[1]=i[1],r[2]=i[2],o.uniform3i(n[t].location,i[0],i[1],i[2]))},"vec4<i32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2]||r[3]!==i[3])&&(r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],o.uniform4i(n[t].location,i[0],i[1],i[2],i[3]))},u32(t,e,r,i,n,s,o){r!==i&&(e.value=i,o.uniform1ui(n[t].location,i))},"vec2<u32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1])&&(r[0]=i[0],r[1]=i[1],o.uniform2ui(n[t].location,i[0],i[1]))},"vec3<u32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2])&&(r[0]=i[0],r[1]=i[1],r[2]=i[2],o.uniform3ui(n[t].location,i[0],i[1],i[2]))},"vec4<u32>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2]||r[3]!==i[3])&&(r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],o.uniform4ui(n[t].location,i[0],i[1],i[2],i[3]))},bool(t,e,r,i,n,s,o){r!==i&&(e.value=i,o.uniform1i(n[t].location,i))},"vec2<bool>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1])&&(r[0]=i[0],r[1]=i[1],o.uniform2i(n[t].location,i[0],i[1]))},"vec3<bool>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2])&&(r[0]=i[0],r[1]=i[1],r[2]=i[2],o.uniform3i(n[t].location,i[0],i[1],i[2]))},"vec4<bool>"(t,e,r,i,n,s,o){(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2]||r[3]!==i[3])&&(r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],o.uniform4i(n[t].location,i[0],i[1],i[2],i[3]))},"mat2x2<f32>"(t,e,r,i,n,s,o){o.uniformMatrix2fv(n[t].location,!1,i)},"mat3x3<f32>"(t,e,r,i,n,s,o){o.uniformMatrix3fv(n[t].location,!1,i)},"mat4x4<f32>"(t,e,r,i,n,s,o){o.uniformMatrix4fv(n[t].location,!1,i)}},C={f32(t,e,r,i,n,s,o){o.uniform1fv(n[t].location,i)},"vec2<f32>"(t,e,r,i,n,s,o){o.uniform2fv(n[t].location,i)},"vec3<f32>"(t,e,r,i,n,s,o){o.uniform3fv(n[t].location,i)},"vec4<f32>"(t,e,r,i,n,s,o){o.uniform4fv(n[t].location,i)},"mat2x2<f32>"(t,e,r,i,n,s,o){o.uniformMatrix2fv(n[t].location,!1,i)},"mat3x3<f32>"(t,e,r,i,n,s,o){o.uniformMatrix3fv(n[t].location,!1,i)},"mat4x4<f32>"(t,e,r,i,n,s,o){o.uniformMatrix4fv(n[t].location,!1,i)},i32(t,e,r,i,n,s,o){o.uniform1iv(n[t].location,i)},"vec2<i32>"(t,e,r,i,n,s,o){o.uniform2iv(n[t].location,i)},"vec3<i32>"(t,e,r,i,n,s,o){o.uniform3iv(n[t].location,i)},"vec4<i32>"(t,e,r,i,n,s,o){o.uniform4iv(n[t].location,i)},u32(t,e,r,i,n,s,o){o.uniform1iv(n[t].location,i)},"vec2<u32>"(t,e,r,i,n,s,o){o.uniform2iv(n[t].location,i)},"vec3<u32>"(t,e,r,i,n,s,o){o.uniform3iv(n[t].location,i)},"vec4<u32>"(t,e,r,i,n,s,o){o.uniform4iv(n[t].location,i)},bool(t,e,r,i,n,s,o){o.uniform1iv(n[t].location,i)},"vec2<bool>"(t,e,r,i,n,s,o){o.uniform2iv(n[t].location,i)},"vec3<bool>"(t,e,r,i,n,s,o){o.uniform3iv(n[t].location,i)},"vec4<bool>"(t,e,r,i,n,s,o){o.uniform4iv(n[t].location,i)}},E=[(t,e,r,i,n,s,o)=>{o.uniformMatrix3fv(n[t].location,!1,s[t].toArray(!0))},(t,e,r,i,n,s,o)=>{r=n[t].value,i=s[t],(r[0]!==i.x||r[1]!==i.y||r[2]!==i.width||r[3]!==i.height)&&(r[0]=i.x,r[1]=i.y,r[2]=i.width,r[3]=i.height,o.uniform4f(n[t].location,i.x,i.y,i.width,i.height))},(t,e,r,i,n,s,o)=>{r=n[t].value,i=s[t],(r[0]!==i.x||r[1]!==i.y)&&(r[0]=i.x,r[1]=i.y,o.uniform2f(n[t].location,i.x,i.y))},(t,e,r,i,n,s,o)=>{r=n[t].value,i=s[t],(r[0]!==i.red||r[1]!==i.green||r[2]!==i.blue||r[3]!==i.alpha)&&
434(r[0]=i.red,r[1]=i.green,r[2]=i.blue,r[3]=i.alpha,o.uniform4f(n[t].location,i.red,i.green,i.blue,i.alpha))},(t,e,r,i,n,s,o)=>{r=n[t].value,i=s[t],(r[0]!==i.red||r[1]!==i.green||r[2]!==i.blue)&&(r[0]=i.red,r[1]=i.green,r[2]=i.blue,o.uniform3f(n[t].location,i.red,i.green,i.blue))}];Object.assign(l.k.prototype,{_unsafeEvalCheck(){}}),Object.assign(a.W.prototype,{_systemCheck(){}}),Object.assign(s.e.prototype,{_generateUniformsSync:function(t,e){let r={};for(let i in t.uniformStructures){if(!e[i])continue;let n=t.uniformStructures[i],s=!1;for(let t=0;t<v.$.length;t++){let e=v.$[t];if(n.type===e.type&&e.test(n)){r[i]=E[t],s=!0;break}}if(!s){let t=1===n.size?T:C;r[i]=t[n.type]}}return(t,e,i)=>{let n=i.gl;for(let i in r){let s=e[i],o=t[i],a=t[i].value;r[i](i,o,a,s,t,e,n)}}}}),Object.assign(i.z.prototype,{_generateUboSync:function(t){return S(t,A,t=>{let e=Math.max(b.K[t.data.type]/16,1),r=t.data.value.length/t.data.size,i=(4-r%4)%4;return(n,s,o,a,l)=>{let h=0;for(let n=0;n<t.data.size*e;n++){for(let t=0;t<r;t++)s[o++]=l[h++];o+=i}}})}}),Object.assign(o.u.prototype,{_generateUboSync:function(t){return S(t,w,t=>{let{size:e,align:r}=_.f[t.data.type],i=(e-r)/4;return(r,n,s,o,a)=>{let l=0;for(let r=0;r<t.data.size*(e/4);r++){for(let t=0;t<e/4;t++)n[s++]=a[l++];s+=i}}})}}),Object.assign(n.S.prototype,{_generateShaderSync:function(){return y}}),Object.assign(h.h.prototype,{generateParticleUpdate:function(t){let e=t.filter(t=>t.dynamic),r=t.filter(t=>!t.dynamic);return{dynamicUpdate:c(e),staticUpdate:c(r)}}})},72612:(t,e,r)=>{"use strict";r.d(e,{$:()=>i});let i=[{type:"mat3x3<f32>",test:t=>void 0!==t.value.a,ubo:`
435            var matrix = uv[name].toArray(true);
436            data[offset] = matrix[0];
437            data[offset + 1] = matrix[1];
438            data[offset + 2] = matrix[2];
439            data[offset + 4] = matrix[3];
440            data[offset + 5] = matrix[4];
441            data[offset + 6] = matrix[5];
442            data[offset + 8] = matrix[6];
443            data[offset + 9] = matrix[7];
444            data[offset + 10] = matrix[8];
445        `,uniform:`
446            gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));
447        `},{type:"vec4<f32>",test:t=>"vec4<f32>"===t.type&&1===t.size&&void 0!==t.value.width,ubo:`
448            v = uv[name];
449            data[offset] = v.x;
450            data[offset + 1] = v.y;
451            data[offset + 2] = v.width;
452            data[offset + 3] = v.height;
453        `,uniform:`
454            cv = ud[name].value;
455            v = uv[name];
456            if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {
457                cv[0] = v.x;
458                cv[1] = v.y;
459                cv[2] = v.width;
460                cv[3] = v.height;
461                gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);
462            }
463        `},{type:"vec2<f32>",test:t=>"vec2<f32>"===t.type&&1===t.size&&void 0!==t.value.x,ubo:`
464            v = uv[name];
465            data[offset] = v.x;
466            data[offset + 1] = v.y;
467        `,uniform:`
468            cv = ud[name].value;
469            v = uv[name];
470            if (cv[0] !== v.x || cv[1] !== v.y) {
471                cv[0] = v.x;
472                cv[1] = v.y;
473                gl.uniform2f(ud[name].location, v.x, v.y);
474            }
475        `},{type:"vec4<f32>",test:t=>"vec4<f32>"===t.type&&1===t.size&&void 0!==t.value.red,ubo:`
476            v = uv[name];
477            data[offset] = v.red;
478            data[offset + 1] = v.green;
479            data[offset + 2] = v.blue;
480            data[offset + 3] = v.alpha;
481        `,uniform:`
482            cv = ud[name].value;
483            v = uv[name];
484            if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {
485                cv[0] = v.red;
486                cv[1] = v.green;
487                cv[2] = v.blue;
488                cv[3] = v.alpha;
489                gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);
490            }
491        `},{type:"vec3<f32>",test:t=>"vec3<f32>"===t.type&&1===t.size&&void 0!==t.value.red,ubo:`
492            v = uv[name];
493            data[offset] = v.red;
494            data[offset + 1] = v.green;
495            data[offset + 2] = v.blue;
496        `,uniform:`
497            cv = ud[name].value;
498            v = uv[name];
499            if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {
500                cv[0] = v.red;
501                cv[1] = v.green;
502                cv[2] = v.blue;
503                gl.uniform3f(ud[name].location, v.red, v.green, v.blue);
504            }
505        `}]},72639:(t,e,r)=>{"use strict";let{ArrayIsArray:i,ArrayPrototypeIncludes:n,ArrayPrototypeJoin:s,ArrayPrototypeMap:o,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:h,NumberMIN_SAFE_INTEGER:u,NumberParseInt:d,ObjectPrototypeHasOwnProperty:c,RegExpPrototypeExec:f,String:p,StringPrototypeToUpperCase:g,StringPrototypeTrim:m}=r(34418),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:v,ERR_OUT_OF_RANGE:x,ERR_
505UNKNOWN_SIGNAL:w}}=r(60577),{normalizeEncoding:A}=r(43006),{isAsyncFunction:S,isArrayBufferView:T}=r(43006).types,C={},E=/^[0-7]+$/,k=y((t,e,r=u,i=h)=>{if("number"!=typeof t)throw new _(e,"number",t);if(!a(t))throw new x(e,"an integer",t);if(t<r||t>i)throw new x(e,`>= ${r} && <= ${i}`,t)}),M=y((t,e,r=-0x80000000,i=0x7fffffff)=>{if("number"!=typeof t)throw new _(e,"number",t);if(!a(t))throw new x(e,"an integer",t);if(t<r||t>i)throw new x(e,`>= ${r} && <= ${i}`,t)}),B=y((t,e,r=!1)=>{if("number"!=typeof t)throw new _(e,"number",t);if(!a(t))throw new x(e,"an integer",t);let i=+!!r;if(t<i||t>0xffffffff)throw new x(e,`>= ${i} && <= 4294967295`,t)});function P(t,e){if("string"!=typeof t)throw new _(e,"string",t)}let I=y((t,e,r)=>{if(!n(r,t))throw new v(e,t,"must be one of: "+s(o(r,t=>"string"==typeof t?`'${t}'`:p(t)),", "))});function R(t,e){if("boolean"!=typeof t)throw new _(e,"boolean",t)}function L(t,e,r){return null!=t&&c(t,e)?t[e]:r}let O=y((t,e,r=null)=>{let n=L(r,"allowArray",!1),s=L(r,"allowFunction",!1);if(!L(r,"nullable",!1)&&null===t||!n&&i(t)||"object"!=typeof t&&(!s||"function"!=typeof t))throw new _(e,"Object",t)}),F=y((t,e)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new _(e,"a dictionary",t)}),U=y((t,e,r=0)=>{if(!i(t))throw new _(e,"Array",t);if(t.length<r)throw new v(e,t,`must be longer than ${r}`)}),D=y((t,e="buffer")=>
505{if(!T(t))throw new _(e,["Buffer","TypedArray","DataView"],t)}),N=y((t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new _(e,"AbortSignal",t)}),z=y((t,e)=>{if("function"!=typeof t)throw new _(e,"Function",t)}),j=y((t,e)=>{if("function"!=typeof t||S(t))throw new _(e,"Function",t)}),$=y((t,e)=>{if(void 0!==t)throw new _(e,"undefined",t)}),W=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function G(t,e){if(void 0===t||!f(W,t))throw new v(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:function(t){return t===(0|t)},isUint32:function(t){return t===t>>>0},parseFileMode:function(t,e,r){if(void 0===t&&(t=r),"string"==typeof t){if(null===f(E,t))throw new v(e,t,"must be a 32-bit unsigned integer or an octal string");t=d(t,8)}return B(t,e),t},validateArray:U,validateStringArray:function(t,e){U(t,e);for(let r=0;r<t.length;r++)P(t[r],`${e}[${r}]`)},validateBooleanArray:function(t,e){U(t,e);for(let r=0;r<t.length;r++)R(t[r],`${e}[${r}]`)},validateAbortSignalArray:function(t,e){U(t,e);for(let r=0;r<t.length;r++){let i=t[r],n=`${e}[${r}]`;if(null==i)throw new _(n,"AbortSignal",i);N(i,n)}},validateBoolean:R,validateBuffer:D,validateDictionary:F,validateEncoding:function(t,e){let r=A(e),i=t.length;if("hex"===r&&i%2!=0)throw new v("encoding",e,`is invalid for data of length ${i}`)},validateFunction:z,validateInt32:M,validateInteger:k,validateNumber:function(t,e,r,i){if("number"!=typeof t)throw new _(e,"number",t);if(null!=r&&t<r||null!=i&&t>i||(null!=r||null!=i)&&l(t))throw new x(e,`${null!=r?`>= ${r}`:""}${null!=r&&null!=i?" && ":""}${null!=i?`<= ${i}`:""}`,t)},validateObject:O,validateOneOf:I,validatePlainFunction:j,validatePort:function(t,e="Port",r=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===m(t).length||+t!=t>>>0||t>65535||0===t&&!r)throw new b(e,t,r);return 0|t},validateSignalName:function(t,e="signal"){if(P(t,e),void 0===C[t]){if(void 0!==C[g(t)])throw new w(t+" (signals must use all capital letters)");throw new w(t)}},validateString:P,validateUint32:B,validateUndefined:$,validateUnion:function(t,e,r){if(!n(r,t))throw new _(e,`('${s(r,"|")}')`,t)},validateAbortSignal:N,validateLinkHeaderValue:function(t){if("string"==typeof t)return G(t,"hints"),t;if(i(t)){let e=t.length,r="";if(0===e)return r;for(let i=0;i<e;i++){let n=t[i];G(n,"hints"),r+=n,i!==e-1&&(r+=", ")}return r}throw new v("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},73599:(t,e,r)=>{"use strict";r.d(e,{E:()=>n});var i=r(72612);function n(t,e,r,n){let s=[`
506        var v = null;
507        var v2 = null;
508        var t = 0;
509        var index = 0;
510        var name = null;
511        var arrayOffset = null;
512    `],o=0;for(let a=0;a<t.length;a++){let l=t[a],h=l.data.name,u=!1,d=0;for(let t=0;t<i.$.length;t++)if(i.$[t].test(l.data)){d=l.offset/4,s.push(`name = "${h}";`,`offset += ${d-o};`,i.$[t][e]||i.$[t].ubo),u=!0;break}if(!u)if(l.data.size>1)d=l.offset/4,s.push(r(l,d-o));else{let t=n[l.data.type];d=l.offset/4,s.push(`
513                    v = uv.${h};
514                    offset += ${d-o};
515                    ${t};
516                `)}o=d}return Function("uv","data","dataInt32","offset",s.join("\n"))}},73608:(t,e,r)=>{"use strict";r.d(e,{Q:()=>P});var i={grad:.9,turn:360,rad:360/(2*Math.PI)},n=function(t){return"string"==typeof t?t.length>0:"number"==typeof t},s=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},o=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=1),t>r?r:t>e?t:e},a=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},l=function(t){return{r:o(t.r,0,255),g:o(t.g,0,255),b:o(t.b,0,255),a:o(t.a)}},h=function(t){return{r:s(t.r),g:s(t.g),b:s(t.b),a:s(t.a,3)}},u=/^#([0-9a-f]{3,8})$/i,d=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},c=function(t){var e=t.r,r=t.g,i=t.b,n=t.a,s=Math.max(e,r,i),o=s-Math.min(e,r,i),a=o?s===e?(r-i)/o:s===r?2+(i-e)/o:4+(e-r)/o:0;return{h:60*(a<0?a+6:a),s:s?o/s*100:0,v:s/255*100,a:n}},f=function(t){var e=t.h,r=t.s,i=t.v,n=t.a;e=e/360*6,r/=100,i/=100;var s=Math.floor(e),o=i*(1-r),a=i*(1-(e-s)*r),l=i*(1-(1-e+s)*r),h=s%6;return{r:255*[i,a,o,o,l,i][h],g:255*[l,i,i,a,o,o][h],b:255*[o,o,l,i,i,a][h],a:n}},p=function(t){return{h:a(t.h),s:o(t.s,0,100),l:o(t.l,0,100),a:o(t.a)}},g=function(t){return{h:s(t.h),s:s(t.s),l:s(t.l),a:s(t.a,3)}},m=function(t){var e,r;return f((e=t.s,{h:t.h,s:(e*=((r=t.l)<50?r:100-r)/100)>0?2*e/(r+e)*100:0,v:r+e,a:t.a}))},y=function(t){var e,r,i,n;
516return{h:(e=c(t)).h,s:(n=(200-(r=e.s))*(i=e.v)/100)>0&&n<200?r*i/100/(n<=100?n:200-n)*100:0,l:n/2,a:e.a}},b=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,x=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w={string:[[function(t){var e=u.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?s(parseInt(t[3]+t[3],16)/255,2):1}:6===t.length||8===t.length?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:8===t.length?s(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=v.exec(t)||x.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:l({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:void 0===e[7]?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e,r,n=b.exec(t)||_.exec(t);return n?m(p({h:(e=n[1],void 0===(r=n[2])&&(r="deg"),Number(e)*(i[r]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)})):null},"hsl"]],object:[[function(t){var e=t.r,r=t.g,i=t.b,s=t.a;return n(e)&&n(r)&&n(i)?l({r:Number(e),g:Number(r),b:Number(i),a:Number(void 0===s?1:s)}):null},"rgb"],[function(t){var e=t.h,r=t.s,i=t.l,s=t.a;return n(e)&&n(r)&&n(i)?m(p({h:Number(e),s:Number(r),l:Number(i),a:Number(void 0===s?1:s)})):null},"hsl"],[function(t){var e,r=t.h,i=t.s,s=t.v,l=t.a;return n(r)&&n(i)&&n(s)?f({h:a((e={h:Number(r),s:Number(i),v:Number(s),a:Number(void 0===l?1:l)}).h),s:o(e.s,0,100),v:o(e.v,0,100),a:o(e.a)}):null},"hsv"]]},A=function(t,e){for(var r=0;r<e.length;r++){var i=e[r][0](t);if(i)return[i,e[r][1]]}return[null,void 0]},S=function(t,e){var r=y(t);return{h:r.h,s:o(r.s+100*e,0,100),l:r.l,a:r.a}},T=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},C=function(t,e){var r=y(t);return{h:r.h,s:r.s,l:o(r.l+100*e,0,100),a:r.a}},E=function(){function t(t){this.parsed=("string"==typeof t?A(t.trim(),w.string):"object"==typeof t&&null!==t?A(t,w.object):[null,void 0])[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return null!==this.parsed},t.prototype.brightness=function(){return s(T(this.rgba),2)},t.prototype.isDark=function(){return .5>T(this.rgba)},t.prototype.isLight=function(){return T(this.rgba)>=.5},t.prototype.toHex=function(){var t,e,r,i,n,o;return e=(t=h(this.rgba)).r,r=t.g,i=t.b,o=(n=t.a)<1?d(s(255*n)):"","#"+d(e)+d(r)+d(i)+o},t.prototype.toRgb=function(){return h(this.rgba)},t.prototype.toRgbString=function(){var t,e,r,i,n;return e=(t=h(this.rgba)).r,r=t.g,i=t.b,(n=t.a)<1?"rgba("+e+", "+r+", "+i+", "+n+")":"rgb("+e+", "+r+", "+i+")"},t.prototype.toHsl=function(){return g(y(this.rgba))},t.prototype.toHslString=function(){var t,e,r,i,n;return e=(t=g(y(this.rgba))).h,r=t.s,i=t.l,(n=t.a)<1?"hsla("+e+", "+r+"%, "+i+"%, "+n+")":"hsl("+e+", "+r+"%, "+i+"%)"},t.prototype.toHsv=function(){var t;return{h:s((t=c(this.rgba)).h),s:s(t.s),v:s(t.v),a:s(t.a,3)}},t.prototype.invert=function(){var t;return k({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a})},t.prototype.saturate=function(t){return void 0===t&&(t=.1),k(S(this.rgba,t))},t.prototype.desaturate=function(t){return void 0===t&&(t=.1),k(S(this.rgba,-t))},t.prototype.grayscale=function(){return k(S(this.rgba,-1))},t.prototype.lighten=function(t){return void 0===t&&(t=.1),k(C(this.rgba,t))},t.prototype.darken=function(t){return void 0===t&&(t=.1),k(C(this.rgba,-t))},t.prototype.rotate=function(t){return void 0===t&&(t=15),this.hue(this.hue()+t)},t.prototype.alpha=function(t){var e;return"number"==typeof t?k({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):s(this.rgba.a,3)},t.prototype.hue=function(t){var e=y(this.rgba);return"number"==typeof t?k({h:t,s:e.s,l:e.l,a:e.a}):s(e.h)},t.prototype.isEqual=function(t){return this.toHex()===k(t).toHex()},t}(),k=function(t){return t instanceof E?t:new E(t)},M=[];[function(t,e){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",s
516andybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var n in r)i[r[n]]=n;var s={};t.prototype.toName=function(e){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var n,o=i[this.toHex()];if(o)return o;if(null==e?void 0:e.closest){var a=this.toRgb(),l=1/0,h="black";if(!s.length)for(var u in r)s[u]=new t(r[u]).toRgb();for(var d in r){var c=(n=s[d],Math.pow(a.r-n.r,2)+Math.pow(a.g-n.g,2)+Math.pow(a.b-n.b,2));c<l&&(l=c,h=d)}return h}},e.string.push([function(e){var i=e.toLowerCase(),n="transparent"===i?"#0000":r[i];return n?new t(n).toRgb():null},"name"])}].forEach(function(t){0>M.indexOf(t)&&(t(E,w),M.push(t))});let B=class t{constructor(t=0xffffff){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=0xffffff,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(e){if(e instanceof t)this._value=this._cloneSource(e._value),this._int=e._int,this._components.set(e._components);else if(null===e)throw Error("Cannot set Color#value to null");else null!==this._value&&this._isSourceEqual(this._value,e)||(this._value=this._cloneSource(e),this._normalize(this._value))}get value(){return this._value}_cloneSource(t){if("string"==typeof t||"number"==typeof t||t instanceof Number||null===t);else if(Array.isArray(t)||ArrayBuffer.isView(t))return t.slice(0);else if("object"==typeof t&&null!==t)return{...t};return t}_isSourceEqual(t,e){let r=typeof t;if(r!==typeof e)return!1;if("number"===r||"string"===r||t instanceof Number);else if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length===e.length&&t.every((t,r)=>t===e[r]);else if(null!==t&&null!==e){let r=Object.keys(t),i=Object.keys(e);return r.length===i.length&&r.every(r=>t[r]===e[r])}return t===e}toRgba(){let[t,e,r,i]=this._components;return{r:t,g:e,b:r,a:i}}toRgb(){let[t,e,r]=this._components;return{r:t,g:e,b:r}}toRgbaString(){let[t,e,r]=this.toUint8RgbArray();return`rgba(${t},${e},${r},${this.alpha})`}toUint8RgbArray(t){let[e,r,i]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(255*e),t[1]=Math.round(255*r),t[2]=Math.round(255*i),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);let[e,r,i,n]=this._components;return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);let[e,r,i]=this._components;return t[0]=e,t[1]=r,t[2]=i,t}toNumber(){return this._int}toBgrNumber(){let[t,e,r]=this.toUint8RgbArray();return(r<<16)+(e<<8)+t}toLittleEndianNumber(){let t=this._int;return(t>>16)+(65280&t)+((255&t)<<16)}multiply(e){let[r,i,n,s]=t._temp.setValue(e)._components;return this._components[0]*=r,this._components[1]*=i,this._components[2]*=n,this._components[3]*=s,this._refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,e=!0){if(1===t)return -0x1000000+this._int;if(0===t)return e?0:this._int;let r=this._int>>16&255,i=this._int>>8&255,n=255&this._int;return e&&(r=r*t+.5|0,i=i*t+.5|0,n=n*t+.5|0),(255*t<<24)+(r<<16)+(i<<8)+n}toHex(){let t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){let t=Math.round(255*this._components[3]).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(t){return this._components[3]=this._clamp(t),this}_normalize(e){let r,i,n,s;if(("number"==typeof e||e instanceof Number)&&e>=0&&e<=0xffffff){let t=e;r=(t>>16&255)/255,i=(t>>8&255)/255,n=(255&t)/255,s=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[r,i,n,s=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[r,i,n,s=255]=e,r/=255,i/=255,n/=255,s/=255;else if("string"==typeof e||"object"==typeof e){if("string"==typeof e){let r=t.HEX_PATTERN.exec(e);r&&(e=`#${r[2]}
516`)}let o=k(e);o.isValid()&&({r,g:i,b:n,a:s}=o.rgba,r/=255,i/=255,n/=255)}if(void 0!==r)this._components[0]=r,this._components[1]=i,this._components[2]=n,this._components[3]=s,this._refreshInt();else throw Error(`Unable to convert color ${e}`)}_refreshInt(){this._clamp(this._components);let[t,e,r]=this._components;this._int=(255*t<<16)+(255*e<<8)+(255*r|0)}_clamp(t,e=0,r=1){return"number"==typeof t?Math.min(Math.max(t,e),r):(t.forEach((i,n)=>{t[n]=Math.min(Math.max(i,e),r)}),t)}static isColorLike(e){return"number"==typeof e||"string"==typeof e||e instanceof Number||e instanceof t||Array.isArray(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Float32Array||void 0!==e.r&&void 0!==e.g&&void 0!==e.b||void 0!==e.r&&void 0!==e.g&&void 0!==e.b&&void 0!==e.a||void 0!==e.h&&void 0!==e.s&&void 0!==e.l||void 0!==e.h&&void 0!==e.s&&void 0!==e.l&&void 0!==e.a||void 0!==e.h&&void 0!==e.s&&void 0!==e.v||void 0!==e.h&&void 0!==e.s&&void 0!==e.v&&void 0!==e.a}};B.shared=new B,B._temp=new B,B.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let P=B},74743:(t,e,r)=>{"use strict";function i(t,e,r,i){let n={width:0,height:0,offsetY:0,scale:e.fontSize/r.baseMeasurementFontSize,lines:[{width:0,charPositions:[],spaceWidth:0,spacesIndex:[],chars:[]}]};n.offsetY=r.baseLineOffset;let s=n.lines[0],o=null,a=!0,l={spaceWord:!1,width:0,start:0,index:0,positions:[],chars:[]},h=t=>{let e=s.width;for(let r=0;r<l.index;r++){let i=t.positions[r];s.chars.push(t.chars[r]),s.charPositions.push(i+e)}s.width+=t.width,a=!1,l.width=0,l.index=0,l.chars.length=0},u=()=>{let t=s.chars.length-1;if(i){let e=s.chars[t];for(;" "===e;)s.width-=r.chars[e].xAdvance,e=s.chars[--t]}n.width=Math.max(n.width,s.width),s={width:0,charPositions:[],chars:[],spaceWidth:0,spacesIndex:[]},a=!0,n.lines.push(s),n.height+=r.lineHeight},d=r.baseMeasurementFontSize/e.fontSize,c=e.letterSpacing*d,f=e.wordWrapWidth*d;for(let i=0;i<t.length+1;i++){let n,d=i===t.length;d||(n=t[i]);let p=r.chars[n]||r.chars[" "];if(/(?:\s)/.test(n)||"\r"===n||"\n"===n||d){if(!a&&e.wordWrap&&s.width+l.width-c>f?u():l.start=s.width,h(l),d||s.charPositions.push(0),"\r"===n||"\n"===n)0!==s.width&&u();else if(!d){let t=p.xAdvance+(p.kerning[o]||0)+c;
516s.width+=t,s.spaceWidth=t,s.spacesIndex.push(s.charPositions.length),s.chars.push(n)}}else{let t=p.kerning[o]||0,e=p.xAdvance+t+c;l.positions[l.index++]=l.width+t,l.chars.push(n),l.width+=e}o=n}return u(),"center"===e.align?function(t){for(let e=0;e<t.lines.length;e++){let r=t.lines[e],i=t.width/2-r.width/2;for(let t=0;t<r.charPositions.length;t++)r.charPositions[t]+=i}}(n):"right"===e.align?function(t){for(let e=0;e<t.lines.length;e++){let r=t.lines[e],i=t.width-r.width;for(let t=0;t<r.charPositions.length;t++)r.charPositions[t]+=i}}(n):"justify"===e.align&&function(t){let e=t.width;for(let r=0;r<t.lines.length;r++){let i=t.lines[r],n=0,s=i.spacesIndex[n++],o=0,a=i.spacesIndex.length,l=(e-i.width)/a;for(let t=0;t<i.charPositions.length;t++)t===s&&(s=i.spacesIndex[n++],o+=l),i.charPositions[t]+=o}}(n),n}r.d(e,{Z:()=>i})},75408:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i=r(64833);class n{constructor(){this._poolsByClass=new Map}prepopulate(t,e){this.getPool(t).prepopulate(e)}get(t,e){return this.getPool(t).get(e)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new i.b(t)),this._poolsByClass.get(t)}stats(){let t={};return this._poolsByClass.forEach(e=>{let r=t[e._classType.name]?e._classType.name+e._classType.ID:e._classType.name;t[r]={free:e.totalFree,used:e.totalUsed,size:e.totalSize}}),t}}let s=new n},76055:(t,e,r)=>{"use strict";r.d(e,{T:()=>i});class i{constructor(t){this.resources=Object.create(null),this._dirty=!0;let e=0;for(const r in t){const i=t[r];this.setResource(i,e++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;let t=[],e=0;for(let r in this.resources)t[e++]=this.resources[r]._resourceId;this._key=t.join("|")}setResource(t,e){let r=this.resources[e];t!==r&&(r&&t.off?.("change",this.onResourceChange,this),t.on?.("change",this.onResourceChange,this),this.resources[e]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t){let e=this.resources;for(let r in e)e[r]._touched=t}destroy(){let t=this.resources;for(let e in t){let r=t[e];r.off?.("change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){if(this._dirty=!0,t.destroyed){let e=this.resources;for(let r in e)e[r]===t&&(e[r]=null)}else this._updateKey()}}},76301:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(47397);function n(t){if("string"!=typeof t)throw TypeError(`Path must be a string. Received ${JSON.stringify(t)}`)}function s(t){return t.split("?")[0].split("#")[0]}let o={toPosix:t=>t.replace(RegExp("\\".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),"/"),isUrl(t){return/^https?:/.test(this.toPosix(t))},isDataUrl:t=>/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(t),isBlobUrl:t=>t.startsWith("blob:"),hasProtocol(t){return/^[^/:]+:/.test(this.toPosix(t))},getProtocol(t){n(t),t=this.toPosix(t);let e=/^file:\/\/\//.exec(t);if(e)return e[0];let r=/^[^/:]+:\/{0,2}/.exec(t);return r?r[0]:""},toAbsolute(t,e,r){if(n(t),this.isDataUrl(t)||this.isBlobUrl(t))return t;let a=s(this.toPosix(e??i.e.get().getBaseUrl())),l=s(this.toPosix(r??this.rootname(a)));return(t=this.toPosix(t)).startsWith("/")?o.join(l,t.slice(1)):this.isAbsolute(t)?t:this.join(a,t)},normalize(t){if(n(t),0===t.length)return".";if(this.isDataUrl(t)||this.isBlobUrl(t))return t;t=this.toPosix(t);let e="",r=t.startsWith("/");this.hasProtocol(t)&&(e=this.rootname(t),t=t.slice(e.length));let i=t.endsWith("/");return((t=function(t,e){let r="",i=0,n=-1,s=0,o=-1;for(let a=0;a<=t.length;++a){if(a<t.length)o=t.charCodeAt(a);else if(47===o)break;else o=47;if(47===o){if(n===a-1||1===s);else if(n!==a-1&&2===s){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2)){if(r.length>2){let t=r.lastIndexOf("/");if(t!==r.length-1){-1===t?(r="",i=0):i=(r=r.slice(0,t)).length-1-r.lastIndexOf("/"),n=a,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,n=a,s=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+=`/${t.slice(n+1,a)}`:r=t.slice(n+1,a),i=a-n-1;n=a,s=0}else 46===o&&-1!==s?++s:s=-1}return r}(t,!1)).length>0&&i&&(t+="/"),r)?`/${t}`:e+t},isAbsolute(t){return n(t),t=this.toPosix(t),!!this.hasProtocol(t)||t.startsWith("/")},join(...t){let e;if(0===t.length)return".";for(let r=0;r<t.length;++r){let i=t[r];
516if(n(i),i.length>0)if(void 0===e)e=i;else{let n=t[r-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return void 0===e?".":this.normalize(e)},dirname(t){if(n(t),0===t.length)return".";let e=(t=this.toPosix(t)).charCodeAt(0),r=47===e,i=-1,s=!0,o=this.getProtocol(t),a=t;t=t.slice(o.length);for(let r=t.length-1;r>=1;--r)if(47===(e=t.charCodeAt(r))){if(!s){i=r;break}}else s=!1;return -1===i?r?"/":this.isUrl(a)?o+t:o:r&&1===i?"//":o+t.slice(0,i)},rootname(t){n(t);let e="";if(e=(t=this.toPosix(t)).startsWith("/")?"/":this.getProtocol(t),this.isUrl(t)){let r=t.indexOf("/",e.length);(e=-1!==r?t.slice(0,r):t).endsWith("/")||(e+="/")}return e},basename(t,e){let r;n(t),e&&n(e),t=s(this.toPosix(t));let i=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";let n=e.length-1,s=-1;for(r=t.length-1;r>=0;--r){let l=t.charCodeAt(r);if(47===l){if(!a){i=r+1;break}}else -1===s&&(a=!1,s=r+1),n>=0&&(l===e.charCodeAt(n)?-1==--n&&(o=r):(n=-1,o=s))}return i===o?o=s:-1===o&&(o=t.length),t.slice(i,o)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!a){i=r+1;break}}else -1===o&&(a=!1,o=r+1);return -1===o?"":t.slice(i,o)},extname(t){n(t),t=s(this.toPosix(t));let e=-1,r=0,i=-1,o=!0,a=0;for(let n=t.length-1;n>=0;--n){let s=t.charCodeAt(n);if(47===s){if(!o){r=n+1;break}continue}-1===i&&(o=!1,i=n+1),46===s?-1===e?e=n:1!==a&&(a=1):-1!==e&&(a=-1)}return -1===e||-1===i||0===a||1===a&&e===i-1&&e===r+1?"":t.slice(e,i)},parse(t){let e;n(t);let r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;let i=(t=s(this.toPosix(t))).charCodeAt(0),o=this.isAbsolute(t);r.root=this.rootname(t),e=o||this.hasProtocol(t)?1:0;let a=-1,l=0,h=-1,u=!0,d=t.length-1,c=0;for(;d>=e;--d){if(47===(i=t.charCodeAt(d))){if(!u){l=d+1;break}continue}-1===h&&(u=!1,h=d+1),46===i?-1===a?a=d:1!==c&&(c=1):-1!==a&&(c=-1)}return -1===a||-1===h||0===c||1===c&&a===h-1&&a===l+1?-1!==h&&(0===l&&o?r.base=r.name=t.slice(1,h):r.base=r.name=t.slice(l,h)):(0===l&&o?(r.name=t.slice(1,a),r.base=t.slice(1,h)):(r.name=t.slice(l,a),r.base=t.slice(l,h)),r.ext=t.slice(a,h)),r.dir=this.dirname(t),r},sep:"/",delimiter:":",joinExtensions:[".html"]}},76979:(t,e,r)=>{"use strict";r.d(e,{v:()=>s});var i=r(66888),n=r(70242);class s extends i.A{constructor(){super(...arguments),this.chars=Object.create(null),this.lineHeight=0,this.fontFamily="",this.fontMetrics={fontSize:0,ascent:0,descent:0},this.baseLineOffset=0,this.distanceField={type:"none",range:0},this.pages=[],this.applyFillAsTint=!0,this.baseMeasurementFontSize=100,this.baseRenderedFontSize=100}get font(){return(0,n.t6)(n.lj,"BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),this.fontFamily}get pageTextures(){return(0,n.t6)(n.lj,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}get size(){return(0,n.t6)(n.lj,"BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),this.fontMetrics.fontSize}get distanceFieldRange(){return(0,n.t6)(n.lj,"BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),this.distanceField.range}get distanceFieldType(){return(0,n.t6)(n.lj,"BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),this.distanceField.type}destroy(t=!1){for(let t in this.emit("destroy",this),this.removeAllListeners(),this.chars)this.chars[t].texture?.destroy();this.chars=null,t&&(this.pages.forEach(t=>t.texture.destroy(!0)),this.pages=null)}}},78128:(t,e,r)=>{"use strict";r.d(e,{R:()=>o});var i=r(95620);class n{constructor(t,e=null,r=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=e,this.priority=r,this._once=i}match(t,e=null){return this._fn===t&&this._context===e}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));let e=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),e}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);let e=this.next;return this.next=t?null:e,this.previous=null,e}}let s=class t{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new n(null,null,1/0),this.deltaMS=1/t.targetFPMS,this.elapsedMS=1/t.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&null===this._requestId&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,e,r=i.d.NORMAL){return this._addListener(new n(t,e,r))}addOnce(t,e,r=i.d.NORMAL){return this._addListener(new n(t,e,r,!0))}_addListener(t){let e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this}remove(t,e){let r=this._head.next;for(;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let r;if(e>this.lastTime){if((r=this.elapsedMS=e-this.lastTime)>this._maxElapsedMS&&(r=this._maxElapsedMS),r*=this.speed,this._minElapsedMS){let t=e-this._lastFrame|0;if(t<this._minElapsedMS)return;this._lastFrame=e-t%this._minElapsedMS}this.deltaMS=r,this.deltaTime=this.deltaMS*t.targetFPMS;let i=this._head,n=i.next;for(;n;
516)n=n.emit(this);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){let r=Math.min(Math.max(0,Math.min(this.maxFPS,e))/1e3,t.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){if(0===t)this._minElapsedMS=0;else{let e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!t._shared){let e=t._shared=new t;e.autoStart=!0,e._protected=!0}return t._shared}static get system(){if(!t._system){let e=t._system=new t;e.autoStart=!0,e._protected=!0}return t._system}};s.targetFPMS=.06;let o=s},78214:t=>{"use strict";function e(t,e,u){u=u||2;var d,p,m,y,b,_,v,x=e&&e.length,w=x?e[0]*u:t.length,A=r(t,0,w,u,!0),S=[];if(!A||A.next===A.prev)return S;if(x&&(A=function(t,e,s,l){var h,u,d,p,g,m=[];for(h=0,u=e.length;h<u;h++)d=e[h]*l,p=h<u-1?e[h+1]*l:t.length,(g=r(t,d,p,l,!1))===g.next&&(g.steiner=!0),m.push(function(t){var e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}(g));for(m.sort(n),h=0;h<m.length;h++)s=function(t,e){var r=function(t,e){var r,i,n,s=e,l=t.x,h=t.y,u=-1/0;do{if(h<=s.y&&h>=s.next.y&&s.next.y!==s.y){var d=s.x+(h-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(d<=l&&d>u&&(u=d,n=s.x<s.next.x?s:s.next,d===l))return n}s=s.next}while(s!==e);if(!n)return null;var f,p=n,g=n.x,m=n.y,y=1/0;s=n;do{l>=s.x&&s.x>=g&&l!==s.x&&o(h<m?l:u,h,g,m,h<m?u:l,h,s.x,s.y)&&(f=Math.abs(h-s.y)/(l-s.x),c(s,t)&&(f<y||f===y&&(s.x>n.x||s.x===n.x&&(r=n,i=s,0>a(r.prev,r,i.prev)&&0>a(i.next,r,r.next))))&&(n=s,y=f)),s=s.next}while(s!==p);return n}(t,e);if(!r)return e;var n=f(r,t);return i(n,n.next),i(r,r.next)}(m[h],s);return s}(t,e,A,u)),t.length>80*u){d=m=t[0],p=y=t[1];for(var T=u;T<w;T+=u)b=t[T],_=t[T+1],b<d&&(d=b),_<p&&(p=_),b>m&&(m=b),_>y&&(y=_);v=0!==(v=Math.max(m-d,y-p))?32767/v:0}return function t(e,r,n,u,d,p,m){if(e){!m&&p&&function(t,e,r,i){var n=t;do 0===n.z&&(n.z=s(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,s,o,a,l,h=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,i=r,a=0,e=0;e<h&&(a++,i=i.nextZ);e++);for(l=h;a>0||l>0&&i;)0!==a&&(0===l||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,l--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;r=i}s.nextZ=null,h*=2}while(o>1)}(n)}(e,u,d,p);for(var y,b,_=e;e.prev!==e.next;){if(y=e.prev,b=e.next,p?function(t,e,r,i){var n=t.prev,l=t.next;if(a(n,t,l)>=0)return!1;for(var h=n.x,u=t.x,d=l.x,c=n.y,f=t.y,p=l.y,g=h<u?h<d?h:d:u<d?u:d,m=c<f?c<p?c:p:f<p?f:p,y=h>u?h>d?h:d:u>d?u:d,b=c>f?c>p?c:p:f>p?f:p,_=s(g,m,e,r,i),v=s(y,b,e,r,i),x=t.prevZ,w=t.nextZ;x&&x.z>=_&&w&&w.z<=v;){if(x.x>=g&&x.x<=y&&x.y>=m&&x.y<=b&&x!==n&&x!==l&&o(h,c,u,f,d,p,x.x,x.y)&&a(x.prev,x,x.next)>=0||(x=x.prevZ,w.x>=g&&w.x<=y&&w.y>=m&&w.y<=b&&w!==n&&w!==l&&o(h,c,u,f,d,p,w.x,w.y)&&a(w.prev,w,w.next)>=0))return!1;w=w.nextZ}for(;x&&x.z>=_;){if(x.x>=g&&x.x<=y&&x.y>=m&&x.y<=b&&x!==n&&x!==l&&o(h,c,u,f,d,p,x.x,x.y)&&a(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;w&&w.z<=v;){if(w.x>=g&&w.x<=y&&w.y>=m&&w.y<=b&&w!==n&&w!==l&&o(h,c,u,f,d,p,w.x,w.y)&&a(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}(e,u,d,p):function(t){var e=t.prev,r=t.next;if(a(e,t,r)>=0)return!1;for(var i=e.x,n=t.x,s=r.x,l=e.y,h=t.y,u=r.y,d=i<n?i<s?i:s:n<s?n:s,c=l<h?l<u?l:u:h<u?h:u,f=i>n?i>s?i:s:n>s?n:s,p=l>h?l>u?l:u:h>u?h:u,g=r.next;g!==e;){if(g.x>=d&&g.x<=f&&g.y>=c&&g.y<=p&&o(i,l,n,h,s,u,g.x,g.y)&&a(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}(e)){r.push(y.i/n|0),r.push(e.i/n|0),r.push(b.i/n|0),g(e),e=b.next,_=b.next;continue}if((e=b)===_){m?1===m?t(e=function(t,e,r){var n=t;do{var s=n.prev,o=n.next.next;!l(s,o)&&h(s,n,n.next,o)&&c(s,o)&&c(o,s)&&(e.push(s.i/r|0),e.push(n.i/r|0),e.push(o.i/r|0),g(n),g(n.next),n=t=o),n=n.next}while(n!==t);return i(n)}(i(e),r,n),r,n,u,d,p,2):2===m&&function(e,r,n,s,o,u){var d=e;do{for(var p,g,m=d.next.next;m!==d.prev;){if(d.i!==m.i&&(p=d,g=m,p.next.i!==g.i&&p.prev.i!==g.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&h(r,r.next,t,e))return!0;r=r.next}
516while(r!==t);return!1}(p,g)&&(c(p,g)&&c(g,p)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,s=(t.y+e.y)/2;do r.y>s!=r.next.y>s&&r.next.y!==r.y&&n<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==t);return i}(p,g)&&(a(p.prev,p,g.prev)||a(p,g.prev,g))||l(p,g)&&a(p.prev,p,p.next)>0&&a(g.prev,g,g.next)>0))){var y=f(d,m);d=i(d,d.next),y=i(y,y.next),t(d,r,n,s,o,u,0),t(y,r,n,s,o,u,0);return}m=m.next}d=d.next}while(d!==e)}(e,r,n,u,d,p):t(i(e),r,n,u,d,p,1);break}}}}(A,S,u,d,p,v,0),S}function r(t,e,r,i,n){var s,o;if(n===y(t,e,r,i)>0)for(s=e;s<r;s+=i)o=p(s,t[s],t[s+1],o);else for(s=r-i;s>=e;s-=i)o=p(s,t[s],t[s+1],o);return o&&l(o,o.next)&&(g(o),o=o.next),o}function i(t,e){if(!t)return t;e||(e=t);var r,i=t;do if(r=!1,!i.steiner&&(l(i,i.next)||0===a(i.prev,i,i.next))){if(g(i),(i=e=i.prev)===i.next)break;r=!0}else i=i.next;while(r||i!==e);return e}function n(t,e){return t.x-e.x}function s(t,e,r,i,n){return(t=((t=((t=((t=((t=(t-r)*n|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)|(e=((e=((e=((e=((e=(e-i)*n|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)<<1}function o(t,e,r,i,n,s,o,a){return(n-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(i-a)>=(r-o)*(e-a)&&(r-o)*(s-a)>=(n-o)*(i-a)}function a(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function l(t,e){return t.x===e.x&&t.y===e.y}function h(t,e,r,i){var n=d(a(t,e,r)),s=d(a(t,e,i)),o=d(a(r,i,t)),l=d(a(r,i,e));return!!(n!==s&&o!==l||0===n&&u(t,r,e)||0===s&&u(t,i,e)||0===o&&u(r,t,i)||0===l&&u(r,e,i))}function u(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function d(t){return t>0?1:t<0?-1:0}function c(t,e){return 0>a(t.prev,t,t.next)?a(t,e,t.next)>=0&&a(t,t.prev,e)>=0:0>a(t,e,t.prev)||0>a(t,t.next,e)}function f(t,e){var r=new m(t.i,t.x,t.y),i=new m(e.i,e.x,e.y),n=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,s.next=i,i.prev=s,i}function p(t,e,r,i){var n=new m(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function g(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 m(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function y(t,e,r,i){for(var n=0,s=e,o=r-i;s<r;s+=i)n+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return n}t.exports=e,t.exports.default=e,e.deviation=function(t,e,r,i){var n=e&&e.length,s=n?e[0]*r:t.length,o=Math.abs(y(t,0,s,r));if(n)for(var a=0,l=e.length;a<l;a++){var h=e[a]*r,u=a<l-1?e[a+1]*r:t.length;o-=Math.abs(y(t,h,u,r))}var d=0;for(a=0;a<i.length;a+=3){var c=i[a]*r,f=i[a+1]*r,p=i[a+2]*r;d+=Math.abs((t[c]-t[p])*(t[f+1]-t[c+1])-(t[c]-t[f])*(t[p+1]-t[c+1]))}return 0===o&&0===d?0:Math.abs((d-o)/o)},e.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var s=0;s<t[n].length;s++)for(var o=0;o<e;o++)r.vertices.push(t[n][s][o]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},79662:(t,e,r)=>{"use strict";let i;r.d(e,{W:()=>s});var n=r(47397);function s(){return(!i||i?.isContextLost())&&(i=n.e.get().createCanvas().getContext("webgl",{})),i}},80115:(t,e,r)=>{"use strict";var i=r(24793),n=r(34943),s=r(28513),o=r(46480);let a=[];function l(t={}){let e=t&&t.resource,r=e?t.resource:t,i=e?t:{resource:t};for(let t=0;t<a.length;t++){let e=a[t];
516if(e.test(r))return new e(i)}throw Error(`Could not find a source type for resource: ${i.resource}`)}n.XO.handleByList(n.Ag.TextureSource,a),o.g.from=function(t,e=!1){return"string"==typeof t?i.l.get(t):t instanceof s.v?new o.g({source:t}):function(t={},e=!1){let r=t&&t.resource,n=r?t.resource:t,s=r?t:{resource:t};if(!e&&i.l.has(n))return i.l.get(n);let a=new o.g({source:l(s)});return a.on("destroy",()=>{i.l.has(n)&&i.l.remove(n)}),e||i.l.set(n,a),a}(t,e)},s.v.from=l},80830:t=>{t.exports=function(t){var n=[];return t.replace(r,function(t,r,s){var o,a=r.toLowerCase();for(s=(o=s.match(i))?o.map(Number):[],"m"==a&&s.length>2&&(n.push([r].concat(s.splice(0,2))),a="l",r="m"==r?"l":"L");;){if(s.length==e[a])return s.unshift(r),n.push(s);if(s.length<e[a])throw Error("malformed path data");n.push([r].concat(s.splice(0,e[a])))}}),n};var e={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/ig,i=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig},81344:(t,e,r)=>{"use strict";let{ObjectSetPrototypeOf:i}=r(34418);t.exports=s;let n=r(85394);function s(t){if(!(this instanceof s))return new s(t);n.call(this,t)}i(s.prototype,n.prototype),i(s,n),s.prototype._transform=function(t,e,r){r(null,t)}},81935:(t,e,r)=>{"use strict";r.d(e,{u:()=>n});var i,n=((i=n||{})[i.NONE=0]="NONE",i[i.COLOR=16384]="COLOR",i[i.STENCIL=1024]="STENCIL",i[i.DEPTH=256]="DEPTH",i[i.COLOR_DEPTH=16640]="COLOR_DEPTH",i[i.COLOR_STENCIL=17408]="COLOR_STENCIL",i[i.DEPTH_STENCIL=1280]="DEPTH_STENCIL",i[i.ALL=17664]="ALL",i)},82347:(t,e,r)=>{"use strict";r.d(e,{l:()=>s});var i=r(20060),n=r(3092);class s extends n.mc{constructor(t){super(t),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._bounds=new i.c(0,1,0,0),this._boundsDirty=!0}get bounds(){return this._boundsDirty&&(this.updateBounds(),this._boundsDirty=!1),this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=+!!t}containsPoint(t){let e=this.bounds,{x:r,y:i}=t;return r>=e.minX&&r<=e.maxX&&i>=e.minY&&i<=e.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;let t=this.renderGroup||this.parentRenderGroup;t&&t.onChildViewUpdate(this)}destroy(t){super.destroy(t),this._bounds=null}collectRenderablesSimple(t,e,r){let{renderPipes:i,renderableGC:n}=e;i.blendMode.setBlendMode(this,this.groupBlendMode,t),i[this.renderPipeId].addRenderable(this,t),n.addRenderable(this),this.didViewUpdate=!1;let s=this.children,o=s.length;for(let i=0;i<o;i++)s[i].collectRenderables(t,e,r)}}},82646:(t,e,r)=>{"use strict";r.d(e,{N:()=>s});var i=r(19677);let n=new i.u;class s{constructor(t,e){this.mapCoord=new i.u,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,void 0===e?this.clampMargin=t.width<10?0:.5:this.clampMargin=e,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){this.texture!==t&&(this._texture?.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,e){void 0===e&&(e=t);let r=this.mapCoord;for(let i=0;i<t.length;i+=2){let n=t[i],s=t[i+1];e[i]=n*r.a+s*r.c+r.tx,e[i+1]=n*r.b+s*r.d+r.ty}return e}update(){let t=this._texture;this._updateID++;let e=t.uvs;this.mapCoord.set(e.x1-e.x0,e.y1-e.y0,e.x3-e.x0,e.y3-e.y0,e.x0,e.y0);let r=t.orig,i=t.trim;i&&(n.set(r.width/i.width,0,0,r.height/i.height,-i.x/i.width,-i.y/i.height),this.mapCoord.append(n));let s=t.source,o=this.uClampFrame,a=this.clampMargin/s._resolution,l=this.clampOffset/s._resolution;return o[0]=(t.frame.x+a+l)/s.width,o[1]=(t.frame.y+a+l)/s.height,o[2]=(t.frame.x+t.frame.width-a+l)/s.width,o[3]=(t.frame.y+t.frame.height-a+l)/s.height,this.uClampOffset[0]=this.clampOffset/s.pixelWidth,this.uClampOffset[1]=this.clampOffset/s.pixelHeight,this.isSimple=t.frame.width===s.width&&t.frame.height===s.height&&0===t.rotate,!0}}},82989:(t,e,r)=>{"use strict";r.d(e,{x:()=>c});var i=r(66888),n=r(73608),s=r(70242),o=r(22732),a=r(46120),l=r(63800),h=r(48342),u=r(87071);let d=class t extends i.A{constructor(e={}){super(),function(t){if("boolean"==typeof t.dropShadow&&t.dropShadow){let e=c.defaultDropShadow;t.dropShadow={alpha:t.dropShadowAlpha??e.alpha,angle:t.dropShadowAngle??e.angle,blur:t.dropShadowBlur??e.blur,color:t.dropShadowColor??e.color,distance:t.dropShadowDistance??e.distance}}if(void 0!==t.strokeThickness){(0,s.t6)(s.lj,"strokeThickness is now a part of stroke");let e=t.stroke,r={};if(n.Q.isColorLike(e))r.color=e;else if(e instanceof o._||e instanceof a.m)r.fill=e;else if(Object.hasOwnProperty.call(e,"color")||Object.hasOwnProperty.call(e,"fill"))r=e;else throw Error("Invalid stroke value.");t.stroke={...r,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){let e;(0,s.t6)(s.lj,"gradient fill is now a fill pattern: `new FillGradient(...)`"),null==t.fontSize?t.fontSize=c.defaultTextStyle.fontSize:e="string"==typeof t.fontSize?parseInt(t.fontSize,10):t.fontSize;let r=new o._({start:{x:0,y:0},end:{x:0,y:1.7*(e||0)}}),i=t.fillGradientStops.map(t=>n.Q.shared.setValue(t).toNumber());
516i.forEach((t,e)=>{let n=e/(i.length-1);r.addColorStop(n,t)}),t.fill={fill:r}}}(e);const r={...t.defaultTextStyle,...e};for(const t in r)this[t]=r[t];this.update()}get align(){return this._align}set align(t){this._align=t,this.update()}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords=t,this.update()}get dropShadow(){return this._dropShadow}set dropShadow(e){null!==e&&"object"==typeof e?this._dropShadow=this._createProxy({...t.defaultDropShadow,...e}):this._dropShadow=e?this._createProxy({...t.defaultDropShadow}):null,this.update()}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily=t,this.update()}get fontSize(){return this._fontSize}set fontSize(t){"string"==typeof t?this._fontSize=parseInt(t,10):this._fontSize=t,this.update()}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle=t.toLowerCase(),this.update()}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant=t,this.update()}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight=t,this.update()}get leading(){return this._leading}set leading(t){this._leading=t,this.update()}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing=t,this.update()}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight=t,this.update()}get padding(){return this._padding}set padding(t){this._padding=t,this.update()}get trim(){return this._trim}set trim(t){this._trim=t,this.update()}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline=t,this.update()}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace=t,this.update()}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap=t,this.update()}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth=t,this.update()}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._isFillStyle(t)&&(this._originalFill=this._createProxy({...l.T.defaultFillStyle,...t},()=>{this._fill=(0,h.w)({...this._originalFill},l.T.defaultFillStyle)})),this._fill=(0,h.w)(0===t?"black":t,l.T.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...l.T.defaultStrokeStyle,...t},()=>{this._stroke=(0,h.T)({...this._originalStroke},l.T.defaultStrokeStyle)})),this._stroke=(0,h.T)(t,l.T.defaultStrokeStyle),this.update())}_generateKey(){return this._styleKey=(0,u.V)(this),this._styleKey}update(){this._styleKey=null,this.emit("update",this)}reset(){let e=t.defaultTextStyle;for(let t in e)this[t]=e[t]}get styleKey(){return this._styleKey||this._generateKey()}clone(){return new t({align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,textBaseline:this.textBaseline,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth})}destroy(t=!1){if(this.removeAllListeners(),"boolean"==typeof t?t:t?.texture){let e="boolean"==typeof t?t:t?.textureSource;this._fill?.texture&&this._fill.texture.destroy(e),this._originalFill?.texture&&this._originalFill.texture.destroy(e),this._stroke?.texture&&this._stroke.texture.destroy(e),this._originalStroke?.texture&&this._originalStroke.texture.destroy(e)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,e){return new Proxy(t,{set:(t,r,i)=>(t[r]=i,e?.(r,i),this.update(),!0)})}_isFillStyle(t){return(t??null)!==null&&!(n.Q.isColorLike(t)||t instanceof o._||t instanceof a.m)}};d.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5},d.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let c=d},83460:(t,e,r)=>{"use strict";function i(t,e,r){let{width:i,height:n}=r.orig,s=r.trim;if(s){let r=s.width,o=s.height;t.minX=s.x-e._x*i,t.maxX=t.minX+r,t.minY=s.y-e._y*n,t.maxY=t.minY+o}else t.minX=-e._x*i,t.maxX=t.minX+i,t.minY=-e._y*n,t.maxY=t.minY+n}r.d(e,{y:()=>i})},85394:(t,e,r)=>{"use strict";let{ObjectSetPrototypeOf:i,Symbol:n}=r(34418);t.exports=h;
516let{ERR_METHOD_NOT_IMPLEMENTED:s}=r(60577).codes,o=r(20140),{getHighWaterMark:a}=r(52039);i(h.prototype,o.prototype),i(h,o);let l=n("kCallback");function h(t){if(!(this instanceof h))return new h(t);let e=t?a(this,t,"readableHighWaterMark",!0):null;0===e&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),o.call(this,t),this._readableState.sync=!1,this[l]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",d)}function u(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush((e,r)=>{e?t?t(e):this.destroy(e):(null!=r&&this.push(r),this.push(null),t&&t())})}function d(){this._final!==u&&u.call(this)}h.prototype._final=u,h.prototype._transform=function(t,e,r){throw new s("_transform()")},h.prototype._write=function(t,e,r){let i=this._readableState,n=this._writableState,s=i.length;this._transform(t,e,(t,e)=>{t?r(t):(null!=e&&this.push(e),n.ended||s===i.length||i.length<i.highWaterMark?r():this[l]=r)})},h.prototype._read=function(){if(this[l]){let t=this[l];this[l]=null,t()}}},86256:(t,e,r)=>{"use strict";r.d(e,{K:()=>i,l:()=>n});let i={f32:4,i32:4,"vec2<f32>":8,"vec3<f32>":12,"vec4<f32>":16,"vec2<i32>":8,"vec3<i32>":12,"vec4<i32>":16,"mat2x2<f32>":32,"mat3x3<f32>":48,"mat4x4<f32>":64};function n(t){let e=t.map(t=>({data:t,offset:0,size:0})),r=0,n=0;for(let t=0;t<e.length;t++){let s=e[t];if(!(r=i[s.data.type]))throw Error(`Unknown type ${s.data.type}`);s.data.size>1&&(r=Math.max(r,16)*s.data.size);let o=12===r?16:r;s.size=r;let a=n%16;a>0&&16-a<o?n+=(16-a)%16:n+=(r-a%r)%r,s.offset=n,n+=r}return{uboElements:e,size:n=16*Math.ceil(n/16)}}},86650:(t,e,r)=>{"use strict";let i,n=r(37811),{AbortError:s,codes:o}=r(60577),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:l}=o,{kEmptyObject:h,once:u}=r(43006),{validateAbortSignal:d,validateFunction:c,validateObject:f,validateBoolean:p}=r(72639),{Promise:g,PromisePrototypeThen:m,SymbolDispose:y}=r(34418),{isClosed:b,isReadable:_,isReadableNodeStream:v,isReadableStream:x,isReadableFinished:w,isReadableErrored:A,isWritable:S,isWritableNodeStream:T,isWritableStream:C,isWritableFinished:E,isWritableErrored:k,isNodeStream:M,willEmitClose:B,kIsClosedPromise:P}=r(71343),I=()=>{};function R(t,e,o){var p,g;if(2==arguments.length?(o=e,e=h):null==e?e=h:f(e,"options"),c(o,"callback"),d(e.signal,"options.signal"),o=u(o),x(t)||C(t))return function(t,e,o){let a=!1,l=I;if(e.signal)if(l=()=>{a=!0,o.call(t,new s(void 0,{cause:e.signal.reason}))},e.signal.aborted)n.nextTick(l);else{let n=(i=i||r(43006).addAbortListener)(e.signal,l),s=o;o=u((...e)=>{n[y](),s.apply(t,e)})}let h=(...e)=>{a||n.nextTick(()=>o.apply(t,e))};return m(t[P].promise,h,h),I}(t,e,o);if(!M(t))throw new a("stream",["ReadableStream","WritableStream","Stream"],t);let R=null!=(p=e.readable)?p:v(t),L=null!=(g=e.writable)?g:T(t),O=t._writableState,F=t._readableState,U=()=>{t.writable||z()},D=B(t)&&v(t)===R&&T(t)===L,N=E(t,!1),z=()=>{N=!0,t.destroyed&&(D=!1),D&&(!t.readable||R)||(!R||j)&&o.call(t)},j=w(t,!1),$=()=>{j=!0,t.destroyed&&(D=!1),D&&(!t.writable||L)||(!L||N)&&o.call(t)},W=e=>{o.call(t,e)},G=b(t),V=()=>{G=!0;let e=k(t)||A(t);return e&&"boolean"!=typeof e?o.call(t,e):R&&!j&&v(t,!0)&&!w(t,!1)||L&&!N&&!E(t,!1)?o.call(t,new l):void o.call(t)},H=()=>{G=!0;let e=k(t)||A(t);if(e&&"boolean"!=typeof e)return o.call(t,e);o.call(t)},Y=()=>{t.req.on("finish",z)};t.setHeader&&"function"==typeof t.abort?(t.on("complete",z),D||t.on("abort",V),t.req?Y():t.on("request",Y)):L&&!O&&(t.on("end",U),t.on("close",U)),D||"boolean"!=typeof t.aborted||t.on("aborted",V),t.on("end",$),t.on("finish",z),!1!==e.error&&t.on("error",W),t.on("close",V),G?n.nextTick(V):null!=O&&O.errorEmitted||null!=F&&F.errorEmitted?D||n.nextTick(H):!R&&(!D||_(t))&&(N||!1===S(t))||!L&&(!D||S(t))&&(j||!1===_(t))?n.nextTick(H):F&&t.req&&t.aborted&&n.nextTick(H);let X=()=>{o=I,t.removeListener("aborted",V),t.removeListener("complete",z),t.removeListener("abort",V),t.removeListener("request",Y),t.req&&t.req.removeListener("finish",z),t.removeListener("end",U
516),t.removeListener("close",U),t.removeListener("finish",z),t.removeListener("end",$),t.removeListener("error",W),t.removeListener("close",V)};if(e.signal&&!G){let a=()=>{let r=o;X(),r.call(t,new s(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)n.nextTick(a);else{let n=(i=i||r(43006).addAbortListener)(e.signal,a),s=o;o=u((...e)=>{n[y](),s.apply(t,e)})}}return X}t.exports=R,t.exports.finished=function(t,e){var r;let i=!1;return null===e&&(e=h),null!=(r=e)&&r.cleanup&&(p(e.cleanup,"cleanup"),i=e.cleanup),new g((r,n)=>{let s=R(t,e,t=>{i&&s(),t?n(t):r()})})}},87071:(t,e,r)=>{"use strict";r.d(e,{V:()=>s});var i=r(73608);let n=["align","breakWords","cssOverrides","fontVariant","fontWeight","leading","letterSpacing","lineHeight","padding","textBaseline","trim","whiteSpace","wordWrap","wordWrapWidth","fontFamily","fontStyle","fontSize"];function s(t){var e,r,s,a,l,h;let u=[],d=0;for(let e=0;e<n.length;e++){let r=`_${n[e]}`;u[d++]=t[r]}return d=o(t._fill,u,d),e=t._stroke,r=u,s=d,e&&(s=o(e,r,s),r[s++]=e.width,r[s++]=e.alignment,r[s++]=e.cap,r[s++]=e.join,r[s++]=e.miterLimit),d=s,a=t.dropShadow,l=u,h=d,a&&(l[h++]=a.alpha,l[h++]=a.angle,l[h++]=a.blur,l[h++]=a.distance,l[h++]=i.Q.shared.setValue(a.color).toNumber()),d=h,u.join("-")}function o(t,e,r){return t&&(e[r++]=t.color,e[r++]=t.alpha,e[r++]=t.fill?.styleKey),r}},90902:(t,e,r)=>{"use strict";let i,n,s;r.d(e,{lgM:()=>b,sP:()=>tL,mcf:()=>p.mc,A1g:()=>tF.A,M_G:()=>w.M,kxk:()=>tU.k,EYj:()=>tW,xJt:()=>t$.x,RvI:()=>tG.R});var o=r(34943);let a={extension:{type:o.Ag.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Promise.all([r.e(1619),r.e(2102)]).then(r.bind(r,62102))}},l={extension:{type:o.Ag.Environment,name:"webworker",priority:0},test:()=>"u">typeof self&&void 0!==self.WorkerGlobalScope,load:async()=>{await Promise.all([r.e(1619),r.e(3048)]).then(r.bind(r,43048))}};r(68021),r(68401);var h=r(47397),u=r(46508);async function d(t={}){return void 0!==n?n:n=await (async()=>{let e=h.e.get().getNavigator().gpu;if(!e)return!1;try{let r=await e.requestAdapter(t);return await r.requestDevice(),!0}catch(t){return!1}})()}let c=["webgl","webgpu","canvas"];async function f(t){let e,n=[];t.preference?(n.push(t.preference),c.forEach(e=>{e!==t.preference&&n.push(e)})):n=c.slice();let s={};for(let o=0;o<n.length;o++){let a=n[o];if("webgpu"===a&&await d()){let{WebGPURenderer:i}=await Promise.all([r.e(4374),r.e(4649)]).then(r.bind(r,34649));e=i,s={...t,...t.webgpu};break}if("webgl"===a&&function(t){return void 0!==i?i:i=(()=>{let e={stencil:!0,failIfMajorPerformanceCaveat:t??u.k.defaultOptions.failIfMajorPerformanceCaveat};try{if(!h.e.get().getWebGLRenderingContext())return!1;let t=h.e.get().createCanvas().getContext("webgl",e),r=!!t?.getContextAttributes()?.stencil;if(t){let e=t.getExtension("WEBGL_lose_context");e&&e.loseContext()}return t=null,r}catch(t){return!1}})()}(t.failIfMajorPerformanceCaveat??u.k.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:i}=await Promise.all([r.e(4374),r.e(448)]).then(r.bind(r,10448));e=i,s={...t,...t.webgl};break}if("canvas"===a)throw s={...t},Error("CanvasRenderer is not yet implemented")}if(delete s.webgpu,delete s.webgl,!e)throw Error("No available renderer for the current environment");let o=new e;return await o.init(s),o}var p=r(3092),g=r(46915),m=r(70242);let y=class t{constructor(...t){this.stage=new p.mc,void 0!==t[0]&&(0,m.t6)(m.lj,"Application constructor options are deprecated, please use Application.init() instead.")}async init(e){e={...e},this.renderer=await f(e),t._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return(0,m.t6)(m.lj,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(e=!1,r=!1){let i=t._plugins.slice(0);
516i.reverse(),i.forEach(t=>{t.destroy.call(this)}),this.stage.destroy(r),this.stage=null,this.renderer.destroy(e),this.renderer=null}};y._plugins=[];let b=y;o.XO.handleByList(o.Ag.Application,b._plugins),o.XO.add(g.M);var _=r(57391),v=r(30953),x=r(76301),w=r(16434),A=r(46480),S=r(76979),T=r(90936);class C extends S.v{constructor(t,e){super();const{textures:r,data:i}=t;Object.keys(i.pages).forEach(t=>{let e=r[i.pages[parseInt(t,10)].id];this.pages.push({texture:e})}),Object.keys(i.chars).forEach(t=>{let e=i.chars[t],{frame:n,source:s}=r[e.page],o=new w.M(e.x+n.x,e.y+n.y,e.width,e.height),a=new A.g({source:s,frame:o});this.chars[t]={id:t.codePointAt(0),xOffset:e.xOffset,yOffset:e.yOffset,xAdvance:e.xAdvance,kerning:e.kerning??{},texture:a}}),this.baseRenderedFontSize=i.fontSize,this.baseMeasurementFontSize=i.fontSize,this.fontMetrics={ascent:0,descent:0,fontSize:i.fontSize},this.baseLineOffset=i.baseLineOffset,this.lineHeight=i.lineHeight,this.fontFamily=i.fontFamily,this.distanceField=i.distanceField??{type:"none",range:0},this.url=e}destroy(){super.destroy();for(let t=0;t<this.pages.length;t++){let{texture:e}=this.pages[t];e.destroy(!0)}this.pages=null}static install(t){T.c.install(t)}static uninstall(t){T.c.uninstall(t)}}let E={test:t=>"string"==typeof t&&t.startsWith("info face="),parse(t){let e=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(let t in e){let i=e[t].match(/^[a-z]+/gm)[0],n=e[t].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(let t in n){let e=n[t].split("="),r=e[0],i=e[1].replace(/"/gm,""),o=parseFloat(i),a=isNaN(o)?i:o;s[r]=a}r[i].push(s)}let i={chars:{},pages:[],lineHeight:0,fontSize:0,fontFamily:"",distanceField:null,baseLineOffset:0},[n]=r.info,[s]=r.common,[o]=r.distanceField??[];o&&(i.distanceField={range:parseInt(o.distanceRange,10),type:o.fieldType}),i.fontSize=parseInt(n.size,10),i.fontFamily=n.face,i.lineHeight=parseInt(s.lineHeight,10);let a=r.page;for(let t=0;t<a.length;t++)i.pages.push({id:parseInt(a[t].id,10)||0,file:a[t].file});let l={};i.baseLineOffset=i.lineHeight-parseInt(s.base,10);let h=r.char;for(let t=0;t<h.length;t++){let e=h[t],r=parseInt(e.id,10),n=e.letter??e.char??String.fromCharCode(r);"space"===n&&(n=" "),l[r]=n,i.chars[n]={id:r,page:parseInt(e.page,10)||0,x:parseInt(e.x,10),y:parseInt(e.y,10),width:parseInt(e.width,10),height:parseInt(e.height,10),xOffset:parseInt(e.xoffset,10),yOffset:parseInt(e.yoffset,10),xAdvance:parseInt(e.xadvance,10),kerning:{}}}let u=r.kerning||[];for(let t=0;t<u.length;t++){let e=parseInt(u[t].first,10),r=parseInt(u[t].second,10),n=parseInt(u[t].amount,10);i.chars[l[r]].kerning[l[e]]=n}return i}},k={test:t=>"string"!=typeof t&&"getElementsByTagName"in t&&t.getElementsByTagName("page").length&&null!==t.getElementsByTagName("info")[0].getAttribute("face"),parse(t){let e={chars:{},pages:[],lineHeight:0,fontSize:0,fontFamily:"",distanceField:null,baseLineOffset:0},r=t.getElementsByTagName("info")[0],i=t.getElementsByTagName("common")[0],n=t.getElementsByTagName("distanceField")[0];n&&(e.distanceField={type:n.getAttribute("fieldType"),range:parseInt(n.getAttribute("distanceRange"),10)});let s=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),a=t.getElementsByTagName("kerning");e.fontSize=parseInt(r.getAttribute("size"),10),e.fontFamily=r.getAttribute("face"),e.lineHeight=parseInt(i.getAttribute("lineHeight"),10);for(let t=0;t<s.length;t++)e.pages.push({id:parseInt(s[t].getAttribute("id"),10)||0,file:s[t].getAttribute("file")});let l={};e.baseLineOffset=e.lineHeight-parseInt(i.getAttribute("base"),10);for(let t=0;t<o.length;t++){let r=o[t],i=parseInt(r.getAttribute("id"),10),n=r.getAttribute("letter")??r.getAttribute("char")??String.fromCharCode(i);"space"===n&&(n=" "),l[i]=n,e.chars[n]={id:i,page:parseInt(r.getAttribute("page"),10)||0,x:parseInt(r.getAttribute("x"),10),y:parseInt(r.getAttribute("y"),10),width:parseInt(r.getAttribute("width"),10),height:parseInt(r.getAttribute("height"),10),xOffset:parseInt(r.getAttribute("xoffset"),10),yOffset:parseInt(r.getAttribute("yoffset"),10),xAdvance:parseInt(r.getAttribute("xadvance"),10),kerning:{}}}for(let t=0;t<a.length;t++){let r=parseInt(a[t].getAttribute("first"),10),i=parseInt(a[t].getAttribute("second"),10),n=parseInt(a[t].getAttribute("amount"),10);e.chars[l[i]].kerning[l[r]]=n}return e}},M=t=>!!("string"==typeof t&&t.includes("<font>"))&&k.test(h.e.get().parseXML(t)),B=t=>k.parse(h.e.get().parseXML(t)),P=[".xml",".fnt"],I={extension:{type:o.Ag.CacheParser,name:"cacheBitmapFont"},test:t=>t instanceof C,getCacheableAssets(t,e){let r={};return t.forEach(t=>{r[t]=e,r[`${t}-bitmap`]=e}),r[`${e.fontFamily}-bitmap`]=e,r}},R={extension:{type:o.Ag.LoadParser,priority:_.T.Normal},name:"loadBitmapFont",test:t=>P.includes(x.A.extname(t).toLowerCase()),testParse:async t=>E.test(t)||M(t),async parse(t,e,r){let i=E.test(t)?E.parse(t):B(t),{src:n}=e,{pages:s}=i,o=[],a=i.distanceField?{scaleMode:"linear",alphaMode:"premultiply-alpha-on-upload",autoGenerateMipmaps:!1,resolution:1}:{};for(let t=0;t<s.length;++t){let e=s[t].file,r=x.A.join(x.A.dirname(n),e);r=(0,v.Y)(r,n),o.push({src:r,data:a})}let l=await r.load(o);return new C({data:i,textures:o.map(t=>l[t.src])},n)},async load(t,e){let r=await h.e.get().fetch(t);return await r.text()},async unload(t,e,r){await Promise.all(t.pages.map(t=>r.unload(t.texture.source._sourceOrigin))),t.destroy()}};var L=r(53670);class O{constructor(t,e=!1){this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=e}add(t){t.forEach(t=>{this._assetList.push(t)}
516),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;let t=[],e=Math.min(this._assetList.length,this._maxConcurrent);for(let r=0;r<e;r++)t.push(this._assetList.pop());await this._loader.load(t),this._isLoading=!1,this._next()}}get active(){return this._isActive}set active(t){this._isActive!==t&&(this._isActive=t,t&&!this._isLoading&&this._next())}}var F=r(24793);let U={extension:{type:o.Ag.CacheParser,name:"cacheTextureArray"},test:t=>Array.isArray(t)&&t.every(t=>t instanceof A.g),getCacheableAssets:(t,e)=>{let r={};return t.forEach(t=>{e.forEach((e,i)=>{r[t+(0===i?"":i+1)]=e})}),r}};async function D(t){if("Image"in globalThis)return new Promise(e=>{let r=new Image;r.onload=()=>{e(!0)},r.onerror=()=>{e(!1)},r.src=t});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{let e=await (await fetch(t)).blob();await createImageBitmap(e)}catch(t){return!1}return!0}return!1}let N={extension:{type:o.Ag.DetectionParser,priority:1},test:async()=>D("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async t=>[...t,"avif"],remove:async t=>t.filter(t=>"avif"!==t)},z=["png","jpg","jpeg"],j={extension:{type:o.Ag.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async t=>[...t,...z],remove:async t=>t.filter(t=>!z.includes(t))},$="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function W(t){return!$&&""!==document.createElement("video").canPlayType(t)}let G={extension:{type:o.Ag.DetectionParser,priority:0},test:async()=>W("video/mp4"),add:async t=>[...t,"mp4","m4v"],remove:async t=>t.filter(t=>"mp4"!==t&&"m4v"!==t)},V={extension:{type:o.Ag.DetectionParser,priority:0},test:async()=>W("video/ogg"),add:async t=>[...t,"ogv"],remove:async t=>t.filter(t=>"ogv"!==t)},H={extension:{type:o.Ag.DetectionParser,priority:0},test:async()=>W("video/webm"),add:async t=>[...t,"webm"],remove:async t=>t.filter(t=>"webm"!==t)},Y={extension:{type:o.Ag.DetectionParser,priority:0},test:async()=>D("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async t=>[...t,"webp"],remove:async t=>t.filter(t=>"webp"!==t)};var X=r(10620),q=r(52165);class K{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,e,r)=>(this._parsersValidated=!1,t[e]=r,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,e){let r={promise:null,parser:null};return r.promise=(async()=>{let i=null,n=null;if(e.loadParser&&((n=this._parserHash[e.loadParser])||(0,L.R)(`[Assets] specified load parser "${e.loadParser}" not found while loading ${t}`)),!n){for(let r=0;r<this.parsers.length;r++){let i=this.parsers[r];if(i.load&&i.test?.(t,e,this)){n=i;break}}if(!n)return(0,L.R)(`[Assets] ${t} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),null}i=await n.load(t,e,this),r.parser=n;for(let t=0;t<this.parsers.length;t++){let n=this.parsers[t];n.parse&&n.parse&&await n.testParse?.(i,e,this)&&(i=await n.parse(i,e,this)||i,r.parser=n)}return i})(),r}async load(t,e){this._parsersValidated||this._validateParsers();let r=0,i={},n=(0,q.a)(t),s=(0,X.z)(t,t=>({alias:[t],src:t,data:{}})),o=s.length,a=s.map(async t=>{let n=x.A.toAbsolute(t.src);if(!i[t.src])try{this.promiseCache[n]||(this.promiseCache[n]=this._getLoadPromiseAndParser(n,t)),i[t.src]=await this.promiseCache[n].promise,e&&e(++r/o)}catch(e){throw delete this.promiseCache[n],delete i[t.src],Error(`[Loader.load] Failed to load ${n}.
517${e}`)}});return await Promise.all(a),n?i[s[0].src]:i}async unload(t){let e=(0,X.z)(t,t=>({alias:[t],src:t})).map(async t=>{let e=x.A.toAbsolute(t.src),r=this.promiseCache[e];if(r){let i=await r.promise;delete this.promiseCache[e],await r.parser?.unload?.(i,t,this)}});await Promise.all(e)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,e)=>(e.name?t[e.name]&&(0,L.R)(`[Assets] loadParser name conflict "${e.name}"`):(0,L.R)("[Assets] loadParser should have a name"),{...t,[e.name]:e}),{})}}function Z(t,e){if(Array.isArray(e)){for(let r of e)if(t.startsWith(`data:${r}`))return!0;return!1}return t.startsWith(`data:${e}`)}function Q(t,e){let r=t.split("?")[0],i=x.A.extname(r).toLowerCase();return Array.isArray(e)?e.includes(i):i===e}let J={extension:{type:o.Ag.LoadParser,priority:_.T.Low},name:"loadJson",test:t=>Z(t,"application/json")||Q(t,".json"),async load(t){let e=await h.e.get().fetch(t);return await e.json()}},tt={name:"loadTxt",extension:{type:o.Ag.LoadParser,priority:_.T.Low,name:"loadTxt"},test:t=>Z(t,"text/plain")||Q(t,".txt"),async load(t){let e=await h.e.get().fetch(t);return await e.text()}},te=["normal","bold","100","200","300","400","500","600","700","800","900"],tr=[".ttf",".otf",".woff",".woff2"],ti=["font/ttf","font/otf","font/woff","font/woff2"],tn=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i,ts=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/,to={extension:{type:o.Ag.LoadParser,priority:_.T.Low},name:"loadWebFont",test:t=>Z(t,ti)||Q(t,tr),async load(t,e){let r=h.e.get().getFontFaceSet();if(r){let i=[],n=e.data?.family??function(t){let e=x.A.extname(t),r=x.A.basename(t,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)),i=r.length>0;for(let t of r)if(!t.match(tn)){i=!1;break}let n=r.join(" ");
517return i||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}(t),s=e.data?.weights?.filter(t=>te.includes(t))??["normal"],o=e.data??{};for(let e=0;e<s.length;e++){let a=s[e],l=new FontFace(n,`url(${ts.test(t)?t:encodeURI(t)})`,{...o,weight:a});await l.load(),r.add(l),i.push(l)}return F.l.set(`${n}-and-url`,{url:t,fontFaces:i}),1===i.length?i[0]:i}return(0,L.R)("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(t){(Array.isArray(t)?t:[t]).forEach(t=>{F.l.remove(`${t.family}-and-url`),h.e.get().getFontFaceSet().delete(t)})}};var ta=r(40171),tl=r(63800),th=r(13113);function tu(t,e=1){let r=th.x.RETINA_PREFIX?.exec(t);return r?parseFloat(r[1]):e}function td(t,e,r){t.label=r,t._sourceOrigin=r;let i=new A.g({source:t,label:r}),n=()=>{delete e.promiseCache[r],F.l.has(r)&&F.l.remove(r)};return i.source.once("destroy",()=>{e.promiseCache[r]&&((0,L.R)("[Assets] A TextureSource managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the TextureSource."),n())}),i.once("destroy",()=>{t.destroyed||((0,L.R)("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),i}let tc={extension:{type:o.Ag.LoadParser,priority:_.T.Low,name:"loadSVG"},name:"loadSVG",config:{crossOrigin:"anonymous",parseAsGraphicsContext:!1},test:t=>Z(t,"image/svg+xml")||Q(t,".svg"),async load(t,e,r){return e.data?.parseAsGraphicsContext??this.config.parseAsGraphicsContext?tp(t):tf(t,e,r,this.config.crossOrigin)},unload(t){t.destroy(!0)}};async function tf(t,e,r,i){let n=await h.e.get().fetch(t),s=await n.blob(),o=URL.createObjectURL(s),a=new Image;a.src=o,a.crossOrigin=i,await a.decode(),URL.revokeObjectURL(o);let l=document.createElement("canvas"),u=l.getContext("2d"),d=e.data?.resolution||tu(t),c=e.data?.width??a.width,f=e.data?.height??a.height;l.width=c*d,l.height=f*d,u.drawImage(a,0,0,c*d,f*d);let{parseAsGraphicsContext:p,...g}=e.data??{};return td(new ta.b({resource:l,alphaMode:"premultiply-alpha-on-upload",resolution:d,...g}),r,t)}async function tp(t){let e=await h.e.get().fetch(t),r=await e.text(),i=new tl.T;return i.svg(r),i}let tg=null;class tm{constructor(){tg||(tg=URL.createObjectURL(new Blob(['(function () {\n    \'use strict\';\n\n    const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";\n    async function checkImageBitmap() {\n      try {\n        if (typeof createImageBitmap !== "function")\n          return false;\n        const response = await fetch(WHITE_PNG);\n        const imageBlob = await response.blob();\n        const imageBitmap = await createImageBitmap(imageBlob);\n        return imageBitmap.width === 1 && imageBitmap.height === 1;\n      } catch (_e) {\n        return false;\n      }\n    }\n    void checkImageBitmap().then((result) => {\n      self.postMessage(result);\n    });\n\n})();\n'],{type:"application/javascript"}))),this.worker=new Worker(tg)}}tm.revokeObjectURL=function(){tg&&(URL.revokeObjectURL(tg),tg=null)};let ty=null;class tb{constructor(){ty||(ty=URL.createObjectURL(new Blob(['(function () {\n    \'use strict\';\n\n    async function loadImageBitmap(url, alphaMode) {\n      const response = await fetch(url);\n      if (!response.ok) {\n        throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${url}: ${response.status} ${response.statusText}`);\n      }\n      const imageBlob = await response.blob();\n      return alphaMode === "premultiplied-alpha" ? createImageBitmap(imageBlob, { premultiplyAlpha: "none" }) : createImageBitmap(imageBlob);\n    }\n    self.onmessage = async (event) => {\n      try {\n        const imageBitmap = await loadImageBitmap(event.data.data[0], event.data.data[1]);\n        self.postMessage({\n          data: imageBitmap,\n          uuid: event.data.uuid,\n          id: event.data.id\n        }, [imageBitmap]);\n      } catch (e) {\n        self.postMessage({\n          error: e,\n          uuid: event.data.uuid,\n          id: event.data.id\n        });\n      }\n    };\n\n})();\n'],{type:"application/javascript"}))),this.worker=new Worker(ty)}}tb.revokeObjectURL=function(){ty&&(URL.revokeObjectURL(ty),ty=null)};let t_=0;class tv{constructor(){this._initialized=!1,this._createdWorkers=0,this._workerPool=[],this._queue=[],this._resolveHash={}}isImageBitmapSupported(){return void 0!==this._isImageBitmapSupported||(this._isImageBitmapSupported=new Promise(t=>{let{worker:e}=new tm;e.addEventListener("message",r=>{e.terminate(),tm.revokeObjectURL(),t(r.data)})})),this._isImageBitmapSupported}loadImageBitmap(t,e){return this._run("loadImageBitmap",[t,e?.data?.alphaMode])}async _initWorkers(){this._initialized||(this._initialized=!0)}_getWorker(){void 0===s&&(s=navigator.hardwareConcurrency||4);let t=this._workerPool.pop();return!t&&this._createdWorkers<s&&(this._createdWorkers++,(t=new tb().worker).addEventListener("message",t=>{this._complete(t.data),this._returnWorker(t.target),this._next()})),t}_returnWorker(t){this._workerPool.push(t)}_complete(t){void 0!==t.error?this._resolveHash[t.uuid].reject(t.error):this._resolveHash[t.uuid].resolve(t.data),this._resolveHash[t.uuid]=null}async _run(t,e){await this._initWorkers();let r=new Promise((r,i)=>{this._queue.push({id:t,arguments:e,resolve:r,reject:i})});return this._next(),r}_next(){if(!this._queue.length)return;let t=this._getWorker();if(!t)return;let e=this._queue.pop(),r=e.id;this._resolveHash[t_]={resolve:e.resolve,reject:e.reject},t.postMessage({data:e.arguments,uuid:t_++,id:r})}}let tx=new tv,tw=[".jpeg",".jpg",".png",".webp",".avif"],tA=["image/jpeg","image/png","image/webp","image/avif"];async function tS(t,e){let r=await h.e.get().fetch(t);if(!r.ok)throw Error(`[loadImageBitmap] Failed to fetch ${t}: ${r.status} ${r.statusText}`);let i=await r.blob();return e?.data?.alphaMode==="premultiplied-alpha"?createImageBitmap(i,{premultiplyAlpha:"none"}):createImageBitmap(i)}let tT={name:"loadTextures",extension:{type:o.Ag.LoadParser,priority:_.T.High,name:"loadTextures"},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test:t=>Z(t,tA)||Q(t,tw),async load(t,e,r){let i=null;return i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await tx.isImageBitmapSupported()?await tx.loadImageBitmap(t,e):await tS(t,e):await new Promise((e,r)=>{(i=new Image).crossOrigin=this.config.crossOrigin,i.src=t,i.complete?e(i):(i.onload=()=>{e(i)},i.onerror=r)}),td(new ta.b({resource:i,alphaMode:"premultiply-alpha-on-upload",resolution:e.data?.resolution||tu(t),...e.data}),r,t)},unload(t){t.destroy(!0)}};var tC=r(62057),tE=r(42460);let tk=[".mp4",".m4v",".webm",".ogg",".ogv",".h264",".avi",".mov"],tM=tk.map(t=>`video/${t.substring(1)}`),tB={name:"loadVideo",extension:{type:o.Ag.LoadParser,name:"loadVideo"},test(t){let e=Z(t,tM),r=Q(t,tk);return e||r},async load(t,e,r){var i;let n,s={...tC.$.defaultOptions,resolution:e.data?.resolution||tu(t),alphaMode:e.data?.alphaMode||await (0,tE.C)(),...e.data},o=document.createElement("video"),a={preload:!1!==s.autoLoad?"auto":void 0,"webkit-playsinline":!1!==s.playsinline?"":void 0,playsinline:!1!==s.playsinline?"":void 0,muted:!0===s.muted?"":void 0,loop:!0===s.loop?"":void 0,autoplay:!1!==s.autoPlay?"":void 0};
517Object.keys(a).forEach(t=>{let e=a[t];void 0!==e&&o.setAttribute(t,e)}),!0===s.muted&&(o.muted=!0),void 0!==(i=s.crossorigin)||t.startsWith("data:")?!1!==i&&(o.crossOrigin="string"==typeof i?i:"anonymous"):o.crossOrigin=function(t,e=globalThis.location){if(t.startsWith("data:"))return"";e||(e=globalThis.location);let r=new URL(t,document.baseURI);return r.hostname!==e.hostname||r.port!==e.port||r.protocol!==e.protocol?"anonymous":""}(t);let l=document.createElement("source");if(t.startsWith("data:"))n=t.slice(5,t.indexOf(";"));else if(!t.startsWith("blob:")){let e=t.split("?")[0].slice(t.lastIndexOf(".")+1).toLowerCase();n=tC.$.MIME_TYPES[e]||`video/${e}`}return l.src=t,n&&(l.type=n),new Promise(i=>{let n=async()=>{let a=new tC.$({...s,resource:o});o.removeEventListener("canplay",n),e.data.preload&&await new Promise((t,e)=>{function r(){n(),t()}function i(t){n(),e(t)}function n(){o.removeEventListener("canplaythrough",r),o.removeEventListener("error",i)}o.addEventListener("canplaythrough",r),o.addEventListener("error",i),o.load()}),i(td(a,r,t))};o.addEventListener("canplay",n),o.appendChild(l)})},unload(t){t.destroy(!0)}},tP={extension:{type:o.Ag.ResolveParser,name:"resolveTexture"},test:tT.test,parse:t=>({resolution:parseFloat(th.x.RETINA_PREFIX.exec(t)?.[1]??"1"),format:t.split(".").pop(),src:t})},tI={extension:{type:o.Ag.ResolveParser,priority:-2,name:"resolveJson"},test:t=>th.x.RETINA_PREFIX.test(t)&&t.endsWith(".json"),parse:tP.parse};class tR{constructor(){this._detections=[],this._initialized=!1,this.resolver=new th.x,this.loader=new K,this.cache=F.l,this._backgroundLoader=new O(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){if(this._initialized)return void(0,L.R)("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let e=t.manifest;"string"==typeof e&&(e=await this.load(e)),this.resolver.addManifest(e)}let e=t.texturePreference?.resolution??1,r=await this._detectFormats({preferredFormats:t.texturePreference?.format,skipDetections:t.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:r,resolution:"number"==typeof e?[e]:e}}),t.preferences&&this.setPreferences(t.preferences)}add(t){this.resolver.add(t)}async load(t,e){this._initialized||await this.init();let r=(0,q.a)(t),i=(0,X.z)(t).map(t=>{if("string"!=typeof t){let e=this.resolver.getAlias(t);return e.some(t=>!this.resolver.hasKey(t))&&this.add(t),Array.isArray(e)?e[0]:e}return this.resolver.hasKey(t)||this.add({alias:t,src:t}),t}),n=this.resolver.resolve(i),s=await this._mapLoadToResolve(n,e);return r?s[i[0]]:s}addBundle(t,e){this.resolver.addBundle(t,e)}async loadBundle(t,e){this._initialized||await this.init();let r=!1;"string"==typeof t&&(r=!0,t=[t]);let i=this.resolver.resolveBundle(t),n={},s=Object.keys(i),o=0,a=0,l=()=>{e?.(++o/a)},h=s.map(t=>{let e=i[t];return a+=Object.keys(e).length,this._mapLoadToResolve(e,l).then(e=>{n[t]=e})});return await Promise.all(h),r?n[t[0]]:n}async backgroundLoad(t){this._initialized||await this.init(),"string"==typeof t&&(t=[t]);let e=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(e))}async backgroundLoadBundle(t){this._initialized||await this.init(),"string"==typeof t&&(t=[t]),Object.values(this.resolver.resolveBundle(t)).forEach(t=>{this._backgroundLoader.add(Object.values(t))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if("string"==typeof t)return F.l.get(t);let e={};for(let r=0;r<t.length;r++)e[r]=F.l.get(t[r]);return e}async _mapLoadToResolve(t,e){let r=[...new Set(Object.values(t))];this._backgroundLoader.active=!1;let i=await this.loader.load(r,e);this._backgroundLoader.active=!0;let n={};return r.forEach(t=>{let e=i[t.src],r=[t.src];t.alias&&r.push(...t.alias),r.forEach(t=>{n[t]=e}),F.l.set(r,e)}),n}async unload(t){this._initialized||await this.init();let e=(0,X.z)(t).map(t=>"string"!=typeof t?t.src:t),r=this.resolver.resolve(e);await this._unloadFromResolved(r)}async unloadBundle(t){this._initialized||await this.init(),t=(0,X.z)(t);let e=this.resolver.resolveBundle(t),r=Object.keys(e).map(t=>this._unloadFromResolved(e[t]));await Promise.all(r)}async _unloadFromResolved(t){let e=Object.values(t);e.forEach(t=>{F.l.remove(t.src)}),await this.loader.unload(e)}async _detectFormats(t){let e=[];for(let r of(t.preferredFormats&&(e=Array.isArray(t.preferredFormats)?t.preferredFormats:[t.preferredFormats]),t.detections))t.skipDetections||await r.test()?e=await r.add(e):t.skipDetections||(e=await r.remove(e));return e=e.filter((t,r)=>e.indexOf(t)===r)}get detections(){return this._detections}
517setPreferences(t){this.loader.parsers.forEach(e=>{e.config&&Object.keys(e.config).filter(e=>e in t).forEach(r=>{e.config[r]=t[r]})})}}let tL=new tR;o.XO.handleByList(o.Ag.LoadParser,tL.loader.parsers).handleByList(o.Ag.ResolveParser,tL.resolver.parsers).handleByList(o.Ag.CacheParser,tL.cache.parsers).handleByList(o.Ag.DetectionParser,tL.detections),o.XO.add(U,j,N,Y,G,V,H,J,tt,to,tc,tT,tB,R,I,tP,tI);let tO={loader:o.Ag.LoadParser,resolver:o.Ag.ResolveParser,cache:o.Ag.CacheParser,detection:o.Ag.DetectionParser};o.XO.handle(o.Ag.Asset,t=>{let e=t.ref;Object.entries(tO).filter(([t])=>!!e[t]).forEach(([t,r])=>o.XO.add(Object.assign(e[t],{extension:e[t].extension??r})))},t=>{let e=t.ref;Object.keys(tO).filter(t=>!!e[t]).forEach(t=>o.XO.remove(e[t]))}),r(80115);var tF=r(29762),tU=r(65724),tD=r(92068),tN=r(82347);class tz extends tN.l{constructor(t,e){const{text:r,resolution:i,style:n,anchor:s,width:o,height:a,roundPixels:l,...h}=t;super({...h}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=e,this.text=r??"",this.style=n,this.resolution=i??null,this.allowChildren=!1,this._anchor=new tD.o({_onUpdate:()=>{this.onViewUpdate()}}),s&&(this.anchor=s),this.roundPixels=l??!1,void 0!==o&&(this.width=o),void 0!==a&&(this.height=a)}get anchor(){return this._anchor}set anchor(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)}set text(t){t=t.toString(),this._text!==t&&(this._text=t,this.onViewUpdate())}get text(){return this._text}set resolution(t){this._autoResolution=null===t,this._resolution=t,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(t){t||(t={}),this._style?.off("update",this.onViewUpdate,this),t instanceof this._styleClass?this._style=t:this._style=new this._styleClass(t),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(t){this._setWidth(t,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(t){this._setHeight(t,this.bounds.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this.bounds.width,t.height=Math.abs(this.scale.y)*this.bounds.height,t}setSize(t,e){"object"==typeof t?(e=t.height??t.width,t=t.width):e??(e=t),void 0!==t&&this._setWidth(t,this.bounds.width),void 0!==e&&this._setHeight(e,this.bounds.height)}containsPoint(t){let e=this.bounds.width,r=this.bounds.height,i=-e*this.anchor.x,n=0;return!!(t.x>=i)&&!!(t.x<=i+e)&&(n=-r*this.anchor.y,!!(t.y>=n)&&!!(t.y<=n+r))||!1}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}_getKey(){return`${this.text}:${this._style.styleKey}:${this._resolution}`}destroy(t=!1){super.destroy(t),this.owner=null,this._bounds=null,this._anchor=null,("boolean"==typeof t?t:t?.style)&&this._style.destroy(t),this._style=null,this._text=null}}var tj=r(24996),t$=r(82989);class tW extends tz{constructor(...t){super(function(t,e){let r=t[0]??{};return("string"==typeof r||t[1])&&((0,m.t6)(m.lj,`use new ${e}({ text: "hi!", style }) instead`),r={text:r,style:t[1]}),r}(t,"Text"),t$.x),this.renderPipeId="text"}updateBounds(){let t=this._bounds,e=this._anchor,{width:r,height:i}=tj.P.measureText(this._text,this._style);t.minX=-e._x*r,t.maxX=t.minX+r,t.minY=-e._y*i,t.maxY=t.minY+i}}var tG=r(78128);r(66888),r(78214),o.XO.add(a,l)},90936:(t,e,r)=>{"use strict";r.d(e,{c:()=>x});var i=r(24793),n=r(70242),s=r(53670),o=r(82989),a=r(73608),l=r(16434),h=r(10380),u=r(40171),d=r(46480),c=r(24996),f=r(60018),p=r(67506),g=r(76979);function m(t){if(""===t)return[];"string"==typeof t&&(t=[t]);let e=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];if(Array.isArray(i)){if(2!==i.length)throw Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${i.length}.`);if(0===i[0].length||0===i[1].length)throw Error("[BitmapFont]: Invalid character delimiter.");let t=i[0].charCodeAt(0),r=i[1].charCodeAt(0);if(r<t)throw Error("[BitmapFont]: Invalid character range.");for(let i=t;i<=r;i++)e.push(String.fromCharCode(i))}else e.push(...Array.from(i))}if(0===e.length)throw Error("[BitmapFont]: Empty set when resolving characters.");return e}let y=class t extends g.v{constructor(e){super(),this.resolution=1,this.pages=[],this._padding=0,this._measureCache=Object.create(null),this._currentChars=[],this._currentX=0,this._currentY=0,this._currentPageIndex=-1,this._skipKerning=!1;const r={...t.defaultOptions,...e};this._textureSize=r.textureSize,this._mipmap=r.mipmap;const i=r.style.clone();r.overrideFill&&(i._fill.color=0xffffff,i._fill.alpha=1,i._fill.texture=d.g.WHITE,i._fill.fill=null),this.applyFillAsTint=r.overrideFill;const n=i.fontSize;i.fontSize=this.baseMeasurementFontSize;const s=(0,f.Z)(i);r.overrideSize?i._stroke&&(i._stroke.width*=this.baseRenderedFontSize/n):i.fontSize=this.baseRenderedFontSize=n,this._style=i,this._skipKerning=r.skipKerning??!1,this.resolution=r.resolution??1,this._padding=r.padding??4,this.fontMetrics=c.P.measureFont(s),this.lineHeight=i.lineHeight||this.fontMetrics.fontSize||i.fontSize}ensureCharacters(t){let e,r=m(t).filter(t=>!this._currentChars.includes(t)).filter((t,e,r)=>r.indexOf(t)===e);if(!r.length)return;this._currentChars=[...this._currentChars,...r];let{canvas:i,context:n}=(e=-1===this._currentPageIndex?this._nextPage():this.pages[this._currentPageIndex]).canvasAndContext,s=e.texture.source,o=this._style,a=this._currentX,h=this._currentY,u=this.baseRenderedFontSize/this.baseMeasurementFontSize,f=this._padding*u,p=0,g=!1,y=i.width/this.resolution,b=i.height/this.resolution;for(let t=0;t<r.length;t++){let e=r[t],m=c.P.measureText(e,o,i,!1);m.lineHeight=m.height;let _=m.width*u,v=Math.ceil(("italic"===o.fontStyle?2:1)*_),x=m.height*u,w=v+2*f,A=x+2*f;if(g=!1,"\n"!==e&&"\r"!==e&&"	"!==e&&" "!==e&&(g=!0,p=Math.ceil(Math.max(A,p))),a+w>y&&(a=0,(h+=p)+(p=A)>b)){s.update();let t=this._nextPage();i=t.canvasAndContext.canvas,n=t.canvasAndContext.context,s=t.texture.source,h=0}let S=_/u-(o.dropShadow?.distance??0)-(o._stroke?.width??0);if(this.chars[e]={id:e.codePointAt(0),xOffset:-this._padding,yOffset:-this._padding,xAdvance:S,kerning:{}},g){this._drawGlyph(n,m,a+f,h+f,u,o);let t=s.width*u,r=s.height*u,i=new l.M(a/t*s.width,h/r*s.height,w/t*s.width,A/r*s.height);this.chars[e].texture=new d.g({source:s,frame:i}),a+=Math.ceil(w)}}s.update(),this._currentX=a,this._currentY=h,this._skipKerning&&this._applyKerning(r,n)}get pageTextures(){return(0,n.t6)(n.lj,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}_applyKerning(t,e){let r=this._measureCache;for(let i=0;i<t.length;i++){let n=t[i];for(let t=0;t<this._currentChars.length;t++){let i=this._currentChars[t],s=r[n];s||(s=r[n]=e.measureText(n).width);let o=r[i];o||(o=r[i]=e.measureText(i).width);let a=e.measureText(n+i).width,l=a-(s+o);l&&(this.chars[n].kerning[i]=l),(l=(a=e.measureText(n+i).width)-(s+o))&&(this.chars[i].kerning[n]=l)}}}_nextPage(){this._currentPageIndex++;let t=this.resolution,e=h.N.getOptimalCanvasAndContext(this._textureSize,this._textureSize,t);this._setupContext(e.context,this._style,t);let r=t*(this.baseRenderedFontSize/this.baseMeasurementFontSize),i=new d.g({source:new u.b({resource:e.canvas,resolution:r,alphaMode:"premultiply-alpha-on-upload",autoGenerateMipmaps:this._mipmap})}),n={canvasAndContext:e,texture:i};return this.pages[this._currentPageIndex]=n,n}_setupContext(t,e,r){e.fontSize=this.baseRenderedFontSize,t.scale(r,r),t.font=(0,f.Z)(e),e.fontSize=this.baseMeasurementFontSize,t.textBaseline=e.textBaseline;let i=e._stroke,n=i?.width??0;if(i&&(t.lineWidth=n,t.lineJoin=i.join,t.miterLimit=i.miterLimit,t.strokeStyle=(0,p.r)(i,t)),e._fill&&(t.fillStyle=(0,p.r)(e._fill,t)),e.dropShadow){let i=e.dropShadow,n=a.Q.shared.setValue(i.color).toArray(),s=i.blur*r,o=i.distance*r;t.shadowColor=`rgba(${255*n[0]},${255*n[1]},${255*n[2]},${i.alpha})`,t.shadowBlur=s,t.shadowOffsetX=Math.cos(i.angle)*o,t.shadowOffsetY=Math.sin(i.angle)*o}else t.shadowColor="black",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0}_drawGlyph(t,e,r,i,n,s){let o=e.text,a=e.fontProperties,l=s._stroke,h=(l?.width??0)*n,u=r+h/2,d=i-h/2,c=a.descent*n,f=e.lineHeight*n;s.stroke&&h&&t.strokeText(o,u,d+f-c),s._fill&&t.fillText(o,u,d+f-c)}destroy(){super.destroy();for(let t=0;t<this.pages.length;t++){let{canvasAndContext:e,texture:r}=this.pages[t];h.N.returnCanvasAndContext(e),r.destroy(!0)}this.pages=null}};y.defaultOptions={textureSize:512,style:new o.x,mipmap:!0};var b=r(74743);let _=0;class v{constructor(){this.ALPHA=[["a","z"],["A","Z"]," "],this.NUMERIC=[["0","9"]],this.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],this.ASCII=[[" ","~"]],this.defaultOptions={chars:this.ALPHANUMERIC,resolution:1,padding:4,skipKerning:!1}}getFont(t,e){let r=`${e.fontFamily}-bitmap`,n=!0;if(e._fill.fill&&!e._stroke)r+=e._fill.fill.styleKey,n=!1;else if(e._stroke||e.dropShadow){let t=e.styleKey;t=t.substring(0,t.lastIndexOf("-")),r=`${t}-bitmap`,n=!1}if(!i.l.has(r)){let t=new y({style:e,overrideFill:n,overrideSize:!0,...this.defaultOptions});++_>50&&(0,s.R)("BitmapText",`You have dynamically created ${_} bitmap fonts, this can be inefficient. Try pre installing your font styles using \`BitmapFont.install({name:"style1", style})\``),t.once("destroy",()=>{_--,i.l.remove(r)}),i.l.set(r,t)}let o=i.l.get(r);return o.ensureCharacters?.(t),o}getLayout(t,e,r=!0){let i=this.getFont(t,e);return(0,b.Z)([...t],e,i,r)}measureText(t,e,r=!0){return this.getLayout(t,e,r)}install(...t){let e=t[0];"string"==typeof e&&(e={name:e,style:t[1],chars:t[2]?.chars,resolution:t[2]?.resolution,padding:t[2]?.padding,skipKerning:t[2]?.ski
517pKerning},(0,n.t6)(n.lj,"BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));let r=e?.name;if(!r)throw Error("[BitmapFontManager] Property `name` is required.");let s=(e={...this.defaultOptions,...e}).style,a=s instanceof o.x?s:new o.x(s),l=null!==a._fill.fill&&void 0!==a._fill.fill,h=new y({style:a,overrideFill:l,skipKerning:e.skipKerning,padding:e.padding,resolution:e.resolution,overrideSize:!1}),u=m(e.chars);return h.ensureCharacters(u.join("")),i.l.set(`${r}-bitmap`,h),h.once("destroy",()=>i.l.remove(`${r}-bitmap`)),h}uninstall(t){let e=`${t}-bitmap`,r=i.l.get(e);r&&r.destroy()}}let x=new v},92068:(t,e,r)=>{"use strict";r.d(e,{o:()=>i});class i{constructor(t,e,r){this._x=e||0,this._y=r||0,this._observer=t}clone(t){return new i(t??this._observer,this._x,this._y)}set(t=0,e=t){return(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=0 y=0 scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}},93685:(t,e,r)=>{"use strict";let{StringPrototypeSlice:i,SymbolIterator:n,TypedArrayPrototypeSet:s,Uint8Array:o}=r(34418),{Buffer:a}=r(96244),{inspect:l}=r(43006);t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){let e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){let e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;let t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,r=""+e.data;for(;null!==(e=e.next);)r+=t+e.data;return r}concat(t){if(0===this.length)return a.alloc(0);let e=a.allocUnsafe(t>>>0),r=this.head,i=0;for(;r;)s(e,r.data,i),i+=r.data.length,r=r.next;return e}consume(t,e){let r=this.head.data;if(t<r.length){let e=r.slice(0,t);return this.head.data=r.slice(t),e}return t===r.length?this.shift():e?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[n](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let e="",r=this.head,n=0;do{let s=r.data;if(t>s.length)e+=s,t-=s.length;else{t===s.length?(e+=s,++n,r.next?this.head=r.next:this.head=this.tail=null):(e+=i(s,0,t),this.head=r,r.data=i(s,t));break}++n}while(null!==(r=r.next));return this.length-=n,e}_getBuffer(t){let e=a.allocUnsafe(t),r=t,i=this.head,n=0;do{let a=i.data;if(t>a.length)s(e,a,r-t),t-=a.length;else{t===a.length?(s(e,a,r-t),++n,i.next?this.head=i.next:this.head=this.tail=null):(s(e,new o(a.buffer,a.byteOffset,t),r-t),this.head=i,i.data=a.slice(t));break}++n}while(null!==(i=i.next));return this.length-=n,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return l(this,{...e,depth:0,customInspect:!1})}}},94521:(t,e,r)=>{"use strict";r.d(e,{b:()=>i});class i{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e}clone(){return new i(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,e=t){return this.x=t,this.y=e,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return n.x=0,n.y=0,n}}let n=new i},95620:(t,e,r)=>{"use strict";r.d(e,{d:()=>n});var i,n=((i=n||{})[i.INTERACTION=50]="INTERACTION",i[i.HIGH=25]="HIGH",i[i.NORMAL=0]="NORMAL",i[i.LOW=-25]="LOW",i[i.UTILITY=-50]="UTILITY",i)},96197:(t,e,r)=>{"use strict";r.d(e,{M:()=>u});var i=r(66888),n=r(44571),s=r(22236),o=r(76055),a=r(60687),l=r(7475),h=r(7258);class u extends i.A{constructor(t){super(),this.uid=(0,n.L)("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[];let{gpuProgram:e,glProgram:r,groups:i,resources:s,compatibleRenderers:a,groupMap:u}=t;
517this.gpuProgram=e,this.glProgram=r,void 0===a&&(a=0,e&&(a|=l.W.WEBGPU),r&&(a|=l.W.WEBGL)),this.compatibleRenderers=a;const d={};if(s||i||(s={}),s&&i)throw Error("[Shader] Cannot have both resources and groups");if(e||!i||u){if(!e&&i&&u)for(const t in u)for(const e in u[t]){const r=u[t][e];d[r]={group:t,binding:e,name:r}}else if(e&&i&&!u){const t=e.structsAndGroups.groups;u={},t.forEach(t=>{u[t.group]=u[t.group]||{},u[t.group][t.binding]=t.name,d[t.name]=t})}else if(s){i={},u={},e&&e.structsAndGroups.groups.forEach(t=>{u[t.group]=u[t.group]||{},u[t.group][t.binding]=t.name,d[t.name]=t});let t=0;for(const e in s)!d[e]&&(i[99]||(i[99]=new o.T,this._ownedBindGroups.push(i[99])),d[e]={group:99,binding:t,name:e},u[99]=u[99]||{},u[99][t]=e,t++);for(const t in s){let e=s[t];e.source||e._resourceType||(e=new h.k(e));const r=d[t];r&&(i[r.group]||(i[r.group]=new o.T,this._ownedBindGroups.push(i[r.group])),i[r.group].setResource(e,r.binding))}}}else throw Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");this.groups=i,this._uniformBindMap=u,this.resources=this._buildResourceAccessor(i,d)}addResource(t,e,r){var i,n;(i=this._uniformBindMap)[e]||(i[e]={}),(n=this._uniformBindMap[e])[r]||(n[r]=t),this.groups[e]||(this.groups[e]=new o.T,this._ownedBindGroups.push(this.groups[e]))}_buildResourceAccessor(t,e){let r={};for(let i in e){let n=e[i];Object.defineProperty(r,n.name,{get:()=>t[n.group].getResource(n.binding),set(e){t[n.group].setResource(e,n.binding)}})}return r}destroy(t=!1){this.emit("destroy",this),t&&(this.gpuProgram?.destroy(),this.glProgram?.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(t=>{t.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null}static from(t){let e,r,{gpu:i,gl:n,...o}=t;return i&&(e=a.B.from(i)),n&&(r=s.M.from(n)),new u({gpuProgram:e,glProgram:r,...o})}}},96244:(t,e,r)=>{"use strict";let i=r(22388),n=r(57737),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return u(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t){var i=t,n=e;if(("string"!=typeof n||""===n)&&(n="utf8"),!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);let r=0|p(i,n),s=o(r),l=s.write(i,n);return l!==r&&(s=s.slice(0,l)),s}if(ArrayBuffer.isView(t)){var s=t;if(U(s,Uint8Array)){let t=new Uint8Array(s);return c(t.buffer,t.byteOffset,t.byteLength)}return d(s)}if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(U(t,ArrayBuffer)||t&&U(t.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(U(t,SharedArrayBuffer)||t&&U(t.buffer,SharedArrayBuffer)))return c(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let l=t.valueOf&&t.valueOf();if(null!=l&&l!==t)return a.from(l,e,r);let h=function(t){if(a.isBuffer(t)){let e=0|f(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?o(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(h)return h;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return h(t),o(t<0?0:0|f(t))}function d(t){let e=t.length<0?0:0|f(t.length),r=o(e);for(let i=0;i<e;i+=1)r[i]=255&t[i];return r}function c(t,e,r){let i;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(i=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),a.prototype),i}function f(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function p(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||U(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return O(t).length;default:if(n)return i?-1:L(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=e;i<r;++i)n+=D[t[i]];return n}(this,e,r);case"utf8":case"utf-8":return _(this,e,r);case"ascii":return function(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}(this,e,r);case"latin1":case"binary":return function(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}(this,e,r);case"base64":var s,o,a;return s=this,o=e,a=r,0===o&&a===s.length?i.fromByteArray(s):i.fromByteArray(s.slice(o,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){let i=t.slice(e,r),n="";for(let t=0;t<i.length-1;t+=2)n+=String.fromCharCode(i[t]+256*i[t+1]);return n}(this,e,r);default:if(n)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function y(t,e,r,i,n){var s;if(0===t.length)return -1;if("string"==typeof r?(i=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(s=r*=1)!=s&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length)if(n)return -1;else r=t.length-1;else if(r<0)if(!n)return -1;else r=0;
vendor: 18,684 bytes, line 517
517if("string"==typeof e&&(e=a.from(e,i)),a.isBuffer(e))return 0===e.length?-1:b(t,e,r,i,n);if("number"==typeof e){if(e&=255,"function"==typeof Uint8Array.prototype.indexOf)if(n)return Uint8Array.prototype.indexOf.call(t,e,r);else return Uint8Array.prototype.lastIndexOf.call(t,e,r);return b(t,[e],r,i,n)}throw TypeError("val must be string, number or Buffer")}function b(t,e,r,i,n){let s,o=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return -1;o=2,a/=2,l/=2,r/=2}function h(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){let i=-1;for(s=r;s<a;s++)if(h(t,s)===h(e,-1===i?0:s-i)){if(-1===i&&(i=s),s-i+1===l)return i*o}else -1!==i&&(s-=s-i),i=-1}else for(r+l>a&&(r=a-l),s=r;s>=0;s--){let r=!0;for(let i=0;i<l;i++)if(h(t,s+i)!==h(e,i)){r=!1;break}if(r)return s}return -1}function _(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n<r;){let e=t[n],s=null,o=e>239?4:e>223?3:e>191?2:1;if(n+o<=r){let r,i,a,l;switch(o){case 1:e<128&&(s=e);break;case 2:(192&(r=t[n+1]))==128&&(l=(31&e)<<6|63&r)>127&&(s=l);break;case 3:r=t[n+1],i=t[n+2],(192&r)==128&&(192&i)==128&&(l=(15&e)<<12|(63&r)<<6|63&i)>2047&&(l<55296||l>57343)&&(s=l);break;case 4:r=t[n+1],i=t[n+2],a=t[n+3],(192&r)==128&&(192&i)==128&&(192&a)==128&&(l=(15&e)<<18|(63&r)<<12|(63&i)<<6|63&a)>65535&&l<1114112&&(s=l)}}null===s?(s=65533,o=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),n+=o}var s=i;let o=s.length;if(o<=4096)return String.fromCharCode.apply(String,s);let a="",l=0;for(;l<o;)a+=String.fromCharCode.apply(String,s.slice(l,l+=4096));return a}function v(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function x(t,e,r,i,n,s){if(!a.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<s)throw RangeError('"value" argument is out of bounds');if(r+i>t.length)throw RangeError("Index out of range")}function w(t,e,r,i,n){B(e,i,n,t,r,7);let s=Number(e&BigInt(0xffffffff));t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s;let o=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function A(t,e,r,i,n){B(e,i,n,t,r,7);let s=Number(e&BigInt(0xffffffff));t[r+7]=s,s>>=8,t[r+6]=s,s>>=8,t[r+5]=s,s>>=8,t[r+4]=s;let o=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function S(t,e,r,i,n,s){if(r+i>t.length||r<0)throw RangeError("Index out of range")}function T(t,e,r,i,s){return e*=1,r>>>=0,s||S(t,e,r,4,34028234663852886e22,-34028234663852886e22),n.write(t,e,r,i,23,4),r+4}function C(t,e,r,i,s){return e*=1,r>>>=0,s||S(t,e,r,8,17976931348623157e292,-17976931348623157e292),n.write(t,e,r,i,52,8),r+8}e.Buffer=a,e.SlowBuffer=function(t){return+t!=t&&(t=0),a.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return(h(t),t<=0)?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},a.allocUnsafe=function(t){return u(t)},a.allocUnsafeSlow=function(t){return u(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(U(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),U(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,i=e.length;for(let n=0,s=Math.min(r,i);n<s;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:+(i<r)},a.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}},a.concat=function(t,e){let r;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;let i=a.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){let e=t[r];if(U(e,Uint8Array))n+e.length>i.length?(a.isBuffer(e)||(e=a.from(e)),e.copy(i,n)):Uint8Array.prototype.set.call(i,e,n);else if(a.isBuffer(e))e.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=e.length}return i},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},a.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},a.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},a.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?_(this,0,t):g.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){let t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},s&&(a.prototype[s]=a.prototype.inspect),a.prototype.compare=function(t,e,r,i,n){if(U(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,i>>>=0,n>>>=0,this===t)return 0;let s=n-i,o=r-e,l=Math.min(s,o),h=this.slice(i,n),u=t.slice(e,r);for(let t=0;t<l;++t)if(h[t]!==u[t]){s=h[t],o=u[t];break}return s<o?-1:+(o<s)},a.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},a.prototype.write=function(t,e,r,i){var n,s,o,a,l,h,u,d;if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let f=!1;for(;;)switch(i){case"hex":return function(t,e,r,i){let n;r=Number(r)||0;let s=t.length-r;i?(i=Number(i))>s&&(i=s):i=s;let o=e.length;for(i>o/2&&(i=o/2),n=0;n<i;++n){var a;let i=parseInt(e.substr(2*n,2),16);if((a=i)!=a)break;t[r+n]=i}return n}(this,t,e,r);case"utf8":case"utf-8":return n=e,s=r,F(L(t,this.length-n),this,n,s);case"ascii":case"latin1":case"binary":return o=e,a=r,F(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,o,a);case"base64":return l=e,h=r,F(O(t),this,l,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=e,d=r,F(function(t,e){let r,i,n=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)i=(r=t.charCodeAt(s))>>8,n.push(r%256),n.push(i);return n}(t,this.length-u),this,u,d);default:if(f)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let i=this.subarray(t,e);return Object.setPrototypeOf(i,a.prototype),i},a.prototype.readUintLE=a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let i=this[t],n=1,s=0;for(;++s<e&&(n*=256);)i+=this[t+s]*n;return i},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let i=this[t+--e],n=1;for(;e>0&&(n*=256);)i+=this[t+--e]*n;return i},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||v(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readBigUInt64LE=N(function(t){P(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&I(t,this.length-8);let i=e+256*this[++t]+65536*this[++t]+0x1000000*this[++t],n=this[++t]+256*this[++t]+65536*this[++t]+0x1000000*r;return BigInt(i)+(BigInt(n)<<BigInt(32))}),a.prototype.readBigUInt64BE=N(function(t){P(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&I(t,this.length-8);let i=0x1000000*e+65536*this[++t]+256*this[++t]+this[++t],n=0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(i)<<BigInt(32))+BigInt(n)}),a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let i=this[t],n=1,s=0;for(;++s<e&&(n*=256);)i+=this[t+s]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let i=e,n=1,s=this[t+--i];for(;i>0&&(n*=256);)s+=this[t+--i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*e)),s},a.prototype.readInt8=function(t,e){return(t>>>=0,e||v(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||v(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||v(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readBigInt64LE=N(function(t){P(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&I(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+0x1000000*this[++t])}),a.prototype.readBigInt64BE=N(function(t){P(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&I(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r)}),a.prototype.readFloatLE=function(t,e){return t>>>=0,e||v(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||v(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||v(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||v(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,r,i){if(t*=1,e>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,t,e,r,i,0)}let n=1,s=0;for(this[e]=255&t;++s<r&&(n*=256);)this[e+s]=t/n&255;return e+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,e,r,i){if(t*=1,e>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,t,e,r,i,0)}let n=r-1,s=1;for(this[e+n]=255&t;--n>=0&&(s*=256);)this[e+n]=t/s&255;return e+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigUInt64LE=N(function(t,e=0){return w(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=N(function(t,e=0){return A(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(t,e,r,i){if(t*=1,e>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}let n=0,s=1,o=0;for(this[e]=255&t;++n<r&&(s*=256);)t<0&&0===o&&0!==this[e+n-1]&&(o=1),this[e+n]=(t/s|0)-o&255;return e+r},a.prototype.writeIntBE=function(t,e,r,i){if(t*=1,e>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}let n=r-1,s=1,o=0;for(this[e+n]=255&t;--n>=0&&(s*=256);)t<0&&0===o&&0!==this[e+n+1]&&(o=1),this[e+n]=(t/s|0)-o&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t*=1,e>>>=0,r||x(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigInt64LE=N(function(t,e=0){return w(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=N(function(t,e=0){return A(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(t,e,r){return T(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return T(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,i){if(!a.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);let n=i-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,i):Uint8Array.prototype.set.call(t,this.subarray(r,i),e),n},a.prototype.fill=function(t,e,r,i){let n;if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);if(1===t.length){let e=t.charCodeAt(0);("utf8"===i&&e<128||"latin1"===i)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(n=e;n<r;++n)this[n]=t;else{let s=a.isBuffer(t)?t:a.from(t,i),o=s.length;if(0===o)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(n=0;n<r-e;++n)this[n+e]=s[n%o]}return this};let E={};function k(t,e,r){E[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function M(t){let e="",r=t.length,i=+("-"===t[0]);for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function B(t,e,r,i,n,s){if(t>r||t<e){let i,n="bigint"==typeof e?"n":"";throw i=s>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${(s+1)*8}${n}`:`>= -(2${n} ** ${(s+1)*8-1}${n}) and < 2 ** ${(s+1)*8-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new E.ERR_OUT_OF_RANGE("value",i,t)}P(n,"offset"),(void 0===i[n]||void 0===i[n+s])&&I(n,i.length-(s+1))}function P(t,e){if("number"!=typeof t)throw new E.ERR_INVALID_ARG_TYPE(e,"number",t)}function I(t,e,r){if(Math.floor(t)!==t)throw P(t,r),new E.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new E.ERR_BUFFER_OUT_OF_BOUNDS;throw new E.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${e}`,t)}k("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),k("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),k("ERR_OUT_OF_RANGE",function(t,e,r){let i=`The value of "${t}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?n=M(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=M(n)),n+="n"),i+=` It must be ${e}. Received ${n}`},RangeError);let R=/[^+/0-9A-Za-z-_]/g;function L(t,e){let r;e=e||1/0;let i=t.length,n=null,s=[];for(let o=0;o<i;++o){if((r=t.charCodeAt(o))>
51755295&&r<57344){if(!n){if(r>56319||o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function O(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,i){let n;for(n=0;n<i&&!(n+r>=e.length)&&!(n>=t.length);++n)e[n+r]=t[n];return n}function U(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let D=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let i=16*r;for(let n=0;n<16;++n)e[i+n]=t[r]+t[n]}return e}();function N(t){return"u"<typeof BigInt?z:t}function z(){throw Error("BigInt not supported")}},97786:(t,e,r)=>{"use strict";r.d(e,{V:()=>h});var i=r(66888),n=r(20060),s=r(44571),o=r(52819),a=r(30204);function l(t,e){if(!(t instanceof o.h)){let r=e?a.S.INDEX:a.S.VERTEX;t instanceof Array&&(e?(t=new Uint32Array(t),r=a.S.INDEX|a.S.COPY_DST):(t=new Float32Array(t),r=a.S.VERTEX|a.S.COPY_DST)),t=new o.h({data:t,label:e?"index-mesh-buffer":"vertex-mesh-buffer",usage:r})}return t}class h extends i.A{constructor(t={}){super(),this.uid=(0,s.L)("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new n.c,this._boundsDirty=!0;const{attributes:e,indexBuffer:r,topology:i}=t;if(this.buffers=[],this.attributes={},e)for(const t in e)this.addAttribute(t,e[t]);this.instanceCount=t.instanceCount??1,r&&this.addIndex(r),this.topology=i||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(t){return this.attributes[t]}getIndex(){return this.indexBuffer}getBuffer(t){return this.getAttribute(t).buffer}getSize(){for(let t in this.attributes){let e=this.attributes[t];return e.buffer.data.length/(e.stride/4||e.size)}return 0}addAttribute(t,e){var r;let i=(((r=e)instanceof o.h||Array.isArray(r)||r.BYTES_PER_ELEMENT)&&(r={buffer:r}),r.buffer=l(r.buffer,!1),r);-1===this.buffers.indexOf(i.buffer)&&(this.buffers.push(i.buffer),i.buffer.on("update",this.onBufferUpdate,this),i.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=i}addIndex(t){this.indexBuffer=l(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,function(t,e,r){let i=t.getAttribute(e);if(!i)return r.minX=0,r.minY=0,r.maxX=0,r.maxY=0,r;let n=i.buffer.data,s=1/0,o=1/0,a=-1/0,l=-1/0,h=n.BYTES_PER_ELEMENT,u=(i.offset||0)/h,d=(i.stride||8)/h;for(let t=u;t<n.length;t+=d){let e=n[t],r=n[t+1];e>a&&(a=e),r>l&&(l=r),e<s&&(s=e),r<o&&(o=r)}return r.minX=s,r.minY=o,r.maxX=a,r.maxY=l,r}(this,"aPosition",this._bounds)):this._bounds}destroy(t=!1){this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(t=>t.destroy()),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}},97788:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var n=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise(function(r,i){var n,s,o;function a(r){t.removeListener(e,l),i(r)}function l(){"function"==typeof t.removeListener&&t.removeListener("error",a),r([].slice.call(arguments))}g(t,e,l,{once:!0}),"error"!==e&&(n=t,s=a,o={once:!0},"function"==typeof n.on&&g(n,"error",s,o))})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(t){if("function"!=typeof t)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function h(t,e,r,i){if(a(r),void 0===(s=t._events)?(s=t._events=Object.create(null),t._eventsCount=0):(void 0!==s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),o=s[e]),void 0===o)o=s[e]=r,++t._eventsCount;else if("function"==typeof o?o=s[e]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),(n=l(t))>0&&o.length>n&&!o.warned){o.warned=!0;var n,s,o,h=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=o.length,console&&console.warn&&console.warn(h)}return t}function u(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=u.bind(i);return n.listener=r,i.wrapFn=n,n}function c(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):p(n,n.length)}function f(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=Array(e),i=0;i<e;++i)r[i]=t[i];return r}function g(t,e,r,i){if("function"==typeof t.on)i.once?t.once(e,r):t.on(e,r);else if("function"==typeof t.addEventListener)t.addEventListener(e,function n(s){i.once&&t.removeEventListener(e,n),r(s)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o}
517,set:function(t){if("number"!=typeof t||t<0||n(t))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");o=t}}),s.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||n(t))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,s=this._events;if(void 0!==s)n=n&&void 0===s.error;else if(!n)return!1;if(n){if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var o,a=Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[t];if(void 0===l)return!1;if("function"==typeof l)i(l,this,e);else for(var h=l.length,u=p(l,h),r=0;r<h;++r)i(u[r],this,e);return!0},s.prototype.addListener=function(t,e){return h(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return h(this,t,e,!0)},s.prototype.once=function(t,e){return a(e),this.on(t,d(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,d(this,t,e)),this},s.prototype.removeListener=function(t,e){var r,i,n,s,o;if(a(e),void 0===(i=this._events)||void 0===(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(n=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){o=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,n),1===r.length&&(i[t]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",t,o||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0==arguments.length){var n,s=Object.keys(r);for(i=0;i<s.length;++i)"removeListener"!==(n=s[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},s.prototype.listeners=function(t){return c(this,t,!0)},s.prototype.rawListeners=function(t){return c(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},98471:(t,e,r)=>{"use strict";r.d(e,{C:()=>i});class i{constructor(t){this.items=[],this._name=t}emit(t,e,r,i,n,s,o,a){let{name:l,items:h}=this;for(let u=0,d=h.length;u<d;u++)h[u][l](t,e,r,i,n,s,o,a);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){let e=this.items.indexOf(t);return -1!==e&&this.items.splice(e,1),this}contains(t){return -1!==this.items.indexOf(t)}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return 0===this.items.length}get name(){return this._name}}},98733:(t,e,r)=>{"use strict";let{ArrayPrototypePop:i,Promise:n}=r(34418),{isIterable:s,isNodeStream:o,isWebStream:a}=r(71343),{pipelineImpl:l}=r(27608),{finished:h}=r(86650);r(45426),t.exports={finished:h,pipeline:function(...t){return new n((e,r)=>{let n,h,u=t[t.length-1];if(u&&"object"==typeof u&&!o(u)&&!s(u)&&!a(u)){let e=i(t);n=e.signal,h=e.end}l(t,(t,i)=>{t?r(t):e(i)},{signal:n,end:h})})}}},99359:(t,e,r)=>{"use strict";r.d(e,{K:()=>s,Q:()=>i});let i={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var n,s=((n=s||{})[n.DISABLED=0]="DISABLED",n[n.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",n[n.MASK_ACTIVE=2]="MASK_ACTIVE",n[n.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",n[n.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",n[n.NONE=5]="NONE",
517n)}}]);

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.