PageSourceSearch

https://lineaccountmedia.com/_next/static/chunks/1619.5af24812bf35fa05.js

js lineaccountmedia.com collected 2026-10-02 23:55:07 UTC 64,621 bytes, 198 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:note-front-custom-domain":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dd212121-ab26-4231-bdd1-ec5baf3ff5d5",e._sentryDebugIdIdentifier="sentry-dbid-dd212121-ab26-4231-bdd1-ec5baf3ff5d5")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1619],{10730:(e,t,r)=>{var i=r(34943);class s{execute(e,t){let r=e.state,i=e.renderer,s=t.shader||e.defaultShader;s.resources.uTexture=t.texture._source,s.resources.uniforms=e.localUniforms;let a=i.gl,n=e.getBuffers(t);i.shader.bind(s),i.state.set(r),i.geometry.bind(n.geometry,s.glProgram);let o=2===n.geometry.indexBuffer.data.BYTES_PER_ELEMENT?a.UNSIGNED_SHORT:a.UNSIGNED_INT;a.drawElements(a.TRIANGLES,6*t.particleChildren.length,o,0)}}"use strict";var a=r(19677),n=r(7258),o=r(50121),l=r(14545),u=r(52e3),d=r(19777),h=r(73608),c=r(22236),p=r(60687),f=r(96197),g=r(46480),m=r(53934),x="\nstruct ParticleUniforms {\n  uProjectionMatrix:mat3x3<f32>,\n  uColor:vec4<f32>,\n  uResolution:vec2<f32>,\n  uRoundPixels:f32,\n};\n\n@group(0) @binding(0) var<uniform> uniforms: ParticleUniforms;\n\n@group(1) @binding(0) var uTexture: texture_2d<f32>;\n@group(1) @binding(1) var uSampler : sampler;\n\nstruct VSOutput {\n    @builtin(position) position: vec4<f32>,\n    @location(0) uv : vec2<f32>,\n    @location(1) color : vec4<f32>,\n  };\n@vertex\nfn mainVertex(\n  @location(0) aVertex: vec2<f32>,\n  @location(1) aPosition: vec2<f32>,\n  @location(2) aUV: vec2<f32>,\n  @location(3) aColor: vec4<f32>,\n  @location(4) aRotation: f32,\n) -> VSOutput {\n  \n   let v = vec2(\n       aVertex.x * cos(aRotation) - aVertex.y * sin(aRotation),\n       aVertex.x * sin(aRotation) + aVertex.y * cos(aRotation)\n   ) + aPosition;\n\n   let position = vec4((uniforms.uProjectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    let vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uniforms.uColor;\n\n  return VSOutput(\n   position,\n   aUV,\n   vColor,\n  );\n}\n\n@fragment\nfn mainFragment(\n  @location(0) uv: vec2<f32>,\n  @location(1) color: vec4<f32>,\n  @builtin(position) position: vec4<f32>,\n) -> @location(0) vec4<f32> {\n\n    var sample = textureSample(uTexture, uSampler, uv) * color;\n   \n    return sample;\n}";class _ extends f.M{constructor(){super({glProgram:c.M.from({vertex:"attribute vec2 aVertex;\nattribute vec2 aUV;\nattribute vec4 aColor;\n\nattribute vec2 aPosition;\nattribute float aRotation;\n\nuniform mat3 uTranslationMatrix;\nuniform float uRound;\nuniform vec2 uResolution;\nuniform vec4 uColor;\n\nvarying vec2 vUV;\nvarying vec4 vColor;\n\nvec2 roundPixels(vec2 position, vec2 targetSize)\n{       \n    return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n}\n\nvoid main(void){\n    float cosRotation = cos(aRotation);\n    float sinRotation = sin(aRotation);\n    float x = aVertex.x * cosRotation - aVertex.y * sinRotation;\n    float y = aVertex.x * sinRotation + aVertex.y * cosRotation;\n\n    vec2 v = vec2(x, y);\n    v = v + aPosition;\n\n    gl_Position = vec4((uTranslationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    if(uRound == 1.0)\n    {\n        gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n    }\n\n    vUV = aUV;\n    vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uColor;\n}\n",fragment:"varying vec2 vUV;\nvarying vec4 vColor;\n\nuniform sampler2D uTexture;\n\nvoid main(void){\n    vec4 color = texture2D(uTexture, vUV) * vColor;\n    gl_FragColor = color;\n}"}),gpuProgram:p.B.from({fragment:{source:x,entryPoint:"mainFragment"},vertex:{source:x,entryPoint:"mainVertex"}}),resources:{uTexture:g.g.WHITE.source,uSampler:new m.n({}),uniforms:{uTranslationMatrix:{value:new a.u,type:"mat3x3<f32>"},uColor:{value:new h.Q(0xffffff),type:"vec4<f32>"},uRound:{value:1,type:"f32"}
1,uResolution:{value:[0,0],type:"vec2<f32>"}}}})}}"use strict";class b{constructor(e,t){this.state=l.U.for2d(),this._gpuBufferHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.localUniforms=new n.k({uTranslationMatrix:{value:new a.u,type:"mat3x3<f32>"},uColor:{value:new Float32Array(4),type:"vec4<f32>"},uRound:{value:1,type:"f32"},uResolution:{value:[0,0],type:"vec2<f32>"}}),this.renderer=e,this.adaptor=t,this.defaultShader=new _,this.state=l.U.for2d()}validateRenderable(e){return!1}addRenderable(e,t){this.renderer.renderPipes.batch.break(t),t.add(e)}getBuffers(e){return this._gpuBufferHash[e.uid]||this._initBuffer(e)}_initBuffer(e){return this._gpuBufferHash[e.uid]=new d.h({size:e.particleChildren.length,properties:e._properties}),e.on("destroyed",this._destroyRenderableBound),this._gpuBufferHash[e.uid]}updateRenderable(e){}destroyRenderable(e){this._gpuBufferHash[e.uid].destroy(),this._gpuBufferHash[e.uid]=null,e.off("destroyed",this._destroyRenderableBound)}execute(e){let t=e.particleChildren;if(0===t.length)return;let r=this.renderer,i=this.getBuffers(e);e.texture||(e.texture=t[0].texture);let s=this.state;i.update(t,e._childrenDirty),e._childrenDirty=!1,s.blendMode=(0,o.i)(e.blendMode,e.texture._source);let a=this.localUniforms.uniforms,n=a.uTranslationMatrix;e.worldTransform.copyTo(n),n.prepend(r.globalUniforms.globalUniformData.projectionMatrix),a.uResolution=r.globalUniforms.globalUniformData.resolution,a.uRound=r._roundPixels|e._roundPixels,(0,u.V)(e.groupColorAlpha,a.uColor,0),this.adaptor.execute(this,e)}destroy(){this.defaultShader&&(this.defaultShader.destroy(),this.defaultShader=null)}}"use strict";class y extends b{constructor(e){super(e,new s)}}y.extension={type:[i.Ag.WebGLPipes],name:"particle"};class v{execute(e,t){let r=e.renderer,i=t.shader||e.defaultShader;i.groups[0]=r.renderPipes.uniformBatch.getUniformBindGroup(e.localUniforms,!0),i.groups[1]=r.texture.getTextureBindGroup(t.texture);let s=e.state,a=e.getBuffers(t);r.encoder.draw({geometry:a.geometry,shader:t.shader||e.defaultShader,state:s,size:6*t.particleChildren.length})}}"use strict";class T extends b{constructor(e){super(e,new v)}}"use strict";T.extension={type:[i.Ag.WebGPUPipes],name:"particle"},i.XO.add(y),i.XO.add(T)},14545:(e,t,r)=>{r.d(t,{U:()=>a});let i={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},s=class e{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(1&this.data)}set blend(e){!!(1&this.data)!==e&&(this.data^=1)}get offsets(){return!!(2&this.data)}set offsets(e){!!(2&this.data)!==e&&(this.data^=2)}set cullMode(e){if("none"===e){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace="front"===e}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(4&this.data)}set culling(e){!!(4&this.data)!==e&&(this.data^=4)}get depthTest(){return!!(8&this.data)}set depthTest(e){!!(8&this.data)!==e&&(this.data^=8)}get depthMask(){return!!(32&this.data)}set depthMask(e){!!(32&this.data)!==e&&(this.data^=32)}get clockwiseFrontFace(){return!!(16&this.data)}set clockwiseFrontFace(e){!!(16&this.data)!==e&&(this.data^=16)}get blendMode(){return this._blendMode}set blendMode(e){this.blend="none"!==e,this._blendMode=e,this._blendModeId=i[e]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){let t=new e;return t.depthTest=!1,t.blend=!0,t}};s.default2d=s.for2d();let a=s},17166:(e,t,r)=>{"use strict";var i=r(34943);class s{static init(e){Object.defineProperty(this,"resizeTo",{set(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{let e,t;if(this._resizeTo){if(this._cancelResize(),this._resizeTo===globalThis.window)e=globalThis.innerWidth,t=globalThis.innerHeight;else{let{clientWidth:r,clientHeight:i}=this._resizeTo;e=r,t=i}this.renderer.resize(e,t),this.render()}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}s.extension=i.Ag.Application;var a=r(95620),n=r(78128);class o{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,a.d.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?n.R.shared:new n.R,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}}o.extension=i.Ag.Application,i.XO.add(s),i.XO.add(o)},18465:(e,t,r)=>{"use strict";var i=r(34943),s=r(75408),a=r(74258),n=r(70242),o=r(87690);let l=class e extends o.u{constructor(...e){super({});let t=e[0]??{};"number"==typeof t&&((0,n.t6)(n.lj,"PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),t={width:t,height:e[1],verticesX:e[2],verticesY:e[3]}
1),this.build(t)}build(t){t={...e.defaultOptions,...t},this.verticesX=this.verticesX??t.verticesX,this.verticesY=this.verticesY??t.verticesY,this.width=this.width??t.width,this.height=this.height??t.height;let r=this.verticesX*this.verticesY,i=[],s=[],a=[],n=this.verticesX-1,o=this.verticesY-1,l=this.width/n,u=this.height/o;for(let e=0;e<r;e++){let t=e%this.verticesX,r=e/this.verticesX|0;i.push(t*l,r*u),s.push(t/n,r/o)}let d=n*o;for(let e=0;e<d;e++){let t=e%n,r=e/n|0,i=r*this.verticesX+t,s=r*this.verticesX+t+1,o=(r+1)*this.verticesX+t,l=(r+1)*this.verticesX+t+1;a.push(i,s,o,s,l,o)}this.buffers[0].data=new Float32Array(i),this.buffers[1].data=new Float32Array(s),this.indexBuffer.data=new Uint32Array(a),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}};l.defaultOptions={width:100,height:100,verticesX:10,verticesY:10};let u=l,d=class e extends u{constructor(t={}){super({width:(t={...e.defaultOptions,...t}).width,height:t.height,verticesX:4,verticesY:4}),this.update(t)}update(e){this.width=e.width??this.width,this.height=e.height??this.height,this._originalWidth=e.originalWidth??this._originalWidth,this._originalHeight=e.originalHeight??this._originalHeight,this._leftWidth=e.leftWidth??this._leftWidth,this._rightWidth=e.rightWidth??this._rightWidth,this._topHeight=e.topHeight??this._topHeight,this._bottomHeight=e.bottomHeight??this._bottomHeight,this._anchorX=e.anchor?.x,this._anchorY=e.anchor?.y,this.updateUvs(),this.updatePositions()}updatePositions(){let e=this.positions,{width:t,height:r,_leftWidth:i,_rightWidth:s,_topHeight:a,_bottomHeight:n,_anchorX:o,_anchorY:l}=this,u=i+s,d=a+n,h=Math.min(t>u?1:t/u,r>d?1:r/d),c=o*t,p=l*r;e[0]=e[8]=e[16]=e[24]=-c,e[2]=e[10]=e[18]=e[26]=i*h-c,e[4]=e[12]=e[20]=e[28]=t-s*h-c,e[6]=e[14]=e[22]=e[30]=t-c,e[1]=e[3]=e[5]=e[7]=-p,e[9]=e[11]=e[13]=e[15]=a*h-p,e[17]=e[19]=e[21]=e[23]=r-n*h-p,e[25]=e[27]=e[29]=e[31]=r-p,this.getBuffer("aPosition").update()}updateUvs(){let e=this.uvs;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1;let t=1/this._originalWidth,r=1/this._originalHeight;e[2]=e[10]=e[18]=e[26]=t*this._leftWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[4]=e[12]=e[20]=e[28]=1-t*this._rightWidth,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.getBuffer("aUV").update()}};d.defaultOptions={width:100,height:100,leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10,originalWidth:100,originalHeight:100};class h{constructor(e){this._gpuSpriteHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e,this._renderer.renderableGC.addManagedHash(this,"_gpuSpriteHash")}addRenderable(e,t){let r=this._getGpuSprite(e);e.didViewUpdate&&this._updateBatchableSprite(e,r),this._renderer.renderPipes.batch.addToBatch(r,t)}updateRenderable(e){let t=this._gpuSpriteHash[e.uid];e.didViewUpdate&&this._updateBatchableSprite(e,t),t._batcher.updateElement(t)}validateRenderable(e){let t=this._getGpuSprite(e);return!t._batcher.checkAndUpdateTexture(t,e._texture)}destroyRenderable(e){let t=this._gpuSpriteHash[e.uid];s.Z.return(t.geometry),s.Z.return(t),this._gpuSpriteHash[e.uid]=null,e.off("destroyed",this._destroyRenderableBound)}_updateBatchableSprite(e,t){t.geometry.update(e),t.setTexture(e._texture)}_getGpuSprite(e){return this._gpuSpriteHash[e.uid]||this._initGPUSprite(e)}_initGPUSprite(e){let t=s.Z.get(a.U);return t.geometry=s.Z.get(d),t.renderable=e,t.transform=e.groupTransform,t.texture=e._texture,t.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuSpriteHash[e.uid]=t,e.didViewUpdate||this._updateBatchableSprite(e,t),e.on("destroyed",this._destroyRenderableBound),t}destroy(){for(let e in this._gpuSpriteHash)this._gpuSpriteHash[e].geometry.destroy();this._gpuSpriteHash=null,this._renderer=null}}h.extension={type:[i.Ag.WebGLPipes,i.Ag.WebGPUPipes,i.Ag.CanvasPipes],name:"nineSliceSprite"};i.XO.add(h)},31030:(e,t,r)=>{"use strict";let i;var s=r(34943),a=r(46480),n=r(75408),o=r(76908),l=r(90906);class u{constructor(e){this._gpuText=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e,this._renderer.runners.resolutionChange.add(this),this._renderer.renderableGC.addManagedHash(this,"_gpuText")}resolutionChange(){for(let e in this._gpuText){let t=this._gpuText[e];if(!t)continue;let r=t.batchableSprite.renderable;r._autoResolution&&(r._resolution=this._renderer.resolution,r.onViewUpdate())}}validateRenderable(e){let t=this._getGpuText(e),r=e._getKey();return t.textureNeedsUploading?(t.textureNeedsUploading=!1,!0):t.currentKey!==r}addRenderable(e,t){let r=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),this._renderer.renderPipes.batch.addToBatch(r,t)}updateRenderable(e){let t=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),t._batcher.updateElement(t)}destroyRenderable(e){e.off("destroyed",this._destroyRenderableBound),this._destroyRenderableById(e.uid)}_destroyRenderableById(e){let t=this._gpuText[e];this._renderer.htmlText.decreaseReferenceCount(t.currentKey),n.Z.return(t.batchableSprite),this._gpuText[e]=null}_updateText(e){let t=e._getKey(),r=this._getGpuText(e),i=r.batchableSprite;r.currentKey!==t&&this._updateGpuText(e).catch(e=>{console.error(e)}),e._didTextUpdate=!1,(0,l.s)(i,e)}async _updateGpuText(e){e._didTextUpdate=!1;let t=this._getGpuText(e);if(t.generatingTexture)return;let r=e._getKey();this._renderer.htmlText.decreaseReferenceCount(t.currentKey),t.generatingTexture=!0,t.currentKey=r;let i=e.resolution??this._renderer.resolution,s=await this._renderer.htmlText.getManagedTexture(e.text,i,e._style,e._getKey()),a=t.batchableSprite;a.texture=t.texture=s,t.generatingTexture=!1,t.textureNeedsUploading=!0,e.onViewUpdate(),(0,l.s)(a,e)}_getGpuText(e){return this._gpuText[e.uid]||this.initGpuText(e)}initGpuText(e){let t={texture:a.g.EMPTY,currentKey:"--",batchableSprite:n.Z.get(o.K),textureNeedsUploading:!1,generatingTexture:!1},r=t.batchableSprite;return r.renderable=e,r.transform=e.groupTransform,r.texture=a.g.EMPTY,r.bounds={minX:0,maxX:1,minY:0,maxY:0},r.roundPixels=this._renderer._roundPixels|e._roundPixels,e._resolution=e._autoResolution?this._renderer.resolution:e.resolution,this._gpuText[e.uid]=t,e.on("destroyed",this._destroyRenderableBound),t}destroy(){for(let e in this._gpuText)this._destroyRenderableById(e);this._gpuText=null,this._renderer=null}}u.extension={type:[s.Ag.WebGLPipes,s.Ag.WebGPUPipes,s.Ag.CanvasPipes],name:"htmlText"};"use strict";var d=r(10380),h=r(11627),c=r(7475),p=r(47397),f=r(53670),g=r(34732);let m="http://www.w3.org/2000/svg",x="http://www.w3.org/1999/xhtml";class _{constructor(){this.svgRoot=document.createElementNS(m,"svg"),this.foreignObject=document.createElementNS(m,"foreignObject"),this.domElement=document.createElementNS(x,"div"),this.styleElement=document.createElementNS(x,"style"),this.image=new Image;const{foreignObject:e,svgRoot:t,styleElement:r,domElement:i}=this;e.setAttribute("width","10000"),e.setAttribute("height","10000"),e.style.overflow="hidden",t.appendChild(e),e.appendChild(r),e.a
1ppendChild(i)}}"use strict";var b=r(82989),y=r(87071),v=r(73608);function T(e){let t=v.Q.shared.setValue(e.color).setAlpha(e.alpha).toHexa(),r=Math.round(Math.cos(e.angle)*e.distance),i=Math.round(Math.sin(e.angle)*e.distance),s=`${r}px ${i}px`;return e.blur>0?`text-shadow: ${s} ${e.blur}px ${t}`:`text-shadow: ${s} ${t}`}function S(e){return`-webkit-text-stroke-width: ${e.width}px;-webkit-text-stroke-color: ${v.Q.shared.setValue(e.color).toHex()};text-stroke-width: ${e.width}px;text-stroke-color: ${v.Q.shared.setValue(e.color).toHex()};paint-order: stroke`}"use strict";let w={fontSize:"font-size: {{VALUE}}px",fontFamily:"font-family: {{VALUE}}",fontWeight:"font-weight: {{VALUE}}",fontStyle:"font-style: {{VALUE}}",fontVariant:"font-variant: {{VALUE}}",letterSpacing:"letter-spacing: {{VALUE}}px",align:"text-align: {{VALUE}}",padding:"padding: {{VALUE}}px",whiteSpace:"white-space: {{VALUE}}",lineHeight:"line-height: {{VALUE}}px",wordWrapWidth:"max-width: {{VALUE}}px"},C={fill:e=>`color: ${v.Q.shared.setValue(e).toHex()}`,breakWords:e=>`word-wrap: ${e?"break-all":"break-word"}`,stroke:S,dropShadow:T};class R extends b.x{constructor(e={}){super(e),this._cssOverrides=[],this.cssOverrides??(this.cssOverrides=e.cssOverrides),this.tagStyles=e.tagStyles??{}}set cssOverrides(e){this._cssOverrides=e instanceof Array?e:[e],this.update()}get cssOverrides(){return this._cssOverrides}_generateKey(){return this._styleKey=(0,y.V)(this)+this._cssOverrides.join("-"),this._styleKey}update(){this._cssStyle=null,super.update()}clone(){return new R({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,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,cssOverrides:this.cssOverrides})}get cssStyle(){let e,t,r,i;return this._cssStyle||(this._cssStyle=(e=this._stroke,t=this._fill,r=[`color: ${v.Q.shared.setValue(t.color).toHex()}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${"pre"===this.whiteSpace&&this.wordWrap?"pre-wrap":this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...e?[S(e)]:[],...this.dropShadow?[T(this.dropShadow)]:[],...this.cssOverrides].join(";"),i=[`div { ${r} }`],function(e,t){for(let r in e){let i=e[r],s=[];for(let e in i)C[e]?s.push(C[e](i[e])):w[e]&&s.push(w[e].replace("{{VALUE}}",i[e]));t.push(`${r} { ${s.join(";")} }`)}}(this.tagStyles,i),i.join(" "))),this._cssStyle}addOverride(...e){let t=e.filter(e=>!this.cssOverrides.includes(e));t.length>0&&(this.cssOverrides.push(...t),this.update())}removeOverride(...e){let t=e.filter(e=>this.cssOverrides.includes(e));t.length>0&&(this.cssOverrides=this.cssOverrides.filter(e=>!t.includes(e)),this.update())}set fill(e){"string"!=typeof e&&"number"!=typeof e&&(0,f.R)("[HTMLTextStyle] only color fill is not supported by HTMLText"),super.fill=e}set stroke(e){e&&"string"!=typeof e&&"number"!=typeof e&&(0,f.R)("[HTMLTextStyle] only color stroke is not supported by HTMLText"),super.stroke=e}}"use strict";var M=r(24793);async function B(e){let t=await p.e.get().fetch(e),r=await t.blob(),i=new FileReader;return await new Promise((e,t)=>{i.onloadend=()=>e(i.result),i.onerror=t,i.readAsDataURL(r)})}"use strict";async function U(e,t){let r=await B(t);return`@font-face {
2        font-family: "${e.fontFamily}";
3        src: url('${r}');
4        font-weight: ${e.fontWeight};
5        font-style: ${e.fontStyle};
6    }`}"use strict";let P=new Map;async function k(e,t,r){let i=e.filter(e=>M.l.has(`${e}-and-url`)).map((e,i)=>{if(!P.has(e)){let{url:s}=M.l.get(`${e}-and-url`);0===i?P.set(e,U({fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:e},s)):P.set(e,U({fontWeight:r.fontWeight,fontStyle:r.fontStyle,fontFamily:e},s))}return P.get(e)});return(await Promise.all(i)).join("\n")}"use strict";"use strict";"use strict";class A{constructor(e){this._activeTextures={},this._renderer=e,this._createCanvas=e.type===c.W.WEBGPU}getTexture(e){return this._buildTexturePromise(e.text,e.resolution,e.style)}
6getManagedTexture(e,t,r,i){if(this._activeTextures[i])return this._increaseReferenceCount(i),this._activeTextures[i].promise;let s=this._buildTexturePromise(e,t,r).then(e=>(this._activeTextures[i].texture=e,e));return this._activeTextures[i]={texture:null,promise:s,usageCount:1},s}async _buildTexturePromise(e,t,r){var s;let a,o=n.Z.get(_),l=function(e,t){let r=t.fontFamily,i=[],s={},a=e.match(/font-family:([^;"\s]+)/g);function n(e){s[e]||(i.push(e),s[e]=!0)}if(Array.isArray(r))for(let e=0;e<r.length;e++)n(r[e]);else n(r);for(let e in a&&a.forEach(e=>{n(e.split(":")[1].trim())}),t.tagStyles)n(t.tagStyles[e].fontFamily);return i}(e,r),u=await k(l,r,R.defaultTextStyle),h=function(e,t,r,s){s||(s=i||(i=new _));let{domElement:a,styleElement:n,svgRoot:o}=s;a.innerHTML=`<style>${t.cssStyle};</style><div style='padding:0'>${e}</div>`,a.setAttribute("style","transform-origin: top left; display: inline-block"),r&&(n.textContent=r),document.body.appendChild(o);let l=a.getBoundingClientRect();o.remove();let u=2*t.padding;return{width:l.width-u,height:l.height-u}}(e,r,u,o),c=Math.ceil(Math.ceil(Math.max(1,h.width)+2*r.padding)*t),f=Math.ceil(Math.ceil(Math.max(1,h.height)+2*r.padding)*t),m=o.image;m.width=(0|c)+2,m.height=(0|f)+2;let x=function(e,t,r,i,s){let{domElement:a,styleElement:n,svgRoot:o}=s;a.innerHTML=`<style>${t.cssStyle}</style><div style='padding:0;'>${e}</div>`,a.setAttribute("style",`transform: scale(${r});transform-origin: top left; display: inline-block`),n.textContent=i;let{width:l,height:u}=s.image;return o.setAttribute("width",l.toString()),o.setAttribute("height",u.toString()),new XMLSerializer().serializeToString(o)}(e,r,t,u,o);await (s=function(){let{userAgent:e}=p.e.get().getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}()&&l.length>0,new Promise(async e=>{s&&await new Promise(e=>setTimeout(e,100)),m.onload=()=>{e()},m.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(x)}`,m.crossOrigin="anonymous"})),this._createCanvas&&(a=function(e,t){let r=d.N.getOptimalCanvasAndContext(e.width,e.height,t),{context:i}=r;return i.clearRect(0,0,e.width,e.height),i.drawImage(e,0,0),r}(m,t));let b=(0,g.M)(a?a.canvas:m,m.width-2,m.height-2,t);return this._createCanvas&&(this._renderer.texture.initSource(b.source),d.N.returnCanvasAndContext(a)),n.Z.return(o),b}_increaseReferenceCount(e){this._activeTextures[e].usageCount++}decreaseReferenceCount(e){let t=this._activeTextures[e];t&&(t.usageCount--,0===t.usageCount&&(t.texture?this._cleanUp(t):t.promise.then(e=>{t.texture=e,this._cleanUp(t)}).catch(()=>{(0,f.R)("HTMLTextSystem: Failed to clean texture")}),this._activeTextures[e]=null))}_cleanUp(e){h.W.returnTexture(e.texture),e.texture.source.resource=null,e.texture.source.uploadMethodId="unknown"}getReferenceCount(e){return this._activeTextures[e].usageCount}destroy(){this._activeTextures=null}}"use strict";A.extension={type:[s.Ag.WebGLSystem,s.Ag.WebGPUSystem,s.Ag.CanvasSystem],name:"htmlText"},A.defaultFontOptions={fontFamily:"Arial",fontStyle:"normal",fontWeight:"normal"},s.XO.add(A),s.XO.add(u)},34732:(e,t,r)=>{r.d(t,{M:()=>a});"use strict";var i=r(11627);let s=new(r(20060)).c;function a(e,t,r,a){s.minX=0,s.minY=0,s.maxX=e.width/a|0,s.maxY=e.height/a|0;let n=i.W.getOptimalTexture(s.width,s.height,a,!1);return n.source.uploadMethodId="image",n.source.resource=e,n.source.alphaMode="premultiply-alpha-on-upload",n.frame.width=t/a,n.frame.height=r/a,n.source.emit("update",n.source),n.updateUvs(),n}},36683:(e,t,r)=>{"use strict";var i=r(34943),s=r(19677),a=r(76055),n=r(7258),o=r(50121),l=r(75408),u=r(52e3),d=r(74258);class h{constructor(e,t){this.localUniforms=new n.k({uTransformMatrix:{value:new s.u,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),this.localUniformsBindGroup=new a.T({0:this.localUniforms}),this._meshDataHash=Object.create(null),this._gpuBatchableMeshHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.renderer=e,this._adaptor=t,this._adaptor.init(),e.renderableGC.addManagedHash(this,"_gpuBatchableMeshHash"),e.renderableGC.addManagedHash(this,"_meshDataHash")}validateRenderable(e){let t=this._getMeshData(e),r=t.batched,i=e.batched;
6if(t.batched=i,r!==i)return!0;if(i){let r=e._geometry;if(r.indices.length!==t.indexSize||r.positions.length!==t.vertexSize)return t.indexSize=r.indices.length,t.vertexSize=r.positions.length,!0;let i=this._getBatchableMesh(e);return i.texture.uid!==e._texture.uid&&(i._textureMatrixUpdateId=-1),!i._batcher.checkAndUpdateTexture(i,e._texture)}return!1}addRenderable(e,t){let r=this.renderer.renderPipes.batch,{batched:i}=this._getMeshData(e);if(i){let i=this._getBatchableMesh(e);i.setTexture(e._texture),i.geometry=e._geometry,r.addToBatch(i,t)}else r.break(t),t.add(e)}updateRenderable(e){if(e.batched){let t=this._gpuBatchableMeshHash[e.uid];t.setTexture(e._texture),t.geometry=e._geometry,t._batcher.updateElement(t)}}destroyRenderable(e){this._meshDataHash[e.uid]=null;let t=this._gpuBatchableMeshHash[e.uid];t&&(l.Z.return(t),this._gpuBatchableMeshHash[e.uid]=null),e.off("destroyed",this._destroyRenderableBound)}execute(e){if(!e.isRenderable)return;e.state.blendMode=(0,o.i)(e.groupBlendMode,e.texture._source);let t=this.localUniforms;t.uniforms.uTransformMatrix=e.groupTransform,t.uniforms.uRound=this.renderer._roundPixels|e._roundPixels,t.update(),(0,u.V)(e.groupColorAlpha,t.uniforms.uColor,0),this._adaptor.execute(this,e)}_getMeshData(e){return this._meshDataHash[e.uid]||this._initMeshData(e)}_initMeshData(e){return this._meshDataHash[e.uid]={batched:e.batched,indexSize:e._geometry.indices?.length,vertexSize:e._geometry.positions?.length},e.on("destroyed",this._destroyRenderableBound),this._meshDataHash[e.uid]}_getBatchableMesh(e){return this._gpuBatchableMeshHash[e.uid]||this._initBatchableMesh(e)}_initBatchableMesh(e){let t=l.Z.get(d.U);return t.renderable=e,t.setTexture(e._texture),t.transform=e.groupTransform,t.roundPixels=this.renderer._roundPixels|e._roundPixels,this._gpuBatchableMeshHash[e.uid]=t,t}destroy(){for(let e in this._gpuBatchableMeshHash)this._gpuBatchableMeshHash[e]&&l.Z.return(this._gpuBatchableMeshHash[e]);this._gpuBatchableMeshHash=null,this._meshDataHash=null,this.localUniforms=null,this.localUniformsBindGroup=null,this._adaptor.de
6stroy(),this._adaptor=null,this.renderer=null}}h.extension={type:[i.Ag.WebGLPipes,i.Ag.WebGPUPipes,i.Ag.CanvasPipes],name:"mesh"};i.XO.add(h)},40300:(e,t,r)=>{"use strict";var i=r(34943),s=r(36710),a=r(14545),n=r(75408),o=r(52e3),l=r(50098);class u{constructor(e,t){this.state=a.U.for2d(),this._graphicsBatchesHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.renderer=e,this._adaptor=t,this._adaptor.init(),this.renderer.renderableGC.addManagedHash(this,"_graphicsBatchesHash")}validateRenderable(e){let t=e.context,r=!!this._graphicsBatchesHash[e.uid],i=this.renderer.graphicsContext.updateGpuContext(t);return!!i.isBatchable||r!==i.isBatchable}addRenderable(e,t){let r=this.renderer.graphicsContext.updateGpuContext(e.context);e.didViewUpdate&&this._rebuild(e),r.isBatchable?this._addToBatcher(e,t):(this.renderer.renderPipes.batch.break(t),t.add(e))}updateRenderable(e){let t=this._graphicsBatchesHash[e.uid];if(t)for(let e=0;e<t.length;e++){let r=t[e];r._batcher.updateElement(r)}}destroyRenderable(e){this._graphicsBatchesHash[e.uid]&&this._removeBatchForRenderable(e.uid),e.off("destroyed",this._destroyRenderableBound)}execute(e){if(!e.isRenderable)return;let t=this.renderer,r=e.context;if(!t.graphicsContext.getGpuContext(r).batches.length)return;let i=r.customShader||this._adaptor.shader;this.state.blendMode=e.groupBlendMode;let s=i.resources.localUniforms.uniforms;s.uTransformMatrix=e.groupTransform,s.uRound=t._roundPixels|e._roundPixels,(0,o.V)(e.groupColorAlpha,s.uColor,0),this._adaptor.execute(this,e)}_rebuild(e){let t=!!this._graphicsBatchesHash[e.uid],r=this.renderer.graphicsContext.updateGpuContext(e.context);t&&this._removeBatchForRenderable(e.uid),r.isBatchable&&this._initBatchesForRenderable(e),e.batched=r.isBatchable}_addToBatcher(e,t){let r=this.renderer.renderPipes.batch,i=this._getBatchesForRenderable(e);for(let e=0;e<i.length;e++){let s=i[e];r.addToBatch(s,t)}}_getBatchesForRenderable(e){return this._graphicsBatchesHash[e.uid]||this._initBatchesForRenderable(e)}_initBatchesForRenderable(e){let t=e.context,r=this.renderer.graphicsContext.getGpuContext(t),i=this.renderer._roundPixels|e._roundPixels,s=r.batches.map(t=>{let r=n.Z.get(l.G);return t.copyTo(r),r.renderable=e,r.roundPixels=i,r});return void 0===this._graphicsBatchesHash[e.uid]&&e.on("destroyed",this._destroyRenderableBound),this._graphicsBatchesHash[e.uid]=s,s}_removeBatchForRenderable(e){this._graphicsBatchesHash[e].forEach(e=>{n.Z.return(e)}),this._graphicsBatchesHash[e]=null}
6destroy(){for(let e in this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null,this._graphicsBatchesHash)this._removeBatchForRenderable(e);this._graphicsBatchesHash=null}}u.extension={type:[i.Ag.WebGLPipes,i.Ag.WebGPUPipes,i.Ag.CanvasPipes],name:"graphics"},i.XO.add(u),i.XO.add(s.GH)},50939:(e,t,r)=>{let i,s;var a=r(34943),n=r(50121),o=r(14545),l=r(7475),u=r(52e3),d=r(74258),h=r(87690),c=r(19677),p=r(70728),f=r(66359),g=r(24555),m=r(96197),x=r(7258),_=r(46480);"use strict";let b={name:"tiling-bit",vertex:{header:`
7            struct TilingUniforms {
8                uMapCoord:mat3x3<f32>,
9                uClampFrame:vec4<f32>,
10                uClampOffset:vec2<f32>,
11                uTextureTransform:mat3x3<f32>,
12                uSizeAnchor:vec4<f32>
13            };
14
15            @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
16            @group(2) @binding(1) var uTexture: texture_2d<f32>;
17            @group(2) @binding(2) var uSampler: sampler;
18        `,main:`
19            uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy;
20
21            position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy;
22        `},fragment:{header:`
23            struct TilingUniforms {
24                uMapCoord:mat3x3<f32>,
25                uClampFrame:vec4<f32>,
26                uClampOffset:vec2<f32>,
27                uTextureTransform:mat3x3<f32>,
28                uSizeAnchor:vec4<f32>
29            };
30
31            @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
32            @group(2) @binding(1) var uTexture: texture_2d<f32>;
33            @group(2) @binding(2) var uSampler: sampler;
34        `,main:`
35
36            var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV);
37            coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy;
38            var unclamped = coord;
39            coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw);
40
41            var bias = 0.;
42
43            if(unclamped.x == coord.x && unclamped.y == coord.y)
44            {
45                bias = -32.;
46            } 
47
48            outColor = textureSampleBias(uTexture, uSampler, coord, bias);
49        `}},y={name:"tiling-bit",vertex:{header:`
50            uniform mat3 uTextureTransform;
51            uniform vec4 uSizeAnchor;
52        
53        `,main:`
54            uv = (uTextureTransform * vec3(aUV, 1.0)).xy;
55
56            position = (position - uSizeAnchor.zw) * uSizeAnchor.xy;
57        `},fragment:{header:`
58            uniform sampler2D uTexture;
59            uniform mat3 uMapCoord;
60            uniform vec4 uClampFrame;
61            uniform vec2 uClampOffset;
62        `,main:`
63
64        vec2 coord = vUV + ceil(uClampOffset - vUV);
65        coord = (uMapCoord * vec3(coord, 1.0)).xy;
66        vec2 unclamped = coord;
67        coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
68        
69        outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0
70    
71        `}};class v extends m.M{constructor(){i??(i=(0,p.v)({name:"tiling-sprite-shader",bits:[f.Ls,b,g.b]})),s??(s=(0,p.I)({name:"tiling-sprite-shader",bits:[f.mA,y,g.m]}));const e=new x.k({uMapCoord:{value:new c.u,type:"mat3x3<f32>"},uClampFrame:{value:new Float32Array([0,0,1,1]),type:"vec4<f32>"},uClampOffset:{value:new Float32Array([0,0]),type:"vec2<f32>"},uTextureTransform:{value:new c.u,type:"mat3x3<f32>"},uSizeAnchor:{value:new Float32Array([100,100,.5,.5]),type:"vec4<f32>"}});super({glProgram:s,gpuProgram:i,resources:{localUniforms:new x.k({uTransformMatrix:{value:new c.u,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),tilingUniforms:e,uTexture:_.g.EMPTY.source,uSampler:_.g.EMPTY.source.style}})}updateUniforms(e,t,r,i,s,a){let n=this.resources.tilingUniforms,o=a.width,l=a.height,u=a.textureMatrix,d=n.uniforms.uTextureTransform;d.set(r.a*o/e,r.b*o/t,r.c*l/e,r.d*l/t,r.tx/e,r.ty/t),d.invert(),n.uniforms.uMapCoord=u.mapCoord,n.uniforms.uClampFrame=u.uClampFrame,n.uniforms.uClampOffset=u.uClampOffset,n.uniforms.uTextureTransform=d,n.uniforms.uSizeAnchor[0]=e,n.uniforms.uSizeAnchor[1]=t,n.uniforms.uSizeAnchor[2]=i,n.uniforms.uSizeAnchor[3]=s,a&&(this.resources.uTexture=a.source,this.resources.uSampler=a.source.style)}
71}"use strict";class T extends h.u{constructor(){super({positions:new Float32Array([0,0,1,0,1,1,0,1]),uvs:new Float32Array([0,0,1,0,1,1,0,1]),indices:new Uint32Array([0,1,2,0,2,3])})}}"use strict";"use strict";let S=new T;class w{constructor(e){this._state=o.U.default2d,this._tilingSpriteDataHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e,this._renderer.renderableGC.addManagedHash(this,"_tilingSpriteDataHash")}validateRenderable(e){let t=this._getTilingSpriteData(e),r=t.canBatch;this._updateCanBatch(e);let i=t.canBatch;if(i&&i===r){let{batchableMesh:r}=t;return!r._batcher.checkAndUpdateTexture(r,e.texture)}return r!==i}addRenderable(e,t){let r=this._renderer.renderPipes.batch;this._updateCanBatch(e);let i=this._getTilingSpriteData(e),{geometry:s,canBatch:a}=i;if(a){i.batchableMesh||(i.batchableMesh=new d.U);let a=i.batchableMesh;e.didViewUpdate&&(this._updateBatchableMesh(e),a.geometry=s,a.renderable=e,a.transform=e.groupTransform,a.setTexture(e._texture)),a.roundPixels=this._renderer._roundPixels|e._roundPixels,r.addToBatch(a,t)}else r.break(t),i.shader||(i.shader=new v),this.updateRenderable(e),t.add(e)}execute(e){let{shader:t}=this._tilingSpriteDataHash[e.uid];t.groups[0]=this._renderer.globalUniforms.bindGroup;let r=t.resources.localUniforms.uniforms;r.uTransformMatrix=e.groupTransform,r.uRound=this._renderer._roundPixels|e._roundPixels,(0,u.V)(e.groupColorAlpha,r.uColor,0),this._state.blendMode=(0,n.i)(e.groupBlendMode,e.texture._source),this._renderer.encoder.draw({geometry:S,shader:t,state:this._state})}updateRenderable(e){let t=this._getTilingSpriteData(e),{canBatch:r}=t;if(r){let{batchableMesh:r}=t;e.didViewUpdate&&this._updateBatchableMesh(e),r._batcher.updateElement(r)}else if(e.didViewUpdate){let{shader:r}=t;r.updateUniforms(e.width,e.height,e._tileTransform.matrix,e.anchor.x,e.anchor.y,e.texture)}}destroyRenderable(e){let t=this._getTilingSpriteData(e);t.batchableMesh=null,t.shader?.destroy(),this._tilingSpriteDataHash[e.uid]=null,e.off("destroyed",this._destroyRenderableBound)}_getTilingSpriteData(e){return this._tilingSpriteDataHash[e.uid]||this._initTilingSpriteData(e)}_initTilingSpriteData(e){let t=new h.u({indices:S.indices,positions:S.positions.slice(),uvs:S.uvs.slice()});return this._tilingSpriteDataHash[e.uid]={canBatch:!0,renderable:e,geometry:t},e.on("destroyed",this._destroyRenderableBound),this._tilingSpriteDataHash[e.uid]}_updateBatchableMesh(e){var t,r;let i,s,a,n,o,l,u,d,{geometry:h}=this._getTilingSpriteData(e),p=e.texture.source.style;"repeat"!==p.addressMode&&(p.addressMode="repeat",p.update()),t=h.uvs,s=(i=e.texture).frame.width,a=i.frame.height,n=0,o=0,e.applyAnchorToTexture&&(n=e.anchor.x,o=e.anchor.y),t[0]=t[6]=-n,t[2]=t[4]=1-n,t[1]=t[3]=-o,t[5]=t[7]=1-o,(l=c.u.shared).copyFrom(e._tileTransform.matrix),l.tx/=e.width,l.ty/=e.height,l.invert(),l.scale(e.width/s,e.height/a),function(e,t,r){let i=0,s=e.length/2,a=r.a,n=r.b,o=r.c,l=r.d,u=r.tx,d=r.ty;for(t*=2;i<s;){let r=e[t],s=e[t+1];e[t]=a*r+o*s+u,e[t+1]=n*r+l*s+d,t+=2,i++}}(t,0,l),r=h.positions,u=e.anchor.x,d=e.anchor.y,r[0]=-u*e.width,r[1]=-d*e.height,r[2]=(1-u)*e.width,r[3]=-d*e.height,r[4]=(1-u)*e.width,r[5]=(1-d)*e.height,r[6]=-u*e.width,r[7]=(1-d)*e.height}destroy(){for(let e in this._tilingSpriteDataHash)this.destroyRenderable(this._tilingSpriteDataHash[e].renderable);this._tilingSpriteDataHash=null,this._renderer=null}_updateCanBatch(e){let t=this._getTilingSpriteData(e),r=e.texture,i=!0;return this._renderer.type===l.W.WEBGL&&(i=this._renderer.context.supports.nonPowOf2wrapping),t.canBatch=r.textureMatrix.isSimple&&(i||r.source.isPowerOfTwo),t.canBatch}}w.extension={type:[a.Ag.WebGLPipes,a.Ag.WebGPUPipes,a.Ag.CanvasPipes],name:"tilingSprite"};"use strict";a.XO.add(w)},52e3:(e,t,r)=>{r.d(t,{V:()=>i});function i(e,t,r){let i=(e>>24&255)/255;t[r++]=(255&e)/255*i,t[r++]=(e>>8&255)/255*i,t[r++]=(e>>16&255)/255*i,t[r++]=i}},63892:(e,t,r)=>{"use strict";var i=r(34943),s=r(75408),a=r(76908),n=r(90906);class o{constructor(e){this._gpuText=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e,this._renderer.runners.resolutionChange.add(this),this._renderer.renderableGC.addManagedHash(this,"_gpuText")}resolutionChange(){for(let e in this._gpuText){let t=this._gpuText[e];if(!t)continue;let r=t.batchableSprite.renderable;r._autoResolution&&(r._resolution=this._renderer.resolution,r.onViewUpdate())}}validateRenderable(e){let t=this._getGpuText(e),r=e._getKey();return t.currentKey!==r}addRenderable(e,t){let r=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),this._renderer.renderPipes.batch.addToBatch(r,t)}updateRenderable(e){let t=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),t._batcher.updateElement(t)}destroyRenderable(e){e.off("destroyed",this._destroyRenderableBound),this._destroyRenderableById(e.uid)}_destroyRenderableById(e){let t=this._gpuText[e];this._renderer.canvasText.decreaseReferenceCount(t.currentKey),s.Z.return(t.batchableSprite),this._gpuText[e]=null}_updateText(e){let t=e._getKey(),r=this._getGpuText(e),i=r.batchableSprite;r.currentKey!==t&&this._updateGpuText(e),e._didTextUpdate=!1,(0,n.s)(i,e)}_updateGpuText(e){let t=this._getGpuText(e),r=t.batchableSprite;t.texture&&this._renderer.canvasText.decreaseReferenceCount(t.currentKey),t.texture=r.texture=this._renderer.canvasText.getManagedTexture(e),t.currentKey=e._getKey(),r.texture=t.texture}_getGpuText(e){return this._gpuText[e.uid]||this.initGpuText(e)}initGpuText(e){let t={texture:null,currentKey:"--",batchableSprite:s.Z.get(a.K)};return t.batchableSprite.renderable=e,t.batchableSprite.transform=e.groupTransform,t.batchableSprite.bounds={minX:0,maxX:1,minY:0,maxY:0},t.batchableSprite.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuText[e.uid]=t,e._resolution=e._autoResolution?this._renderer.resolution:e.resolution,this._updateText(e),e.on("destroyed",this._destroyRenderableBound),t}destroy(){for(let e in this._gpuText)this._destroyRenderableById(e);this._gpuText=null,this._renderer=null}}o.extension={type:[i.Ag.WebGLPipes,i.Ag.WebGPUPipes,i.Ag.CanvasPipes],name:"text"};var l=r(73608),u=r(27539),d=r(10380),h=r(11627),c=r(16434);function p(e,t,r){for(let i=0,s=4*r*t;i<t;++i,s+=4)if(0!==e[s+3])return!1;return!0}function f(e,t,r,i,s){let a=4*t;for(let t=i,n=i*a+4*r;t<=s;++t,n+=a)if(0!==e[n+3])return!1;return!0}
71var g=r(70242),m=r(82989),x=r(34732),_=r(24996),b=r(60018),y=r(67506);class v{constructor(e){this._activeTextures={},this._renderer=e}getTextureSize(e,t,r){let i=_.P.measureText(e||" ",r),s=Math.ceil(Math.ceil(Math.max(1,i.width)+2*r.padding)*t),a=Math.ceil(Math.ceil(Math.max(1,i.height)+2*r.padding)*t);return s=Math.ceil(s-1e-6),a=Math.ceil(a-1e-6),{width:s=(0,u.U5)(s),height:a=(0,u.U5)(a)}}getTexture(e,t,r,i){"string"==typeof e&&((0,g.t6)("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),e={text:e,style:r,resolution:t}),e.style instanceof m.x||(e.style=new m.x(e.style));let{texture:s,canvasAndContext:a}=this.createTextureAndCanvas(e);return this._renderer.texture.initSource(s._source),d.N.returnCanvasAndContext(a),s}createTextureAndCanvas(e){let{text:t,style:r}=e,i=e.resolution??this._renderer.resolution,s=_.P.measureText(t||" ",r),a=Math.ceil(Math.ceil(Math.max(1,s.width)+2*r.padding)*i),n=Math.ceil(Math.ceil(Math.max(1,s.height)+2*r.padding)*i),o=d.N.getOptimalCanvasAndContext(a,n),{canvas:l}=o;this.renderTextToCanvas(t,r,i,o);let u=(0,x.M)(l,a,n,i);if(r.trim){let e=function(e,t=1){let{width:r,height:i}=e,s=e.getContext("2d",{willReadFrequently:!0});if(null===s)throw TypeError("Failed to get canvas 2D context");let a=s.getImageData(0,0,r,i).data,n=0,o=0,l=r-1,u=i-1;for(;o<i&&p(a,r,o);)++o;if(o===i)return c.M.EMPTY;for(;p(a,r,u);)--u;for(;f(a,r,n,o,u);)++n;for(;f(a,r,l,o,u);)--l;return++l,++u,new c.M(n/t,o/t,(l-n)/t,(u-o)/t)}(l,i);u.frame.copyFrom(e),u.updateUvs()}return{texture:u,canvasAndContext:o}}getManagedTexture(e){e._resolution=e._autoResolution?this._renderer.resolution:e.resolution;let t=e._getKey();if(this._activeTextures[t])return this._increaseReferenceCount(t),this._activeTextures[t].texture;let{texture:r,canvasAndContext:i}=this.createTextureAndCanvas(e);return this._activeTextures[t]={canvasAndContext:i,texture:r,usageCount:1},r}_increaseReferenceCount(e){this._activeTextures[e].usageCount++}returnTexture(e){let t=e.source;t.resource=null,t.uploadMethodId="unknown",t.alphaMode="no-premultiply-alpha",h.W.returnTexture(e)}decreaseReferenceCount(e){let t=this._activeTextures[e];t.usageCount--,0===t.usageCount&&(d.N.returnCanvasAndContext(t.canvasAndContext),this.returnTexture(t.texture),this._activeTextures[e]=null)}getReferenceCount(e){return this._activeTextures[e].usageCount}renderTextToCanvas(e,t,r,i){let s,a,{canvas:n,context:o}=i,u=(0,b.Z)(t),d=_.P.measureText(e||" ",t),h=d.lines,c=d.lineHeight,p=d.lineWidths,f=d.maxLineWidth,g=d.fontProperties,m=n.height;if(o.resetTransform(),o.scale(r,r),o.textBaseline=t.textBaseline,t._stroke?.width){let e=t._stroke;o.lineWidth=e.width,o.miterLimit=e.miterLimit,o.lineJoin=e.join,o.lineCap=e.cap}o.font=u;let x=t.dropShadow?2:1;for(let e=0;e<x;++e){let n=t.dropShadow&&0===e,u=n?Math.ceil(Math.max(1,m)+2*t.padding):0,x=u*r;if(n){o.fillStyle="black",o.strokeStyle="black";let e=t.dropShadow,i=e.color,s=e.alpha;o.shadowColor=l.Q.shared.setValue(i).setAlpha(s).toRgbaString();let a=e.blur*r,n=e.distance*r;o.shadowBlur=a,o.shadowOffsetX=Math.cos(e.angle)*n,o.shadowOffsetY=Math.sin(e.angle)*n+x}else{if(o.fillStyle=t._fill?(0,y.r)(t._fill,o,d):null,t._stroke?.width){let e=t._stroke.width*t._stroke.alignment;o.strokeStyle=(0,y.r)(t._stroke,o,d,e)}o.shadowColor="black"}let _=(c-g.fontSize)/2;c-g.fontSize<0&&(_=0);let b=t._stroke?.width??0;for(let e=0;e<h.length;e++)s=b/2,a=b/2+e*c+g.ascent+_,"right"===t.align?s+=f-p[e]:"center"===t.align&&(s+=(f-p[e])/2),t._stroke?.width&&this._drawLetterSpacing(h[e],t,i,s+t.padding,a+t.padding-u,!0),void 0!==t._fill&&this._drawLetterSpacing(h[e],t,i,s+t.padding,a+t.padding-u)}}_drawLetterSpacing(e,t,r,i,s,a=!1){let{context:n}=r,o=t.letterSpacing,l=!1;if(_.P.experimentalLetterSpacingSupported&&(_.P.experimentalLetterSpacing?(n.letterSpacing=`${o}px`,n.textLetterSpacing=`${o}px`,l=!0):(n.letterSpacing="0px",n.textLetterSpacing="0px")),0===o||l)return void(a?n.strokeText(e,i,s):n.fillText(e,i,s));let u=i,d=_.P.graphemeSegmenter(e),h=n.measureText(e).width,c=0;for(let e=0;e<d.length;++e){let t=d[e];a?n.strokeText(t,u,s):n.fillText(t,u,s);let r="";for(let t=e+1;t<d.length;++t)r+=d[t];u+=h-(c=n.measureText(r).width)+o,h=c}}destroy(){this._activeTextures=null}}v.extension={type:[i.Ag.WebGLSystem,i.Ag.WebGPUSystem,i.Ag.CanvasSystem],name:"canvasText"},i.XO.add(v),i.XO.add(o)},66359:(e,t,r)=>{r.d(t,{Ls:()=>i,_Q:()=>s,mA:()=>a});
71let i={name:"local-uniform-bit",vertex:{header:`
72
73            struct LocalUniforms {
74                uTransformMatrix:mat3x3<f32>,
75                uColor:vec4<f32>,
76                uRound:f32,
77            }
78
79            @group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;
80        `,main:`
81            vColor *= localUniforms.uColor;
82            modelMatrix *= localUniforms.uTransformMatrix;
83        `,end:`
84            if(localUniforms.uRound == 1)
85            {
86                vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
87            }
88        `}},s={...i,vertex:{...i.vertex,header:i.vertex.header.replace("group(1)","group(2)")}},a={name:"local-uniform-bit",vertex:{header:`
89
90            uniform mat3 uTransformMatrix;
91            uniform vec4 uColor;
92            uniform float uRound;
93        `,main:`
94            vColor *= uColor;
95            modelMatrix = uTransformMatrix;
96        `,end:`
97            if(uRound == 1.)
98            {
99                gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
100            }
101        `}}},74258:(e,t,r)=>{r.d(t,{U:()=>i});class i{constructor(){this.batcherName="default",this.packAsQuad=!1,this.indexOffset=0,this.attributeOffset=0,this.roundPixels=0,this._batcher=null,this._batch=null,this._textureMatrixUpdateId=-1,this._uvUpdateId=-1}get blendMode(){return this.renderable.groupBlendMode}get topology(){return this._topology||this.geometry.topology}set topology(e){this._topology=e}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.geometry=null,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}setTexture(e){this.texture!==e&&(this.texture=e,this._textureMatrixUpdateId=-1)}get uvs(){let e=this.geometry.getBuffer("aUV"),t=e.data,r=t,i=this.texture.textureMatrix;return i.isSimple||(r=this._transformedUvs,(this._textureMatrixUpdateId!==i._updateID||this._uvUpdateId!==e._updateID)&&((!r||r.length<t.length)&&(r=this._transformedUvs=new Float32Array(t.length)),this._textureMatrixUpdateId=i._updateID,this._uvUpdateId=e._updateID,i.multiplyUvs(t,r))),r}get positions(){return this.geometry.positions}get indices(){return this.geometry.indices}get color(){return this.renderable.groupColorAlpha}get groupTransform(){return this.renderable.groupTransform}get attributeSize(){return this.geometry.positions.length/2}get indexSize(){return this.geometry.indices.length}}},76908:(e,t,r)=>{r.d(t,{K:()=>i});class i{constructor(){this.batcherName="default",this.topology="triangle-list",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}}},86389:(e,t,r)=>{"use strict";var i=r(34943);class s{constructor(e){this._renderer=e}push(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",canBundle:!1,action:"pushFilter",container:t,filterEffect:e})}pop(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}execute(e){"pushFilter"===e.action?this._renderer.filter.push(e):"popFilter"===e.action&&this._renderer.filter.pop()}destroy(){this._renderer=null}}s.extension={type:[i.Ag.WebGLPipes,i.Ag.WebGPUPipes,i.Ag.CanvasPipes],name:"filter"};var a=r(19677),n=r(94521),o=r(76055),l=r(97786),u=r(7258),d=r(46480),h=r(11627),c=r(7475),p=r(20060),f=r(53670);let g=new l.V({attributes:{aPosition:{buffer:new Float32Array([0,0,1,0,1,1,0,1]),format:"float32x2",stride:8,offset:0}},indexBuffer:new Uint32Array([0,1,2,0,2,3])});class m{constructor(e){this._filterStackIndex=0,this._filterStack=[],this._filterGlobalUniforms=new u.k({uInputSize:{value:new Float32Array(4),type:"vec4<f32>"},uInputPixel:{value:new Float32Array(4),type:"vec4<f32>"},uInputClamp:{value:new Float32Array(4),type:"vec4<f32>"},uOutputFrame:{value:new Float32Array(4),type:"vec4<f32>"},uGlobalFrame:{value:new Float32Array(4),type:"vec4<f32>"},uOutputTexture:{value:new Float32Array(4),type:"vec4<f32>"}}),this._globalFilterBindGroup=new o.T({}),this.renderer=e}get activeBackTexture(){return this._activeFilterData?.backTexture}
101push(e){let t=this.renderer,r=e.filterEffect.filters;this._filterStack[this._filterStackIndex]||(this._filterStack[this._filterStackIndex]=this._getFilterData());let i=this._filterStack[this._filterStackIndex];if(this._filterStackIndex++,0===r.length){i.skip=!0;return}let s=i.bounds;if(e.renderables?!function(e,t){t.clear();let r=t.matrix;for(let r=0;r<e.length;r++){let i=e[r];i.globalDisplayStatus<7||(t.matrix=i.worldTransform,t.addBounds(i.bounds))}t.matrix=r}(e.renderables,s):e.filterEffect.filterArea?(s.clear(),s.addRect(e.filterEffect.filterArea),s.applyMatrix(e.container.worldTransform)):e.container.getFastGlobalBounds(!0,s),e.container){let t=(e.container.renderGroup||e.container.parentRenderGroup).cacheToLocalTransform;t&&s.applyMatrix(t)}let a=t.renderTarget.renderTarget.colorTexture.source,n=1/0,o=0,l=!0,u=!1,d=!1,c=!0;for(let e=0;e<r.length;e++){let i=r[e];if(n=Math.min(n,"inherit"===i.resolution?a._resolution:i.resolution),o+=i.padding,"off"===i.antialias?l=!1:"inherit"===i.antialias&&l&&(l=a.antialias),i.clipToViewport||(c=!1),!(i.compatibleRenderers&t.type)){d=!1;break}if(i.blendRequired&&!(t.backBuffer?.useBackBuffer??!0)){(0,f.R)("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."),d=!1;break}d=i.enabled||d,u||(u=i.blendRequired)}if(!d){i.skip=!0;return}if(c){let e=t.renderTarget.rootViewPort,r=t.renderTarget.renderTarget.resolution;s.fitBounds(0,e.width/r,0,e.height/r)}if(s.scale(n).ceil().scale(1/n).pad(0|o),!s.isPositive){i.skip=!0;return}i.skip=!1,i.bounds=s,i.blendRequired=u,i.container=e.container,i.filterEffect=e.filterEffect,i.previousRenderSurface=t.renderTarget.renderSurface,i.inputTexture=h.W.getOptimalTexture(s.width,s.height,n,l),t.renderTarget.bind(i.inputTexture,!0),t.globalUniforms.push({offset:s})}pop(){let e=this.renderer;this._filterStackIndex--;let t=this._filterStack[this._filterStackIndex];if(t.skip)return;this._activeFilterData=t;let r=t.inputTexture,i=t.bounds,s=d.g.EMPTY;if(e.renderTarget.finishRenderPass(),t.blendRequired){let r=this._filterStackIndex>0?this._filterStack[this._filterStackIndex-1].bounds:null,a=e.renderTarget.getRenderTarget(t.previousRenderSurface);s=this.getBackTexture(a,i,r)}t.backTexture=s;let a=t.filterEffect.filters;if(this._globalFilterBindGroup.setResource(r.source.style,2),this._globalFilterBindGroup.setResource(s.source,3),e.globalUniforms.pop(),1===a.length)a[0].apply(this,r,t.previousRenderSurface,!1),h.W.returnTexture(r);else{let e=t.inputTexture,r=h.W.getOptimalTexture(i.width,i.height,e.source._resolution,!1),s=0;for(s=0;s<a.length-1;++s){a[s].apply(this,e,r,!0);let t=e;e=r,r=t}a[s].apply(this,e,t.previousRenderSurface,!1),h.W.returnTexture(e),h.W.returnTexture(r)}t.blendRequired&&h.W.returnTexture(s)}getBackTexture(e,t,r){let i=e.colorTexture.source._resolution,s=h.W.getOptimalTexture(t.width,t.height,i,!1),a=t.minX,n=t.minY;r&&(a-=r.minX,n-=r.minY),a=Math.floor(a*i),n=Math.floor(n*i);let o=Math.ceil(t.width*i),l=Math.ceil(t.height*i);return this.renderer.renderTarget.copyToTexture(e,s,{x:a,y:n},{width:o,height:l},{x:0,y:0}),s}applyFilter(e,t,r,i){let s=this.renderer,a=this._filterStack[this._filterStackIndex],o=a.bounds,l=n.b.shared,u=a.previousRenderSurface===r,h=this.renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution,p=this._filterStackIndex-1;for(;p>0&&this._filterStack[p].skip;)--p;p>0&&(h=this._filterStack[p].inputTexture.source._resolution);let f=this._filterGlobalUniforms,m=f.uniforms,x=m.uOutputFrame,_=m.uInputSize,b=m.uInputPixel,y=m.uInputClamp,v=m.uGlobalFrame,T=m.uOutputTexture;if(u){let e=this._filterStackIndex;for(;e>0;){e--;let t=this._filterStack[this._filterStackIndex-1];if(!t.skip){l.x=t.bounds.minX,l.y=t.bounds.minY;break}}x[0]=o.minX-l.x,x[1]=o.minY-l.y}else x[0]=0,x[1]=0;x[2]=t.frame.width,x[3]=t.frame.height,_[0]=t.source.width,_[1]=t.source.height,_[2]=1/_[0],_[3]=1/_[1],b[0]=t.source.pixelWidth,b[1]=t.source.pixelHeight,b[2]=1/b[0],b[3]=1/b[1],y[0]=.5*b[2],y[1]=.5*b[3],y[2]=t.frame.width*_[2]-.5*b[2],y[3]=t.frame.height*_[3]-.5*b[3];let S=this.renderer.renderTarget.rootRenderTarget.colorTexture;v[0]=l.x*h,v[1]=l.y*h,v[2]=S.source.width*h,v[3]=S.source.height*h;let w=this.renderer.renderTarget.getRenderTarget(r);if(s.renderTarget.bind(r,!!i),r instanceof d.g?(T[0]=r.frame.width,T[1]=r.frame.height):(T[0]=w.width,T[1]=w.height),T[2]=w.isRoot?-1:1,f.update(
101),s.renderPipes.uniformBatch){let e=s.renderPipes.uniformBatch.getUboResource(f);this._globalFilterBindGroup.setResource(e,0)}else this._globalFilterBindGroup.setResource(f,0);this._globalFilterBindGroup.setResource(t.source,1),this._globalFilterBindGroup.setResource(t.source.style,2),e.groups[0]=this._globalFilterBindGroup,s.encoder.draw({geometry:g,shader:e,state:e._state,topology:"triangle-list"}),s.type===c.W.WEBGL&&s.renderTarget.finishRenderPass()}_getFilterData(){return{skip:!1,inputTexture:null,bounds:new p.c,container:null,filterEffect:null,blendRequired:!1,previousRenderSurface:null}}calculateSpriteMatrix(e,t){let r=this._activeFilterData,i=e.set(r.inputTexture._source.width,0,0,r.inputTexture._source.height,r.bounds.minX,r.bounds.minY),s=t.worldTransform.copyTo(a.u.shared),n=t.renderGroup||t.parentRenderGroup;return n&&n.cacheToLocalTransform&&s.prepend(n.cacheToLocalTransform),s.invert(),i.prepend(s),i.scale(1/t.texture.frame.width,1/t.texture.frame.height),i.translate(t.anchor.x,t.anchor.y),i}}m.extension={type:[i.Ag.WebGLSystem,i.Ag.WebGPUSystem],name:"filter"},i.XO.add(m),i.XO.add(s)},87690:(e,t,r)=>{r.d(t,{u:()=>l});"use strict";var i=r(52819),s=r(30204),a=r(97786),n=r(70242);let o=class e extends a.V{constructor(...t){let r=t[0]??{};r instanceof Float32Array&&((0,n.t6)(n.lj,"use new MeshGeometry({ positions, uvs, indices }) instead"),r={positions:r,uvs:t[1],indices:t[2]});const a=(r={...e.defaultOptions,...r}).positions||new Float32Array([0,0,1,0,1,1,0,1]);let o=r.uvs;o||(o=new Float32Array(r.positions?a.length:[0,0,1,0,1,1,0,1]));const l=r.indices||new Uint32Array([0,1,2,0,2,3]),u=r.shrinkBuffersToFit,d=new i.h({data:a,label:"attribute-mesh-positions",shrinkToFit:u,usage:s.S.VERTEX|s.S.COPY_DST});super({attributes:{aPosition:{buffer:d,format:"float32x2",stride:8,offset:0},aUV:{buffer:new i.h({data:o,label:"attribute-mesh-uvs",shrinkToFit:u,usage:s.S.VERTEX|s.S.COPY_DST}),format:"float32x2",stride:8,offset:0}},indexBuffer:new i.h({data:l,label:"index-mesh-buffer",shrinkToFit:u,usage:s.S.INDEX|s.S.COPY_DST}),topology:r.topology}),this.batchMode="auto"}get positions(){return this.attributes.aPosition.buffer.data}set positions(e){this.attributes.aPosition.buffer.data=e}get uvs(){return this.attributes.aUV.buffer.data}set uvs(e){this.attributes.aUV.buffer.data=e}get indices(){return this.indexBuffer.data}set indices(e){this.indexBuffer.data=e}};o.defaultOptions={topology:"triangle-list",shrinkBuffersToFit:!1};let l=o},90906:(e,t,r)=>{r.d(t,{s:()=>s});var i=r(83460);"use strict";function s(e,t){let{texture:r,bounds:s}=e;(0,i.y)(s,t._anchor,r);let a=t._style.padding;s.minX-=a,s.minY-=a,s.maxX-=a,s.maxY-=a}},92564:(e,t,r)=>{let i,s;var a=r(34943),n=r(24793),o=r(75408),l=r(29762),u=r(19677),d=r(60175),h=r(70728),c=r(17897),p=r(32360),f=r(24555),g=r(33026),m=r(96197),x=r(7258);"use strict";let _={name:"local-uniform-msdf-bit",vertex:{header:`
102            struct LocalUniforms {
103                uColor:vec4<f32>,
104                uTransformMatrix:mat3x3<f32>,
105                uDistance: f32,
106                uRound:f32,
107            }
108
109            @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
110        `,main:`
111            vColor *= localUniforms.uColor;
112            modelMatrix *= localUniforms.uTransformMatrix;
113        `,end:`
114            if(localUniforms.uRound == 1)
115            {
116                vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
117            }
118        `},fragment:{header:`
119            struct LocalUniforms {
120                uColor:vec4<f32>,
121                uTransformMatrix:mat3x3<f32>,
122                uDistance: f32
123            }
124
125            @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
126         `,main:` 
127            outColor = vec4<f32>(calculateMSDFAlpha(outColor, localUniforms.uColor, localUniforms.uDistance));
128        `}},b={name:"local-uniform-msdf-bit",vertex:{header:`
129            uniform mat3 uTransformMatrix;
130            uniform vec4 uColor;
131            uniform float uRound;
132        `,main:`
133            vColor *= uColor;
134            modelMatrix *= uTransformMatrix;
135        `,end:`
136            if(uRound == 1.)
137            {
138                gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
139            }
140        `},fragment:{header:`
141            uniform float uDistance;
142         `,main:` 
143            outColor = vec4(calculateMSDFAlpha(outColor, vColor, uDistance));
144        `}},y={name:"msdf-bit",fragment:{header:`
145            fn calculateMSDFAlpha(msdfColor:vec4<f32>, shapeColor:vec4<f32>, distance:f32) -> f32 {
146                
147                // MSDF
148                var median = msdfColor.r + msdfColor.g + msdfColor.b -
149                    min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
150                    max(msdfColor.r, max(msdfColor.g, msdfColor.b));
151            
152                // SDF
153                median = min(median, msdfColor.a);
154
155                var screenPxDistance = distance * (median - 0.5);
156                var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
157                if (median < 0.01) {
158                    alpha = 0.0;
159                } else if (median > 0.99) {
160                    alpha = 1.0;
161                }
162
163                // Gamma correction for coverage-like alpha
164                var luma: f32 = dot(shapeColor.rgb, vec3<f32>(0.299, 0.587, 0.114));
165                var gamma: f32 = mix(1.0, 1.0 / 2.2, luma);
166                var coverage: f32 = pow(shapeColor.a * alpha, gamma);
167
168                return coverage;
169             
170            }
171        `}},v={name:"msdf-bit",fragment:{header:`
172            float calculateMSDFAlpha(vec4 msdfColor, vec4 shapeColor, float distance) {
173                
174                // MSDF
175                float median = msdfColor.r + msdfColor.g + msdfColor.b -
176                                min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
177                                max(msdfColor.r, max(msdfColor.g, msdfColor.b));
178               
179                // SDF
180                median = min(median, msdfColor.a);
181            
182                float screenPxDistance = distance * (median - 0.5);
183                float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
184           
185                if (median < 0.01) {
186                    alpha = 0.0;
187                } else if (median > 0.99) {
188                    alpha = 1.0;
189                }
190
191                // Gamma correction for coverage-like alpha
192                float luma = dot(shapeColor.rgb, vec3(0.299, 0.587, 0.114));
193                float gamma = mix(1.0, 1.0 / 2.2, luma);
194                float coverage = pow(shapeColor.a * alpha, gamma);  
195              
196                return coverage;
197            }
198        `}};class T extends m.M{constructor(){const e=new x.k({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new u.u,type:"mat3x3<f32>"},uDistance:{value:4,type:"f32"},uRound:{value:0,type:"f32"}}),t=(0,d.a)();i??(i=(0,h.v)({name:"sdf-shader",bits:[c.F,(0,p._)(t),_,y,f.b]})),s??(s=(0,h.I)({name:"sdf-shader",bits:[c.a,(0,p.P)(t),b,v,f.m]})),super({glProgram:s,gpuProgram:i,resources:{localUniforms:e,batchSamplers:(0,g.n)(t)}})}}"use strict";var S=r(90936),w=r(74743);class C{constructor(e){this._gpuBitmapText={},this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e,this._renderer.renderableGC.addManagedHash(this,"_gpuBitmapText")}validateRenderable(e){let t=this._getGpuBitmapText(e);return e._didTextUpdate&&(e._didTextUpdate=!1,this._updateContext(e,t)),this._renderer.renderPipes.graphics.validateRenderable(t)}addRenderable(e,t){let r=this._getGpuBitmapText(e);R(e,r),e._didTextUpdate&&(e._didTextUpdate=!1,this._updateContext(e,r)),this._renderer.renderPipes.graphics.addRenderable(r,t),r.context.customShader&&this._updateDistanceField(e)}destroyRenderable(e){e.off("destroyed",this._destroyRenderableBound),this._destroyRenderableByUid(e.uid)}_destroyRenderableByUid(e){let t=this._gpuBitmapText[e].context;t.customShader&&(o.Z.return(t.customShader),t.customShader=null),o.Z.return(this._gpuBitmapText[e]),this._gpuBitmapText[e]=null}updateRenderable(e){let t=this._getGpuBitmapText(e);R(e,t),this._renderer.renderPipes.graphics.updateRenderable(t),t.context.customShader&&this._updateDistanceField(e)}_updateContext(e,t){let{context:r}=t,i=S.c.getFont(e.text,e._style);r.clear(),"none"===i.distanceField.type||r.customShader||(r.customShader=o.Z.get(T));let s=Array.from(e.text),a=e._style,n=i.baseLineOffset,l=(0,w.Z)(s,a,i,!0),u=0,d=a.padding,h=l.scale,c=l.width,p=l.height+l.offsetY;a._stroke&&(c+=a._stroke.width/h,p+=a._stroke.width/h),r.translate(-e._anchor._x*c-d,-e._anchor._y*p-d).scale(h,h);let f=i.applyFillAsTint?a._fill.color:0xffffff;for(let e=0;e<l.lines.length;e++){let t=l.lines[e];for(let e=0;e<t.charPositions.length;e++){let a=s[u++],o=i.chars[a];o?.texture&&r.texture(o.texture,f||"black",Math.round(t.charPositions[e]+o.xOffset),Math.round(n+o.yOffset))}n+=i.lineHeight}}_getGpuBitmapText(e){return this._gpuBitmapText[e.uid]||this.initGpuText(e)}initGpuText(e){let t=o.Z.get(l.A);return this._gpuBitmapText[e.uid]=t,this._updateContext(e,t),e.on("destroyed",this._destroyRenderableBound),this._gpuBitmapText[e.uid]}_updateDistanceField(e){let t=this._getGpuBitmapText(e).context,r=e._style.fontFamily,i=n.l.get(`${r}-bitmap`),{a:s,b:a,c:o,d:l}=e.groupTransform,u=(Math.abs(Math.sqrt(s*s+a*a))+Math.abs(Math.sqrt(o*o+l*l)))/2,d=i.baseRenderedFontSize/e._style.fontSize,h=u*i.distanceField.range*(1/d);t.customShader.resources.localUniforms.uniforms.uDistance=h}destroy(){for(let e in this._gpuBitmapText)this._destroyRenderableByUid(e);this._gpuBitmapText=null,this._renderer=null}}function R(e,t){t.groupTransform=e.groupTransform,t.groupColorAlpha=e.groupColorAlpha,t.groupColor=e.groupColor,t.groupBlendMode=e.groupBlendMode,t.globalDisplayStatus=e.globalDisplayStatus,t.groupTransform=e.groupTransform,t.localDisplayStatus=e.localDisplayStatus,t.groupAlpha=e.groupAlpha,t._roundPixels=e._roundPixels}"use strict";C.extension={type:[a.Ag.WebGLPipes,a.Ag.WebGPUPipes,a.Ag.CanvasPipes],name:"bitmapText"},a.XO.add(C)}}]);

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.