修复导出问题

This commit is contained in:
tianmo committed 2026-10-22 17:19:09 +08:00
1 parent d224939efd
commit 5d12bf895b
8 files changed
+90 -56

No files matched your search

@@ -1,37 +1,37 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-8-FN8Glu.js","assets/index-CT90mgj8.js"])))=>i.map(i=>d[i]);
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Csznclrj.js","assets/index-ChTSy5jk.js"])))=>i.map(i=>d[i]);
var oM=Object.defineProperty;var aM=(s,e,t)=>e in s?oM(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var M=(s,e,t)=>aM(s,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=t(n);fetch(n.href,r)}})();/**
* @vue/shared v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function qm(s){const e=Object.create(null);for(const t of s.split(","))e[t]=1;return t=>t in e}const Lt={},Ho=[],cn=()=>{},Py=()=>!1,Xh=s=>s.charCodeAt(0)===111&&s.charCodeAt(1)===110&&(s.charCodeAt(2)>122||s.charCodeAt(2)<97),Vh=s=>s.startsWith("onUpdate:"),pi=Object.assign,Km=(s,e)=>{const t=s.indexOf(e);t>-1&&s.splice(t,1)},lM=Object.prototype.hasOwnProperty,Rt=(s,e)=>lM.call(s,e),ze=Array.isArray,Wo=s=>Cl(s)==="[object Map]",pa=s=>Cl(s)==="[object Set]",Gp=s=>Cl(s)==="[object Date]",at=s=>typeof s=="function",Gt=s=>typeof s=="string",rs=s=>typeof s=="symbol",Pt=s=>s!==null&&typeof s=="object",ky=s=>(Pt(s)||at(s))&&at(s.then)&&at(s.catch),Fy=Object.prototype.toString,Cl=s=>Fy.call(s),cM=s=>Cl(s).slice(8,-1),Oy=s=>Cl(s)==="[object Object]",Yh=s=>Gt(s)&&s!=="NaN"&&s[0]!=="-"&&""+parseInt(s,10)===s,za=qm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Gh=s=>{const e=Object.create(null);return(t=>e[t]||(e[t]=s(t)))},hM=/-\w/g,ks=Gh(s=>s.replace(hM,e=>e.slice(1).toUpperCase())),uM=/\B([A-Z])/g,Ir=Gh(s=>s.replace(uM,"-$1").toLowerCase()),Ly=Gh(s=>s.charAt(0).toUpperCase()+s.slice(1)),Cu=Gh(s=>s?`on${Ly(s)}`:""),sn=(s,e)=>!Object.is(s,e),Ec=(s,...e)=>{for(let t=0;t<s.length;t++)s[t](...e)},By=(s,e,t,i=!1)=>{Object.defineProperty(s,e,{configurable:!0,enumerable:!1,writable:i,value:t})},jh=s=>{const e=parseFloat(s);return isNaN(e)?s:e},dM=s=>{const e=Gt(s)?Number(s):NaN;return isNaN(e)?s:e};let jp;const Hh=()=>jp||(jp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ot(s){if(ze(s)){const e={};for(let t=0;t<s.length;t++){const i=s[t],n=Gt(i)?gM(i):Ot(i);if(n)for(const r in n)e[r]=n[r]}return e}else if(Gt(s)||Pt(s))return s}const fM=/;(?![^(]*\))/g,mM=/:([^]+)/,pM=/\/\*[^]*?\*\//g;function gM(s){const e={};return s.replace(pM,"").split(fM).forEach(t=>{if(t){const i=t.split(mM);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Ce(s){let e="";if(Gt(s))e=s;else if(ze(s))for(let t=0;t<s.length;t++){const i=Ce(s[t]);i&&(e+=i+" ")}else if(Pt(s))for(const t in s)s[t]&&(e+=t+" ");return e.trim()}const vM="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",yM=qm(vM);function Ny(s){return!!s||s===""}function xM(s,e){if(s.length!==e.length)return!1;let t=!0;for(let i=0;t&&i<s.length;i++)t=ga(s[i],e[i]);return t}function ga(s,e){if(s===e)return!0;let t=Gp(s),i=Gp(e);if(t||i)return t&&i?s.getTime()===e.getTime():!1;if(t=rs(s),i=rs(e),t||i)return s===e;if(t=ze(s),i=ze(e),t||i)return t&&i?xM(s,e):!1;if(t=Pt(s),i=Pt(e),t||i){if(!t||!i)return!1;const n=Object.keys(s).length,r=Object.keys(e).length;if(n!==r)return!1;for(const o in s){const a=s.hasOwnProperty(o),c=e.hasOwnProperty(o);if(a&&!c||!a&&c||!ga(s[o],e[o]))return!1}}return String(s)===String(e)}function Zm(s,e){return s.findIndex(t=>ga(t,e))}const Dy=s=>!!(s&&s.__v_isRef===!0),ve=s=>Gt(s)?s:s==null?"":ze(s)||Pt(s)&&(s.toString===Fy||!at(s.toString))?Dy(s)?ve(s.value):JSON.stringify(s,Uy,2):String(s),Uy=(s,e)=>Dy(e)?Uy(s,e.value):Wo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n],r)=>(t[Eu(i,r)+" =>"]=n,t),{})}:pa(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>Eu(t))}:rs(e)?Eu(e):Pt(e)&&!ze(e)&&!Oy(e)?String(e):e,Eu=(s,e="")=>{var t;return rs(s)?`Symbol(${(t=s.description)!=null?t:e})`:s};/**
**/function qm(s){const e=Object.create(null);for(const t of s.split(","))e[t]=1;return t=>t in e}const Lt={},Ho=[],cn=()=>{},Py=()=>!1,Xh=s=>s.charCodeAt(0)===111&&s.charCodeAt(1)===110&&(s.charCodeAt(2)>122||s.charCodeAt(2)<97),Vh=s=>s.startsWith("onUpdate:"),pi=Object.assign,Km=(s,e)=>{const t=s.indexOf(e);t>-1&&s.splice(t,1)},lM=Object.prototype.hasOwnProperty,Rt=(s,e)=>lM.call(s,e),ze=Array.isArray,Wo=s=>Cl(s)==="[object Map]",ga=s=>Cl(s)==="[object Set]",Gp=s=>Cl(s)==="[object Date]",at=s=>typeof s=="function",Gt=s=>typeof s=="string",rs=s=>typeof s=="symbol",Pt=s=>s!==null&&typeof s=="object",ky=s=>(Pt(s)||at(s))&&at(s.then)&&at(s.catch),Fy=Object.prototype.toString,Cl=s=>Fy.call(s),cM=s=>Cl(s).slice(8,-1),Oy=s=>Cl(s)==="[object Object]",Yh=s=>Gt(s)&&s!=="NaN"&&s[0]!=="-"&&""+parseInt(s,10)===s,qa=qm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Gh=s=>{const e=Object.create(null);return(t=>e[t]||(e[t]=s(t)))},hM=/-\w/g,ks=Gh(s=>s.replace(hM,e=>e.slice(1).toUpperCase())),uM=/\B([A-Z])/g,Ir=Gh(s=>s.replace(uM,"-$1").toLowerCase()),Ly=Gh(s=>s.charAt(0).toUpperCase()+s.slice(1)),Cu=Gh(s=>s?`on${Ly(s)}`:""),sn=(s,e)=>!Object.is(s,e),Ec=(s,...e)=>{for(let t=0;t<s.length;t++)s[t](...e)},By=(s,e,t,i=!1)=>{Object.defineProperty(s,e,{configurable:!0,enumerable:!1,writable:i,value:t})},jh=s=>{const e=parseFloat(s);return isNaN(e)?s:e},dM=s=>{const e=Gt(s)?Number(s):NaN;return isNaN(e)?s:e};let jp;const Hh=()=>jp||(jp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ot(s){if(ze(s)){const e={};for(let t=0;t<s.length;t++){const i=s[t],n=Gt(i)?gM(i):Ot(i);if(n)for(const r in n)e[r]=n[r]}return e}else if(Gt(s)||Pt(s))return s}const fM=/;(?![^(]*\))/g,mM=/:([^]+)/,pM=/\/\*[^]*?\*\//g;function gM(s){const e={};return s.replace(pM,"").split(fM).forEach(t=>{if(t){const i=t.split(mM);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Ce(s){let e="";if(Gt(s))e=s;else if(ze(s))for(let t=0;t<s.length;t++){const i=Ce(s[t]);i&&(e+=i+" ")}else if(Pt(s))for(const t in s)s[t]&&(e+=t+" ");return e.trim()}const vM="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",yM=qm(vM);function Ny(s){return!!s||s===""}function xM(s,e){if(s.length!==e.length)return!1;let t=!0;for(let i=0;t&&i<s.length;i++)t=va(s[i],e[i]);return t}function va(s,e){if(s===e)return!0;let t=Gp(s),i=Gp(e);if(t||i)return t&&i?s.getTime()===e.getTime():!1;if(t=rs(s),i=rs(e),t||i)return s===e;if(t=ze(s),i=ze(e),t||i)return t&&i?xM(s,e):!1;if(t=Pt(s),i=Pt(e),t||i){if(!t||!i)return!1;const n=Object.keys(s).length,r=Object.keys(e).length;if(n!==r)return!1;for(const o in s){const a=s.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!va(s[o],e[o]))return!1}}return String(s)===String(e)}function Zm(s,e){return s.findIndex(t=>va(t,e))}const Dy=s=>!!(s&&s.__v_isRef===!0),ve=s=>Gt(s)?s:s==null?"":ze(s)||Pt(s)&&(s.toString===Fy||!at(s.toString))?Dy(s)?ve(s.value):JSON.stringify(s,Uy,2):String(s),Uy=(s,e)=>Dy(e)?Uy(s,e.value):Wo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n],r)=>(t[Eu(i,r)+" =>"]=n,t),{})}:ga(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>Eu(t))}:rs(e)?Eu(e):Pt(e)&&!ze(e)&&!Oy(e)?String(e):e,Eu=(s,e="")=>{var t;return rs(s)?`Symbol(${(t=s.description)!=null?t:e})`:s};/**
* @vue/reactivity v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let di;class $y{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&di&&(di.active?(this.parent=di,this.index=(di.scopes||(di.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const i=this.scopes.slice();for(e=0,t=i.length;e<t;e++)i[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){const n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}const i=this.effects.slice();for(e=0,t=i.length;e<t;e++)i[e].resume()}}run(e){if(this._active){const t=di;try{return di=this,e()}finally{di=t}}}on(){++this._on===1&&(this.prevScope=di,di=this)}off(){if(this._on>0&&--this._on===0){if(di===this)di=this.prevScope;else{let e=di;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(this.effects.length=0,t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const n=this.scopes.slice();for(t=0,i=n.length;t<i;t++)n[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}}function Xy(s){return new $y(s)}function Vy(){return di}function bM(s,e=!1){di&&di.cleanups.push(s)}let Ut;const Au=new WeakSet;class Yy{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,di&&(di.active?di.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Au.has(this)&&(Au.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||jy(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Hp(this),Hy(this);const e=Ut,t=Fs;Ut=this,Fs=!0;try{return this.fn()}finally{Wy(this),Ut=e,Fs=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ep(e);this.deps=this.depsTail=void 0,Hp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Au.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Sf(this)&&this.run()}get dirty(){return Sf(this)}}let Gy=0,qa,Ka;function jy(s,e=!1){if(s.flags|=8,e){s.next=Ka,Ka=s;return}s.next=qa,qa=s}function Jm(){Gy++}function Qm(){if(--Gy>0)return;if(Ka){let e=Ka;for(Ka=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let s;for(;qa;){let e=qa;for(qa=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){s||(s=i)}e=t}}if(s)throw s}function Hy(s){for(let e=s.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Wy(s){let e,t=s.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),ep(i),wM(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}s.deps=e,s.depsTail=t}function Sf(s){for(let e=s.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(zy(e.dep.computed)||e.dep.version!==e.version))return!0;return!!s._dirty}function zy(s){if(s.flags&4&&!(s.flags&16)||(s.flags&=-17,s.globalVersion===ll)||(s.globalVersion=ll,!s.isSSR&&s.flags&128&&(!s.deps&&!s._dirty||!Sf(s))))return;s.flags|=2;const e=s.dep,t=Ut,i=Fs;Ut=s,Fs=!0;try{Hy(s);const n=s.fn(s._value);(e.version===0||sn(n,s._value))&&(s.flags|=128,s._value=n,e.version++)}catch(n){throw e.version++,n}finally{Ut=t,Fs=i,Wy(s),s.flags&=-3}}function ep(s,e=!1){const{dep:t,prevSub:i,nextSub:n}=s;if(i&&(i.nextSub=n,s.prevSub=void 0),n&&(n.prevSub=i,s.nextSub=void 0),t.subs===s&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)ep(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function wM(s){const{prevDep:e,nextDep:t}=s;e&&(e.nextDep=t,s.prevDep=void 0),t&&(t.prevDep=e,s.nextDep=void 0)}let Fs=!0;const qy=[];function Yn(){qy.push(Fs),Fs=!1}function Gn(){const s=qy.pop();Fs=s===void 0?!0:s}function Hp(s){const{cleanup:e}=s;if(s.cleanup=void 0,e){const t=Ut;Ut=void 0;try{e()}finally{Ut=t}}}let ll=0;class SM{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class tp{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Ut||!Fs||Ut===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ut)t=this.activeLink=new SM(Ut,this),Ut.deps?(t.prevDep=Ut.depsTail,Ut.depsTail.nextDep=t,Ut.depsTail=t):Ut.deps=Ut.depsTail=t,Ky(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=Ut.depsTailLine truncated
**/let di;class $y{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&di&&(di.active?(this.parent=di,this.index=(di.scopes||(di.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const i=this.scopes.slice();for(e=0,t=i.length;e<t;e++)i[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){const n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}const i=this.effects.slice();for(e=0,t=i.length;e<t;e++)i[e].resume()}}run(e){if(this._active){const t=di;try{return di=this,e()}finally{di=t}}}on(){++this._on===1&&(this.prevScope=di,di=this)}off(){if(this._on>0&&--this._on===0){if(di===this)di=this.prevScope;else{let e=di;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(this.effects.length=0,t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const n=this.scopes.slice();for(t=0,i=n.length;t<i;t++)n[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}}function Xy(s){return new $y(s)}function Vy(){return di}function bM(s,e=!1){di&&di.cleanups.push(s)}let Ut;const Au=new WeakSet;class Yy{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,di&&(di.active?di.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Au.has(this)&&(Au.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||jy(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Hp(this),Hy(this);const e=Ut,t=Fs;Ut=this,Fs=!0;try{return this.fn()}finally{Wy(this),Ut=e,Fs=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ep(e);this.deps=this.depsTail=void 0,Hp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Au.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Sf(this)&&this.run()}get dirty(){return Sf(this)}}let Gy=0,Ka,Za;function jy(s,e=!1){if(s.flags|=8,e){s.next=Za,Za=s;return}s.next=Ka,Ka=s}function Jm(){Gy++}function Qm(){if(--Gy>0)return;if(Za){let e=Za;for(Za=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let s;for(;Ka;){let e=Ka;for(Ka=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){s||(s=i)}e=t}}if(s)throw s}function Hy(s){for(let e=s.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Wy(s){let e,t=s.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),ep(i),wM(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}s.deps=e,s.depsTail=t}function Sf(s){for(let e=s.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(zy(e.dep.computed)||e.dep.version!==e.version))return!0;return!!s._dirty}function zy(s){if(s.flags&4&&!(s.flags&16)||(s.flags&=-17,s.globalVersion===cl)||(s.globalVersion=cl,!s.isSSR&&s.flags&128&&(!s.deps&&!s._dirty||!Sf(s))))return;s.flags|=2;const e=s.dep,t=Ut,i=Fs;Ut=s,Fs=!0;try{Hy(s);const n=s.fn(s._value);(e.version===0||sn(n,s._value))&&(s.flags|=128,s._value=n,e.version++)}catch(n){throw e.version++,n}finally{Ut=t,Fs=i,Wy(s),s.flags&=-3}}function ep(s,e=!1){const{dep:t,prevSub:i,nextSub:n}=s;if(i&&(i.nextSub=n,s.prevSub=void 0),n&&(n.prevSub=i,s.nextSub=void 0),t.subs===s&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)ep(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function wM(s){const{prevDep:e,nextDep:t}=s;e&&(e.nextDep=t,s.prevDep=void 0),t&&(t.prevDep=e,s.nextDep=void 0)}let Fs=!0;const qy=[];function Yn(){qy.push(Fs),Fs=!1}function Gn(){const s=qy.pop();Fs=s===void 0?!0:s}function Hp(s){const{cleanup:e}=s;if(s.cleanup=void 0,e){const t=Ut;Ut=void 0;try{e()}finally{Ut=t}}}let cl=0;class SM{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class tp{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Ut||!Fs||Ut===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ut)t=this.activeLink=new SM(Ut,this),Ut.deps?(t.prevDep=Ut.depsTail,Ut.depsTail.nextDep=t,Ut.depsTail=t):Ut.deps=Ut.depsTail=t,Ky(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=Ut.depsTailLine truncated
* @vue/runtime-core v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function El(s,e,t,i){try{return i?s(...i):s()}catch(n){qh(n,e,t)}}function gs(s,e,t,i){if(at(s)){const n=El(s,e,t,i);return n&&ky(n)&&n.catch(r=>{qh(r,e,t)}),n}if(ze(s)){const n=[];for(let r=0;r<s.length;r++)n.push(gs(s[r],e,t,i));return n}}function qh(s,e,t,i=!0){const n=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||Lt;if(e){let a=e.parent;const c=e.proxy,l=`https://vuejs.org/error-reference/#runtime-${t}`;for(;a;){const h=a.ec;if(h){for(let u=0;u<h.length;u++)if(h[u](s,c,l)===!1)return}a=a.parent}if(r){Yn(),El(r,null,10,[s,c,l]),Gn();return}}KM(s,t,n,i,o)}function KM(s,e,t,i=!0,n=!1){if(n)throw s;console.error(s)}const Ui=[];let Ws=-1;const zo=[];let lr=null,Oo=0;const nx=Promise.resolve();let Hc=null;function Kh(s){const e=Hc||nx;return s?e.then(this?s.bind(this):s):e}function ZM(s){let e=Ws+1,t=Ui.length;for(;e<t;){const i=e+t>>>1,n=Ui[i],r=hl(n);r<s||r===s&&n.flags&2?e=i+1:t=i}return e}function np(s){if(!(s.flags&1)){const e=hl(s),t=Ui[Ui.length-1];!t||!(s.flags&2)&&e>=hl(t)?Ui.push(s):Ui.splice(ZM(e),0,s),s.flags|=1,rx()}}function rx(){Hc||(Hc=nx.then(ax))}function JM(s){if(!ze(s))lr&&s.id===-1?lr.splice(Oo+1,0,s):s.flags&1||(zo.push(s),s.flags|=1);else for(let e=0;e<s.length;e++)zo.push(s[e]);rx()}function zp(s,e,t=Ws+1){for(;t<Ui.length;t++){const i=Ui[t];if(i&&i.flags&2){if(s&&i.id!==s.uid)continue;Ui.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function ox(s){if(zo.length){const e=[...new Set(zo)].sort((t,i)=>hl(t)-hl(i));if(zo.length=0,lr){for(let t=0;t<e.length;t++)lr.push(e[t]);return}for(lr=e,Oo=0;Oo<lr.length;Oo++){const t=lr[Oo];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}lr=null,Oo=0}}const hl=s=>s.id==null?s.flags&2?-1:1/0:s.id;function ax(s){try{for(Ws=0;Ws<Ui.length;Ws++){const e=Ui[Ws];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),El(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Ws<Ui.length;Ws++){const e=Ui[Ws];e&&(e.flags&=-2)}Ws=-1,Ui.length=0,ox(),Hc=null,(Ui.length||zo.length)&&ax()}}let Oi=null,lx=null;function Wc(s){const e=Oi;return Oi=s,lx=s&&s.type.__scopeId||null,e}function Zh(s,e=Oi,t){if(!e||s._n)return s;const i=(...n)=>{i._d&&Zc(-1);const r=Wc(e),o=$n.length;let a;try{a=s(...n)}finally{for(let c=$n.length;c>o;c--)cp();Wc(r),i._d&&Zc(1)}return a};return i._n=!0,i._c=!0,i._d=!0,i}function ce(s,e){if(Oi===null)return s;const t=su(Oi),i=s.dirs||(s.dirs=[]);for(let n=0;n<e.length;n++){let[r,o,a,c=Lt]=e[n];r&&(at(r)&&(r={mounted:r,updated:r}),r.deep&&Rn(o),i.push({dir:r,instance:t,value:o,oldValue:void 0,arg:a,modifiers:c}))}return s}function Or(s,e,t,i){const n=s.dirs,r=e&&e.dirs;for(let o=0;o<n.length;o++){const a=n[o];r&&(a.oldValue=r[o].value);let c=a.dir[i];c&&(Yn(),gs(c,t,8,[s.el,a,s,e]),Gn())}}function cx(s,e){if($i){let t=$i.provides;const i=$i.parent&&$i.parent.provides;i===t&&(t=$i.provides=Object.create(i)),t[s]=e}}function qo(s,e,t=!1){const i=hp();if(i||no){let n=no?no._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(n&&s in n)return n[s];if(arguments.length>1)return t&&at(e)?e.call(i&&i.proxy):e}}function QM(){return!!(hp()||no)}const eT=Symbol.for("v-scx"),tT=()=>qo(eT);function Lo(s,e){return rp(s,null,e)}function ai(s,e,t){return rp(s,e,t)}function rp(s,e,t=Lt){const{immediate:i,deep:n,flush:r,once:o}=t,a=pi({},t),c=e&&i||!e&&r!=="post";let l;if(pl){if(r==="sync"){const f=tT();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){const f=()=>{};return f.stop=cn,f.resume=cn,f.pause=cn,f}}const h=$i;a.call=(f,m,p)=>gs(f,h,m,p);let u=!1;r==="post"?a.scheduler=f=>{Bi(f,h&&h.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(f,m)=>{m?f():np(f)}),a.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,h&&(f.id=h.uid,f.i=h))};const d=qM(s,e,a);return pl&&(l?l.push(d):c&&d()),d}function iT(s,e,t){const i=this.proxy,n=Gt(s)?s.includes(".")?hx(i,s):()=>i[s]:s.bind(i,i);let r;at(e)?r=e:(r=e.handler,t=e);const o=Il(this),a=rp(n,r.bind(i),t);return o(),a}function hx(s,e){const t=e.split(".");return()=>{let i=s;for(let n=0;n<t.length&&i;n++)i=i[t[n]];return i}}const sr=new WeakMap,ux=Symbol("_vte"),Jh=s=>s.__isTeleport,Wr=s=>s&&(s.disabled||s.disabled===""),sT=s=>s&&(s.defer||s.defer===""),qp=s=>typeof SVGElement<"u"&&s instanceof SVGElement,Kp=s=>typeof MathMLElement=="function"&&s instanceof MathMLElement,Cf=(s,e)=>{const t=s&&s.to;return Gt(t)?e?e(t):null:t},nT={name:"Teleport",__isTeleport:!0,process(s,e,t,i,n,r,o,a,c,l){const{mc:h,pc:u,pbc:d,o:{insert:f,querySelector:m,createText:p,createComment:g,parentNode:x}}=l,v=Wr(e.props);let{dynamicChildren:y}=e;const S=(b,_,A)=>{b.shapeFlag&16&&h(b.children,_,A,n,r,o,a,c)},C=(b=e)=>{const _=Wr(b.props),A=b.target=Cf(b.props,m),P=Ef(A,b,p,f);A&&(o!=="svg"&&qp(A)?o="svg":o!=="mathml"&&Kp(A)&&(o="mathml"),n&&n.isCE&&(n.ce._teleportTargets||(n.ce._teleportTargets=new Set)).add(A),_||(S(b,A,P),Na(b,!1)))},w=b=>{const _=()=>{if(sr.get(b)===_){if(sr.delete(b),Wr(b.props)){const A=x(b.el)||t;S Line truncated
**/function El(s,e,t,i){try{return i?s(...i):s()}catch(n){qh(n,e,t)}}function gs(s,e,t,i){if(at(s)){const n=El(s,e,t,i);return n&&ky(n)&&n.catch(r=>{qh(r,e,t)}),n}if(ze(s)){const n=[];for(let r=0;r<s.length;r++)n.push(gs(s[r],e,t,i));return n}}function qh(s,e,t,i=!0){const n=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||Lt;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${t}`;for(;a;){const h=a.ec;if(h){for(let u=0;u<h.length;u++)if(h[u](s,l,c)===!1)return}a=a.parent}if(r){Yn(),El(r,null,10,[s,l,c]),Gn();return}}KM(s,t,n,i,o)}function KM(s,e,t,i=!0,n=!1){if(n)throw s;console.error(s)}const Ui=[];let Ws=-1;const zo=[];let lr=null,Oo=0;const nx=Promise.resolve();let Hc=null;function Kh(s){const e=Hc||nx;return s?e.then(this?s.bind(this):s):e}function ZM(s){let e=Ws+1,t=Ui.length;for(;e<t;){const i=e+t>>>1,n=Ui[i],r=ul(n);r<s||r===s&&n.flags&2?e=i+1:t=i}return e}function np(s){if(!(s.flags&1)){const e=ul(s),t=Ui[Ui.length-1];!t||!(s.flags&2)&&e>=ul(t)?Ui.push(s):Ui.splice(ZM(e),0,s),s.flags|=1,rx()}}function rx(){Hc||(Hc=nx.then(ax))}function JM(s){if(!ze(s))lr&&s.id===-1?lr.splice(Oo+1,0,s):s.flags&1||(zo.push(s),s.flags|=1);else for(let e=0;e<s.length;e++)zo.push(s[e]);rx()}function zp(s,e,t=Ws+1){for(;t<Ui.length;t++){const i=Ui[t];if(i&&i.flags&2){if(s&&i.id!==s.uid)continue;Ui.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function ox(s){if(zo.length){const e=[...new Set(zo)].sort((t,i)=>ul(t)-ul(i));if(zo.length=0,lr){for(let t=0;t<e.length;t++)lr.push(e[t]);return}for(lr=e,Oo=0;Oo<lr.length;Oo++){const t=lr[Oo];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}lr=null,Oo=0}}const ul=s=>s.id==null?s.flags&2?-1:1/0:s.id;function ax(s){try{for(Ws=0;Ws<Ui.length;Ws++){const e=Ui[Ws];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),El(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Ws<Ui.length;Ws++){const e=Ui[Ws];e&&(e.flags&=-2)}Ws=-1,Ui.length=0,ox(),Hc=null,(Ui.length||zo.length)&&ax()}}let Oi=null,lx=null;function Wc(s){const e=Oi;return Oi=s,lx=s&&s.type.__scopeId||null,e}function Zh(s,e=Oi,t){if(!e||s._n)return s;const i=(...n)=>{i._d&&Zc(-1);const r=Wc(e),o=$n.length;let a;try{a=s(...n)}finally{for(let l=$n.length;l>o;l--)cp();Wc(r),i._d&&Zc(1)}return a};return i._n=!0,i._c=!0,i._d=!0,i}function ce(s,e){if(Oi===null)return s;const t=su(Oi),i=s.dirs||(s.dirs=[]);for(let n=0;n<e.length;n++){let[r,o,a,l=Lt]=e[n];r&&(at(r)&&(r={mounted:r,updated:r}),r.deep&&Rn(o),i.push({dir:r,instance:t,value:o,oldValue:void 0,arg:a,modifiers:l}))}return s}function Or(s,e,t,i){const n=s.dirs,r=e&&e.dirs;for(let o=0;o<n.length;o++){const a=n[o];r&&(a.oldValue=r[o].value);let l=a.dir[i];l&&(Yn(),gs(l,t,8,[s.el,a,s,e]),Gn())}}function cx(s,e){if($i){let t=$i.provides;const i=$i.parent&&$i.parent.provides;i===t&&(t=$i.provides=Object.create(i)),t[s]=e}}function qo(s,e,t=!1){const i=hp();if(i||no){let n=no?no._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(n&&s in n)return n[s];if(arguments.length>1)return t&&at(e)?e.call(i&&i.proxy):e}}function QM(){return!!(hp()||no)}const eT=Symbol.for("v-scx"),tT=()=>qo(eT);function Lo(s,e){return rp(s,null,e)}function ai(s,e,t){return rp(s,e,t)}function rp(s,e,t=Lt){const{immediate:i,deep:n,flush:r,once:o}=t,a=pi({},t),l=e&&i||!e&&r!=="post";let c;if(gl){if(r==="sync"){const f=tT();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=cn,f.resume=cn,f.pause=cn,f}}const h=$i;a.call=(f,m,p)=>gs(f,h,m,p);let u=!1;r==="post"?a.scheduler=f=>{Bi(f,h&&h.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(f,m)=>{m?f():np(f)}),a.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,h&&(f.id=h.uid,f.i=h))};const d=qM(s,e,a);return gl&&(c?c.push(d):l&&d()),d}function iT(s,e,t){const i=this.proxy,n=Gt(s)?s.includes(".")?hx(i,s):()=>i[s]:s.bind(i,i);let r;at(e)?r=e:(r=e.handler,t=e);const o=Il(this),a=rp(n,r.bind(i),t);return o(),a}function hx(s,e){const t=e.split(".");return()=>{let i=s;for(let n=0;n<t.length&&i;n++)i=i[t[n]];return i}}const sr=new WeakMap,ux=Symbol("_vte"),Jh=s=>s.__isTeleport,Wr=s=>s&&(s.disabled||s.disabled===""),sT=s=>s&&(s.defer||s.defer===""),qp=s=>typeof SVGElement<"u"&&s instanceof SVGElement,Kp=s=>typeof MathMLElement=="function"&&s instanceof MathMLElement,Cf=(s,e)=>{const t=s&&s.to;return Gt(t)?e?e(t):null:t},nT={name:"Teleport",__isTeleport:!0,process(s,e,t,i,n,r,o,a,l,c){const{mc:h,pc:u,pbc:d,o:{insert:f,querySelector:m,createText:p,createComment:g,parentNode:x}}=c,v=Wr(e.props);let{dynamicChildren:y}=e;const w=(b,C,A)=>{b.shapeFlag&16&&h(b.children,C,A,n,r,o,a,l)},_=(b=e)=>{const C=Wr(b.props),A=b.target=Cf(b.props,m),P=Ef(A,b,p,f);A&&(o!=="svg"&&qp(A)?o="svg":o!=="mathml"&&Kp(A)&&(o="mathml"),n&&n.isCE&&(n.ce._teleportTargets||(n.ce._teleportTargets=new Set)).add(A),C||(w(b,A,P),Da(b,!1)))},S=b=>{const C=()=>{if(sr.get(b)===C){if(sr.delete(b),Wr(b.props)){const A=x(b.el)||t;w Line truncated
* @vue/runtime-dom v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ff;const cg=typeof window<"u"&&window.trustedTypes;if(cg)try{Ff=cg.createPolicy("vue",{createHTML:s=>s})}catch{}const Xx=Ff?s=>Ff.createHTML(s):s=>s,o2="http://www.w3.org/2000/svg",a2="http://www.w3.org/1998/Math/MathML",Mn=typeof document<"u"?document:null,hg=Mn&&Mn.createElement("template"),l2={insert:(s,e,t)=>{e.insertBefore(s,t||null)},remove:s=>{const e=s.parentNode;e&&e.removeChild(s)},createElement:(s,e,t,i)=>{const n=e==="svg"?Mn.createElementNS(o2,s):e==="mathml"?Mn.createElementNS(a2,s):t?Mn.createElement(s,{is:t}):Mn.createElement(s);return s==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:s=>Mn.createTextNode(s),createComment:s=>Mn.createComment(s),setText:(s,e)=>{s.nodeValue=e},setElementText:(s,e)=>{s.textContent=e},parentNode:s=>s.parentNode,nextSibling:s=>s.nextSibling,querySelector:s=>Mn.querySelector(s),setScopeId(s,e){s.setAttribute(e,"")},insertStaticContent(s,e,t,i,n,r){const o=t?t.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===r||!(n=n.nextSibling)););else{hg.innerHTML=Xx(i==="svg"?`<svg>${s}</svg>`:i==="mathml"?`<math>${s}</math>`:s);const a=hg.content;if(i==="svg"||i==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},Qn="transition",Ia="animation",gl=Symbol("_vtc"),Vx={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},c2=pi({},fx,Vx),h2=s=>(s.displayName="Transition",s.props=c2,s),u2=h2((s,{slots:e})=>n2(lT,d2(s),e)),Br=(s,e=[])=>{ze(s)?s.forEach(t=>t(...e)):s&&s(...e)},ug=s=>s?ze(s)?s.some(e=>e.length>1):s.length>1:!1;function d2(s){const e={};for(const R in s)R in Vx||(e[R]=s[R]);if(s.css===!1)return e;const{name:t="v",type:i,duration:n,enterFromClass:r=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:c=r,appearActiveClass:l=o,appearToClass:h=a,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:d=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=s,m=f2(n),p=m&&m[0],g=m&&m[1],{onBeforeEnter:x,onEnter:v,onEnterCancelled:y,onLeave:S,onLeaveCancelled:C,onBeforeAppear:w=x,onAppear:b=v,onAppearCancelled:_=y}=e,A=(R,O,U,Y)=>{R._enterCancelled=Y,Nr(R,O?h:a),Nr(R,O?l:o),U&&U()},P=(R,O)=>{R._isLeaving=!1,Nr(R,u),Nr(R,f),Nr(R,d),O&&O()},E=R=>(O,U)=>{const Y=R?b:v,$=()=>A(O,R,U);Br(Y,[O,$]),dg(()=>{Nr(O,R?c:r),xn(O,R?h:a),ug(Y)||fg(O,i,p,$)})};return pi(e,{onBeforeEnter(R){Br(x,[R]),xn(R,r),xn(R,o)},onBeforeAppear(R){Br(w,[R]),xn(R,c),xn(R,l)},onEnter:E(!1),onAppear:E(!0),onLeave(R,O){R._isLeaving=!0;const U=()=>P(R,O);xn(R,u),R._enterCancelled?(xn(R,d),gg(R)):(gg(R),xn(R,d)),dg(()=>{R._isLeaving&&(Nr(R,u),xn(R,f),ug(S)||fg(R,i,g,U))}),Br(S,[R,U])},onEnterCancelled(R){A(R,!1,void 0,!0),Br(y,[R])},onAppearCancelled(R){A(R,!0,void 0,!0),Br(_,[R])},onLeaveCancelled(R){P(R),Br(C,[R])}})}function f2(s){if(s==null)return null;if(Pt(s))return[Ou(s.enter),Ou(s.leave)];{const e=Ou(s);return[e,e]}}function Ou(s){return dM(s)}function xn(s,e){e.split(/\s+/).forEach(t=>t&&s.classList.add(t)),(s[gl]||(s[gl]=new Set)).add(e)}function Nr(s,e){e.split(/\s+/).forEach(i=>i&&s.classList.remove(i));const t=s[gl];t&&(t.delete(e),t.size||(s[gl]=void 0))}function dg(s){requestAnimationFrame(()=>{requestAnimationFrame(s)})}let m2=0;function fg(s,e,t,i){const n=s._endId=++m2,r=()=>{n===s._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:o,timeout:a,propCount:c}=p2(s,e);if(!o)return i();const l=o+"end";let h=0;const u=()=>{s.removeEventListener(l,d),r()},d=f=>{f.target===s&&++h>=c&&u()};setTimeout(()=>{h<c&&u()},a+1),s.addEventListener(l,d)}function p2(s,e){const t=window.getComputedStyle(s),i=m=>(t[m]||"").split(", "),n=i(`${Qn}Delay`),r=i(`${Qn}Duration`),o=mg(n,r),a=i(`${Ia}Delay`),c=i(`${Ia}Duration`),l=mg(a,c);let h=null,u=0,d=0;e===Qn?o>0&&(h=Qn,u=o,d=r.length):e===Ia?l>0&&(h=Ia,u=l,d=c.length):(u=Math.max(o,l),h=u>0?o>l?Qn:Ia:null,d=h?h===Qn?r.length:c.length:0);const f=h===Qn&&/\b(?:transform|all)(?:,|$)/.test(i(`${Qn}Property`).toString());return{type:h,timeout:u,propCount:d,hasTransform:f}}function mg(s,e){for(;s.length<e.length;)s=s.concat(s);return Math.max(...e.map((t,i)=>pg(t)+pg(s[i])))}function pg(s){return s==="auto"?0:Number(s.slice(0,-1).replace(",","."))*1e3}function gg(s){return(s?s.ownerDocument:document).body.offsetHeight}function g2(s,e,t){const i=s[gl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?s.removeAttribute("class"):t?s.setAttribute("class",e):s.className=e}const eh=Symbol("_vod"),Yx=Symbol("_vsh"),Si={name:"show",beforeMount(s,{value:e},{transition:t}){s[eh]=s.style.display==="none"?"":s.style.display,t&&e?t.beforeEnter(s):Ra(s,e)},mounted(s,{value:e},{tra Line truncated
`))),s[rn]=la(n);const r=i||n.props&&n.props.type==="number";fr(s,e?"change":"input",o=>{o.target.composing||s[rn](Nu(s.value,t,r))}),(t||r)&&fr(s,"change",()=>{s.value=Nu(s.value,t,r)}),e||(fr(s,"compositionstart",F2),fr(s,"compositionend",Tg),fr(s,"change",Tg))},mounted(s,{value:e,modifiers:{trim:t,number:i}}){const n=e??"",r=s[Hl];delete s[Hl],r!==void 0&&(s.type==="text"||s.type==="textarea")&&s.value!==r?s[rn](Nu(s.value,t,i)):s.value=n},beforeUpdate(s,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:r}},o){if(s[rn]=la(o),s.composing)return;const a=(r||s.type==="number")&&!/^0\d/.test(s.value)?jh(s.value):s.value,c=e??"";if(a===c)return;const l=s.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===s&&s.type!=="range"&&(i&&e===t||n&&s.value.trim()===c)||(s.value=c)}},wt={deep:!0,created(s,e,t){s[rn]=la(t),fr(s,"change",()=>{const i=s._modelValue,n=vl(s),r=s.checked,o=s[rn];if(ze(i)){const a=Zm(i,n),c=a!==-1;if(r&&!c)o(i.concat(n));else if(!r&&c){const l=[...i];l.splice(a,1),o(l)}}else if(pa(i)){const a=new Set(i);r?a.add(n):a.delete(n),o(a)}else o(Gx(s,r))})},mounted:_g,beforeUpdate(s,e,t){s[rn]=la(t),_g(s,e,t)}};function _g(s,{value:e,oldValue:t},i){s._modelValue=e;let n;if(ze(e))n=Zm(e,i.props.value)>-1;else if(pa(e))n=e.has(i.props.value);else{if(e===t)return;n=ga(e,Gx(s,!0))}s.checked!==n&&(s.checked=n)}const bt={deep:!0,created(s,{value:e,modifiers:{number:t}},i){s._modelValue=e,fr(s,"change",()=>{const n=Array.prototype.filter.call(s.options,r=>r.selected).map(r=>t?jh(vl(r)):vl(r));s[rn](s.multiple?pa(s._modelValue)?new Set(n):n:n[0]),s._assigning=!0,Kh(()=>{s._assigning=!1})}),s[rn]=la(i)},mounted(s,{value:e}){Cg(s,e)},beforeUpdate(s,{value:e},t){s._modelValue=e,s[rn]=la(t)},updated(s,{value:e}){s._assigning||Cg(s,e)}};function Cg(s,e){const t=s.multiple,i=ze(e);if(!(t&&!i&&!pa(e))){for(let n=0,r=s.options.length;n<r;n++){const o=s.options[n],a=vl(o);if(t)if(i){const c=typeof a;c==="string"||c==="number"?o.selected=e.some(l=>String(l)===String(a)):o.selected=Zm(e,a)>-1}else o.selected=e.has(a);else if(ga(vl(o),e)){s.selectedIndex!==n&&(s.selectedIndex=n);return}}!t&&s.selectedIndex!==-1&&(s.selectedIndex=-1)}}function vl(s){return"_value"in s?s._value:s.value}function Gx(s,e){const t=e?"_trueValue":"_falseValue";return t in s?s[t]:e}const O2=["ctrl","shift","alt","meta"],L2={stop:s=>s.stopPropagation(),prevent:s=>s.preventDefault(),self:s=>s.target!==s.currentTarget,ctrl:s=>!s.ctrlKey,shift:s=>!s.shiftKey,alt:s=>!s.altKey,meta:s=>!s.metaKey,left:s=>"button"in s&&s.button!==0,middle:s=>"button"in s&&s.button!==1,right:s=>"button"in s&&s.button!==2,exact:(s,e)=>O2.some(t=>s[`${t}Key`]&&!e.includes(t))},qe=(s,e)=>{if(!s)return s;const t=s._withMods||(s._withMods={}),i=e.join(".");return t[i]||(t[i]=((n,...r)=>{for(let o=0;o<e.length;o++){const a=L2[e[o]];if(a&&a(n,e))return}return s(n,...r)}))},B2={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Mr=(s,e)=>{const t=s._withKeys||(s._withKeys={}),i=e.join(".");return t[i]||(t[i]=(n=>{if(!("key"in n))return;const r=Ir(n.key);if(e.some(o=>o===r||B2[o]===r))return s(n)}))},N2=pi({patchProp:R2},l2);let Eg;function D2(){return Eg||(Eg=VT(N2))}const U2=((...s)=>{const e=D2().createApp(...s),{mount:t}=e;return e.mount=i=>{const n=X2(i);if(!n)return;const r=e._component;!at(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=t(n,!1,$2(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e});function $2(s){if(s instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&s instanceof MathMLElement)return"mathml"}function X2(s){return Gt(s)?document.querySelector(s):s}/*!
**/let Ff;const cg=typeof window<"u"&&window.trustedTypes;if(cg)try{Ff=cg.createPolicy("vue",{createHTML:s=>s})}catch{}const Xx=Ff?s=>Ff.createHTML(s):s=>s,o2="http://www.w3.org/2000/svg",a2="http://www.w3.org/1998/Math/MathML",Mn=typeof document<"u"?document:null,hg=Mn&&Mn.createElement("template"),l2={insert:(s,e,t)=>{e.insertBefore(s,t||null)},remove:s=>{const e=s.parentNode;e&&e.removeChild(s)},createElement:(s,e,t,i)=>{const n=e==="svg"?Mn.createElementNS(o2,s):e==="mathml"?Mn.createElementNS(a2,s):t?Mn.createElement(s,{is:t}):Mn.createElement(s);return s==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:s=>Mn.createTextNode(s),createComment:s=>Mn.createComment(s),setText:(s,e)=>{s.nodeValue=e},setElementText:(s,e)=>{s.textContent=e},parentNode:s=>s.parentNode,nextSibling:s=>s.nextSibling,querySelector:s=>Mn.querySelector(s),setScopeId(s,e){s.setAttribute(e,"")},insertStaticContent(s,e,t,i,n,r){const o=t?t.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===r||!(n=n.nextSibling)););else{hg.innerHTML=Xx(i==="svg"?`<svg>${s}</svg>`:i==="mathml"?`<math>${s}</math>`:s);const a=hg.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},Qn="transition",Ra="animation",vl=Symbol("_vtc"),Vx={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},c2=pi({},fx,Vx),h2=s=>(s.displayName="Transition",s.props=c2,s),u2=h2((s,{slots:e})=>n2(lT,d2(s),e)),Br=(s,e=[])=>{ze(s)?s.forEach(t=>t(...e)):s&&s(...e)},ug=s=>s?ze(s)?s.some(e=>e.length>1):s.length>1:!1;function d2(s){const e={};for(const R in s)R in Vx||(e[R]=s[R]);if(s.css===!1)return e;const{name:t="v",type:i,duration:n,enterFromClass:r=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:h=a,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:d=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=s,m=f2(n),p=m&&m[0],g=m&&m[1],{onBeforeEnter:x,onEnter:v,onEnterCancelled:y,onLeave:w,onLeaveCancelled:_,onBeforeAppear:S=x,onAppear:b=v,onAppearCancelled:C=y}=e,A=(R,O,U,G)=>{R._enterCancelled=G,Nr(R,O?h:a),Nr(R,O?c:o),U&&U()},P=(R,O)=>{R._isLeaving=!1,Nr(R,u),Nr(R,f),Nr(R,d),O&&O()},E=R=>(O,U)=>{const G=R?b:v,$=()=>A(O,R,U);Br(G,[O,$]),dg(()=>{Nr(O,R?l:r),xn(O,R?h:a),ug(G)||fg(O,i,p,$)})};return pi(e,{onBeforeEnter(R){Br(x,[R]),xn(R,r),xn(R,o)},onBeforeAppear(R){Br(S,[R]),xn(R,l),xn(R,c)},onEnter:E(!1),onAppear:E(!0),onLeave(R,O){R._isLeaving=!0;const U=()=>P(R,O);xn(R,u),R._enterCancelled?(xn(R,d),gg(R)):(gg(R),xn(R,d)),dg(()=>{R._isLeaving&&(Nr(R,u),xn(R,f),ug(w)||fg(R,i,g,U))}),Br(w,[R,U])},onEnterCancelled(R){A(R,!1,void 0,!0),Br(y,[R])},onAppearCancelled(R){A(R,!0,void 0,!0),Br(C,[R])},onLeaveCancelled(R){P(R),Br(_,[R])}})}function f2(s){if(s==null)return null;if(Pt(s))return[Ou(s.enter),Ou(s.leave)];{const e=Ou(s);return[e,e]}}function Ou(s){return dM(s)}function xn(s,e){e.split(/\s+/).forEach(t=>t&&s.classList.add(t)),(s[vl]||(s[vl]=new Set)).add(e)}function Nr(s,e){e.split(/\s+/).forEach(i=>i&&s.classList.remove(i));const t=s[vl];t&&(t.delete(e),t.size||(s[vl]=void 0))}function dg(s){requestAnimationFrame(()=>{requestAnimationFrame(s)})}let m2=0;function fg(s,e,t,i){const n=s._endId=++m2,r=()=>{n===s._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:o,timeout:a,propCount:l}=p2(s,e);if(!o)return i();const c=o+"end";let h=0;const u=()=>{s.removeEventListener(c,d),r()},d=f=>{f.target===s&&++h>=l&&u()};setTimeout(()=>{h<l&&u()},a+1),s.addEventListener(c,d)}function p2(s,e){const t=window.getComputedStyle(s),i=m=>(t[m]||"").split(", "),n=i(`${Qn}Delay`),r=i(`${Qn}Duration`),o=mg(n,r),a=i(`${Ra}Delay`),l=i(`${Ra}Duration`),c=mg(a,l);let h=null,u=0,d=0;e===Qn?o>0&&(h=Qn,u=o,d=r.length):e===Ra?c>0&&(h=Ra,u=c,d=l.length):(u=Math.max(o,c),h=u>0?o>c?Qn:Ra:null,d=h?h===Qn?r.length:l.length:0);const f=h===Qn&&/\b(?:transform|all)(?:,|$)/.test(i(`${Qn}Property`).toString());return{type:h,timeout:u,propCount:d,hasTransform:f}}function mg(s,e){for(;s.length<e.length;)s=s.concat(s);return Math.max(...e.map((t,i)=>pg(t)+pg(s[i])))}function pg(s){return s==="auto"?0:Number(s.slice(0,-1).replace(",","."))*1e3}function gg(s){return(s?s.ownerDocument:document).body.offsetHeight}function g2(s,e,t){const i=s[vl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?s.removeAttribute("class"):t?s.setAttribute("class",e):s.className=e}const eh=Symbol("_vod"),Yx=Symbol("_vsh"),Si={name:"show",beforeMount(s,{value:e},{transition:t}){s[eh]=s.style.display==="none"?"":s.style.display,t&&e?t.beforeEnter(s):Pa(s,e)},mounted(s,{value:e},{tra Line truncated
`))),s[rn]=la(n);const r=i||n.props&&n.props.type==="number";fr(s,e?"change":"input",o=>{o.target.composing||s[rn](Nu(s.value,t,r))}),(t||r)&&fr(s,"change",()=>{s.value=Nu(s.value,t,r)}),e||(fr(s,"compositionstart",F2),fr(s,"compositionend",Tg),fr(s,"change",Tg))},mounted(s,{value:e,modifiers:{trim:t,number:i}}){const n=e??"",r=s[Hl];delete s[Hl],r!==void 0&&(s.type==="text"||s.type==="textarea")&&s.value!==r?s[rn](Nu(s.value,t,i)):s.value=n},beforeUpdate(s,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:r}},o){if(s[rn]=la(o),s.composing)return;const a=(r||s.type==="number")&&!/^0\d/.test(s.value)?jh(s.value):s.value,l=e??"";if(a===l)return;const c=s.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===s&&s.type!=="range"&&(i&&e===t||n&&s.value.trim()===l)||(s.value=l)}},wt={deep:!0,created(s,e,t){s[rn]=la(t),fr(s,"change",()=>{const i=s._modelValue,n=yl(s),r=s.checked,o=s[rn];if(ze(i)){const a=Zm(i,n),l=a!==-1;if(r&&!l)o(i.concat(n));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(ga(i)){const a=new Set(i);r?a.add(n):a.delete(n),o(a)}else o(Gx(s,r))})},mounted:_g,beforeUpdate(s,e,t){s[rn]=la(t),_g(s,e,t)}};function _g(s,{value:e,oldValue:t},i){s._modelValue=e;let n;if(ze(e))n=Zm(e,i.props.value)>-1;else if(ga(e))n=e.has(i.props.value);else{if(e===t)return;n=va(e,Gx(s,!0))}s.checked!==n&&(s.checked=n)}const bt={deep:!0,created(s,{value:e,modifiers:{number:t}},i){s._modelValue=e,fr(s,"change",()=>{const n=Array.prototype.filter.call(s.options,r=>r.selected).map(r=>t?jh(yl(r)):yl(r));s[rn](s.multiple?ga(s._modelValue)?new Set(n):n:n[0]),s._assigning=!0,Kh(()=>{s._assigning=!1})}),s[rn]=la(i)},mounted(s,{value:e}){Cg(s,e)},beforeUpdate(s,{value:e},t){s._modelValue=e,s[rn]=la(t)},updated(s,{value:e}){s._assigning||Cg(s,e)}};function Cg(s,e){const t=s.multiple,i=ze(e);if(!(t&&!i&&!ga(e))){for(let n=0,r=s.options.length;n<r;n++){const o=s.options[n],a=yl(o);if(t)if(i){const l=typeof a;l==="string"||l==="number"?o.selected=e.some(c=>String(c)===String(a)):o.selected=Zm(e,a)>-1}else o.selected=e.has(a);else if(va(yl(o),e)){s.selectedIndex!==n&&(s.selectedIndex=n);return}}!t&&s.selectedIndex!==-1&&(s.selectedIndex=-1)}}function yl(s){return"_value"in s?s._value:s.value}function Gx(s,e){const t=e?"_trueValue":"_falseValue";return t in s?s[t]:e}const O2=["ctrl","shift","alt","meta"],L2={stop:s=>s.stopPropagation(),prevent:s=>s.preventDefault(),self:s=>s.target!==s.currentTarget,ctrl:s=>!s.ctrlKey,shift:s=>!s.shiftKey,alt:s=>!s.altKey,meta:s=>!s.metaKey,left:s=>"button"in s&&s.button!==0,middle:s=>"button"in s&&s.button!==1,right:s=>"button"in s&&s.button!==2,exact:(s,e)=>O2.some(t=>s[`${t}Key`]&&!e.includes(t))},qe=(s,e)=>{if(!s)return s;const t=s._withMods||(s._withMods={}),i=e.join(".");return t[i]||(t[i]=((n,...r)=>{for(let o=0;o<e.length;o++){const a=L2[e[o]];if(a&&a(n,e))return}return s(n,...r)}))},B2={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Mr=(s,e)=>{const t=s._withKeys||(s._withKeys={}),i=e.join(".");return t[i]||(t[i]=(n=>{if(!("key"in n))return;const r=Ir(n.key);if(e.some(o=>o===r||B2[o]===r))return s(n)}))},N2=pi({patchProp:R2},l2);let Eg;function D2(){return Eg||(Eg=VT(N2))}const U2=((...s)=>{const e=D2().createApp(...s),{mount:t}=e;return e.mount=i=>{const n=X2(i);if(!n)return;const r=e._component;!at(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=t(n,!1,$2(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e});function $2(s){if(s instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&s instanceof MathMLElement)return"mathml"}function X2(s){return Gt(s)?document.querySelector(s):s}/*!
* pinia v4.0.3
* (c) 2026 Eduardo San Martin Morote
* @license MIT
*/let jx;const nu=s=>jx=s,Hx=Symbol();function Ag(s){return s&&typeof s=="object"&&Object.prototype.toString.call(s)==="[object Object]"&&typeof s.toJSON!="function"}function V2(){const s=Xy(!0),e=s.run(()=>Fe({}));let t=[],i=[];const n=vr({install(r){nu(n),n._a=r,r.provide(Hx,n),r.config.globalProperties.$pinia=n,i.forEach(o=>t.push(o)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:s,_s:new Map,state:e});return n}const Of=()=>{};function Ig(s,e,t,i=Of){s.add(e);const n=()=>{s.delete(e)&&i()};return!t&&Vy()&&bM(n),n}function _o(s,...e){s.forEach(t=>{t(...e)})}const Y2=s=>s(),Rg=Symbol(),Du=Symbol();function Lf(s,e){s instanceof Map&&e instanceof Map?e.forEach((t,i)=>s.set(i,t)):s instanceof Set&&e instanceof Set&&e.forEach(s.add,s);for(const t in e){if(!Object.hasOwn(e,t))continue;const i=e[t],n=s[t];Ag(n)&&Ag(i)&&Object.hasOwn(s,t)&&!jt(i)&&!Un(i)?s[t]=Lf(n,i):s[t]=i}return s}const G2=Symbol();function j2(s){return!s||typeof s!="object"||!Object.hasOwn(s,G2)}const{assign:nr}=Object;function H2(s){return!!(jt(s)&&s.effect)}function W2(s,e,t,i){const{state:n,actions:r,getters:o}=e,a=t.state.value[s];let c;function l(){a||(t.state.value[s]=n?n():{});const h=YM(t.state.value[s]);return nr(h,r,Object.keys(o||{}).reduce((u,d)=>(u[d]=vr(Le(()=>{nu(t);const f=t._s.get(s);return o[d].call(f,f)})),u),{}))}return c=Wx(s,l,e,t,i,!0),c}function Wx(s,e,t={},i,n,r){let o;const a=nr({actions:{}},t),c={deep:!0};let l,h,u=new Set,d=new Set,f;const m=i.state.value[s];!r&&!m&&(i.state.value[s]={});let p;function g(b){let _;l=h=!1,typeof b=="function"?(b(i.state.value[s]),_={type:"patch function",storeId:s,events:f}):(Lf(i.state.value[s],b),_={type:"patch object",payload:b,storeId:s,events:f});const A=p=Symbol();Kh().then(()=>{p===A&&(l=!0)}),h=!0,_o(u,_,i.state.value[s])}const x=r?function(){const{state:_}=t,A=_?_():{};this.$patch(P=>{nr(P,A)})}:Of;function v(){o.stop(),u.clear(),d.clear(),i._s.delete(s)}const y=(b,_="")=>{if(Rg in b)return b[Du]=_,b;const A=function(){nu(i);const P=Array.from(arguments),E=new Set,R=new Set;function O($){E.add($)}function U($){R.add($)}_o(d,{args:P,name:A[Du],store:C,after:O,onError:U});let Y;try{Y=b.apply(this&&this.$id===s?this:C,P)}catch($){throw _o(R,$),$}return Y instanceof Promise?Y.then($=>(_o(E,$),$)).catch($=>(_o(R,$),Promise.reject($))):(_o(E,Y),Y)};return A[Rg]=!0,A[Du]=_,A},S={_p:i,$id:s,$onAction:Ig.bind(null,d),$patch:g,$reset:x,$subscribe(b,_={}){if(u.has(b))return Of;const A=Ig(u,b,_.detached,()=>P()),P=o.run(()=>ai(()=>i.state.value[s],E=>{(_.flush==="sync"?h:l)&&b({storeId:s,type:"direct",events:f},E)},nr({},c,_)));return A},$dispose:v},C=po(S);i._s.set(s,C);const w=(i._a&&i._a.runWithContext||Y2)(()=>i._e.run(()=>(o=Xy()).run(()=>e({action:y}))));for(const b in w){const _=w[b];jt(_)&&!H2(_)||Un(_)?r||(m&&j2(_)&&(jt(_)?_.value=m[b]:((_ instanceof Set||_ instanceof Map)&&_.clear(),Lf(_,m[b]))),i.state.value[s][b]=_):typeof _=="function"&&(w[b]=y(_,b),a.actions[b]=_)}return nr(C,w),nr(Tt(C),w),Object.defineProperty(C,"$state",{get:()=>i.state.value[s],set:b=>{g(_=>{nr(_,b)})}}),i._p.forEach(b=>{const _=o.run(()=>b({store:C,app:i._a,pinia:i,options:a}));nr(C,_)}),m&&r&&t.hydrate&&t.hydrate(C.$state,m),l=!0,h=!0,C}/*! #__NO_SIDE_EFFECTS__ */function z2(s,e,t){let i;const n=typeof e=="function";i=n?t:e;function r(o,a){const c=QM();return o=o||(c?qo(Hx,null):null),o&&nu(o),o=jx,o._s.has(s)||(n?Wx(s,e,i,o):W2(s,i,o)),o._s.get(s)}return r.$id=s,r}var go=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(go||{}),zx=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(zx||{}),Bf=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Bf||{}),We=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(We||{}),on=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(on||{}),Te=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTELine truncated
`)>=0)return!1;return!0}function Ee(re,ae){var et;if(re.indent===" ")et=" ";else if(typeof re.indent=="number"&&re.indent>0)et=_.call(Array(re.indent+1)," ");else return null;return{base:et,prev:_.call(Array(ae+1),et)}}function Qt(re,ae){if(re.length===0)return"";var et=`
`+ae.prev+ae.base;return et+_.call(re,","+et)+`
`+ae.prev}function ut(re,ae){var et=oe(re),It=[];if(et){It.length=re.length;for(var kt=0;kt<re.length;kt++)It[kt]=j(re,kt)?ae(re[kt],re):""}var ot=typeof R=="function"?R(re):[],Gi;if(U){Gi={};for(var xs=0;xs<ot.length;xs++)Gi["$"+ot[xs]]=ot[xs]}for(var Nt in re)j(re,Nt)&&(et&&String(Number(Nt))===Nt&&Nt<re.length||U&&Gi["$"+Nt]instanceof Symbol||(w.call(/[^\w$]/,Nt)?It.push(ae(Nt,re)+": "+ae(re[Nt],re)):It.push(Nt+": "+ae(re[Nt],re))));if(typeof R=="function")for(var vi=0;vi<ot.length;vi++)$.call(re,ot[vi])&&It.push("["+ae(ot[vi])+"]: "+ae(re[ot[vi]],re));return It}return Yu}var Gu,zg;function c_(){if(zg)return Gu;zg=1;var s=ru(),e=va(),t=function(a,c,l){for(var h=a,u;(u=h.next)!=null;h=u)if(u.key===c)return h.next=u.next,l||(u.next=a.next,a.next=u),u},i=function(a,c){if(a){var l=t(a,c);return l&&l.value}},n=function(a,c,l){var h=t(a,c);h?h.value=l:a.next={key:c,next:a.next,value:l}},r=function(a,c){return a?!!t(a,c):!1},o=function(a,c){if(a)return t(a,c,!0)};return Gu=function(){var c,l={assert:function(h){if(!l.has(h))throw new e("Side channel does not contain "+s(h))},delete:function(h){var u=o(c,h);return u&&c&&!c.next&&(c=void 0),!!u},get:function(h){return i(c,h)},has:function(h){return r(c,h)},set:function(h,u){c||(c={next:void 0}),n(c,h,u)}};return l},Gu}var ju,qg;function Kx(){return qg||(qg=1,ju=Object),ju}var Hu,Kg;function h_(){return Kg||(Kg=1,Hu=Error),Hu}var Wu,Zg;function u_(){return Zg||(Zg=1,Wu=EvalError),Wu}var zu,Jg;function d_(){return Jg||(Jg=1,zu=RangeError),zu}var qu,Qg;function f_(){return Qg||(Qg=1,qu=ReferenceError),qu}var Ku,e0;function m_(){return e0||(e0=1,Ku=SyntaxError),Ku}var Zu,t0;function p_(){return t0||(t0=1,Zu=URIError),Zu}var Ju,i0;function g_(){return i0||(i0=1,Ju=Math.abs),Ju}var Qu,s0;function v_(){return s0||(s0=1,Qu=Math.floor),Qu}var ed,n0;function y_(){return n0||(n0=1,ed=Math.max),ed}var td,r0;function x_(){return r0||(r0=1,td=Math.min),td}var id,o0;function b_(){return o0||(o0=1,id=Math.pow),id}var sd,a0;function w_(){return a0||(a0=1,sd=Math.round),sd}var nd,l0;function S_(){return l0||(l0=1,nd=Number.isNaN||function(e){return e!==e}),nd}var rd,c0;function M_(){if(c0)return rd;c0=1;var s=S_();return rd=function(t){return s(t)||t===0?t:t<0?-1:1},rd}var od,h0;function T_(){return h0||(h0=1,od=Object.getOwnPropertyDescriptor),od}var ad,u0;function Zx(){if(u0)return ad;u0=1;var s=T_();if(s)try{s([],"length")}catch{s=null}return ad=s,ad}var ld,d0;function Jx(){if(d0)return ld;d0=1;var s=Object.defineProperty||!1;if(s)try{s({},"a",{value:1})}catch{s=!1}return ld=s,ld}var cd,f0;function __(){return f0||(f0=1,cd=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(var r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==n||a.enumerable!==!0)return!1}return!0}),cd}var hd,m0;function C_(){if(m0)return hd;m0=1;var s=typeof Symbol<"u"&&Symbol,e=__();return hd=function(){return typeof s!="function"||typeof Symbol!="function"||typeof s("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},hd}var ud,p0;function Qx(){return p0||(p0=1,ud=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ud}var dd,g0;function eb(){if(g0)return dd;g0=1;var s=Kx();return dd=s.getPrototypeOf||null,dd}var fd,v0;function E_(){if(v0)return fd;v0=1;var s="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",n=function(c,l){for(var h=[],u=0;u<c.length;u+=1)h[u]=c[u];for(var d=0;d<l.length;d+=1)h[d+c.length]=l[d];return h},r=function(c,l){for(var h=[],u=l,d=0;u<c.length;u+=1,d+=1)h[d]=c[u];return h},o=function(a,c){for(var l="",h=0;h<a.length;h+=1)l+=a[h],h+1<a.length&&(l+=c);return l};return fd=function(c){var l=this;if(typeof l!="function"||e.apply(l)!==i)throw new TypeError(s+l);for(var h=r(arguments,1),u,d=function(){if(this instanceof u){var x=l.apply(this,n(h,arguments));return Object(x)===x?x:this}return l.apply(c,n(h,arguments))},f=t(0,l.length-h.length),m=[],p=0;p<f;p++)m[p]="$"+p;if(u=Function("binder","return function ("+o(m,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u},fd}var md,y0;function ou(){if(y0)return md;y0=1;var s=E_();return md=Function.prototype.bind||s,md}var pd,x0;function dp(){return x0||(x0=1,pd=Function.prototype.call),pd}var gd,b0;function tb(){return b0||(b0=1,gd=Function.pro Line truncated
`," "],o=["{","}","|","\\","^","`"].concat(r),a=["'"].concat(o),c=["%","/","?",";","#"].concat(a),l=["/","?","#"],h=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=B_();function x(C,w,b){if(C&&typeof C=="object"&&C instanceof e)return C;var _=new e;return _.parse(C,w,b),_}e.prototype.parse=function(C,w,b){if(typeof C!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof C);var _=C.indexOf("?"),A=_!==-1&&_<C.indexOf("#")?"?":"#",P=C.split(A),E=/\\/g;P[0]=P[0].replace(E,"/"),C=P.join(A);var R=C;if(R=R.trim(),!b&&C.split("#").length===1){var O=n.exec(R);if(O)return this.path=R,this.href=R,this.pathname=O[1],O[2]?(this.search=O[2],w?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):w&&(this.search="",this.query={}),this}var U=t.exec(R);if(U){U=U[0];var Y=U.toLowerCase();this.protocol=Y,R=R.substr(U.length)}if(b||U||R.match(/^\/\/[^@/]+@[^@/]+/)){var $=R.substr(0,2)==="//";$&&!(U&&m[U])&&(R=R.substr(2),this.slashes=!0)}if(!m[U]&&($||U&&!p[U])){for(var X=-1,D=0;D<l.length;D++){var F=R.indexOf(l[D]);F!==-1&&(X===-1||F<X)&&(X=F)}var N,k;X===-1?k=R.lastIndexOf("@"):k=R.lastIndexOf("@",X),k!==-1&&(N=R.slice(0,k),R=R.slice(k+1),this.auth=decodeURIComponent(N)),X=-1;for(var D=0;D<c.length;D++){var F=R.indexOf(c[D]);F!==-1&&(X===-1||F<X)&&(X=F)}X===-1&&(X=R.length),this.host=R.slice(0,X),R=R.slice(X),this.parseHost(),this.hostname=this.hostname||"";var V=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!V)for(var G=this.hostname.split(/\./),D=0,W=G.length;D<W;D++){var Z=G[D];if(Z&&!Z.match(u)){for(var ne="",oe=0,de=Z.length;oe<de;oe++)Z.charCodeAt(oe)>127?ne+="x":ne+=Z[oe];if(!ne.match(u)){var pe=G.slice(0,D),he=G.slice(D+1),me=Z.match(d);me&&(pe.push(me[1]),he.unshift(me[2])),he.length&&(R="/"+he.join(".")+R),this.hostname=pe.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),V||(this.hostname=s.toASCII(this.hostname));var H=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+H,this.href+=this.host,V&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),R[0]!=="/"&&(R="/"+R))}if(!f[Y])for(var D=0,W=a.length;D<W;D++){var K=a[D];if(R.indexOf(K)!==-1){var B=encodeURIComponent(K);B===K&&(B=escape(K)),R=R.split(K).join(B)}}var L=R.indexOf("#");L!==-1&&(this.hash=R.substr(L),R=R.slice(0,L));var j=R.indexOf("?");if(j!==-1?(this.search=R.substr(j),this.query=R.substr(j+1),w&&(this.query=g.parse(this.query)),R=R.slice(0,j)):w&&(this.search="",this.query={}),R&&(this.pathname=R),p[Y]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",ie=this.search||"";this.path=H+ie}return this.href=this.format(),this};function v(C){return typeof C=="string"&&(C=x(C)),C instanceof e?C.format():e.prototype.format.call(C)}e.prototype.format=function(){var C=this.auth||"";C&&(C=encodeURIComponent(C),C=C.replace(/%3A/i,":"),C+="@");var w=this.protocol||"",b=this.pathname||"",_=this.hash||"",A=!1,P="";this.host?A=C+this.host:this.hostname&&(A=C+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(A+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(P=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var E=this.search||P&&"?"+P||"";return w&&w.substr(-1)!==":"&&(w+=":"),this.slashes||(!w||p[w])&&A!==!1?(A="//"+(A||""),b&&b.charAt(0)!=="/"&&(b="/"+b)):A||(A=""),_&&_.charAt(0)!=="#"&&(_="#"+_),E&&E.charAt(0)!=="?"&&(E="?"+E),b=b.replace(/[?#]/g,function(R){return encodeURIComponent(R)}),E=E.replace("#","%23"),w+A+b+E+_};function y(C,w){return x(C,!1,!0).resolve(w)}e.prototype.resolve=function(C){return this.resolveObject(x(C,!1,!0)).format()};function S(C,w){return C?x(C,!1,!0).resolveObject(w):w}return e.prototype.resolveObject=function(C){if(typeof C=="string"){var w=new e;w.parse(C,!1,!0),C=w}for(var b=new e,_=Object.keys(this),A=0;A<_.length;A++){var P=_[A];b[P]=this[P]}if(b.hash=C.hash,C.href==="")return b.href=b.format(),b;if(C.slashes&&!C.protocol){for(var E=Object.keys(C),R=0;R<E.length;R++){var O=E[R];O!=="protocol"&&(b[O]=C[O])}return p[b.protocol]&&b.hostname&&!b.pathname&&(b.pathname="/",b.path=b.pathname),b.href=b.format(),b}if(C.protocol&&C.protocol!==b.protocol){if(!p[C.protocol]){for(var U=Object.keys(C),Y=0;Y<U.length;Y++){var $=U[Y];b[$]=C[$]}return b.href=b.format(),b}if(b.protocol=C.protocol,!C.host&&!m[C.protocol]){for(var W=(C.pathname||"").split("/");W.length&&!(C.host=W.shift()););C.host||(C.host=""),C.hostname||(C.hostname=""),W[0]!==""&&W.unshift(""),W.length<2&&W.unshift(""),b.pathname=W.join("/")}else b.pathname=C.pathname;if(b.search=C.search,b.query=C.query,b.host=C.host||"",b.auth=C.auth,b.hostname=C.hostname||C.host,b.port=C.port,b.pathname||b.search){var X=b.pat Line truncated
*/let jx;const nu=s=>jx=s,Hx=Symbol();function Ag(s){return s&&typeof s=="object"&&Object.prototype.toString.call(s)==="[object Object]"&&typeof s.toJSON!="function"}function V2(){const s=Xy(!0),e=s.run(()=>Fe({}));let t=[],i=[];const n=vr({install(r){nu(n),n._a=r,r.provide(Hx,n),r.config.globalProperties.$pinia=n,i.forEach(o=>t.push(o)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:s,_s:new Map,state:e});return n}const Of=()=>{};function Ig(s,e,t,i=Of){s.add(e);const n=()=>{s.delete(e)&&i()};return!t&&Vy()&&bM(n),n}function _o(s,...e){s.forEach(t=>{t(...e)})}const Y2=s=>s(),Rg=Symbol(),Du=Symbol();function Lf(s,e){s instanceof Map&&e instanceof Map?e.forEach((t,i)=>s.set(i,t)):s instanceof Set&&e instanceof Set&&e.forEach(s.add,s);for(const t in e){if(!Object.hasOwn(e,t))continue;const i=e[t],n=s[t];Ag(n)&&Ag(i)&&Object.hasOwn(s,t)&&!jt(i)&&!Un(i)?s[t]=Lf(n,i):s[t]=i}return s}const G2=Symbol();function j2(s){return!s||typeof s!="object"||!Object.hasOwn(s,G2)}const{assign:nr}=Object;function H2(s){return!!(jt(s)&&s.effect)}function W2(s,e,t,i){const{state:n,actions:r,getters:o}=e,a=t.state.value[s];let l;function c(){a||(t.state.value[s]=n?n():{});const h=YM(t.state.value[s]);return nr(h,r,Object.keys(o||{}).reduce((u,d)=>(u[d]=vr(Le(()=>{nu(t);const f=t._s.get(s);return o[d].call(f,f)})),u),{}))}return l=Wx(s,c,e,t,i,!0),l}function Wx(s,e,t={},i,n,r){let o;const a=nr({actions:{}},t),l={deep:!0};let c,h,u=new Set,d=new Set,f;const m=i.state.value[s];!r&&!m&&(i.state.value[s]={});let p;function g(b){let C;c=h=!1,typeof b=="function"?(b(i.state.value[s]),C={type:"patch function",storeId:s,events:f}):(Lf(i.state.value[s],b),C={type:"patch object",payload:b,storeId:s,events:f});const A=p=Symbol();Kh().then(()=>{p===A&&(c=!0)}),h=!0,_o(u,C,i.state.value[s])}const x=r?function(){const{state:C}=t,A=C?C():{};this.$patch(P=>{nr(P,A)})}:Of;function v(){o.stop(),u.clear(),d.clear(),i._s.delete(s)}const y=(b,C="")=>{if(Rg in b)return b[Du]=C,b;const A=function(){nu(i);const P=Array.from(arguments),E=new Set,R=new Set;function O($){E.add($)}function U($){R.add($)}_o(d,{args:P,name:A[Du],store:_,after:O,onError:U});let G;try{G=b.apply(this&&this.$id===s?this:_,P)}catch($){throw _o(R,$),$}return G instanceof Promise?G.then($=>(_o(E,$),$)).catch($=>(_o(R,$),Promise.reject($))):(_o(E,G),G)};return A[Rg]=!0,A[Du]=C,A},w={_p:i,$id:s,$onAction:Ig.bind(null,d),$patch:g,$reset:x,$subscribe(b,C={}){if(u.has(b))return Of;const A=Ig(u,b,C.detached,()=>P()),P=o.run(()=>ai(()=>i.state.value[s],E=>{(C.flush==="sync"?h:c)&&b({storeId:s,type:"direct",events:f},E)},nr({},l,C)));return A},$dispose:v},_=po(w);i._s.set(s,_);const S=(i._a&&i._a.runWithContext||Y2)(()=>i._e.run(()=>(o=Xy()).run(()=>e({action:y}))));for(const b in S){const C=S[b];jt(C)&&!H2(C)||Un(C)?r||(m&&j2(C)&&(jt(C)?C.value=m[b]:((C instanceof Set||C instanceof Map)&&C.clear(),Lf(C,m[b]))),i.state.value[s][b]=C):typeof C=="function"&&(S[b]=y(C,b),a.actions[b]=C)}return nr(_,S),nr(Tt(_),S),Object.defineProperty(_,"$state",{get:()=>i.state.value[s],set:b=>{g(C=>{nr(C,b)})}}),i._p.forEach(b=>{const C=o.run(()=>b({store:_,app:i._a,pinia:i,options:a}));nr(_,C)}),m&&r&&t.hydrate&&t.hydrate(_.$state,m),c=!0,h=!0,_}/*! #__NO_SIDE_EFFECTS__ */function z2(s,e,t){let i;const n=typeof e=="function";i=n?t:e;function r(o,a){const l=QM();return o=o||(l?qo(Hx,null):null),o&&nu(o),o=jx,o._s.has(s)||(n?Wx(s,e,i,o):W2(s,i,o)),o._s.get(s)}return r.$id=s,r}var go=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(go||{}),zx=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(zx||{}),Bf=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Bf||{}),We=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(We||{}),on=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(on||{}),Te=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTELine truncated
`)>=0)return!1;return!0}function Ae(re,ae){var Qe;if(re.indent===" ")Qe=" ";else if(typeof re.indent=="number"&&re.indent>0)Qe=C.call(Array(re.indent+1)," ");else return null;return{base:Qe,prev:C.call(Array(ae+1),Qe)}}function Qt(re,ae){if(re.length===0)return"";var Qe=`
`+ae.prev+ae.base;return Qe+C.call(re,","+Qe)+`
`+ae.prev}function ut(re,ae){var Qe=oe(re),It=[];if(Qe){It.length=re.length;for(var kt=0;kt<re.length;kt++)It[kt]=j(re,kt)?ae(re[kt],re):""}var ot=typeof R=="function"?R(re):[],Gi;if(U){Gi={};for(var xs=0;xs<ot.length;xs++)Gi["$"+ot[xs]]=ot[xs]}for(var Nt in re)j(re,Nt)&&(Qe&&String(Number(Nt))===Nt&&Nt<re.length||U&&Gi["$"+Nt]instanceof Symbol||(S.call(/[^\w$]/,Nt)?It.push(ae(Nt,re)+": "+ae(re[Nt],re)):It.push(Nt+": "+ae(re[Nt],re))));if(typeof R=="function")for(var vi=0;vi<ot.length;vi++)$.call(re,ot[vi])&&It.push("["+ae(ot[vi])+"]: "+ae(re[ot[vi]],re));return It}return Yu}var Gu,zg;function c_(){if(zg)return Gu;zg=1;var s=ru(),e=ya(),t=function(a,l,c){for(var h=a,u;(u=h.next)!=null;h=u)if(u.key===l)return h.next=u.next,c||(u.next=a.next,a.next=u),u},i=function(a,l){if(a){var c=t(a,l);return c&&c.value}},n=function(a,l,c){var h=t(a,l);h?h.value=c:a.next={key:l,next:a.next,value:c}},r=function(a,l){return a?!!t(a,l):!1},o=function(a,l){if(a)return t(a,l,!0)};return Gu=function(){var l,c={assert:function(h){if(!c.has(h))throw new e("Side channel does not contain "+s(h))},delete:function(h){var u=o(l,h);return u&&l&&!l.next&&(l=void 0),!!u},get:function(h){return i(l,h)},has:function(h){return r(l,h)},set:function(h,u){l||(l={next:void 0}),n(l,h,u)}};return c},Gu}var ju,qg;function Kx(){return qg||(qg=1,ju=Object),ju}var Hu,Kg;function h_(){return Kg||(Kg=1,Hu=Error),Hu}var Wu,Zg;function u_(){return Zg||(Zg=1,Wu=EvalError),Wu}var zu,Jg;function d_(){return Jg||(Jg=1,zu=RangeError),zu}var qu,Qg;function f_(){return Qg||(Qg=1,qu=ReferenceError),qu}var Ku,e0;function m_(){return e0||(e0=1,Ku=SyntaxError),Ku}var Zu,t0;function p_(){return t0||(t0=1,Zu=URIError),Zu}var Ju,i0;function g_(){return i0||(i0=1,Ju=Math.abs),Ju}var Qu,s0;function v_(){return s0||(s0=1,Qu=Math.floor),Qu}var ed,n0;function y_(){return n0||(n0=1,ed=Math.max),ed}var td,r0;function x_(){return r0||(r0=1,td=Math.min),td}var id,o0;function b_(){return o0||(o0=1,id=Math.pow),id}var sd,a0;function w_(){return a0||(a0=1,sd=Math.round),sd}var nd,l0;function S_(){return l0||(l0=1,nd=Number.isNaN||function(e){return e!==e}),nd}var rd,c0;function M_(){if(c0)return rd;c0=1;var s=S_();return rd=function(t){return s(t)||t===0?t:t<0?-1:1},rd}var od,h0;function T_(){return h0||(h0=1,od=Object.getOwnPropertyDescriptor),od}var ad,u0;function Zx(){if(u0)return ad;u0=1;var s=T_();if(s)try{s([],"length")}catch{s=null}return ad=s,ad}var ld,d0;function Jx(){if(d0)return ld;d0=1;var s=Object.defineProperty||!1;if(s)try{s({},"a",{value:1})}catch{s=!1}return ld=s,ld}var cd,f0;function __(){return f0||(f0=1,cd=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(var r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==n||a.enumerable!==!0)return!1}return!0}),cd}var hd,m0;function C_(){if(m0)return hd;m0=1;var s=typeof Symbol<"u"&&Symbol,e=__();return hd=function(){return typeof s!="function"||typeof Symbol!="function"||typeof s("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},hd}var ud,p0;function Qx(){return p0||(p0=1,ud=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ud}var dd,g0;function eb(){if(g0)return dd;g0=1;var s=Kx();return dd=s.getPrototypeOf||null,dd}var fd,v0;function E_(){if(v0)return fd;v0=1;var s="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",n=function(l,c){for(var h=[],u=0;u<l.length;u+=1)h[u]=l[u];for(var d=0;d<c.length;d+=1)h[d+l.length]=c[d];return h},r=function(l,c){for(var h=[],u=c,d=0;u<l.length;u+=1,d+=1)h[d]=l[u];return h},o=function(a,l){for(var c="",h=0;h<a.length;h+=1)c+=a[h],h+1<a.length&&(c+=l);return c};return fd=function(l){var c=this;if(typeof c!="function"||e.apply(c)!==i)throw new TypeError(s+c);for(var h=r(arguments,1),u,d=function(){if(this instanceof u){var x=c.apply(this,n(h,arguments));return Object(x)===x?x:this}return c.apply(l,n(h,arguments))},f=t(0,c.length-h.length),m=[],p=0;p<f;p++)m[p]="$"+p;if(u=Function("binder","return function ("+o(m,",")+"){ return binder.apply(this,arguments); }")(d),c.prototype){var g=function(){};g.prototype=c.prototype,u.prototype=new g,g.prototype=null}return u},fd}var md,y0;function ou(){if(y0)return md;y0=1;var s=E_();return md=Function.prototype.bind||s,md}var pd,x0;function dp(){return x0||(x0=1,pd=Function.prototype.call),pd}var gd,b0;function tb(){return b0||(b0=1,gd=Function.pro Line truncated
`," "],o=["{","}","|","\\","^","`"].concat(r),a=["'"].concat(o),l=["%","/","?",";","#"].concat(a),c=["/","?","#"],h=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=B_();function x(_,S,b){if(_&&typeof _=="object"&&_ instanceof e)return _;var C=new e;return C.parse(_,S,b),C}e.prototype.parse=function(_,S,b){if(typeof _!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof _);var C=_.indexOf("?"),A=C!==-1&&C<_.indexOf("#")?"?":"#",P=_.split(A),E=/\\/g;P[0]=P[0].replace(E,"/"),_=P.join(A);var R=_;if(R=R.trim(),!b&&_.split("#").length===1){var O=n.exec(R);if(O)return this.path=R,this.href=R,this.pathname=O[1],O[2]?(this.search=O[2],S?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):S&&(this.search="",this.query={}),this}var U=t.exec(R);if(U){U=U[0];var G=U.toLowerCase();this.protocol=G,R=R.substr(U.length)}if(b||U||R.match(/^\/\/[^@/]+@[^@/]+/)){var $=R.substr(0,2)==="//";$&&!(U&&m[U])&&(R=R.substr(2),this.slashes=!0)}if(!m[U]&&($||U&&!p[U])){for(var X=-1,D=0;D<c.length;D++){var k=R.indexOf(c[D]);k!==-1&&(X===-1||k<X)&&(X=k)}var N,F;X===-1?F=R.lastIndexOf("@"):F=R.lastIndexOf("@",X),F!==-1&&(N=R.slice(0,F),R=R.slice(F+1),this.auth=decodeURIComponent(N)),X=-1;for(var D=0;D<l.length;D++){var k=R.indexOf(l[D]);k!==-1&&(X===-1||k<X)&&(X=k)}X===-1&&(X=R.length),this.host=R.slice(0,X),R=R.slice(X),this.parseHost(),this.hostname=this.hostname||"";var V=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!V)for(var Y=this.hostname.split(/\./),D=0,q=Y.length;D<q;D++){var z=Y[D];if(z&&!z.match(u)){for(var se="",oe=0,de=z.length;oe<de;oe++)z.charCodeAt(oe)>127?se+="x":se+=z[oe];if(!se.match(u)){var ge=Y.slice(0,D),he=Y.slice(D+1),fe=z.match(d);fe&&(ge.push(fe[1]),he.unshift(fe[2])),he.length&&(R="/"+he.join(".")+R),this.hostname=ge.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),V||(this.hostname=s.toASCII(this.hostname));var H=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+H,this.href+=this.host,V&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),R[0]!=="/"&&(R="/"+R))}if(!f[G])for(var D=0,q=a.length;D<q;D++){var Z=a[D];if(R.indexOf(Z)!==-1){var L=encodeURIComponent(Z);L===Z&&(L=escape(Z)),R=R.split(Z).join(L)}}var B=R.indexOf("#");B!==-1&&(this.hash=R.substr(B),R=R.slice(0,B));var j=R.indexOf("?");if(j!==-1?(this.search=R.substr(j),this.query=R.substr(j+1),S&&(this.query=g.parse(this.query)),R=R.slice(0,j)):S&&(this.search="",this.query={}),R&&(this.pathname=R),p[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",ie=this.search||"";this.path=H+ie}return this.href=this.format(),this};function v(_){return typeof _=="string"&&(_=x(_)),_ instanceof e?_.format():e.prototype.format.call(_)}e.prototype.format=function(){var _=this.auth||"";_&&(_=encodeURIComponent(_),_=_.replace(/%3A/i,":"),_+="@");var S=this.protocol||"",b=this.pathname||"",C=this.hash||"",A=!1,P="";this.host?A=_+this.host:this.hostname&&(A=_+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(A+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(P=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var E=this.search||P&&"?"+P||"";return S&&S.substr(-1)!==":"&&(S+=":"),this.slashes||(!S||p[S])&&A!==!1?(A="//"+(A||""),b&&b.charAt(0)!=="/"&&(b="/"+b)):A||(A=""),C&&C.charAt(0)!=="#"&&(C="#"+C),E&&E.charAt(0)!=="?"&&(E="?"+E),b=b.replace(/[?#]/g,function(R){return encodeURIComponent(R)}),E=E.replace("#","%23"),S+A+b+E+C};function y(_,S){return x(_,!1,!0).resolve(S)}e.prototype.resolve=function(_){return this.resolveObject(x(_,!1,!0)).format()};function w(_,S){return _?x(_,!1,!0).resolveObject(S):S}return e.prototype.resolveObject=function(_){if(typeof _=="string"){var S=new e;S.parse(_,!1,!0),_=S}for(var b=new e,C=Object.keys(this),A=0;A<C.length;A++){var P=C[A];b[P]=this[P]}if(b.hash=_.hash,_.href==="")return b.href=b.format(),b;if(_.slashes&&!_.protocol){for(var E=Object.keys(_),R=0;R<E.length;R++){var O=E[R];O!=="protocol"&&(b[O]=_[O])}return p[b.protocol]&&b.hostname&&!b.pathname&&(b.pathname="/",b.path=b.pathname),b.href=b.format(),b}if(_.protocol&&_.protocol!==b.protocol){if(!p[_.protocol]){for(var U=Object.keys(_),G=0;G<U.length;G++){var $=U[G];b[$]=_[$]}return b.href=b.format(),b}if(b.protocol=_.protocol,!_.host&&!m[_.protocol]){for(var q=(_.pathname||"").split("/");q.length&&!(_.host=q.shift()););_.host||(_.host=""),_.hostname||(_.hostname=""),q[0]!==""&&q.unshift(""),q.length<2&&q.unshift(""),b.pathname=q.join("/")}else b.pathname=_.pathname;if(b.search=_.search,b.query=_.query,b.host=_.host||"",b.auth=_.auth,b.hostname=_.hostname||_.host,b.port=_.port,b.pathname||b.search){var X=b.pat Line truncated
Deprecated since v${s}`):(i=i.split(`
`).splice(t).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
Deprecated since v${s}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
Deprecated since v${s}`),console.warn(i))),D0[e]=!0}function Ss(s){if(typeof s!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(s)}`)}function Pa(s){return s.split("?")[0].split("#")[0]}function D_(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U_(s,e,t){return s.replace(new RegExp(D_(e),"g"),t)}function $_(s,e){let t="",i=0,n=-1,r=0,o=-1;for(let a=0;a<=s.length;++a){if(a<s.length)o=s.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(n===a-1||r===1))if(n!==a-1&&r===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const c=t.lastIndexOf("/");if(c!==t.length-1){c===-1?(t="",i=0):(t=t.slice(0,c),i=t.length-1-t.lastIndexOf("/")),n=a,r=0;continue}}else if(t.length===2||t.length===1){t="",i=0,n=a,r=0;continue}}}else t.length>0?t+=`/${s.slice(n+1,a)}`:t=s.slice(n+1,a),i=a-n-1;n=a,r=0}else o===46&&r!==-1?++r:r=-1}return t}const si={toPosix(s){return U_(s,"\\","/")},isUrl(s){return/^https?:/.test(this.toPosix(s))},isDataUrl(s){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(s)},isBlobUrl(s){return s.startsWith("blob:")},hasProtocol(s){return/^[^/:]+:/.test(this.toPosix(s))},getProtocol(s){Ss(s),s=this.toPosix(s);const e=/^file:\/\/\//.exec(s);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(s);return t?t[0]:""},toAbsolute(s,e,t){if(Ss(s),this.isDataUrl(s)||this.isBlobUrl(s))return s;const i=Pa(this.toPosix(e??Be.ADAPTER.getBaseUrl())),n=Pa(this.toPosix(t??this.rootname(i)));return s=this.toPosix(s),s.startsWith("/")?si.join(n,s.slice(1)):this.isAbsolute(s)?s:this.join(i,s)},normalize(s){if(Ss(s),s.length===0)return".";if(this.isDataUrl(s)||this.isBlobUrl(s))return s;s=this.toPosix(s);let e="";const t=s.startsWith("/");this.hasProtocol(s)&&(e=this.rootname(s),s=s.slice(e.length));const i=s.endsWith("/");return s=$_(s),s.length>0&&i&&(s+="/"),t?`/${s}`:e+s},isAbsolute(s){return Ss(s),s=this.toPosix(s),this.hasProtocol(s)?!0:s.startsWith("/")},join(...s){if(s.length===0)return".";let e;for(let t=0;t<s.length;++t){const i=s[t];if(Ss(i),i.length>0)if(e===void 0)e=i;else{const n=s[t-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(s){if(Ss(s),s.length===0)return".";s=this.toPosix(s);let e=s.charCodeAt(0);const t=e===47;let i=-1,n=!0;const r=this.getProtocol(s),o=s;s=s.slice(r.length);for(let a=s.length-1;a>=1;--a)if(e=s.charCodeAt(a),e===47){if(!n){i=a;break}}else n=!1;return i===-1?t?"/":this.isUrl(o)?r+s:r:t&&i===1?"//":r+s.slice(0,i)},rootname(s){Ss(s),s=this.toPosix(s);let e="";if(s.startsWith("/")?e="/":e=this.getProtocol(s),this.isUrl(s)){const t=s.indexOf("/",e.length);t!==-1?e=s.slice(0,t):e=s,e.endsWith("/")||(e+="/")}return e},basename(s,e){Ss(s),e&&Ss(e),s=Pa(this.toPosix(s));let t=0,i=-1,n=!0,r;if(e!==void 0&&e.length>0&&e.length<=s.length){if(e.length===s.length&&e===s)return"";let o=e.length-1,a=-1;for(r=s.length-1;r>=0;--r){const c=s.charCodeAt(r);if(c===47){if(!n){t=r+1;break}}else a===-1&&(n=!1,a=r+1),o>=0&&(c===e.charCodeAt(o)?--o===-1&&(i=r):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=s.length),s.slice(t,i)}for(r=s.length-1;r>=0;--r)if(s.charCodeAt(r)===47){if(!n){t=r+1;break}}else i===-1&&(n=!1,i=r+1);return i===-1?"":s.slice(t,i)},extname(s){Ss(s),s=Pa(this.toPosix(s));let e=-1,t=0,i=-1,n=!0,r=0;for(let o=s.length-1;o>=0;--o){const a=s.charCodeAt(o);if(a===47){if(!n){t=o+1;break}continue}i===-1&&(n=!1,i=o+1),a===46?e===-1?e=o:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===t+1?"":s.slice(e,i)},parse(s){Ss(s);const e={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return e;s=Pa(this.toPosix(s));let t=s.charCodeAt(0);const i=this.isAbsolute(s);let n;e.root=this.rootname(s),i||this.hasProtocol(s)?n=1:n=0;let r=-1,o=0,a=-1,c=!0,l=s.length-1,h=0;for(;l>=n;--l){if(t=s.charCodeAt(l),t===47){if(!c){o=l+1;break}continue}a===-1&&(c=!1,a=l+1),t===46?r===-1?r=l:h!==1&&(h=1):r!==-1&&(h=-1)}return r===-1||a===-1||h===0||h===1&&r===a-1&&r===o+1?a!==-1&&(o===0&&i?e.base=e.name=s.slice(1,a):e.base=e.name=s.slice(o,a)):(o===0&&i?(e.name=s.slice(1,r),e.base=s.slice(1,a)):(e.name=s.slice(o,r),e.base=s.slice(o,a)),e.ext=s.slice(r,a)),e.dir=this.dirname(s),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Fd;async function X_(){return Fd??(Fd=(async()=>{var r;const s=document.createElement("canvas").getContext("webgl");if(!s)return bi.UNPACK;const e=await new Promise(o=>{const a=document.createElement("video");a.onloadeddata=()=>o(a),a.onerror=()=>o(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Line truncated
Deprecated since v${s}`),console.warn(i))),D0[e]=!0}function Ss(s){if(typeof s!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(s)}`)}function ka(s){return s.split("?")[0].split("#")[0]}function D_(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U_(s,e,t){return s.replace(new RegExp(D_(e),"g"),t)}function $_(s,e){let t="",i=0,n=-1,r=0,o=-1;for(let a=0;a<=s.length;++a){if(a<s.length)o=s.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(n===a-1||r===1))if(n!==a-1&&r===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),n=a,r=0;continue}}else if(t.length===2||t.length===1){t="",i=0,n=a,r=0;continue}}}else t.length>0?t+=`/${s.slice(n+1,a)}`:t=s.slice(n+1,a),i=a-n-1;n=a,r=0}else o===46&&r!==-1?++r:r=-1}return t}const si={toPosix(s){return U_(s,"\\","/")},isUrl(s){return/^https?:/.test(this.toPosix(s))},isDataUrl(s){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(s)},isBlobUrl(s){return s.startsWith("blob:")},hasProtocol(s){return/^[^/:]+:/.test(this.toPosix(s))},getProtocol(s){Ss(s),s=this.toPosix(s);const e=/^file:\/\/\//.exec(s);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(s);return t?t[0]:""},toAbsolute(s,e,t){if(Ss(s),this.isDataUrl(s)||this.isBlobUrl(s))return s;const i=ka(this.toPosix(e??Be.ADAPTER.getBaseUrl())),n=ka(this.toPosix(t??this.rootname(i)));return s=this.toPosix(s),s.startsWith("/")?si.join(n,s.slice(1)):this.isAbsolute(s)?s:this.join(i,s)},normalize(s){if(Ss(s),s.length===0)return".";if(this.isDataUrl(s)||this.isBlobUrl(s))return s;s=this.toPosix(s);let e="";const t=s.startsWith("/");this.hasProtocol(s)&&(e=this.rootname(s),s=s.slice(e.length));const i=s.endsWith("/");return s=$_(s),s.length>0&&i&&(s+="/"),t?`/${s}`:e+s},isAbsolute(s){return Ss(s),s=this.toPosix(s),this.hasProtocol(s)?!0:s.startsWith("/")},join(...s){if(s.length===0)return".";let e;for(let t=0;t<s.length;++t){const i=s[t];if(Ss(i),i.length>0)if(e===void 0)e=i;else{const n=s[t-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(s){if(Ss(s),s.length===0)return".";s=this.toPosix(s);let e=s.charCodeAt(0);const t=e===47;let i=-1,n=!0;const r=this.getProtocol(s),o=s;s=s.slice(r.length);for(let a=s.length-1;a>=1;--a)if(e=s.charCodeAt(a),e===47){if(!n){i=a;break}}else n=!1;return i===-1?t?"/":this.isUrl(o)?r+s:r:t&&i===1?"//":r+s.slice(0,i)},rootname(s){Ss(s),s=this.toPosix(s);let e="";if(s.startsWith("/")?e="/":e=this.getProtocol(s),this.isUrl(s)){const t=s.indexOf("/",e.length);t!==-1?e=s.slice(0,t):e=s,e.endsWith("/")||(e+="/")}return e},basename(s,e){Ss(s),e&&Ss(e),s=ka(this.toPosix(s));let t=0,i=-1,n=!0,r;if(e!==void 0&&e.length>0&&e.length<=s.length){if(e.length===s.length&&e===s)return"";let o=e.length-1,a=-1;for(r=s.length-1;r>=0;--r){const l=s.charCodeAt(r);if(l===47){if(!n){t=r+1;break}}else a===-1&&(n=!1,a=r+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(i=r):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=s.length),s.slice(t,i)}for(r=s.length-1;r>=0;--r)if(s.charCodeAt(r)===47){if(!n){t=r+1;break}}else i===-1&&(n=!1,i=r+1);return i===-1?"":s.slice(t,i)},extname(s){Ss(s),s=ka(this.toPosix(s));let e=-1,t=0,i=-1,n=!0,r=0;for(let o=s.length-1;o>=0;--o){const a=s.charCodeAt(o);if(a===47){if(!n){t=o+1;break}continue}i===-1&&(n=!1,i=o+1),a===46?e===-1?e=o:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===t+1?"":s.slice(e,i)},parse(s){Ss(s);const e={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return e;s=ka(this.toPosix(s));let t=s.charCodeAt(0);const i=this.isAbsolute(s);let n;e.root=this.rootname(s),i||this.hasProtocol(s)?n=1:n=0;let r=-1,o=0,a=-1,l=!0,c=s.length-1,h=0;for(;c>=n;--c){if(t=s.charCodeAt(c),t===47){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),t===46?r===-1?r=c:h!==1&&(h=1):r!==-1&&(h=-1)}return r===-1||a===-1||h===0||h===1&&r===a-1&&r===o+1?a!==-1&&(o===0&&i?e.base=e.name=s.slice(1,a):e.base=e.name=s.slice(o,a)):(o===0&&i?(e.name=s.slice(1,r),e.base=s.slice(1,a)):(e.name=s.slice(o,r),e.base=s.slice(o,a)),e.ext=s.slice(r,a)),e.dir=this.dirname(s),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Fd;async function X_(){return Fd??(Fd=(async()=>{var r;const s=document.createElement("canvas").getContext("webgl");if(!s)return bi.UNPACK;const e=await new Promise(o=>{const a=document.createElement("video");a.onloadeddata=()=>o(a),a.onerror=()=>o(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Line truncated
`);function lC(s){let e="";for(let t=0;t<s;++t)t>0&&(e+=`
else `),t<s-1&&(e+=`if(test == ${t}.0){}`);return e}function cC(s,e){if(s===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const i=aC.replace(/%forloop%/gi,lC(s));if(e.shaderSource(t,i),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))s=s/2|0;else break}return s}const Dd=0,Ud=1,$d=2,Xd=3,Vd=4,Yd=5;class mn{constructor(){this.data=0,this.blendMode=We.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Dd)}set blend(e){!!(this.data&1<<Dd)!==e&&(this.data^=1<<Dd)}get offsets(){return!!(this.data&1<<Ud)}set offsets(e){!!(this.data&1<<Ud)!==e&&(this.data^=1<<Ud)}get culling(){return!!(this.data&1<<$d)}set culling(e){!!(this.data&1<<$d)!==e&&(this.data^=1<<$d)}get depthTest(){return!!(this.data&1<<Xd)}set depthTest(e){!!(this.data&1<<Xd)!==e&&(this.data^=1<<Xd)}get depthMask(){return!!(this.data&1<<Yd)}set depthMask(e){!!(this.data&1<<Yd)!==e&&(this.data^=1<<Yd)}get clockwiseFrontFace(){return!!(this.data&1<<Vd)}set clockwiseFrontFace(e){!!(this.data&1<<Vd)!==e&&(this.data^=1<<Vd)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==We.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new mn;return e.depthTest=!1,e.blend=!0,e}}mn.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const Vf=[];function fb(s,e){if(!s)return null;let t="";if(typeof s=="string"){const i=/\.(\w{3,4})(?:$|\?|#)/i.exec(s);i&&(t=i[1].toLowerCase())}for(let i=Vf.length-1;i>=0;--i){const n=Vf[i];if(n.test&&n.test(s,t))return new n(s,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Ls{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,n,r,o,a,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:h}=this;this._aliasCount++;for(let u=0,d=h.length;u<d;u++)h[u][l](e,t,i,n,r,o,a,c);return h===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Ls.prototype,{dispatch:{value:Ls.prototype.emit},run:{value:Ls.prototype.emit}});class yl{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Ls("setRealSize"),this.onUpdate=new Ls("update"),this.onError=new Ls("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class au extends yl{constructor(e,t){const{width:i,height:n}=t||{};if(!i||!n)throw new Error("BufferResource width or height invalid");super(i,n),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const n=e.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===bi.UNPACK);const r=t.realWidth,o=t.realHeight;return i.width===r&&i.height===o?n.texSubImage2D(t.target,0,0,0,r,o,t.format,i.type,this.data):(i.width=r,i.height=o,n.texImage2D(t.target,0,i.internalFormat,r,o,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const hC={scaleMode:Rs.NEAREST,alphaMode:bi.NPM},Yf=class No extends Rl{constructor(e=null,t=null){super(),t=Object.assign({},No.defaultOptions,t);const{alphaMode:i,mipmap:n,anisotropicLevel:r,scaleMode:o,width:a,height:c,wrapMode:l,format:h,type:u,target:d,resolution: Line truncated
else `),t<s-1&&(e+=`if(test == ${t}.0){}`);return e}function cC(s,e){if(s===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const i=aC.replace(/%forloop%/gi,lC(s));if(e.shaderSource(t,i),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))s=s/2|0;else break}return s}const Dd=0,Ud=1,$d=2,Xd=3,Vd=4,Yd=5;class mn{constructor(){this.data=0,this.blendMode=We.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Dd)}set blend(e){!!(this.data&1<<Dd)!==e&&(this.data^=1<<Dd)}get offsets(){return!!(this.data&1<<Ud)}set offsets(e){!!(this.data&1<<Ud)!==e&&(this.data^=1<<Ud)}get culling(){return!!(this.data&1<<$d)}set culling(e){!!(this.data&1<<$d)!==e&&(this.data^=1<<$d)}get depthTest(){return!!(this.data&1<<Xd)}set depthTest(e){!!(this.data&1<<Xd)!==e&&(this.data^=1<<Xd)}get depthMask(){return!!(this.data&1<<Yd)}set depthMask(e){!!(this.data&1<<Yd)!==e&&(this.data^=1<<Yd)}get clockwiseFrontFace(){return!!(this.data&1<<Vd)}set clockwiseFrontFace(e){!!(this.data&1<<Vd)!==e&&(this.data^=1<<Vd)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==We.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new mn;return e.depthTest=!1,e.blend=!0,e}}mn.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const Vf=[];function fb(s,e){if(!s)return null;let t="";if(typeof s=="string"){const i=/\.(\w{3,4})(?:$|\?|#)/i.exec(s);i&&(t=i[1].toLowerCase())}for(let i=Vf.length-1;i>=0;--i){const n=Vf[i];if(n.test&&n.test(s,t))return new n(s,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Ls{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,n,r,o,a,l){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:h}=this;this._aliasCount++;for(let u=0,d=h.length;u<d;u++)h[u][c](e,t,i,n,r,o,a,l);return h===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Ls.prototype,{dispatch:{value:Ls.prototype.emit},run:{value:Ls.prototype.emit}});class xl{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Ls("setRealSize"),this.onUpdate=new Ls("update"),this.onError=new Ls("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class au extends xl{constructor(e,t){const{width:i,height:n}=t||{};if(!i||!n)throw new Error("BufferResource width or height invalid");super(i,n),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const n=e.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===bi.UNPACK);const r=t.realWidth,o=t.realHeight;return i.width===r&&i.height===o?n.texSubImage2D(t.target,0,0,0,r,o,t.format,i.type,this.data):(i.width=r,i.height=o,n.texImage2D(t.target,0,i.internalFormat,r,o,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const hC={scaleMode:Rs.NEAREST,alphaMode:bi.NPM},Yf=class No extends Rl{constructor(e=null,t=null){super(),t=Object.assign({},No.defaultOptions,t);const{alphaMode:i,mipmap:n,anisotropicLevel:r,scaleMode:o,width:a,height:l,wrapMode:c,format:h,type:u,target:d,resolution: Line truncated
uniform sampler2D uSampler;
@@ -314,16 +314,16 @@ void main(void){
renderer.shader.syncUniformBufferGroup(uv.${n}, '${n}');
`):t.push(`
renderer.shader.syncUniformGroup(uv.${n}, syncData);
`));continue}const o=s.uniforms[n];let a=!1;for(let c=0;c<Qo.length;c++)if(Qo[c].test(r,o)){t.push(Qo[c].code(n,o)),a=!0;break}if(!a){const c=(r.size===1&&!r.isArray?wC:SC)[r.type].replace("location",`ud["${n}"].location`);t.push(`
`));continue}const o=s.uniforms[n];let a=!1;for(let l=0;l<Qo.length;l++)if(Qo[l].test(r,o)){t.push(Qo[l].code(n,o)),a=!0;break}if(!a){const l=(r.size===1&&!r.isArray?wC:SC)[r.type].replace("location",`ud["${n}"].location`);t.push(`
cu = ud["${n}"];
cv = cu.value;
v = uv["${n}"];
${c};`)}}return new Function("ud","uv","renderer","syncData",t.join(`
${l};`)}}return new Function("ud","uv","renderer","syncData",t.join(`
`))}const vb={};let Eo=vb;function TC(){if(Eo===vb||Eo!=null&&Eo.isContextLost()){const s=Be.ADAPTER.createCanvas();let e;Be.PREFER_ENV>=go.WEBGL2&&(e=s.getContext("webgl2",{})),e||(e=s.getContext("webgl",{})||s.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Eo=e}return Eo}let Jl;function _C(){if(!Jl){Jl=ms.MEDIUM;const s=TC();if(s&&s.getShaderPrecisionFormat){const e=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);e&&(Jl=e.precision?ms.HIGH:ms.MEDIUM)}}return Jl}function tv(s,e){const t=s.getShaderSource(e).split(`
`).map((l,h)=>`${h}: ${l}`),i=s.getShaderInfoLog(e),n=i.split(`
`),r={},o=n.map(l=>parseFloat(l.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(l=>l&&!r[l]?(r[l]=!0,!0):!1),a=[""];o.forEach(l=>{t[l-1]=`%c${t[l-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=t.join(`
`);a[0]=c,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function CC(s,e,t,i){s.getProgramParameter(e,s.LINK_STATUS)||(s.getShaderParameter(t,s.COMPILE_STATUS)||tv(s,t),s.getShaderParameter(i,s.COMPILE_STATUS)||tv(s,i),console.error("PixiJS Error: Could not initialize shader."),s.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",s.getProgramInfoLog(e)))}const EC={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function yb(s){return EC[s]}let Ql=null;const iv={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function xb(s,e){if(!Ql){const t=Object.keys(iv);Ql={};for(let i=0;i<t.length;++i){const n=t[i];Ql[s[n]]=iv[n]}}return Ql[e]}function sv(s,e,t){if(s.substring(0,9)!=="precision"){let i=e;return e===ms.HIGH&&t!==ms.HIGH&&(i=ms.MEDIUM),`precision ${i} float;
${s}`}else if(t!==ms.HIGH&&s.substring(0,15)==="precision highp")return s.replace("precision highp","precision mediump");return s}let ka;function AC(){if(typeof ka=="boolean")return ka;try{ka=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{ka=!1}return ka}let IC=0;const ec={},Wf=class Do{constructor(e,t,i="pixi-shader",n={}){this.extra={},this.id=IC++,this.vertexSrc=e||Do.defaultVertexSrc,this.fragmentSrc=t||Do.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(i=i.replace(/\s+/g,"-"),ec[i]?(ec[i]++,i+=`-${ec[i]}`):ec[i]=1,this.vertexSrc=`#define SHADER_NAME ${i}
`).map((c,h)=>`${h}: ${c}`),i=s.getShaderInfoLog(e),n=i.split(`
`),r={},o=n.map(c=>parseFloat(c.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(c=>c&&!r[c]?(r[c]=!0,!0):!1),a=[""];o.forEach(c=>{t[c-1]=`%c${t[c-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const l=t.join(`
`);a[0]=l,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function CC(s,e,t,i){s.getProgramParameter(e,s.LINK_STATUS)||(s.getShaderParameter(t,s.COMPILE_STATUS)||tv(s,t),s.getShaderParameter(i,s.COMPILE_STATUS)||tv(s,i),console.error("PixiJS Error: Could not initialize shader."),s.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",s.getProgramInfoLog(e)))}const EC={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function yb(s){return EC[s]}let Ql=null;const iv={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function xb(s,e){if(!Ql){const t=Object.keys(iv);Ql={};for(let i=0;i<t.length;++i){const n=t[i];Ql[s[n]]=iv[n]}}return Ql[e]}function sv(s,e,t){if(s.substring(0,9)!=="precision"){let i=e;return e===ms.HIGH&&t!==ms.HIGH&&(i=ms.MEDIUM),`precision ${i} float;
${s}`}else if(t!==ms.HIGH&&s.substring(0,15)==="precision highp")return s.replace("precision highp","precision mediump");return s}let Fa;function AC(){if(typeof Fa=="boolean")return Fa;try{Fa=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Fa=!1}return Fa}let IC=0;const ec={},Wf=class Do{constructor(e,t,i="pixi-shader",n={}){this.extra={},this.id=IC++,this.vertexSrc=e||Do.defaultVertexSrc,this.fragmentSrc=t||Do.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(i=i.replace(/\s+/g,"-"),ec[i]?(ec[i]++,i+=`-${ec[i]}`):ec[i]=1,this.vertexSrc=`#define SHADER_NAME ${i}
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${i}
${this.fragmentSrc}`,this.vertexSrc=sv(this.vertexSrc,Do.defaultVertexPrecision,ms.HIGH),this.fragmentSrc=sv(this.fragmentSrc,Do.defaultFragmentPrecision,_C())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return bC}static get defaultFragmentSrc(){return xC}static from(e,t,i){const n=e+t;let r=q0[n];return r||(q0[n]=r=new Do(e,t,i)),r}};Wf.defaultVertexPrecision=ms.HIGH,Wf.defaultFragmentPrecision=kn.apple.device?ms.HIGH:ms.MEDIUM;let an=Wf,RC=0;class Bs{constructor(e,t,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=RC++,this.static=!!t,this.ubo=!!i,e instanceof $t?(this.buffer=e,this.buffer.type=hn.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new $t(new Float32Array(1)),this.buffer.type=hn.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,i){if(!this.ubo)this.uniforms[e]=new Bs(t,i);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,i){return new Bs(e,t,i)}static uboFrom(e,t){return new Bs(e,t??!0,!0)}}class Ns{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof Bs?this.uniformGroup=t:this.uniformGroup=new Bs(t):this.uniformGroup=new Bs({}),this.disposeRunner=new Ls("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(const i in t.uniforms){const n=t.uniforms[i];if(n.group===!0&&this.checkUniformExists(e,n))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,i){const n=an.from(e,t);return new Ns(n,i)}}class bb{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const i=new Int32Array(e);for(let r=0;r<e;r++)i[r]=r;this.defaultGroupCache[e]=Bs.from({uSamplers:i},!0);let n=this.fragTemplate;n=n.replace(/%count%/gi,`${e}`),n=n.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new an(this.vertexSrc,n)}const t={tint:new Float32Array([1,1,1,1]),translationMatrix:new Ft,default:this.defaultGroupCache[e]};return new Ns(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
`,t+=`
@@ -364,7 +364,7 @@ void main(void){
vTextureId = aTextureId;
vColor = aColor * tint;
}
`;const Xa=class _s extends uu{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=mb,this.vertexSize=6,this.state=mn.for2d(),this.size=_s.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??kC(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??PC(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return mt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return OC}static get defaultFragmentTemplate(){return FC}setShaderGenerator({vertex:e=_s.defaultVertexSrc,fragment:t=_s.defaultFragmentTemplate}={}){this.shaderGenerator=new bb(e,t)}contextChange(){const e=this.renderer.gl;Be.PREFER_ENV===go.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),_s.defaultMaxTextures),this.maxTextures=cC(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=_s,i=this.size/4,n=Math.floor(i/this.maxTextures)+1;for(;e.length<i;)e.push(new Gf);for(;t.length<n;)t.push(new zf);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=_s._textureArrayPool,n=this.renderer.batch,r=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++it._globalBatch,c=0,l=i[0],h=0;n.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const d=e[u];e[u]=null,d._batchEnabled!==a&&(l.count>=t&&(n.boundArray(l,r,a,t),this.buildDrawCalls(l,h,u),h=u,l=i[++c],++a),d._batchEnabled=a,d.touched=o,l.elements[l.count++]=d)}l.count>0&&(n.boundArray(l,r,a,t),this.buildDrawCalls(l,h,this._bufferSize),++c,++a);for(let u=0;u<r.length;u++)r[u]=null;it._globalBatch=a}buildDrawCalls(e,t,i){const{_bufferedElements:n,_attributeBuffer:r,_indexBuffer:o,vertexSize:a}=this,c=_s._drawCallPool;let l=this._dcIndex,h=this._aIndex,u=this._iIndex,d=c[l];d.start=this._iIndex,d.texArray=e;for(let f=t;f<i;++f){const m=n[f],p=m._texture.baseTexture,g=hb[p.alphaMode?1:0][m.blendMode];n[f]=null,t<f&&d.blend!==g&&(d.size=u-d.start,t=f,d=c[++l],d.texArray=e,d.start=u),this.packInterleavedGeometry(m,r,o,h,u),h+=m.vertexData.length/2*a,u+=m.indices.length,d.blend=g}t<i&&(d.size=u-d.start,++l),this._dcIndex=l,this._aIndex=h,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let i=0;i<e.count;i++)t.bind(e.elements[i],e.ids[i]),e.elements[i]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:i}=this;_s.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:i}=this.renderer,n=_s._drawCallPool;let r=null;for(let o=0;o<e;o++){const{texArray:a,type:c,size:l,start:h,blend:u}=n[o];r!==a&&(r=a,this.bindAndClearTexArray(a)),this.state.blendMode=u,i.set(this.state),t.drawElements(c,l,t.UNSIGNED_SHORT,h*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),_s.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f Line truncated
`;const Va=class _s extends uu{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=mb,this.vertexSize=6,this.state=mn.for2d(),this.size=_s.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??kC(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??PC(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return mt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return OC}static get defaultFragmentTemplate(){return FC}setShaderGenerator({vertex:e=_s.defaultVertexSrc,fragment:t=_s.defaultFragmentTemplate}={}){this.shaderGenerator=new bb(e,t)}contextChange(){const e=this.renderer.gl;Be.PREFER_ENV===go.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),_s.defaultMaxTextures),this.maxTextures=cC(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=_s,i=this.size/4,n=Math.floor(i/this.maxTextures)+1;for(;e.length<i;)e.push(new Gf);for(;t.length<n;)t.push(new zf);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=_s._textureArrayPool,n=this.renderer.batch,r=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++tt._globalBatch,l=0,c=i[0],h=0;n.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const d=e[u];e[u]=null,d._batchEnabled!==a&&(c.count>=t&&(n.boundArray(c,r,a,t),this.buildDrawCalls(c,h,u),h=u,c=i[++l],++a),d._batchEnabled=a,d.touched=o,c.elements[c.count++]=d)}c.count>0&&(n.boundArray(c,r,a,t),this.buildDrawCalls(c,h,this._bufferSize),++l,++a);for(let u=0;u<r.length;u++)r[u]=null;tt._globalBatch=a}buildDrawCalls(e,t,i){const{_bufferedElements:n,_attributeBuffer:r,_indexBuffer:o,vertexSize:a}=this,l=_s._drawCallPool;let c=this._dcIndex,h=this._aIndex,u=this._iIndex,d=l[c];d.start=this._iIndex,d.texArray=e;for(let f=t;f<i;++f){const m=n[f],p=m._texture.baseTexture,g=hb[p.alphaMode?1:0][m.blendMode];n[f]=null,t<f&&d.blend!==g&&(d.size=u-d.start,t=f,d=l[++c],d.texArray=e,d.start=u),this.packInterleavedGeometry(m,r,o,h,u),h+=m.vertexData.length/2*a,u+=m.indices.length,d.blend=g}t<i&&(d.size=u-d.start,++c),this._dcIndex=c,this._aIndex=h,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let i=0;i<e.count;i++)t.bind(e.elements[i],e.ids[i]),e.elements[i]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:i}=this;_s.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:i}=this.renderer,n=_s._drawCallPool;let r=null;for(let o=0;o<e;o++){const{texArray:a,type:l,size:c,start:h,blend:u}=n[o];r!==a&&(r=a,this.bindAndClearTexArray(a)),this.state.blendMode=u,i.set(this.state),t.drawElements(l,c,t.UNSIGNED_SHORT,h*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),_s.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f Line truncated
uniform sampler2D uSampler;
@@ -397,7 +397,7 @@ void main(void)
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`;const qf=class Va extends Ns{constructor(e,t,i){const n=an.from(e||Va.defaultVertexSrc,t||Va.defaultFragmentSrc);super(n,i),this.padding=0,this.resolution=Va.defaultResolution,this.multisample=Va.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new mn}apply(e,t,i,n,r){e.applyFilter(this,t,i,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return BC}static get defaultFragmentSrc(){return LC}};qf.defaultResolution=1,qf.defaultMultisample=ci.NONE;let Vi=qf;class rh{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new At(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:i,backgroundAlpha:n}=e,r=i??t;r!==void 0&&(this.color=r),this.alpha=n}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}rh.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},rh.extension={type:[ke.RendererSystem,ke.CanvasRendererSystem],name:"background"};$e.add(rh);class wb{constructor(e){this.renderer=e,this.emptyRenderer=new uu(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){const{boundTextures:i}=this.renderer.texture;for(let n=t-1;n>=0;--n)e[n]=i[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,t,i,n){const{elements:r,ids:o,count:a}=e;let c=0;for(let l=0;l<a;l++){const h=r[l],u=h._batchLocation;if(u>=0&&u<n&&t[u]===h){o[l]=u;continue}for(;c<n;){const d=t[c];if(d&&d._batchEnabled===i&&d._batchLocation===c){c++;continue}o[l]=c,h._batchLocation=c,t[c]=h;break}}}destroy(){this.renderer=null}}wb.extension={type:ke.RendererSystem,name:"batch"};$e.add(wb);let nv=0;class oh{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=nv++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=nv++,this.renderer.runners.contextChange.emit(e);const t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let i;if(Be.PREFER_ENV>=go.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_ha Line truncated
`;const qf=class Ya extends Ns{constructor(e,t,i){const n=an.from(e||Ya.defaultVertexSrc,t||Ya.defaultFragmentSrc);super(n,i),this.padding=0,this.resolution=Ya.defaultResolution,this.multisample=Ya.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new mn}apply(e,t,i,n,r){e.applyFilter(this,t,i,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return BC}static get defaultFragmentSrc(){return LC}};qf.defaultResolution=1,qf.defaultMultisample=ci.NONE;let Vi=qf;class rh{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new At(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:i,backgroundAlpha:n}=e,r=i??t;r!==void 0&&(this.color=r),this.alpha=n}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}rh.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},rh.extension={type:[ke.RendererSystem,ke.CanvasRendererSystem],name:"background"};$e.add(rh);class wb{constructor(e){this.renderer=e,this.emptyRenderer=new uu(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){const{boundTextures:i}=this.renderer.texture;for(let n=t-1;n>=0;--n)e[n]=i[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,t,i,n){const{elements:r,ids:o,count:a}=e;let l=0;for(let c=0;c<a;c++){const h=r[c],u=h._batchLocation;if(u>=0&&u<n&&t[u]===h){o[c]=u;continue}for(;l<n;){const d=t[l];if(d&&d._batchEnabled===i&&d._batchLocation===l){l++;continue}o[c]=l,h._batchLocation=l,t[l]=h;break}}}destroy(){this.renderer=null}}wb.extension={type:ke.RendererSystem,name:"batch"};$e.add(wb);let nv=0;class oh{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=nv++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=nv++,this.renderer.runners.contextChange.emit(e);const t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let i;if(Be.PREFER_ENV>=go.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_ha Line truncated
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
@@ -438,7 +438,7 @@ void main(void)
vTextureCoord = aTextureCoord;
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
}
`;class YC extends Vi{constructor(e,t,i){let n=null;typeof e!="string"&&t===void 0&&i===void 0&&(n=e,e=void 0,t=void 0,i=void 0),super(e||VC,t||XC,i),this.maskSprite=n,this.maskMatrix=new Ft}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,i,n){const r=this._maskSprite,o=r._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new vp(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,r).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,e.applyFilter(this,t,i,n))}}class GC{constructor(e=null){this.type=ui.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Vi.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=ui.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ib{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let i=t;if(!i.isMaskData){const r=this.maskDataPool.pop()||new GC;r.pooled=!0,r.maskObject=t,i=r}const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(n),i._colorMask=n?n._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==ui.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case ui.SCISSOR:this.renderer.scissor.push(i);break;case ui.STENCIL:this.renderer.stencil.push(i);break;case ui.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case ui.COLOR:this.pushColorMask(i);break}i.type===ui.SPRITE&&this.maskStack.push(i)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case ui.SCISSOR:this.renderer.scissor.pop(t);break;case ui.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case ui.SPRITE:this.popSpriteMask(t);break;case ui.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const i=this.maskStack[this.maskStack.length-1];i.type===ui.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=ui.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=ui.SCISSOR:e.type=ui.STENCIL:e.type=ui.COLOR}pushSpriteMask(e){const{maskObject:t}=e,i=e._target;let n=e._filters;n||(n=this.alphaMaskPool[this.alphaMaskIndex],n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new YC])),n[0].resolution=e.resolution,n[0].multisample=e.multisample,n[0].maskSprite=t;const r=i.filterArea;i.filterArea=t.getBounds(!0),this.renderer.filter.push(i,n),i.filterArea=r,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const t=e._colorMask,i=e._colorMask=t&e.colorMask;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){const t=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}Ib.extension={type:ke.RendererSystem,name:"mask"};$e.add(Ib);class Rb{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==i&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const av=new Ft,lv=[],Pb=class Pc extends Rb{constructor(e){super(e),this.glConst=Be.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:n}=this,r=n.renderTexture,o=i.getBounds(!0,lv.pop()??new ct);this.roundFrameToPixels(o,r.current?r.current.resolution:n.resolution,r.sourceFrame,r.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static Line truncated
`;class YC extends Vi{constructor(e,t,i){let n=null;typeof e!="string"&&t===void 0&&i===void 0&&(n=e,e=void 0,t=void 0,i=void 0),super(e||VC,t||XC,i),this.maskSprite=n,this.maskMatrix=new Ft}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,i,n){const r=this._maskSprite,o=r._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new vp(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,r).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,e.applyFilter(this,t,i,n))}}class GC{constructor(e=null){this.type=ui.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Vi.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=ui.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ib{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let i=t;if(!i.isMaskData){const r=this.maskDataPool.pop()||new GC;r.pooled=!0,r.maskObject=t,i=r}const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(n),i._colorMask=n?n._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==ui.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case ui.SCISSOR:this.renderer.scissor.push(i);break;case ui.STENCIL:this.renderer.stencil.push(i);break;case ui.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case ui.COLOR:this.pushColorMask(i);break}i.type===ui.SPRITE&&this.maskStack.push(i)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case ui.SCISSOR:this.renderer.scissor.pop(t);break;case ui.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case ui.SPRITE:this.popSpriteMask(t);break;case ui.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const i=this.maskStack[this.maskStack.length-1];i.type===ui.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=ui.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=ui.SCISSOR:e.type=ui.STENCIL:e.type=ui.COLOR}pushSpriteMask(e){const{maskObject:t}=e,i=e._target;let n=e._filters;n||(n=this.alphaMaskPool[this.alphaMaskIndex],n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new YC])),n[0].resolution=e.resolution,n[0].multisample=e.multisample,n[0].maskSprite=t;const r=i.filterArea;i.filterArea=t.getBounds(!0),this.renderer.filter.push(i,n),i.filterArea=r,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const t=e._colorMask,i=e._colorMask=t&e.colorMask;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){const t=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}Ib.extension={type:ke.RendererSystem,name:"mask"};$e.add(Ib);class Rb{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==i&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const av=new Ft,lv=[],Pb=class Pc extends Rb{constructor(e){super(e),this.glConst=Be.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:n}=this,r=n.renderTexture,o=i.getBounds(!0,lv.pop()??new ct);this.roundFrameToPixels(o,r.current?r.current.resolution:n.resolution,r.sourceFrame,r.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static Line truncated
data[offset] = v;
`,vec2:`
data[offset] = v[0];
@@ -484,9 +484,9 @@ void main(void)
var gl = renderer.gl
var index = 0;
var data = buffer.data;
`];for(let o=0;o<i.length;o++){const a=i[o],c=s.uniforms[a.data.name],l=a.data.name;let h=!1;for(let u=0;u<Qo.length;u++){const d=Qo[u];if(d.codeUbo&&d.test(a.data,c)){r.push(`offset = ${a.offset/4};`,Qo[u].codeUbo(a.data.name,c)),h=!0;break}}if(!h)if(a.data.size>1){const u=yb(a.data.type),d=Math.max(Nb[a.data.type]/16,1),f=u/d,m=(4-f%4)%4;r.push(`
cv = ud.${l}.value;
v = uv.${l};
`];for(let o=0;o<i.length;o++){const a=i[o],l=s.uniforms[a.data.name],c=a.data.name;let h=!1;for(let u=0;u<Qo.length;u++){const d=Qo[u];if(d.codeUbo&&d.test(a.data,l)){r.push(`offset = ${a.offset/4};`,Qo[u].codeUbo(a.data.name,l)),h=!0;break}}if(!h)if(a.data.size>1){const u=yb(a.data.type),d=Math.max(Nb[a.data.type]/16,1),f=u/d,m=(4-f%4)%4;r.push(`
cv = ud.${c}.value;
v = uv.${c};
offset = ${a.offset/4};
t = 0;
@@ -501,14 +501,14 @@ void main(void)
}
`)}else{const u=JC[a.data.type];r.push(`
cv = ud.${l}.value;
v = uv.${l};
cv = ud.${c}.value;
v = uv.${c};
offset = ${a.offset/4};
${u};
`)}}return r.push(`
renderer.buffer.update(buffer);
`),{size:n,syncFunc:new Function("ud","uv","renderer","syncData","buffer",r.join(`
`))}}let iE=0;const sc={textureCount:0,uboCount:0};class Db{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=iE++}systemCheck(){if(!AC())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,n=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(n.program)),t||(sc.textureCount=0,sc.uboCount=0,this.syncUniformGroup(e.uniformGroup,sc)),n}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=MC(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const n=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),n(i.uniformData,e.uniforms,this.renderer,sc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,n.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const o=this.getSignature(e,this.shader.program.uniformData,"ubo");let a=this._uboCache[o];if(a||(a=this._uboCache[o]=tE(e,this.shader.program.uniformData)),e.autoManage){const c=new Float32Array(a.size/4);e.buffer.update(c)}return t.uniformGroups[e.id]=a.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const n=e.uniforms,r=[`${i}-`];for(const o in n)r.push(o),t[o]&&r.push(t[o].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,n=KC(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Db.extension={type:ke.RendererSystem,name:"shader"};$e.add(Db);class ah{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}ah.defaultOptions={hello:!1},ah.extension={type:[ke.RendererSystem,ke.CanvasRendererSystem],name:"startup"};$e.add(ah);function sE(s,e=[]){return e[We.NORMAL]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.ADD]=[s.ONE,s.ONE],e[We.MULTIPLY]=[s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.SCREEN]=[s.ONE,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.OVERLAY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.DARKEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.LIGHTEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.COLOR_DODGE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.COLOR_BURN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.HARD_LIGHT]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.SOFT_LIGHT]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.DIFFERENCE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.EXCLUSION]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.HUE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.SATURATION]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.COLOR]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.LUMINOSITY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.NONE]=[0,0],e[We.NORMAL_NPM]=[s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.ADD_NPM]=[s.SRC_ALPHA,s.ONE,s.ONE,s.ONE],e[We.SCREEN_NPM]=[s.SRC_ALPHA,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.SRC_IN]=[s.DST_ALPHA,s.ZERO],e[We.SRC_OUT]=[s.ONE_MINUS_DST_ALPHA,s.ZERO],e[We.SRC_ATOP]=[s.DST_ALPHA,s.ONE_MINUS_SRC_ALPHA],e[We.DST_OVER]=[s.ONE_MINUS_DST_ALPHA,s.ONE],e[We.DST_IN]=[s.ZERO,s.SRC_ALPHA],e[We.DST_OUT]=[s.ZERO,s.ONE_MINUS_SRC_ALPHA],e[We.DST_ATOP]=[s.ONE_MINUS_DST_ALPHA,s.SRC_ALPHA],e[We.XOR]=[s.ONE_MINUS_DST_ALPHA,s.ONE_MINUS_SRC_ALPHA],e[We.SUBTRACT]=[s.ONE,s.ONE,s.ONE,s.ONE,s.FUNC_REVERSE_SUBTRACT,s.FUNC_ADD],e}const nE=0,rE=1,oE=2,aE=3,lE=4,cE=5,Ub=class Zf{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=We.NONE,this._blendEq=!1,this.map=[],this.map[nE]=this.setBlend,this.map[rE]=this.setOffset,this.map[oE]=this.setCullFace,this.map[aE]=this.setDepthTest,this.ma Line truncated
`))}}let iE=0;const sc={textureCount:0,uboCount:0};class Db{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=iE++}systemCheck(){if(!AC())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,n=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(n.program)),t||(sc.textureCount=0,sc.uboCount=0,this.syncUniformGroup(e.uniformGroup,sc)),n}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=MC(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const n=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),n(i.uniformData,e.uniforms,this.renderer,sc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,n.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const o=this.getSignature(e,this.shader.program.uniformData,"ubo");let a=this._uboCache[o];if(a||(a=this._uboCache[o]=tE(e,this.shader.program.uniformData)),e.autoManage){const l=new Float32Array(a.size/4);e.buffer.update(l)}return t.uniformGroups[e.id]=a.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const n=e.uniforms,r=[`${i}-`];for(const o in n)r.push(o),t[o]&&r.push(t[o].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,n=KC(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Db.extension={type:ke.RendererSystem,name:"shader"};$e.add(Db);class ah{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}ah.defaultOptions={hello:!1},ah.extension={type:[ke.RendererSystem,ke.CanvasRendererSystem],name:"startup"};$e.add(ah);function sE(s,e=[]){return e[We.NORMAL]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.ADD]=[s.ONE,s.ONE],e[We.MULTIPLY]=[s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.SCREEN]=[s.ONE,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.OVERLAY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.DARKEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.LIGHTEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.COLOR_DODGE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.COLOR_BURN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.HARD_LIGHT]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.SOFT_LIGHT]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.DIFFERENCE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.EXCLUSION]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.HUE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.SATURATION]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.COLOR]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.LUMINOSITY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.NONE]=[0,0],e[We.NORMAL_NPM]=[s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.ADD_NPM]=[s.SRC_ALPHA,s.ONE,s.ONE,s.ONE],e[We.SCREEN_NPM]=[s.SRC_ALPHA,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[We.SRC_IN]=[s.DST_ALPHA,s.ZERO],e[We.SRC_OUT]=[s.ONE_MINUS_DST_ALPHA,s.ZERO],e[We.SRC_ATOP]=[s.DST_ALPHA,s.ONE_MINUS_SRC_ALPHA],e[We.DST_OVER]=[s.ONE_MINUS_DST_ALPHA,s.ONE],e[We.DST_IN]=[s.ZERO,s.SRC_ALPHA],e[We.DST_OUT]=[s.ZERO,s.ONE_MINUS_SRC_ALPHA],e[We.DST_ATOP]=[s.ONE_MINUS_DST_ALPHA,s.SRC_ALPHA],e[We.XOR]=[s.ONE_MINUS_DST_ALPHA,s.ONE_MINUS_SRC_ALPHA],e[We.SUBTRACT]=[s.ONE,s.ONE,s.ONE,s.ONE,s.FUNC_REVERSE_SUBTRACT,s.FUNC_ADD],e}const nE=0,rE=1,oE=2,aE=3,lE=4,cE=5,Ub=class Zf{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=We.NONE,this._blendEq=!1,this.map=[],this.map[nE]=this.setBlend,this.map[rE]=this.setOffset,this.map[oE]=this.setCullFace,this.map[aE]=this.setDepthTest,this.ma Line truncated
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -545,7 +545,7 @@ void main(void)
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`;const vE=pE,jb=gE;class Hb{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=ci.HIGH?this.multisample=ci.HIGH:t>=ci.MEDIUM?this.multisample=ci.MEDIUM:t>=ci.LOW?this.multisample=ci.LOW:this.multisample=ci.NONE}destroy(){}}Hb.extension={type:ke.RendererSystem,name:"_multisample"};$e.add(Hb);class yE{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Wb{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:n}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,i){const{gl:n,CONTEXT_UID:r}=this;i=i||0;const o=e._glBuffers[r]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,t||0,o.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,t.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),i&&(t||n.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;i<t.length;i++)this.dispose(this.managedBuffers[t[i]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:i}=this;return e._glBuffers[t]=new yE(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}Wb.extension={type:ke.RendererSystem,name:"buffer"};$e.add(Wb);class zb{constructor(e){this.renderer=e}render(e,t){const i=this.renderer;let n,r,o,a;if(t&&(n=t.renderTexture,r=t.clear,o=t.transform,a=t.skipUpdateTransform),this.renderingToScreen=!n,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=o,!i.context.isLost){if(n||(this.lastObjectRendered=e),!a){const c=e.enableTempParent();e.updateTransform(),e.disableTempParent(c)}i.renderTexture.bind(n),i.batch.currentRenderer.start(),(r??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),n&&(t.blit&&i.framebuffer.blit(),n.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}zb.extension={type:ke.RendererSystem,name:"objectRenderer"};$e.add(zb);const Fc=class Jf extends uE{constructor(e){super(),this.type=zx.WEBGL,e=Object.assign({},Be.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new Bs({projectionMatrix:new Ft},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Jf.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(mt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=Jf.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:V_()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return Line truncated
`;const vE=pE,jb=gE;class Hb{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=ci.HIGH?this.multisample=ci.HIGH:t>=ci.MEDIUM?this.multisample=ci.MEDIUM:t>=ci.LOW?this.multisample=ci.LOW:this.multisample=ci.NONE}destroy(){}}Hb.extension={type:ke.RendererSystem,name:"_multisample"};$e.add(Hb);class yE{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Wb{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:n}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,i){const{gl:n,CONTEXT_UID:r}=this;i=i||0;const o=e._glBuffers[r]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,t||0,o.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,t.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),i&&(t||n.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;i<t.length;i++)this.dispose(this.managedBuffers[t[i]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:i}=this;return e._glBuffers[t]=new yE(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}Wb.extension={type:ke.RendererSystem,name:"buffer"};$e.add(Wb);class zb{constructor(e){this.renderer=e}render(e,t){const i=this.renderer;let n,r,o,a;if(t&&(n=t.renderTexture,r=t.clear,o=t.transform,a=t.skipUpdateTransform),this.renderingToScreen=!n,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=o,!i.context.isLost){if(n||(this.lastObjectRendered=e),!a){const l=e.enableTempParent();e.updateTransform(),e.disableTempParent(l)}i.renderTexture.bind(n),i.batch.currentRenderer.start(),(r??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),n&&(t.blit&&i.framebuffer.blit(),n.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}zb.extension={type:ke.RendererSystem,name:"objectRenderer"};$e.add(zb);const Fc=class Jf extends uE{constructor(e){super(),this.type=zx.WEBGL,e=Object.assign({},Be.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new Bs({projectionMatrix:new Ft},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Jf.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(mt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=Jf.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:V_()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return Line truncated
uniform sampler2D uSampler;
uniform float uAlpha;
@@ -555,7 +555,7 @@ void main(void)
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
}
`;class IE extends Vi{constructor(e=1){super(vE,AE,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}const RE={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},PE=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
`);function kE(s){const e=RE[s],t=e.length;let i=PE,n="";const r="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let o;for(let a=0;a<s;a++){let c=r.replace("%index%",a.toString());o=a,a>=t&&(o=s-a-1),c=c.replace("%value%",e[o].toString()),n+=c,n+=`
`);function kE(s){const e=RE[s],t=e.length;let i=PE,n="";const r="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let o;for(let a=0;a<s;a++){let l=r.replace("%index%",a.toString());o=a,a>=t&&(o=s-a-1),l=l.replace("%value%",e[o].toString()),n+=l,n+=`
`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}const FE=`
attribute vec2 aVertexPosition;
@@ -587,7 +587,7 @@ void main(void)
vec2 textureCoord = filterTextureCoord();
%blur%
}`;function OE(s,e){const t=Math.ceil(s/2);let i=FE,n="",r;e?r="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":r="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let o=0;o<s;o++){let a=r.replace("%index%",o.toString());a=a.replace("%sampleIndex%",`${o-(t-1)}.0`),n+=a,n+=`
`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}class nm extends Vi{constructor(e,t=8,i=4,n=Vi.defaultResolution,r=5){const o=OE(r,e),a=kE(r);super(o,a),this.horizontal=e,this.resolution=n,this._quality=0,this.quality=i,this.blur=t}apply(e,t,i,n){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/t.width):this.uniforms.strength=1/i.height*(i.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,i,n);else{const r=e.getFilterTexture(),o=e.renderer;let a=t,c=r;this.state.blend=!1,e.applyFilter(this,a,c,en.CLEAR);for(let l=1;l<this.passes-1;l++){e.bindAndClear(a,en.BLIT),this.uniforms.uSampler=c;const h=c;c=a,a=h,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,c,i,n),e.returnFilterTexture(r)}}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}}class LE extends Vi{constructor(e=8,t=4,i=Vi.defaultResolution,n=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new nm(!0,e,t,i,n),this.blurYFilter=new nm(!1,e,t,i,n),this.resolution=i,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,i,n){const r=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(r&&o){const a=e.getFilterTexture();this.blurXFilter.apply(e,t,a,en.CLEAR),this.blurYFilter.apply(e,a,i,n),e.returnFilterTexture(a)}else o?this.blurYFilter.apply(e,t,i,n):this.blurXFilter.apply(e,t,i,n)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(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 blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}}var BE=`varying vec2 vTextureCoord;
`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}class nm extends Vi{constructor(e,t=8,i=4,n=Vi.defaultResolution,r=5){const o=OE(r,e),a=kE(r);super(o,a),this.horizontal=e,this.resolution=n,this._quality=0,this.quality=i,this.blur=t}apply(e,t,i,n){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/t.width):this.uniforms.strength=1/i.height*(i.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,i,n);else{const r=e.getFilterTexture(),o=e.renderer;let a=t,l=r;this.state.blend=!1,e.applyFilter(this,a,l,en.CLEAR);for(let c=1;c<this.passes-1;c++){e.bindAndClear(a,en.BLIT),this.uniforms.uSampler=l;const h=l;l=a,a=h,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,l,i,n),e.returnFilterTexture(r)}}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}}class LE extends Vi{constructor(e=8,t=4,i=Vi.defaultResolution,n=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new nm(!0,e,t,i,n),this.blurYFilter=new nm(!1,e,t,i,n),this.resolution=i,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,i,n){const r=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(r&&o){const a=e.getFilterTexture();this.blurXFilter.apply(e,t,a,en.CLEAR),this.blurYFilter.apply(e,a,i,n),e.returnFilterTexture(a)}else o?this.blurYFilter.apply(e,t,i,n):this.blurXFilter.apply(e,t,i,n)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(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 blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}}var BE=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float m[20];
uniform float uAlpha;
@@ -639,7 +639,7 @@ void main(void)
gl_FragColor = vec4(rgb, result.a);
}
`;class rm extends Vi{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(jb,BE,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){const[i,n,r]=At.shared.setValue(e).toArray(),o=[i,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(o,t)}greyscale(e,t){const i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const i=Math.cos(e),n=Math.sin(e),r=Math.sqrt,o=1/3,a=r(o),c=i+(1-i)*o,l=o*(1-i)-a*n,h=o*(1-i)+a*n,u=o*(1-i)+a*n,d=i+o*(1-i),f=o*(1-i)-a*n,m=o*(1-i)-a*n,p=o*(1-i)+a*n,g=i+o*(1-i),x=[c,l,h,0,0,u,d,f,0,0,m,p,g,0,0,0,0,0,1,0];this._loadMatrix(x,t)}contrast(e,t){const i=(e||0)+1,n=-.5*(i-1),r=[i,0,0,0,n,0,i,0,0,n,0,0,i,0,n,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const i=e*2/3+1,n=(i-1)*-.5,r=[i,n,n,0,0,n,i,n,0,0,n,n,i,0,0,0,0,0,1,0];this._loadMatrix(r,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,n,r){e=e||.2,t=t||.15,i=i||16770432,n=n||3375104;const o=At.shared,[a,c,l]=o.setValue(i).toArray(),[h,u,d]=o.setValue(n).toArray(),f=[.3,.59,.11,0,0,a,c,l,e,0,h,u,d,t,0,a-h,c-u,l-d,0,0];this._loadMatrix(f,r)}night(e,t){e=e||.1;const i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){const i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}rm.prototype.grayscale=rm.prototype.greyscale;var NE=`varying vec2 vFilterCoord;
`;class rm extends Vi{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(jb,BE,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){const[i,n,r]=At.shared.setValue(e).toArray(),o=[i,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(o,t)}greyscale(e,t){const i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const i=Math.cos(e),n=Math.sin(e),r=Math.sqrt,o=1/3,a=r(o),l=i+(1-i)*o,c=o*(1-i)-a*n,h=o*(1-i)+a*n,u=o*(1-i)+a*n,d=i+o*(1-i),f=o*(1-i)-a*n,m=o*(1-i)-a*n,p=o*(1-i)+a*n,g=i+o*(1-i),x=[l,c,h,0,0,u,d,f,0,0,m,p,g,0,0,0,0,0,1,0];this._loadMatrix(x,t)}contrast(e,t){const i=(e||0)+1,n=-.5*(i-1),r=[i,0,0,0,n,0,i,0,0,n,0,0,i,0,n,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const i=e*2/3+1,n=(i-1)*-.5,r=[i,n,n,0,0,n,i,n,0,0,n,n,i,0,0,0,0,0,1,0];this._loadMatrix(r,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,n,r){e=e||.2,t=t||.15,i=i||16770432,n=n||3375104;const o=At.shared,[a,l,c]=o.setValue(i).toArray(),[h,u,d]=o.setValue(n).toArray(),f=[.3,.59,.11,0,0,a,l,c,e,0,h,u,d,t,0,a-h,l-u,c-d,0,0];this._loadMatrix(f,r)}night(e,t){e=e||.1;const i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){const i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}rm.prototype.grayscale=rm.prototype.greyscale;var NE=`varying vec2 vFilterCoord;
varying vec2 vTextureCoord;
uniform vec2 scale;
@@ -885,8 +885,8 @@ void main()
gl_FragColor = color;
}
`;class GE extends Vi{constructor(e=.5,t=Math.random()){super(jb,YE,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const hv={AlphaFilter:IE,BlurFilter:LE,BlurFilterPass:nm,ColorMatrixFilter:rm,DisplacementFilter:UE,FXAAFilter:VE,NoiseFilter:GE};Object.entries(hv).forEach(([s,e])=>{Object.defineProperty(hv,s,{get(){return mt("7.1.0",`filters.${s} has moved to ${s}`),e}})});class jE{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(Yi.system.add(this.tickerUpdate,this,uo.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Yi.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const mr=new jE;class Pl{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Pl.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new St,this.page=new St,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,n,r){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class ch extends Pl{constructor(){super(...arguments),this.client=new St,this.movement=new St,this.offset=new St,this.global=new St,this.screen=new St}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,n,r,o,a,c,l,h,u,d,f,m,p){throw new Error("Method not implemented.")}}class Cs extends ch{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class ea extends ch{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}ea.DOM_DELTA_PIXEL=0,ea.DOM_DELTA_LINE=1,ea.DOM_DELTA_PAGE=2;const HE=2048,WE=new St,qd=new St;class zE{constructor(e){this.dispatch=new Rl,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerle Line truncated
${u}`)}});return await Promise.all(c),r?n[o[0].src]:n}async unload(e){const t=As(e,i=>({alias:[i],src:i})).map(async i=>{var o,a;const n=si.toAbsolute(i.src),r=this.promiseCache[n];if(r){const c=await r.promise;delete this.promiseCache[n],(a=(o=r.parser)==null?void 0:o.unload)==null||a.call(o,c,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var os=(s=>(s[s.Low=0]="Low",s[s.Normal=1]="Normal",s[s.High=2]="High",s))(os||{});const cA=".json",hA="application/json",uA={extension:{type:ke.LoadParser,priority:os.Low},name:"loadJson",test(s){return ya(s,hA)||Ki(s,cA)},async load(s){return await(await Be.ADAPTER.fetch(s)).json()}};$e.add(uA);const dA=".txt",fA="text/plain",mA={name:"loadTxt",extension:{type:ke.LoadParser,priority:os.Low},test(s){return ya(s,fA)||Ki(s,dA)},async load(s){return await(await Be.ADAPTER.fetch(s)).text()}};$e.add(mA);const pA=["normal","bold","100","200","300","400","500","600","700","800","900"],gA=[".ttf",".otf",".woff",".woff2"],vA=["font/ttf","font/otf","font/woff","font/woff2"],yA=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function xA(s){const e=si.extname(s),t=si.basename(s,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let i=t.length>0;for(const r of t)if(!r.match(yA)){i=!1;break}let n=t.join(" ");return i||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}const bA=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function wA(s){return bA.test(s)?s:encodeURI(s)}const SA={extension:{type:ke.LoadParser,priority:os.Low},name:"loadWebFont",test(s){return ya(s,vA)||Ki(s,gA)},async load(s,e){var i,n,r;const t=Be.ADAPTER.getFontFaceSet();if(t){const o=[],a=((i=e.data)==null?void 0:i.family)??xA(s),c=((r=(n=e.data)==null?void 0:n.weights)==null?void 0:r.filter(h=>pA.includes(h)))??["normal"],l=e.data??{};for(let h=0;h<c.length;h++){const u=c[h],d=new FontFace(a,`url(${wA(s)})`,{...l,weight:u});await d.load(),t.add(d),o.push(d)}return o.length===1?o[0]:o}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(s){(Array.isArray(s)?s:[s]).forEach(e=>Be.ADAPTER.getFontFaceSet().delete(e))}};$e.add(SA);const MA=`(function() {
`;class GE extends Vi{constructor(e=.5,t=Math.random()){super(jb,YE,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const hv={AlphaFilter:IE,BlurFilter:LE,BlurFilterPass:nm,ColorMatrixFilter:rm,DisplacementFilter:UE,FXAAFilter:VE,NoiseFilter:GE};Object.entries(hv).forEach(([s,e])=>{Object.defineProperty(hv,s,{get(){return mt("7.1.0",`filters.${s} has moved to ${s}`),e}})});class jE{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(Yi.system.add(this.tickerUpdate,this,uo.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Yi.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const mr=new jE;class Pl{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Pl.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new St,this.page=new St,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,n,r){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class ch extends Pl{constructor(){super(...arguments),this.client=new St,this.movement=new St,this.offset=new St,this.global=new St,this.screen=new St}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,n,r,o,a,l,c,h,u,d,f,m,p){throw new Error("Method not implemented.")}}class Cs extends ch{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class ea extends ch{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}ea.DOM_DELTA_PIXEL=0,ea.DOM_DELTA_LINE=1,ea.DOM_DELTA_PAGE=2;const HE=2048,WE=new St,qd=new St;class zE{constructor(e){this.dispatch=new Rl,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerle Line truncated
${u}`)}});return await Promise.all(l),r?n[o[0].src]:n}async unload(e){const t=As(e,i=>({alias:[i],src:i})).map(async i=>{var o,a;const n=si.toAbsolute(i.src),r=this.promiseCache[n];if(r){const l=await r.promise;delete this.promiseCache[n],(a=(o=r.parser)==null?void 0:o.unload)==null||a.call(o,l,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var os=(s=>(s[s.Low=0]="Low",s[s.Normal=1]="Normal",s[s.High=2]="High",s))(os||{});const cA=".json",hA="application/json",uA={extension:{type:ke.LoadParser,priority:os.Low},name:"loadJson",test(s){return xa(s,hA)||Ki(s,cA)},async load(s){return await(await Be.ADAPTER.fetch(s)).json()}};$e.add(uA);const dA=".txt",fA="text/plain",mA={name:"loadTxt",extension:{type:ke.LoadParser,priority:os.Low},test(s){return xa(s,fA)||Ki(s,dA)},async load(s){return await(await Be.ADAPTER.fetch(s)).text()}};$e.add(mA);const pA=["normal","bold","100","200","300","400","500","600","700","800","900"],gA=[".ttf",".otf",".woff",".woff2"],vA=["font/ttf","font/otf","font/woff","font/woff2"],yA=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function xA(s){const e=si.extname(s),t=si.basename(s,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let i=t.length>0;for(const r of t)if(!r.match(yA)){i=!1;break}let n=t.join(" ");return i||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}const bA=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function wA(s){return bA.test(s)?s:encodeURI(s)}const SA={extension:{type:ke.LoadParser,priority:os.Low},name:"loadWebFont",test(s){return xa(s,vA)||Ki(s,gA)},async load(s,e){var i,n,r;const t=Be.ADAPTER.getFontFaceSet();if(t){const o=[],a=((i=e.data)==null?void 0:i.family)??xA(s),l=((r=(n=e.data)==null?void 0:n.weights)==null?void 0:r.filter(h=>pA.includes(h)))??["normal"],c=e.data??{};for(let h=0;h<l.length;h++){const u=l[h],d=new FontFace(a,`url(${wA(s)})`,{...c,weight:u});await d.load(),t.add(d),o.push(d)}return o.length===1?o[0]:o}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(s){(Array.isArray(s)?s:[s]).forEach(e=>Be.ADAPTER.getFontFaceSet().delete(e))}};$e.add(SA);const MA=`(function() {
"use strict";
const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
async function checkImageBitmap() {
@@ -929,8 +929,8 @@ ${u}`)}});return await Promise.all(c),r?n[o[0].src]:n}async unload(e){const t=As
}
};
})();
`;let ia=null;class r1{constructor(){ia||(ia=URL.createObjectURL(new Blob([TA],{type:"application/javascript"}))),this.worker=new Worker(ia)}}r1.revokeObjectURL=function(){ia&&(URL.revokeObjectURL(ia),ia=null)};let pv=0,Kd;class _A{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new hm;t.addEventListener("message",i=>{t.terminate(),hm.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){Kd===void 0&&(Kd=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<Kd&&(this._createdWorkers++,e=new r1().worker,e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((n,r)=>{this.queue.push({id:e,arguments:t,resolve:n,reject:r})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[pv]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:pv++,id:i})}}const gv=new _A;function kl(s,e,t){s.resource.internal=!0;const i=new Ke(s),n=()=>{delete e.promiseCache[t],qr.has(t)&&qr.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),n())}),i.once("destroyed",()=>{s.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),i}const CA=[".jpeg",".jpg",".png",".webp",".avif"],EA=["image/jpeg","image/png","image/webp","image/avif"];async function AA(s){const e=await Be.ADAPTER.fetch(s);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${s}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const du={name:"loadTextures",extension:{type:ke.LoadParser,priority:os.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(s){return ya(s,EA)||Ki(s,CA)},async load(s,e,t){var a;const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let n;i?this.config.preferWorkers&&await gv.isImageBitmapSupported()?n=await gv.loadImageBitmap(s):n=await AA(s):n=await new Promise((c,l)=>{const h=new Image;h.crossOrigin=this.config.crossOrigin,h.src=s,h.complete?c(h):(h.onload=()=>c(h),h.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=Hn(s)),i&&((a=r.resourceOptions)==null?void 0:a.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const o=new it(n,r);return o.resource.src=s,kl(o,t,s)},unload(s){s.destroy(!0)}};$e.add(du);const IA=".svg",RA="image/svg+xml",PA={extension:{type:ke.LoadParser,priority:os.High},name:"loadSVG",test(s){return ya(s,RA)||Ki(s,IA)},async testParse(s){return em.test(s)},async parse(s,e,t){var r;const i=new em(s,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await i.load();const n=new it(i,{resolution:Hn(s),...e==null?void 0:e.data});return n.resource.src=e.src,kl(n,t,e.src)},async load(s,e){return(await Be.ADAPTER.fetch(s)).text()},unload:du.unload};$e.add(PA);const kA=[".mp4",".m4v",".webm",".ogv"],FA=["video/mp4","video/webm","video/ogg"],OA={name:"loadVideo",extension:{type:ke.LoadParser,priority:os.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(s){return ya(s,FA)||Ki(s,kA)},async load(s,e,t){var o;let i;const n=await(await Be.ADAPTER.fetch(s)).blob(),r=URL.createObjectURL(n);try{const a={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(o=e==null?void 0:e.data)==null?void 0:o.resourceOptions,autoLoad:!0},c=new Zb(r,a);await c.load();const l=new it(c,{alphaMode:await X_(),resolution:Hn(s),...e==null?void 0:e.data});l.resource.src=s,i=kl(l,t,s),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(a){throw URL.revokeObjectURL(r),a}return i},unload(s){s.destroy(!0)}};$e.add(OA);class LA{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId= Line truncated
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),o.push({alias:e,src:t,data:i,format:n,loadParser:r})):Array.isArray(e)?o.push(...e):o.push(e);let a;a=c=>{this.hasKey(c)&&console.warn(`[Resolver] already has key: ${c} overwriting`)},As(o).forEach(c=>{const{src:l,srcs:h}=c;let{data:u,format:d,loadParser:f}=c;const m=As(l||h).map(x=>typeof x=="string"?oA(x):Array.isArray(x)?x:[x]),p=this.getAlias(c);Array.isArray(p)?p.forEach(a):a(p);const g=[];m.forEach(x=>{x.forEach(v=>{let y={};if(typeof v!="object"){y.src=v;for(let S=0;S<this._parsers.length;S++){const C=this._parsers[S];if(C.test(v)){y=C.parse(v);break}}}else u=v.data??u,d=v.format??d,f=v.loadParser??f,y={...y,...v};if(!p)throw new Error(`[Resolver] alias is undefined for this asset: ${y.src}`);y=this.buildResolvedAsset(y,{aliases:p,data:u,format:d,loadParser:f}),g.push(y)})}),p.forEach(x=>{this._assetMap[x]=g})})}resolveBundle(e){const t=uh(e);e=As(e);const i={};return e.forEach(n=>{const r=this._bundles[n];if(r){const o=this.resolve(r),a={};for(const c in o){const l=o[c];a[this._extractAssetIdFromBundle(n,c)]=l}i[n]=a}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const n in t)i[n]=t[n].src;return i}return t.src}resolve(e){const t=uh(e);e=As(e);const i={};return e.forEach(n=>{if(!this._resolverHash[n])if(this._assetMap[n]){let r=this._assetMap[n];const o=r[0],a=this._getPreferredOrder(r);a==null||a.priority.forEach(c=>{a.params[c].forEach(l=>{const h=r.filter(u=>u[c]?u[c]===l:!1);h.length&&(r=h)})}),this._resolverHash[n]=r[0]??o}else this._resolverHash[n]=this.buildResolvedAsset({alias:[n],src:n},{});i[n]=this._resolverHash[n]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const i=e[0],n=this._preferredOrder.find(r=>r.params.format.includes(i.format));if(n)return n}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:n,loadParser:r,format:o}=t;return(this._basePath||this._rootPath)&&(e.src=si.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...n||{},...e.data},e.loadParser=r??e.loadParser,e.format=o??e.format??si.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class BA{constructor(){this._detections=[],this._initialized=!1,this.resolver=new LA,this.loader=new lA,this.cache=qr,this._backgroundLoader=new rA(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,o;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let a=e.manifest;typeof a=="string"&&(a=await this.load(a)),this.resolver.addManifest(a)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,i=typeof t=="number"?[t]:t,n=await this._detectFormats({preferredFormats:(o=e.texturePreference)==null?void 0:o.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:n,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,n,r){this.resolver.add(e,t,i,n,r)}async load(e,t){this._initialized||await this.init();const i=uh(e),n=As(e).map(a=>{if(typeof a!="string"){const c=this.resolver.getAlias(a);return c.some(l=>!this.resolver.hasKey(l))&&this.add(a),Array.isArray(c)?c[0]:c}return this.resolver.hasKey(a)||this.add({alias:a,src:a}),a}),r=this.resolver.resolve(n),o=await this._mapLoadToResolve(r,t);return i?o[n[0]]:o}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const n=this.resolver.resolveBundle(e),r={},o=Object.keys(n);let a=0,c=0;const l=()=>{t==null||t(++a/c)},h=o.map(u=>{const d=n[u];return c+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{r[u]=f})});return await Promise.all(h),i?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return qr.get(e);const t={};for(let i=0;i<e.length;i++)t[i]=qr.get(e[i]);return t}async _mapLoadToResolve(e,t){const i=Object.values(e),n=Object.keys(e);this._backgroundLoader.active=!1;co Line truncated
`;let ia=null;class r1{constructor(){ia||(ia=URL.createObjectURL(new Blob([TA],{type:"application/javascript"}))),this.worker=new Worker(ia)}}r1.revokeObjectURL=function(){ia&&(URL.revokeObjectURL(ia),ia=null)};let pv=0,Kd;class _A{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new hm;t.addEventListener("message",i=>{t.terminate(),hm.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){Kd===void 0&&(Kd=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<Kd&&(this._createdWorkers++,e=new r1().worker,e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((n,r)=>{this.queue.push({id:e,arguments:t,resolve:n,reject:r})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[pv]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:pv++,id:i})}}const gv=new _A;function kl(s,e,t){s.resource.internal=!0;const i=new Ke(s),n=()=>{delete e.promiseCache[t],qr.has(t)&&qr.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),n())}),i.once("destroyed",()=>{s.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),i}const CA=[".jpeg",".jpg",".png",".webp",".avif"],EA=["image/jpeg","image/png","image/webp","image/avif"];async function AA(s){const e=await Be.ADAPTER.fetch(s);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${s}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const du={name:"loadTextures",extension:{type:ke.LoadParser,priority:os.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(s){return xa(s,EA)||Ki(s,CA)},async load(s,e,t){var a;const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let n;i?this.config.preferWorkers&&await gv.isImageBitmapSupported()?n=await gv.loadImageBitmap(s):n=await AA(s):n=await new Promise((l,c)=>{const h=new Image;h.crossOrigin=this.config.crossOrigin,h.src=s,h.complete?l(h):(h.onload=()=>l(h),h.onerror=u=>c(u))});const r={...e.data};r.resolution??(r.resolution=Hn(s)),i&&((a=r.resourceOptions)==null?void 0:a.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const o=new tt(n,r);return o.resource.src=s,kl(o,t,s)},unload(s){s.destroy(!0)}};$e.add(du);const IA=".svg",RA="image/svg+xml",PA={extension:{type:ke.LoadParser,priority:os.High},name:"loadSVG",test(s){return xa(s,RA)||Ki(s,IA)},async testParse(s){return em.test(s)},async parse(s,e,t){var r;const i=new em(s,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await i.load();const n=new tt(i,{resolution:Hn(s),...e==null?void 0:e.data});return n.resource.src=e.src,kl(n,t,e.src)},async load(s,e){return(await Be.ADAPTER.fetch(s)).text()},unload:du.unload};$e.add(PA);const kA=[".mp4",".m4v",".webm",".ogv"],FA=["video/mp4","video/webm","video/ogg"],OA={name:"loadVideo",extension:{type:ke.LoadParser,priority:os.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(s){return xa(s,FA)||Ki(s,kA)},async load(s,e,t){var o;let i;const n=await(await Be.ADAPTER.fetch(s)).blob(),r=URL.createObjectURL(n);try{const a={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(o=e==null?void 0:e.data)==null?void 0:o.resourceOptions,autoLoad:!0},l=new Zb(r,a);await l.load();const c=new tt(l,{alphaMode:await X_(),resolution:Hn(s),...e==null?void 0:e.data});c.resource.src=s,i=kl(c,t,s),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(a){throw URL.revokeObjectURL(r),a}return i},unload(s){s.destroy(!0)}};$e.add(OA);class LA{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId= Line truncated
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),o.push({alias:e,src:t,data:i,format:n,loadParser:r})):Array.isArray(e)?o.push(...e):o.push(e);let a;a=l=>{this.hasKey(l)&&console.warn(`[Resolver] already has key: ${l} overwriting`)},As(o).forEach(l=>{const{src:c,srcs:h}=l;let{data:u,format:d,loadParser:f}=l;const m=As(c||h).map(x=>typeof x=="string"?oA(x):Array.isArray(x)?x:[x]),p=this.getAlias(l);Array.isArray(p)?p.forEach(a):a(p);const g=[];m.forEach(x=>{x.forEach(v=>{let y={};if(typeof v!="object"){y.src=v;for(let w=0;w<this._parsers.length;w++){const _=this._parsers[w];if(_.test(v)){y=_.parse(v);break}}}else u=v.data??u,d=v.format??d,f=v.loadParser??f,y={...y,...v};if(!p)throw new Error(`[Resolver] alias is undefined for this asset: ${y.src}`);y=this.buildResolvedAsset(y,{aliases:p,data:u,format:d,loadParser:f}),g.push(y)})}),p.forEach(x=>{this._assetMap[x]=g})})}resolveBundle(e){const t=uh(e);e=As(e);const i={};return e.forEach(n=>{const r=this._bundles[n];if(r){const o=this.resolve(r),a={};for(const l in o){const c=o[l];a[this._extractAssetIdFromBundle(n,l)]=c}i[n]=a}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const n in t)i[n]=t[n].src;return i}return t.src}resolve(e){const t=uh(e);e=As(e);const i={};return e.forEach(n=>{if(!this._resolverHash[n])if(this._assetMap[n]){let r=this._assetMap[n];const o=r[0],a=this._getPreferredOrder(r);a==null||a.priority.forEach(l=>{a.params[l].forEach(c=>{const h=r.filter(u=>u[l]?u[l]===c:!1);h.length&&(r=h)})}),this._resolverHash[n]=r[0]??o}else this._resolverHash[n]=this.buildResolvedAsset({alias:[n],src:n},{});i[n]=this._resolverHash[n]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const i=e[0],n=this._preferredOrder.find(r=>r.params.format.includes(i.format));if(n)return n}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:n,loadParser:r,format:o}=t;return(this._basePath||this._rootPath)&&(e.src=si.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...n||{},...e.data},e.loadParser=r??e.loadParser,e.format=o??e.format??si.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class BA{constructor(){this._detections=[],this._initialized=!1,this.resolver=new LA,this.loader=new lA,this.cache=qr,this._backgroundLoader=new rA(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,o;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let a=e.manifest;typeof a=="string"&&(a=await this.load(a)),this.resolver.addManifest(a)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,i=typeof t=="number"?[t]:t,n=await this._detectFormats({preferredFormats:(o=e.texturePreference)==null?void 0:o.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:n,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,n,r){this.resolver.add(e,t,i,n,r)}async load(e,t){this._initialized||await this.init();const i=uh(e),n=As(e).map(a=>{if(typeof a!="string"){const l=this.resolver.getAlias(a);return l.some(c=>!this.resolver.hasKey(c))&&this.add(a),Array.isArray(l)?l[0]:l}return this.resolver.hasKey(a)||this.add({alias:a,src:a}),a}),r=this.resolver.resolve(n),o=await this._mapLoadToResolve(r,t);return i?o[n[0]]:o}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const n=this.resolver.resolveBundle(e),r={},o=Object.keys(n);let a=0,l=0;const c=()=>{t==null||t(++a/l)},h=o.map(u=>{const d=n[u];return l+=Object.keys(d).length,this._mapLoadToResolve(d,c).then(f=>{r[u]=f})});return await Promise.all(h),i?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return qr.get(e);const t={};for(let i=0;i<e.length;i++)t[i]=qr.get(e[i]);return t}async _mapLoadToResolve(e,t){const i=Object.values(e),n=Object.keys(e);this._backgroundLoader.active=!1;co Line truncated
uniform vec4 uColor;
uniform sampler2D uSampler;
@@ -954,7 +954,7 @@ void main(void)
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
}
`;class ph extends Ns{constructor(e,t){const i={uSampler:e,alpha:1,uTextureMatrix:Ft.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(i,t.uniforms),super(t.program||an.from(kI,PI),i),this._colorDirty=!1,this.uvMatrix=new vp(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new At(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const e=this.texture.baseTexture.alphaMode;At.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class FI extends bl{constructor(e=Ke.EMPTY,t,i,n,r){const o=new Mp(t,i,n);o.getBuffer("aVertexPosition").static=!1;const a=new ph(e);super(o,a,null,r),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class Av{constructor(e,t,i){this.geometry=new fn,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(let n=0;n<e.length;++n){let r=e[n];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||Ue.FLOAT,offset:r.offset},t[n]?this.dynamicProperties.push(r):this.staticProperties.push(r)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let t=0;this.indexBuffer=new $t(tC(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];a.offset=t,t+=a.size,this.dynamicStride+=a.size}const i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=new $t(this.dynamicData,!1,!1);let n=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];a.offset=n,n+=a.size,this.staticStride+=a.size}const r=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(r),this.staticDataUint32=new Uint32Array(r),this.staticBuffer=new $t(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];e.addAttribute(a.attributeName,this.dynamicBuffer,0,a.type===Ue.UNSIGNED_BYTE,a.type,this.dynamicStride*4,a.offset*4)}for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];e.addAttribute(a.attributeName,this.staticBuffer,0,a.type===Ue.UNSIGNED_BYTE,a.type,this.staticStride*4,a.offset*4)}}uploadDynamic(e,t,i){for(let n=0;n<this.dynamicProperties.length;n++){const r=this.dynamicProperties[n];r.uploadFunction(e,t,i,r.type===Ue.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,i){for(let n=0;n<this.staticProperties.length;n++){const r=this.staticProperties[n];r.uploadFunction(e,t,i,r.type===Ue.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,r.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var OI=`varying vec2 vTextureCoord;
`;class ph extends Ns{constructor(e,t){const i={uSampler:e,alpha:1,uTextureMatrix:Ft.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(i,t.uniforms),super(t.program||an.from(kI,PI),i),this._colorDirty=!1,this.uvMatrix=new vp(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new At(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const e=this.texture.baseTexture.alphaMode;At.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class FI extends wl{constructor(e=Ke.EMPTY,t,i,n,r){const o=new Mp(t,i,n);o.getBuffer("aVertexPosition").static=!1;const a=new ph(e);super(o,a,null,r),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class Av{constructor(e,t,i){this.geometry=new fn,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(let n=0;n<e.length;++n){let r=e[n];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||Ue.FLOAT,offset:r.offset},t[n]?this.dynamicProperties.push(r):this.staticProperties.push(r)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let t=0;this.indexBuffer=new $t(tC(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];a.offset=t,t+=a.size,this.dynamicStride+=a.size}const i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=new $t(this.dynamicData,!1,!1);let n=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];a.offset=n,n+=a.size,this.staticStride+=a.size}const r=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(r),this.staticDataUint32=new Uint32Array(r),this.staticBuffer=new $t(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];e.addAttribute(a.attributeName,this.dynamicBuffer,0,a.type===Ue.UNSIGNED_BYTE,a.type,this.dynamicStride*4,a.offset*4)}for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];e.addAttribute(a.attributeName,this.staticBuffer,0,a.type===Ue.UNSIGNED_BYTE,a.type,this.staticStride*4,a.offset*4)}}uploadDynamic(e,t,i){for(let n=0;n<this.dynamicProperties.length;n++){const r=this.dynamicProperties[n];r.uploadFunction(e,t,i,r.type===Ue.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,i){for(let n=0;n<this.staticProperties.length;n++){const r=this.staticProperties[n];r.uploadFunction(e,t,i,r.type===Ue.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,r.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var OI=`varying vec2 vTextureCoord;
varying vec4 vColor;
uniform sampler2D uSampler;
@@ -987,8 +987,8 @@ void main(void){
vTextureCoord = aTextureCoord;
vColor = aColor * uColor;
}
`;class f1 extends uu{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new Ft,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:Ue.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Ns.from(LI,OI,{}),this.state=mn.for2d()}render(e){const t=e.children,i=e._maxSize,n=e._batchSize,r=this.renderer;let o=t.length;if(o===0)return;o>i&&!e.autoResize&&(o=i);let a=e._buffers;a||(a=e._buffers=this.generateBuffers(e));const c=t[0]._texture.baseTexture,l=c.alphaMode>0;this.state.blendMode=ub(e.blendMode,l),r.state.set(this.state);const h=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=At.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=c,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,m=0;f<o;f+=n,m+=1){let p=o-f;p>n&&(p=n),m>=a.length&&a.push(this._generateOneMoreBuffer(e));const g=a[m];g.uploadDynamic(t,f,p);const x=e._bufferUpdateIDs[m]||0;d=d||g._updateID<x,d&&(g._updateID=e._updateID,g.uploadStatic(t,f,p)),r.geometry.bind(g.geometry),h.drawElements(h.TRIANGLES,p*6,h.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],i=e._maxSize,n=e._batchSize,r=e._properties;for(let o=0;o<i;o+=n)t.push(new Av(this.properties,r,n));return t}_generateOneMoreBuffer(e){const t=e._batchSize,i=e._properties;return new Av(this.properties,i,t)}uploadVertices(e,t,i,n,r,o){let a=0,c=0,l=0,h=0;for(let u=0;u<i;++u){const d=e[t+u],f=d._texture,m=d.scale.x,p=d.scale.y,g=f.trim,x=f.orig;g?(c=g.x-d.anchor.x*x.width,a=c+g.width,h=g.y-d.anchor.y*x.height,l=h+g.height):(a=x.width*(1-d.anchor.x),c=x.width*-d.anchor.x,l=x.height*(1-d.anchor.y),h=x.height*-d.anchor.y),n[o]=c*m,n[o+1]=h*p,n[o+r]=a*m,n[o+r+1]=h*p,n[o+r*2]=a*m,n[o+r*2+1]=l*p,n[o+r*3]=c*m,n[o+r*3+1]=l*p,o+=r*4}}uploadPosition(e,t,i,n,r,o){for(let a=0;a<i;a++){const c=e[t+a].position;n[o]=c.x,n[o+1]=c.y,n[o+r]=c.x,n[o+r+1]=c.y,n[o+r*2]=c.x,n[o+r*2+1]=c.y,n[o+r*3]=c.x,n[o+r*3+1]=c.y,o+=r*4}}uploadRotation(e,t,i,n,r,o){for(let a=0;a<i;a++){const c=e[t+a].rotation;n[o]=c,n[o+r]=c,n[o+r*2]=c,n[o+r*3]=c,o+=r*4}}uploadUvs(e,t,i,n,r,o){for(let a=0;a<i;++a){const c=e[t+a]._texture._uvs;c?(n[o]=c.x0,n[o+1]=c.y0,n[o+r]=c.x1,n[o+r+1]=c.y1,n[o+r*2]=c.x2,n[o+r*2+1]=c.y2,n[o+r*3]=c.x3,n[o+r*3+1]=c.y3,o+=r*4):(n[o]=0,n[o+1]=0,n[o+r]=0,n[o+r+1]=0,n[o+r*2]=0,n[o+r*2+1]=0,n[o+r*3]=0,n[o+r*3+1]=0,o+=r*4)}}uploadTint(e,t,i,n,r,o){for(let a=0;a<i;++a){const c=e[t+a],l=At.shared.setValue(c._tintRGB).toPremultiplied(c.alpha,c.texture.baseTexture.alphaMode>0);n[o]=l,n[o+r]=l,n[o+r*2]=l,n[o+r*3]=l,o+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}f1.extension={name:"particle",type:ke.RendererPlugin};$e.add(f1);var mu=(s=>(s[s.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",s[s.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",s))(mu||{});const hc={willReadFrequently:!0},js=class Ye{static get experimentalLetterSpacingSupported(){let e=Ye._experimentalLetterSpacingSupported;if(e!==void 0){const t=Be.ADAPTER.getCanvasRenderingContext2D().prototype;e=Ye._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,n,r,o,a,c,l){this.text=e,this.style=t,this.width=i,this.height=n,this.lines=r,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=c,this.fontProperties=l}static measureText(e,t,i,n=Ye._canvas){i=i??t.wordWrap;const r=t.toFontString(),o=Ye.measureFont(r);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const a=n.getContext("2d",hc);a.font=r;const c=(i?Ye.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),l=new Array(c.length);let h=0;for(let m=0;m<c.length;m++){const p=Ye._measureText(c[m],t.letterSpacing,a);l[m]=p,h=Math.max(h,p)}let u=h+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const d=t.lineHeight||o.fontSize+t.strokeThickness;let f=Math.max(d,o.fontSize+t.strokeThickness*2)+t.leading+(c.length-1)*(d+t.leading);return t.dropShadow&&(f+=t.dropShadowDistance),new Ye(e,t,u,f,c,l,d+t.leading,h,o)}static _measureText(e,t,i){let n=!1;Ye.experimentalLetterSpacingSupported&&(Ye.experimentalLetterSpacing?(i.letterSpacing=`${t}px`,i.textLetterSpacing=`${t}px`,n=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let r=i.measureText(e).width;return r>0&&(n?r-=t:r+=(Ye.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=Ye._canvas){const n=i.getContext("2d",hc);let r=0,o="",a="";const c=Object.create(null),{letterSpacing:l,whiteSpace:h}=t,u=Ye.collapseSpaces(h),d=Ye.collapseNewlines(h);let f=!u;const m=t.wordWrapWidth+l, Line truncated
`:e,e}static getFromCache(e,t,i,n){let r=i[e];return typeof r!="number"&&(r=Ye._measureText(e,t,n)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!Ye.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:Ye._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:Ye._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let n=0;n<e.length;n++){const r=e[n],o=e[n+1];if(Ye.isBreakingSpace(r,o)||Ye.isNewline(r)){i!==""&&(t.push(i),i=""),t.push(r);continue}i+=r}return i!==""&&t.push(i),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,i,n,r){return!0}static wordWrapSplit(e){return Ye.graphemeSegmenter(e)}static measureFont(e){if(Ye._fonts[e])return Ye._fonts[e];const t={ascent:0,descent:0,fontSize:0},i=Ye._canvas,n=Ye._context;n.font=e;const r=Ye.METRICS_STRING+Ye.BASELINE_SYMBOL,o=Math.ceil(n.measureText(r).width);let a=Math.ceil(n.measureText(Ye.BASELINE_SYMBOL).width);const c=Math.ceil(Ye.HEIGHT_MULTIPLIER*a);if(a=a*Ye.BASELINE_MULTIPLIER|0,o===0||c===0)return Ye._fonts[e]=t,t;i.width=o,i.height=c,n.fillStyle="#f00",n.fillRect(0,0,o,c),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(r,0,a);const l=n.getImageData(0,0,o,c).data,h=l.length,u=o*4;let d=0,f=0,m=!1;for(d=0;d<a;++d){for(let p=0;p<u;p+=4)if(l[f+p]!==255){m=!0;break}if(!m)f+=u;else break}for(t.ascent=a-d,f=h-u,m=!1,d=c;d>a;--d){for(let p=0;p<u;p+=4)if(l[f+p]!==255){m=!0;break}if(!m)f-=u;else break}return t.descent=d-a,t.fontSize=t.ascent+t.descent,Ye._fonts[e]=t,t}static clearMetrics(e=""){e?delete Ye._fonts[e]:Ye._fonts={}}static get _canvas(){var e;if(!Ye.__canvas){let t;try{const i=new OffscreenCanvas(0,0);if((e=i.getContext("2d",hc))!=null&&e.measureText)return Ye.__canvas=i,i;t=Be.ADAPTER.createCanvas()}catch{t=Be.ADAPTER.createCanvas()}t.width=t.height=10,Ye.__canvas=t}return Ye.__canvas}static get _context(){return Ye.__context||(Ye.__context=Ye._canvas.getContext("2d",hc)),Ye.__context}};js.METRICS_STRING="|ÉqÅ",js.BASELINE_SYMBOL="M",js.BASELINE_MULTIPLIER=1.4,js.HEIGHT_MULTIPLIER=2,js.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})(),js.experimentalLetterSpacing=!1,js._fonts={},js._newlines=[10,13],js._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let hr=js;const BI=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],m1=class Ha{constructor(e){this.styleID=0,this.reset(),sf(this,e,e)}clone(){const e={};return sf(e,this,Ha.defaultStyle),new Ha(e)}reset(){sf(this,Ha.defaultStyle,Ha.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=tf(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=tf(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){NI(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._lett Line truncated
`;class f1 extends uu{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new Ft,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:Ue.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Ns.from(LI,OI,{}),this.state=mn.for2d()}render(e){const t=e.children,i=e._maxSize,n=e._batchSize,r=this.renderer;let o=t.length;if(o===0)return;o>i&&!e.autoResize&&(o=i);let a=e._buffers;a||(a=e._buffers=this.generateBuffers(e));const l=t[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=ub(e.blendMode,c),r.state.set(this.state);const h=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=At.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,c).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,m=0;f<o;f+=n,m+=1){let p=o-f;p>n&&(p=n),m>=a.length&&a.push(this._generateOneMoreBuffer(e));const g=a[m];g.uploadDynamic(t,f,p);const x=e._bufferUpdateIDs[m]||0;d=d||g._updateID<x,d&&(g._updateID=e._updateID,g.uploadStatic(t,f,p)),r.geometry.bind(g.geometry),h.drawElements(h.TRIANGLES,p*6,h.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],i=e._maxSize,n=e._batchSize,r=e._properties;for(let o=0;o<i;o+=n)t.push(new Av(this.properties,r,n));return t}_generateOneMoreBuffer(e){const t=e._batchSize,i=e._properties;return new Av(this.properties,i,t)}uploadVertices(e,t,i,n,r,o){let a=0,l=0,c=0,h=0;for(let u=0;u<i;++u){const d=e[t+u],f=d._texture,m=d.scale.x,p=d.scale.y,g=f.trim,x=f.orig;g?(l=g.x-d.anchor.x*x.width,a=l+g.width,h=g.y-d.anchor.y*x.height,c=h+g.height):(a=x.width*(1-d.anchor.x),l=x.width*-d.anchor.x,c=x.height*(1-d.anchor.y),h=x.height*-d.anchor.y),n[o]=l*m,n[o+1]=h*p,n[o+r]=a*m,n[o+r+1]=h*p,n[o+r*2]=a*m,n[o+r*2+1]=c*p,n[o+r*3]=l*m,n[o+r*3+1]=c*p,o+=r*4}}uploadPosition(e,t,i,n,r,o){for(let a=0;a<i;a++){const l=e[t+a].position;n[o]=l.x,n[o+1]=l.y,n[o+r]=l.x,n[o+r+1]=l.y,n[o+r*2]=l.x,n[o+r*2+1]=l.y,n[o+r*3]=l.x,n[o+r*3+1]=l.y,o+=r*4}}uploadRotation(e,t,i,n,r,o){for(let a=0;a<i;a++){const l=e[t+a].rotation;n[o]=l,n[o+r]=l,n[o+r*2]=l,n[o+r*3]=l,o+=r*4}}uploadUvs(e,t,i,n,r,o){for(let a=0;a<i;++a){const l=e[t+a]._texture._uvs;l?(n[o]=l.x0,n[o+1]=l.y0,n[o+r]=l.x1,n[o+r+1]=l.y1,n[o+r*2]=l.x2,n[o+r*2+1]=l.y2,n[o+r*3]=l.x3,n[o+r*3+1]=l.y3,o+=r*4):(n[o]=0,n[o+1]=0,n[o+r]=0,n[o+r+1]=0,n[o+r*2]=0,n[o+r*2+1]=0,n[o+r*3]=0,n[o+r*3+1]=0,o+=r*4)}}uploadTint(e,t,i,n,r,o){for(let a=0;a<i;++a){const l=e[t+a],c=At.shared.setValue(l._tintRGB).toPremultiplied(l.alpha,l.texture.baseTexture.alphaMode>0);n[o]=c,n[o+r]=c,n[o+r*2]=c,n[o+r*3]=c,o+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}f1.extension={name:"particle",type:ke.RendererPlugin};$e.add(f1);var mu=(s=>(s[s.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",s[s.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",s))(mu||{});const hc={willReadFrequently:!0},js=class Ge{static get experimentalLetterSpacingSupported(){let e=Ge._experimentalLetterSpacingSupported;if(e!==void 0){const t=Be.ADAPTER.getCanvasRenderingContext2D().prototype;e=Ge._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,n,r,o,a,l,c){this.text=e,this.style=t,this.width=i,this.height=n,this.lines=r,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,i,n=Ge._canvas){i=i??t.wordWrap;const r=t.toFontString(),o=Ge.measureFont(r);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const a=n.getContext("2d",hc);a.font=r;const l=(i?Ge.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),c=new Array(l.length);let h=0;for(let m=0;m<l.length;m++){const p=Ge._measureText(l[m],t.letterSpacing,a);c[m]=p,h=Math.max(h,p)}let u=h+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const d=t.lineHeight||o.fontSize+t.strokeThickness;let f=Math.max(d,o.fontSize+t.strokeThickness*2)+t.leading+(l.length-1)*(d+t.leading);return t.dropShadow&&(f+=t.dropShadowDistance),new Ge(e,t,u,f,l,c,d+t.leading,h,o)}static _measureText(e,t,i){let n=!1;Ge.experimentalLetterSpacingSupported&&(Ge.experimentalLetterSpacing?(i.letterSpacing=`${t}px`,i.textLetterSpacing=`${t}px`,n=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let r=i.measureText(e).width;return r>0&&(n?r-=t:r+=(Ge.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=Ge._canvas){const n=i.getContext("2d",hc);let r=0,o="",a="";const l=Object.create(null),{letterSpacing:c,whiteSpace:h}=t,u=Ge.collapseSpaces(h),d=Ge.collapseNewlines(h);let f=!u;const m=t.wordWrapWidth+c, Line truncated
`:e,e}static getFromCache(e,t,i,n){let r=i[e];return typeof r!="number"&&(r=Ge._measureText(e,t,n)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!Ge.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:Ge._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:Ge._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let n=0;n<e.length;n++){const r=e[n],o=e[n+1];if(Ge.isBreakingSpace(r,o)||Ge.isNewline(r)){i!==""&&(t.push(i),i=""),t.push(r);continue}i+=r}return i!==""&&t.push(i),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,i,n,r){return!0}static wordWrapSplit(e){return Ge.graphemeSegmenter(e)}static measureFont(e){if(Ge._fonts[e])return Ge._fonts[e];const t={ascent:0,descent:0,fontSize:0},i=Ge._canvas,n=Ge._context;n.font=e;const r=Ge.METRICS_STRING+Ge.BASELINE_SYMBOL,o=Math.ceil(n.measureText(r).width);let a=Math.ceil(n.measureText(Ge.BASELINE_SYMBOL).width);const l=Math.ceil(Ge.HEIGHT_MULTIPLIER*a);if(a=a*Ge.BASELINE_MULTIPLIER|0,o===0||l===0)return Ge._fonts[e]=t,t;i.width=o,i.height=l,n.fillStyle="#f00",n.fillRect(0,0,o,l),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(r,0,a);const c=n.getImageData(0,0,o,l).data,h=c.length,u=o*4;let d=0,f=0,m=!1;for(d=0;d<a;++d){for(let p=0;p<u;p+=4)if(c[f+p]!==255){m=!0;break}if(!m)f+=u;else break}for(t.ascent=a-d,f=h-u,m=!1,d=l;d>a;--d){for(let p=0;p<u;p+=4)if(c[f+p]!==255){m=!0;break}if(!m)f-=u;else break}return t.descent=d-a,t.fontSize=t.ascent+t.descent,Ge._fonts[e]=t,t}static clearMetrics(e=""){e?delete Ge._fonts[e]:Ge._fonts={}}static get _canvas(){var e;if(!Ge.__canvas){let t;try{const i=new OffscreenCanvas(0,0);if((e=i.getContext("2d",hc))!=null&&e.measureText)return Ge.__canvas=i,i;t=Be.ADAPTER.createCanvas()}catch{t=Be.ADAPTER.createCanvas()}t.width=t.height=10,Ge.__canvas=t}return Ge.__canvas}static get _context(){return Ge.__context||(Ge.__context=Ge._canvas.getContext("2d",hc)),Ge.__context}};js.METRICS_STRING="|ÉqÅ",js.BASELINE_SYMBOL="M",js.BASELINE_MULTIPLIER=1.4,js.HEIGHT_MULTIPLIER=2,js.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})(),js.experimentalLetterSpacing=!1,js._fonts={},js._newlines=[10,13],js._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let hr=js;const BI=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],m1=class Wa{constructor(e){this.styleID=0,this.reset(),sf(this,e,e)}clone(){const e={};return sf(e,this,Wa.defaultStyle),new Wa(e)}reset(){sf(this,Wa.defaultStyle,Wa.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=tf(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=tf(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){NI(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._lett Line truncated
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
@@ -1102,7 +1102,7 @@ void main(void)
vec4 texSample = texture2D(uSampler, vTextureCoord);
gl_FragColor = texSample * uColor;
}
`;const uc=new Ft;class b1 extends uu{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new _b,this.state=mn.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=Ns.from(Iv,JI,t),this.shader=e.context.webGLVersion>1?Ns.from(KI,qI,t):Ns.from(Iv,ZI,t)}render(e){const t=this.renderer,i=this.quad;let n=i.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,o=e.uvRespectAnchor?e.anchor.y:0;n=i.uvs,n[0]=n[6]=-r,n[1]=n[3]=-o,n[2]=n[4]=1-r,n[5]=n[7]=1-o,i.invalidate();const a=e._texture,c=a.baseTexture,l=c.alphaMode>0,h=e.tileTransform.localTransform,u=e.uvMatrix;let d=c.isPowerOfTwo&&a.frame.width===c.width&&a.frame.height===c.height;d&&(c._glTextures[t.CONTEXT_UID]?d=c.wrapMode!==Os.CLAMP:c.wrapMode===Os.CLAMP&&(c.wrapMode=Os.REPEAT));const f=d?this.simpleShader:this.shader,m=a.width,p=a.height,g=e._width,x=e._height;uc.set(h.a*m/g,h.b*m/x,h.c*p/g,h.d*p/x,h.tx/g,h.ty/x),uc.invert(),d?uc.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=uc.toArray(!0),f.uniforms.uColor=At.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=a,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=ub(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}b1.extension={name:"tilingSprite",type:ke.RendererPlugin};$e.add(b1);const w1=class Wa{constructor(e,t,i){this.linkedSheets=[],(e instanceof it||e instanceof Ke)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:n,data:r,resolutionFilename:o=null,cachePrefix:a=""}=e;this.cachePrefix=a,this._texture=n instanceof Ke?n:null,this.baseTexture=n instanceof it?n:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const c=this.baseTexture.resource;this.resolution=this._updateResolution(o||(c?c.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=Hn(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=Wa.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=Wa.BATCH_SIZE;for(;t-e<i&&t<this._frameKeys.length;){const n=this._frameKeys[t],r=this._frames[n],o=r.frame;if(o){let a=null,c=null;const l=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,h=new ct(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);r.rotated?a=new ct(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):a=new ct(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(c=new ct(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[n]=new Ke(this.baseTexture,a,h,c,r.rotated?2:0,r.anchor,r.borders),Ke.addToCache(this.textures[n],this.cachePrefix+n.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let i=0;i<e[t].length;i++){const n=e[t][i];this.animations[t].push(this.textures[n])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Wa.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Wa.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};w1.BATCH_SIZE=1e3;let Rv=w1;const QI=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function S1(s,e,t){const i={};if(s.forEach(n=>{i[n]=e}),Object.keys(e.textures).forEach(n=>{i[`${e.cachePrefix}${n}`]=e.textures[n]}),!t){const n=si.dirname(s[0]);e.linkedSheets.forEach((r,o)=>{Object.assign(i,S1([`${n}/${e.data.meta.related_multi_packs[o]}`],r,!0))})}return i}const eR={extension:ke.Asset,cache:{test:s=>s instanceof Rv,getCacheableAssets:(s,e)=>S1(s,e,!1)},resolver:{test:s=>{const e=s.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&QI.includes(i)},parse:s=>{var t;const Line truncated
`;const uc=new Ft;class b1 extends uu{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new _b,this.state=mn.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=Ns.from(Iv,JI,t),this.shader=e.context.webGLVersion>1?Ns.from(KI,qI,t):Ns.from(Iv,ZI,t)}render(e){const t=this.renderer,i=this.quad;let n=i.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,o=e.uvRespectAnchor?e.anchor.y:0;n=i.uvs,n[0]=n[6]=-r,n[1]=n[3]=-o,n[2]=n[4]=1-r,n[5]=n[7]=1-o,i.invalidate();const a=e._texture,l=a.baseTexture,c=l.alphaMode>0,h=e.tileTransform.localTransform,u=e.uvMatrix;let d=l.isPowerOfTwo&&a.frame.width===l.width&&a.frame.height===l.height;d&&(l._glTextures[t.CONTEXT_UID]?d=l.wrapMode!==Os.CLAMP:l.wrapMode===Os.CLAMP&&(l.wrapMode=Os.REPEAT));const f=d?this.simpleShader:this.shader,m=a.width,p=a.height,g=e._width,x=e._height;uc.set(h.a*m/g,h.b*m/x,h.c*p/g,h.d*p/x,h.tx/g,h.ty/x),uc.invert(),d?uc.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=uc.toArray(!0),f.uniforms.uColor=At.shared.setValue(e.tint).premultiply(e.worldAlpha,c).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=a,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=ub(e.blendMode,c),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}b1.extension={name:"tilingSprite",type:ke.RendererPlugin};$e.add(b1);const w1=class za{constructor(e,t,i){this.linkedSheets=[],(e instanceof tt||e instanceof Ke)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:n,data:r,resolutionFilename:o=null,cachePrefix:a=""}=e;this.cachePrefix=a,this._texture=n instanceof Ke?n:null,this.baseTexture=n instanceof tt?n:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const l=this.baseTexture.resource;this.resolution=this._updateResolution(o||(l?l.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=Hn(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=za.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=za.BATCH_SIZE;for(;t-e<i&&t<this._frameKeys.length;){const n=this._frameKeys[t],r=this._frames[n],o=r.frame;if(o){let a=null,l=null;const c=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,h=new ct(0,0,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution);r.rotated?a=new ct(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):a=new ct(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(l=new ct(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[n]=new Ke(this.baseTexture,a,h,l,r.rotated?2:0,r.anchor,r.borders),Ke.addToCache(this.textures[n],this.cachePrefix+n.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let i=0;i<e[t].length;i++){const n=e[t][i];this.animations[t].push(this.textures[n])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*za.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*za.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};w1.BATCH_SIZE=1e3;let Rv=w1;const QI=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function S1(s,e,t){const i={};if(s.forEach(n=>{i[n]=e}),Object.keys(e.textures).forEach(n=>{i[`${e.cachePrefix}${n}`]=e.textures[n]}),!t){const n=si.dirname(s[0]);e.linkedSheets.forEach((r,o)=>{Object.assign(i,S1([`${n}/${e.data.meta.related_multi_packs[o]}`],r,!0))})}return i}const eR={extension:ke.Asset,cache:{test:s=>s instanceof Rv,getCacheableAssets:(s,e)=>S1(s,e,!1)},resolver:{test:s=>{const e=s.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&QI.includes(i)},parse:s=>{var t;const Line truncated
varying vec2 vTextureCoord;\r
uniform sampler2D uSampler;\r
\r
@@ -1156,17 +1156,17 @@ void main(void)\r
\r
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
}\r
`;const Pv=[],kv=[],Fv=[],aR=class T1 extends gi{constructor(e,t={}){super();const{align:i,tint:n,maxWidth:r,letterSpacing:o,fontName:a,fontSize:c}=Object.assign({},T1.styleDefaults,t);if(!or.available[a])throw new Error(`Missing BitmapFont "${a}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new At(n),this._font=void 0,this._fontName=a,this._fontSize=c,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=o,this._anchor=new Fn(()=>{this.dirty=!0},this,0,0),this._roundPixels=Be.ROUND_PIXELS,this.dirty=!0,this._resolution=Be.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var E;const e=or.available[this._fontName],t=this.fontSize,i=t/e.size,n=new St,r=[],o=[],a=[],c=this._text.replace(/(?:\r\n|\r)/g,`
`)||" ",l=M1(c),h=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?Pv:kv;let d=null,f=0,m=0,p=0,g=-1,x=0,v=0,y=0,S=0;for(let R=0;R<l.length;R++){const O=l[R],U=Nc(O);if(/(?:\s)/.test(O)&&(g=R,x=f,S++),O==="\r"||O===`
`){o.push(f),a.push(-1),m=Math.max(m,f),++p,++v,n.x=0,n.y+=e.lineHeight,d=null,S=0;continue}const Y=e.chars[U];if(!Y)continue;d&&Y.kerning[d]&&(n.x+=Y.kerning[d]);const $=Fv.pop()||{texture:Ke.EMPTY,line:0,charCode:0,prevSpaces:0,position:new St};$.texture=Y.texture,$.line=p,$.charCode=U,$.position.x=Math.round(n.x+Y.xOffset+this._letterSpacing/2),$.position.y=Math.round(n.y+Y.yOffset),$.prevSpaces=S,r.push($),f=$.position.x+Math.max(Y.xAdvance-Y.xOffset,Y.texture.orig.width),n.x+=Y.xAdvance+this._letterSpacing,y=Math.max(y,Y.yOffset+Y.texture.height),d=U,g!==-1&&h>0&&n.x>h&&(++v,Jo(r,1+g-v,1+R-g),R=g,g=-1,o.push(x),a.push(r.length>0?r[r.length-1].prevSpaces:0),m=Math.max(m,x),p++,n.x=0,n.y+=e.lineHeight,d=null,S=0)}const C=l[l.length-1];C!=="\r"&&C!==`
`&&(/(?:\s)/.test(C)&&(f=x),o.push(f),m=Math.max(m,f),a.push(-1));const w=[];for(let R=0;R<=p;R++){let O=0;this._align==="right"?O=m-o[R]:this._align==="center"?O=(m-o[R])/2:this._align==="justify"&&(O=a[R]<0?0:(m-o[R])/a[R]),w.push(O)}const b=r.length,_={},A=[],P=this._activePagesMeshData;u.push(...P);for(let R=0;R<b;R++){const O=r[R].texture,U=O.baseTexture.uid;if(!_[U]){let Y=u.pop();if(!Y){const X=new Mp;let D,F;e.distanceFieldType==="none"?(D=new ph(Ke.EMPTY),F=We.NORMAL):(D=new ph(Ke.EMPTY,{program:an.from(oR,rR),uniforms:{uFWidth:0}}),F=We.NORMAL_NPM);const N=new bl(X,D);N.blendMode=F,Y={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:N,vertices:null,uvs:null,indices:null}}Y.index=0,Y.indexCount=0,Y.vertexCount=0,Y.uvsCount=0,Y.total=0;const{_textureCache:$}=this;$[U]=$[U]||new Ke(O.baseTexture),Y.mesh.texture=$[U],Y.mesh.tint=this._tintColor.value,A.push(Y),_[U]=Y}_[U].total++}for(let R=0;R<P.length;R++)A.includes(P[R])||this.removeChild(P[R].mesh);for(let R=0;R<A.length;R++)A[R].mesh.parent!==this&&this.addChild(A[R].mesh);this._activePagesMeshData=A;for(const R in _){const O=_[R],U=O.total;if(!(((E=O.indices)==null?void 0:E.length)>6*U)||O.vertices.length<bl.BATCHABLE_SIZE*2)O.vertices=new Float32Array(8*U),O.uvs=new Float32Array(8*U),O.indices=new Uint16Array(6*U);else{const Y=O.total,$=O.vertices;for(let X=Y*4*2;X<$.length;X++)$[X]=0}O.mesh.size=6*U}for(let R=0;R<b;R++){const O=r[R];let U=O.position.x+w[O.line]*(this._align==="justify"?O.prevSpaces:1);this._roundPixels&&(U=Math.round(U));const Y=U*i,$=O.position.y*i,X=O.texture,D=_[X.baseTexture.uid],F=X.frame,N=X._uvs,k=D.index++;D.indices[k*6+0]=0+k*4,D.indices[k*6+1]=1+k*4,D.indices[k*6+2]=2+k*4,D.indices[k*6+3]=0+k*4,D.indices[k*6+4]=2+k*4,D.indices[k*6+5]=3+k*4,D.vertices[k*8+0]=Y,D.vertices[k*8+1]=$,D.vertices[k*8+2]=Y+F.width*i,D.vertices[k*8+3]=$,D.vertices[k*8+4]=Y+F.width*i,D.vertices[k*8+5]=$+F.height*i,D.vertices[k*8+6]=Y,D.vertices[k*8+7]=$+F.height*i,D.uvs[k*8+0]=N.x0,D.uvs[k*8+1]=N.y0,D.uvs[k*8+2]=N.x1,D.uvs[k*8+3]=N.y1,D.uvs[k*8+4]=N.x2,D.uvs[k*8+5]=N.y2,D.uvs[k*8+6]=N.x3,D.uvs[k*8+7]=N.y3}this._textWidth=m*i,this._textHeight=(n.y+e.lineHeight)*i;for(const R in _){const O=_[R];if(this.anchor.x!==0||this.anchor.y!==0){let X=0;const D=this._textWidth*this.anchor.x,F=this._textHeight*this.anchor.y;for(let N=0;N<O.total;N++)O.vertices[X++]-=D,O.vertices[X++]-=F,O.vertices[X++]-=D,O.vertices[X++]-=F,O.vertices[X++]-=D,O.vertices[X++]-=F,O.vertices[X++]-=D,O.vertices[X++]-=F}this._maxLineHeight=y*i;const U=O.mesh.geometry.getBuffer("aVertexPosition"),Y=O.mesh.geometry.getBuffer("aTextureCoord"),$=O.mesh.geometry.getIndex();U.data=O.vertices,Y.data=O.uvs,$.data=O.indices,U.update(),Y.update(),$.update()}for(let R=0;R<r.length;R++)Fv.push(r[R]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:i,size:n}=or.available[this._fontName];if(i!=="none"){const{a:r,b:o,c:a,d:c}=this.worldTransform,l=Math.sqrt(r*r+o*o),h=Math.sqrt(a*a+c*c),u=(Math.abs(l)+Math.abs(h))/2,d=this.fontSize/n,f=e._view.resolution;for(const m of this._activePagesMeshData)m.mesh.shader.uniforms.uFWidth=u*t*d*f}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=or.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!or.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??or.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._res Line truncated
`;const Pv=[],kv=[],Fv=[],aR=class T1 extends gi{constructor(e,t={}){super();const{align:i,tint:n,maxWidth:r,letterSpacing:o,fontName:a,fontSize:l}=Object.assign({},T1.styleDefaults,t);if(!or.available[a])throw new Error(`Missing BitmapFont "${a}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new At(n),this._font=void 0,this._fontName=a,this._fontSize=l,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=o,this._anchor=new Fn(()=>{this.dirty=!0},this,0,0),this._roundPixels=Be.ROUND_PIXELS,this.dirty=!0,this._resolution=Be.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var E;const e=or.available[this._fontName],t=this.fontSize,i=t/e.size,n=new St,r=[],o=[],a=[],l=this._text.replace(/(?:\r\n|\r)/g,`
`)||" ",c=M1(l),h=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?Pv:kv;let d=null,f=0,m=0,p=0,g=-1,x=0,v=0,y=0,w=0;for(let R=0;R<c.length;R++){const O=c[R],U=Nc(O);if(/(?:\s)/.test(O)&&(g=R,x=f,w++),O==="\r"||O===`
`){o.push(f),a.push(-1),m=Math.max(m,f),++p,++v,n.x=0,n.y+=e.lineHeight,d=null,w=0;continue}const G=e.chars[U];if(!G)continue;d&&G.kerning[d]&&(n.x+=G.kerning[d]);const $=Fv.pop()||{texture:Ke.EMPTY,line:0,charCode:0,prevSpaces:0,position:new St};$.texture=G.texture,$.line=p,$.charCode=U,$.position.x=Math.round(n.x+G.xOffset+this._letterSpacing/2),$.position.y=Math.round(n.y+G.yOffset),$.prevSpaces=w,r.push($),f=$.position.x+Math.max(G.xAdvance-G.xOffset,G.texture.orig.width),n.x+=G.xAdvance+this._letterSpacing,y=Math.max(y,G.yOffset+G.texture.height),d=U,g!==-1&&h>0&&n.x>h&&(++v,Jo(r,1+g-v,1+R-g),R=g,g=-1,o.push(x),a.push(r.length>0?r[r.length-1].prevSpaces:0),m=Math.max(m,x),p++,n.x=0,n.y+=e.lineHeight,d=null,w=0)}const _=c[c.length-1];_!=="\r"&&_!==`
`&&(/(?:\s)/.test(_)&&(f=x),o.push(f),m=Math.max(m,f),a.push(-1));const S=[];for(let R=0;R<=p;R++){let O=0;this._align==="right"?O=m-o[R]:this._align==="center"?O=(m-o[R])/2:this._align==="justify"&&(O=a[R]<0?0:(m-o[R])/a[R]),S.push(O)}const b=r.length,C={},A=[],P=this._activePagesMeshData;u.push(...P);for(let R=0;R<b;R++){const O=r[R].texture,U=O.baseTexture.uid;if(!C[U]){let G=u.pop();if(!G){const X=new Mp;let D,k;e.distanceFieldType==="none"?(D=new ph(Ke.EMPTY),k=We.NORMAL):(D=new ph(Ke.EMPTY,{program:an.from(oR,rR),uniforms:{uFWidth:0}}),k=We.NORMAL_NPM);const N=new wl(X,D);N.blendMode=k,G={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:N,vertices:null,uvs:null,indices:null}}G.index=0,G.indexCount=0,G.vertexCount=0,G.uvsCount=0,G.total=0;const{_textureCache:$}=this;$[U]=$[U]||new Ke(O.baseTexture),G.mesh.texture=$[U],G.mesh.tint=this._tintColor.value,A.push(G),C[U]=G}C[U].total++}for(let R=0;R<P.length;R++)A.includes(P[R])||this.removeChild(P[R].mesh);for(let R=0;R<A.length;R++)A[R].mesh.parent!==this&&this.addChild(A[R].mesh);this._activePagesMeshData=A;for(const R in C){const O=C[R],U=O.total;if(!(((E=O.indices)==null?void 0:E.length)>6*U)||O.vertices.length<wl.BATCHABLE_SIZE*2)O.vertices=new Float32Array(8*U),O.uvs=new Float32Array(8*U),O.indices=new Uint16Array(6*U);else{const G=O.total,$=O.vertices;for(let X=G*4*2;X<$.length;X++)$[X]=0}O.mesh.size=6*U}for(let R=0;R<b;R++){const O=r[R];let U=O.position.x+S[O.line]*(this._align==="justify"?O.prevSpaces:1);this._roundPixels&&(U=Math.round(U));const G=U*i,$=O.position.y*i,X=O.texture,D=C[X.baseTexture.uid],k=X.frame,N=X._uvs,F=D.index++;D.indices[F*6+0]=0+F*4,D.indices[F*6+1]=1+F*4,D.indices[F*6+2]=2+F*4,D.indices[F*6+3]=0+F*4,D.indices[F*6+4]=2+F*4,D.indices[F*6+5]=3+F*4,D.vertices[F*8+0]=G,D.vertices[F*8+1]=$,D.vertices[F*8+2]=G+k.width*i,D.vertices[F*8+3]=$,D.vertices[F*8+4]=G+k.width*i,D.vertices[F*8+5]=$+k.height*i,D.vertices[F*8+6]=G,D.vertices[F*8+7]=$+k.height*i,D.uvs[F*8+0]=N.x0,D.uvs[F*8+1]=N.y0,D.uvs[F*8+2]=N.x1,D.uvs[F*8+3]=N.y1,D.uvs[F*8+4]=N.x2,D.uvs[F*8+5]=N.y2,D.uvs[F*8+6]=N.x3,D.uvs[F*8+7]=N.y3}this._textWidth=m*i,this._textHeight=(n.y+e.lineHeight)*i;for(const R in C){const O=C[R];if(this.anchor.x!==0||this.anchor.y!==0){let X=0;const D=this._textWidth*this.anchor.x,k=this._textHeight*this.anchor.y;for(let N=0;N<O.total;N++)O.vertices[X++]-=D,O.vertices[X++]-=k,O.vertices[X++]-=D,O.vertices[X++]-=k,O.vertices[X++]-=D,O.vertices[X++]-=k,O.vertices[X++]-=D,O.vertices[X++]-=k}this._maxLineHeight=y*i;const U=O.mesh.geometry.getBuffer("aVertexPosition"),G=O.mesh.geometry.getBuffer("aTextureCoord"),$=O.mesh.geometry.getIndex();U.data=O.vertices,G.data=O.uvs,$.data=O.indices,U.update(),G.update(),$.update()}for(let R=0;R<r.length;R++)Fv.push(r[R]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:i,size:n}=or.available[this._fontName];if(i!=="none"){const{a:r,b:o,c:a,d:l}=this.worldTransform,c=Math.sqrt(r*r+o*o),h=Math.sqrt(a*a+l*l),u=(Math.abs(c)+Math.abs(h))/2,d=this.fontSize/n,f=e._view.resolution;for(const m of this._activePagesMeshData)m.mesh.shader.uniforms.uFWidth=u*t*d*f}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=or.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!or.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??or.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._res Line truncated
@font-face {
font-family: "${t.family}";
src: url('${t.dataSrc}');
font-weight: ${t.weight};
font-style: ${t.style};
font-display: ${t.display};
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=Q_(e)),typeof e=="number"?J_(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),n=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${i}px ${n}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,$o.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=Be.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};vm.availableFonts={},vm.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let rf=vm;const dc=class Xo extends Pr{constructor(e="",t={}){super(Ke.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,n=Ke.from(i,{scaleMode:Be.SCALE_MODE,resourceOptions:{autoLoad:!1}});n.orig=new ct,n.trim=new ct,this.texture=n;const r="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",a=document.createElementNS(r,"svg"),c=document.createElementNS(r,"foreignObject"),l=document.createElementNS(o,"div"),h=document.createElementNS(o,"style");c.setAttribute("width","10000"),c.setAttribute("height","10000"),c.style.overflow="hidden",a.appendChild(c),this.maxWidth=Xo.defaultMaxWidth,this.maxHeight=Xo.defaultMaxHeight,this._domElement=l,this._styleElement=h,this._svgRoot=a,this._foreignObject=c,this._foreignObject.appendChild(h),this._foreignObject.appendChild(l),this._image=i,this._loadImage=new Image,this._autoResolution=Xo.defaultAutoResolution,this._resolution=Xo.defaultResolution??Be.RESOLUTION,this.text=e,this.style=t}measureText(e){var h,u;const{text:t,style:i,resolution:n}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(n)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:o,height:a}=r;(o>this.maxWidth||a>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const c=Math.min(this.maxWidth,Math.ceil(o)),l=Math.min(this.maxHeight,Math.ceil(a));return this._svgRoot.setAttribute("width",c.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(h=this._style)==null?void 0:h.toCSS(n)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:c+i.padding*2,height:l+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:n}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:o}=this.measureText();i.width=n.width=Math.ceil(Math.max(1,r)),i.height=n.height=Math.ceil(Math.max(1,o)),this._updateID++;const a=this._updateID;await new Promise(c=>{n.onload=async()=>{if(a<this._updateID){c();return}await t.onBeforeDraw(),i.src=n.src,n.onload=null,n.src="",this.updateTexture(),c()};const l=new XMLSerializer().serializeToString(this._svgRoot);n.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret Line truncated
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=Q_(e)),typeof e=="number"?J_(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),n=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${i}px ${n}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,$o.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=Be.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};vm.availableFonts={},vm.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let rf=vm;const dc=class Xo extends Pr{constructor(e="",t={}){super(Ke.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,n=Ke.from(i,{scaleMode:Be.SCALE_MODE,resourceOptions:{autoLoad:!1}});n.orig=new ct,n.trim=new ct,this.texture=n;const r="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",a=document.createElementNS(r,"svg"),l=document.createElementNS(r,"foreignObject"),c=document.createElementNS(o,"div"),h=document.createElementNS(o,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",a.appendChild(l),this.maxWidth=Xo.defaultMaxWidth,this.maxHeight=Xo.defaultMaxHeight,this._domElement=c,this._styleElement=h,this._svgRoot=a,this._foreignObject=l,this._foreignObject.appendChild(h),this._foreignObject.appendChild(c),this._image=i,this._loadImage=new Image,this._autoResolution=Xo.defaultAutoResolution,this._resolution=Xo.defaultResolution??Be.RESOLUTION,this.text=e,this.style=t}measureText(e){var h,u;const{text:t,style:i,resolution:n}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(n)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:o,height:a}=r;(o>this.maxWidth||a>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const l=Math.min(this.maxWidth,Math.ceil(o)),c=Math.min(this.maxHeight,Math.ceil(a));return this._svgRoot.setAttribute("width",l.toString()),this._svgRoot.setAttribute("height",c.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(h=this._style)==null?void 0:h.toCSS(n)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:l+i.padding*2,height:c+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:n}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:o}=this.measureText();i.width=n.width=Math.ceil(Math.max(1,r)),i.height=n.height=Math.ceil(Math.max(1,o)),this._updateID++;const a=this._updateID;await new Promise(l=>{n.onload=async()=>{if(a<this._updateID){l();return}await t.onBeforeDraw(),i.src=n.src,n.onload=null,n.src="",this.updateTexture(),l()};const c=new XMLSerializer().serializeToString(this._svgRoot);n.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(c)}`})}get source(){ret Line truncated
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1195,7 +1195,7 @@ void main(void)
gl_FragColor.a = texColor.a * uColor.a;
gl_FragColor.rgb = ((texColor.a - 1.0) * uDarkColor.a + 1.0 - texColor.rgb) * uDarkColor.rgb + texColor.rgb * uColor.rgb;
}
`;class ik extends Ns{constructor(t){const i={uSampler:t??Ke.EMPTY,alpha:1,uTextureMatrix:Ft.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},n={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(an.from(ek,tk),i);M(this,"uvMatrix");M(this,"batchable");M(this,"pluginName");M(this,"_tintRGB");M(this,"_darkTintRGB");M(this,"_colorDirty");M(this,"_alpha");M(this,"_tintColor");M(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new vp(i.uSampler),this.batchable=!0,this.pluginName=n.pluginName,this._tintColor=new At(n.tint),this._darkTintColor=new At(n.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=n.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(t){t!==this.darkTint&&(this._darkTintColor.setValue(t),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,At.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),At.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class sk extends bl{constructor(t){super(new QP,new ik(t),void 0,void 0);M(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(t){this.shader.darkTint=t}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(t){const i=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=i.indexBuffer.data,this._tintRGB=n._tintRGB,this._darkTintRGB=n._darkTintRGB,this._texture=n.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const hi=class hi extends sk{constructor(){super();M(this,"name","")}updateFromSpineData(t,i,n,r,o,a,c,l){var x,v;this.texture=t.texture;const h=o/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((x=u.data)==null?void 0:x.length)!==h&&(u.data=new Float32Array(h));const d=this.geometry.getBuffer("aVertexPosition");((v=d.data)==null?void 0:v.length)!==h&&(d.data=new Float32Array(h));let f=0,m=u.data,p=d.data;for(let y=0;y<o;y+=l?12:8){let S=y;p[f]=r[S++],p[f+1]=r[S++],S+=4,m[f]=r[S++],m[f+1]=r[S++],f+=2}l?(hi.auxColor[0]=r[8],hi.auxColor[1]=r[9],hi.auxColor[2]=r[10],hi.auxColor[3]=r[11],this.darkTint=hi.auxColor,hi.auxColor[0]=r[2],hi.auxColor[1]=r[3],hi.auxColor[2]=r[4],hi.auxColor[3]=r[5],this.tint=hi.auxColor):(hi.auxColor[0]=r[2],hi.auxColor[1]=r[3],hi.auxColor[2]=r[4],hi.auxColor[3]=r[5],this.tint=hi.auxColor),this.blendMode=mo.toPixiBlending(i),this.alpha=hi.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==a.length)g.data=new Uint32Array(a);else{const y=g.data;for(let S=0;S<c;S++)y[S]=a[S]}this.name=n,u.update(),d.update(),g.update()}};M(hi,"auxColor",[0,0,0,0]);let tl=hi;const Mt=class Mt extends gi{constructor(t,i){if(t instanceof Sh)t={...i,skeletonData:t};else if(i)throw new Error("You cannot use options and oldOptions together.");super();M(this,"skeleton");M(this,"state");M(this,"darkTint",!1);M(this,"hasNeverUpdated",!0);M(this,"_debug");M(this,"slotMeshFactory",()=>new _m);M(this,"beforeUpdateWorldTransforms",()=>{});M(this,"afterUpdateWorldTransforms",()=>{});M(this,"_autoUpdate",!1);M(this,"_ticker",Yi.shared);M(this,"meshesCache",new Map);M(this,"lightColor",new lt);M(this,"darkColor",new lt);M(this,"_boundsProvider");M(this,"_boundsPoint",new St);M(this,"_boundsSpineID",-1);M(this,"_boundsSpineDirty",!0);M(this,"slotsObject",new Map);M(this,"verticesCache",Pe.newFloatArray(1024));M(this,"clippingSlotToPixiMasks",{});M(this,"currentClippingSlot");const n=t instanceof Sh?t:t.skeletonData;this.skeleton=new Ip(n);const r=new cP(n);this.state=new nP(r),(t==null?void 0:t.darkTint)!==void 0||(i==null?void 0:i.slotMeshFactory)===void 0?(this.darkTint=(t==null?void 0:t.darkTint)===void 0?this.skeleton.slots.some(o=>!!o.data.darkColor):t==null?void 0:t.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new tl)):this.initializeMeshFactory(i==null?void 0:i.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvide Line truncated
`;class ik extends Ns{constructor(t){const i={uSampler:t??Ke.EMPTY,alpha:1,uTextureMatrix:Ft.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},n={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(an.from(ek,tk),i);M(this,"uvMatrix");M(this,"batchable");M(this,"pluginName");M(this,"_tintRGB");M(this,"_darkTintRGB");M(this,"_colorDirty");M(this,"_alpha");M(this,"_tintColor");M(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new vp(i.uSampler),this.batchable=!0,this.pluginName=n.pluginName,this._tintColor=new At(n.tint),this._darkTintColor=new At(n.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=n.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(t){t!==this.darkTint&&(this._darkTintColor.setValue(t),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,At.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),At.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class sk extends wl{constructor(t){super(new QP,new ik(t),void 0,void 0);M(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(t){this.shader.darkTint=t}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(t){const i=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=i.indexBuffer.data,this._tintRGB=n._tintRGB,this._darkTintRGB=n._darkTintRGB,this._texture=n.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const hi=class hi extends sk{constructor(){super();M(this,"name","")}updateFromSpineData(t,i,n,r,o,a,l,c){var x,v;this.texture=t.texture;const h=o/(c?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((x=u.data)==null?void 0:x.length)!==h&&(u.data=new Float32Array(h));const d=this.geometry.getBuffer("aVertexPosition");((v=d.data)==null?void 0:v.length)!==h&&(d.data=new Float32Array(h));let f=0,m=u.data,p=d.data;for(let y=0;y<o;y+=c?12:8){let w=y;p[f]=r[w++],p[f+1]=r[w++],w+=4,m[f]=r[w++],m[f+1]=r[w++],f+=2}c?(hi.auxColor[0]=r[8],hi.auxColor[1]=r[9],hi.auxColor[2]=r[10],hi.auxColor[3]=r[11],this.darkTint=hi.auxColor,hi.auxColor[0]=r[2],hi.auxColor[1]=r[3],hi.auxColor[2]=r[4],hi.auxColor[3]=r[5],this.tint=hi.auxColor):(hi.auxColor[0]=r[2],hi.auxColor[1]=r[3],hi.auxColor[2]=r[4],hi.auxColor[3]=r[5],this.tint=hi.auxColor),this.blendMode=mo.toPixiBlending(i),this.alpha=hi.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==a.length)g.data=new Uint32Array(a);else{const y=g.data;for(let w=0;w<l;w++)y[w]=a[w]}this.name=n,u.update(),d.update(),g.update()}};M(hi,"auxColor",[0,0,0,0]);let il=hi;const Mt=class Mt extends gi{constructor(t,i){if(t instanceof Sh)t={...i,skeletonData:t};else if(i)throw new Error("You cannot use options and oldOptions together.");super();M(this,"skeleton");M(this,"state");M(this,"darkTint",!1);M(this,"hasNeverUpdated",!0);M(this,"_debug");M(this,"slotMeshFactory",()=>new _m);M(this,"beforeUpdateWorldTransforms",()=>{});M(this,"afterUpdateWorldTransforms",()=>{});M(this,"_autoUpdate",!1);M(this,"_ticker",Yi.shared);M(this,"meshesCache",new Map);M(this,"lightColor",new lt);M(this,"darkColor",new lt);M(this,"_boundsProvider");M(this,"_boundsPoint",new St);M(this,"_boundsSpineID",-1);M(this,"_boundsSpineDirty",!0);M(this,"slotsObject",new Map);M(this,"verticesCache",Pe.newFloatArray(1024));M(this,"clippingSlotToPixiMasks",{});M(this,"currentClippingSlot");const n=t instanceof Sh?t:t.skeletonData;this.skeleton=new Ip(n);const r=new cP(n);this.state=new nP(r),(t==null?void 0:t.darkTint)!==void 0||(i==null?void 0:i.slotMeshFactory)===void 0?(this.darkTint=(t==null?void 0:t.darkTint)===void 0?this.skeleton.slots.some(o=>!!o.data.darkColor):t==null?void 0:t.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new il)):this.initializeMeshFactory(i==null?void 0:i.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvide Line truncated
precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1236,4 +1236,4 @@ void main(void){
gl_FragColor.a = color.a * vColor.a;
gl_FragColor.rgb = ((color.a - 1.0) * vDarkColor.a + 1.0 - color.rgb) * vDarkColor.rgb + color.rgb * vColor.rgb;
}
`;class Ow extends cr{constructor(e){super(e),this.shaderGenerator=new bb(ck,hk),this.geometryClass=lk,this.vertexSize=7}packInterleavedGeometry(e,t,i,n,r){const{uint32View:o,float32View:a}=t,c=n/this.vertexSize,l=e.uvs,h=e.indices,u=e.vertexData,d=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),m=At.shared.setValue(e._tintRGB).toPremultiplied(f,!0),p=At.shared.setValue(e._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)a[n++]=u[g],a[n++]=u[g+1],a[n++]=l[g],a[n++]=l[g+1],o[n++]=m,o[n++]=p,a[n++]=d;for(let g=0;g<h.length;g++)i[r++]=c+h[g]}}M(Ow,"extension",{name:"darkTintBatch",type:ke.RendererPlugin});$e.add(Ow);function uk(s){return s.replace(/\\/g,"/").split("/").pop()||s}function Rp(s,e,t){for(const i of s.pages){const n=e.get(uk(i.name).toLowerCase());if(!n)throw new Error(`Atlas 引用的纹理未选择:${i.name}`);n.baseTexture.alphaMode=i.pma?bi.PMA:bi.UNPACK,i.setTexture(t.from(n.baseTexture))}}function Lw(s,e){const t=new ww(s);return Rp(t,e,mo),new Sm(t)}function dk(s,e,t){return{skeletonData:new Th(Lw(e,t)).readSkeletonData(s),SpineClass:_h}}function fk(s,e,t){return{skeletonData:new Tm(Lw(e,t)).readSkeletonData(s),SpineClass:_h}}const mk="modulepreload",pk=function(s){return"/"+s},Qv={},ey=function(e,t,i){let n=Promise.resolve();if(t&&t.length>0){let o=function(l){return Promise.all(l.map(h=>Promise.resolve(h).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));n=o(t.map(l=>{if(l=pk(l),l in Qv)return;Qv[l]=!0;const h=l.endsWith(".css"),u=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=h?"stylesheet":mk,h||(d.as="script"),d.crossOrigin="",d.href=l,c&&d.setAttribute("nonce",c),document.head.appendChild(d),h)return new Promise((f,m)=>{d.addEventListener("load",f),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return n.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})};async function Bw(){const[s,e]=await Promise.all([ey(()=>import("./index-CT90mgj8.js"),[]),ey(()=>import("./index-8-FN8Glu.js"),__vite__mapDeps([0,1]))]);return{core:s,pixi:e}}async function gk(s,e,t){const{core:i,pixi:n}=await Bw(),r=new i.TextureAtlas(e);return Rp(r,t,n.SpineTexture),{skeletonData:new i.SkeletonJson(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}async function vk(s,e,t){const{core:i,pixi:n}=await Bw(),r=new i.TextureAtlas(e);return Rp(r,t,n.SpineTexture),{skeletonData:new i.SkeletonBinary(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}function gr(s,e,t){const i=Number(s[e]);return Number.isFinite(i)?i:t}function qi(s,e,t,i){s[e]==null&&(s[e]=gr(s,t,i))}function Pp(s,e,t){if(typeof s.curve!="number")return;const i=gr(s,"time",0),r=gr(e,"time",0)-i,o=s.curve,a=gr(s,"c2",0),c=gr(s,"c3",1),l=gr(s,"c4",1);s.curve=t.flatMap(([h,u])=>[i+r*o,h+(u-h)*a,i+r*c,h+(u-h)*l]),delete s.c2,delete s.c3,delete s.c4}function Sr(s,e){if(Array.isArray(s))for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1];Pp(i,n,e.map(({key:r,fallback:o})=>[gr(i,r,o),gr(n,r,o)]))}}function yk(s){if(Array.isArray(s))for(let e=0;e<s.length-1;e++)Pp(s[e],s[e+1],[[0,1]])}function Po(s,e){const t=typeof s=="string"?s.replace(/^#/,""):"",i=t.length===6?`${t}ff`:t.padEnd(8,"f").slice(0,8),n=[0,2,4,6].map(r=>Number.parseInt(i.slice(r,r+2),16)/255);return e?n:n.slice(0,3)}function ty(s,e){if(Array.isArray(s))for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1],r=e?[...Po(i.light,!0),...Po(i.dark,!1)]:Po(i.color,!0),o=e?[...Po(n.light,!0),...Po(n.dark,!1)]:Po(n.color,!0);Pp(i,n,r.map((a,c)=>[a,o[c]]))}}function xk(s){for(const e of s.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of s.transform||[])qi(e,"mixRotate","rotateMix",1),qi(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),qi(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),qi(e,"mixShearY","shearMix",1);for(const e of s.path||[])qi(e,"mixRotate","rotateMix",1),qi(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function bk(s){for(const e of s.skins||[])for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&i.timelines==null&&i.deform!=null&&(i.timelines=i.deform)}function wk(s){for(const e of Object.values(s.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),ty(e.rgba,!1),ty(e.rgba2,!0)}function Sk(s){for(const e of Object.values(s.bones||{})){for(const t of e.rotate||[])qi(t,"value","angle",0);Sr(e.rotate,[{key:"value",fallback:0}]),Sr(e.tra Line truncated
`;class Ow extends cr{constructor(e){super(e),this.shaderGenerator=new bb(ck,hk),this.geometryClass=lk,this.vertexSize=7}packInterleavedGeometry(e,t,i,n,r){const{uint32View:o,float32View:a}=t,l=n/this.vertexSize,c=e.uvs,h=e.indices,u=e.vertexData,d=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),m=At.shared.setValue(e._tintRGB).toPremultiplied(f,!0),p=At.shared.setValue(e._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)a[n++]=u[g],a[n++]=u[g+1],a[n++]=c[g],a[n++]=c[g+1],o[n++]=m,o[n++]=p,a[n++]=d;for(let g=0;g<h.length;g++)i[r++]=l+h[g]}}M(Ow,"extension",{name:"darkTintBatch",type:ke.RendererPlugin});$e.add(Ow);function uk(s){return s.replace(/\\/g,"/").split("/").pop()||s}function Rp(s,e,t){for(const i of s.pages){const n=e.get(uk(i.name).toLowerCase());if(!n)throw new Error(`Atlas 引用的纹理未选择:${i.name}`);n.baseTexture.alphaMode=i.pma?bi.PMA:bi.UNPACK,i.setTexture(t.from(n.baseTexture))}}function Lw(s,e){const t=new ww(s);return Rp(t,e,mo),new Sm(t)}function dk(s,e,t){return{skeletonData:new Th(Lw(e,t)).readSkeletonData(s),SpineClass:_h}}function fk(s,e,t){return{skeletonData:new Tm(Lw(e,t)).readSkeletonData(s),SpineClass:_h}}const mk="modulepreload",pk=function(s){return"/"+s},Qv={},ey=function(e,t,i){let n=Promise.resolve();if(t&&t.length>0){let o=function(c){return Promise.all(c.map(h=>Promise.resolve(h).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));n=o(t.map(c=>{if(c=pk(c),c in Qv)return;Qv[c]=!0;const h=c.endsWith(".css"),u=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const d=document.createElement("link");if(d.rel=h?"stylesheet":mk,h||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),h)return new Promise((f,m)=>{d.addEventListener("load",f),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return n.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})};async function Bw(){const[s,e]=await Promise.all([ey(()=>import("./index-ChTSy5jk.js"),[]),ey(()=>import("./index-Csznclrj.js"),__vite__mapDeps([0,1]))]);return{core:s,pixi:e}}async function gk(s,e,t){const{core:i,pixi:n}=await Bw(),r=new i.TextureAtlas(e);return Rp(r,t,n.SpineTexture),{skeletonData:new i.SkeletonJson(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}async function vk(s,e,t){const{core:i,pixi:n}=await Bw(),r=new i.TextureAtlas(e);return Rp(r,t,n.SpineTexture),{skeletonData:new i.SkeletonBinary(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}function gr(s,e,t){const i=Number(s[e]);return Number.isFinite(i)?i:t}function qi(s,e,t,i){s[e]==null&&(s[e]=gr(s,t,i))}function Pp(s,e,t){if(typeof s.curve!="number")return;const i=gr(s,"time",0),r=gr(e,"time",0)-i,o=s.curve,a=gr(s,"c2",0),l=gr(s,"c3",1),c=gr(s,"c4",1);s.curve=t.flatMap(([h,u])=>[i+r*o,h+(u-h)*a,i+r*l,h+(u-h)*c]),delete s.c2,delete s.c3,delete s.c4}function Sr(s,e){if(Array.isArray(s))for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1];Pp(i,n,e.map(({key:r,fallback:o})=>[gr(i,r,o),gr(n,r,o)]))}}function yk(s){if(Array.isArray(s))for(let e=0;e<s.length-1;e++)Pp(s[e],s[e+1],[[0,1]])}function Po(s,e){const t=typeof s=="string"?s.replace(/^#/,""):"",i=t.length===6?`${t}ff`:t.padEnd(8,"f").slice(0,8),n=[0,2,4,6].map(r=>Number.parseInt(i.slice(r,r+2),16)/255);return e?n:n.slice(0,3)}function ty(s,e){if(Array.isArray(s))for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1],r=e?[...Po(i.light,!0),...Po(i.dark,!1)]:Po(i.color,!0),o=e?[...Po(n.light,!0),...Po(n.dark,!1)]:Po(n.color,!0);Pp(i,n,r.map((a,l)=>[a,o[l]]))}}function xk(s){for(const e of s.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of s.transform||[])qi(e,"mixRotate","rotateMix",1),qi(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),qi(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),qi(e,"mixShearY","shearMix",1);for(const e of s.path||[])qi(e,"mixRotate","rotateMix",1),qi(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function bk(s){for(const e of s.skins||[])for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&i.timelines==null&&i.deform!=null&&(i.timelines=i.deform)}function wk(s){for(const e of Object.values(s.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),ty(e.rgba,!1),ty(e.rgba2,!0)}function Sk(s){for(const e of Object.values(s.bones||{})){for(const t of e.rotate||[])qi(t,"value","angle",0);Sr(e.rotate,[{key:"value",fallback:0}]),Sr(e.tra Line truncated
@@ -1,2 +1,2 @@
var ft=Object.defineProperty;var gt=(W,t,e)=>t in W?ft(W,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):W[t]=e;var T=(W,t,e)=>gt(W,typeof t!="symbol"?t+"":t,e);import{f as ht,R as pt,N as dt,ac as ut,Z as mt,b4 as yt,O as rt,b5 as at,U as D,B as Tt}from"./index-CPXvsWyv.js";import{$ as Rt,a0 as Yt,a1 as Ft,a2 as Et,y as _t,a3 as Ot,a4 as kt,a5 as Xt,a6 as Bt,a7 as Nt,a8 as Dt,a9 as $t,aa as zt,ab as Wt,ad as qt,H as Gt,ae as Jt,af as Ht,ag as Zt,ah as Kt,ai as Qt,aj as jt,ak as te,al as ee,am as se,an as ne,ao as ie,ap as oe,aq as re,ar as ae,as as le,at as ce,au as he,av as pe,aw as de,ax as ue,ay as fe,az as ge,aA as me,aB as ye,aC as Te,aD as be,aE as we,aF as xe,aG as Ae,aH as Pe,aI as Ie,aJ as Ce,aK as Ve,aL as Le,aM as Se,aN as Me,aO as ve,aP as Ue,aQ as Re,aR as Ye,aS as Fe,aT as Ee,x as _e,aU as Oe,aV as ke,aW as Xe,aX as Be,aY as Ne,aZ as De,a_ as $e,a$ as ze,b0 as We,b1 as qe,b2 as Ge,b3 as Je,b6 as He,b7 as Ze,b8 as Ke,b9 as Qe,ba as je,bb as ts,bc as es,bd as ss,be as ns,bf as is,bg as os,bh as rs,bi as as,bj as ls,bk as cs,bl as hs,bm as ps,bn as ds,bo as us,bp as fs,bq as gs,br as ms,bs as ys,bt as Ts,bu as bs,w as ws,X as xs,J as As,Y as Ps,z as Is,bv as Cs,bw as Vs,bx as Ls,by as Ss,bz as Ms,bA as vs,bB as Us,bC as Rs,bD as Ys,bE as Fs,bF as Es,bG as _s,T as Os,bH as ks,bI as Xs,b as Bs,bJ as Ns,c as Ds,bK as $s,bL as zs,bM as Ws,bN as qs,bO as Gs,bP as Js,bQ as Hs,bR as Zs,bS as Ks,bT as Qs,bU as js,bV as tn,bW as en,bX as sn,bY as nn,bZ as on,b_ as rn,V as an,b$ as ln,c0 as cn,c1 as hn,c2 as pn,c3 as dn}from"./index-CPXvsWyv.js";class It{constructor(t){T(this,"skeletonData");T(this,"animationToMixTime",{});T(this,"defaultMix",0);if(!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,n){return typeof t=="string"?this.setMix1(t,e,n):this.setMix2(t,e,n)}setMix1(t,e,n){const s=this.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);const i=this.skeletonData.findAnimation(e);if(!i)throw new Error(`Animation not found: ${e}`);this.setMix2(s,i,n)}setMix2(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const s=`${t.name}.${e.name}`;this.animationToMixTime[s]=n}getMix(t,e){const n=`${t.name}.${e.name}`,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}class Ct{constructor(t,e="",n=new bt,s=new lt){T(this,"textureLoader");T(this,"pathPrefix");T(this,"downloader");T(this,"cache");T(this,"errors",{});T(this,"toLoad",0);T(this,"loaded",0);T(this,"texturePmaInfo",{});this.textureLoader=t,this.pathPrefix=e,this.downloader=n,this.cache=s}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,n){this.toLoad--,this.loaded++,this.cache.assets[e]=n,this.cache.assetsRefCount[e]=(this.cache.assetsRefCount[e]||0)+1,t&&t(e,n)}error(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}loadAll(){return new Promise((e,n)=>{const s=()=>{if(this.isLoadingComplete()){this.hasErrors()?n(this.errors):e(this);return}requestAnimationFrame(s)};requestAnimationFrame(s)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadBinary(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load binary ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}loadText(t,e=()=>{},n=()=>{}){t=this.start(t),this.downloader.downloadText(t,s=>{this.success(e,t,s)},(s,i)=>{this.error(n,t,`Couldn't load text ${t}: status ${s}, ${i}`)})}loadJson(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadJson(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load JSON ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}reuseAssets(t,e=()=>{},n=()=>{}){const s=this.cache.getAsset(t),i=s!==void 0;return i&&(this.cache.assetsLoaded[t]=s.then(o=>(o=o instanceof Image||o instanceof ImageBitmap?this.textureLoader(o):o,this.success(e,t,o),o)).catch(o=>{this.error(n,t,o)})),i}loadTexture(t,e=()=>{},n=()=>{}){if(t=this.start(t),this.reuseAssets(t,e,n))return;const s=this.texturePmaInfo[t];this.cache.assetsLoaded[t]=new Promise((i,o)=>{if(!!!(typeof window<"u"&&typeof navigator<"u"&&window.document))fetch(t,{mode:"cors"}).then(c=>{if(c.ok)return c.blob();const a=`Couldn't load image: ${t}`;this.error(n,t,`Couldn't load image: ${t}`),o(a)}).then(c=>c?createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(c=>{if(c){const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)}});else{const c=new Image;c.crossOrigin="anonymous",c.onload=()=>{const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)},c.onerror=()=>{const a=`Couldn't load image: ${t}`;this.error(n,t,a),o(a)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),c.src=t}})}loadTextureAtlas(t,e=()=>{},n=()=>{},s){const i=t.lastIndexOf("/"),o=i>=0?t.substring(0,i+1)Line truncated
var ft=Object.defineProperty;var gt=(W,t,e)=>t in W?ft(W,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):W[t]=e;var T=(W,t,e)=>gt(W,typeof t!="symbol"?t+"":t,e);import{f as ht,R as pt,N as dt,ac as ut,Z as mt,b4 as yt,O as rt,b5 as at,U as D,B as Tt}from"./index-Bjqx1iPW.js";import{$ as Rt,a0 as Yt,a1 as Ft,a2 as Et,y as _t,a3 as Ot,a4 as kt,a5 as Xt,a6 as Bt,a7 as Nt,a8 as Dt,a9 as $t,aa as zt,ab as Wt,ad as qt,H as Gt,ae as Jt,af as Ht,ag as Zt,ah as Kt,ai as Qt,aj as jt,ak as te,al as ee,am as se,an as ne,ao as ie,ap as oe,aq as re,ar as ae,as as le,at as ce,au as he,av as pe,aw as de,ax as ue,ay as fe,az as ge,aA as me,aB as ye,aC as Te,aD as be,aE as we,aF as xe,aG as Ae,aH as Pe,aI as Ie,aJ as Ce,aK as Ve,aL as Le,aM as Se,aN as Me,aO as ve,aP as Ue,aQ as Re,aR as Ye,aS as Fe,aT as Ee,x as _e,aU as Oe,aV as ke,aW as Xe,aX as Be,aY as Ne,aZ as De,a_ as $e,a$ as ze,b0 as We,b1 as qe,b2 as Ge,b3 as Je,b6 as He,b7 as Ze,b8 as Ke,b9 as Qe,ba as je,bb as ts,bc as es,bd as ss,be as ns,bf as is,bg as os,bh as rs,bi as as,bj as ls,bk as cs,bl as hs,bm as ps,bn as ds,bo as us,bp as fs,bq as gs,br as ms,bs as ys,bt as Ts,bu as bs,w as ws,X as xs,J as As,Y as Ps,z as Is,bv as Cs,bw as Vs,bx as Ls,by as Ss,bz as Ms,bA as vs,bB as Us,bC as Rs,bD as Ys,bE as Fs,bF as Es,bG as _s,T as Os,bH as ks,bI as Xs,b as Bs,bJ as Ns,c as Ds,bK as $s,bL as zs,bM as Ws,bN as qs,bO as Gs,bP as Js,bQ as Hs,bR as Zs,bS as Ks,bT as Qs,bU as js,bV as tn,bW as en,bX as sn,bY as nn,bZ as on,b_ as rn,V as an,b$ as ln,c0 as cn,c1 as hn,c2 as pn,c3 as dn}from"./index-Bjqx1iPW.js";class It{constructor(t){T(this,"skeletonData");T(this,"animationToMixTime",{});T(this,"defaultMix",0);if(!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,n){return typeof t=="string"?this.setMix1(t,e,n):this.setMix2(t,e,n)}setMix1(t,e,n){const s=this.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);const i=this.skeletonData.findAnimation(e);if(!i)throw new Error(`Animation not found: ${e}`);this.setMix2(s,i,n)}setMix2(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const s=`${t.name}.${e.name}`;this.animationToMixTime[s]=n}getMix(t,e){const n=`${t.name}.${e.name}`,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}class Ct{constructor(t,e="",n=new bt,s=new lt){T(this,"textureLoader");T(this,"pathPrefix");T(this,"downloader");T(this,"cache");T(this,"errors",{});T(this,"toLoad",0);T(this,"loaded",0);T(this,"texturePmaInfo",{});this.textureLoader=t,this.pathPrefix=e,this.downloader=n,this.cache=s}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,n){this.toLoad--,this.loaded++,this.cache.assets[e]=n,this.cache.assetsRefCount[e]=(this.cache.assetsRefCount[e]||0)+1,t&&t(e,n)}error(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}loadAll(){return new Promise((e,n)=>{const s=()=>{if(this.isLoadingComplete()){this.hasErrors()?n(this.errors):e(this);return}requestAnimationFrame(s)};requestAnimationFrame(s)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadBinary(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load binary ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}loadText(t,e=()=>{},n=()=>{}){t=this.start(t),this.downloader.downloadText(t,s=>{this.success(e,t,s)},(s,i)=>{this.error(n,t,`Couldn't load text ${t}: status ${s}, ${i}`)})}loadJson(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadJson(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load JSON ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}reuseAssets(t,e=()=>{},n=()=>{}){const s=this.cache.getAsset(t),i=s!==void 0;return i&&(this.cache.assetsLoaded[t]=s.then(o=>(o=o instanceof Image||o instanceof ImageBitmap?this.textureLoader(o):o,this.success(e,t,o),o)).catch(o=>{this.error(n,t,o)})),i}loadTexture(t,e=()=>{},n=()=>{}){if(t=this.start(t),this.reuseAssets(t,e,n))return;const s=this.texturePmaInfo[t];this.cache.assetsLoaded[t]=new Promise((i,o)=>{if(!!!(typeof window<"u"&&typeof navigator<"u"&&window.document))fetch(t,{mode:"cors"}).then(c=>{if(c.ok)return c.blob();const a=`Couldn't load image: ${t}`;this.error(n,t,`Couldn't load image: ${t}`),o(a)}).then(c=>c?createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(c=>{if(c){const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)}});else{const c=new Image;c.crossOrigin="anonymous",c.onload=()=>{const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)},c.onerror=()=>{const a=`Couldn't load image: ${t}`;this.error(n,t,a),o(a)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),c.src=t}})}loadTextureAtlas(t,e=()=>{},n=()=>{},s){const i=t.lastIndexOf("/"),o=i>=0?t.substring(0,i+1)Line truncated
${n}`:""}`)}remove(t){t=this.pathPrefix+t;const e=this.cache.assets[t];return e.dispose&&e.dispose(),delete this.cache.assets[t],delete this.cache.assetsRefCount[t],delete this.cache.assetsLoaded[t],e}removeAll(){for(const t in this.cache.assets){const e=this.cache.assets[t];e.dispose&&e.dispose()}this.cache.assets={},this.cache.assetsLoaded={},this.cache.assetsRefCount={}}isLoadingComplete(){return this.toLoad===0}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}disposeAsset(t){const e=this.cache.assets[t];if(e instanceof ht){e.dispose();return}this.disposeAssetInternal(t)}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}disposeAssetInternal(t){if(this.cache.assetsRefCount[t]>0&&--this.cache.assetsRefCount[t]===0)return this.remove(t)}createTextureAtlas(t,e,n,s){const i=new ht(t);i.dispose=()=>{var o;if(!(this.cache.assetsRefCount[n]<=0)){this.disposeAssetInternal(n);for(const r of i.pages)(o=r.texture)==null||o.dispose()}};for(const o of i.pages){const r=this.texturePath(e,o.name,s);this.texturePmaInfo[this.pathPrefix+r]=o.pma}return i}createTexture(t,e,n){const s=this.textureLoader(n,e),i=s.dispose.bind(s);return s.dispose=()=>{this.disposeAssetInternal(t)&&i()},s}texturePath(t,e,n){return n?n[e]:t+e}}const nt=class nt{constructor(){T(this,"assets",{});T(this,"assetsRefCount",{});T(this,"assetsLoaded",{})}static getCache(t){const e=nt.AVAILABLE_CACHES.get(t);if(e)return e;const n=new nt;return nt.AVAILABLE_CACHES.set(t,n),n}async addAsset(t,e){return this.assetsLoaded[t]=Promise.resolve(e),this.assets[t]=e,e}getAsset(t){return this.assetsLoaded[t]}};T(nt,"AVAILABLE_CACHES",new Map);let lt=nt;class bt{constructor(){T(this,"callbacks",{});T(this,"rawDataUris",{})}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return e!==-1?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){var e=window.atob(t),n=e.length,s=new Uint8Array(n);for(let i=0;i<n;i++)s[i]=e.charCodeAt(i);return s}dataUriToUint8Array(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");if(e===-1)throw new Error("Not a binary data URI.");return e+=7,this.base64ToUint8Array(t.substr(e))}downloadText(t,e,n){if(this.start(t,e,n))return;const s=this.rawDataUris[t];if(s&&!s.includes(".")){try{this.finish(t,200,this.dataUriToString(s))}catch(r){this.finish(t,400,JSON.stringify(r))}return}const i=new XMLHttpRequest;i.overrideMimeType("text/html"),i.open("GET",s||t,!0);const o=()=>{this.finish(t,i.status,i.responseText)};i.onload=o,i.onerror=o,i.send()}downloadJson(t,e,n){this.downloadText(t,s=>{e(JSON.parse(s))},n)}downloadBinary(t,e,n){if(this.start(t,e,n))return;const s=this.rawDataUris[t];if(s&&!s.includes(".")){try{this.finish(t,200,this.dataUriToUint8Array(s))}catch(r){this.finish(t,400,JSON.stringify(r))}return}const i=new XMLHttpRequest;i.open("GET",s||t,!0),i.responseType="arraybuffer";const o=()=>{this.finish(t,i.status,i.response)};i.onload=()=>{i.status===200||i.status===0?this.finish(t,200,new Uint8Array(i.response)):o()},i.onerror=o,i.send()}start(t,e,n){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,n)}}finish(t,e,n){const s=this.callbacks[t];if(delete this.callbacks[t],e===200||e===0)for(let i=0,o=s.length;i<o;i+=2)s[i](n);else for(let i=1,o=s.length;i<o;i+=2)s[i](e,n)}}class Vt{constructor(t,e=!1){T(this,"atlas");T(this,"allowMissingRegions");this.atlas=t,this.allowMissingRegions=e}findRegions(t,e,n){const s=n.regions;for(let i=0,o=s.length;i<o;i++)s[i]=this.findRegion(t,n.getPath(e,i))}findRegion(t,e){const n=this.atlas.findRegion(e);if(!n&&!this.allowMissingRegions)throw new Error(`Region not found in atlas: ${e} (attachment: ${t})`);return n}newRegionAttachment(t,e,n,s,i){return this.findRegions(n,s,i),new pt(n,i)}newMeshAttachment(t,e,n,s,i){return this.findRegions(n,s,i),new dt(n,i)}newBoundingBoxAttachment(t,e,n){return new ut(n)}newPathAttachment(t,e,n){return new mt(n)}newPointAttachment(t,e,n){return new yt(n)}newClippingAttachment(t,e,n){return new rt(n)}}class Lt{constructor(){T(this,"minX",0);T(this,"minY",0);T(this,"maxX",0);T(this,"maxY",0);T(this,"boundingBoxes",[]);T(this,"polygons",[]);T(this,"polygonPool",new at(()=>D.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");const n=this.boundingBoxes,s=this.polygons,i=this.polygonPool,o=t.slots,r=o.length;n.length=0,i.freeAll(s),s.length=0;for(let l=0;l<r;l++){const c=o[l];if(!c.bone.active)continue;const a=c.appliedPose.attachment;if(a instanceof ut){n.push(a);let h=i.obtain();h.length!==a.worldVerticesLength&&(h=D.newFloatArray(a.worldVerticesLength)),s.push(h),a.computeWorldVertices(t,c,0,a.worldVerticesLength,h,0,2)}}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)}aabbCompute(){let t=Number.POSITIVE_INFLine truncated
@@ -1 +1 @@
.help-overlay[data-v-78204b9d]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-78204b9d]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-78204b9d]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-78204b9d]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-78204b9d]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-78204b9d]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-78204b9d]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-78204b9d]{min-height:0;overflow:auto;padding:18px 20px 21px}.help-section[data-v-78204b9d]{padding:14px 15px;border:1px solid #2c3850;border-radius:10px;background:#181f2e}.help-section h3[data-v-78204b9d]{margin:0 0 11px;color:#9fb2ff;font-size:13px}.help-start ol[data-v-78204b9d]{margin:0;padding-left:21px;color:#aab6cc;font-size:12px;line-height:1.75}.help-start li[data-v-78204b9d]::marker{color:#7774ff;font-weight:700}.help-section b[data-v-78204b9d]{color:#dce4f7}.help-grid[data-v-78204b9d]{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr);gap:12px;margin-top:12px}.help-list[data-v-78204b9d]{display:grid;gap:0;margin:0}.help-list>div[data-v-78204b9d]{display:grid;grid-template-columns:78px 1fr;gap:9px;padding:7px 0;border-bottom:1px solid #263146}.help-list>div[data-v-78204b9d]:last-child{border-bottom:0}.help-list dt[data-v-78204b9d]{color:#d3dcf0;font-size:11px;font-weight:700}.help-list dd[data-v-78204b9d]{margin:0;color:#8795ae;font-size:11px;line-height:1.5}.shortcut-list[data-v-78204b9d]{display:grid;gap:7px}.shortcut-list>div[data-v-78204b9d]{display:flex;align-items:center;min-height:25px;gap:5px}.shortcut-list kbd[data-v-78204b9d]{min-width:24px;box-sizing:border-box;padding:3px 6px;border:1px solid #465470;border-bottom-width:2px;border-radius:5px;background:#101623;color:#e0e7f6;font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;text-align:center}.shortcut-list span[data-v-78204b9d]{color:#65728b;font-size:10px}.shortcut-list em[data-v-78204b9d]{margin-left:auto;color:#9ca9c1;font-size:11px;font-style:normal}.help-note[data-v-78204b9d]{margin:11px 0 0;padding-top:9px;border-top:1px solid #2a3549;color:#697791;font-size:10px;line-height:1.55}.help-export[data-v-78204b9d]{margin-top:12px}.help-export p[data-v-78204b9d]{margin:0;color:#8997b0;font-size:11px;line-height:1.65}.help-doc-title[data-v-78204b9d]{margin:16px 2px 2px;color:#9fb2ff;font-size:13px;font-weight:700;letter-spacing:.5px}.help-module[data-v-78204b9d]{margin-top:12px}.help-module-head[data-v-78204b9d]{display:flex;align-items:center;gap:8px;width:100%;padding:0;border:0;background:transparent;color:#9fb2ff;font:inherit;font-size:13px;font-weight:700;text-align:left;cursor:pointer}.help-module-head[data-v-78204b9d]:hover{color:#fff}.help-module-head .mtitle[data-v-78204b9d]{flex:1;min-width:0}.help-module-head .caret[data-v-78204b9d]{flex:0 0 auto;color:#7b86a2;font-size:12px}.help-module.open .help-module-head[data-v-78204b9d]{color:#fff}.help-module.open .help-module-head .caret[data-v-78204b9d]{color:#9fb2ff}.help-module .mnum[data-v-78204b9d]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:linear-gradient(135deg,#4a53b8,#6a5fd0);color:#fff;font-size:12px;font-weight:700}.help-module.help-connector[data-v-78204b9d]{border-color:#4a4f8a;background:linear-gradient(135deg,#1d2442,#181d2f)}.help-module.help-connector .help-module-head[data-v-78204b9d]{color:#b8c2ff}.help-module .connector-intro[data-v-78204b9d]{margin:0 0 10px;color:#9aa8c4;font-size:11px;line-height:1.6}.help-module .connector-intro b[data-v-78204b9d]{color:#dce4f7}.help-module .dl-link[data-v-78204b9d]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;margin:0 10px 6px 0;padding:6px 12px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;font-size:12px;font-weight:700;text-decoration:none}.help-module .dl-link[data-v-78204b9d]:hover{border-color:#8982ff;background:#554dc2}.help-module .dl-link small[data-v-78204b9d]{color:#cfe0ff;font-weight:500;font-size:9px}.help-module-body[data-v-78204b9d]{padding-top:10px}@media(max-width:760px){.help-overlay[data-v-78204b9d]{padding:66px 12px 14px}.help-grid[data-v-78204b9d]{grid-template-columns:1fr}}.topbar[data-v-4749834a]{position:absolute;top:10px;left:10px;right:10px;dispLine truncated
.help-overlay[data-v-78204b9d]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-78204b9d]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-78204b9d]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-78204b9d]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-78204b9d]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-78204b9d]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-78204b9d]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-78204b9d]{min-height:0;overflow:auto;padding:18px 20px 21px}.help-section[data-v-78204b9d]{padding:14px 15px;border:1px solid #2c3850;border-radius:10px;background:#181f2e}.help-section h3[data-v-78204b9d]{margin:0 0 11px;color:#9fb2ff;font-size:13px}.help-start ol[data-v-78204b9d]{margin:0;padding-left:21px;color:#aab6cc;font-size:12px;line-height:1.75}.help-start li[data-v-78204b9d]::marker{color:#7774ff;font-weight:700}.help-section b[data-v-78204b9d]{color:#dce4f7}.help-grid[data-v-78204b9d]{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr);gap:12px;margin-top:12px}.help-list[data-v-78204b9d]{display:grid;gap:0;margin:0}.help-list>div[data-v-78204b9d]{display:grid;grid-template-columns:78px 1fr;gap:9px;padding:7px 0;border-bottom:1px solid #263146}.help-list>div[data-v-78204b9d]:last-child{border-bottom:0}.help-list dt[data-v-78204b9d]{color:#d3dcf0;font-size:11px;font-weight:700}.help-list dd[data-v-78204b9d]{margin:0;color:#8795ae;font-size:11px;line-height:1.5}.shortcut-list[data-v-78204b9d]{display:grid;gap:7px}.shortcut-list>div[data-v-78204b9d]{display:flex;align-items:center;min-height:25px;gap:5px}.shortcut-list kbd[data-v-78204b9d]{min-width:24px;box-sizing:border-box;padding:3px 6px;border:1px solid #465470;border-bottom-width:2px;border-radius:5px;background:#101623;color:#e0e7f6;font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;text-align:center}.shortcut-list span[data-v-78204b9d]{color:#65728b;font-size:10px}.shortcut-list em[data-v-78204b9d]{margin-left:auto;color:#9ca9c1;font-size:11px;font-style:normal}.help-note[data-v-78204b9d]{margin:11px 0 0;padding-top:9px;border-top:1px solid #2a3549;color:#697791;font-size:10px;line-height:1.55}.help-export[data-v-78204b9d]{margin-top:12px}.help-export p[data-v-78204b9d]{margin:0;color:#8997b0;font-size:11px;line-height:1.65}.help-doc-title[data-v-78204b9d]{margin:16px 2px 2px;color:#9fb2ff;font-size:13px;font-weight:700;letter-spacing:.5px}.help-module[data-v-78204b9d]{margin-top:12px}.help-module-head[data-v-78204b9d]{display:flex;align-items:center;gap:8px;width:100%;padding:0;border:0;background:transparent;color:#9fb2ff;font:inherit;font-size:13px;font-weight:700;text-align:left;cursor:pointer}.help-module-head[data-v-78204b9d]:hover{color:#fff}.help-module-head .mtitle[data-v-78204b9d]{flex:1;min-width:0}.help-module-head .caret[data-v-78204b9d]{flex:0 0 auto;color:#7b86a2;font-size:12px}.help-module.open .help-module-head[data-v-78204b9d]{color:#fff}.help-module.open .help-module-head .caret[data-v-78204b9d]{color:#9fb2ff}.help-module .mnum[data-v-78204b9d]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:linear-gradient(135deg,#4a53b8,#6a5fd0);color:#fff;font-size:12px;font-weight:700}.help-module.help-connector[data-v-78204b9d]{border-color:#4a4f8a;background:linear-gradient(135deg,#1d2442,#181d2f)}.help-module.help-connector .help-module-head[data-v-78204b9d]{color:#b8c2ff}.help-module .connector-intro[data-v-78204b9d]{margin:0 0 10px;color:#9aa8c4;font-size:11px;line-height:1.6}.help-module .connector-intro b[data-v-78204b9d]{color:#dce4f7}.help-module .dl-link[data-v-78204b9d]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;margin:0 10px 6px 0;padding:6px 12px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;font-size:12px;font-weight:700;text-decoration:none}.help-module .dl-link[data-v-78204b9d]:hover{border-color:#8982ff;background:#554dc2}.help-module .dl-link small[data-v-78204b9d]{color:#cfe0ff;font-weight:500;font-size:9px}.help-module-body[data-v-78204b9d]{padding-top:10px}@media(max-width:760px){.help-overlay[data-v-78204b9d]{padding:66px 12px 14px}.help-grid[data-v-78204b9d]{grid-template-columns:1fr}}.topbar[data-v-4749834a]{position:absolute;top:10px;left:10px;right:10px;dispLine truncated
@@ -1,4 +1,4 @@
var Ae=Object.defineProperty;var Be=(m,o,e)=>o in m?Ae(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e;var a=(m,o,e)=>Be(m,typeof o!="symbol"?o+"":o,e);import{T as Fe,a as he,b as F,S as ue,M as pe,c as oe,W as ne,B as H,d as z,L as Te,E as O,e as ce,p as q,f as Ee,g as fe,A as Q,h as me,i as De,j as V,s as re,G as we,k as $,l as Y,m as Le,P as Ie,n as Re,o as Ne,C as X,q as be,r as _e,t as Ue,u as Ye,v as Xe,w as ee,x as j,y as ke,z as Ve,D as J,F as ge,V as Ge,H as ae,I as We,J as $e,U as xe,K as E,R as ve,N as ye,O as Pe,Q as Oe,X as He,Y as ze,Z as qe,_ as Ke}from"./index-CPXvsWyv.js";import{$ as bt,a0 as kt,a1 as vt,a2 as yt,a3 as Pt,a4 as St,a5 as Mt,a6 as At,a7 as Bt,a8 as Ft,a9 as Et,aa as Dt,ab as Lt,ac as It,ad as Rt,ae as Nt,af as _t,ag as Ut,ah as Yt,ai as Xt,aj as Vt,ak as Gt,al as Wt,am as $t,an as Ot,ao as Ht,ap as zt,aq as qt,ar as Kt,as as Zt,at as Jt,au as Qt,av as jt,aw as es,ax as ts,ay as ss,az as os,aA as ns,aB as as,aC as rs,aD as is,aE as ls,aF as hs,aG as cs,aH as ds,aI as us,aJ as ps,aK as fs,aL as ms,aM as gs,aN as xs,aO as Cs,aP as Ts,aQ as ws,aR as bs,aS as ks,aT as vs,aU as ys,aV as Ps,aW as Ss,aX as Ms,aY as As,aZ as Bs,a_ as Fs,a$ as Es,b0 as Ds,b1 as Ls,b2 as Is,b3 as Rs,b4 as Ns,b5 as _s,b6 as Us,b7 as Ys,b8 as Xs,b9 as Vs,ba as Gs,bb as Ws,bc as $s,bd as Os,be as Hs,bf as zs,bg as qs,bh as Ks,bi as Zs,bj as Js,bk as Qs,bl as js,bm as eo,bn as to,bo as so,bp as oo,bq as no,br as ao,bs as ro,bt as io,bu as lo,bv as ho,bw as co,bx as uo,by as po,bz as fo,bA as mo,bB as go,bC as xo,bD as Co,bE as To,bF as wo,bG as bo,bH as ko,bI as vo,bJ as yo,bK as Po,bL as So,bM as Mo,bN as Ao,bO as Bo,bP as Fo,bQ as Eo,bR as Do,bS as Lo,bT as Io,bU as Ro,bV as No,bW as _o,bX as Uo,bY as Yo,bZ as Xo,b_ as Vo,b$ as Go,c0 as Wo,c1 as $o,c2 as Oo,c3 as Ho}from"./index-CPXvsWyv.js";import{SkeletonClipping as de,SkeletonPhysicsMovement as Ze,AnimationStateData as Je,AtlasAttachmentLoader as Qe,SkeletonBounds as je}from"./index-CT90mgj8.js";import{AssetCache as qo,AssetManagerBase as Ko,Downloader as Zo,SkeletonRendererCore as Jo,Triangulator as Qo}from"./index-CT90mgj8.js";if(typeof window<"u"&&window.PIXI){const m=window.require;window.require=o=>{if(m)return m(o);if(o.startsWith("@pixi/"))return window.PIXI}}const _=class _ extends Fe{constructor(e){super(e.resource.source);a(this,"texture");this.texture=he.from(e)}static from(e){return _.textureMap.has(e)?_.textureMap.get(e):new _(e)}setFilters(e,t){this.texture.baseTexture.scaleMode=_.toPixiTextureFilter(e),this.texture.baseTexture.mipmap=_.toPixiMipMap(e)}setWraps(e,t){this.texture.baseTexture.wrapMode=_.toPixiTextureWrap(e)}dispose(){this.texture.destroy()}static toPixiTextureFilter(e){switch(e){case F.Nearest:case F.MipMapNearestLinear:case F.MipMapNearestNearest:return ue.NEAREST;case F.Linear:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return ue.LINEAR;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiMipMap(e){switch(e){case F.Nearest:case F.Linear:return pe.OFF;case F.MipMapNearestLinear:case F.MipMapNearestNearest:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return pe.ON;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiTextureWrap(e){switch(e){case oe.ClampToEdge:return ne.CLAMP;case oe.MirroredRepeat:return ne.MIRRORED_REPEAT;case oe.Repeat:return ne.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(e)}`)}}static toPixiBlending(e){switch(e){case H.Normal:return z.NORMAL;case H.Additive:return z.ADD;case H.Multiply:return z.MULTIPLY;case H.Screen:return z.SCREEN;default:throw new Error(`Unknown blendMode: ${String(e)}`)}}};a(_,"textureMap",new Map);let G=_;const K="spineTextureAtlasLoader",et={extension:O.Asset,resolver:{test:m=>V(m,".atlas"),parse:m=>{var e,t;const o=m.split(".");return{resolution:parseFloat(((t=(e=re.RETINA_PREFIX)==null?void 0:e.exec(m))==null?void 0:t[1])??"1"),format:o[o.length-2],src:m}}},loader:{name:K,extension:{type:O.LoadParser,priority:Te.Normal,name:K},test(m){return V(m,".atlas")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${K}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return await o.text()},testParse(m,o){const e=V(o.src,".atlas"),t=typeof m=="string",s=o.loadParser===K;return Promise.resolve((e||s)&&t)},unload(m){m.dispose()},async parse(m,o,e){var p;const t=o.data||{};let s=q.dirname(o.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const n=new Ee(m);if(t.images instanceof fe||typeof t.images=="string"){const h=t.images;t.images={},t.images[n.pages[0].name]=h}const r=[];let l=!0;for(const h of e.parsers)if(h.name==="loadTextures"){l=(p=h.config)==null?void 0:p.preferCreateImageBitmap;break}Q.setPreferences({preferCreateImageBitmap:!1});for(const h of n.pages){const u=h.name,c=t!=null&&t.images?t.images[u]:void 0;if(c instanceof fe)h.setTexture(G.from(c));else{const i=c??q.normalize([...s.split(q.sep),u].join(q.sep)),g={src:De(i,o.src),data:{...t.imageMetadLine truncated
var Ae=Object.defineProperty;var Be=(m,o,e)=>o in m?Ae(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e;var a=(m,o,e)=>Be(m,typeof o!="symbol"?o+"":o,e);import{T as Fe,a as he,b as F,S as ue,M as pe,c as oe,W as ne,B as H,d as z,L as Te,E as O,e as ce,p as q,f as Ee,g as fe,A as Q,h as me,i as De,j as V,s as re,G as we,k as $,l as Y,m as Le,P as Ie,n as Re,o as Ne,C as X,q as be,r as _e,t as Ue,u as Ye,v as Xe,w as ee,x as j,y as ke,z as Ve,D as J,F as ge,V as Ge,H as ae,I as We,J as $e,U as xe,K as E,R as ve,N as ye,O as Pe,Q as Oe,X as He,Y as ze,Z as qe,_ as Ke}from"./index-Bjqx1iPW.js";import{$ as bt,a0 as kt,a1 as vt,a2 as yt,a3 as Pt,a4 as St,a5 as Mt,a6 as At,a7 as Bt,a8 as Ft,a9 as Et,aa as Dt,ab as Lt,ac as It,ad as Rt,ae as Nt,af as _t,ag as Ut,ah as Yt,ai as Xt,aj as Vt,ak as Gt,al as Wt,am as $t,an as Ot,ao as Ht,ap as zt,aq as qt,ar as Kt,as as Zt,at as Jt,au as Qt,av as jt,aw as es,ax as ts,ay as ss,az as os,aA as ns,aB as as,aC as rs,aD as is,aE as ls,aF as hs,aG as cs,aH as ds,aI as us,aJ as ps,aK as fs,aL as ms,aM as gs,aN as xs,aO as Cs,aP as Ts,aQ as ws,aR as bs,aS as ks,aT as vs,aU as ys,aV as Ps,aW as Ss,aX as Ms,aY as As,aZ as Bs,a_ as Fs,a$ as Es,b0 as Ds,b1 as Ls,b2 as Is,b3 as Rs,b4 as Ns,b5 as _s,b6 as Us,b7 as Ys,b8 as Xs,b9 as Vs,ba as Gs,bb as Ws,bc as $s,bd as Os,be as Hs,bf as zs,bg as qs,bh as Ks,bi as Zs,bj as Js,bk as Qs,bl as js,bm as eo,bn as to,bo as so,bp as oo,bq as no,br as ao,bs as ro,bt as io,bu as lo,bv as ho,bw as co,bx as uo,by as po,bz as fo,bA as mo,bB as go,bC as xo,bD as Co,bE as To,bF as wo,bG as bo,bH as ko,bI as vo,bJ as yo,bK as Po,bL as So,bM as Mo,bN as Ao,bO as Bo,bP as Fo,bQ as Eo,bR as Do,bS as Lo,bT as Io,bU as Ro,bV as No,bW as _o,bX as Uo,bY as Yo,bZ as Xo,b_ as Vo,b$ as Go,c0 as Wo,c1 as $o,c2 as Oo,c3 as Ho}from"./index-Bjqx1iPW.js";import{SkeletonClipping as de,SkeletonPhysicsMovement as Ze,AnimationStateData as Je,AtlasAttachmentLoader as Qe,SkeletonBounds as je}from"./index-ChTSy5jk.js";import{AssetCache as qo,AssetManagerBase as Ko,Downloader as Zo,SkeletonRendererCore as Jo,Triangulator as Qo}from"./index-ChTSy5jk.js";if(typeof window<"u"&&window.PIXI){const m=window.require;window.require=o=>{if(m)return m(o);if(o.startsWith("@pixi/"))return window.PIXI}}const _=class _ extends Fe{constructor(e){super(e.resource.source);a(this,"texture");this.texture=he.from(e)}static from(e){return _.textureMap.has(e)?_.textureMap.get(e):new _(e)}setFilters(e,t){this.texture.baseTexture.scaleMode=_.toPixiTextureFilter(e),this.texture.baseTexture.mipmap=_.toPixiMipMap(e)}setWraps(e,t){this.texture.baseTexture.wrapMode=_.toPixiTextureWrap(e)}dispose(){this.texture.destroy()}static toPixiTextureFilter(e){switch(e){case F.Nearest:case F.MipMapNearestLinear:case F.MipMapNearestNearest:return ue.NEAREST;case F.Linear:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return ue.LINEAR;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiMipMap(e){switch(e){case F.Nearest:case F.Linear:return pe.OFF;case F.MipMapNearestLinear:case F.MipMapNearestNearest:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return pe.ON;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiTextureWrap(e){switch(e){case oe.ClampToEdge:return ne.CLAMP;case oe.MirroredRepeat:return ne.MIRRORED_REPEAT;case oe.Repeat:return ne.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(e)}`)}}static toPixiBlending(e){switch(e){case H.Normal:return z.NORMAL;case H.Additive:return z.ADD;case H.Multiply:return z.MULTIPLY;case H.Screen:return z.SCREEN;default:throw new Error(`Unknown blendMode: ${String(e)}`)}}};a(_,"textureMap",new Map);let G=_;const K="spineTextureAtlasLoader",et={extension:O.Asset,resolver:{test:m=>V(m,".atlas"),parse:m=>{var e,t;const o=m.split(".");return{resolution:parseFloat(((t=(e=re.RETINA_PREFIX)==null?void 0:e.exec(m))==null?void 0:t[1])??"1"),format:o[o.length-2],src:m}}},loader:{name:K,extension:{type:O.LoadParser,priority:Te.Normal,name:K},test(m){return V(m,".atlas")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${K}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return await o.text()},testParse(m,o){const e=V(o.src,".atlas"),t=typeof m=="string",s=o.loadParser===K;return Promise.resolve((e||s)&&t)},unload(m){m.dispose()},async parse(m,o,e){var p;const t=o.data||{};let s=q.dirname(o.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const n=new Ee(m);if(t.images instanceof fe||typeof t.images=="string"){const h=t.images;t.images={},t.images[n.pages[0].name]=h}const r=[];let l=!0;for(const h of e.parsers)if(h.name==="loadTextures"){l=(p=h.config)==null?void 0:p.preferCreateImageBitmap;break}Q.setPreferences({preferCreateImageBitmap:!1});for(const h of n.pages){const u=h.name,c=t!=null&&t.images?t.images[u]:void 0;if(c instanceof fe)h.setTexture(G.from(c));else{const i=c??q.normalize([...s.split(q.sep),u].join(q.sep)),g={src:De(i,o.src),data:{...t.imageMetadLine truncated
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
+2 -2
View File
@@ -8,8 +8,8 @@
html, body { margin: 0; padding: 0; background: #111; color: #eee; font-family: system-ui, -apple-system, sans-serif; }
#app { display: flex; flex-direction: column; height: 100vh; }
</style>
<script type="module" crossorigin src="/assets/index-CPXvsWyv.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DvMPoOSF.css">
<script type="module" crossorigin src="/assets/index-Bjqx1iPW.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-ChdWidWA.css">
</head>
<body>
<div id="app"></div>
+27
View File
@@ -79,6 +79,33 @@ const source = `
console.error('骨骼池复用:死亡/复用边界应写阶跃关键帧,实际为 ' + JSON.stringify(poolStepped))
}
// 子发射器的帧从父事件时刻才开始,不能按自身生命周期从 0f 截断。
const childFrames = Array.from({ length: 80 }, (_, frame) => (
frame >= 50 && frame < 65 ? [poolState(frame, 1, frame, 0)] : []
))
const subEmitterSystem = {
id: 2, animation: 'animation', visible: true, frames: childFrames,
config: {
name: 'verify_child', mode: 'burst', lifeMode: 'fixed', lifeMin: 0.5, lifeMax: 0.5, delay: 0,
imageResources: [resource], trail: false, trailResources: [], eventEnabled: false, events: [],
},
}
const parentSystem = {
id: 1, animation: 'animation', visible: true, frames: Array.from({ length: 80 }, () => []),
config: {
name: 'verify_parent', mode: 'burst', lifeMode: 'fixed', lifeMin: 0.5, lifeMax: 0.5, delay: 0,
imageResources: [resource], trail: false, trailResources: [], eventEnabled: true,
events: [{ id: 1, event: 'death', targetSystemId: 2, probability: 1 }],
},
}
const subResult = buildSpineJson({ systems: [parentSystem, subEmitterSystem], timeline, settings: poolSettings })
const subBone = subResult.json.animations.animation.bones.verify_child_0
const subFirstFrame = subBone?.translate ? Math.round(subBone.translate[0].time * 30) : -1
if (subFirstFrame !== 50) {
failures++
console.error('子发射器:父事件之后的帧被按自身生命周期截断,实际首帧为 ' + subFirstFrame)
}
// 循环持续(开始 30f / 循环 80f / 结束 30f):段边界 30f、110f 必须在所有动画通道上打关键帧。
const loopConfig = {
name: 'loop', mode: 'stream', streamBehavior: 'loop', rate: 4, delay: 0,
+6 -1
View File
@@ -6,6 +6,7 @@ import { downgradeSpineJsonTo38 } from './spine38JsonExporter'
import { reduceBezierSamples, reduceNumericSamples, roundSpine, unwrapDegrees, type NumericSample } from './spineKeyframeReducer'
import { buildWeightedTrailMesh } from './spineMeshBuilder'
import { loopPlaybackRange, loopSegmentTiming } from '../core/loopSegmentTiming'
import { collectSubEmitterIds } from '../core/subEmitterIds'
type Track = { key: string; name: string; states: Array<ParticleState | null> }
type ExportInput = { systems: ParticleSystem[]; timeline: TimelineState; settings: SpineExportSettings }
@@ -327,6 +328,7 @@ export function buildSpineJson(input: ExportInput): SpineExportResult {
const fps = settings.integerFrameAlignment ? targetFps : sourceFps
const warnings: SpineExportWarning[] = []
const visibleSystems = input.systems.filter((system) => system.visible !== false)
const subEmitterIds = collectSubEmitterIds(input.systems)
const document: SpineJsonDocument = {
// 先生成当前运行时使用的公共结构;3.8 会在最终序列化前降级字段与时间轴格式。
skeleton: { hash: '', spine: settings.spineVersion, x: 0, y: 0, width: 0, height: 0, images: settings.imagesPath || './images/' },
@@ -339,7 +341,10 @@ export function buildSpineJson(input: ExportInput): SpineExportResult {
const animationSystems = new Map<string, Array<{ system: ParticleSystem; tracks: Track[]; targetFrames: number; boundaryFrames: Set<number>; attachmentPrefix: string }>>()
for (const system of visibleSystems) {
const sourceCount = Math.min(system.frames?.length || 0, particleDurationFrames(system, sourceFps))
const frameLength = system.frames?.length || 0
const sourceCount = subEmitterIds.has(system.id)
? frameLength
: Math.min(frameLength, particleDurationFrames(system, sourceFps))
const frames = (system.frames || []).slice(0, sourceCount)
if (!frames.length) warnings.push({ code: 'empty-cache', message: `“${system.config.name}”没有可用帧缓存。` })
const prefix = uniqueName(safeName(system.config.name, `system_${system.id}`), usedNames)
+5 -3
View File
@@ -222,7 +222,6 @@ function bakeSystemFrames(system: ParticleSystem, emitter: ParticleEmitter, fps:
function ensureFramesBaked(fps: number) {
const totalFrames = Math.max(2, Math.floor(store.timeline.totalFrames) || 2)
const subEmitterIds = collectSubEmitterIds(store.systems)
let complete = true
// 烘焙预热会大量出生/死亡粒子,期间暂停跨系统事件,避免注入预热粒子。
emitterSync.suspendEvents(true)
try {
@@ -231,13 +230,16 @@ function ensureFramesBaked(fps: number) {
if (subEmitterIds.has(system.id)) continue
if ((system.frames?.length || 0) >= totalFrames) continue
const emitter = emitterSync.emitters.get(system.id)
if (!emitter) { complete = false; continue }
if (!emitter) continue
bakeSystemFrames(system as unknown as ParticleSystem, emitter, fps, totalFrames)
}
} finally {
emitterSync.suspendEvents(false)
}
if (complete) store.timeline.recorded = true
// 子发射器必须通过父事件逐帧录制;只补齐根系统时不能把整段烘焙标记为完成。
if (store.systems.every((system) => (system.frames?.length || 0) >= totalFrames)) {
store.timeline.recorded = true
}
}
function loop() {