route-graphics 1.23.4 → 1.23.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1260,7 +1260,7 @@ fn mainFragment(
1260
1260
  }`;function rI(t,e){let r=Uf[e],i=r.length,s=[],o=[],n=[];for(let h=0;h<e;h++){s[h]=`@location(${h}) offset${h}: vec2<f32>,`,t?o[h]=`filteredCord + vec2(${h-i+1} * pixelStrength, 0.0),`:o[h]=`filteredCord + vec2(0.0, ${h-i+1} * pixelStrength),`;let d=h<i?h:e-h-1,f=r[d].toString();n[h]=`finalColor += textureSample(uTexture, uSampler, offset${h}) * ${f};`}let a=s.join(`
1261
1261
  `),l=o.join(`
1262
1262
  `),c=n.join(`
1263
- `),u=tI.replace("%blur-struct%",a).replace("%blur-vertex-out%",l).replace("%blur-fragment-in%",a).replace("%blur-sampling%",c).replace("%dimension%",t?"z":"w");return hr.from({vertex:{source:u,entryPoint:"mainVertex"},fragment:{source:u,entryPoint:"mainFragment"}})}var iI=class sI extends Br{constructor(e){e={...sI.defaultOptions,...e};let r=eI(e.horizontal,e.kernelSize),i=rI(e.horizontal,e.kernelSize);super({glProgram:r,gpuProgram:i,resources:{blurUniforms:{uStrength:{value:0,type:"f32"}}},...e}),this.horizontal=e.horizontal,this._quality=0,this.quality=e.quality,this.blur=e.strength,this._uniforms=this.resources.blurUniforms.uniforms}apply(e,r,i,s){if(this._uniforms.uStrength=this.strength/this.passes,this.passes===1)e.applyFilter(this,r,i,s);else{let o=Ve.getSameSizeTexture(r),n=r,a=o;this._state.blend=!1;let l=e.renderer.type===Xe.WEBGPU;for(let c=0;c<this.passes-1;c++){e.applyFilter(this,n,a,c===0?!0:l);let u=a;a=n,n=u}this._state.blend=!0,e.applyFilter(this,n,i,s),Ve.returnTexture(o)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}};iI.defaultOptions={strength:8,quality:4,kernelSize:5};var Of=iI;var sa=class extends Br{constructor(...e){let r=e[0]??{};typeof r=="number"&&(J(ue,"BlurFilter constructor params are now options object. See params: { strength, quality, resolution, kernelSize }"),r={strength:r},e[1]!==void 0&&(r.quality=e[1]),e[2]!==void 0&&(r.resolution=e[2]||"inherit"),e[3]!==void 0&&(r.kernelSize=e[3])),r={...Of.defaultOptions,...r};let{strength:i,strengthX:s,strengthY:o,quality:n,...a}=r;super({...a,compatibleRenderers:Xe.BOTH,resources:{}}),this._repeatEdgePixels=!1,this.blurXFilter=new Of({horizontal:!0,...r}),this.blurYFilter=new Of({horizontal:!1,...r}),this.quality=n,this.strengthX=s??i,this.strengthY=o??i,this.repeatEdgePixels=!1}apply(e,r,i,s){let o=Math.abs(this.blurXFilter.strength),n=Math.abs(this.blurYFilter.strength);if(o&&n){let a=Ve.getSameSizeTexture(r);this.blurXFilter.blendMode="normal",this.blurXFilter.apply(e,r,a,!0),this.blurYFilter.blendMode=this.blendMode,this.blurYFilter.apply(e,a,i,s),Ve.returnTexture(a)}else n?(this.blurYFilter.blendMode=this.blendMode,this.blurYFilter.apply(e,r,i,s)):(this.blurXFilter.blendMode=this.blendMode,this.blurXFilter.apply(e,r,i,s))}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.blur),Math.abs(this.blurYFilter.blur))*2}get strength(){if(this.strengthX!==this.strengthY)throw new Error("BlurFilter's strengthX and strengthY are different");return this.strengthX}set strength(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get strengthX(){return this.blurXFilter.blur}set strengthX(e){this.blurXFilter.blur=e,this.updatePadding()}get strengthY(){return this.blurYFilter.blur}set strengthY(e){this.blurYFilter.blur=e,this.updatePadding()}get blur(){return J("8.3.0","BlurFilter.blur is deprecated, please use BlurFilter.strength instead."),this.strength}set blur(e){J("8.3.0","BlurFilter.blur is deprecated, please use BlurFilter.strength instead."),this.strength=e}get blurX(){return J("8.3.0","BlurFilter.blurX is deprecated, please use BlurFilter.strengthX instead."),this.strengthX}set blurX(e){J("8.3.0","BlurFilter.blurX is deprecated, please use BlurFilter.strengthX instead."),this.strengthX=e}get blurY(){return J("8.3.0","BlurFilter.blurY is deprecated, please use BlurFilter.strengthY instead."),this.strengthY}set blurY(e){J("8.3.0","BlurFilter.blurY is deprecated, please use BlurFilter.strengthY instead."),this.strengthY=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}};sa.defaultOptions={strength:8,quality:4,kernelSize:5};Fe();Sl();pn();Il();var ws=class t extends ke{constructor(...e){let r=e[0];Array.isArray(e[0])&&(r={textures:e[0],autoUpdate:e[1]});let{animationSpeed:i=1,autoPlay:s=!1,autoUpdate:o=!0,loop:n=!0,onComplete:a=null,onFrameChange:l=null,onLoop:c=null,textures:u,updateAnchor:h=!1,...d}=r,[f]=u;super({...d,texture:f instanceof B?f:f.texture}),this._textures=null,this._durations=null,this._autoUpdate=o,this._isConnectedToTicker=!1,this.animationSpeed=i,this.loop=n,this.updateAnchor=h,this.onComplete=a,this.onFrameChange=l,this.onLoop=c,this._currentTime=0,this._playing=!1,this._previousFrame=null,this.textures=u,s&&this.play()}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Tt.shared.remove(this.update,this),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Tt.shared.add(this.update,this,hi.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(e){this.stop(),this.currentFrame=e}gotoAndPlay(e){this.currentFrame=e,this.play()}update(e){if(!this._playing)return;let r=e.deltaTime,i=this.animationSpeed*r,s=this.currentFrame;if(this._durations!==null){let o=this._currentTime%1*this._durations[this.currentFrame];for(o+=i/60*1e3;o<0;)this._currentTime--,o+=this._durations[this.currentFrame];let n=Math.sign(this.animationSpeed*r);for(this._currentTime=Math.floor(this._currentTime);o>=this._durations[this.currentFrame];)o-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=o/this._durations[this.currentFrame]}else this._currentTime+=i;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):s!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<s||this.animationSpeed<0&&this.currentFrame>s)&&this.onLoop(),this._updateTexture())}_updateTexture(){let e=this.currentFrame;this._previousFrame!==e&&(this._previousFrame=e,this.texture=this._textures[e],this.updateAnchor&&this.texture.defaultAnchor&&this.anchor.copyFrom(this.texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))}destroy(){this.stop(),super.destroy(),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}static fromFrames(e){let r=[];for(let i=0;i<e.length;++i)r.push(B.from(e[i]));return new t(r)}static fromImages(e){let r=[];for(let i=0;i<e.length;++i)r.push(B.from(e[i]));return new t(r)}get totalFrames(){return this._textures.length}get textures(){return this._textures}set textures(e){if(e[0]instanceof B)this._textures=e,this._durations=null;else{this._textures=[],this._durations=[];for(let r=0;r<e.length;r++)this._textures.push(e[r].texture),this._durations.push(e[r].time)}this._previousFrame=null,this.gotoAndStop(0),this._updateTexture()}get currentFrame(){let e=Math.floor(this._currentTime)%this._textures.length;return e<0&&(e+=this._textures.length),e}set currentFrame(e){if(e<0||e>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${e}, expected to be between 0 and totalFrames ${this.totalFrames}.`);let r=this.currentFrame;this._currentTime=e,r!==this.currentFrame&&this._updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Tt.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(Tt.shared.add(this.update,this),this._isConnectedToTicker=!0))}};Uh();tt();Jh();var Lf=class extends us{constructor(e,r){let{text:i,resolution:s,style:o,anchor:n,width:a,height:l,roundPixels:c,...u}=e;super({...u}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=r,this.text=i??"",this.style=o,this.resolution=s??null,this.allowChildren=!1,this._anchor=new Ft({_onUpdate:()=>{this.onViewUpdate()}}),n&&(this.anchor=n),this.roundPixels=c??!1,a!==void 0&&(this.width=a),l!==void 0&&(this.height=l)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}set text(e){e=e.toString(),this._text!==e&&(this._text=e,this.onViewUpdate())}get text(){return this._text}set resolution(e){this._autoResolution=e===null,this._resolution=e,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(e){e||(e={}),this._style?.off("update",this.onViewUpdate,this),e instanceof this._styleClass?this._style=e:this._style=new this._styleClass(e),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(e){this._setWidth(e,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(e){this._setHeight(e,this.bounds.height)}getSize(e){return e||(e={}),e.width=Math.abs(this.scale.x)*this.bounds.width,e.height=Math.abs(this.scale.y)*this.bounds.height,e}setSize(e,r){typeof e=="object"?(r=e.height??e.width,e=e.width):r??(r=e),e!==void 0&&this._setWidth(e,this.bounds.width),r!==void 0&&this._setHeight(r,this.bounds.height)}containsPoint(e){let r=this.bounds.width,i=this.bounds.height,s=-r*this.anchor.x,o=0;return e.x>=s&&e.x<=s+r&&(o=-i*this.anchor.y,e.y>=o&&e.y<=o+i)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}_getKey(){return`${this.text}:${this._style.styleKey}:${this._resolution}`}destroy(e=!1){super.destroy(e),this.owner=null,this._bounds=null,this._anchor=null,(typeof e=="boolean"?e:e?.style)&&this._style.destroy(e),this._style=null,this._text=null}};function oI(t,e){let r=t[0]??{};return(typeof r=="string"||t[1])&&(J(ue,`use new ${e}({ text: "hi!", style }) instead`),r={text:r,style:t[1]}),r}ec();po();var vr=class extends Lf{constructor(...e){let r=oI(e,"Text");super(r,Ge),this.renderPipeId="text"}updateBounds(){let e=this._bounds,r=this._anchor,i=Ye.measureText(this._text,this._style),{width:s,height:o}=i;e.minX=-r._x*s,e.maxX=e.minX+s,e.minY=-r._y*o,e.maxY=e.minY+o}};cc();Ae();gr();vt();oo();Wt();$y();Qt();Fe();nf();Yg();br();Yr();ho();cy();Il();ec();po();Gg();Vt();var jN=Xs(Td(),1);K.add(cP,hP);var qN=new(window.AudioContext||window.webkitAudioContext),Gf={},cu={},KN=t=>t?typeof t=="string"?t:t.message||String(t):"Unknown error",ZN=(t,e)=>{let r="Unsupported or damaged audio file.",i=`Could not load audio "${t}". ${r}`,s=new Error(i,{cause:e});return s.userMessage=i,s.rootCauseMessage=r,s.details={assetKey:t,assetKind:"audio",phase:"decode",cause:KN(e)},s},QN=(t,e)=>{if(Gf[t])return Gf[t];if(cu[t])return cu[t];if(e.byteLength!==0)return cu[t]=qN.decodeAudioData(e).then(r=>(Gf[t]=r,r)).catch(r=>{throw ZN(t,r)}).finally(()=>{delete cu[t]}),cu[t]},JN=t=>Gf[t],oa={load:QN,getAsset:JN};var dt=({type:t,add:e,update:r,delete:i,parse:s,shouldUpdateUnchanged:o})=>({type:t,add:e,update:r,delete:i,parse:s,shouldUpdateUnchanged:o});var M_=({type:t})=>({type:t});var I_=({type:t,add:e,update:r,delete:i})=>({type:t,add:e,update:r,delete:i});var Df={alpha:"alpha",x:"x",y:"y",translateX:"translateX",translateY:"translateY",scaleX:"scaleX",scaleY:"scaleY",rotation:"rotation",blurX:"blurX",blurY:"blurY",uProgress:"uProgress"};var Nf={scaleX:["scale","x"],scaleY:["scale","y"],x:["x"],y:["y"],alpha:["alpha"],rotation:["rotation"],blurX:["_routeGraphicsBlur","x"],blurY:["_routeGraphicsBlur","y"],uProgress:["uProgress"]};var Tr={RECT:"rect",TEXT:"text",INPUT:"input",CONTAINER:"container",SPRITE:"sprite",TEXT_REVEALING:"text-revealing",SLIDER:"slider",PARTICLES:"particles",SPRITESHEET_ANIMATION:"spritesheet-animation",VIDEO:"video"};var $e={fill:"black",fontFamily:"Arial",fontSize:16,align:"left",lineHeight:1.2,wordWrap:!1,breakWords:!1,strokeColor:"transparent",strokeWidth:0,wordWrapWidth:0};var nI={color:"black",alpha:1,blur:0,offsetX:2,offsetY:2},e3=(t={})=>{let e=typeof t.stroke=="object"&&t.stroke!==null?t.stroke:{};return{...e,color:t.strokeColor??e.color??$e.strokeColor,width:t.strokeWidth??e.width??$e.strokeWidth}},t3=t=>{if(t===void 0)return;if(t===null||t===!1)return null;let e=typeof t=="object"&&t!==null?{...nI,...t}:nI,r=e.offsetX,i=e.offsetY,s=Math.hypot(r,i);return{alpha:e.alpha,angle:s===0?0:Math.atan2(i,r),blur:e.blur,color:e.color,distance:s}},r3=t=>t?Math.ceil(Math.max(0,t.blur)+t.distance):0,Ut=(t={},e={})=>{let r=e.includeShadow!==!1,{strokeColor:i,strokeWidth:s,stroke:o,shadow:n,...a}=t;delete a.dropShadow;let l={...a,stroke:e3({strokeColor:i,strokeWidth:s,stroke:o})};if(r){let c=t3(n),u=r3(c),h=Math.max(a.padding??0,u);n!==void 0&&(l.dropShadow=c),h>0&&(l.padding=h)}return l};var wi=(t,e)=>{let r={fill:e?.fill??$e.fill,fontFamily:e?.fontFamily??$e.fontFamily,fontSize:e?.fontSize??$e.fontSize,align:e?.align??$e.align,lineHeight:e?.lineHeight??$e.lineHeight,wordWrap:e?.wordWrap??$e.wordWrap,breakWords:e?.breakWords??$e.breakWords,strokeColor:e?.strokeColor??$e.strokeColor,strokeWidth:e?.strokeWidth??$e.strokeWidth,wordWrapWidth:e?.wordWrapWidth??$e.wordWrapWidth,...Object.prototype.hasOwnProperty.call(e??{},"shadow")?{shadow:e.shadow}:{}};t.style=Ut(r)};var _o=(t=0)=>t*Math.PI/180,B_=(t=0)=>t*180/Math.PI,aI=t=>typeof t=="number"&&Number.isFinite(t)&&t!==0?t:1,Vf=t=>({x:Math.round((t.x??0)+(t.originX??0)),y:Math.round((t.y??0)+(t.originY??0))}),Ur=(t,e)=>{let r=e.originX??0,i=e.originY??0,s=aI(t.scale?.x),o=aI(t.scale?.y),n=Vf(e);t.pivot?.set?.(r/s,i/o),t.x=n.x,t.y=n.y,t.rotation=_o(e.rotation??0)},Or=(t,e={})=>{let r=Vf(t),i={x:r.x,y:r.y,...e};return t.rotation!==void 0&&(i.rotation=t.rotation),i};var Es=t=>t==="translateX"||t==="translateY",uI=(t,e)=>typeof e!="string"?e:t[e]??e,i3=(t,e,r,i)=>{let s=uI(r,e);if(typeof s=="string"){let n=t[s];return n===void 0?i:e==="rotation"?B_(n):n}let o=t;for(let n of s){if(o==null)return i;o=o[n]}return o===void 0?i:e==="rotation"?B_(o):o},s3=(t,e,r,i)=>{let s=uI(r,e),o=e==="rotation"?_o(i):i;if(typeof s=="string")return t[s]=o,t;let n=t;for(let a=0;a<s.length-1;a++){let l=s[a];l in n||(n[l]={}),n=n[l]}return n[s[s.length-1]]=o,t},lI=t=>typeof t=="number"&&Number.isFinite(t),o3=t=>{let e=t?.getLocalBounds?.();return e?.rectangle??e??null},cI=(t,e)=>{let r=e==="x"?t?.width:t?.height;if(lI(r)&&r>0)return r;let i=o3(t),s=e==="x"?i?.width:i?.height,o=e==="x"?t?.scale?.x:t?.scale?.y;return lI(s)&&s>0?Math.abs(s*(o??1)):0},As=t=>({x:t?.x??0,y:t?.y??0,width:cI(t,"x"),height:cI(t,"y")}),hI=({object:t,property:e,propertyPathMap:r,subjectState:i,defaultValue:s=0})=>e==="translateX"||e==="translateY"?s:i3(t,e,r,s),uu=({object:t,property:e,propertyPathMap:r,subjectState:i,value:s})=>e==="translateX"?(t.x=i.x+s*i.width,t):e==="translateY"?(t.y=i.y+s*i.height,t):s3(t,e,r,s);var dI=(t,e,r=Nf,i)=>{let s=i;for(let o of e)for(let[n,a]of Object.entries(o.tween)){if(!Df[n])throw new Error(`${n} is not a supported property for animation.`);a.initialValue!==void 0&&(!s&&Es(n)&&(s=As(t)),uu({object:t,property:n,propertyPathMap:r,subjectState:s,value:a.initialValue}))}},Hf=({animations:t,animationBus:e,completionTracker:r,element:i,targetState:s,onComplete:o,animationBaseState:n})=>{for(let a of t){if(typeof e?.hasContext=="function"&&e.hasContext(a.id))continue;for(let[u,h]of Object.entries(a.tween))if(h.auto&&(!s||!Object.prototype.hasOwnProperty.call(s,u)))throw new Error(`Animation "${a.id}" cannot auto-resolve property "${u}" from targetState.`);let l=a.playback?.continuity!=="persistent",c=l?r.getVersion():null;l&&r.track(c),e.dispatch({type:"START",payload:{id:a.id,animationType:a.type,targetId:a.targetId,continuity:a.playback?.continuity??"render",playbackSpeed:a.playback?.speed,signature:a.signature??JSON.stringify({type:a.type,tween:a.tween,playback:a.playback??null}),element:i,properties:a.tween,targetState:s,animationBaseState:n,onComplete:()=>{l&&r.complete(c),o?.(a)}}})}};var n3=t=>{if(!t?.dropShadow||typeof t.clone!="function")return t;let e=t.clone();return e.dropShadow=null,e};function Wf(t,e){let r=t.text.substring(0,e),s=Ye.measureText(r,n3(t.style)).width;return t.x+s}var a3=async(t,e)=>new Promise((r,i)=>{if(e?.aborted)return i(new DOMException("The operation was aborted.","AbortError"));let s,o=()=>{s&&e?.removeEventListener("abort",s)},n=setTimeout(()=>{o(),r()},t);s=()=>{clearTimeout(n),o(),i(e.reason)},e?.addEventListener("abort",s,{once:!0})}),$f=a3;var hu={softness:1.25,easing:"linear",lineOverlap:0,lineDelay:0},l3=18,c3=64,k_={linear:t=>t,easeOutCubic:t=>1-(1-t)**3},u3=(t,e,r)=>Math.max(e,Math.min(r,t)),F_=(t,e)=>typeof t=="number"&&Number.isFinite(t)?t:e,bo=(t={})=>{let e=t&&typeof t=="object"?t:{};return{softness:Math.max(0,F_(e.softness,hu.softness)),easing:Object.prototype.hasOwnProperty.call(k_,e.easing)?e.easing:hu.easing,lineOverlap:u3(F_(e.lineOverlap,hu.lineOverlap),0,.95),lineDelay:Math.max(0,F_(e.lineDelay,hu.lineDelay))}},U_=t=>k_[t]??k_[hu.easing],O_=({maxLineHeight:t,softWipe:e})=>Math.max(l3,Math.min(c3,Math.round(t*e.softness)));var na=(t,e,r,i)=>{if(!r)return;let s=o=>{o?.detail?.elementId===e&&typeof o?.detail?.frameIndex=="number"&&(t.gotoAndStop(o?.detail?.frameIndex),i?.())};window.addEventListener("snapShotAnimatedSpriteFrame",s),t._snapShotKeyFrameHandler=s},vo=t=>{t._snapShotKeyFrameHandler&&(window.removeEventListener("snapShotAnimatedSpriteFrame",t._snapShotKeyFrameHandler),delete t._snapShotKeyFrameHandler)};var fI=(t={})=>{if(t.frame){let n=t.frame.w??0,a=t.frame.h??0,l=t.sourceSize?.w??n,c=t.sourceSize?.h??a,u={frame:{x:t.frame.x??0,y:t.frame.y??0,w:n,h:a},rotated:t.rotated??!1,trimmed:t.trimmed??!1,spriteSourceSize:{x:t.spriteSourceSize?.x??0,y:t.spriteSourceSize?.y??0,w:t.spriteSourceSize?.w??n,h:t.spriteSourceSize?.h??a},sourceSize:{w:l,h:c}};return t.anchor?u.anchor={x:t.anchor.x??0,y:t.anchor.y??0}:t.pivot&&(u.anchor={x:t.pivot.x??0,y:t.pivot.y??0}),t.borders&&(u.borders={...t.borders}),u}let e=t.width??t.w??0,r=t.height??t.h??0,i=t.sourceWidth??e,s=t.sourceHeight??r,o={frame:{x:t.x??0,y:t.y??0,w:e,h:r},rotated:t.rotated??!1,trimmed:t.trimmed??!1,spriteSourceSize:{x:t.offsetX??0,y:t.offsetY??0,w:e,h:r},sourceSize:{w:i,h:s}};return t.anchor?o.anchor={x:t.anchor.x??0,y:t.anchor.y??0}:t.pivot&&(o.anchor={x:t.pivot.x??0,y:t.pivot.y??0}),t.borders&&(o.borders={...t.borders}),o},L_=(t={})=>!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).map(([e,r])=>[e,Array.isArray(r)?r.map(i=>String(i)):[]])),h3=(t,e={})=>{let r=Math.max(0,Number(e.from??0)),i=Math.min(t.length-1,Number(e.to??r));if(!Number.isFinite(r)||!Number.isFinite(i)||i<r)return[];let s=t.slice(r,i+1),o=String(e.direction??"forward").toLowerCase();if(o==="reverse"||o==="backward")return[...s].reverse();if(o==="pingpong")return[...s,...s.slice(1,-1).reverse()];if(o==="pingpong_reverse"){let n=[...s].reverse();return[...n,...n.slice(1,-1).reverse()]}return s},d3=(t=[],e=[])=>!Array.isArray(t)||e.length===0?{}:Object.fromEntries(t.map(r=>{let i=typeof r?.name=="string"?r.name:"";return i?[i,h3(e,r)]:null}).filter(Boolean)),Qr=(t={})=>{let e=t??{},r=L_(e.animations);return{frames:Array.isArray(e.frames)?Object.fromEntries(e.frames.map(s=>{let o=s?.filename??s?.name;return typeof o!="string"||o.length===0?null:[o,fI(s)]}).filter(Boolean)):Object.fromEntries(Object.entries(e.frames??{}).map(([s,o])=>[s,fI(o)])),...Object.keys(r).length>0?{animations:r}:{},meta:{...e.meta??{},scale:String(e.scale??e.meta?.scale??1),...e.width!=null||e.height!=null?{size:{w:e.width??e.meta?.size?.w??0,h:e.height??e.meta?.size?.h??0}}:{}}}},Jr=(t={},e={},r={},i=[])=>({...d3(r?.frameTags,i),...L_(e),...L_(t)}),f3=(t,e)=>{if(!Array.isArray(e?.frames))return[];let r=Object.keys(t.frames??{});return e.frames.map(i=>typeof i=="number"?r[i]:String(i)).filter(Boolean)},Lr=({atlas:t={frames:{}},clips:e={},playback:r,legacyAnimation:i})=>{let s=r??i??{},o={fps:s.fps??null,loop:s.loop??!0,autoplay:s.autoplay??!0};return typeof s.clip=="string"&&s.clip.length>0&&(o.clip=s.clip),Array.isArray(s.frames)?o.frames=s.frames.map(n=>typeof n=="number"?Object.keys(t.frames??{})[n]:String(n)).filter(Boolean):o.clip||(o.frames=f3(t,i)),o.fps==null&&(typeof s.animationSpeed=="number"?o.fps=s.animationSpeed*60:o.fps=30),o.clip&&(!Array.isArray(o.frames)||o.frames.length===0)&&(o.frames=Array.isArray(e[o.clip])?[...e[o.clip]]:[]),Array.isArray(o.frames)||(o.frames=[]),o},aa=({spritesheet:t,atlas:e,clips:r={},playback:i,legacyAnimation:s})=>{let o=Lr({atlas:e,clips:r,playback:i,legacyAnimation:s});return{frameTextures:o.frames.map(a=>t.textures[a]),playback:o}},la=t=>typeof t=="number"?t/60:.5;var Xi=Symbol("textRevealRuntime"),zf=Symbol("textRevealSnapshot"),ca=Symbol("textRevealIndicator"),yI=Symbol("textRevealIndicatorPlayback"),N_=50,p3=0,W_=100,G_=W_-1,pI=10,_I=120,m3=.9,g3=360,x3=1.2,D_=20,y3=16,_3=0,b3=(t,e,r)=>Math.max(e,Math.min(r,t)),bI=(t=N_)=>typeof t!="number"||!Number.isFinite(t)?N_:Math.max(p3,Math.min(W_,t)),v3=t=>bI(t)>=W_,$_=(t,{maxRate:e=_I,curve:r=m3}={})=>{let i=Math.min(bI(t),G_),o=(G_>0?i/G_:0)**r;return pI*(e/pI)**o},T3=t=>$_(t,{maxRate:g3,curve:x3}),S3=t=>{let e=1e3/t;return e>=D_||t<=_I?{stepDelay:Math.max(1,Math.floor(e)),charactersPerStep:1}:{stepDelay:D_,charactersPerStep:Math.max(2,Math.round(t*D_/1e3))}},w3=t=>t?.revealEffect==="softWipe"?"softWipe":"typewriter",z_=t=>{let e=t?.initialRevealedCharacters;return typeof e!="number"||!Number.isFinite(e)?0:Math.max(0,Math.floor(e))},E3=t=>(t?.content??[]).reduce((e,r)=>e+(r.lineParts??[]).reduce((i,s)=>i+(s.text?.length??0),0),0),ua=t=>t?.revealEffect==="none"||v3(t?.speed??N_),V_=t=>t!==null&&typeof t=="object"&&typeof t.then=="function",X_=(t={})=>t.kind??(t.atlas!==void 0||t.clips!==void 0||t.playback!==void 0?"spritesheet":"image"),A3=t=>["revealing","complete"].some(e=>X_(t?.indicator?.[e])==="spritesheet"&&!!t?.indicator?.[e]?.src),vI=t=>`${t.id}-indicator`,TI=(t,e,r)=>{typeof e?.width=="number"?t.width=e.width:r?.width&&(t.width=r.width),typeof e?.height=="number"?t.height=e.height:r?.height&&(t.height=r.height)},SI=(t={})=>{let e=t?.src?B.from(t.src):B.EMPTY,r=new ke(e);return TI(r,t,e),r},P3=(t={},{app:e,element:r})=>{if(!t?.src)return SI(t);let i=Qr(t.atlas),s=Jr(t.clips,t.atlas?.animations,t.atlas?.meta,Object.keys(i.frames??{})),o=Lr({atlas:i,clips:s,playback:t.playback});return(async()=>{let n=new pi(B.from(t.src),i);await n.parse();let{frameTextures:a}=aa({spritesheet:n,atlas:i,clips:s,playback:o}),l=new ws(a.length>0?a:[B.EMPTY]);return l.animationSpeed=la(o.fps),l.loop=o.loop,l[yI]=o,TI(l,t,a[0]),e?.debug&&na(l,vI(r),e.debug,()=>{typeof e.render=="function"&&e.render()}),l})()},mI=(t,e)=>X_(t)==="spritesheet"?P3(t,e):SI(t),gI=(t,e)=>{t instanceof ws&&!e?.debug&&t[yI]?.autoplay!==!1&&t.play()},wI=t=>{!t||t.destroyed||(vo(t),typeof t.stop=="function"&&t.stop(),t.destroy({children:!0}))},H_=t=>{let e=t?.[ca];if(e){for(let r of e.displays)vo(r);for(let r of e.displays)r?.parent!==t&&wI(r);delete t[ca]}t.destroy({children:!0})},C3=({element:t,app:e,revealingDisplay:r,completeDisplay:i})=>{let s=new ie({label:vI(t)}),o=new Set([r]);return i&&o.add(i),s.addChild(r),s[ca]={displays:o,currentDisplay:r,completeDisplay:i,start(){gI(this.currentDisplay,e)},showComplete(){if(!this.completeDisplay||this.currentDisplay===this.completeDisplay)return;let n=this.currentDisplay;n?.parent===s&&s.removeChild(n),wI(n),o.delete(n),this.currentDisplay=this.completeDisplay,s.addChild(this.completeDisplay),gI(this.completeDisplay,e)}},s},R3=(t,{app:e}={})=>{let r=t?.indicator?.revealing??{},i=t?.indicator?.complete,s=mI(r,{app:e,element:t}),o=i?.src||X_(i)==="spritesheet"?mI(i,{app:e,element:t}):null,n=(a,l)=>C3({element:t,app:e,revealingDisplay:a,completeDisplay:l});return V_(s)||V_(o)?Promise.all([s,o]).then(([a,l])=>n(a,l)):n(s,o)},M3=t=>{t?.[ca]?.showComplete()},ha=(t,e="revealing")=>{let r=t?.indicator?.[e]??{};return{x:r.offsetX??t?.indicator?.offsetX??y3,y:r.offsetY??t?.indicator?.offsetY??_3}},I3=(t,e)=>{if(!e)return 0;let r=Math.max(0,e.lineMaxHeight??0),i=Math.max(0,t?.height??0);return e.y+Math.max(0,r-i)},Yi=(t,e,r)=>{t.x=r.x,t.y=I3(t,e)+r.y},EI=(t,e,r)=>{if(!e||e.text.length===0){t.x=r.x;return}t.x=Wf(e,e.text.length-1)+r.x},Ps=(t,e,r,i)=>{M3(t);let s=ha(i,"complete");Yi(t,e,s),EI(t,r,s)},B3=(t,e)=>{if(t[Xi]){let r=t[Xi];delete t[Xi],r()}t[Xi]=e},F3=t=>t?.[zf]??null,du=(t,e)=>t?e?(t[zf]=e,e):(delete t[zf],null):null,AI=t=>{let e=F3(t);return!e||e.mode!=="typewriter"||e.completed===!0?null:e},PI=t=>!!AI(t),Y_=t=>{if(t[Xi]){let r=t[Xi];delete t[Xi],r()}delete t[zf],t.onRender=void 0,t.removeChildren().forEach(r=>{if(r?.[ca]){H_(r);return}r.destroy({children:!0})})},j_=(t,e="",r="")=>{let i=new Ge(Ut(t.textStyle)),s=new vr({text:e,style:i,x:Math.round(t.x),y:Math.round(t.y)}),o=null;if(t.furigana){let n=new Ge(Ut(t.furigana.textStyle));o=new vr({text:r,style:n,x:Math.round(t.furigana.x),y:Math.round(t.furigana.y)})}return{text:s,furiganaText:o}},q_=(t,e)=>{let r=null,i=null,s=0,o=0,n=[];for(let a=0;a<e.content.length;a++){let l=e.content[a],c=new ie({label:`${e.id}-line-${a}`}),u=[],h=null,d=0;t.addChild(c),i=l,o=Math.max(o,l.lineMaxHeight??0);for(let f=0;f<l.lineParts.length;f++){let p=l.lineParts[f],{text:m,furiganaText:x}=j_(p,p.text,p.furigana?.text||"");x&&(c.addChild(x),u.push(x)),c.addChild(m),u.push(m),r=m,h=m,s+=p.text.length,d+=p.text.length}if(u.length>0){let f=c.getLocalBounds();n.push({chunk:l,container:c,lastTextObject:h,totalCharacters:d,bounds:{x:f.x,y:f.y,width:f.width,height:f.height}})}else c.destroy()}return{lines:n,lastTextObject:r,lastChunk:i,totalCharacters:s,maxLineHeight:o,bounds:t.getLocalBounds()}},xI=({contentContainer:t,indicatorSprite:e,element:r})=>{let{lastTextObject:i,lastChunk:s}=q_(t,r);Ps(e,s,i,r)},k3=({contentContainer:t,indicatorSprite:e,element:r,revealedCharacters:i})=>{let s=ha(r),o=r.content[0]??null,n=E3(r),a=Math.min(i,Math.max(0,n)),l=null,c=null;if(a<=0){Yi(e,o,s);return}e:for(let u=0;u<r.content.length;u++){let h=r.content[u];for(let d=0;d<h.lineParts.length;d++){let f=h.lineParts[d],p=Math.min(f.text.length,a);if(p<=0)break e;let m=f.furigana?.text||"",x=m.length,v=f.text.length>0?Math.round(p/f.text.length*x):0,{text:y,furiganaText:g}=j_(f,f.text.substring(0,p),m.substring(0,v));if(g&&t.addChild(g),t.addChild(y),l=y,c=h,a-=p,p<f.text.length)break e}}c?(Yi(e,c,s),EI(e,l,s)):Yi(e,o,s),i>=n&&Ps(e,c??o,l,r)},U3=({contentContainer:t,indicatorSprite:e,element:r})=>{let i=z_(r);if(i<=0){let s=ha(r),o=r.content[0]??null;Yi(e,o,s);return}r.revealEffect==="softWipe"?N3({contentContainer:t,indicatorSprite:e,element:r,revealedCharacters:i}):k3({contentContainer:t,indicatorSprite:e,element:r,revealedCharacters:i})},O3=async({contentContainer:t,indicatorSprite:e,element:r,signal:i,startAtCharacter:s=0,snapshot:o=null})=>{let n=T3(r.speed??50),a=ha(r),{stepDelay:l,charactersPerStep:c}=S3(n),u=Math.max(l,Math.floor(4e3/n)),h=Math.max(0,Math.floor(s)),d=!1,f=null,p=null;o&&(o.revealedCharacters=h,o.completed=!1);for(let m=0;m<r.content.length;m++){if(i?.aborted||t.destroyed)return!1;let x=r.content[m],v=!1;Yi(e,x,a);for(let y=0;y<x.lineParts.length;y++){if(i?.aborted||t.destroyed)return!1;let g=x.lineParts[y],{text:b,furiganaText:_}=j_(g);_&&t.addChild(_),t.addChild(b);let S=g.text,E=g.furigana?.text||"";S.length>0&&(f=b,p=x);let P=E.length,C=Math.min(S.length,h),M=S.length>0?Math.round(C/S.length*P):0;b.text=S.substring(0,C),_&&(_.text=E.substring(0,M)),h-=C,C>0&&(e.x=Wf(b,C-1)+a.x);let R=C;for(;R<S.length;){if(i?.aborted||t.destroyed)return!1;let F=Math.min(S.length,R+c),U=F-1;if(b.text=S.substring(0,F),e.x=Wf(b,U)+a.x,v=!0,d=!0,o&&(o.revealedCharacters+=F-R),_){let W=Math.round(F/S.length*P);_.text=E.substring(0,W)}R=F,R<S.length&&await $f(l,i)}}m<r.content.length-1&&v&&await $f(u,i)}return d&&(await $f(l,i),i?.aborted||t.destroyed)?!1:(Ps(e,p,f,r),o&&(o.completed=!0),!0)},CI=({lines:t,edgeWidth:e,baseDuration:r,softWipe:i})=>{let s=t.map(c=>{let u=Math.max(1,c.totalCharacters),h=1+e/Math.max(1,c.bounds.width);return u*h}),o=s.reduce((c,u)=>c+u,0),n=[],a=0,l=0;for(let c=0;c<t.length;c++){let u=s[c],h=o>0?Math.max(1,r*u/o):r,d=Math.max(0,a),f=d+h;n.push({...t[c],startTime:d,endTime:f,duration:h}),l=Math.max(l,f),a=f-h*i.lineOverlap+i.lineDelay}return{timedLines:n,duration:Math.max(1,Math.ceil(l))}},L3=({currentTime:t,line:e,easing:r})=>{let i=e.duration>0?(t-e.startTime)/e.duration:1;return r(Math.max(0,Math.min(i,1)))},G3=({progress:t,easingName:e})=>{let r=b3(t,0,1);return e==="easeOutCubic"?1-Math.cbrt(1-r):r},RI=({timedLines:t,initialRevealedCharacters:e,softWipe:r,easingName:i})=>{let s=Math.max(0,Math.floor(e)),o=s<=0,n=0,a=0;return{timedLines:t.map(c=>{let u=Math.max(0,c.totalCharacters??0),h=0,d=!1;if(!o&&s>0)if(u<=0||s>=u)s-=u,h=1,d=!0;else{let m=s/u;h=G3({progress:m,easingName:i}),s=0,o=!0}if(d)return{...c,startTime:-c.duration,endTime:0};o=!0;let f=h>0?-h*c.duration:Math.max(0,n),p=f+c.duration;return a=Math.max(a,p),n=p-c.duration*r.lineOverlap+r.lineDelay,{...c,startTime:f,endTime:p}}),duration:Math.max(1,Math.ceil(a))}},D3=t=>{t.forEach(e=>{e&&(e.line.container.mask===e.sprite&&(e.line.container.mask=null),e.sprite.parent&&e.sprite.parent.removeChild(e.sprite),e.sprite.destroy(),e.texture.destroy(!0))})},MI=({contentContainer:t,timedLines:e,edgeWidth:r})=>{let i=e.map(s=>{let o=document.createElement("canvas");o.width=Math.max(1,Math.ceil(s.bounds.width+r)),o.height=Math.max(1,Math.ceil(s.bounds.height));let n=o.getContext("2d");if(!n)return null;let a=yo(o),l=new ke(a);return l.x=Math.floor(s.bounds.x-r),l.y=Math.floor(s.bounds.y),s.container.mask=l,t.addChild(l),{canvas:o,context:n,texture:a,sprite:l,line:s,edgeWidth:r}});return i.some(s=>s===null)?(D3(i),null):i},II=({timedLines:t,lineMasks:e,easing:r,indicatorSprite:i,indicatorOffsets:s,currentTime:o})=>{let n=t[0],a=n.bounds.x;for(let l=0;l<t.length;l++){let c=t[l],u=e[l],h=L3({currentTime:o,line:c,easing:r}),{context:d,canvas:f,texture:p}=u;if(d.clearRect(0,0,f.width,f.height),h<=0){p.source.update();continue}let m=0,x=c.bounds.width+u.edgeWidth,v=u.edgeWidth,y=v+h*x,g=Math.max(v,y-u.edgeWidth);g>v&&(d.fillStyle="#ffffff",d.fillRect(v,m,Math.min(g-v,c.bounds.width),c.bounds.height));let b=Math.max(v,y-u.edgeWidth),_=Math.min(v+c.bounds.width,y);if(_>b){let S=d.createLinearGradient(b,0,_,0);S.addColorStop(0,"rgba(255, 255, 255, 1)"),S.addColorStop(1,"rgba(255, 255, 255, 0)"),d.fillStyle=S,d.fillRect(b,m,_-b,c.bounds.height)}p.source.update(),n=c,a=c.bounds.x+Math.min(x,Math.max(0,y-v))}Yi(i,n.chunk,s),i.x=a+s.x},N3=({contentContainer:t,indicatorSprite:e,element:r,revealedCharacters:i})=>{let s=ha(r),{lines:o,lastTextObject:n,lastChunk:a,totalCharacters:l,maxLineHeight:c}=q_(t,r);if(Yi(e,a,s),o.length===0||l===0||i>=l||!o.some(y=>y.bounds.width>0&&y.bounds.height>0)||!globalThis.document){Ps(e,a,n,r);return}let u=bo(r.softWipe),h=U_(u.easing),d=O_({maxLineHeight:c,softWipe:u}),f=$_(r.speed??50),p=Math.max(1,Math.round(l/f*1e3)),m=CI({lines:o,edgeWidth:d,baseDuration:p,softWipe:u}),{timedLines:x}=RI({timedLines:m.timedLines,initialRevealedCharacters:i,softWipe:u,easingName:u.easing}),v=MI({contentContainer:t,timedLines:x,edgeWidth:d});if(!v){Ps(e,a,n,r);return}II({timedLines:x,lineMasks:v,easing:h,indicatorSprite:e,indicatorOffsets:s,currentTime:0})},V3=({container:t,contentContainer:e,indicatorSprite:r,element:i,animationBus:s,completionTracker:o})=>{let n=ha(i),a=$_(i.speed??50),{lines:l,lastTextObject:c,lastChunk:u,totalCharacters:h,maxLineHeight:d}=q_(e,i),f=z_(i);if(Yi(r,u,n),l.length===0||h===0||f>=h||!l.some(R=>R.bounds.width>0&&R.bounds.height>0)||!globalThis.document||!s)return Ps(r,u,c,i),!1;let p=bo(i.softWipe),m=U_(p.easing),x=O_({maxLineHeight:d,softWipe:p}),v=Math.max(1,Math.round(h/a*1e3)),y=CI({lines:l,edgeWidth:x,baseDuration:v,softWipe:p}),{timedLines:g,duration:b}=RI({timedLines:y.timedLines,initialRevealedCharacters:f,softWipe:p,easingName:p.easing}),_=o.getVersion(),S=`${i.id}-soft-wipe`,E=MI({contentContainer:e,timedLines:g,edgeWidth:x});if(!E)return Ps(r,u,c,i),!1;let P=!1,C=R=>{P||(P=!0,t[Xi]===M&&delete t[Xi],E.forEach(F=>{F.line.container.mask===F.sprite&&(F.line.container.mask=null),F.sprite.parent&&F.sprite.parent.removeChild(F.sprite),F.sprite.destroy(),F.texture.destroy(!0)}),R&&Ps(r,u,c,i))},M=()=>{s.dispatch({type:"CANCEL",id:S}),C(!1)};return B3(t,M),o.track(_),s.dispatch({type:"START",payload:{id:S,driver:"custom",duration:b,applyFrame:R=>{II({timedLines:g,lineMasks:E,easing:m,indicatorSprite:r,indicatorOffsets:n,currentTime:Math.min(b,R)})},applyTargetState:()=>{C(!1)},onComplete:()=>{o.complete(_),C(!0)},onCancel:()=>{o.complete(_),C(!1)},isValid:()=>!!t&&!t.destroyed&&!e.destroyed&&!r.destroyed}}),!0},ji=async({container:t,element:e,completionTracker:r,animationBus:i,zIndex:s,signal:o,app:n,playback:a="autoplay"})=>{if(o?.aborted||t.destroyed)return;let l=ua(e),c=a==="resume"?AI(t):null,u=z_(e);if(a==="resume"&&!c)return;let h=r?.getVersion?.(),d=A3(e),f=!1,p=()=>{!d||f||(r?.track?.(h),f=!0)},m=()=>{f&&(f=!1,r?.complete?.(h))};p(),Y_(t),t.zIndex=s;let x=new ie({label:`${e.id}-content`}),v;try{let y=R3(e,{app:n});if(v=V_(y)?await y:y,o?.aborted||t.destroyed){H_(v),m();return}if(t.addChild(x),t.addChild(v),v?.[ca]?.start(),a==="paused-initial"){l||du(t,{mode:w3(e),revealedCharacters:u,completed:!1}),l?(du(t,{mode:"none",completed:!0}),xI({contentContainer:x,indicatorSprite:v,element:e})):U3({contentContainer:x,indicatorSprite:v,element:e}),m();return}let g=r.getVersion(),b=!1;if(l)r.track(g),m(),du(t,{mode:"none",completed:!0}),xI({contentContainer:x,indicatorSprite:v,element:e}),b=!0;else if(e.revealEffect==="softWipe")if(du(t,{mode:"softWipe",revealedCharacters:u,completed:!1}),!V3({container:t,contentContainer:x,indicatorSprite:v,element:e,animationBus:i,completionTracker:r})&&!o?.aborted&&!t.destroyed)r.track(g),m(),b=!0;else{m();return}else{r.track(g),m();let _=c?.revealedCharacters??u,S=du(t,{mode:"typewriter",revealedCharacters:_,completed:!1});b=await O3({contentContainer:x,indicatorSprite:v,element:e,signal:o,startAtCharacter:_,snapshot:S})}b&&!o?.aborted&&!t.destroyed&&r.complete(g)}catch(y){if(m(),v&&!v.destroyed&&!v.parent&&H_(v),y?.name!=="AbortError"&&!o?.aborted)throw y}};var Xf=({suppressAnimations:t=!1,deferredMountOperations:e=[]}={})=>({suppressAnimations:t,deferredMountOperations:e}),BI=t=>{switch(t?.type){case"play-animated-sprite":t.animatedSprite?.destroyed||t.animatedSprite?.play();return;case"play-video":t.video?.play();return;case"start-particles":if(t.app?.debug){let e=r=>{if(t.emitter.destroyed){window.removeEventListener("snapShotKeyFrame",e);return}r?.detail?.deltaMS&&(t.emitter.update(Number(r.detail.deltaMS)/1e3),typeof t.app?.render=="function"&&t.app.render())};window.addEventListener("snapShotKeyFrame",e),t.container.customTickerHandler=e;return}t.app.ticker.add(t.tickerCallback);return;case"autoplay-text-reveal":ji({container:t.container,element:t.element,completionTracker:t.completionTracker,animationBus:t.animationBus,zIndex:t.zIndex,signal:t.signal,app:t.app,playback:"autoplay"});return;case"start-update-animations":if(!t.element||t.element.destroyed)return;Hf({animations:t.animations,animationBus:t.animationBus,completionTracker:t.completionTracker,element:t.element,targetState:t.targetState,animationBaseState:t.animationBaseState});return}},fu=(t,e)=>{if(e?.type){if(!t?.suppressAnimations){BI(e);return}t.deferredMountOperations.push(e)}},pu=t=>{t?.deferredMountOperations&&(t.deferredMountOperations.length=0)},FI=(t,e)=>fu(t,{type:"play-animated-sprite",animatedSprite:e}),kI=(t,e)=>fu(t,{type:"play-video",video:e}),UI=(t,{app:e,emitter:r,container:i,tickerCallback:s})=>fu(t,{type:"start-particles",app:e,emitter:r,container:i,tickerCallback:s}),Yf=(t,{app:e,container:r,element:i,completionTracker:s,animationBus:o,zIndex:n,signal:a})=>fu(t,{type:"autoplay-text-reveal",app:e,container:r,element:i,completionTracker:s,animationBus:o,zIndex:n,signal:a}),OI=(t,{animations:e,animationBus:r,completionTracker:i,element:s,targetState:o,animationBaseState:n})=>fu(t,{type:"start-update-animations",animations:e,animationBus:r,completionTracker:i,element:s,targetState:o,animationBaseState:n}),LI=t=>{if(!t?.deferredMountOperations?.length)return;let e=t.deferredMountOperations.splice(0);for(let r of e)BI(r)};var H3=Object.prototype.hasOwnProperty,ye=(t,e)=>{if(Object.is(t,e))return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let r=Array.isArray(t),i=Array.isArray(e);if(r!==i)return!1;if(r&&i){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!ye(t[n],e[n]))return!1;return!0}let s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;for(let n of s)if(!H3.call(e,n)||!ye(t[n],e[n]))return!1;return!0};var To=t=>{let e=new Set;if(t.id&&e.add(t.id),t.children&&Array.isArray(t.children))for(let r of t.children)for(let i of To(r))e.add(i);return e};var DI=(t=[])=>{if(t instanceof Map)return t;let e=new Map;for(let r of t)e.has(r.targetId)||e.set(r.targetId,[]),e.get(r.targetId).push(r);return e},jf=(t,e)=>t?t instanceof Map?t.get(e)??[]:t.filter(r=>r.targetId===e):[],NI=(t,e)=>jf(t,e).filter(r=>r.type==="update"),qf=(t,e)=>jf(t,e).find(r=>r.type==="transition")??null,GI=(t=[])=>t.some(e=>Object.keys(e.tween??{}).some(Es)),mu=(t=[],e,r=[])=>{for(let i of t){if(i?.id===e)return{element:i,ancestorIds:r};if(Array.isArray(i?.children)){let s=mu(i.children,e,[...r,i.id]);if(s)return s}}return null},VI=(t,e)=>ye(t?.ancestorIds??null,e?.ancestorIds??null),W3=({subtreeRoot:t,nextAnimations:e,continuingAnimationId:r})=>{if(!t)return!1;let i=To(t);for(let s of e??[])if(!(!s||s.id===r)&&i.has(s.targetId))return!0;return!1},K_=(t={})=>t.type==="update"?JSON.stringify({type:t.type,tween:t.tween,playback:t.playback??null}):JSON.stringify({type:t.type,prev:t.prev??null,next:t.next??null,mask:t.mask??null,compositor:t.compositor??null,tween:t.tween??null,playback:t.playback??null}),$3=({prevState:t,nextState:e,animation:r})=>{let i=mu(t?.elements,r.targetId),s=mu(e?.elements,r.targetId);return i!==null&&s!==null&&VI(i,s)&&ye(i.element,s.element)},z3=({prevState:t,nextState:e,animation:r})=>{let i=mu(t?.elements,r.targetId),s=mu(e?.elements,r.targetId);return i===null&&s===null?!0:i===null||s===null||!VI(i,s)||!ye(i.element,s.element)?!1:!W3({subtreeRoot:s.element,nextAnimations:e?.animations,continuingAnimationId:r.id})},HI=({prevState:t,nextState:e,activeAnimations:r})=>{let i=new Set,s=r instanceof Map?r:new Map(r?.map(o=>[o.id,o])??[]);for(let o of e?.animations??[]){if(o?.playback?.continuity!=="persistent")continue;let n=s.get(o.id);if(n&&!(n.type!==o.type||n.targetId!==o.targetId||n.signature!==K_(o))){if(o.type==="update"){$3({prevState:t,nextState:e,animation:o})&&i.add(o.id);continue}z3({prevState:t,nextState:e,animation:o})&&i.add(o.id)}}return{continuedAnimationIds:i}},X3=({animations:t,targetId:e,animationBus:r,completionTracker:i,element:s,targetState:o,onComplete:n,renderContext:a})=>{let l=NI(t,e),c=l.filter(h=>typeof r?.hasContext=="function"?r.hasContext(h.id):!1),u=l.filter(h=>!c.includes(h));if(l.length===0)return!1;if(u.length===0)return!0;if(a?.suppressAnimations){if(n)throw new Error("Deferred update animations do not support onComplete hooks.");let h=GI(u)?As(s):void 0;return dI(s,u,void 0,h),OI(a,{animations:u,animationBus:r,completionTracker:i,element:s,targetState:o,animationBaseState:h}),!0}return Hf({animations:u,animationBus:r,completionTracker:i,element:s,targetState:o,onComplete:n,animationBaseState:GI(u)?As(s):void 0}),!0},da=NI;var oe=X3;var WI=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Y3=(t,e)=>e===void 0?t:e===null||e===!1?null:WI(e)?{...WI(t)?t:{},...e}:e,Ei=(t={},e={})=>{if(!e)return{...t};let r={...t,...e};return Object.prototype.hasOwnProperty.call(e,"shadow")&&(r.shadow=Y3(t?.shadow,e.shadow)),r};var zI=Symbol("routeGraphicsTextAnchorRatios"),So=Symbol("routeGraphicsTextLayoutState"),$I=(t,e)=>typeof t!="number"||t===0?0:e/t,Z_=t=>t?.align??$e.align,j3=t=>{let e=t[So];return e?.fixedWidth&&typeof e.layoutWidth=="number"?e.layoutWidth:typeof e?.measuredWidth=="number"?e.measuredWidth:t.width},q3=(t,e)=>{let r=Ye.measureText(String(t??""),new Ge(Ut(e,{includeShadow:!1})));return{width:r.width,height:r.height}},XI=t=>t?.shadow!==void 0&&t.shadow!==null&&t.shadow!==!1,eb=(t,e)=>XI(e)?q3(t.text,e):{width:t.width,height:t.height},Q_=t=>{let e=t[So];return typeof e?.measuredWidth=="number"?e.measuredWidth:t.width},K3=t=>{let e=t[So];return typeof e?.measuredHeight=="number"?e.measuredHeight:t.height},YI=(t,e,r)=>{let i=!!e.__fixedWidth,s=r??eb(t,e.textStyle),o=s.width??e.measuredWidth??e.width,n=s.height??e.height??t.height;t[So]={fixedWidth:i,layoutWidth:i?e.width:o,measuredWidth:o,measuredHeight:n}},J_=(t,e,r)=>{let i=Math.max(0,t-e);return r==="center"?i/2:r==="right"?i:0},tb=t=>{let e=t.measuredWidth??t.width,r=J_(t.width,e,Z_(t.textStyle));return{x:t.x+r,y:t.y}},Kf=(t,e)=>{let r=eb(t,e.textStyle),i=e.__fixedWidth&&typeof e.width=="number"?e.width:r.width,s=r.height,o=typeof e.__anchorXRatio=="number"?e.__anchorXRatio:$I(i,e.originX),n=typeof e.__anchorYRatio=="number"?e.__anchorYRatio:$I(s,e.originY);t[zI]={x:o,y:n},YI(t,e,r)},Z3=t=>typeof t?.fontSize!="number"||t.fontSize===0||typeof t?.lineHeight!="number"?$e.lineHeight:t.lineHeight/t.fontSize,Q3=(t,e)=>{if(!e)return t;let r=Ei(t,e);if(e.fontSize!==void 0||e.lineHeight!==void 0){let i=e.lineHeight??Z3(t);r.lineHeight=Math.round(r.fontSize*i)}return r},jI=(t,e,r)=>{let i=t[zI],s=j3(t),o=Q3(e,r);if(!i){wi(t,o);return}let n=J_(s,Q_(t),Z_(t.style)),l=t.x-n+s*i.x,c=t.y+K3(t)*i.y;wi(t,o);let u=eb(t,o),d=t[So]?.fixedWidth===!0?s:u.width,f=J_(d,u.width,Z_(o));t.x=l-d*i.x+f,t.y=c-u.height*i.y,t[So]={...t[So]??{},layoutWidth:d,measuredWidth:u.width,measuredHeight:u.height}},Zf=(t,e)=>{YI(t,e);let r=XI(e.textStyle)?e.measuredWidth??Q_(t):Q_(t),i=tb({...e,measuredWidth:r,width:e.__fixedWidth&&typeof e.width=="number"?e.width:r});t.x=i.x,t.y=i.y};var J3=(t,e)=>{let r=Number(t);if(Number.isFinite(r))return r;let i=Number(e);return Number.isFinite(i)?i:100},je=(t,e=100)=>{let r=J3(t??e,e);return Math.min(Math.max(r,0),100)/100};var qI=t=>{if(!(!t||typeof t!="object")){if(typeof t.button=="number")return t.button;if(typeof t.data?.button=="number")return t.data.button;if(typeof t.nativeEvent?.button=="number")return t.nativeEvent.button}},Ot=t=>{let e=qI(t);return e===void 0||e===0},KI=t=>qI(t)===2;var rb=Symbol.for("routeGraphics.setInheritedHover"),ZI=Symbol.for("routeGraphics.treeInheritedHoverActive"),ib=Symbol.for("routeGraphics.setInheritedPress"),QI=Symbol.for("routeGraphics.treeInheritedPressActive"),sb=Symbol.for("routeGraphics.setInheritedRightPress"),JI=Symbol.for("routeGraphics.treeInheritedRightPressActive"),fa=t=>Array.isArray(t?.children)?t.children:[],ob=({displayObject:t,symbol:e,source:r,isActive:i})=>{let s=t?.[e];typeof s=="function"&&s(r,i)},Qf=({displayObject:t,symbol:e})=>{t&&e in t&&delete t[e]},nb=({displayObject:t,symbol:e,onStateChange:r})=>{let i=!1,s=new Set,o=({nextDirectActive:n=i,onInheritedChange:a})=>{let l=i||s.size>0;i=n,a?.(s);let c=i||s.size>0;return l!==c&&r(c),c};return t[e]=(n,a)=>o({onInheritedChange:l=>{if(n){if(a){l.add(n);return}l.delete(n)}}}),{setDirectState:n=>o({nextDirectActive:n}),isActive:()=>i||s.size>0,destroy:()=>{Qf({displayObject:t,symbol:e})}}},pa=t=>Qf({displayObject:t,symbol:rb}),Jf=t=>Qf({displayObject:t,symbol:ib}),ep=t=>Qf({displayObject:t,symbol:sb}),Cs=({displayObject:t,onHoverChange:e})=>{let r=nb({displayObject:t,symbol:rb,onStateChange:e});return{setDirectHover:r.setDirectState,isHovering:r.isActive,destroy:r.destroy}},ma=({displayObject:t,onPressChange:e})=>{let r=nb({displayObject:t,symbol:ib,onStateChange:e});return{setDirectPress:r.setDirectState,isPressed:r.isActive,destroy:r.destroy}},ga=({displayObject:t,onPressChange:e})=>{let r=nb({displayObject:t,symbol:sb,onStateChange:e});return{setDirectPress:r.setDirectState,isPressed:r.isActive,destroy:r.destroy}},ab=t=>t?.[ZI]===!0,lb=t=>t?.[QI]===!0,cb=t=>t?.[JI]===!0,xa=({root:t,isHovered:e})=>{if(!t)return;t[ZI]=e;let r=[...fa(t)];for(;r.length>0;){let i=r.pop();ob({displayObject:i,symbol:rb,source:t,isActive:e}),r.push(...fa(i))}},wo=({root:t,isPressed:e})=>{if(!t)return;t[QI]=e;let r=[...fa(t)];for(;r.length>0;){let i=r.pop();ob({displayObject:i,symbol:ib,source:t,isActive:e}),r.push(...fa(i))}},qi=({root:t,isPressed:e})=>{if(!t)return;t[JI]=e;let r=[...fa(t)];for(;r.length>0;){let i=r.pop();ob({displayObject:i,symbol:sb,source:t,isActive:e}),r.push(...fa(i))}};var eB="__rtglScrollHandled",tB=t=>t?.payload&&typeof t.payload=="object"?t.payload:{},Gr=({canvas:t,displayObject:e,width:r,height:i,scrollUpEvent:s,scrollDownEvent:o,eventHandler:n})=>{if(!s&&!o)return;let a=!1,l=Number.isFinite(r)&&Number.isFinite(i)&&r>0&&i>0;e.eventMode="static",l&&(e.hitArea=new te(0,0,Math.round(r),Math.round(i)));let c=(p,m)=>{m?.[eB]||(m&&(m[eB]=!0),p<0&&s&&n?n("scrollUp",{_event:{id:e.label},...tB(s)}):p>0&&o&&n&&n("scrollDown",{_event:{id:e.label},...tB(o)}))},u=()=>{a=!0},h=()=>{a=!1},d=p=>{p.preventDefault?.(),c(p.deltaY,p.nativeEvent)},f=p=>{a&&(p.preventDefault(),c(p.deltaY,p))};e.on("pointerover",u),e.on("pointerout",h),e.on("wheel",d),t?.addEventListener("wheel",f,{passive:!1}),e._cleanupScrollInteraction=()=>{a=!1,e.off("pointerover",u),e.off("pointerout",h),e.off("wheel",d),t?.removeEventListener("wheel",f),l&&(e.hitArea=null),delete e._cleanupScrollInteraction}},ub=({root:t})=>{t?._cleanupScrollInteraction?.(),t?.children?.forEach(e=>{ub({root:e})})};var ya=t=>{t._cleanupScrollInteraction?.(),t.removeAllListeners("pointerover"),t.removeAllListeners("pointerout"),t.removeAllListeners("pointerdown"),t.removeAllListeners("pointerupoutside"),t.removeAllListeners("pointerup"),t.removeAllListeners("rightdown"),t.removeAllListeners("rightclick"),t.removeAllListeners("rightup"),t.removeAllListeners("rightupoutside"),t.removeAllListeners("wheel"),pa(t),Jf(t),ep(t),t.cursor="auto",t.eventMode="auto"},gu=({app:t,displayObject:e,textComputedNode:r,eventHandler:i,applyStyle:s})=>{let o=r?.hover,n=r?.click,a=r?.rightClick,l=r?.scrollUp,c=r?.scrollDown,u=null,h=null,d=null,f=()=>{let p=u?.isHovering()??!1,m=h?.isPressed()??!1;(d?.isPressed()??!1)&&a?.textStyle?s(a.textStyle):m&&n?.textStyle?s(n.textStyle):p&&o?.textStyle?s(o.textStyle):s()};if(o){let{cursor:p,soundSrc:m,payload:x}=o;e.eventMode="static",u=Cs({displayObject:e,onHoverChange:f});let v=()=>{u.setDirectHover(!0),x&&i&&i("hover",{_event:{id:e.label},...x}),p&&(e.cursor=p),m&&t.audioStage.add({id:`hover-${Date.now()}`,url:m,loop:!1})},y=()=>{u.setDirectHover(!1),e.cursor="auto"};e.on("pointerover",v),e.on("pointerout",y)}if(n){let{soundSrc:p,soundVolume:m,payload:x}=n;e.eventMode="static",h=ma({displayObject:e,onPressChange:f});let v=b=>{Ot(b)&&h.setDirectPress(!0)},y=b=>{Ot(b)&&(h.setDirectPress(!1),x&&i&&i("click",{_event:{id:e.label},...x}),p&&t.audioStage.add({id:`click-${Date.now()}`,url:p,loop:!1,volume:je(m)}))},g=()=>{h.setDirectPress(!1)};e.on("pointerdown",v),e.on("pointerup",y),e.on("pointerupoutside",g)}if(a){let{soundSrc:p,payload:m}=a;e.eventMode="static",d=ga({displayObject:e,onPressChange:f});let x=()=>{d.setDirectPress(!0)},v=()=>{d.setDirectPress(!1)},y=()=>{d.setDirectPress(!1),m&&i&&i("rightClick",{_event:{id:e.label},...m}),p&&t.audioStage.add({id:`rightClick-${Date.now()}`,url:p,loop:!1})},g=()=>{d.setDirectPress(!1)};e.on("rightdown",x),e.on("rightup",v),e.on("rightclick",y),e.on("rightupoutside",g)}(l||c)&&Gr({canvas:t.canvas,displayObject:e,scrollUpEvent:l,scrollDownEvent:c,eventHandler:i})};var sB=Symbol("routeGraphicsRichTextDisplay"),eV=t=>t?.align??$e.align,tV=(t,e,r)=>{let i=Math.max(0,t-e.width),s=0;return r==="center"?s=i/2:r==="right"&&(s=i),s-e.x},rV=t=>{t.removeChildren().forEach(r=>{r.destroy({children:!0})})},rB=({text:t,style:e,x:r,y:i})=>new vr({text:t,style:new Ge(Ut(e)),x:Math.round(r),y:Math.round(i)}),iB=(t,e)=>e?Ei(t,e):t,Eo=t=>Array.isArray(t?.content),oB=t=>!!t?.[sB],nB=t=>({x:t.x,y:t.y}),xu=(t,e,r)=>{rV(t),t.label=e.id,t.x=Math.round(e.x??0),t.y=Math.round(e.y??0),t.alpha=e.alpha??1;let i=e.width??e.measuredWidth??0;for(let s=0;s<e.content.length;s++){let o=e.content[s],n=new ie({label:`${e.id}-line-${s}`});for(let l of o.lineParts??[])l.furigana&&n.addChild(rB({text:l.furigana.text,style:iB(l.furigana.textStyle,r),x:l.furigana.x,y:l.furigana.y})),n.addChild(rB({text:l.text,style:iB(l.textStyle,r),x:l.x,y:l.y}));let a=n.getLocalBounds();n.x=tV(i,a,eV(e.textStyle)),t.addChild(n)}t.hitArea=new te(0,0,Math.max(0,i),Math.max(0,e.height??0))},aB=(t,e)=>{let r=new ie({label:t.id});return r[sB]=!0,r.zIndex=e,xu(r,t),r};var hb="__routeGraphicsManagedFilters",iV=["shadow","blur","shader"],sV=t=>(t[hb]||Object.defineProperty(t,hb,{value:new Map,enumerable:!1,configurable:!0}),t[hb]),oV=t=>t.filters?Array.isArray(t.filters)?t.filters:[t.filters]:[],tp=t=>t?Array.isArray(t)?t.filter(Boolean):[t]:[],nV=(t,e,r)=>{let i=new Set;for(let a of e.values())for(let l of tp(a))i.add(l);for(let a of tp(r))i.add(a);let s=oV(t).filter(a=>!i.has(a)),n=[...iV.flatMap(a=>tp(e.get(a))),...s];t.filters=n.length>0?n:null},aV=t=>{for(let e of tp(t))e.destroy?.()},Ao=(t,e,r)=>{let i=sV(t),s=i.get(e);r?i.set(e,r):i.delete(e),nV(t,i,s),s&&s!==r&&aV(s)};var lB=/^[a-z][A-Za-z0-9]*$/;var lV=new Set(["shader"]),cB=new Set(["normal","add","multiply","screen"]),uB=new Set(["clamp","repeat"]),cV=new Set(["uTexture","uPrevTexture","uNextTexture","uNextTextureMatrix","uNextTextureClamp","uProgress","uResolution","uSampler","GlobalFilterUniforms","ShaderUniforms","VSOutput","gfu","shaderUniforms","mainVertex","mainFragment","uInputSize","uInputPixel","uInputClamp","uOutputFrame","uGlobalFrame","uOutputTexture"]),uV=t=>!!t&&typeof t=="object"&&!Array.isArray(t),hB=t=>typeof t=="number"&&Number.isFinite(t),Rs=(t,e)=>{if(!uV(t))throw new Error(`Input Error: ${e} must be an object`)},yu=(t,e)=>{if(typeof t!="string"||t.length===0)throw new Error(`Input Error: ${e} must be a non-empty string`)},dB=(t,e)=>{if(!lB.test(t))throw new Error(`Input Error: ${e} must match ${lB.source}`)},fB=t=>t.charAt(0).toUpperCase()+t.slice(1),hV=t=>`u${fB(t)}`,dV=t=>`u${fB(t)}Texture`,pB=({key:t,symbol:e,path:r,symbols:i,kind:s})=>{if(cV.has(e))throw new Error(`Input Error: ${r}.${t} generates reserved shader symbol ${e}`);if(i.has(e))throw new Error(`Input Error: ${r}.${t} generates duplicate shader symbol ${e}`);i.set(e,{key:t,kind:s})},fV=(t,e)=>{if(hB(t))return{type:"f32",value:t};if(Array.isArray(t)&&(t.length===2||t.length===4)&&t.every(hB))return{type:t.length===2?"vec2<f32>":"vec4<f32>",value:[...t]};throw new Error(`Input Error: ${e} must be a number, a length-2 number array, or a length-4 number array`)},pV=(t,e,r)=>t===void 0?[]:(Rs(t,e),Object.keys(t).sort().map(i=>{dB(i,`${e}.${i}`);let s=hV(i);return pB({key:i,symbol:s,path:e,symbols:r,kind:"uniform"}),{key:i,symbol:s,...fV(t[i],`${e}.${i}`)}})),mV=({textures:t,path:e,symbols:r,maxTextures:i})=>{if(t===void 0)return[];Rs(t,e);let s=Object.keys(t).sort();if(s.length>i)throw new Error(`Input Error: ${e} supports at most ${i} custom textures`);return s.map(o=>{dB(o,`${e}.${o}`),yu(t[o],`${e}.${o}`);let n=dV(o);return pB({key:o,symbol:n,path:e,symbols:r,kind:"texture"}),{key:o,symbol:n,src:t[o]}})},gV=(t,e)=>{if(t===void 0)return{blend:"normal",textureWrap:"clamp",mipmap:!1};Rs(t,e);let r=t.blend??"normal";if(!cB.has(r))throw new Error(`Input Error: ${e}.blend must be one of: ${Array.from(cB).join(", ")}`);let i=t.textureWrap??"clamp";if(!uB.has(i))throw new Error(`Input Error: ${e}.textureWrap must be one of: ${Array.from(uB).join(", ")}`);let s=t.mipmap??!1;if(typeof s!="boolean")throw new Error(`Input Error: ${e}.mipmap must be a boolean`);return{blend:r,textureWrap:i,mipmap:s}},xV=(t,e)=>{if(Rs(t,e),Rs(t.webgl,`${e}.webgl`),Rs(t.webgpu,`${e}.webgpu`),t.webgl.vertex!==void 0&&typeof t.webgl.vertex!="string")throw new Error(`Input Error: ${e}.webgl.vertex must be a string`);if(yu(t.webgl.fragment,`${e}.webgl.fragment`),yu(t.webgpu.source,`${e}.webgpu.source`),!t.webgpu.source.includes("mainVertex")||!t.webgpu.source.includes("mainFragment"))throw new Error(`Input Error: ${e}.webgpu.source must define mainVertex and mainFragment`);return{webgl:{...t.webgl.vertex!==void 0?{vertex:t.webgl.vertex}:{},fragment:t.webgl.fragment},webgpu:{source:t.webgpu.source}}},yV=(t,e)=>{if(t===void 0)return{grid:[1,1]};if(Rs(t,e),!Array.isArray(t.grid)||t.grid.length!==2||!t.grid.every(r=>Number.isInteger(r)&&r>=1))throw new Error(`Input Error: ${e}.grid must be [columns, rows] with positive integers`);return{grid:[t.grid[0],t.grid[1]]}},mB=({shader:t,path:e,requireId:r,textureLimit:i,allowMesh:s})=>{if(Rs(t,e),!lV.has(t.type))throw new Error(`Input Error: ${e}.type must be shader`);let o={type:"shader"};r?(yu(t.id,`${e}.id`),o.id=t.id):t.id!==void 0&&(yu(t.id,`${e}.id`),o.id=t.id);let n=new Map;if(o.uniforms=pV(t.uniforms,`${e}.uniforms`,n),o.textures=mV({textures:t.textures,path:`${e}.textures`,symbols:n,maxTextures:i}),o.pipeline=gV(t.pipeline,`${e}.pipeline`),o.source=xV(t.source,`${e}.source`),t.mesh!==void 0&&!s)throw new Error(`Input Error: ${e}.mesh is only valid for compositors`);return s&&(o.mesh=yV(t.mesh,`${e}.mesh`)),o},gB=(t,e="filters")=>{if(t===void 0)return;if(!Array.isArray(t))throw new Error(`Input Error: ${e} must be an array`);let r=new Set;return t.map((i,s)=>{let o=mB({shader:i,path:`${e}[${s}]`,requireId:!0,textureLimit:7,allowMesh:!1});if(r.has(o.id))throw new Error(`Input Error: ${e}[${s}].id must be unique within filters`);return r.add(o.id),o})},xB=(t,e="compositor")=>mB({shader:t,path:e,requireId:!1,textureLimit:6,allowMesh:!0}),yB=t=>JSON.stringify(t??null);var fb="__routeGraphicsShaderFilters",Po="__routeGraphicsShaderProgress",_B="__routeGraphicsShaderDestroyCleanup",_V=`
1263
+ `),u=tI.replace("%blur-struct%",a).replace("%blur-vertex-out%",l).replace("%blur-fragment-in%",a).replace("%blur-sampling%",c).replace("%dimension%",t?"z":"w");return hr.from({vertex:{source:u,entryPoint:"mainVertex"},fragment:{source:u,entryPoint:"mainFragment"}})}var iI=class sI extends Br{constructor(e){e={...sI.defaultOptions,...e};let r=eI(e.horizontal,e.kernelSize),i=rI(e.horizontal,e.kernelSize);super({glProgram:r,gpuProgram:i,resources:{blurUniforms:{uStrength:{value:0,type:"f32"}}},...e}),this.horizontal=e.horizontal,this._quality=0,this.quality=e.quality,this.blur=e.strength,this._uniforms=this.resources.blurUniforms.uniforms}apply(e,r,i,s){if(this._uniforms.uStrength=this.strength/this.passes,this.passes===1)e.applyFilter(this,r,i,s);else{let o=Ve.getSameSizeTexture(r),n=r,a=o;this._state.blend=!1;let l=e.renderer.type===Xe.WEBGPU;for(let c=0;c<this.passes-1;c++){e.applyFilter(this,n,a,c===0?!0:l);let u=a;a=n,n=u}this._state.blend=!0,e.applyFilter(this,n,i,s),Ve.returnTexture(o)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}};iI.defaultOptions={strength:8,quality:4,kernelSize:5};var Of=iI;var sa=class extends Br{constructor(...e){let r=e[0]??{};typeof r=="number"&&(J(ue,"BlurFilter constructor params are now options object. See params: { strength, quality, resolution, kernelSize }"),r={strength:r},e[1]!==void 0&&(r.quality=e[1]),e[2]!==void 0&&(r.resolution=e[2]||"inherit"),e[3]!==void 0&&(r.kernelSize=e[3])),r={...Of.defaultOptions,...r};let{strength:i,strengthX:s,strengthY:o,quality:n,...a}=r;super({...a,compatibleRenderers:Xe.BOTH,resources:{}}),this._repeatEdgePixels=!1,this.blurXFilter=new Of({horizontal:!0,...r}),this.blurYFilter=new Of({horizontal:!1,...r}),this.quality=n,this.strengthX=s??i,this.strengthY=o??i,this.repeatEdgePixels=!1}apply(e,r,i,s){let o=Math.abs(this.blurXFilter.strength),n=Math.abs(this.blurYFilter.strength);if(o&&n){let a=Ve.getSameSizeTexture(r);this.blurXFilter.blendMode="normal",this.blurXFilter.apply(e,r,a,!0),this.blurYFilter.blendMode=this.blendMode,this.blurYFilter.apply(e,a,i,s),Ve.returnTexture(a)}else n?(this.blurYFilter.blendMode=this.blendMode,this.blurYFilter.apply(e,r,i,s)):(this.blurXFilter.blendMode=this.blendMode,this.blurXFilter.apply(e,r,i,s))}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.blur),Math.abs(this.blurYFilter.blur))*2}get strength(){if(this.strengthX!==this.strengthY)throw new Error("BlurFilter's strengthX and strengthY are different");return this.strengthX}set strength(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get strengthX(){return this.blurXFilter.blur}set strengthX(e){this.blurXFilter.blur=e,this.updatePadding()}get strengthY(){return this.blurYFilter.blur}set strengthY(e){this.blurYFilter.blur=e,this.updatePadding()}get blur(){return J("8.3.0","BlurFilter.blur is deprecated, please use BlurFilter.strength instead."),this.strength}set blur(e){J("8.3.0","BlurFilter.blur is deprecated, please use BlurFilter.strength instead."),this.strength=e}get blurX(){return J("8.3.0","BlurFilter.blurX is deprecated, please use BlurFilter.strengthX instead."),this.strengthX}set blurX(e){J("8.3.0","BlurFilter.blurX is deprecated, please use BlurFilter.strengthX instead."),this.strengthX=e}get blurY(){return J("8.3.0","BlurFilter.blurY is deprecated, please use BlurFilter.strengthY instead."),this.strengthY}set blurY(e){J("8.3.0","BlurFilter.blurY is deprecated, please use BlurFilter.strengthY instead."),this.strengthY=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}};sa.defaultOptions={strength:8,quality:4,kernelSize:5};Fe();Sl();pn();Il();var ws=class t extends ke{constructor(...e){let r=e[0];Array.isArray(e[0])&&(r={textures:e[0],autoUpdate:e[1]});let{animationSpeed:i=1,autoPlay:s=!1,autoUpdate:o=!0,loop:n=!0,onComplete:a=null,onFrameChange:l=null,onLoop:c=null,textures:u,updateAnchor:h=!1,...d}=r,[f]=u;super({...d,texture:f instanceof B?f:f.texture}),this._textures=null,this._durations=null,this._autoUpdate=o,this._isConnectedToTicker=!1,this.animationSpeed=i,this.loop=n,this.updateAnchor=h,this.onComplete=a,this.onFrameChange=l,this.onLoop=c,this._currentTime=0,this._playing=!1,this._previousFrame=null,this.textures=u,s&&this.play()}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Tt.shared.remove(this.update,this),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Tt.shared.add(this.update,this,hi.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(e){this.stop(),this.currentFrame=e}gotoAndPlay(e){this.currentFrame=e,this.play()}update(e){if(!this._playing)return;let r=e.deltaTime,i=this.animationSpeed*r,s=this.currentFrame;if(this._durations!==null){let o=this._currentTime%1*this._durations[this.currentFrame];for(o+=i/60*1e3;o<0;)this._currentTime--,o+=this._durations[this.currentFrame];let n=Math.sign(this.animationSpeed*r);for(this._currentTime=Math.floor(this._currentTime);o>=this._durations[this.currentFrame];)o-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=o/this._durations[this.currentFrame]}else this._currentTime+=i;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):s!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<s||this.animationSpeed<0&&this.currentFrame>s)&&this.onLoop(),this._updateTexture())}_updateTexture(){let e=this.currentFrame;this._previousFrame!==e&&(this._previousFrame=e,this.texture=this._textures[e],this.updateAnchor&&this.texture.defaultAnchor&&this.anchor.copyFrom(this.texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))}destroy(){this.stop(),super.destroy(),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}static fromFrames(e){let r=[];for(let i=0;i<e.length;++i)r.push(B.from(e[i]));return new t(r)}static fromImages(e){let r=[];for(let i=0;i<e.length;++i)r.push(B.from(e[i]));return new t(r)}get totalFrames(){return this._textures.length}get textures(){return this._textures}set textures(e){if(e[0]instanceof B)this._textures=e,this._durations=null;else{this._textures=[],this._durations=[];for(let r=0;r<e.length;r++)this._textures.push(e[r].texture),this._durations.push(e[r].time)}this._previousFrame=null,this.gotoAndStop(0),this._updateTexture()}get currentFrame(){let e=Math.floor(this._currentTime)%this._textures.length;return e<0&&(e+=this._textures.length),e}set currentFrame(e){if(e<0||e>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${e}, expected to be between 0 and totalFrames ${this.totalFrames}.`);let r=this.currentFrame;this._currentTime=e,r!==this.currentFrame&&this._updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Tt.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(Tt.shared.add(this.update,this),this._isConnectedToTicker=!0))}};Uh();tt();Jh();var Lf=class extends us{constructor(e,r){let{text:i,resolution:s,style:o,anchor:n,width:a,height:l,roundPixels:c,...u}=e;super({...u}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=r,this.text=i??"",this.style=o,this.resolution=s??null,this.allowChildren=!1,this._anchor=new Ft({_onUpdate:()=>{this.onViewUpdate()}}),n&&(this.anchor=n),this.roundPixels=c??!1,a!==void 0&&(this.width=a),l!==void 0&&(this.height=l)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}set text(e){e=e.toString(),this._text!==e&&(this._text=e,this.onViewUpdate())}get text(){return this._text}set resolution(e){this._autoResolution=e===null,this._resolution=e,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(e){e||(e={}),this._style?.off("update",this.onViewUpdate,this),e instanceof this._styleClass?this._style=e:this._style=new this._styleClass(e),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(e){this._setWidth(e,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(e){this._setHeight(e,this.bounds.height)}getSize(e){return e||(e={}),e.width=Math.abs(this.scale.x)*this.bounds.width,e.height=Math.abs(this.scale.y)*this.bounds.height,e}setSize(e,r){typeof e=="object"?(r=e.height??e.width,e=e.width):r??(r=e),e!==void 0&&this._setWidth(e,this.bounds.width),r!==void 0&&this._setHeight(r,this.bounds.height)}containsPoint(e){let r=this.bounds.width,i=this.bounds.height,s=-r*this.anchor.x,o=0;return e.x>=s&&e.x<=s+r&&(o=-i*this.anchor.y,e.y>=o&&e.y<=o+i)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}_getKey(){return`${this.text}:${this._style.styleKey}:${this._resolution}`}destroy(e=!1){super.destroy(e),this.owner=null,this._bounds=null,this._anchor=null,(typeof e=="boolean"?e:e?.style)&&this._style.destroy(e),this._style=null,this._text=null}};function oI(t,e){let r=t[0]??{};return(typeof r=="string"||t[1])&&(J(ue,`use new ${e}({ text: "hi!", style }) instead`),r={text:r,style:t[1]}),r}ec();po();var vr=class extends Lf{constructor(...e){let r=oI(e,"Text");super(r,Ge),this.renderPipeId="text"}updateBounds(){let e=this._bounds,r=this._anchor,i=Ye.measureText(this._text,this._style),{width:s,height:o}=i;e.minX=-r._x*s,e.maxX=e.minX+s,e.minY=-r._y*o,e.maxY=e.minY+o}};cc();Ae();gr();vt();oo();Wt();$y();Qt();Fe();nf();Yg();br();Yr();ho();cy();Il();ec();po();Gg();Vt();var jN=Xs(Td(),1);K.add(cP,hP);var qN=new(window.AudioContext||window.webkitAudioContext),Gf={},cu={},KN=t=>t?typeof t=="string"?t:t.message||String(t):"Unknown error",ZN=(t,e)=>{let r="Unsupported or damaged audio file.",i=`Could not load audio "${t}". ${r}`,s=new Error(i,{cause:e});return s.userMessage=i,s.rootCauseMessage=r,s.details={assetKey:t,assetKind:"audio",phase:"decode",cause:KN(e)},s},QN=(t,e)=>{if(Gf[t])return Gf[t];if(cu[t])return cu[t];if(e.byteLength!==0)return cu[t]=qN.decodeAudioData(e).then(r=>(Gf[t]=r,r)).catch(r=>{throw ZN(t,r)}).finally(()=>{delete cu[t]}),cu[t]},JN=t=>Gf[t],oa={load:QN,getAsset:JN};var dt=({type:t,add:e,update:r,delete:i,parse:s,shouldUpdateUnchanged:o})=>({type:t,add:e,update:r,delete:i,parse:s,shouldUpdateUnchanged:o});var M_=({type:t})=>({type:t});var I_=({type:t,add:e,update:r,delete:i})=>({type:t,add:e,update:r,delete:i});var Df={alpha:"alpha",x:"x",y:"y",translateX:"translateX",translateY:"translateY",scaleX:"scaleX",scaleY:"scaleY",rotation:"rotation",blurX:"blurX",blurY:"blurY",uProgress:"uProgress"};var Nf={scaleX:["scale","x"],scaleY:["scale","y"],x:["x"],y:["y"],alpha:["alpha"],rotation:["rotation"],blurX:["_routeGraphicsBlur","x"],blurY:["_routeGraphicsBlur","y"],uProgress:["uProgress"]};var Tr={RECT:"rect",TEXT:"text",INPUT:"input",CONTAINER:"container",SPRITE:"sprite",TEXT_REVEALING:"text-revealing",SLIDER:"slider",PARTICLES:"particles",SPRITESHEET_ANIMATION:"spritesheet-animation",VIDEO:"video"};var $e={fill:"black",fontFamily:"Arial",fontSize:16,align:"left",lineHeight:1.2,wordWrap:!1,breakWords:!1,strokeColor:"transparent",strokeWidth:0,wordWrapWidth:0};var nI={color:"black",alpha:1,blur:0,offsetX:2,offsetY:2},e3=(t={})=>{let e=typeof t.stroke=="object"&&t.stroke!==null?t.stroke:{};return{...e,color:t.strokeColor??e.color??$e.strokeColor,width:t.strokeWidth??e.width??$e.strokeWidth}},t3=t=>{if(t===void 0)return;if(t===null||t===!1)return null;let e=typeof t=="object"&&t!==null?{...nI,...t}:nI,r=e.offsetX,i=e.offsetY,s=Math.hypot(r,i);return{alpha:e.alpha,angle:s===0?0:Math.atan2(i,r),blur:e.blur,color:e.color,distance:s}},r3=t=>t?Math.ceil(Math.max(0,t.blur)+t.distance):0,Ut=(t={},e={})=>{let r=e.includeShadow!==!1,{strokeColor:i,strokeWidth:s,stroke:o,shadow:n,...a}=t;delete a.dropShadow;let l={...a,stroke:e3({strokeColor:i,strokeWidth:s,stroke:o})};if(r){let c=t3(n),u=r3(c),h=Math.max(a.padding??0,u);n!==void 0&&(l.dropShadow=c),h>0&&(l.padding=h)}return l};var wi=(t,e)=>{let r={fill:e?.fill??$e.fill,fontFamily:e?.fontFamily??$e.fontFamily,fontSize:e?.fontSize??$e.fontSize,align:e?.align??$e.align,lineHeight:e?.lineHeight??$e.lineHeight,wordWrap:e?.wordWrap??$e.wordWrap,breakWords:e?.breakWords??$e.breakWords,strokeColor:e?.strokeColor??$e.strokeColor,strokeWidth:e?.strokeWidth??$e.strokeWidth,wordWrapWidth:e?.wordWrapWidth??$e.wordWrapWidth,...e?.padding!==void 0?{padding:e.padding}:{},...Object.prototype.hasOwnProperty.call(e??{},"shadow")?{shadow:e.shadow}:{}};t.style=Ut(r)};var _o=(t=0)=>t*Math.PI/180,B_=(t=0)=>t*180/Math.PI,aI=t=>typeof t=="number"&&Number.isFinite(t)&&t!==0?t:1,Vf=t=>({x:Math.round((t.x??0)+(t.originX??0)),y:Math.round((t.y??0)+(t.originY??0))}),Ur=(t,e)=>{let r=e.originX??0,i=e.originY??0,s=aI(t.scale?.x),o=aI(t.scale?.y),n=Vf(e);t.pivot?.set?.(r/s,i/o),t.x=n.x,t.y=n.y,t.rotation=_o(e.rotation??0)},Or=(t,e={})=>{let r=Vf(t),i={x:r.x,y:r.y,...e};return t.rotation!==void 0&&(i.rotation=t.rotation),i};var Es=t=>t==="translateX"||t==="translateY",uI=(t,e)=>typeof e!="string"?e:t[e]??e,i3=(t,e,r,i)=>{let s=uI(r,e);if(typeof s=="string"){let n=t[s];return n===void 0?i:e==="rotation"?B_(n):n}let o=t;for(let n of s){if(o==null)return i;o=o[n]}return o===void 0?i:e==="rotation"?B_(o):o},s3=(t,e,r,i)=>{let s=uI(r,e),o=e==="rotation"?_o(i):i;if(typeof s=="string")return t[s]=o,t;let n=t;for(let a=0;a<s.length-1;a++){let l=s[a];l in n||(n[l]={}),n=n[l]}return n[s[s.length-1]]=o,t},lI=t=>typeof t=="number"&&Number.isFinite(t),o3=t=>{let e=t?.getLocalBounds?.();return e?.rectangle??e??null},cI=(t,e)=>{let r=e==="x"?t?.width:t?.height;if(lI(r)&&r>0)return r;let i=o3(t),s=e==="x"?i?.width:i?.height,o=e==="x"?t?.scale?.x:t?.scale?.y;return lI(s)&&s>0?Math.abs(s*(o??1)):0},As=t=>({x:t?.x??0,y:t?.y??0,width:cI(t,"x"),height:cI(t,"y")}),hI=({object:t,property:e,propertyPathMap:r,subjectState:i,defaultValue:s=0})=>e==="translateX"||e==="translateY"?s:i3(t,e,r,s),uu=({object:t,property:e,propertyPathMap:r,subjectState:i,value:s})=>e==="translateX"?(t.x=i.x+s*i.width,t):e==="translateY"?(t.y=i.y+s*i.height,t):s3(t,e,r,s);var dI=(t,e,r=Nf,i)=>{let s=i;for(let o of e)for(let[n,a]of Object.entries(o.tween)){if(!Df[n])throw new Error(`${n} is not a supported property for animation.`);a.initialValue!==void 0&&(!s&&Es(n)&&(s=As(t)),uu({object:t,property:n,propertyPathMap:r,subjectState:s,value:a.initialValue}))}},Hf=({animations:t,animationBus:e,completionTracker:r,element:i,targetState:s,onComplete:o,animationBaseState:n})=>{for(let a of t){if(typeof e?.hasContext=="function"&&e.hasContext(a.id))continue;for(let[u,h]of Object.entries(a.tween))if(h.auto&&(!s||!Object.prototype.hasOwnProperty.call(s,u)))throw new Error(`Animation "${a.id}" cannot auto-resolve property "${u}" from targetState.`);let l=a.playback?.continuity!=="persistent",c=l?r.getVersion():null;l&&r.track(c),e.dispatch({type:"START",payload:{id:a.id,animationType:a.type,targetId:a.targetId,continuity:a.playback?.continuity??"render",playbackSpeed:a.playback?.speed,signature:a.signature??JSON.stringify({type:a.type,tween:a.tween,playback:a.playback??null}),element:i,properties:a.tween,targetState:s,animationBaseState:n,onComplete:()=>{l&&r.complete(c),o?.(a)}}})}};var n3=t=>{if(!t?.dropShadow||typeof t.clone!="function")return t;let e=t.clone();return e.dropShadow=null,e};function Wf(t,e){let r=t.text.substring(0,e),s=Ye.measureText(r,n3(t.style)).width;return t.x+s}var a3=async(t,e)=>new Promise((r,i)=>{if(e?.aborted)return i(new DOMException("The operation was aborted.","AbortError"));let s,o=()=>{s&&e?.removeEventListener("abort",s)},n=setTimeout(()=>{o(),r()},t);s=()=>{clearTimeout(n),o(),i(e.reason)},e?.addEventListener("abort",s,{once:!0})}),$f=a3;var hu={softness:1.25,easing:"linear",lineOverlap:0,lineDelay:0},l3=18,c3=64,k_={linear:t=>t,easeOutCubic:t=>1-(1-t)**3},u3=(t,e,r)=>Math.max(e,Math.min(r,t)),F_=(t,e)=>typeof t=="number"&&Number.isFinite(t)?t:e,bo=(t={})=>{let e=t&&typeof t=="object"?t:{};return{softness:Math.max(0,F_(e.softness,hu.softness)),easing:Object.prototype.hasOwnProperty.call(k_,e.easing)?e.easing:hu.easing,lineOverlap:u3(F_(e.lineOverlap,hu.lineOverlap),0,.95),lineDelay:Math.max(0,F_(e.lineDelay,hu.lineDelay))}},U_=t=>k_[t]??k_[hu.easing],O_=({maxLineHeight:t,softWipe:e})=>Math.max(l3,Math.min(c3,Math.round(t*e.softness)));var na=(t,e,r,i)=>{if(!r)return;let s=o=>{o?.detail?.elementId===e&&typeof o?.detail?.frameIndex=="number"&&(t.gotoAndStop(o?.detail?.frameIndex),i?.())};window.addEventListener("snapShotAnimatedSpriteFrame",s),t._snapShotKeyFrameHandler=s},vo=t=>{t._snapShotKeyFrameHandler&&(window.removeEventListener("snapShotAnimatedSpriteFrame",t._snapShotKeyFrameHandler),delete t._snapShotKeyFrameHandler)};var fI=(t={})=>{if(t.frame){let n=t.frame.w??0,a=t.frame.h??0,l=t.sourceSize?.w??n,c=t.sourceSize?.h??a,u={frame:{x:t.frame.x??0,y:t.frame.y??0,w:n,h:a},rotated:t.rotated??!1,trimmed:t.trimmed??!1,spriteSourceSize:{x:t.spriteSourceSize?.x??0,y:t.spriteSourceSize?.y??0,w:t.spriteSourceSize?.w??n,h:t.spriteSourceSize?.h??a},sourceSize:{w:l,h:c}};return t.anchor?u.anchor={x:t.anchor.x??0,y:t.anchor.y??0}:t.pivot&&(u.anchor={x:t.pivot.x??0,y:t.pivot.y??0}),t.borders&&(u.borders={...t.borders}),u}let e=t.width??t.w??0,r=t.height??t.h??0,i=t.sourceWidth??e,s=t.sourceHeight??r,o={frame:{x:t.x??0,y:t.y??0,w:e,h:r},rotated:t.rotated??!1,trimmed:t.trimmed??!1,spriteSourceSize:{x:t.offsetX??0,y:t.offsetY??0,w:e,h:r},sourceSize:{w:i,h:s}};return t.anchor?o.anchor={x:t.anchor.x??0,y:t.anchor.y??0}:t.pivot&&(o.anchor={x:t.pivot.x??0,y:t.pivot.y??0}),t.borders&&(o.borders={...t.borders}),o},L_=(t={})=>!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).map(([e,r])=>[e,Array.isArray(r)?r.map(i=>String(i)):[]])),h3=(t,e={})=>{let r=Math.max(0,Number(e.from??0)),i=Math.min(t.length-1,Number(e.to??r));if(!Number.isFinite(r)||!Number.isFinite(i)||i<r)return[];let s=t.slice(r,i+1),o=String(e.direction??"forward").toLowerCase();if(o==="reverse"||o==="backward")return[...s].reverse();if(o==="pingpong")return[...s,...s.slice(1,-1).reverse()];if(o==="pingpong_reverse"){let n=[...s].reverse();return[...n,...n.slice(1,-1).reverse()]}return s},d3=(t=[],e=[])=>!Array.isArray(t)||e.length===0?{}:Object.fromEntries(t.map(r=>{let i=typeof r?.name=="string"?r.name:"";return i?[i,h3(e,r)]:null}).filter(Boolean)),Qr=(t={})=>{let e=t??{},r=L_(e.animations);return{frames:Array.isArray(e.frames)?Object.fromEntries(e.frames.map(s=>{let o=s?.filename??s?.name;return typeof o!="string"||o.length===0?null:[o,fI(s)]}).filter(Boolean)):Object.fromEntries(Object.entries(e.frames??{}).map(([s,o])=>[s,fI(o)])),...Object.keys(r).length>0?{animations:r}:{},meta:{...e.meta??{},scale:String(e.scale??e.meta?.scale??1),...e.width!=null||e.height!=null?{size:{w:e.width??e.meta?.size?.w??0,h:e.height??e.meta?.size?.h??0}}:{}}}},Jr=(t={},e={},r={},i=[])=>({...d3(r?.frameTags,i),...L_(e),...L_(t)}),f3=(t,e)=>{if(!Array.isArray(e?.frames))return[];let r=Object.keys(t.frames??{});return e.frames.map(i=>typeof i=="number"?r[i]:String(i)).filter(Boolean)},Lr=({atlas:t={frames:{}},clips:e={},playback:r,legacyAnimation:i})=>{let s=r??i??{},o={fps:s.fps??null,loop:s.loop??!0,autoplay:s.autoplay??!0};return typeof s.clip=="string"&&s.clip.length>0&&(o.clip=s.clip),Array.isArray(s.frames)?o.frames=s.frames.map(n=>typeof n=="number"?Object.keys(t.frames??{})[n]:String(n)).filter(Boolean):o.clip||(o.frames=f3(t,i)),o.fps==null&&(typeof s.animationSpeed=="number"?o.fps=s.animationSpeed*60:o.fps=30),o.clip&&(!Array.isArray(o.frames)||o.frames.length===0)&&(o.frames=Array.isArray(e[o.clip])?[...e[o.clip]]:[]),Array.isArray(o.frames)||(o.frames=[]),o},aa=({spritesheet:t,atlas:e,clips:r={},playback:i,legacyAnimation:s})=>{let o=Lr({atlas:e,clips:r,playback:i,legacyAnimation:s});return{frameTextures:o.frames.map(a=>t.textures[a]),playback:o}},la=t=>typeof t=="number"?t/60:.5;var Xi=Symbol("textRevealRuntime"),zf=Symbol("textRevealSnapshot"),ca=Symbol("textRevealIndicator"),yI=Symbol("textRevealIndicatorPlayback"),N_=50,p3=0,W_=100,G_=W_-1,pI=10,_I=120,m3=.9,g3=360,x3=1.2,D_=20,y3=16,_3=0,b3=(t,e,r)=>Math.max(e,Math.min(r,t)),bI=(t=N_)=>typeof t!="number"||!Number.isFinite(t)?N_:Math.max(p3,Math.min(W_,t)),v3=t=>bI(t)>=W_,$_=(t,{maxRate:e=_I,curve:r=m3}={})=>{let i=Math.min(bI(t),G_),o=(G_>0?i/G_:0)**r;return pI*(e/pI)**o},T3=t=>$_(t,{maxRate:g3,curve:x3}),S3=t=>{let e=1e3/t;return e>=D_||t<=_I?{stepDelay:Math.max(1,Math.floor(e)),charactersPerStep:1}:{stepDelay:D_,charactersPerStep:Math.max(2,Math.round(t*D_/1e3))}},w3=t=>t?.revealEffect==="softWipe"?"softWipe":"typewriter",z_=t=>{let e=t?.initialRevealedCharacters;return typeof e!="number"||!Number.isFinite(e)?0:Math.max(0,Math.floor(e))},E3=t=>(t?.content??[]).reduce((e,r)=>e+(r.lineParts??[]).reduce((i,s)=>i+(s.text?.length??0),0),0),ua=t=>t?.revealEffect==="none"||v3(t?.speed??N_),V_=t=>t!==null&&typeof t=="object"&&typeof t.then=="function",X_=(t={})=>t.kind??(t.atlas!==void 0||t.clips!==void 0||t.playback!==void 0?"spritesheet":"image"),A3=t=>["revealing","complete"].some(e=>X_(t?.indicator?.[e])==="spritesheet"&&!!t?.indicator?.[e]?.src),vI=t=>`${t.id}-indicator`,TI=(t,e,r)=>{typeof e?.width=="number"?t.width=e.width:r?.width&&(t.width=r.width),typeof e?.height=="number"?t.height=e.height:r?.height&&(t.height=r.height)},SI=(t={})=>{let e=t?.src?B.from(t.src):B.EMPTY,r=new ke(e);return TI(r,t,e),r},P3=(t={},{app:e,element:r})=>{if(!t?.src)return SI(t);let i=Qr(t.atlas),s=Jr(t.clips,t.atlas?.animations,t.atlas?.meta,Object.keys(i.frames??{})),o=Lr({atlas:i,clips:s,playback:t.playback});return(async()=>{let n=new pi(B.from(t.src),i);await n.parse();let{frameTextures:a}=aa({spritesheet:n,atlas:i,clips:s,playback:o}),l=new ws(a.length>0?a:[B.EMPTY]);return l.animationSpeed=la(o.fps),l.loop=o.loop,l[yI]=o,TI(l,t,a[0]),e?.debug&&na(l,vI(r),e.debug,()=>{typeof e.render=="function"&&e.render()}),l})()},mI=(t,e)=>X_(t)==="spritesheet"?P3(t,e):SI(t),gI=(t,e)=>{t instanceof ws&&!e?.debug&&t[yI]?.autoplay!==!1&&t.play()},wI=t=>{!t||t.destroyed||(vo(t),typeof t.stop=="function"&&t.stop(),t.destroy({children:!0}))},H_=t=>{let e=t?.[ca];if(e){for(let r of e.displays)vo(r);for(let r of e.displays)r?.parent!==t&&wI(r);delete t[ca]}t.destroy({children:!0})},C3=({element:t,app:e,revealingDisplay:r,completeDisplay:i})=>{let s=new ie({label:vI(t)}),o=new Set([r]);return i&&o.add(i),s.addChild(r),s[ca]={displays:o,currentDisplay:r,completeDisplay:i,start(){gI(this.currentDisplay,e)},showComplete(){if(!this.completeDisplay||this.currentDisplay===this.completeDisplay)return;let n=this.currentDisplay;n?.parent===s&&s.removeChild(n),wI(n),o.delete(n),this.currentDisplay=this.completeDisplay,s.addChild(this.completeDisplay),gI(this.completeDisplay,e)}},s},R3=(t,{app:e}={})=>{let r=t?.indicator?.revealing??{},i=t?.indicator?.complete,s=mI(r,{app:e,element:t}),o=i?.src||X_(i)==="spritesheet"?mI(i,{app:e,element:t}):null,n=(a,l)=>C3({element:t,app:e,revealingDisplay:a,completeDisplay:l});return V_(s)||V_(o)?Promise.all([s,o]).then(([a,l])=>n(a,l)):n(s,o)},M3=t=>{t?.[ca]?.showComplete()},ha=(t,e="revealing")=>{let r=t?.indicator?.[e]??{};return{x:r.offsetX??t?.indicator?.offsetX??y3,y:r.offsetY??t?.indicator?.offsetY??_3}},I3=(t,e)=>{if(!e)return 0;let r=Math.max(0,e.lineMaxHeight??0),i=Math.max(0,t?.height??0);return e.y+Math.max(0,r-i)},Yi=(t,e,r)=>{t.x=r.x,t.y=I3(t,e)+r.y},EI=(t,e,r)=>{if(!e||e.text.length===0){t.x=r.x;return}t.x=Wf(e,e.text.length-1)+r.x},Ps=(t,e,r,i)=>{M3(t);let s=ha(i,"complete");Yi(t,e,s),EI(t,r,s)},B3=(t,e)=>{if(t[Xi]){let r=t[Xi];delete t[Xi],r()}t[Xi]=e},F3=t=>t?.[zf]??null,du=(t,e)=>t?e?(t[zf]=e,e):(delete t[zf],null):null,AI=t=>{let e=F3(t);return!e||e.mode!=="typewriter"||e.completed===!0?null:e},PI=t=>!!AI(t),Y_=t=>{if(t[Xi]){let r=t[Xi];delete t[Xi],r()}delete t[zf],t.onRender=void 0,t.removeChildren().forEach(r=>{if(r?.[ca]){H_(r);return}r.destroy({children:!0})})},j_=(t,e="",r="")=>{let i=new Ge(Ut(t.textStyle)),s=new vr({text:e,style:i,x:Math.round(t.x),y:Math.round(t.y)}),o=null;if(t.furigana){let n=new Ge(Ut(t.furigana.textStyle));o=new vr({text:r,style:n,x:Math.round(t.furigana.x),y:Math.round(t.furigana.y)})}return{text:s,furiganaText:o}},q_=(t,e)=>{let r=null,i=null,s=0,o=0,n=[];for(let a=0;a<e.content.length;a++){let l=e.content[a],c=new ie({label:`${e.id}-line-${a}`}),u=[],h=null,d=0;t.addChild(c),i=l,o=Math.max(o,l.lineMaxHeight??0);for(let f=0;f<l.lineParts.length;f++){let p=l.lineParts[f],{text:m,furiganaText:x}=j_(p,p.text,p.furigana?.text||"");x&&(c.addChild(x),u.push(x)),c.addChild(m),u.push(m),r=m,h=m,s+=p.text.length,d+=p.text.length}if(u.length>0){let f=c.getLocalBounds();n.push({chunk:l,container:c,lastTextObject:h,totalCharacters:d,bounds:{x:f.x,y:f.y,width:f.width,height:f.height}})}else c.destroy()}return{lines:n,lastTextObject:r,lastChunk:i,totalCharacters:s,maxLineHeight:o,bounds:t.getLocalBounds()}},xI=({contentContainer:t,indicatorSprite:e,element:r})=>{let{lastTextObject:i,lastChunk:s}=q_(t,r);Ps(e,s,i,r)},k3=({contentContainer:t,indicatorSprite:e,element:r,revealedCharacters:i})=>{let s=ha(r),o=r.content[0]??null,n=E3(r),a=Math.min(i,Math.max(0,n)),l=null,c=null;if(a<=0){Yi(e,o,s);return}e:for(let u=0;u<r.content.length;u++){let h=r.content[u];for(let d=0;d<h.lineParts.length;d++){let f=h.lineParts[d],p=Math.min(f.text.length,a);if(p<=0)break e;let m=f.furigana?.text||"",x=m.length,v=f.text.length>0?Math.round(p/f.text.length*x):0,{text:y,furiganaText:g}=j_(f,f.text.substring(0,p),m.substring(0,v));if(g&&t.addChild(g),t.addChild(y),l=y,c=h,a-=p,p<f.text.length)break e}}c?(Yi(e,c,s),EI(e,l,s)):Yi(e,o,s),i>=n&&Ps(e,c??o,l,r)},U3=({contentContainer:t,indicatorSprite:e,element:r})=>{let i=z_(r);if(i<=0){let s=ha(r),o=r.content[0]??null;Yi(e,o,s);return}r.revealEffect==="softWipe"?N3({contentContainer:t,indicatorSprite:e,element:r,revealedCharacters:i}):k3({contentContainer:t,indicatorSprite:e,element:r,revealedCharacters:i})},O3=async({contentContainer:t,indicatorSprite:e,element:r,signal:i,startAtCharacter:s=0,snapshot:o=null})=>{let n=T3(r.speed??50),a=ha(r),{stepDelay:l,charactersPerStep:c}=S3(n),u=Math.max(l,Math.floor(4e3/n)),h=Math.max(0,Math.floor(s)),d=!1,f=null,p=null;o&&(o.revealedCharacters=h,o.completed=!1);for(let m=0;m<r.content.length;m++){if(i?.aborted||t.destroyed)return!1;let x=r.content[m],v=!1;Yi(e,x,a);for(let y=0;y<x.lineParts.length;y++){if(i?.aborted||t.destroyed)return!1;let g=x.lineParts[y],{text:b,furiganaText:_}=j_(g);_&&t.addChild(_),t.addChild(b);let S=g.text,E=g.furigana?.text||"";S.length>0&&(f=b,p=x);let P=E.length,C=Math.min(S.length,h),M=S.length>0?Math.round(C/S.length*P):0;b.text=S.substring(0,C),_&&(_.text=E.substring(0,M)),h-=C,C>0&&(e.x=Wf(b,C-1)+a.x);let R=C;for(;R<S.length;){if(i?.aborted||t.destroyed)return!1;let F=Math.min(S.length,R+c),U=F-1;if(b.text=S.substring(0,F),e.x=Wf(b,U)+a.x,v=!0,d=!0,o&&(o.revealedCharacters+=F-R),_){let W=Math.round(F/S.length*P);_.text=E.substring(0,W)}R=F,R<S.length&&await $f(l,i)}}m<r.content.length-1&&v&&await $f(u,i)}return d&&(await $f(l,i),i?.aborted||t.destroyed)?!1:(Ps(e,p,f,r),o&&(o.completed=!0),!0)},CI=({lines:t,edgeWidth:e,baseDuration:r,softWipe:i})=>{let s=t.map(c=>{let u=Math.max(1,c.totalCharacters),h=1+e/Math.max(1,c.bounds.width);return u*h}),o=s.reduce((c,u)=>c+u,0),n=[],a=0,l=0;for(let c=0;c<t.length;c++){let u=s[c],h=o>0?Math.max(1,r*u/o):r,d=Math.max(0,a),f=d+h;n.push({...t[c],startTime:d,endTime:f,duration:h}),l=Math.max(l,f),a=f-h*i.lineOverlap+i.lineDelay}return{timedLines:n,duration:Math.max(1,Math.ceil(l))}},L3=({currentTime:t,line:e,easing:r})=>{let i=e.duration>0?(t-e.startTime)/e.duration:1;return r(Math.max(0,Math.min(i,1)))},G3=({progress:t,easingName:e})=>{let r=b3(t,0,1);return e==="easeOutCubic"?1-Math.cbrt(1-r):r},RI=({timedLines:t,initialRevealedCharacters:e,softWipe:r,easingName:i})=>{let s=Math.max(0,Math.floor(e)),o=s<=0,n=0,a=0;return{timedLines:t.map(c=>{let u=Math.max(0,c.totalCharacters??0),h=0,d=!1;if(!o&&s>0)if(u<=0||s>=u)s-=u,h=1,d=!0;else{let m=s/u;h=G3({progress:m,easingName:i}),s=0,o=!0}if(d)return{...c,startTime:-c.duration,endTime:0};o=!0;let f=h>0?-h*c.duration:Math.max(0,n),p=f+c.duration;return a=Math.max(a,p),n=p-c.duration*r.lineOverlap+r.lineDelay,{...c,startTime:f,endTime:p}}),duration:Math.max(1,Math.ceil(a))}},D3=t=>{t.forEach(e=>{e&&(e.line.container.mask===e.sprite&&(e.line.container.mask=null),e.sprite.parent&&e.sprite.parent.removeChild(e.sprite),e.sprite.destroy(),e.texture.destroy(!0))})},MI=({contentContainer:t,timedLines:e,edgeWidth:r})=>{let i=e.map(s=>{let o=document.createElement("canvas");o.width=Math.max(1,Math.ceil(s.bounds.width+r)),o.height=Math.max(1,Math.ceil(s.bounds.height));let n=o.getContext("2d");if(!n)return null;let a=yo(o),l=new ke(a);return l.x=Math.floor(s.bounds.x-r),l.y=Math.floor(s.bounds.y),s.container.mask=l,t.addChild(l),{canvas:o,context:n,texture:a,sprite:l,line:s,edgeWidth:r}});return i.some(s=>s===null)?(D3(i),null):i},II=({timedLines:t,lineMasks:e,easing:r,indicatorSprite:i,indicatorOffsets:s,currentTime:o})=>{let n=t[0],a=n.bounds.x;for(let l=0;l<t.length;l++){let c=t[l],u=e[l],h=L3({currentTime:o,line:c,easing:r}),{context:d,canvas:f,texture:p}=u;if(d.clearRect(0,0,f.width,f.height),h<=0){p.source.update();continue}let m=0,x=c.bounds.width+u.edgeWidth,v=u.edgeWidth,y=v+h*x,g=Math.max(v,y-u.edgeWidth);g>v&&(d.fillStyle="#ffffff",d.fillRect(v,m,Math.min(g-v,c.bounds.width),c.bounds.height));let b=Math.max(v,y-u.edgeWidth),_=Math.min(v+c.bounds.width,y);if(_>b){let S=d.createLinearGradient(b,0,_,0);S.addColorStop(0,"rgba(255, 255, 255, 1)"),S.addColorStop(1,"rgba(255, 255, 255, 0)"),d.fillStyle=S,d.fillRect(b,m,_-b,c.bounds.height)}p.source.update(),n=c,a=c.bounds.x+Math.min(x,Math.max(0,y-v))}Yi(i,n.chunk,s),i.x=a+s.x},N3=({contentContainer:t,indicatorSprite:e,element:r,revealedCharacters:i})=>{let s=ha(r),{lines:o,lastTextObject:n,lastChunk:a,totalCharacters:l,maxLineHeight:c}=q_(t,r);if(Yi(e,a,s),o.length===0||l===0||i>=l||!o.some(y=>y.bounds.width>0&&y.bounds.height>0)||!globalThis.document){Ps(e,a,n,r);return}let u=bo(r.softWipe),h=U_(u.easing),d=O_({maxLineHeight:c,softWipe:u}),f=$_(r.speed??50),p=Math.max(1,Math.round(l/f*1e3)),m=CI({lines:o,edgeWidth:d,baseDuration:p,softWipe:u}),{timedLines:x}=RI({timedLines:m.timedLines,initialRevealedCharacters:i,softWipe:u,easingName:u.easing}),v=MI({contentContainer:t,timedLines:x,edgeWidth:d});if(!v){Ps(e,a,n,r);return}II({timedLines:x,lineMasks:v,easing:h,indicatorSprite:e,indicatorOffsets:s,currentTime:0})},V3=({container:t,contentContainer:e,indicatorSprite:r,element:i,animationBus:s,completionTracker:o})=>{let n=ha(i),a=$_(i.speed??50),{lines:l,lastTextObject:c,lastChunk:u,totalCharacters:h,maxLineHeight:d}=q_(e,i),f=z_(i);if(Yi(r,u,n),l.length===0||h===0||f>=h||!l.some(R=>R.bounds.width>0&&R.bounds.height>0)||!globalThis.document||!s)return Ps(r,u,c,i),!1;let p=bo(i.softWipe),m=U_(p.easing),x=O_({maxLineHeight:d,softWipe:p}),v=Math.max(1,Math.round(h/a*1e3)),y=CI({lines:l,edgeWidth:x,baseDuration:v,softWipe:p}),{timedLines:g,duration:b}=RI({timedLines:y.timedLines,initialRevealedCharacters:f,softWipe:p,easingName:p.easing}),_=o.getVersion(),S=`${i.id}-soft-wipe`,E=MI({contentContainer:e,timedLines:g,edgeWidth:x});if(!E)return Ps(r,u,c,i),!1;let P=!1,C=R=>{P||(P=!0,t[Xi]===M&&delete t[Xi],E.forEach(F=>{F.line.container.mask===F.sprite&&(F.line.container.mask=null),F.sprite.parent&&F.sprite.parent.removeChild(F.sprite),F.sprite.destroy(),F.texture.destroy(!0)}),R&&Ps(r,u,c,i))},M=()=>{s.dispatch({type:"CANCEL",id:S}),C(!1)};return B3(t,M),o.track(_),s.dispatch({type:"START",payload:{id:S,driver:"custom",duration:b,applyFrame:R=>{II({timedLines:g,lineMasks:E,easing:m,indicatorSprite:r,indicatorOffsets:n,currentTime:Math.min(b,R)})},applyTargetState:()=>{C(!1)},onComplete:()=>{o.complete(_),C(!0)},onCancel:()=>{o.complete(_),C(!1)},isValid:()=>!!t&&!t.destroyed&&!e.destroyed&&!r.destroyed}}),!0},ji=async({container:t,element:e,completionTracker:r,animationBus:i,zIndex:s,signal:o,app:n,playback:a="autoplay"})=>{if(o?.aborted||t.destroyed)return;let l=ua(e),c=a==="resume"?AI(t):null,u=z_(e);if(a==="resume"&&!c)return;let h=r?.getVersion?.(),d=A3(e),f=!1,p=()=>{!d||f||(r?.track?.(h),f=!0)},m=()=>{f&&(f=!1,r?.complete?.(h))};p(),Y_(t),t.zIndex=s;let x=new ie({label:`${e.id}-content`}),v;try{let y=R3(e,{app:n});if(v=V_(y)?await y:y,o?.aborted||t.destroyed){H_(v),m();return}if(t.addChild(x),t.addChild(v),v?.[ca]?.start(),a==="paused-initial"){l||du(t,{mode:w3(e),revealedCharacters:u,completed:!1}),l?(du(t,{mode:"none",completed:!0}),xI({contentContainer:x,indicatorSprite:v,element:e})):U3({contentContainer:x,indicatorSprite:v,element:e}),m();return}let g=r.getVersion(),b=!1;if(l)r.track(g),m(),du(t,{mode:"none",completed:!0}),xI({contentContainer:x,indicatorSprite:v,element:e}),b=!0;else if(e.revealEffect==="softWipe")if(du(t,{mode:"softWipe",revealedCharacters:u,completed:!1}),!V3({container:t,contentContainer:x,indicatorSprite:v,element:e,animationBus:i,completionTracker:r})&&!o?.aborted&&!t.destroyed)r.track(g),m(),b=!0;else{m();return}else{r.track(g),m();let _=c?.revealedCharacters??u,S=du(t,{mode:"typewriter",revealedCharacters:_,completed:!1});b=await O3({contentContainer:x,indicatorSprite:v,element:e,signal:o,startAtCharacter:_,snapshot:S})}b&&!o?.aborted&&!t.destroyed&&r.complete(g)}catch(y){if(m(),v&&!v.destroyed&&!v.parent&&H_(v),y?.name!=="AbortError"&&!o?.aborted)throw y}};var Xf=({suppressAnimations:t=!1,deferredMountOperations:e=[]}={})=>({suppressAnimations:t,deferredMountOperations:e}),BI=t=>{switch(t?.type){case"play-animated-sprite":t.animatedSprite?.destroyed||t.animatedSprite?.play();return;case"play-video":t.video?.play();return;case"start-particles":if(t.app?.debug){let e=r=>{if(t.emitter.destroyed){window.removeEventListener("snapShotKeyFrame",e);return}r?.detail?.deltaMS&&(t.emitter.update(Number(r.detail.deltaMS)/1e3),typeof t.app?.render=="function"&&t.app.render())};window.addEventListener("snapShotKeyFrame",e),t.container.customTickerHandler=e;return}t.app.ticker.add(t.tickerCallback);return;case"autoplay-text-reveal":ji({container:t.container,element:t.element,completionTracker:t.completionTracker,animationBus:t.animationBus,zIndex:t.zIndex,signal:t.signal,app:t.app,playback:"autoplay"});return;case"start-update-animations":if(!t.element||t.element.destroyed)return;Hf({animations:t.animations,animationBus:t.animationBus,completionTracker:t.completionTracker,element:t.element,targetState:t.targetState,animationBaseState:t.animationBaseState});return}},fu=(t,e)=>{if(e?.type){if(!t?.suppressAnimations){BI(e);return}t.deferredMountOperations.push(e)}},pu=t=>{t?.deferredMountOperations&&(t.deferredMountOperations.length=0)},FI=(t,e)=>fu(t,{type:"play-animated-sprite",animatedSprite:e}),kI=(t,e)=>fu(t,{type:"play-video",video:e}),UI=(t,{app:e,emitter:r,container:i,tickerCallback:s})=>fu(t,{type:"start-particles",app:e,emitter:r,container:i,tickerCallback:s}),Yf=(t,{app:e,container:r,element:i,completionTracker:s,animationBus:o,zIndex:n,signal:a})=>fu(t,{type:"autoplay-text-reveal",app:e,container:r,element:i,completionTracker:s,animationBus:o,zIndex:n,signal:a}),OI=(t,{animations:e,animationBus:r,completionTracker:i,element:s,targetState:o,animationBaseState:n})=>fu(t,{type:"start-update-animations",animations:e,animationBus:r,completionTracker:i,element:s,targetState:o,animationBaseState:n}),LI=t=>{if(!t?.deferredMountOperations?.length)return;let e=t.deferredMountOperations.splice(0);for(let r of e)BI(r)};var H3=Object.prototype.hasOwnProperty,ye=(t,e)=>{if(Object.is(t,e))return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let r=Array.isArray(t),i=Array.isArray(e);if(r!==i)return!1;if(r&&i){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!ye(t[n],e[n]))return!1;return!0}let s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;for(let n of s)if(!H3.call(e,n)||!ye(t[n],e[n]))return!1;return!0};var To=t=>{let e=new Set;if(t.id&&e.add(t.id),t.children&&Array.isArray(t.children))for(let r of t.children)for(let i of To(r))e.add(i);return e};var DI=(t=[])=>{if(t instanceof Map)return t;let e=new Map;for(let r of t)e.has(r.targetId)||e.set(r.targetId,[]),e.get(r.targetId).push(r);return e},jf=(t,e)=>t?t instanceof Map?t.get(e)??[]:t.filter(r=>r.targetId===e):[],NI=(t,e)=>jf(t,e).filter(r=>r.type==="update"),qf=(t,e)=>jf(t,e).find(r=>r.type==="transition")??null,GI=(t=[])=>t.some(e=>Object.keys(e.tween??{}).some(Es)),mu=(t=[],e,r=[])=>{for(let i of t){if(i?.id===e)return{element:i,ancestorIds:r};if(Array.isArray(i?.children)){let s=mu(i.children,e,[...r,i.id]);if(s)return s}}return null},VI=(t,e)=>ye(t?.ancestorIds??null,e?.ancestorIds??null),W3=({subtreeRoot:t,nextAnimations:e,continuingAnimationId:r})=>{if(!t)return!1;let i=To(t);for(let s of e??[])if(!(!s||s.id===r)&&i.has(s.targetId))return!0;return!1},K_=(t={})=>t.type==="update"?JSON.stringify({type:t.type,tween:t.tween,playback:t.playback??null}):JSON.stringify({type:t.type,prev:t.prev??null,next:t.next??null,mask:t.mask??null,compositor:t.compositor??null,tween:t.tween??null,playback:t.playback??null}),$3=({prevState:t,nextState:e,animation:r})=>{let i=mu(t?.elements,r.targetId),s=mu(e?.elements,r.targetId);return i!==null&&s!==null&&VI(i,s)&&ye(i.element,s.element)},z3=({prevState:t,nextState:e,animation:r})=>{let i=mu(t?.elements,r.targetId),s=mu(e?.elements,r.targetId);return i===null&&s===null?!0:i===null||s===null||!VI(i,s)||!ye(i.element,s.element)?!1:!W3({subtreeRoot:s.element,nextAnimations:e?.animations,continuingAnimationId:r.id})},HI=({prevState:t,nextState:e,activeAnimations:r})=>{let i=new Set,s=r instanceof Map?r:new Map(r?.map(o=>[o.id,o])??[]);for(let o of e?.animations??[]){if(o?.playback?.continuity!=="persistent")continue;let n=s.get(o.id);if(n&&!(n.type!==o.type||n.targetId!==o.targetId||n.signature!==K_(o))){if(o.type==="update"){$3({prevState:t,nextState:e,animation:o})&&i.add(o.id);continue}z3({prevState:t,nextState:e,animation:o})&&i.add(o.id)}}return{continuedAnimationIds:i}},X3=({animations:t,targetId:e,animationBus:r,completionTracker:i,element:s,targetState:o,onComplete:n,renderContext:a})=>{let l=NI(t,e),c=l.filter(h=>typeof r?.hasContext=="function"?r.hasContext(h.id):!1),u=l.filter(h=>!c.includes(h));if(l.length===0)return!1;if(u.length===0)return!0;if(a?.suppressAnimations){if(n)throw new Error("Deferred update animations do not support onComplete hooks.");let h=GI(u)?As(s):void 0;return dI(s,u,void 0,h),OI(a,{animations:u,animationBus:r,completionTracker:i,element:s,targetState:o,animationBaseState:h}),!0}return Hf({animations:u,animationBus:r,completionTracker:i,element:s,targetState:o,onComplete:n,animationBaseState:GI(u)?As(s):void 0}),!0},da=NI;var oe=X3;var WI=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Y3=(t,e)=>e===void 0?t:e===null||e===!1?null:WI(e)?{...WI(t)?t:{},...e}:e,Ei=(t={},e={})=>{if(!e)return{...t};let r={...t,...e};return Object.prototype.hasOwnProperty.call(e,"shadow")&&(r.shadow=Y3(t?.shadow,e.shadow)),r};var zI=Symbol("routeGraphicsTextAnchorRatios"),So=Symbol("routeGraphicsTextLayoutState"),$I=(t,e)=>typeof t!="number"||t===0?0:e/t,Z_=t=>t?.align??$e.align,j3=t=>{let e=t[So];return e?.fixedWidth&&typeof e.layoutWidth=="number"?e.layoutWidth:typeof e?.measuredWidth=="number"?e.measuredWidth:t.width},q3=(t,e)=>{let r=Ye.measureText(String(t??""),new Ge(Ut(e,{includeShadow:!1})));return{width:r.width,height:r.height}},XI=t=>t?.shadow!==void 0&&t.shadow!==null&&t.shadow!==!1,eb=(t,e)=>XI(e)?q3(t.text,e):{width:t.width,height:t.height},Q_=t=>{let e=t[So];return typeof e?.measuredWidth=="number"?e.measuredWidth:t.width},K3=t=>{let e=t[So];return typeof e?.measuredHeight=="number"?e.measuredHeight:t.height},YI=(t,e,r)=>{let i=!!e.__fixedWidth,s=r??eb(t,e.textStyle),o=s.width??e.measuredWidth??e.width,n=s.height??e.height??t.height;t[So]={fixedWidth:i,layoutWidth:i?e.width:o,measuredWidth:o,measuredHeight:n}},J_=(t,e,r)=>{let i=Math.max(0,t-e);return r==="center"?i/2:r==="right"?i:0},tb=t=>{let e=t.measuredWidth??t.width,r=J_(t.width,e,Z_(t.textStyle));return{x:t.x+r,y:t.y}},Kf=(t,e)=>{let r=eb(t,e.textStyle),i=e.__fixedWidth&&typeof e.width=="number"?e.width:r.width,s=r.height,o=typeof e.__anchorXRatio=="number"?e.__anchorXRatio:$I(i,e.originX),n=typeof e.__anchorYRatio=="number"?e.__anchorYRatio:$I(s,e.originY);t[zI]={x:o,y:n},YI(t,e,r)},Z3=t=>typeof t?.fontSize!="number"||t.fontSize===0||typeof t?.lineHeight!="number"?$e.lineHeight:t.lineHeight/t.fontSize,Q3=(t,e)=>{if(!e)return t;let r=Ei(t,e);if(e.fontSize!==void 0||e.lineHeight!==void 0){let i=e.lineHeight??Z3(t);r.lineHeight=Math.round(r.fontSize*i)}return r},jI=(t,e,r)=>{let i=t[zI],s=j3(t),o=Q3(e,r);if(!i){wi(t,o);return}let n=J_(s,Q_(t),Z_(t.style)),l=t.x-n+s*i.x,c=t.y+K3(t)*i.y;wi(t,o);let u=eb(t,o),d=t[So]?.fixedWidth===!0?s:u.width,f=J_(d,u.width,Z_(o));t.x=l-d*i.x+f,t.y=c-u.height*i.y,t[So]={...t[So]??{},layoutWidth:d,measuredWidth:u.width,measuredHeight:u.height}},Zf=(t,e)=>{YI(t,e);let r=XI(e.textStyle)?e.measuredWidth??Q_(t):Q_(t),i=tb({...e,measuredWidth:r,width:e.__fixedWidth&&typeof e.width=="number"?e.width:r});t.x=i.x,t.y=i.y};var J3=(t,e)=>{let r=Number(t);if(Number.isFinite(r))return r;let i=Number(e);return Number.isFinite(i)?i:100},je=(t,e=100)=>{let r=J3(t??e,e);return Math.min(Math.max(r,0),100)/100};var qI=t=>{if(!(!t||typeof t!="object")){if(typeof t.button=="number")return t.button;if(typeof t.data?.button=="number")return t.data.button;if(typeof t.nativeEvent?.button=="number")return t.nativeEvent.button}},Ot=t=>{let e=qI(t);return e===void 0||e===0},KI=t=>qI(t)===2;var rb=Symbol.for("routeGraphics.setInheritedHover"),ZI=Symbol.for("routeGraphics.treeInheritedHoverActive"),ib=Symbol.for("routeGraphics.setInheritedPress"),QI=Symbol.for("routeGraphics.treeInheritedPressActive"),sb=Symbol.for("routeGraphics.setInheritedRightPress"),JI=Symbol.for("routeGraphics.treeInheritedRightPressActive"),fa=t=>Array.isArray(t?.children)?t.children:[],ob=({displayObject:t,symbol:e,source:r,isActive:i})=>{let s=t?.[e];typeof s=="function"&&s(r,i)},Qf=({displayObject:t,symbol:e})=>{t&&e in t&&delete t[e]},nb=({displayObject:t,symbol:e,onStateChange:r})=>{let i=!1,s=new Set,o=({nextDirectActive:n=i,onInheritedChange:a})=>{let l=i||s.size>0;i=n,a?.(s);let c=i||s.size>0;return l!==c&&r(c),c};return t[e]=(n,a)=>o({onInheritedChange:l=>{if(n){if(a){l.add(n);return}l.delete(n)}}}),{setDirectState:n=>o({nextDirectActive:n}),isActive:()=>i||s.size>0,destroy:()=>{Qf({displayObject:t,symbol:e})}}},pa=t=>Qf({displayObject:t,symbol:rb}),Jf=t=>Qf({displayObject:t,symbol:ib}),ep=t=>Qf({displayObject:t,symbol:sb}),Cs=({displayObject:t,onHoverChange:e})=>{let r=nb({displayObject:t,symbol:rb,onStateChange:e});return{setDirectHover:r.setDirectState,isHovering:r.isActive,destroy:r.destroy}},ma=({displayObject:t,onPressChange:e})=>{let r=nb({displayObject:t,symbol:ib,onStateChange:e});return{setDirectPress:r.setDirectState,isPressed:r.isActive,destroy:r.destroy}},ga=({displayObject:t,onPressChange:e})=>{let r=nb({displayObject:t,symbol:sb,onStateChange:e});return{setDirectPress:r.setDirectState,isPressed:r.isActive,destroy:r.destroy}},ab=t=>t?.[ZI]===!0,lb=t=>t?.[QI]===!0,cb=t=>t?.[JI]===!0,xa=({root:t,isHovered:e})=>{if(!t)return;t[ZI]=e;let r=[...fa(t)];for(;r.length>0;){let i=r.pop();ob({displayObject:i,symbol:rb,source:t,isActive:e}),r.push(...fa(i))}},wo=({root:t,isPressed:e})=>{if(!t)return;t[QI]=e;let r=[...fa(t)];for(;r.length>0;){let i=r.pop();ob({displayObject:i,symbol:ib,source:t,isActive:e}),r.push(...fa(i))}},qi=({root:t,isPressed:e})=>{if(!t)return;t[JI]=e;let r=[...fa(t)];for(;r.length>0;){let i=r.pop();ob({displayObject:i,symbol:sb,source:t,isActive:e}),r.push(...fa(i))}};var eB="__rtglScrollHandled",tB=t=>t?.payload&&typeof t.payload=="object"?t.payload:{},Gr=({canvas:t,displayObject:e,width:r,height:i,scrollUpEvent:s,scrollDownEvent:o,eventHandler:n})=>{if(!s&&!o)return;let a=!1,l=Number.isFinite(r)&&Number.isFinite(i)&&r>0&&i>0;e.eventMode="static",l&&(e.hitArea=new te(0,0,Math.round(r),Math.round(i)));let c=(p,m)=>{m?.[eB]||(m&&(m[eB]=!0),p<0&&s&&n?n("scrollUp",{_event:{id:e.label},...tB(s)}):p>0&&o&&n&&n("scrollDown",{_event:{id:e.label},...tB(o)}))},u=()=>{a=!0},h=()=>{a=!1},d=p=>{p.preventDefault?.(),c(p.deltaY,p.nativeEvent)},f=p=>{a&&(p.preventDefault(),c(p.deltaY,p))};e.on("pointerover",u),e.on("pointerout",h),e.on("wheel",d),t?.addEventListener("wheel",f,{passive:!1}),e._cleanupScrollInteraction=()=>{a=!1,e.off("pointerover",u),e.off("pointerout",h),e.off("wheel",d),t?.removeEventListener("wheel",f),l&&(e.hitArea=null),delete e._cleanupScrollInteraction}},ub=({root:t})=>{t?._cleanupScrollInteraction?.(),t?.children?.forEach(e=>{ub({root:e})})};var ya=t=>{t._cleanupScrollInteraction?.(),t.removeAllListeners("pointerover"),t.removeAllListeners("pointerout"),t.removeAllListeners("pointerdown"),t.removeAllListeners("pointerupoutside"),t.removeAllListeners("pointerup"),t.removeAllListeners("rightdown"),t.removeAllListeners("rightclick"),t.removeAllListeners("rightup"),t.removeAllListeners("rightupoutside"),t.removeAllListeners("wheel"),pa(t),Jf(t),ep(t),t.cursor="auto",t.eventMode="auto"},gu=({app:t,displayObject:e,textComputedNode:r,eventHandler:i,applyStyle:s})=>{let o=r?.hover,n=r?.click,a=r?.rightClick,l=r?.scrollUp,c=r?.scrollDown,u=null,h=null,d=null,f=()=>{let p=u?.isHovering()??!1,m=h?.isPressed()??!1;(d?.isPressed()??!1)&&a?.textStyle?s(a.textStyle):m&&n?.textStyle?s(n.textStyle):p&&o?.textStyle?s(o.textStyle):s()};if(o){let{cursor:p,soundSrc:m,payload:x}=o;e.eventMode="static",u=Cs({displayObject:e,onHoverChange:f});let v=()=>{u.setDirectHover(!0),x&&i&&i("hover",{_event:{id:e.label},...x}),p&&(e.cursor=p),m&&t.audioStage.add({id:`hover-${Date.now()}`,url:m,loop:!1})},y=()=>{u.setDirectHover(!1),e.cursor="auto"};e.on("pointerover",v),e.on("pointerout",y)}if(n){let{soundSrc:p,soundVolume:m,payload:x}=n;e.eventMode="static",h=ma({displayObject:e,onPressChange:f});let v=b=>{Ot(b)&&h.setDirectPress(!0)},y=b=>{Ot(b)&&(h.setDirectPress(!1),x&&i&&i("click",{_event:{id:e.label},...x}),p&&t.audioStage.add({id:`click-${Date.now()}`,url:p,loop:!1,volume:je(m)}))},g=()=>{h.setDirectPress(!1)};e.on("pointerdown",v),e.on("pointerup",y),e.on("pointerupoutside",g)}if(a){let{soundSrc:p,payload:m}=a;e.eventMode="static",d=ga({displayObject:e,onPressChange:f});let x=()=>{d.setDirectPress(!0)},v=()=>{d.setDirectPress(!1)},y=()=>{d.setDirectPress(!1),m&&i&&i("rightClick",{_event:{id:e.label},...m}),p&&t.audioStage.add({id:`rightClick-${Date.now()}`,url:p,loop:!1})},g=()=>{d.setDirectPress(!1)};e.on("rightdown",x),e.on("rightup",v),e.on("rightclick",y),e.on("rightupoutside",g)}(l||c)&&Gr({canvas:t.canvas,displayObject:e,scrollUpEvent:l,scrollDownEvent:c,eventHandler:i})};var sB=Symbol("routeGraphicsRichTextDisplay"),eV=t=>t?.align??$e.align,tV=(t,e,r)=>{let i=Math.max(0,t-e.width),s=0;return r==="center"?s=i/2:r==="right"&&(s=i),s-e.x},rV=t=>{t.removeChildren().forEach(r=>{r.destroy({children:!0})})},rB=({text:t,style:e,x:r,y:i})=>new vr({text:t,style:new Ge(Ut(e)),x:Math.round(r),y:Math.round(i)}),iB=(t,e)=>e?Ei(t,e):t,Eo=t=>Array.isArray(t?.content),oB=t=>!!t?.[sB],nB=t=>({x:t.x,y:t.y}),xu=(t,e,r)=>{rV(t),t.label=e.id,t.x=Math.round(e.x??0),t.y=Math.round(e.y??0),t.alpha=e.alpha??1;let i=e.width??e.measuredWidth??0;for(let s=0;s<e.content.length;s++){let o=e.content[s],n=new ie({label:`${e.id}-line-${s}`});for(let l of o.lineParts??[])l.furigana&&n.addChild(rB({text:l.furigana.text,style:iB(l.furigana.textStyle,r),x:l.furigana.x,y:l.furigana.y})),n.addChild(rB({text:l.text,style:iB(l.textStyle,r),x:l.x,y:l.y}));let a=n.getLocalBounds();n.x=tV(i,a,eV(e.textStyle)),t.addChild(n)}t.hitArea=new te(0,0,Math.max(0,i),Math.max(0,e.height??0))},aB=(t,e)=>{let r=new ie({label:t.id});return r[sB]=!0,r.zIndex=e,xu(r,t),r};var hb="__routeGraphicsManagedFilters",iV=["shadow","blur","shader"],sV=t=>(t[hb]||Object.defineProperty(t,hb,{value:new Map,enumerable:!1,configurable:!0}),t[hb]),oV=t=>t.filters?Array.isArray(t.filters)?t.filters:[t.filters]:[],tp=t=>t?Array.isArray(t)?t.filter(Boolean):[t]:[],nV=(t,e,r)=>{let i=new Set;for(let a of e.values())for(let l of tp(a))i.add(l);for(let a of tp(r))i.add(a);let s=oV(t).filter(a=>!i.has(a)),n=[...iV.flatMap(a=>tp(e.get(a))),...s];t.filters=n.length>0?n:null},aV=t=>{for(let e of tp(t))e.destroy?.()},Ao=(t,e,r)=>{let i=sV(t),s=i.get(e);r?i.set(e,r):i.delete(e),nV(t,i,s),s&&s!==r&&aV(s)};var lB=/^[a-z][A-Za-z0-9]*$/;var lV=new Set(["shader"]),cB=new Set(["normal","add","multiply","screen"]),uB=new Set(["clamp","repeat"]),cV=new Set(["uTexture","uPrevTexture","uNextTexture","uNextTextureMatrix","uNextTextureClamp","uProgress","uResolution","uSampler","GlobalFilterUniforms","ShaderUniforms","VSOutput","gfu","shaderUniforms","mainVertex","mainFragment","uInputSize","uInputPixel","uInputClamp","uOutputFrame","uGlobalFrame","uOutputTexture"]),uV=t=>!!t&&typeof t=="object"&&!Array.isArray(t),hB=t=>typeof t=="number"&&Number.isFinite(t),Rs=(t,e)=>{if(!uV(t))throw new Error(`Input Error: ${e} must be an object`)},yu=(t,e)=>{if(typeof t!="string"||t.length===0)throw new Error(`Input Error: ${e} must be a non-empty string`)},dB=(t,e)=>{if(!lB.test(t))throw new Error(`Input Error: ${e} must match ${lB.source}`)},fB=t=>t.charAt(0).toUpperCase()+t.slice(1),hV=t=>`u${fB(t)}`,dV=t=>`u${fB(t)}Texture`,pB=({key:t,symbol:e,path:r,symbols:i,kind:s})=>{if(cV.has(e))throw new Error(`Input Error: ${r}.${t} generates reserved shader symbol ${e}`);if(i.has(e))throw new Error(`Input Error: ${r}.${t} generates duplicate shader symbol ${e}`);i.set(e,{key:t,kind:s})},fV=(t,e)=>{if(hB(t))return{type:"f32",value:t};if(Array.isArray(t)&&(t.length===2||t.length===4)&&t.every(hB))return{type:t.length===2?"vec2<f32>":"vec4<f32>",value:[...t]};throw new Error(`Input Error: ${e} must be a number, a length-2 number array, or a length-4 number array`)},pV=(t,e,r)=>t===void 0?[]:(Rs(t,e),Object.keys(t).sort().map(i=>{dB(i,`${e}.${i}`);let s=hV(i);return pB({key:i,symbol:s,path:e,symbols:r,kind:"uniform"}),{key:i,symbol:s,...fV(t[i],`${e}.${i}`)}})),mV=({textures:t,path:e,symbols:r,maxTextures:i})=>{if(t===void 0)return[];Rs(t,e);let s=Object.keys(t).sort();if(s.length>i)throw new Error(`Input Error: ${e} supports at most ${i} custom textures`);return s.map(o=>{dB(o,`${e}.${o}`),yu(t[o],`${e}.${o}`);let n=dV(o);return pB({key:o,symbol:n,path:e,symbols:r,kind:"texture"}),{key:o,symbol:n,src:t[o]}})},gV=(t,e)=>{if(t===void 0)return{blend:"normal",textureWrap:"clamp",mipmap:!1};Rs(t,e);let r=t.blend??"normal";if(!cB.has(r))throw new Error(`Input Error: ${e}.blend must be one of: ${Array.from(cB).join(", ")}`);let i=t.textureWrap??"clamp";if(!uB.has(i))throw new Error(`Input Error: ${e}.textureWrap must be one of: ${Array.from(uB).join(", ")}`);let s=t.mipmap??!1;if(typeof s!="boolean")throw new Error(`Input Error: ${e}.mipmap must be a boolean`);return{blend:r,textureWrap:i,mipmap:s}},xV=(t,e)=>{if(Rs(t,e),Rs(t.webgl,`${e}.webgl`),Rs(t.webgpu,`${e}.webgpu`),t.webgl.vertex!==void 0&&typeof t.webgl.vertex!="string")throw new Error(`Input Error: ${e}.webgl.vertex must be a string`);if(yu(t.webgl.fragment,`${e}.webgl.fragment`),yu(t.webgpu.source,`${e}.webgpu.source`),!t.webgpu.source.includes("mainVertex")||!t.webgpu.source.includes("mainFragment"))throw new Error(`Input Error: ${e}.webgpu.source must define mainVertex and mainFragment`);return{webgl:{...t.webgl.vertex!==void 0?{vertex:t.webgl.vertex}:{},fragment:t.webgl.fragment},webgpu:{source:t.webgpu.source}}},yV=(t,e)=>{if(t===void 0)return{grid:[1,1]};if(Rs(t,e),!Array.isArray(t.grid)||t.grid.length!==2||!t.grid.every(r=>Number.isInteger(r)&&r>=1))throw new Error(`Input Error: ${e}.grid must be [columns, rows] with positive integers`);return{grid:[t.grid[0],t.grid[1]]}},mB=({shader:t,path:e,requireId:r,textureLimit:i,allowMesh:s})=>{if(Rs(t,e),!lV.has(t.type))throw new Error(`Input Error: ${e}.type must be shader`);let o={type:"shader"};r?(yu(t.id,`${e}.id`),o.id=t.id):t.id!==void 0&&(yu(t.id,`${e}.id`),o.id=t.id);let n=new Map;if(o.uniforms=pV(t.uniforms,`${e}.uniforms`,n),o.textures=mV({textures:t.textures,path:`${e}.textures`,symbols:n,maxTextures:i}),o.pipeline=gV(t.pipeline,`${e}.pipeline`),o.source=xV(t.source,`${e}.source`),t.mesh!==void 0&&!s)throw new Error(`Input Error: ${e}.mesh is only valid for compositors`);return s&&(o.mesh=yV(t.mesh,`${e}.mesh`)),o},gB=(t,e="filters")=>{if(t===void 0)return;if(!Array.isArray(t))throw new Error(`Input Error: ${e} must be an array`);let r=new Set;return t.map((i,s)=>{let o=mB({shader:i,path:`${e}[${s}]`,requireId:!0,textureLimit:7,allowMesh:!1});if(r.has(o.id))throw new Error(`Input Error: ${e}[${s}].id must be unique within filters`);return r.add(o.id),o})},xB=(t,e="compositor")=>mB({shader:t,path:e,requireId:!1,textureLimit:6,allowMesh:!0}),yB=t=>JSON.stringify(t??null);var fb="__routeGraphicsShaderFilters",Po="__routeGraphicsShaderProgress",_B="__routeGraphicsShaderDestroyCleanup",_V=`
1264
1264
  precision mediump float;
1265
1265
 
1266
1266
  in vec2 aPosition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "route-graphics",
3
- "version": "1.23.4",
3
+ "version": "1.23.5",
4
4
  "description": "A 2D graphics rendering interface that takes JSON input and renders pixels using PixiJS",
5
5
  "main": "dist/RouteGraphics.js",
6
6
  "type": "module",