1258 lines
1.6 MiB
Plaintext
1258 lines
1.6 MiB
Plaintext
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Czc7CHAB.js","assets/index-Cq95D0sH.js"])))=>i.map(i=>d[i]);
|
||
var FE=Object.defineProperty;var LE=(i,e,t)=>e in i?FE(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var A=(i,e,t)=>LE(i,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();/**
|
||
* @vue/shared v3.5.41
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/function mg(i){const e=Object.create(null);for(const t of i.split(","))e[t]=1;return t=>t in e}const jt={},Ma=[],Fs=()=>{},n1=()=>!1,Xu=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&(i.charCodeAt(2)>122||i.charCodeAt(2)<97),Yu=i=>i.startsWith("onUpdate:"),_n=Object.assign,gg=(i,e)=>{const t=i.indexOf(e);t>-1&&i.splice(t,1)},DE=Object.prototype.hasOwnProperty,$t=(i,e)=>DE.call(i,e),et=Array.isArray,Pa=i=>yc(i)==="[object Map]",Qa=i=>yc(i)==="[object Set]",Cv=i=>yc(i)==="[object Date]",dt=i=>typeof i=="function",sn=i=>typeof i=="string",Ai=i=>typeof i=="symbol",Ut=i=>i!==null&&typeof i=="object",i1=i=>(Ut(i)||dt(i))&&dt(i.then)&&dt(i.catch),s1=Object.prototype.toString,yc=i=>s1.call(i),OE=i=>yc(i).slice(8,-1),r1=i=>yc(i)==="[object Object]",zu=i=>sn(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,Ll=mg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ju=i=>{const e=Object.create(null);return(t=>e[t]||(e[t]=i(t)))},NE=/-\w/g,Zi=ju(i=>i.replace(NE,e=>e.slice(1).toUpperCase())),$E=/\B([A-Z])/g,ro=ju(i=>i.replace($E,"-$1").toLowerCase()),o1=ju(i=>i.charAt(0).toUpperCase()+i.slice(1)),kh=ju(i=>i?`on${o1(i)}`:""),Es=(i,e)=>!Object.is(i,e),Ad=(i,...e)=>{for(let t=0;t<i.length;t++)i[t](...e)},a1=(i,e,t,n=!1)=>{Object.defineProperty(i,e,{configurable:!0,enumerable:!1,writable:n,value:t})},Hu=i=>{const e=parseFloat(i);return isNaN(e)?i:e},BE=i=>{const e=sn(i)?Number(i):NaN;return isNaN(e)?i:e};let Av;const Gu=()=>Av||(Av=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Yt(i){if(et(i)){const e={};for(let t=0;t<i.length;t++){const n=i[t],s=sn(n)?YE(n):Yt(n);if(s)for(const r in s)e[r]=s[r]}return e}else if(sn(i)||Ut(i))return i}const UE=/;(?![^(]*\))/g,VE=/:([^]+)/,XE=/\/\*[^]*?\*\//g;function YE(i){const e={};return i.replace(XE,"").split(UE).forEach(t=>{if(t){const n=t.split(VE);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Me(i){let e="";if(sn(i))e=i;else if(et(i))for(let t=0;t<i.length;t++){const n=Me(i[t]);n&&(e+=n+" ")}else if(Ut(i))for(const t in i)i[t]&&(e+=t+" ");return e.trim()}const zE="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",jE=mg(zE);function l1(i){return!!i||i===""}function HE(i,e){if(i.length!==e.length)return!1;let t=!0;for(let n=0;t&&n<i.length;n++)t=el(i[n],e[n]);return t}function el(i,e){if(i===e)return!0;let t=Cv(i),n=Cv(e);if(t||n)return t&&n?i.getTime()===e.getTime():!1;if(t=Ai(i),n=Ai(e),t||n)return i===e;if(t=et(i),n=et(e),t||n)return t&&n?HE(i,e):!1;if(t=Ut(i),n=Ut(e),t||n){if(!t||!n)return!1;const s=Object.keys(i).length,r=Object.keys(e).length;if(s!==r)return!1;for(const o in i){const a=i.hasOwnProperty(o),c=e.hasOwnProperty(o);if(a&&!c||!a&&c||!el(i[o],e[o]))return!1}}return String(i)===String(e)}function vg(i,e){return i.findIndex(t=>el(t,e))}const c1=i=>!!(i&&i.__v_isRef===!0),F=i=>sn(i)?i:i==null?"":et(i)||Ut(i)&&(i.toString===s1||!dt(i.toString))?c1(i)?F(i.value):JSON.stringify(i,d1,2):String(i),d1=(i,e)=>c1(e)?d1(i,e.value):Pa(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,s],r)=>(t[Ih(n,r)+" =>"]=s,t),{})}:Qa(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>Ih(t))}:Ai(e)?Ih(e):Ut(e)&&!et(e)&&!r1(e)?String(e):e,Ih=(i,e="")=>{var t;return Ai(i)?`Symbol(${(t=i.description)!=null?t:e})`:i};/**
|
||
* @vue/reactivity v3.5.41
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let An;class u1{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&&An&&(An.active?(this.parent=An,this.index=(An.scopes||(An.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 n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[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 s=this.scopes.slice();for(e=0,t=s.length;e<t;e++)s[e].resume()}const n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){const t=An;try{return An=this,e()}finally{An=t}}}on(){++this._on===1&&(this.prevScope=An,An=this)}off(){if(this._on>0&&--this._on===0){if(An===this)An=this.prevScope;else{let e=An;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,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function bg(i){return new u1(i)}function yg(){return An}function h1(i,e=!1){An&&An.cleanups.push(i)}let qt;const Rh=new WeakSet;class f1{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,An&&(An.active?An.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Rh.has(this)&&(Rh.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||m1(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Tv(this),g1(this);const e=qt,t=Qi;qt=this,Qi=!0;try{return this.fn()}finally{v1(this),qt=e,Qi=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Sg(e);this.deps=this.depsTail=void 0,Tv(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Rh.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){kp(this)&&this.run()}get dirty(){return kp(this)}}let p1=0,Dl,Ol;function m1(i,e=!1){if(i.flags|=8,e){i.next=Ol,Ol=i;return}i.next=Dl,Dl=i}function xg(){p1++}function wg(){if(--p1>0)return;if(Ol){let e=Ol;for(Ol=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let i;for(;Dl;){let e=Dl;for(Dl=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){i||(i=n)}e=t}}if(i)throw i}function g1(i){for(let e=i.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function v1(i){let e,t=i.depsTail,n=t;for(;n;){const s=n.prevDep;n.version===-1?(n===t&&(t=s),Sg(n),GE(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}i.deps=e,i.depsTail=t}function kp(i){for(let e=i.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(b1(e.dep.computed)||e.dep.version!==e.version))return!0;return!!i._dirty}function b1(i){if(i.flags&4&&!(i.flags&16)||(i.flags&=-17,i.globalVersion===Wl)||(i.globalVersion=Wl,!i.isSSR&&i.flags&128&&(!i.deps&&!i._dirty||!kp(i))))return;i.flags|=2;const e=i.dep,t=qt,n=Qi;qt=i,Qi=!0;try{g1(i);const s=i.fn(i._value);(e.version===0||Es(s,i._value))&&(i.flags|=128,i._value=s,e.version++)}catch(s){throw e.version++,s}finally{qt=t,Qi=n,v1(i),i.flags&=-3}}function Sg(i,e=!1){const{dep:t,prevSub:n,nextSub:s}=i;if(n&&(n.nextSub=s,i.prevSub=void 0),s&&(s.prevSub=n,i.nextSub=void 0),t.subs===i&&(t.subs=n,!n&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)Sg(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function GE(i){const{prevDep:e,nextDep:t}=i;e&&(e.nextDep=t,i.prevDep=void 0),t&&(t.prevDep=e,i.nextDep=void 0)}let Qi=!0;const y1=[];function mr(){y1.push(Qi),Qi=!1}function gr(){const i=y1.pop();Qi=i===void 0?!0:i}function Tv(i){const{cleanup:e}=i;if(i.cleanup=void 0,e){const t=qt;qt=void 0;try{e()}finally{qt=t}}}let Wl=0;class WE{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 Cg{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(!qt||!Qi||qt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==qt)t=this.activeLink=new WE(qt,this),qt.deps?(t.prevDep=qt.depsTail,qt.depsTail.nextDep=t,qt.depsTail=t):qt.deps=qt.depsTail=t,x1(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const n=t.nextDep;n.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=n),t.prevDep=qt.depsTail,t.nextDep=void 0,qt.depsTail.nextDep=t,qt.depsTail=t,qt.deps===t&&(qt.deps=n)}return t}trigger(e){this.version++,Wl++,this.notify(e)}notify(e){xg();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{wg()}}}function x1(i){if(i.dep.sc++,i.sub.flags&4){const e=i.dep.computed;if(e&&!i.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)x1(n)}const t=i.dep.subs;t!==i&&(i.prevSub=t,t&&(t.nextSub=i)),i.dep.subs=i}}const Xd=new WeakMap,Oo=Symbol(""),Ip=Symbol(""),ql=Symbol("");function Hn(i,e,t){if(Qi&&qt){let n=Xd.get(i);n||Xd.set(i,n=new Map);let s=n.get(t);s||(n.set(t,s=new Cg),s.map=n,s.key=t),s.track()}}function Qs(i,e,t,n,s,r){const o=Xd.get(i);if(!o){Wl++;return}const a=c=>{c&&c.trigger()};if(xg(),e==="clear")o.forEach(a);else{const c=et(i),l=c&&zu(t);if(c&&t==="length"){const d=Number(n);o.forEach((u,h)=>{(h==="length"||h===ql||!Ai(h)&&h>=d)&&a(u)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),l&&a(o.get(ql)),e){case"add":c?l&&a(o.get("length")):(a(o.get(Oo)),Pa(i)&&a(o.get(Ip)));break;case"delete":c||(a(o.get(Oo)),Pa(i)&&a(o.get(Ip)));break;case"set":Pa(i)&&a(o.get(Oo));break}}wg()}function qE(i,e){const t=Xd.get(i);return t&&t.get(e)}function sa(i){const e=Ft(i);return e===i?e:(Hn(e,"iterate",ql),Ci(i)?e:e.map(rs))}function Wu(i){return Hn(i=Ft(i),"iterate",ql),i}function Ss(i,e){return vr(i)?Xa(ur(i)?rs(e):e):rs(e)}const KE={__proto__:null,[Symbol.iterator](){return Fh(this,Symbol.iterator,i=>Ss(this,i))},concat(...i){return sa(this).concat(...i.map(e=>et(e)?sa(e):e))},entries(){return Fh(this,"entries",i=>(i[1]=Ss(this,i[1]),i))},every(i,e){return Vs(this,"every",i,e,void 0,arguments)},filter(i,e){return Vs(this,"filter",i,e,t=>t.map(n=>Ss(this,n)),arguments)},find(i,e){return Vs(this,"find",i,e,t=>Ss(this,t),arguments)},findIndex(i,e){return Vs(this,"findIndex",i,e,void 0,arguments)},findLast(i,e){return Vs(this,"findLast",i,e,t=>Ss(this,t),arguments)},findLastIndex(i,e){return Vs(this,"findLastIndex",i,e,void 0,arguments)},forEach(i,e){return Vs(this,"forEach",i,e,void 0,arguments)},includes(...i){return Lh(this,"includes",i)},indexOf(...i){return Lh(this,"indexOf",i)},join(i){return sa(this).join(i)},lastIndexOf(...i){return Lh(this,"lastIndexOf",i)},map(i,e){return Vs(this,"map",i,e,void 0,arguments)},pop(){return hl(this,"pop")},push(...i){return hl(this,"push",i)},reduce(i,...e){return Ev(this,"reduce",i,e)},reduceRight(i,...e){return Ev(this,"reduceRight",i,e)},shift(){return hl(this,"shift")},some(i,e){return Vs(this,"some",i,e,void 0,arguments)},splice(...i){return hl(this,"splice",i)},toReversed(){return sa(this).toReversed()},toSorted(i){return sa(this).toSorted(i)},toSpliced(...i){return sa(this).toSpliced(...i)},unshift(...i){return hl(this,"unshift",i)},values(){return Fh(this,"values",i=>Ss(this,i))}};function Fh(i,e,t){const n=Wu(i),s=n[e]();return n!==i&&!Ci(i)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.done||(r.value=t(r.value)),r}),s}const JE=Array.prototype;function Vs(i,e,t,n,s,r){const o=Wu(i),a=o!==i&&!Ci(i),c=o[e];if(c!==JE[e]){const u=c.apply(i,r);return a?rs(u):u}let l=t;o!==i&&(a?l=function(u,h){return t.call(this,Ss(i,u),h,i)}:t.length>2&&(l=function(u,h){return t.call(this,u,h,i)}));const d=c.call(o,l,n);return a&&s?s(d):d}function Ev(i,e,t,n){const s=Wu(i),r=s!==i&&!Ci(i);let o=t,a=!1;s!==i&&(r?(a=n.length===0,o=function(l,d,u){return a&&(a=!1,l=Ss(i,l)),t.call(this,l,Ss(i,d),u,i)}):t.length>3&&(o=function(l,d,u){return t.call(this,l,d,u,i)}));const c=s[e](o,...n);return a?Ss(i,c):c}function Lh(i,e,t){const n=Ft(i);Hn(n,"iterate",ql);const s=n[e](...t);return(s===-1||s===!1)&&qu(t[0])?(t[0]=Ft(t[0]),n[e](...t)):s}function hl(i,e,t=[]){mr(),xg();const n=Ft(i)[e].apply(i,t);return wg(),gr(),n}const ZE=mg("__proto__,__v_isRef,__isVue"),w1=new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(Ai));function QE(i){Ai(i)||(i=String(i));const e=Ft(this);return Hn(e,"has",i),e.hasOwnProperty(i)}class S1{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t==="__v_skip")return e.__v_skip;const s=this._isReadonly,r=this._isShallow;if(t==="__v_isReactive")return!s;if(t==="__v_isReadonly")return s;if(t==="__v_isShallow")return r;if(t==="__v_raw")return n===(s?r?c_:E1:r?T1:A1).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=et(e);if(!s){let c;if(o&&(c=KE[t]))return c;if(t==="hasOwnProperty")return QE}const a=Reflect.get(e,t,Jt(e)?e:n);if((Ai(t)?w1.has(t):ZE(t))||(s||Hn(e,"get",t),r))return a;if(Jt(a)){const c=o&&zu(t)?a:a.value;return s&&Ut(c)?Fp(c):c}return Ut(a)?s?Fp(a):qo(a):a}}class C1 extends S1{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];const o=et(e)&&zu(t);if(!this._isShallow){const l=vr(r);if(!Ci(n)&&!vr(n)&&(r=Ft(r),n=Ft(n)),!o&&Jt(r)&&!Jt(n))return l||(r.value=n),!0}const a=o?Number(t)<e.length:$t(e,t),c=Reflect.set(e,t,n,Jt(e)?e:s);return e===Ft(s)&&c&&(a?Es(n,r)&&Qs(e,"set",t,n):Qs(e,"add",t,n)),c}deleteProperty(e,t){const n=$t(e,t);e[t];const s=Reflect.deleteProperty(e,t);return s&&n&&Qs(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return(!Ai(t)||!w1.has(t))&&Hn(e,"has",t),n}ownKeys(e){return Hn(e,"iterate",et(e)?"length":Oo),Reflect.ownKeys(e)}}class e_ extends S1{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const t_=new C1,n_=new e_,i_=new C1(!0);const Rp=i=>i,Dc=i=>Reflect.getPrototypeOf(i);function s_(i,e,t){return function(...n){const s=this.__v_raw,r=Ft(s),o=Pa(r),a=i==="entries"||i===Symbol.iterator&&o,c=i==="keys"&&o,l=s[i](...n),d=t?Rp:e?Xa:rs;return!e&&Hn(r,"iterate",c?Ip:Oo),_n(Object.create(l),{next(){const{value:u,done:h}=l.next();return h?{value:u,done:h}:{value:a?[d(u[0]),d(u[1])]:d(u),done:h}}})}}function Oc(i){return function(...e){return i==="delete"?!1:i==="clear"?void 0:this}}function r_(i,e){const t={get(s){const r=this.__v_raw,o=Ft(r),a=Ft(s);i||(Es(s,a)&&Hn(o,"get",s),Hn(o,"get",a));const{has:c}=Dc(o),l=e?Rp:i?Xa:rs;if(c.call(o,s))return l(r.get(s));if(c.call(o,a))return l(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!i&&Hn(Ft(s),"iterate",Oo),s.size},has(s){const r=this.__v_raw,o=Ft(r),a=Ft(s);return i||(Es(s,a)&&Hn(o,"has",s),Hn(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,c=Ft(a),l=e?Rp:i?Xa:rs;return!i&&Hn(c,"iterate",Oo),a.forEach((d,u)=>s.call(r,l(d),l(u),o))}};return _n(t,i?{add:Oc("add"),set:Oc("set"),delete:Oc("delete"),clear:Oc("clear")}:{add(s){const r=Ft(this),o=Dc(r),a=Ft(s),c=!e&&!Ci(s)&&!vr(s)?a:s;return o.has.call(r,c)||Es(s,c)&&o.has.call(r,s)||Es(a,c)&&o.has.call(r,a)||(r.add(c),Qs(r,"add",c,c)),this},set(s,r){!e&&!Ci(r)&&!vr(r)&&(r=Ft(r));const o=Ft(this),{has:a,get:c}=Dc(o);let l=a.call(o,s);l||(s=Ft(s),l=a.call(o,s));const d=c.call(o,s);return o.set(s,r),l?Es(r,d)&&Qs(o,"set",s,r):Qs(o,"add",s,r),this},delete(s){const r=Ft(this),{has:o,get:a}=Dc(r);let c=o.call(r,s);c||(s=Ft(s),c=o.call(r,s)),a&&a.call(r,s);const l=r.delete(s);return c&&Qs(r,"delete",s,void 0),l},clear(){const s=Ft(this),r=s.size!==0,o=s.clear();return r&&Qs(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=s_(s,i,e)}),t}function Ag(i,e){const t=r_(i,e);return(n,s,r)=>s==="__v_isReactive"?!i:s==="__v_isReadonly"?i:s==="__v_raw"?n:Reflect.get($t(t,s)&&s in n?t:n,s,r)}const o_={get:Ag(!1,!1)},a_={get:Ag(!1,!0)},l_={get:Ag(!0,!1)};const A1=new WeakMap,T1=new WeakMap,E1=new WeakMap,c_=new WeakMap;function d_(i){switch(i){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qo(i){return vr(i)?i:Tg(i,!1,t_,o_,A1)}function u_(i){return Tg(i,!1,i_,a_,T1)}function Fp(i){return Tg(i,!0,n_,l_,E1)}function Tg(i,e,t,n,s){if(!Ut(i)||i.__v_raw&&!(e&&i.__v_isReactive)||i.__v_skip||!Object.isExtensible(i))return i;const r=s.get(i);if(r)return r;const o=d_(OE(i));if(o===0)return i;const a=new Proxy(i,o===2?n:t);return s.set(i,a),a}function ur(i){return vr(i)?ur(i.__v_raw):!!(i&&i.__v_isReactive)}function vr(i){return!!(i&&i.__v_isReadonly)}function Ci(i){return!!(i&&i.__v_isShallow)}function qu(i){return i?!!i.__v_raw:!1}function Ft(i){const e=i&&i.__v_raw;return e?Ft(e):i}function Hr(i){return!$t(i,"__v_skip")&&Object.isExtensible(i)&&a1(i,"__v_skip",!0),i}const rs=i=>Ut(i)?qo(i):i,Xa=i=>Ut(i)?Fp(i):i;function Jt(i){return i?i.__v_isRef===!0:!1}function Re(i){return _1(i,!1)}function h_(i){return _1(i,!0)}function _1(i,e){return Jt(i)?i:new f_(i,e)}class f_{constructor(e,t){this.dep=new Cg,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ft(e),this._value=t?e:rs(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Ci(e)||vr(e);e=n?e:Ft(e),Es(e,t)&&(this._rawValue=e,this._value=n?e:rs(e),this.dep.trigger())}}function _(i){return Jt(i)?i.value:i}const p_={get:(i,e,t)=>e==="__v_raw"?i:_(Reflect.get(i,e,t)),set:(i,e,t,n)=>{const s=i[e];return Jt(s)&&!Jt(t)?(s.value=t,!0):Reflect.set(i,e,t,n)}};function M1(i){return ur(i)?i:new Proxy(i,p_)}function m_(i){const e=et(i)?new Array(i.length):{};for(const t in i)e[t]=v_(i,t);return e}class g_{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=Ai(t)?t:String(t),this._raw=Ft(e);let s=!0,r=e;if(!et(e)||Ai(this._key)||!zu(this._key))do s=!qu(r)||Ci(r);while(s&&(r=r.__v_raw));this._shallow=s}get value(){let e=this._object[this._key];return this._shallow&&(e=_(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Jt(this._raw[this._key])){const t=this._object[this._key];if(Jt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return qE(this._raw,this._key)}}function v_(i,e,t){return new g_(i,e,t)}class b_{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Cg(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Wl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&qt!==this)return m1(this,!0),!0}get value(){const e=this.dep.track();return b1(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function y_(i,e,t=!1){let n,s;return dt(i)?n=i:(n=i.get,s=i.set),new b_(n,s,t)}const Nc={},Yd=new WeakMap;let xo;function x_(i,e=!1,t=xo){if(t){let n=Yd.get(t);n||Yd.set(t,n=[]),n.push(i)}}function w_(i,e,t=jt){const{immediate:n,deep:s,once:r,scheduler:o,augmentJob:a,call:c}=t,l=x=>s?x:Ci(x)||s===!1||s===0?er(x,1):er(x);let d,u,h,f,p=!1,m=!1;if(Jt(i)?(u=()=>i.value,p=Ci(i)):ur(i)?(u=()=>l(i),p=!0):et(i)?(m=!0,p=i.some(x=>ur(x)||Ci(x)),u=()=>i.map(x=>{if(Jt(x))return x.value;if(ur(x))return l(x);if(dt(x))return c?c(x,2):x()})):dt(i)?e?u=c?()=>c(i,2):i:u=()=>{if(h){mr();try{h()}finally{gr()}}const x=xo;xo=d;try{return c?c(i,3,[f]):i(f)}finally{xo=x}}:u=Fs,e&&s){const x=u,T=s===!0?1/0:s;u=()=>er(x(),T)}const g=yg(),v=()=>{d.stop(),g&&g.active&&gg(g.effects,d)};if(r&&e){const x=e;e=(...T)=>{const E=x(...T);return v(),E}}let y=m?new Array(i.length).fill(Nc):Nc;const b=x=>{if(!(!(d.flags&1)||!d.dirty&&!x))if(e){const T=d.run();if(x||s||p||(m?T.some((E,S)=>Es(E,y[S])):Es(T,y))){h&&h();const E=xo;xo=d;try{const S=[T,y===Nc?void 0:m&&y[0]===Nc?[]:y,f];y=T,c?c(e,3,S):e(...S)}finally{xo=E}}}else d.run()};return a&&a(b),d=new f1(u),d.scheduler=o?()=>o(b,!1):b,f=x=>x_(x,!1,d),h=d.onStop=()=>{const x=Yd.get(d);if(x){if(c)c(x,4);else for(const T of x)T();Yd.delete(d)}},e?n?b(!0):y=d.run():o?o(b.bind(null,!0),!0):d.run(),v.pause=d.pause.bind(d),v.resume=d.resume.bind(d),v.stop=v,v}function er(i,e=1/0,t){if(e<=0||!Ut(i)||i.__v_skip||(t=t||new Map,(t.get(i)||0)>=e))return i;if(t.set(i,e),e--,Jt(i))er(i.value,e,t);else if(et(i))for(let n=0;n<i.length;n++)er(i[n],e,t);else if(Qa(i)||Pa(i))i.forEach(n=>{er(n,e,t)});else if(r1(i)){for(const n in i)er(i[n],e,t);for(const n of Object.getOwnPropertySymbols(i))Object.prototype.propertyIsEnumerable.call(i,n)&&er(i[n],e,t)}return i}/**
|
||
* @vue/runtime-core v3.5.41
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/function xc(i,e,t,n){try{return n?i(...n):i()}catch(s){Ku(s,e,t)}}function $i(i,e,t,n){if(dt(i)){const s=xc(i,e,t,n);return s&&i1(s)&&s.catch(r=>{Ku(r,e,t)}),s}if(et(i)){const s=[];for(let r=0;r<i.length;r++)s.push($i(i[r],e,t,n));return s}}function Ku(i,e,t,n=!0){const s=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||jt;if(e){let a=e.parent;const c=e.proxy,l=`https://vuejs.org/error-reference/#runtime-${t}`;for(;a;){const d=a.ec;if(d){for(let u=0;u<d.length;u++)if(d[u](i,c,l)===!1)return}a=a.parent}if(r){mr(),xc(r,null,10,[i,c,l]),gr();return}}S_(i,t,s,n,o)}function S_(i,e,t,n=!0,s=!1){if(s)throw i;console.error(i)}const ii=[];let vs=-1;const ka=[];let Or=null,pa=0;const P1=Promise.resolve();let zd=null;function tl(i){const e=zd||P1;return i?e.then(this?i.bind(this):i):e}function C_(i){let e=vs+1,t=ii.length;for(;e<t;){const n=e+t>>>1,s=ii[n],r=Kl(s);r<i||r===i&&s.flags&2?e=n+1:t=n}return e}function Eg(i){if(!(i.flags&1)){const e=Kl(i),t=ii[ii.length-1];!t||!(i.flags&2)&&e>=Kl(t)?ii.push(i):ii.splice(C_(e),0,i),i.flags|=1,k1()}}function k1(){zd||(zd=P1.then(R1))}function A_(i){if(!et(i))Or&&i.id===-1?Or.splice(pa+1,0,i):i.flags&1||(ka.push(i),i.flags|=1);else for(let e=0;e<i.length;e++)ka.push(i[e]);k1()}function _v(i,e,t=vs+1){for(;t<ii.length;t++){const n=ii[t];if(n&&n.flags&2){if(i&&n.id!==i.uid)continue;ii.splice(t,1),t--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function I1(i){if(ka.length){const e=[...new Set(ka)].sort((t,n)=>Kl(t)-Kl(n));if(ka.length=0,Or){for(let t=0;t<e.length;t++)Or.push(e[t]);return}for(Or=e,pa=0;pa<Or.length;pa++){const t=Or[pa];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}Or=null,pa=0}}const Kl=i=>i.id==null?i.flags&2?-1:1/0:i.id;function R1(i){try{for(vs=0;vs<ii.length;vs++){const e=ii[vs];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),xc(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;vs<ii.length;vs++){const e=ii[vs];e&&(e.flags&=-2)}vs=-1,ii.length=0,I1(),zd=null,(ii.length||ka.length)&&R1()}}let qn=null,F1=null;function jd(i){const e=qn;return qn=i,F1=i&&i.type.__scopeId||null,e}function Ju(i,e=qn,t){if(!e||i._n)return i;const n=(...s)=>{n._d&&qd(-1);const r=jd(e),o=hr.length;let a;try{a=i(...s)}finally{for(let c=hr.length;c>o;c--)Ig();jd(r),n._d&&qd(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function pe(i,e){if(qn===null)return i;const t=sh(qn),n=i.dirs||(i.dirs=[]);for(let s=0;s<e.length;s++){let[r,o,a,c=jt]=e[s];r&&(dt(r)&&(r={mounted:r,updated:r}),r.deep&&er(o),n.push({dir:r,instance:t,value:o,oldValue:void 0,arg:a,modifiers:c}))}return i}function fo(i,e,t,n){const s=i.dirs,r=e&&e.dirs;for(let o=0;o<s.length;o++){const a=s[o];r&&(a.oldValue=r[o].value);let c=a.dir[n];c&&(mr(),$i(c,t,8,[i.el,a,i,e]),gr())}}function L1(i,e){if(si){let t=si.provides;const n=si.parent&&si.parent.provides;n===t&&(t=si.provides=Object.create(n)),t[i]=e}}function No(i,e,t=!1){const n=ih();if(n||$o){let s=$o?$o._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&i in s)return s[i];if(arguments.length>1)return t&&dt(e)?e.call(n&&n.proxy):e}}function T_(){return!!(ih()||$o)}const E_=Symbol.for("v-scx"),__=()=>No(E_);function ma(i,e){return _g(i,null,e)}function Vt(i,e,t){return _g(i,e,t)}function _g(i,e,t=jt){const{immediate:n,deep:s,flush:r,once:o}=t,a=_n({},t),c=e&&n||!e&&r!=="post";let l;if(tc){if(r==="sync"){const f=__();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){const f=()=>{};return f.stop=Fs,f.resume=Fs,f.pause=Fs,f}}const d=si;a.call=(f,p,m)=>$i(f,d,p,m);let u=!1;r==="post"?a.scheduler=f=>{ei(f,d&&d.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(f,p)=>{p?f():Eg(f)}),a.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,d&&(f.id=d.uid,f.i=d))};const h=w_(i,e,a);return tc&&(l?l.push(h):c&&h()),h}function M_(i,e,t){const n=this.proxy,s=sn(i)?i.includes(".")?D1(n,i):()=>n[i]:i.bind(n,n);let r;dt(e)?r=e:(r=e.handler,t=e);const o=Sc(this),a=_g(s,r.bind(n),t);return o(),a}function D1(i,e){const t=e.split(".");return()=>{let n=i;for(let s=0;s<t.length&&n;s++)n=n[t[s]];return n}}const Ir=new WeakMap,O1=Symbol("_vte"),Zu=i=>i.__isTeleport,Eo=i=>i&&(i.disabled||i.disabled===""),P_=i=>i&&(i.defer||i.defer===""),Mv=i=>typeof SVGElement<"u"&&i instanceof SVGElement,Pv=i=>typeof MathMLElement=="function"&&i instanceof MathMLElement,Lp=(i,e)=>{const t=i&&i.to;return sn(t)?e?e(t):null:t},k_={name:"Teleport",__isTeleport:!0,process(i,e,t,n,s,r,o,a,c,l){const{mc:d,pc:u,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:g,parentNode:v}}=l,y=Eo(e.props);let{dynamicChildren:b}=e;const x=(S,C,M)=>{S.shapeFlag&16&&d(S.children,C,M,s,r,o,a,c)},T=(S=e)=>{const C=Eo(S.props),M=S.target=Lp(S.props,p),k=Dp(M,S,m,f);M&&(o!=="svg"&&Mv(M)?o="svg":o!=="mathml"&&Pv(M)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(M),C||(x(S,M,k),Cl(S,!1)))},E=S=>{const C=()=>{if(Ir.get(S)===C){if(Ir.delete(S),Eo(S.props)){const M=v(S.el)||t;x(S,M,S.anchor),Cl(S,!0)}T(S)}};Ir.set(S,C),ei(C,r)};if(i==null){const S=e.el=m(""),C=e.anchor=m("");if(f(S,t,n),f(C,t,n),P_(e.props)||r&&r.pendingBranch){E(e);return}y&&(x(e,t,C),Cl(e,!0)),T()}else{e.el=i.el;const S=e.anchor=i.anchor,C=Ir.get(i);if(C){C.flags|=8,Ir.delete(i),E(e);return}e.targetStart=i.targetStart;const M=e.target=i.target,k=e.targetAnchor=i.targetAnchor,P=Eo(i.props),I=P?t:M,D=P?S:k;if(o==="svg"||Mv(M)?o="svg":(o==="mathml"||Pv(M))&&(o="mathml"),b?(h(i.dynamicChildren,b,I,s,r,o,a),kg(i,e,!0)):c||u(i,e,I,D,s,r,o,a,!1),y)P?e.props&&i.props&&e.props.to!==i.props.to&&(e.props.to=i.props.to):$c(e,t,S,l,1);else if((e.props&&e.props.to)!==(i.props&&i.props.to)){const $=Lp(e.props,p);$&&(e.target=$,$c(e,$,null,l,0))}else P&&$c(e,M,k,l,1);Cl(e,y)}},remove(i,e,t,{um:n,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:c,targetStart:l,targetAnchor:d,target:u,props:h}=i,f=Eo(h),p=r||!f,m=Ir.get(i);if(m&&(m.flags|=8,Ir.delete(i)),u&&(s(l),s(d)),r&&s(c),!m&&(f||u)&&o&16)for(let g=0;g<a.length;g++){const v=a[g];n(v,e,t,p,!!v.dynamicChildren)}},move:$c,hydrate:I_};function $c(i,e,t,{o:{insert:n},m:s},r=2){r===0&&n(i.targetAnchor,e,t);const{el:o,anchor:a,shapeFlag:c,children:l,props:d}=i,u=r===2;if(u&&n(o,e,t),!Ir.has(i)&&(!u||Eo(d))&&c&16)for(let h=0;h<l.length;h++)s(l[h],e,t,2);u&&n(a,e,t)}function I_(i,e,t,n,s,r,{o:{nextSibling:o,parentNode:a,querySelector:c,insert:l,createText:d}},u){function h(g,v){let y=v;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")e.targetStart=y;else if(y.data==="teleport anchor"){e.targetAnchor=y,g._lpa=e.targetAnchor&&o(e.targetAnchor);break}}y=o(y)}}function f(g,v){v.anchor=u(o(g),v,a(g),t,n,s,r)}const p=e.target=Lp(e.props,c),m=Eo(e.props);if(p){const g=p._lpa||p.firstChild;e.shapeFlag&16&&(m?(f(i,e),h(p,g),e.targetAnchor||Dp(p,e,d,l,a(i)===p?i:null)):(e.anchor=o(i),h(p,g),e.targetAnchor||Dp(p,e,d,l),u(g&&o(g),e,p,t,n,s,r))),Cl(e,m)}else m&&e.shapeFlag&16&&(f(i,e),e.targetStart=i,e.targetAnchor=o(i));return e.anchor&&o(e.anchor)}const Qu=k_;function Cl(i,e){const t=i.ctx;if(t&&t.ut){let n,s;for(e?(n=i.el,s=i.anchor):(n=i.targetStart,s=i.targetAnchor);n&&n!==s;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Dp(i,e,t,n,s=null){const r=e.targetStart=t(""),o=e.targetAnchor=t("");return r[O1]=o,i&&(n(r,i,s),n(o,i,s)),o}const Ri=Symbol("_leaveCb"),fl=Symbol("_enterCb");function R_(){const i={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ti(()=>{i.isMounted=!0}),Ar(()=>{i.isUnmounting=!0}),i}const Mi=[Function,Array],N1={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Mi,onEnter:Mi,onAfterEnter:Mi,onEnterCancelled:Mi,onBeforeLeave:Mi,onLeave:Mi,onAfterLeave:Mi,onLeaveCancelled:Mi,onBeforeAppear:Mi,onAppear:Mi,onAfterAppear:Mi,onAppearCancelled:Mi},$1=i=>{const e=i.subTree;return e.component?$1(e.component):e},F_={name:"BaseTransition",props:N1,setup(i,{slots:e}){const t=ih(),n=R_();return()=>{const s=e.default&&V1(e.default(),!0),r=s&&s.length?B1(s):t.subTree?xe():void 0;if(!r)return;const o=Ft(i),{mode:a}=o;if(n.isLeaving)return Dh(r);const c=Hd(r);if(!c)return Dh(r);let l=Op(c,o,n,t,u=>l=u);c.type!==Wn&&Jl(c,l);let d=t.subTree&&Hd(t.subTree);if(d&&d.type!==Wn&&!_o(d,c)&&$1(t).type!==Wn){let u=Op(d,o,n,t);if(Jl(d,u),a==="out-in"&&c.type!==Wn)return n.isLeaving=!0,u.afterLeave=()=>{n.isLeaving=!1,t.job.flags&8||t.update(),delete u.afterLeave,d=void 0},Dh(r);a==="in-out"&&c.type!==Wn?u.delayLeave=(h,f,p)=>{const m=U1(n,d);m[String(d.key)]=d,h[Ri]=()=>{f(),h[Ri]=void 0,delete l.delayedLeave,d=void 0},l.delayedLeave=()=>{p(),delete l.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return r}}};function B1(i){let e=i[0];if(i.length>1){for(const t of i)if(t.type!==Wn){e=t;break}}return e}const L_=F_;function U1(i,e){const{leavingVNodes:t}=i;let n=t.get(e.type);return n||(n=Object.create(null),t.set(e.type,n)),n}function Op(i,e,t,n,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:d,onEnterCancelled:u,onBeforeLeave:h,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=e,x=String(i.key),T=U1(t,i),E=(M,k)=>{M&&$i(M,n,9,k)},S=(M,k)=>{const P=k[1];E(M,k),et(M)?M.every(I=>I.length<=1)&&P():M.length<=1&&P()},C={mode:o,persisted:a,beforeEnter(M){let k=c;if(!t.isMounted)if(r)k=g||c;else return;M[Ri]&&M[Ri](!0);const P=T[x];P&&_o(i,P)&&P.el[Ri]&&P.el[Ri](),E(k,[M])},enter(M){if(T[x]===i)return;let k=l,P=d,I=u;if(!t.isMounted)if(r)k=v||l,P=y||d,I=b||u;else return;let D=!1;M[fl]=j=>{D||(D=!0,j?E(I,[M]):E(P,[M]),C.delayedLeave&&C.delayedLeave(),M[fl]=void 0)};const $=M[fl].bind(null,!1);k?S(k,[M,$]):$()},leave(M,k){const P=String(i.key);if(M[fl]&&M[fl](!0),t.isUnmounting)return k();E(h,[M]);let I=!1;M[Ri]=$=>{I||(I=!0,k(),$?E(m,[M]):E(p,[M]),M[Ri]=void 0,T[P]===i&&delete T[P])};const D=M[Ri].bind(null,!1);T[P]=i,f?S(f,[M,D]):D()},clone(M){const k=Op(M,e,t,n,s);return s&&s(k),k}};return C}function Dh(i){if(eh(i))return i=to(i),i.children=null,i}function Hd(i){if(!eh(i))return Zu(i.type)&&i.children?B1(i.children):i;if(i.component)return i.component.subTree;const{shapeFlag:e,children:t}=i;if(t){if(e&16)return t[0];if(e&32&&dt(t.default))return t.default()}}function Jl(i,e){if(i.shapeFlag&6&&i.component){i.transition=e;const t=i.component.subTree;Jl(Zu(t.type)&&Hd(t)||t,e)}else i.shapeFlag&128?(i.ssContent.transition=e.clone(i.ssContent),i.ssFallback.transition=e.clone(i.ssFallback)):i.transition=e}function V1(i,e=!1,t){let n=[],s=0;for(let r=0;r<i.length;r++){let o=i[r];const a=t==null?o.key:String(t)+String(o.key!=null?o.key:r);o.type===_e?(o.patchFlag&128&&s++,n=n.concat(V1(o.children,e,a))):(e||o.type!==Wn)&&n.push(a!=null?to(o,{key:a}):o)}if(s>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}function Zt(i,e){return dt(i)?_n({name:i.name},e,{setup:i}):i}function X1(i){i.ids=[i.ids[0]+i.ids[2]+++"-",0,0]}function kv(i,e){let t;return!!((t=Object.getOwnPropertyDescriptor(i,e))&&!t.configurable)}const Gd=new WeakMap;function Nl(i,e,t,n,s=!1){if(et(i)){i.forEach((m,g)=>Nl(m,e&&(et(e)?e[g]:e),t,n,s));return}if(Ia(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Nl(i,e,t,n.component.subTree);return}const r=n.shapeFlag&4?sh(n.component):n.el,o=s?null:r,{i:a,r:c}=i,l=e&&e.r,d=a.refs===jt?a.refs={}:a.refs,u=a.setupState,h=Ft(u),f=u===jt?n1:m=>kv(d,m)?!1:$t(h,m),p=(m,g)=>!(g&&kv(d,g));if(l!=null&&l!==c){if(Iv(e),sn(l))d[l]=null,f(l)&&(u[l]=null);else if(Jt(l)){const m=e;p(l,m.k)&&(l.value=null),m.k&&(d[m.k]=null)}}if(dt(c))xc(c,a,12,[o,d]);else{const m=sn(c),g=Jt(c);if(m||g){const v=()=>{if(i.f){const y=m?f(c)?u[c]:d[c]:p()||!i.k?c.value:d[i.k];if(s)et(y)&&gg(y,r);else if(et(y))y.includes(r)||y.push(r);else if(m)d[c]=[r],f(c)&&(u[c]=d[c]);else{const b=[r];p(c,i.k)&&(c.value=b),i.k&&(d[i.k]=b)}}else m?(d[c]=o,f(c)&&(u[c]=o)):g&&(p(c,i.k)&&(c.value=o),i.k&&(d[i.k]=o))};if(o){const y=()=>{v(),Gd.delete(i)};y.id=-1,Gd.set(i,y),ei(y,t)}else Iv(i),v()}}}function Iv(i){const e=Gd.get(i);e&&(e.flags|=8,Gd.delete(i))}Gu().requestIdleCallback;Gu().cancelIdleCallback;const Ia=i=>!!i.type.__asyncLoader,eh=i=>i.type.__isKeepAlive;function D_(i,e){Y1(i,"a",e)}function O_(i,e){Y1(i,"da",e)}function Y1(i,e,t=si){const n=i.__wdc||(i.__wdc=()=>{let s=t;for(;s;){if(s.isDeactivated)return;s=s.parent}return i()});if(th(e,n,t),t){let s=t.parent;for(;s&&s.parent;)eh(s.parent.vnode)&&N_(n,e,t,s),s=s.parent}}function N_(i,e,t,n){const s=th(e,i,n,!0);nl(()=>{gg(n[e],s)},t)}function th(i,e,t=si,n=!1){if(t){const s=t[i]||(t[i]=[]),r=e.__weh||(e.__weh=(...o)=>{mr();const a=Sc(t),c=$i(e,t,i,o);return a(),gr(),c});return n?s.unshift(r):s.push(r),r}}const Cr=i=>(e,t=si)=>{(!tc||i==="sp")&&th(i,(...n)=>e(...n),t)},$_=Cr("bm"),Ti=Cr("m"),B_=Cr("bu"),U_=Cr("u"),Ar=Cr("bum"),nl=Cr("um"),V_=Cr("sp"),X_=Cr("rtg"),Y_=Cr("rtc");function z_(i,e=si){th("ec",i,e)}const j_=Symbol.for("v-ndc");function Mt(i,e,t,n){let s;const r=t,o=et(i);if(o||sn(i)){const a=o&&ur(i);let c=!1,l=!1;a&&(c=!Ci(i),l=vr(i),i=Wu(i)),s=new Array(i.length);for(let d=0,u=i.length;d<u;d++)s[d]=e(c?l?Xa(rs(i[d])):rs(i[d]):i[d],d,void 0,r)}else if(typeof i=="number"){s=new Array(i);for(let a=0;a<i;a++)s[a]=e(a+1,a,void 0,r)}else if(Ut(i))if(i[Symbol.iterator])s=Array.from(i,(a,c)=>e(a,c,void 0,r));else{const a=Object.keys(i);s=new Array(a.length);for(let c=0,l=a.length;c<l;c++){const d=a[c];s[c]=e(i[d],d,c,r)}}else s=[];return s}function H_(i,e,t,n,s,r){if(t==null&&(t={}),qn.ce||qn.parent&&Ia(qn.parent)&&qn.parent.ce){const l=t,d=Object.keys(l).length>0;return Q(),kt(_e,null,[Ce("slot",l,n)],d?-2:64)}let o=i[e];o&&o._c&&(o._d=!1);const a=hr.length;Q();let c;try{const l=o&&z1(o(t)),d=t.key||r||l&&l.key;c=kt(_e,{key:(d&&!Ai(d)?d:`_${e}`)+(!l&&n?"_fb":"")},l||(n?n():[]),l&&i._===1?64:-2)}catch(l){for(let d=hr.length;d>a;d--)Ig();throw l}finally{o&&o._c&&(o._d=!0)}return c}function z1(i){return i.some(e=>Ql(e)?!(e.type===Wn||e.type===_e&&!z1(e.children)):!0)?i:null}const Np=i=>i?cw(i)?sh(i):Np(i.parent):null,$l=_n(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>Np(i.parent),$root:i=>Np(i.root),$host:i=>i.ce,$emit:i=>i.emit,$options:i=>H1(i),$forceUpdate:i=>i.f||(i.f=()=>{Eg(i.update)}),$nextTick:i=>i.n||(i.n=tl.bind(i.proxy)),$watch:i=>M_.bind(i)}),Oh=(i,e)=>i!==jt&&!i.__isScriptSetup&&$t(i,e),G_={get({_:i},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:n,data:s,props:r,accessCache:o,type:a,appContext:c}=i;if(e[0]!=="$"){const h=o[e];if(h!==void 0)switch(h){case 1:return n[e];case 2:return s[e];case 4:return t[e];case 3:return r[e]}else{if(Oh(n,e))return o[e]=1,n[e];if(s!==jt&&$t(s,e))return o[e]=2,s[e];if($t(r,e))return o[e]=3,r[e];if(t!==jt&&$t(t,e))return o[e]=4,t[e];$p&&(o[e]=0)}}const l=$l[e];let d,u;if(l)return e==="$attrs"&&Hn(i.attrs,"get",""),l(i);if((d=a.__cssModules)&&(d=d[e]))return d;if(t!==jt&&$t(t,e))return o[e]=4,t[e];if(u=c.config.globalProperties,$t(u,e))return u[e]},set({_:i},e,t){const{data:n,setupState:s,ctx:r}=i;return Oh(s,e)?(s[e]=t,!0):n!==jt&&$t(n,e)?(n[e]=t,!0):$t(i.props,e)||e[0]==="$"&&e.slice(1)in i?!1:(r[e]=t,!0)},has({_:{data:i,setupState:e,accessCache:t,ctx:n,appContext:s,props:r,type:o}},a){let c;return!!(t[a]||i!==jt&&a[0]!=="$"&&$t(i,a)||Oh(e,a)||$t(r,a)||$t(n,a)||$t($l,a)||$t(s.config.globalProperties,a)||(c=o.__cssModules)&&c[a])},defineProperty(i,e,t){return t.get!=null?i._.accessCache[e]=0:$t(t,"value")&&this.set(i,e,t.value,null),Reflect.defineProperty(i,e,t)}};function Rv(i){return et(i)?i.reduce((e,t)=>(e[t]=null,e),{}):i}let $p=!0;function W_(i){const e=H1(i),t=i.proxy,n=i.ctx;$p=!1,e.beforeCreate&&Fv(e.beforeCreate,i,"bc");const{data:s,computed:r,methods:o,watch:a,provide:c,inject:l,created:d,beforeMount:u,mounted:h,beforeUpdate:f,updated:p,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:x,render:T,renderTracked:E,renderTriggered:S,errorCaptured:C,serverPrefetch:M,expose:k,inheritAttrs:P,components:I,directives:D,filters:$}=e;if(l&&q_(l,n,null),o)for(const Y in o){const U=o[Y];dt(U)&&(n[Y]=U.bind(t))}if(s){const Y=s.call(t,t);Ut(Y)&&(i.data=qo(Y))}if($p=!0,r)for(const Y in r){const U=r[Y],O=dt(U)?U.bind(t,t):dt(U.get)?U.get.bind(t,t):Fs,L=!dt(U)&&dt(U.set)?U.set.bind(t):Fs,R=Fe({get:O,set:L});Object.defineProperty(n,Y,{enumerable:!0,configurable:!0,get:()=>R.value,set:X=>R.value=X})}if(a)for(const Y in a)j1(a[Y],n,t,Y);if(c){const Y=dt(c)?c.call(t):c;Reflect.ownKeys(Y).forEach(U=>{L1(U,Y[U])})}d&&Fv(d,i,"c");function B(Y,U){et(U)?U.forEach(O=>Y(O.bind(t))):U&&Y(U.bind(t))}if(B($_,u),B(Ti,h),B(B_,f),B(U_,p),B(D_,m),B(O_,g),B(z_,C),B(Y_,E),B(X_,S),B(Ar,y),B(nl,x),B(V_,M),et(k))if(k.length){const Y=i.exposed||(i.exposed={});k.forEach(U=>{Object.defineProperty(Y,U,{get:()=>t[U],set:O=>t[U]=O,enumerable:!0})})}else i.exposed||(i.exposed={});T&&i.render===Fs&&(i.render=T),P!=null&&(i.inheritAttrs=P),I&&(i.components=I),D&&(i.directives=D),M&&X1(i)}function q_(i,e,t=Fs){et(i)&&(i=Bp(i));for(const n in i){const s=i[n];let r;Ut(s)?"default"in s?r=No(s.from||n,s.default,!0):r=No(s.from||n):r=No(s),Jt(r)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[n]=r}}function Fv(i,e,t){$i(et(i)?i.map(n=>n.bind(e.proxy)):i.bind(e.proxy),e,t)}function j1(i,e,t,n){let s=n.includes(".")?D1(t,n):()=>t[n];if(sn(i)){const r=e[i];dt(r)&&Vt(s,r)}else if(dt(i))Vt(s,i.bind(t));else if(Ut(i))if(et(i))i.forEach(r=>j1(r,e,t,n));else{const r=dt(i.handler)?i.handler.bind(t):e[i.handler];dt(r)&&Vt(s,r,i)}}function H1(i){const e=i.type,{mixins:t,extends:n}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=i.appContext,a=r.get(e);let c;return a?c=a:!s.length&&!t&&!n?c=e:(c={},s.length&&s.forEach(l=>Wd(c,l,o,!0)),Wd(c,e,o)),Ut(e)&&r.set(e,c),c}function Wd(i,e,t,n=!1){const{mixins:s,extends:r}=e;r&&Wd(i,r,t,!0),s&&s.forEach(o=>Wd(i,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const a=K_[o]||t&&t[o];i[o]=a?a(i[o],e[o]):e[o]}return i}const K_={data:Lv,props:Dv,emits:Dv,methods:Al,computed:Al,beforeCreate:Qn,created:Qn,beforeMount:Qn,mounted:Qn,beforeUpdate:Qn,updated:Qn,beforeDestroy:Qn,beforeUnmount:Qn,destroyed:Qn,unmounted:Qn,activated:Qn,deactivated:Qn,errorCaptured:Qn,serverPrefetch:Qn,components:Al,directives:Al,watch:Z_,provide:Lv,inject:J_};function Lv(i,e){return e?i?function(){return _n(dt(i)?i.call(this,this):i,dt(e)?e.call(this,this):e)}:e:i}function J_(i,e){return Al(Bp(i),Bp(e))}function Bp(i){if(et(i)){const e={};for(let t=0;t<i.length;t++)e[i[t]]=i[t];return e}return i}function Qn(i,e){return i?[...new Set([].concat(i,e))]:e}function Al(i,e){return i?_n(Object.create(null),i,e):e}function Dv(i,e){return i?et(i)&&et(e)?[...new Set([...i,...e])]:_n(Object.create(null),Rv(i),Rv(e??{})):e}function Z_(i,e){if(!i)return e;if(!e)return i;const t=_n(Object.create(null),i);for(const n in e)t[n]=Qn(i[n],e[n]);return t}function G1(){return{app:null,config:{isNativeTag:n1,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Q_=0;function eM(i,e){return function(n,s=null){dt(n)||(n=_n({},n)),s!=null&&!Ut(s)&&(s=null);const r=G1(),o=new WeakSet,a=[];let c=!1;const l=r.app={_uid:Q_++,_component:n,_props:s,_container:null,_context:r,_instance:null,version:IM,get config(){return r.config},set config(d){},use(d,...u){return o.has(d)||(d&&dt(d.install)?(o.add(d),d.install(l,...u)):dt(d)&&(o.add(d),d(l,...u))),l},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),l},component(d,u){return u?(r.components[d]=u,l):r.components[d]},directive(d,u){return u?(r.directives[d]=u,l):r.directives[d]},mount(d,u,h){if(!c){const f=l._ceVNode||Ce(n,s);return f.appContext=r,h===!0?h="svg":h===!1&&(h=void 0),i(f,d,h),c=!0,l._container=d,d.__vue_app__=l,sh(f.component)}},onUnmount(d){a.push(d)},unmount(){c&&($i(a,l._instance,16),i(null,l._container),delete l._container.__vue_app__)},provide(d,u){return r.provides[d]=u,l},runWithContext(d){const u=$o;$o=l;try{return d()}finally{$o=u}}};return l}}let $o=null;const tM=(i,e)=>e==="modelValue"||e==="model-value"?i.modelModifiers:i[`${e}Modifiers`]||i[`${Zi(e)}Modifiers`]||i[`${ro(e)}Modifiers`];function nM(i,e,...t){if(i.isUnmounted)return;const n=i.vnode.props||jt;let s=t;const r=e.startsWith("update:"),o=r&&tM(n,e.slice(7));o&&(o.trim&&(s=t.map(d=>sn(d)?d.trim():d)),o.number&&(s=t.map(Hu)));let a,c=n[a=kh(e)]||n[a=kh(Zi(e))];!c&&r&&(c=n[a=kh(ro(e))]),c&&$i(c,i,6,s);const l=n[a+"Once"];if(l){if(!i.emitted)i.emitted={};else if(i.emitted[a])return;i.emitted[a]=!0,$i(l,i,6,s)}}const iM=new WeakMap;function W1(i,e,t=!1){const n=t?iM:e.emitsCache,s=n.get(i);if(s!==void 0)return s;const r=i.emits;let o={},a=!1;if(!dt(i)){const c=l=>{const d=W1(l,e,!0);d&&(a=!0,_n(o,d))};!t&&e.mixins.length&&e.mixins.forEach(c),i.extends&&c(i.extends),i.mixins&&i.mixins.forEach(c)}return!r&&!a?(Ut(i)&&n.set(i,null),null):(et(r)?r.forEach(c=>o[c]=null):_n(o,r),Ut(i)&&n.set(i,o),o)}function nh(i,e){return!i||!Xu(e)?!1:(e=e.slice(2),e=e==="Once"?e:e.replace(/Once$/,""),$t(i,e[0].toLowerCase()+e.slice(1))||$t(i,ro(e))||$t(i,e))}function Ov(i){const{type:e,vnode:t,proxy:n,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:c,render:l,renderCache:d,props:u,data:h,setupState:f,ctx:p,inheritAttrs:m}=i,g=jd(i);let v,y;try{if(t.shapeFlag&4){const x=s||n,T=x;v=Cs(l.call(T,x,d,u,f,h,p)),y=a}else{const x=e;v=Cs(x.length>1?x(u,{attrs:a,slots:o,emit:c}):x(u,null)),y=e.props?a:sM(a)}}catch(x){hr.length=0,Ku(x,i,1),v=Ce(Wn)}let b=v;if(y&&m!==!1){const x=Object.keys(y),{shapeFlag:T}=b;x.length&&T&7&&(r&&x.some(Yu)&&(y=rM(y,r)),b=to(b,y,!1,!0))}if(t.dirs&&(b=to(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(t.dirs):t.dirs),t.transition){const x=Zu(b.type)&&Hd(b)||b;Jl(x,t.transition)}return v=b,jd(g),v}const sM=i=>{let e;for(const t in i)(t==="class"||t==="style"||Xu(t))&&((e||(e={}))[t]=i[t]);return e},rM=(i,e)=>{const t={};for(const n in i)(!Yu(n)||!(n.slice(9)in e))&&(t[n]=i[n]);return t};function oM(i,e,t){const{props:n,children:s,component:r}=i,{props:o,children:a,patchFlag:c}=e,l=r.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&c>=0){if(c&1024)return!0;if(c&16)return n?Nv(n,o,l):!!o;if(c&8){const d=e.dynamicProps;for(let u=0;u<d.length;u++){const h=d[u];if(q1(o,n,h)&&!nh(l,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Nv(n,o,l):!0:!!o;return!1}function Nv(i,e,t){const n=Object.keys(e);if(n.length!==Object.keys(i).length)return!0;for(let s=0;s<n.length;s++){const r=n[s];if(q1(e,i,r)&&!nh(t,r))return!0}return!1}function q1(i,e,t){const n=i[t],s=e[t];return t==="style"&&Ut(n)&&Ut(s)?!el(n,s):n!==s}function aM({vnode:i,parent:e,suspense:t},n){for(;e;){const s=e.subTree;if(s.suspense&&s.suspense.activeBranch===i&&(s.suspense.vnode.el=s.el=n,i=s),s===i)(i=e.vnode).el=n,e=e.parent;else break}t&&t.activeBranch===i&&(t.vnode.el=n)}const K1={},J1=()=>Object.create(K1),Z1=i=>Object.getPrototypeOf(i)===K1;function lM(i,e,t,n=!1){const s={},r=J1();i.propsDefaults=Object.create(null),Q1(i,e,s,r);for(const o in i.propsOptions[0])o in s||(s[o]=void 0);t?i.props=n?s:u_(s):i.type.props?i.props=s:i.props=r,i.attrs=r}function cM(i,e,t,n){const{props:s,attrs:r,vnode:{patchFlag:o}}=i,a=Ft(s),[c]=i.propsOptions;let l=!1;if((n||o>0)&&!(o&16)){if(o&8){const d=i.vnode.dynamicProps;for(let u=0;u<d.length;u++){let h=d[u];if(nh(i.emitsOptions,h))continue;const f=e[h];if(c)if($t(r,h))f!==r[h]&&(r[h]=f,l=!0);else{const p=Zi(h);s[p]=Up(c,a,p,f,i,!1)}else f!==r[h]&&(r[h]=f,l=!0)}}}else{Q1(i,e,s,r)&&(l=!0);let d;for(const u in a)(!e||!$t(e,u)&&((d=ro(u))===u||!$t(e,d)))&&(c?t&&(t[u]!==void 0||t[d]!==void 0)&&(s[u]=Up(c,a,u,void 0,i,!0)):delete s[u]);if(r!==a)for(const u in r)(!e||!$t(e,u))&&(delete r[u],l=!0)}l&&Qs(i.attrs,"set","")}function Q1(i,e,t,n){const[s,r]=i.propsOptions;let o=!1,a;if(e)for(let c in e){if(Ll(c))continue;const l=e[c];let d;s&&$t(s,d=Zi(c))?!r||!r.includes(d)?t[d]=l:(a||(a={}))[d]=l:nh(i.emitsOptions,c)||(!(c in n)||l!==n[c])&&(n[c]=l,o=!0)}if(r){const c=Ft(t),l=a||jt;for(let d=0;d<r.length;d++){const u=r[d];t[u]=Up(s,c,u,l[u],i,!$t(l,u))}}return o}function Up(i,e,t,n,s,r){const o=i[t];if(o!=null){const a=$t(o,"default");if(a&&n===void 0){const c=o.default;if(o.type!==Function&&!o.skipFactory&&dt(c)){const{propsDefaults:l}=s;if(t in l)n=l[t];else{const d=Sc(s);n=l[t]=c.call(null,e),d()}}else n=c;s.ce&&s.ce._setProp(t,n)}o[0]&&(r&&!a?n=!1:o[1]&&(n===""||n===ro(t))&&(n=!0))}return n}const dM=new WeakMap;function ew(i,e,t=!1){const n=t?dM:e.propsCache,s=n.get(i);if(s)return s;const r=i.props,o={},a=[];let c=!1;if(!dt(i)){const d=u=>{c=!0;const[h,f]=ew(u,e,!0);_n(o,h),f&&a.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(d),i.extends&&d(i.extends),i.mixins&&i.mixins.forEach(d)}if(!r&&!c)return Ut(i)&&n.set(i,Ma),Ma;if(et(r))for(let d=0;d<r.length;d++){const u=Zi(r[d]);$v(u)&&(o[u]=jt)}else if(r)for(const d in r){const u=Zi(d);if($v(u)){const h=r[d],f=o[u]=et(h)||dt(h)?{type:h}:_n({},h),p=f.type;let m=!1,g=!0;if(et(p))for(let v=0;v<p.length;++v){const y=p[v],b=dt(y)&&y.name;if(b==="Boolean"){m=!0;break}else b==="String"&&(g=!1)}else m=dt(p)&&p.name==="Boolean";f[0]=m,f[1]=g,(m||$t(f,"default"))&&a.push(u)}}const l=[o,a];return Ut(i)&&n.set(i,l),l}function $v(i){return i[0]!=="$"&&!Ll(i)}const Mg=i=>i==="_"||i==="_ctx"||i==="$stable",Pg=i=>et(i)?i.map(Cs):[Cs(i)],uM=(i,e,t)=>{if(e._n)return e;const n=Ju((...s)=>Pg(e(...s)),t);return n._c=!1,n},tw=(i,e,t)=>{const n=i._ctx;for(const s in i){if(Mg(s))continue;const r=i[s];if(dt(r))e[s]=uM(s,r,n);else if(r!=null){const o=Pg(r);e[s]=()=>o}}},nw=(i,e)=>{const t=Pg(e);i.slots.default=()=>t},iw=(i,e,t)=>{for(const n in e)(t||!Mg(n))&&(i[n]=e[n])},hM=(i,e,t)=>{const n=i.slots=J1();if(i.vnode.shapeFlag&32){const s=e._;s?(iw(n,e,t),t&&a1(n,"_",s,!0)):tw(e,n)}else e&&nw(i,e)},fM=(i,e,t)=>{const{vnode:n,slots:s}=i;let r=!0,o=jt;if(n.shapeFlag&32){const a=e._;a?t&&a===1?r=!1:iw(s,e,t):(r=!e.$stable,tw(e,s)),o=e}else e&&(nw(i,e),o={default:1});if(r)for(const a in s)!Mg(a)&&o[a]==null&&delete s[a]},ei=bM;function pM(i){return mM(i)}function mM(i,e){const t=Gu();t.__VUE__=!0;const{insert:n,remove:s,patchProp:r,createElement:o,createText:a,createComment:c,setText:l,setElementText:d,parentNode:u,nextSibling:h,setScopeId:f=Fs,insertStaticContent:p}=i,m=(q,J,ie,se=null,H=null,G=null,N=void 0,V=null,W=!!J.dynamicChildren)=>{if(q===J)return;q&&!_o(q,J)&&(se=ce(q),X(q,H,G,!0),q=null),J.patchFlag===-2&&(W=!1,J.dynamicChildren=null);const{type:ee,ref:be,shapeFlag:ye}=J;switch(ee){case wc:g(q,J,ie,se);break;case Wn:v(q,J,ie,se);break;case Td:q==null&&y(J,ie,se,N);break;case _e:I(q,J,ie,se,H,G,N,V,W);break;default:ye&1?T(q,J,ie,se,H,G,N,V,W):ye&6?D(q,J,ie,se,H,G,N,V,W):(ye&64||ye&128)&&ee.process(q,J,ie,se,H,G,N,V,W,re)}be!=null&&H?Nl(be,q&&q.ref,G,J||q,!J):be==null&&q&&q.ref!=null&&Nl(q.ref,null,G,q,!0)},g=(q,J,ie,se)=>{if(q==null)n(J.el=a(J.children),ie,se);else{const H=J.el=q.el;J.children!==q.children&&l(H,J.children)}},v=(q,J,ie,se)=>{q==null?n(J.el=c(J.children||""),ie,se):J.el=q.el},y=(q,J,ie,se)=>{[q.el,q.anchor]=p(q.children,J,ie,se,q.el,q.anchor)},b=({el:q,anchor:J},ie,se)=>{let H;for(;q&&q!==J;)H=h(q),n(q,ie,se),q=H;n(J,ie,se)},x=({el:q,anchor:J})=>{let ie;for(;q&&q!==J;)ie=h(q),s(q),q=ie;s(J)},T=(q,J,ie,se,H,G,N,V,W)=>{if(J.type==="svg"?N="svg":J.type==="math"&&(N="mathml"),q==null)E(J,ie,se,H,G,N,V,W);else{const ee=q.el&&q.el._isVueCE?q.el:null;try{ee&&ee._beginPatch(),M(q,J,H,G,N,V,W)}finally{ee&&ee._endPatch()}}},E=(q,J,ie,se,H,G,N,V)=>{let W,ee;const{props:be,shapeFlag:ye,transition:he,dirs:Be}=q;if(W=q.el=o(q.type,G,be&&be.is,be),ye&8?d(W,q.children):ye&16&&C(q.children,W,null,se,H,Nh(q,G),N,V),Be&&fo(q,null,se,"created"),S(W,q,q.scopeId,N,se),be){for(const de in be)de!=="value"&&!Ll(de)&&r(W,de,null,be[de],G,se);"value"in be&&r(W,"value",null,be.value,G),(ee=be.onVnodeBeforeMount)&&cs(ee,se,q)}Be&&fo(q,null,se,"beforeMount");const Ae=gM(H,he);Ae&&he.beforeEnter(W),n(W,J,ie),((ee=be&&be.onVnodeMounted)||Ae||Be)&&ei(()=>{try{ee&&cs(ee,se,q),Ae&&he.enter(W),Be&&fo(q,null,se,"mounted")}finally{}},H)},S=(q,J,ie,se,H)=>{if(ie&&f(q,ie),se)for(let G=0;G<se.length;G++)f(q,se[G]);if(H){let G=H.subTree;if(J===G||ow(G.type)&&(G.ssContent===J||G.ssFallback===J)){const N=H.vnode;S(q,N,N.scopeId,N.slotScopeIds,H.parent)}}},C=(q,J,ie,se,H,G,N,V,W=0)=>{for(let ee=W;ee<q.length;ee++){const be=q[ee]=V?Zs(q[ee]):Cs(q[ee]);m(null,be,J,ie,se,H,G,N,V)}},M=(q,J,ie,se,H,G,N)=>{const V=J.el=q.el;let{patchFlag:W,dynamicChildren:ee,dirs:be}=J;W|=q.patchFlag&16;const ye=q.props||jt,he=J.props||jt;let Be;if(ie&&po(ie,!1),(Be=he.onVnodeBeforeUpdate)&&cs(Be,ie,J,q),be&&fo(J,q,ie,"beforeUpdate"),ie&&po(ie,!0),ee&&(!q.dynamicChildren||q.dynamicChildren.length!==ee.length)&&(W=0,N=!1,ee=null),(ye.innerHTML&&he.innerHTML==null||ye.textContent&&he.textContent==null)&&d(V,""),ee?k(q.dynamicChildren,ee,V,ie,se,Nh(J,H),G):N||U(q,J,V,null,ie,se,Nh(J,H),G,!1),W>0){if(W&16)P(V,ye,he,ie,H);else if(W&2&&ye.class!==he.class&&r(V,"class",null,he.class,H),W&4&&r(V,"style",ye.style,he.style,H),W&8){const Ae=J.dynamicProps;for(let de=0;de<Ae.length;de++){const ge=Ae[de],Ve=ye[ge],qe=he[ge];(qe!==Ve||ge==="value")&&r(V,ge,Ve,qe,H,ie)}}W&1&&q.children!==J.children&&d(V,J.children)}else!N&&ee==null&&P(V,ye,he,ie,H);((Be=he.onVnodeUpdated)||be)&&ei(()=>{Be&&cs(Be,ie,J,q),be&&fo(J,q,ie,"updated")},se)},k=(q,J,ie,se,H,G,N)=>{for(let V=0;V<J.length;V++){const W=q[V],ee=J[V],be=W.el&&(W.type===_e||!_o(W,ee)||W.shapeFlag&198)?u(W.el):ie;m(W,ee,be,null,se,H,G,N,!0)}},P=(q,J,ie,se,H)=>{if(J!==ie){if(J!==jt)for(const G in J)!Ll(G)&&!(G in ie)&&r(q,G,J[G],null,H,se);for(const G in ie){if(Ll(G))continue;const N=ie[G],V=J[G];N!==V&&G!=="value"&&r(q,G,V,N,H,se)}"value"in ie&&r(q,"value",J.value,ie.value,H)}},I=(q,J,ie,se,H,G,N,V,W)=>{const ee=J.el=q?q.el:a(""),be=J.anchor=q?q.anchor:a("");let{patchFlag:ye,dynamicChildren:he,slotScopeIds:Be}=J;Be&&(V=V?V.concat(Be):Be),q==null?(n(ee,ie,se),n(be,ie,se),C(J.children||[],ie,be,H,G,N,V,W)):ye>0&&ye&64&&he&&q.dynamicChildren&&q.dynamicChildren.length===he.length?(k(q.dynamicChildren,he,ie,H,G,N,V),(J.key!=null||H&&J===H.subTree)&&kg(q,J,!0)):U(q,J,ie,be,H,G,N,V,W)},D=(q,J,ie,se,H,G,N,V,W)=>{J.slotScopeIds=V,q==null?J.shapeFlag&512?H.ctx.activate(J,ie,se,N,W):$(J,ie,se,H,G,N,W):j(q,J,W)},$=(q,J,ie,se,H,G,N)=>{const V=q.component=TM(q,se,H);if(eh(q)&&(V.ctx.renderer=re),EM(V,!1,N),V.asyncDep){if(H&&H.registerDep(V,B,N),!q.el){const W=V.subTree=Ce(Wn);v(null,W,J,ie),q.placeholder=W.el}}else B(V,q,J,ie,H,G,N)},j=(q,J,ie)=>{const se=J.component=q.component;if(oM(q,J,ie))if(se.asyncDep&&!se.asyncResolved){Y(se,J,ie);return}else se.next=J,se.update();else J.el=q.el,se.vnode=J},B=(q,J,ie,se,H,G,N)=>{const V=()=>{if(q.isMounted){let{next:ye,bu:he,u:Be,parent:Ae,vnode:de}=q;{const ft=sw(q);if(ft){ye&&(ye.el=de.el,Y(q,ye,N)),ft.asyncDep.then(()=>{ei(()=>{q.isUnmounted||ee()},H)});return}}let ge=ye,Ve;po(q,!1),ye?(ye.el=de.el,Y(q,ye,N)):ye=de,he&&Ad(he),(Ve=ye.props&&ye.props.onVnodeBeforeUpdate)&&cs(Ve,Ae,ye,de),po(q,!0);const qe=Ov(q),bt=q.subTree;q.subTree=qe,m(bt,qe,u(bt.el),ce(bt),q,H,G),ye.el=qe.el,ge===null&&aM(q,qe.el),Be&&ei(Be,H),(Ve=ye.props&&ye.props.onVnodeUpdated)&&ei(()=>cs(Ve,Ae,ye,de),H)}else{let ye;const{el:he,props:Be}=J,{bm:Ae,m:de,parent:ge,root:Ve,type:qe}=q,bt=Ia(J);po(q,!1),Ae&&Ad(Ae),!bt&&(ye=Be&&Be.onVnodeBeforeMount)&&cs(ye,ge,J),po(q,!0);{Ve.ce&&Ve.ce._hasShadowRoot()&&Ve.ce._injectChildStyle(qe,q.parent?q.parent.type:void 0);const ft=q.subTree=Ov(q);m(null,ft,ie,se,q,H,G),J.el=ft.el}if(de&&ei(de,H),!bt&&(ye=Be&&Be.onVnodeMounted)){const ft=J;ei(()=>cs(ye,ge,ft),H)}(J.shapeFlag&256||ge&&Ia(ge.vnode)&&ge.vnode.shapeFlag&256)&&q.a&&ei(q.a,H),q.isMounted=!0,J=ie=se=null}};q.scope.on();const W=q.effect=new f1(V);q.scope.off();const ee=q.update=W.run.bind(W),be=q.job=W.runIfDirty.bind(W);be.i=q,be.id=q.uid,W.scheduler=()=>Eg(be),po(q,!0),ee()},Y=(q,J,ie)=>{J.component=q;const se=q.vnode.props;q.vnode=J,q.next=null,cM(q,J.props,se,ie),fM(q,J.children,ie),mr(),_v(q),gr()},U=(q,J,ie,se,H,G,N,V,W=!1)=>{const ee=q&&q.children,be=q?q.shapeFlag:0,ye=J.children,{patchFlag:he,shapeFlag:Be}=J;if(he>0){if(he&128){L(ee,ye,ie,se,H,G,N,V,W);return}else if(he&256){O(ee,ye,ie,se,H,G,N,V,W);return}}Be&8?(be&16&&ae(ee,H,G),ye!==ee&&d(ie,ye)):be&16?Be&16?L(ee,ye,ie,se,H,G,N,V,W):ae(ee,H,G,!0):(be&8&&d(ie,""),Be&16&&C(ye,ie,se,H,G,N,V,W))},O=(q,J,ie,se,H,G,N,V,W)=>{q=q||Ma,J=J||Ma;const ee=q.length,be=J.length,ye=Math.min(ee,be);let he;for(he=0;he<ye;he++){const Be=J[he]=W?Zs(J[he]):Cs(J[he]);m(q[he],Be,ie,null,H,G,N,V,W)}ee>be?ae(q,H,G,!0,!1,ye):C(J,ie,se,H,G,N,V,W,ye)},L=(q,J,ie,se,H,G,N,V,W)=>{let ee=0;const be=J.length;let ye=q.length-1,he=be-1;for(;ee<=ye&&ee<=he;){const Be=q[ee],Ae=J[ee]=W?Zs(J[ee]):Cs(J[ee]);if(_o(Be,Ae))m(Be,Ae,ie,null,H,G,N,V,W);else break;ee++}for(;ee<=ye&&ee<=he;){const Be=q[ye],Ae=J[he]=W?Zs(J[he]):Cs(J[he]);if(_o(Be,Ae))m(Be,Ae,ie,null,H,G,N,V,W);else break;ye--,he--}if(ee>ye){if(ee<=he){const Be=he+1,Ae=Be<be?J[Be].el:se;for(;ee<=he;)m(null,J[ee]=W?Zs(J[ee]):Cs(J[ee]),ie,Ae,H,G,N,V,W),ee++}}else if(ee>he)for(;ee<=ye;)X(q[ee],H,G,!0),ee++;else{const Be=ee,Ae=ee,de=new Map;for(ee=Ae;ee<=he;ee++){const Te=J[ee]=W?Zs(J[ee]):Cs(J[ee]);Te.key!=null&&de.set(Te.key,ee)}let ge,Ve=0;const qe=he-Ae+1;let bt=!1,ft=0;const Oe=new Array(qe);for(ee=0;ee<qe;ee++)Oe[ee]=0;for(ee=Be;ee<=ye;ee++){const Te=q[ee];if(Ve>=qe){X(Te,H,G,!0);continue}let ue;if(Te.key!=null)ue=de.get(Te.key);else for(ge=Ae;ge<=he;ge++)if(Oe[ge-Ae]===0&&_o(Te,J[ge])){ue=ge;break}ue===void 0?X(Te,H,G,!0):(Oe[ue-Ae]=ee+1,ue>=ft?ft=ue:bt=!0,m(Te,J[ue],ie,null,H,G,N,V,W),Ve++)}const ot=bt?vM(Oe):Ma;for(ge=ot.length-1,ee=qe-1;ee>=0;ee--){const Te=Ae+ee,ue=J[Te],fe=J[Te+1],nt=Te+1<be?fe.el||rw(fe):se;Oe[ee]===0?m(null,ue,ie,nt,H,G,N,V,W):bt&&(ge<0||ee!==ot[ge]?R(ue,ie,nt,2):ge--)}}},R=(q,J,ie,se,H=null)=>{const{el:G,type:N,transition:V,children:W,shapeFlag:ee}=q;if(ee&6){R(q.component.subTree,J,ie,se);return}if(ee&128){q.suspense.move(J,ie,se);return}if(ee&64){N.move(q,J,ie,re);return}if(N===_e){n(G,J,ie);for(let ye=0;ye<W.length;ye++)R(W[ye],J,ie,se);n(q.anchor,J,ie);return}if(N===Td){b(q,J,ie);return}if(se!==2&&ee&1&&V)if(se===0)V.persisted&&!G[Ri]?n(G,J,ie):(V.beforeEnter(G),n(G,J,ie),ei(()=>V.enter(G),H));else{const{leave:ye,delayLeave:he,afterLeave:Be}=V,Ae=()=>{q.ctx.isUnmounted?s(G):n(G,J,ie)},de=()=>{const ge=G._isLeaving||!!G[Ri];G._isLeaving&&G[Ri](!0),V.persisted&&!ge?Ae():ye(G,()=>{Ae(),Be&&Be()})};he?he(G,Ae,de):de()}else n(G,J,ie)},X=(q,J,ie,se=!1,H=!1)=>{const{type:G,props:N,ref:V,children:W,dynamicChildren:ee,shapeFlag:be,patchFlag:ye,dirs:he,cacheIndex:Be,memo:Ae}=q;if(ye===-2&&(H=!1),V!=null&&(mr(),Nl(V,null,ie,q,!0),gr()),Be!=null&&(J.renderCache[Be]=void 0),be&256){J.ctx.deactivate(q);return}const de=be&1&&he,ge=!Ia(q);let Ve;if(ge&&(Ve=N&&N.onVnodeBeforeUnmount)&&cs(Ve,J,q),be&6)Z(q.component,ie,se);else{if(be&128){q.suspense.unmount(ie,se);return}de&&fo(q,null,J,"beforeUnmount"),be&64?q.type.remove(q,J,ie,re,se):ee&&!ee.hasOnce&&(G!==_e||ye>0&&ye&64)?ae(ee,J,ie,!1,!0):(G===_e&&ye&384||!H&&be&16)&&ae(W,J,ie),se&&z(q)}const qe=Ae!=null&&Be==null;(ge&&(Ve=N&&N.onVnodeUnmounted)||de||qe)&&ei(()=>{Ve&&cs(Ve,J,q),de&&fo(q,null,J,"unmounted"),qe&&(q.el=null)},ie)},z=q=>{const{type:J,el:ie,anchor:se,transition:H}=q;if(J===_e){K(ie,se);return}if(J===Td){x(q);return}const G=()=>{s(ie),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(q.shapeFlag&1&&H&&!H.persisted){const{leave:N,delayLeave:V}=H,W=()=>N(ie,G);V?V(q.el,G,W):W()}else G()},K=(q,J)=>{let ie;for(;q!==J;)ie=h(q),s(q),q=ie;s(J)},Z=(q,J,ie)=>{const{bum:se,scope:H,job:G,subTree:N,um:V,m:W,a:ee}=q;Bv(W),Bv(ee),se&&Ad(se),H.stop(),G&&(G.flags|=8,X(N,q,J,ie)),V&&ei(V,J),ei(()=>{q.isUnmounted=!0},J)},ae=(q,J,ie,se=!1,H=!1,G=0)=>{for(let N=G;N<q.length;N++)X(q[N],J,ie,se,H)},ce=q=>{if(q.shapeFlag&6)return ce(q.component.subTree);if(q.shapeFlag&128)return q.suspense.next();const J=h(q.anchor||q.el),ie=J&&J[O1];return ie?h(ie):J};let ve=!1;const we=(q,J,ie)=>{let se;q==null?J._vnode&&(X(J._vnode,null,null,!0),se=J._vnode.component):m(J._vnode||null,q,J,null,null,null,ie),J._vnode=q,ve||(ve=!0,_v(se),I1(),ve=!1)},re={p:m,um:X,m:R,r:z,mt:$,mc:C,pc:U,pbc:k,n:ce,o:i};return{render:we,hydrate:void 0,createApp:eM(we)}}function Nh({type:i,props:e},t){return t==="svg"&&i==="foreignObject"||t==="mathml"&&i==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function po({effect:i,job:e},t){t?(i.flags|=32,e.flags|=4):(i.flags&=-33,e.flags&=-5)}function gM(i,e){return(!i||i&&!i.pendingBranch)&&e&&!e.persisted}function kg(i,e,t=!1){const n=i.children,s=e.children;if(et(n)&&et(s))for(let r=0;r<n.length;r++){const o=n[r];let a=s[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[r]=Zs(s[r]),a.el=o.el),!t&&a.patchFlag!==-2&&kg(o,a)),a.type===wc&&(a.patchFlag===-1&&(a=s[r]=Zs(a)),a.el=o.el),a.type===Wn&&!a.el&&(a.el=o.el)}}function vM(i){const e=i.slice(),t=[0];let n,s,r,o,a;const c=i.length;for(n=0;n<c;n++){const l=i[n];if(l!==0){if(s=t[t.length-1],i[s]<l){e[n]=s,t.push(n);continue}for(r=0,o=t.length-1;r<o;)a=r+o>>1,i[t[a]]<l?r=a+1:o=a;l<i[t[r]]&&(r>0&&(e[n]=t[r-1]),t[r]=n)}}for(r=t.length,o=t[r-1];r-- >0;)t[r]=o,o=e[o];return t}function sw(i){const e=i.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:sw(e)}function Bv(i){if(i)for(let e=0;e<i.length;e++)i[e].flags|=8}function rw(i){if(i.placeholder)return i.placeholder;const e=i.component;return e?rw(e.subTree):null}const ow=i=>i.__isSuspense;function bM(i,e){e&&e.pendingBranch?et(i)?e.effects.push(...i):e.effects.push(i):A_(i)}const _e=Symbol.for("v-fgt"),wc=Symbol.for("v-txt"),Wn=Symbol.for("v-cmt"),Td=Symbol.for("v-stc"),hr=[];let Si=null;function Q(i=!1){hr.push(Si=i?null:[])}function Ig(){hr.pop(),Si=hr[hr.length-1]||null}let Zl=1;function qd(i,e=!1){Zl+=i,i<0&&Si&&e&&(Si.hasOnce=!0)}function aw(i){return i.dynamicChildren=Zl>0?Si||Ma:null,Ig(),Zl>0&&Si&&Si.push(i),i}function te(i,e,t,n,s,r){return aw(w(i,e,t,n,s,r,!0))}function kt(i,e,t,n,s){return aw(Ce(i,e,t,n,s,!0))}function Ql(i){return i?i.__v_isVNode===!0:!1}function _o(i,e){return i.type===e.type&&i.key===e.key}const lw=({key:i})=>i??null,Ed=({ref:i,ref_key:e,ref_for:t})=>(typeof i=="number"&&(i=""+i),i!=null?sn(i)||Jt(i)||dt(i)?{i:qn,r:i,k:e,f:!!t}:i:null);function w(i,e=null,t=null,n=0,s=null,r=i===_e?0:1,o=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:i,props:e,key:e&&lw(e),ref:e&&Ed(e),scopeId:F1,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:qn};return a?(Kd(c,t),r&128&&i.normalize(c)):t&&(c.shapeFlag|=sn(t)?8:16),Zl>0&&!o&&Si&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Si.push(c),c}const Ce=yM;function yM(i,e=null,t=null,n=0,s=null,r=!1){if((!i||i===j_)&&(i=Wn),Ql(i)){const a=to(i,e,!0);return t&&Kd(a,t),Zl>0&&!r&&Si&&(a.shapeFlag&6?Si[Si.indexOf(i)]=a:Si.push(a)),a.patchFlag=-2,a}if(kM(i)&&(i=i.__vccOpts),e){e=xM(e);let{class:a,style:c}=e;a&&!sn(a)&&(e.class=Me(a)),Ut(c)&&(qu(c)&&!et(c)&&(c=_n({},c)),e.style=Yt(c))}const o=sn(i)?1:ow(i)?128:Zu(i)?64:Ut(i)?4:dt(i)?2:0;return w(i,e,t,n,s,o,r,!0)}function xM(i){return i?qu(i)||Z1(i)?_n({},i):i:null}function to(i,e,t=!1,n=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:c}=i,l=e?SM(s||{},e):s,d={__v_isVNode:!0,__v_skip:!0,type:i.type,props:l,key:l&&lw(l),ref:e&&e.ref?t&&r?et(r)?r.concat(Ed(e)):[r,Ed(e)]:Ed(e):r,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:a,target:i.target,targetStart:i.targetStart,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:e&&i.type!==_e?o===-1?16:o|16:o,dynamicProps:i.dynamicProps,dynamicChildren:i.dynamicChildren,appContext:i.appContext,dirs:i.dirs,transition:c,component:i.component,suspense:i.suspense,ssContent:i.ssContent&&to(i.ssContent),ssFallback:i.ssFallback&&to(i.ssFallback),placeholder:i.placeholder,el:i.el,anchor:i.anchor,ctx:i.ctx,ce:i.ce};return c&&n&&Jl(d,c.clone(d)),d}function Ct(i=" ",e=0){return Ce(wc,null,i,e)}function wM(i,e){const t=Ce(Td,null,i);return t.staticCount=e,t}function xe(i="",e=!1){return e?(Q(),kt(Wn,null,i)):Ce(Wn,null,i)}function Cs(i){return i==null||typeof i=="boolean"?Ce(Wn):et(i)?Ce(_e,null,i.slice()):Ql(i)?Zs(i):Ce(wc,null,String(i))}function Zs(i){return i.el===null&&i.patchFlag!==-1||i.memo?i:to(i)}function Kd(i,e){let t=0;const{shapeFlag:n}=i;if(e==null)e=null;else if(et(e))t=16;else if(typeof e=="object")if(n&65){const s=e.default;s&&(s._c&&(s._d=!1),Kd(i,s()),s._c&&(s._d=!0));return}else{t=32;const s=e._;!s&&!Z1(e)?e._ctx=qn:s===3&&qn&&(qn.slots._===1?e._=1:(e._=2,i.patchFlag|=1024))}else if(dt(e)){if(n&65){Kd(i,{default:e});return}e={default:e,_ctx:qn},t=32}else e=String(e),n&64?(t=16,e=[Ct(e)]):t=8;i.children=e,i.shapeFlag|=t}function SM(...i){const e={};for(let t=0;t<i.length;t++){const n=i[t];for(const s in n)if(s==="class")e.class!==n.class&&(e.class=Me([e.class,n.class]));else if(s==="style")e.style=Yt([e.style,n.style]);else if(Xu(s)){const r=e[s],o=n[s];o&&r!==o&&!(et(r)&&r.includes(o))?e[s]=r?[].concat(r,o):o:o==null&&r==null&&!Yu(s)&&(e[s]=o)}else s!==""&&(e[s]=n[s])}return e}function cs(i,e,t,n=null){$i(i,e,7,[t,n])}const CM=G1();let AM=0;function TM(i,e,t){const n=i.type,s=(e?e.appContext:i.appContext)||CM,r={uid:AM++,vnode:i,type:n,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new u1(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ew(n,s),emitsOptions:W1(n,s),emit:null,emitted:null,propsDefaults:jt,inheritAttrs:n.inheritAttrs,ctx:jt,data:jt,props:jt,attrs:jt,slots:jt,refs:jt,setupState:jt,setupContext:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=e?e.root:r,r.emit=nM.bind(null,r),i.ce&&i.ce(r),r}let si=null;const ih=()=>si||qn;let Jd,ec;{const i=Gu(),e=(t,n)=>{let s;return(s=i[t])||(s=i[t]=[]),s.push(n),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};Jd=e("__VUE_INSTANCE_SETTERS__",t=>si=t),ec=e("__VUE_SSR_SETTERS__",t=>tc=t)}const Sc=i=>{const e=si;return Jd(i),i.scope.on(),()=>{i.scope.off(),Jd(e)}},Uv=()=>{si&&si.scope.off(),Jd(null)};function cw(i){return i.vnode.shapeFlag&4}let tc=!1;function EM(i,e=!1,t=!1){e&&ec(e);const{props:n,children:s}=i.vnode,r=cw(i);lM(i,n,r,e),hM(i,s,t||e);const o=r?_M(i,e):void 0;return e&&ec(!1),o}function _M(i,e){const t=i.type;i.accessCache=Object.create(null),i.proxy=new Proxy(i.ctx,G_);const{setup:n}=t;if(n){mr();const s=i.setupContext=n.length>1?PM(i):null,r=Sc(i),o=xc(n,i,0,[i.props,s]),a=i1(o);if(gr(),r(),(a||i.sp)&&!Ia(i)&&X1(i),a){if(o.then(Uv,Uv),e)return o.then(c=>{ec(!0);try{Vv(i,c,e)}finally{ec(!1)}}).catch(c=>{Ku(c,i,0)});i.asyncDep=o}else Vv(i,o)}else dw(i)}function Vv(i,e,t){dt(e)?i.type.__ssrInlineRender?i.ssrRender=e:i.render=e:Ut(e)&&(i.setupState=M1(e)),dw(i)}function dw(i,e,t){const n=i.type;i.render||(i.render=n.render||Fs);{const s=Sc(i);mr();try{W_(i)}finally{gr(),s()}}}const MM={get(i,e){return Hn(i,"get",""),i[e]}};function PM(i){const e=t=>{i.exposed=t||{}};return{attrs:new Proxy(i.attrs,MM),slots:i.slots,emit:i.emit,expose:e}}function sh(i){return i.exposed?i.exposeProxy||(i.exposeProxy=new Proxy(M1(Hr(i.exposed)),{get(e,t){if(t in e)return e[t];if(t in $l)return $l[t](i)},has(e,t){return t in e||t in $l}})):i.proxy}function kM(i){return dt(i)&&"__vccOpts"in i}const Fe=(i,e)=>y_(i,e,tc);function nc(i,e,t){try{qd(-1);const n=arguments.length;return n===2?Ut(e)&&!et(e)?Ql(e)?Ce(i,null,[e]):Ce(i,e):Ce(i,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&Ql(t)&&(t=[t]),Ce(i,e,t))}finally{qd(1)}}const IM="3.5.41";/**
|
||
* @vue/runtime-dom v3.5.41
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let Vp;const Xv=typeof window<"u"&&window.trustedTypes;if(Xv)try{Vp=Xv.createPolicy("vue",{createHTML:i=>i})}catch{}const uw=Vp?i=>Vp.createHTML(i):i=>i,RM="http://www.w3.org/2000/svg",FM="http://www.w3.org/1998/Math/MathML",Gs=typeof document<"u"?document:null,Yv=Gs&&Gs.createElement("template"),LM={insert:(i,e,t)=>{e.insertBefore(i,t||null)},remove:i=>{const e=i.parentNode;e&&e.removeChild(i)},createElement:(i,e,t,n)=>{const s=e==="svg"?Gs.createElementNS(RM,i):e==="mathml"?Gs.createElementNS(FM,i):t?Gs.createElement(i,{is:t}):Gs.createElement(i);return i==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:i=>Gs.createTextNode(i),createComment:i=>Gs.createComment(i),setText:(i,e)=>{i.nodeValue=e},setElementText:(i,e)=>{i.textContent=e},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>Gs.querySelector(i),setScopeId(i,e){i.setAttribute(e,"")},insertStaticContent(i,e,t,n,s,r){const o=t?t.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),t),!(s===r||!(s=s.nextSibling)););else{Yv.innerHTML=uw(n==="svg"?`<svg>${i}</svg>`:n==="mathml"?`<math>${i}</math>`:i);const a=Yv.content;if(n==="svg"||n==="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]}},_r="transition",pl="animation",ic=Symbol("_vtc"),hw={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},DM=_n({},N1,hw),OM=i=>(i.displayName="Transition",i.props=DM,i),NM=OM((i,{slots:e})=>nc(L_,$M(i),e)),mo=(i,e=[])=>{et(i)?i.forEach(t=>t(...e)):i&&i(...e)},zv=i=>i?et(i)?i.some(e=>e.length>1):i.length>1:!1;function $M(i){const e={};for(const I in i)I in hw||(e[I]=i[I]);if(i.css===!1)return e;const{name:t="v",type:n,duration:s,enterFromClass:r=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:c=r,appearActiveClass:l=o,appearToClass:d=a,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=i,p=BM(s),m=p&&p[0],g=p&&p[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:T,onBeforeAppear:E=v,onAppear:S=y,onAppearCancelled:C=b}=e,M=(I,D,$,j)=>{I._enterCancelled=j,go(I,D?d:a),go(I,D?l:o),$&&$()},k=(I,D)=>{I._isLeaving=!1,go(I,u),go(I,f),go(I,h),D&&D()},P=I=>(D,$)=>{const j=I?S:y,B=()=>M(D,I,$);mo(j,[D,B]),jv(()=>{go(D,I?c:r),Xs(D,I?d:a),zv(j)||Hv(D,n,m,B)})};return _n(e,{onBeforeEnter(I){mo(v,[I]),Xs(I,r),Xs(I,o)},onBeforeAppear(I){mo(E,[I]),Xs(I,c),Xs(I,l)},onEnter:P(!1),onAppear:P(!0),onLeave(I,D){I._isLeaving=!0;const $=()=>k(I,D);Xs(I,u),I._enterCancelled?(Xs(I,h),qv(I)):(qv(I),Xs(I,h)),jv(()=>{I._isLeaving&&(go(I,u),Xs(I,f),zv(x)||Hv(I,n,g,$))}),mo(x,[I,$])},onEnterCancelled(I){M(I,!1,void 0,!0),mo(b,[I])},onAppearCancelled(I){M(I,!0,void 0,!0),mo(C,[I])},onLeaveCancelled(I){k(I),mo(T,[I])}})}function BM(i){if(i==null)return null;if(Ut(i))return[$h(i.enter),$h(i.leave)];{const e=$h(i);return[e,e]}}function $h(i){return BE(i)}function Xs(i,e){e.split(/\s+/).forEach(t=>t&&i.classList.add(t)),(i[ic]||(i[ic]=new Set)).add(e)}function go(i,e){e.split(/\s+/).forEach(n=>n&&i.classList.remove(n));const t=i[ic];t&&(t.delete(e),t.size||(i[ic]=void 0))}function jv(i){requestAnimationFrame(()=>{requestAnimationFrame(i)})}let UM=0;function Hv(i,e,t,n){const s=i._endId=++UM,r=()=>{s===i._endId&&n()};if(t!=null)return setTimeout(r,t);const{type:o,timeout:a,propCount:c}=VM(i,e);if(!o)return n();const l=o+"end";let d=0;const u=()=>{i.removeEventListener(l,h),r()},h=f=>{f.target===i&&++d>=c&&u()};setTimeout(()=>{d<c&&u()},a+1),i.addEventListener(l,h)}function VM(i,e){const t=window.getComputedStyle(i),n=p=>(t[p]||"").split(", "),s=n(`${_r}Delay`),r=n(`${_r}Duration`),o=Gv(s,r),a=n(`${pl}Delay`),c=n(`${pl}Duration`),l=Gv(a,c);let d=null,u=0,h=0;e===_r?o>0&&(d=_r,u=o,h=r.length):e===pl?l>0&&(d=pl,u=l,h=c.length):(u=Math.max(o,l),d=u>0?o>l?_r:pl:null,h=d?d===_r?r.length:c.length:0);const f=d===_r&&/\b(?:transform|all)(?:,|$)/.test(n(`${_r}Property`).toString());return{type:d,timeout:u,propCount:h,hasTransform:f}}function Gv(i,e){for(;i.length<e.length;)i=i.concat(i);return Math.max(...e.map((t,n)=>Wv(t)+Wv(i[n])))}function Wv(i){return i==="auto"?0:Number(i.slice(0,-1).replace(",","."))*1e3}function qv(i){return(i?i.ownerDocument:document).body.offsetHeight}function XM(i,e,t){const n=i[ic];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?i.removeAttribute("class"):t?i.setAttribute("class",e):i.className=e}const Zd=Symbol("_vod"),fw=Symbol("_vsh"),Bt={name:"show",beforeMount(i,{value:e},{transition:t}){i[Zd]=i.style.display==="none"?"":i.style.display,t&&e?t.beforeEnter(i):ml(i,e)},mounted(i,{value:e},{transition:t}){t&&e&&t.enter(i)},updated(i,{value:e,oldValue:t},{transition:n}){!e!=!t&&(n?e?(n.beforeEnter(i),ml(i,!0),n.enter(i)):n.leave(i,()=>{ml(i,!1)}):ml(i,e))},beforeUnmount(i,{value:e}){ml(i,e)}};function ml(i,e){i.style.display=e?i[Zd]:"none",i[fw]=!e}const YM=Symbol(""),zM=/(?:^|;)\s*display\s*:/;function jM(i,e,t){const n=i.style,s=sn(t);let r=!1;if(t&&!s){if(e)if(sn(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&Tl(n,a,"")}else for(const o in e)t[o]==null&&Tl(n,o,"");for(const o in t){o==="display"&&(r=!0);const a=t[o];a!=null?GM(i,o,!sn(e)&&e?e[o]:void 0,a)||Tl(n,o,a):Tl(n,o,"")}}else if(s){if(e!==t){const o=n[YM];o&&(t+=";"+o),n.cssText=t,r=zM.test(t)}}else e&&i.removeAttribute("style");Zd in i&&(i[Zd]=r?n.display:"",i[fw]&&(n.display="none"))}const Kv=/\s*!important$/;function Tl(i,e,t){if(et(t))t.forEach(n=>Tl(i,e,n));else if(t==null&&(t=""),e.startsWith("--"))i.setProperty(e,t);else{const n=HM(i,e);Kv.test(t)?i.setProperty(ro(n),t.replace(Kv,""),"important"):i[n]=t}}const Jv=["Webkit","Moz","ms"],Bh={};function HM(i,e){const t=Bh[e];if(t)return t;let n=Zi(e);if(n!=="filter"&&n in i)return Bh[e]=n;n=o1(n);for(let s=0;s<Jv.length;s++){const r=Jv[s]+n;if(r in i)return Bh[e]=r}return e}function GM(i,e,t,n){return i.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&sn(n)&&t===n}const Zv="http://www.w3.org/1999/xlink";function Qv(i,e,t,n,s,r=jE(e)){n&&e.startsWith("xlink:")?t==null?i.removeAttributeNS(Zv,e.slice(6,e.length)):i.setAttributeNS(Zv,e,t):t==null||r&&!l1(t)?i.removeAttribute(e):i.setAttribute(e,r?"":Ai(t)?String(t):t)}function eb(i,e,t,n,s){if(e==="innerHTML"||e==="textContent"){t!=null&&(i[e]=e==="innerHTML"?uw(t):t);return}const r=i.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?i.getAttribute("value")||"":i.value,c=t==null?i.type==="checkbox"?"on":"":String(t);(a!==c||!("_value"in i))&&(i.value=c),t==null&&i.removeAttribute(e),i._value=t;return}let o=!1;if(t===""||t==null){const a=typeof i[e];a==="boolean"?t=l1(t):t==null&&a==="string"?(t="",o=!0):a==="number"&&(t=0,o=!0)}try{i[e]=t}catch{}o&&i.removeAttribute(s||e)}function Xr(i,e,t,n){i.addEventListener(e,t,n)}function WM(i,e,t,n){i.removeEventListener(e,t,n)}const tb=Symbol("_vei");function qM(i,e,t,n,s=null){const r=i[tb]||(i[tb]={}),o=r[e];if(n&&o)o.value=n;else{const[a,c]=ZM(e);if(n){const l=r[e]=tP(n,s);Xr(i,a,l,c)}else o&&(WM(i,a,o,c),r[e]=void 0)}}const KM=/(Once|Passive|Capture)$/,JM=/^on:?(?:Once|Passive|Capture)$/;function ZM(i){let e,t;for(;(t=i.match(KM))&&!JM.test(i);)e||(e={}),i=i.slice(0,i.length-t[1].length),e[t[1].toLowerCase()]=!0;return[i[2]===":"?i.slice(3):ro(i.slice(2)),e]}let Uh=0;const QM=Promise.resolve(),eP=()=>Uh||(QM.then(()=>Uh=0),Uh=Date.now());function tP(i,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;const s=t.value;if(et(s)){const r=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{r.call(n),n._stopped=!0};const o=s.slice(),a=[n];for(let c=0;c<o.length&&!n._stopped;c++){const l=o[c];l&&$i(l,e,5,a)}}else $i(s,e,5,[n])};return t.value=i,t.attached=eP(),t}const nb=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)>96&&i.charCodeAt(2)<123,nP=(i,e,t,n,s,r)=>{const o=s==="svg";e==="class"?XM(i,n,o):e==="style"?jM(i,t,n):Xu(e)?Yu(e)||qM(i,e,t,n,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):iP(i,e,n,o))?(eb(i,e,n),!i.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Qv(i,e,n,o,r,e!=="value")):i._isVueCE&&(sP(i,e)||i._def.__asyncLoader&&(/[A-Z]/.test(e)||!sn(n)))?eb(i,Zi(e),n,r,e):(e==="true-value"?i._trueValue=n:e==="false-value"&&(i._falseValue=n),Qv(i,e,n,o))};function iP(i,e,t,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in i&&nb(e)&&dt(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&i.tagName==="IFRAME"||e==="form"||e==="list"&&i.tagName==="INPUT"||e==="type"&&i.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=i.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return nb(e)&&sn(t)?!1:e in i}function sP(i,e){const t=i._def.props;if(!t)return!1;const n=Zi(e);return Array.isArray(t)?t.some(s=>Zi(s)===n):Object.keys(t).some(s=>Zi(s)===n)}const Ya=i=>{const e=i.props["onUpdate:modelValue"]||!1;return et(e)?t=>Ad(e,t):e};function rP(i){i.target.composing=!0}function ib(i){const e=i.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ms=Symbol("_assign"),Bc=Symbol("_initialValue");function Vh(i,e,t){return e&&(i=i.trim()),t&&(i=Hu(i)),i}const Je={created(i,{modifiers:{lazy:e,trim:t,number:n}},s){i.parentNode&&(i.type==="text"?i[Bc]=i.defaultValue.replace(/[\r\n]/g,""):i.type==="textarea"&&(i[Bc]=i.defaultValue.replace(/\r\n?/g,`
|
||
`))),i[Ms]=Ya(s);const r=n||s.props&&s.props.type==="number";Xr(i,e?"change":"input",o=>{o.target.composing||i[Ms](Vh(i.value,t,r))}),(t||r)&&Xr(i,"change",()=>{i.value=Vh(i.value,t,r)}),e||(Xr(i,"compositionstart",rP),Xr(i,"compositionend",ib),Xr(i,"change",ib))},mounted(i,{value:e,modifiers:{trim:t,number:n}}){const s=e??"",r=i[Bc];delete i[Bc],r!==void 0&&(i.type==="text"||i.type==="textarea")&&i.value!==r?i[Ms](Vh(i.value,t,n)):i.value=s},beforeUpdate(i,{value:e,oldValue:t,modifiers:{lazy:n,trim:s,number:r}},o){if(i[Ms]=Ya(o),i.composing)return;const a=(r||i.type==="number")&&!/^0\d/.test(i.value)?Hu(i.value):i.value,c=e??"";if(a===c)return;const l=i.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===i&&i.type!=="range"&&(n&&e===t||s&&i.value.trim()===c)||(i.value=c)}},vt={deep:!0,created(i,e,t){i[Ms]=Ya(t),Xr(i,"change",()=>{const n=i._modelValue,s=sc(i),r=i.checked,o=i[Ms];if(et(n)){const a=vg(n,s),c=a!==-1;if(r&&!c)o(n.concat(s));else if(!r&&c){const l=[...n];l.splice(a,1),o(l)}}else if(Qa(n)){const a=new Set(n);r?a.add(s):a.delete(s),o(a)}else o(pw(i,r))})},mounted:sb,beforeUpdate(i,e,t){i[Ms]=Ya(t),sb(i,e,t)}};function sb(i,{value:e,oldValue:t},n){i._modelValue=e;let s;if(et(e))s=vg(e,n.props.value)>-1;else if(Qa(e))s=e.has(n.props.value);else{if(e===t)return;s=el(e,pw(i,!0))}i.checked!==s&&(i.checked=s)}const _t={deep:!0,created(i,{value:e,modifiers:{number:t}},n){i._modelValue=e,Xr(i,"change",()=>{const s=Array.prototype.filter.call(i.options,r=>r.selected).map(r=>t?Hu(sc(r)):sc(r));i[Ms](i.multiple?Qa(i._modelValue)?new Set(s):s:s[0]),i._assigning=!0,tl(()=>{i._assigning=!1})}),i[Ms]=Ya(n)},mounted(i,{value:e}){rb(i,e)},beforeUpdate(i,{value:e},t){i._modelValue=e,i[Ms]=Ya(t)},updated(i,{value:e}){i._assigning||rb(i,e)}};function rb(i,e){const t=i.multiple,n=et(e);if(!(t&&!n&&!Qa(e))){for(let s=0,r=i.options.length;s<r;s++){const o=i.options[s],a=sc(o);if(t)if(n){const c=typeof a;c==="string"||c==="number"?o.selected=e.some(l=>String(l)===String(a)):o.selected=vg(e,a)>-1}else o.selected=e.has(a);else if(el(sc(o),e)){i.selectedIndex!==s&&(i.selectedIndex=s);return}}!t&&i.selectedIndex!==-1&&(i.selectedIndex=-1)}}function sc(i){return"_value"in i?i._value:i.value}function pw(i,e){const t=e?"_trueValue":"_falseValue";return t in i?i[t]:e}const oP=["ctrl","shift","alt","meta"],aP={stop:i=>i.stopPropagation(),prevent:i=>i.preventDefault(),self:i=>i.target!==i.currentTarget,ctrl:i=>!i.ctrlKey,shift:i=>!i.shiftKey,alt:i=>!i.altKey,meta:i=>!i.metaKey,left:i=>"button"in i&&i.button!==0,middle:i=>"button"in i&&i.button!==1,right:i=>"button"in i&&i.button!==2,exact:(i,e)=>oP.some(t=>i[`${t}Key`]&&!e.includes(t))},We=(i,e)=>{if(!i)return i;const t=i._withMods||(i._withMods={}),n=e.join(".");return t[n]||(t[n]=((s,...r)=>{for(let o=0;o<e.length;o++){const a=aP[e[o]];if(a&&a(s,e))return}return i(s,...r)}))},lP={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},es=(i,e)=>{const t=i._withKeys||(i._withKeys={}),n=e.join(".");return t[n]||(t[n]=(s=>{if(!("key"in s))return;const r=ro(s.key);if(e.some(o=>o===r||lP[o]===r))return i(s)}))},cP=_n({patchProp:nP},LM);let ob;function dP(){return ob||(ob=pM(cP))}const uP=((...i)=>{const e=dP().createApp(...i),{mount:t}=e;return e.mount=n=>{const s=fP(n);if(!s)return;const r=e._component;!dt(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=t(s,!1,hP(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e});function hP(i){if(i instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&i instanceof MathMLElement)return"mathml"}function fP(i){return sn(i)?document.querySelector(i):i}/*!
|
||
* pinia v4.0.3
|
||
* (c) 2026 Eduardo San Martin Morote
|
||
* @license MIT
|
||
*/let mw;const rh=i=>mw=i,gw=Symbol();function ab(i){return i&&typeof i=="object"&&Object.prototype.toString.call(i)==="[object Object]"&&typeof i.toJSON!="function"}function pP(){const i=bg(!0),e=i.run(()=>Re({}));let t=[],n=[];const s=Hr({install(r){rh(s),s._a=r,r.provide(gw,s),r.config.globalProperties.$pinia=s,n.forEach(o=>t.push(o)),n=[]},use(r){return this._a?t.push(r):n.push(r),this},_p:t,_a:null,_e:i,_s:new Map,state:e});return s}const Xp=()=>{};function lb(i,e,t,n=Xp){i.add(e);const s=()=>{i.delete(e)&&n()};return!t&&yg()&&h1(s),s}function ra(i,...e){i.forEach(t=>{t(...e)})}const mP=i=>i(),cb=Symbol(),Xh=Symbol();function Yp(i,e){i instanceof Map&&e instanceof Map?e.forEach((t,n)=>i.set(n,t)):i instanceof Set&&e instanceof Set&&e.forEach(i.add,i);for(const t in e){if(!Object.hasOwn(e,t))continue;const n=e[t],s=i[t];ab(s)&&ab(n)&&Object.hasOwn(i,t)&&!Jt(n)&&!ur(n)?i[t]=Yp(s,n):i[t]=n}return i}const gP=Symbol();function vP(i){return!i||typeof i!="object"||!Object.hasOwn(i,gP)}const{assign:Rr}=Object;function bP(i){return!!(Jt(i)&&i.effect)}function yP(i,e,t,n){const{state:s,actions:r,getters:o}=e,a=t.state.value[i];let c;function l(){a||(t.state.value[i]=s?s():{});const d=m_(t.state.value[i]);return Rr(d,r,Object.keys(o||{}).reduce((u,h)=>(u[h]=Hr(Fe(()=>{rh(t);const f=t._s.get(i);return o[h].call(f,f)})),u),{}))}return c=vw(i,l,e,t,n,!0),c}function vw(i,e,t={},n,s,r){let o;const a=Rr({actions:{}},t),c={deep:!0};let l,d,u=new Set,h=new Set,f;const p=n.state.value[i];!r&&!p&&(n.state.value[i]={});let m;function g(S){let C;l=d=!1,typeof S=="function"?(S(n.state.value[i]),C={type:"patch function",storeId:i,events:f}):(Yp(n.state.value[i],S),C={type:"patch object",payload:S,storeId:i,events:f});const M=m=Symbol();tl().then(()=>{m===M&&(l=!0)}),d=!0,ra(u,C,n.state.value[i])}const v=r?function(){const{state:C}=t,M=C?C():{};this.$patch(k=>{Rr(k,M)})}:Xp;function y(){o.stop(),u.clear(),h.clear(),n._s.delete(i)}const b=(S,C="")=>{if(cb in S)return S[Xh]=C,S;const M=function(){rh(n);const k=Array.from(arguments),P=new Set,I=new Set;function D(B){P.add(B)}function $(B){I.add(B)}ra(h,{args:k,name:M[Xh],store:T,after:D,onError:$});let j;try{j=S.apply(this&&this.$id===i?this:T,k)}catch(B){throw ra(I,B),B}return j instanceof Promise?j.then(B=>(ra(P,B),B)).catch(B=>(ra(I,B),Promise.reject(B))):(ra(P,j),j)};return M[cb]=!0,M[Xh]=C,M},x={_p:n,$id:i,$onAction:lb.bind(null,h),$patch:g,$reset:v,$subscribe(S,C={}){if(u.has(S))return Xp;const M=lb(u,S,C.detached,()=>k()),k=o.run(()=>Vt(()=>n.state.value[i],P=>{(C.flush==="sync"?d:l)&&S({storeId:i,type:"direct",events:f},P)},Rr({},c,C)));return M},$dispose:y},T=qo(x);n._s.set(i,T);const E=(n._a&&n._a.runWithContext||mP)(()=>n._e.run(()=>(o=bg()).run(()=>e({action:b}))));for(const S in E){const C=E[S];Jt(C)&&!bP(C)||ur(C)?r||(p&&vP(C)&&(Jt(C)?C.value=p[S]:((C instanceof Set||C instanceof Map)&&C.clear(),Yp(C,p[S]))),n.state.value[i][S]=C):typeof C=="function"&&(E[S]=b(C,S),a.actions[S]=C)}return Rr(T,E),Rr(Ft(T),E),Object.defineProperty(T,"$state",{get:()=>n.state.value[i],set:S=>{g(C=>{Rr(C,S)})}}),n._p.forEach(S=>{const C=o.run(()=>S({store:T,app:n._a,pinia:n,options:a}));Rr(T,C)}),p&&r&&t.hydrate&&t.hydrate(T.$state,p),l=!0,d=!0,T}/*! #__NO_SIDE_EFFECTS__ */function xP(i,e,t){let n;const s=typeof e=="function";n=s?t:e;function r(o,a){const c=T_();return o=o||(c?No(gw,null):null),o&&rh(o),o=mw,o._s.has(i)||(s?vw(i,e,n,o):yP(i,n,o)),o._s.get(i)}return r.$id=i,r}var Ko=(i=>(i[i.WEBGL_LEGACY=0]="WEBGL_LEGACY",i[i.WEBGL=1]="WEBGL",i[i.WEBGL2=2]="WEBGL2",i))(Ko||{}),bw=(i=>(i[i.UNKNOWN=0]="UNKNOWN",i[i.WEBGL=1]="WEBGL",i[i.CANVAS=2]="CANVAS",i))(bw||{}),zp=(i=>(i[i.COLOR=16384]="COLOR",i[i.DEPTH=256]="DEPTH",i[i.STENCIL=1024]="STENCIL",i))(zp||{}),Qe=(i=>(i[i.NORMAL=0]="NORMAL",i[i.ADD=1]="ADD",i[i.MULTIPLY=2]="MULTIPLY",i[i.SCREEN=3]="SCREEN",i[i.OVERLAY=4]="OVERLAY",i[i.DARKEN=5]="DARKEN",i[i.LIGHTEN=6]="LIGHTEN",i[i.COLOR_DODGE=7]="COLOR_DODGE",i[i.COLOR_BURN=8]="COLOR_BURN",i[i.HARD_LIGHT=9]="HARD_LIGHT",i[i.SOFT_LIGHT=10]="SOFT_LIGHT",i[i.DIFFERENCE=11]="DIFFERENCE",i[i.EXCLUSION=12]="EXCLUSION",i[i.HUE=13]="HUE",i[i.SATURATION=14]="SATURATION",i[i.COLOR=15]="COLOR",i[i.LUMINOSITY=16]="LUMINOSITY",i[i.NORMAL_NPM=17]="NORMAL_NPM",i[i.ADD_NPM=18]="ADD_NPM",i[i.SCREEN_NPM=19]="SCREEN_NPM",i[i.NONE=20]="NONE",i[i.SRC_OVER=0]="SRC_OVER",i[i.SRC_IN=21]="SRC_IN",i[i.SRC_OUT=22]="SRC_OUT",i[i.SRC_ATOP=23]="SRC_ATOP",i[i.DST_OVER=24]="DST_OVER",i[i.DST_IN=25]="DST_IN",i[i.DST_OUT=26]="DST_OUT",i[i.DST_ATOP=27]="DST_ATOP",i[i.ERASE=26]="ERASE",i[i.SUBTRACT=28]="SUBTRACT",i[i.XOR=29]="XOR",i))(Qe||{}),Ps=(i=>(i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN",i))(Ps||{}),Ie=(i=>(i[i.RGBA=6408]="RGBA",i[i.RGB=6407]="RGB",i[i.RG=33319]="RG",i[i.RED=6403]="RED",i[i.RGBA_INTEGER=36249]="RGBA_INTEGER",i[i.RGB_INTEGER=36248]="RGB_INTEGER",i[i.RG_INTEGER=33320]="RG_INTEGER",i[i.RED_INTEGER=36244]="RED_INTEGER",i[i.ALPHA=6406]="ALPHA",i[i.LUMINANCE=6409]="LUMINANCE",i[i.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",i[i.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",i[i.DEPTH_STENCIL=34041]="DEPTH_STENCIL",i))(Ie||{}),Ra=(i=>(i[i.TEXTURE_2D=3553]="TEXTURE_2D",i[i.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",i[i.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",i[i.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",i[i.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",i[i.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",i[i.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",i))(Ra||{}),je=(i=>(i[i.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",i[i.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",i[i.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",i[i.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",i[i.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",i[i.UNSIGNED_INT=5125]="UNSIGNED_INT",i[i.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",i[i.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",i[i.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",i[i.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",i[i.BYTE=5120]="BYTE",i[i.SHORT=5122]="SHORT",i[i.INT=5124]="INT",i[i.FLOAT=5126]="FLOAT",i[i.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",i[i.HALF_FLOAT=36193]="HALF_FLOAT",i))(je||{}),Ye=(i=>(i[i.FLOAT=0]="FLOAT",i[i.INT=1]="INT",i[i.UINT=2]="UINT",i))(Ye||{}),Ki=(i=>(i[i.NEAREST=0]="NEAREST",i[i.LINEAR=1]="LINEAR",i))(Ki||{}),ts=(i=>(i[i.CLAMP=33071]="CLAMP",i[i.REPEAT=10497]="REPEAT",i[i.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",i))(ts||{}),Bi=(i=>(i[i.OFF=0]="OFF",i[i.POW2=1]="POW2",i[i.ON=2]="ON",i[i.ON_MANUAL=3]="ON_MANUAL",i))(Bi||{}),Fn=(i=>(i[i.NPM=0]="NPM",i[i.UNPACK=1]="UNPACK",i[i.PMA=2]="PMA",i[i.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",i[i.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",i[i.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",i))(Fn||{}),As=(i=>(i[i.NO=0]="NO",i[i.YES=1]="YES",i[i.AUTO=2]="AUTO",i[i.BLEND=0]="BLEND",i[i.CLEAR=1]="CLEAR",i[i.BLIT=2]="BLIT",i))(As||{}),Rg=(i=>(i[i.AUTO=0]="AUTO",i[i.MANUAL=1]="MANUAL",i))(Rg||{}),Di=(i=>(i.LOW="lowp",i.MEDIUM="mediump",i.HIGH="highp",i))(Di||{}),Cn=(i=>(i[i.NONE=0]="NONE",i[i.SCISSOR=1]="SCISSOR",i[i.STENCIL=2]="STENCIL",i[i.SPRITE=3]="SPRITE",i[i.COLOR=4]="COLOR",i))(Cn||{}),yn=(i=>(i[i.NONE=0]="NONE",i[i.LOW=2]="LOW",i[i.MEDIUM=4]="MEDIUM",i[i.HIGH=8]="HIGH",i))(yn||{}),Ls=(i=>(i[i.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",i[i.ARRAY_BUFFER=34962]="ARRAY_BUFFER",i[i.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",i))(Ls||{});const wP={createCanvas:(i,e)=>{const t=document.createElement("canvas");return t.width=i,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(i,e)=>fetch(i,e),parseXML:i=>new DOMParser().parseFromString(i,"text/xml")},Xe={ADAPTER:wP,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Yh=/iPhone/i,db=/iPod/i,ub=/iPad/i,hb=/\biOS-universal(?:.+)Mac\b/i,zh=/\bAndroid(?:.+)Mobile\b/i,fb=/Android/i,oa=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Uc=/Silk/i,Ys=/Windows Phone/i,pb=/\bWindows(?:.+)ARM\b/i,mb=/BlackBerry/i,gb=/BB10/i,vb=/Opera Mini/i,bb=/\b(CriOS|Chrome)(?:.+)Mobile/i,yb=/Mobile(?:.+)Firefox\b/i,xb=function(i){return typeof i<"u"&&i.platform==="MacIntel"&&typeof i.maxTouchPoints=="number"&&i.maxTouchPoints>1&&typeof MSStream>"u"};function SP(i){return function(e){return e.test(i)}}function wb(i){var e={userAgent:"",platform:"",maxTouchPoints:0};!i&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof i=="string"?e.userAgent=i:i&&i.userAgent&&(e={userAgent:i.userAgent,platform:i.platform,maxTouchPoints:i.maxTouchPoints||0});var t=e.userAgent,n=t.split("[FBAN");typeof n[1]<"u"&&(t=n[0]),n=t.split("Twitter"),typeof n[1]<"u"&&(t=n[0]);var s=SP(t),r={apple:{phone:s(Yh)&&!s(Ys),ipod:s(db),tablet:!s(Yh)&&(s(ub)||xb(e))&&!s(Ys),universal:s(hb),device:(s(Yh)||s(db)||s(ub)||s(hb)||xb(e))&&!s(Ys)},amazon:{phone:s(oa),tablet:!s(oa)&&s(Uc),device:s(oa)||s(Uc)},android:{phone:!s(Ys)&&s(oa)||!s(Ys)&&s(zh),tablet:!s(Ys)&&!s(oa)&&!s(zh)&&(s(Uc)||s(fb)),device:!s(Ys)&&(s(oa)||s(Uc)||s(zh)||s(fb))||s(/\bokhttp\b/i)},windows:{phone:s(Ys),tablet:s(pb),device:s(Ys)||s(pb)},other:{blackberry:s(mb),blackberry10:s(gb),opera:s(vb),firefox:s(yb),chrome:s(bb),device:s(mb)||s(gb)||s(vb)||s(yb)||s(bb)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}const CP=wb.default??wb,nr=CP(globalThis.navigator);Xe.RETINA_PREFIX=/@([0-9\.]+)x/;Xe.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Qd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yw(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function AP(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var e=i.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var s=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return i[n]}})}),t}var jh={exports:{}},Sb;function TP(){return Sb||(Sb=1,(function(i){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function s(c,l,d){this.fn=c,this.context=l,this.once=d||!1}function r(c,l,d,u,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var f=new s(d,u||c,h),p=t?t+l:l;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],f]:c._events[p].push(f):(c._events[p]=f,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],d,u;if(this._eventsCount===0)return l;for(u in d=this._events)e.call(d,u)&&l.push(t?u.slice(1):u);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(d)):l},a.prototype.listeners=function(l){var d=t?t+l:l,u=this._events[d];if(!u)return[];if(u.fn)return[u.fn];for(var h=0,f=u.length,p=new Array(f);h<f;h++)p[h]=u[h].fn;return p},a.prototype.listenerCount=function(l){var d=t?t+l:l,u=this._events[d];return u?u.fn?1:u.length:0},a.prototype.emit=function(l,d,u,h,f,p){var m=t?t+l:l;if(!this._events[m])return!1;var g=this._events[m],v=arguments.length,y,b;if(g.fn){switch(g.once&&this.removeListener(l,g.fn,void 0,!0),v){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,d),!0;case 3:return g.fn.call(g.context,d,u),!0;case 4:return g.fn.call(g.context,d,u,h),!0;case 5:return g.fn.call(g.context,d,u,h,f),!0;case 6:return g.fn.call(g.context,d,u,h,f,p),!0}for(b=1,y=new Array(v-1);b<v;b++)y[b-1]=arguments[b];g.fn.apply(g.context,y)}else{var x=g.length,T;for(b=0;b<x;b++)switch(g[b].once&&this.removeListener(l,g[b].fn,void 0,!0),v){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,d);break;case 3:g[b].fn.call(g[b].context,d,u);break;case 4:g[b].fn.call(g[b].context,d,u,h);break;default:if(!y)for(T=1,y=new Array(v-1);T<v;T++)y[T-1]=arguments[T];g[b].fn.apply(g[b].context,y)}}return!0},a.prototype.on=function(l,d,u){return r(this,l,d,u,!1)},a.prototype.once=function(l,d,u){return r(this,l,d,u,!0)},a.prototype.removeListener=function(l,d,u,h){var f=t?t+l:l;if(!this._events[f])return this;if(!d)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===d&&(!h||p.once)&&(!u||p.context===u)&&o(this,f);else{for(var m=0,g=[],v=p.length;m<v;m++)(p[m].fn!==d||h&&!p[m].once||u&&p[m].context!==u)&&g.push(p[m]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(l){var d;return l?(d=t?t+l:l,this._events[d]&&o(this,d)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,i.exports=a})(jh)),jh.exports}var EP=TP();const Cc=yw(EP);var Vc={exports:{}},Cb;function _P(){if(Cb)return Vc.exports;Cb=1,Vc.exports=i,Vc.exports.default=i;function i(B,Y,U){U=U||2;var O=Y&&Y.length,L=O?Y[0]*U:B.length,R=e(B,0,L,U,!0),X=[];if(!R||R.next===R.prev)return X;var z,K,Z,ae,ce,ve,we;if(O&&(R=c(B,Y,R,U)),B.length>80*U){z=Z=B[0],K=ae=B[1];for(var re=U;re<L;re+=U)ce=B[re],ve=B[re+1],ce<z&&(z=ce),ve<K&&(K=ve),ce>Z&&(Z=ce),ve>ae&&(ae=ve);we=Math.max(Z-z,ae-K),we=we!==0?32767/we:0}return n(R,X,U,z,K,we,0),X}function e(B,Y,U,O,L){var R,X;if(L===j(B,Y,U,O)>0)for(R=Y;R<U;R+=O)X=I(R,B[R],B[R+1],X);else for(R=U-O;R>=Y;R-=O)X=I(R,B[R],B[R+1],X);return X&&x(X,X.next)&&(D(X),X=X.next),X}function t(B,Y){if(!B)return B;Y||(Y=B);var U=B,O;do if(O=!1,!U.steiner&&(x(U,U.next)||b(U.prev,U,U.next)===0)){if(D(U),U=Y=U.prev,U===U.next)break;O=!0}else U=U.next;while(O||U!==Y);return Y}function n(B,Y,U,O,L,R,X){if(B){!X&&R&&f(B,O,L,R);for(var z=B,K,Z;B.prev!==B.next;){if(K=B.prev,Z=B.next,R?r(B,O,L,R):s(B)){Y.push(K.i/U|0),Y.push(B.i/U|0),Y.push(Z.i/U|0),D(B),B=Z.next,z=Z.next;continue}if(B=Z,B===z){X?X===1?(B=o(t(B),Y,U),n(B,Y,U,O,L,R,2)):X===2&&a(B,Y,U,O,L,R):n(t(B),Y,U,O,L,R,1);break}}}}function s(B){var Y=B.prev,U=B,O=B.next;if(b(Y,U,O)>=0)return!1;for(var L=Y.x,R=U.x,X=O.x,z=Y.y,K=U.y,Z=O.y,ae=L<R?L<X?L:X:R<X?R:X,ce=z<K?z<Z?z:Z:K<Z?K:Z,ve=L>R?L>X?L:X:R>X?R:X,we=z>K?z>Z?z:Z:K>Z?K:Z,re=O.next;re!==Y;){if(re.x>=ae&&re.x<=ve&&re.y>=ce&&re.y<=we&&v(L,z,R,K,X,Z,re.x,re.y)&&b(re.prev,re,re.next)>=0)return!1;re=re.next}return!0}function r(B,Y,U,O){var L=B.prev,R=B,X=B.next;if(b(L,R,X)>=0)return!1;for(var z=L.x,K=R.x,Z=X.x,ae=L.y,ce=R.y,ve=X.y,we=z<K?z<Z?z:Z:K<Z?K:Z,re=ae<ce?ae<ve?ae:ve:ce<ve?ce:ve,Ee=z>K?z>Z?z:Z:K>Z?K:Z,q=ae>ce?ae>ve?ae:ve:ce>ve?ce:ve,J=m(we,re,Y,U,O),ie=m(Ee,q,Y,U,O),se=B.prevZ,H=B.nextZ;se&&se.z>=J&&H&&H.z<=ie;){if(se.x>=we&&se.x<=Ee&&se.y>=re&&se.y<=q&&se!==L&&se!==X&&v(z,ae,K,ce,Z,ve,se.x,se.y)&&b(se.prev,se,se.next)>=0||(se=se.prevZ,H.x>=we&&H.x<=Ee&&H.y>=re&&H.y<=q&&H!==L&&H!==X&&v(z,ae,K,ce,Z,ve,H.x,H.y)&&b(H.prev,H,H.next)>=0))return!1;H=H.nextZ}for(;se&&se.z>=J;){if(se.x>=we&&se.x<=Ee&&se.y>=re&&se.y<=q&&se!==L&&se!==X&&v(z,ae,K,ce,Z,ve,se.x,se.y)&&b(se.prev,se,se.next)>=0)return!1;se=se.prevZ}for(;H&&H.z<=ie;){if(H.x>=we&&H.x<=Ee&&H.y>=re&&H.y<=q&&H!==L&&H!==X&&v(z,ae,K,ce,Z,ve,H.x,H.y)&&b(H.prev,H,H.next)>=0)return!1;H=H.nextZ}return!0}function o(B,Y,U){var O=B;do{var L=O.prev,R=O.next.next;!x(L,R)&&T(L,O,O.next,R)&&M(L,R)&&M(R,L)&&(Y.push(L.i/U|0),Y.push(O.i/U|0),Y.push(R.i/U|0),D(O),D(O.next),O=B=R),O=O.next}while(O!==B);return t(O)}function a(B,Y,U,O,L,R){var X=B;do{for(var z=X.next.next;z!==X.prev;){if(X.i!==z.i&&y(X,z)){var K=P(X,z);X=t(X,X.next),K=t(K,K.next),n(X,Y,U,O,L,R,0),n(K,Y,U,O,L,R,0);return}z=z.next}X=X.next}while(X!==B)}function c(B,Y,U,O){var L=[],R,X,z,K,Z;for(R=0,X=Y.length;R<X;R++)z=Y[R]*O,K=R<X-1?Y[R+1]*O:B.length,Z=e(B,z,K,O,!1),Z===Z.next&&(Z.steiner=!0),L.push(g(Z));for(L.sort(l),R=0;R<L.length;R++)U=d(L[R],U);return U}function l(B,Y){return B.x-Y.x}function d(B,Y){var U=u(B,Y);if(!U)return Y;var O=P(U,B);return t(O,O.next),t(U,U.next)}function u(B,Y){var U=Y,O=B.x,L=B.y,R=-1/0,X;do{if(L<=U.y&&L>=U.next.y&&U.next.y!==U.y){var z=U.x+(L-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(z<=O&&z>R&&(R=z,X=U.x<U.next.x?U:U.next,z===O))return X}U=U.next}while(U!==Y);if(!X)return null;var K=X,Z=X.x,ae=X.y,ce=1/0,ve;U=X;do O>=U.x&&U.x>=Z&&O!==U.x&&v(L<ae?O:R,L,Z,ae,L<ae?R:O,L,U.x,U.y)&&(ve=Math.abs(L-U.y)/(O-U.x),M(U,B)&&(ve<ce||ve===ce&&(U.x>X.x||U.x===X.x&&h(X,U)))&&(X=U,ce=ve)),U=U.next;while(U!==K);return X}function h(B,Y){return b(B.prev,B,Y.prev)<0&&b(Y.next,B,B.next)<0}function f(B,Y,U,O){var L=B;do L.z===0&&(L.z=m(L.x,L.y,Y,U,O)),L.prevZ=L.prev,L.nextZ=L.next,L=L.next;while(L!==B);L.prevZ.nextZ=null,L.prevZ=null,p(L)}function p(B){var Y,U,O,L,R,X,z,K,Z=1;do{for(U=B,B=null,R=null,X=0;U;){for(X++,O=U,z=0,Y=0;Y<Z&&(z++,O=O.nextZ,!!O);Y++);for(K=Z;z>0||K>0&&O;)z!==0&&(K===0||!O||U.z<=O.z)?(L=U,U=U.nextZ,z--):(L=O,O=O.nextZ,K--),R?R.nextZ=L:B=L,L.prevZ=R,R=L;U=O}R.nextZ=null,Z*=2}while(X>1);return B}function m(B,Y,U,O,L){return B=(B-U)*L|0,Y=(Y-O)*L|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,B|Y<<1}function g(B){var Y=B,U=B;do(Y.x<U.x||Y.x===U.x&&Y.y<U.y)&&(U=Y),Y=Y.next;while(Y!==B);return U}function v(B,Y,U,O,L,R,X,z){return(L-X)*(Y-z)>=(B-X)*(R-z)&&(B-X)*(O-z)>=(U-X)*(Y-z)&&(U-X)*(R-z)>=(L-X)*(O-z)}function y(B,Y){return B.next.i!==Y.i&&B.prev.i!==Y.i&&!C(B,Y)&&(M(B,Y)&&M(Y,B)&&k(B,Y)&&(b(B.prev,B,Y.prev)||b(B,Y.prev,Y))||x(B,Y)&&b(B.prev,B,B.next)>0&&b(Y.prev,Y,Y.next)>0)}function b(B,Y,U){return(Y.y-B.y)*(U.x-Y.x)-(Y.x-B.x)*(U.y-Y.y)}function x(B,Y){return B.x===Y.x&&B.y===Y.y}function T(B,Y,U,O){var L=S(b(B,Y,U)),R=S(b(B,Y,O)),X=S(b(U,O,B)),z=S(b(U,O,Y));return!!(L!==R&&X!==z||L===0&&E(B,U,Y)||R===0&&E(B,O,Y)||X===0&&E(U,B,O)||z===0&&E(U,Y,O))}function E(B,Y,U){return Y.x<=Math.max(B.x,U.x)&&Y.x>=Math.min(B.x,U.x)&&Y.y<=Math.max(B.y,U.y)&&Y.y>=Math.min(B.y,U.y)}function S(B){return B>0?1:B<0?-1:0}function C(B,Y){var U=B;do{if(U.i!==B.i&&U.next.i!==B.i&&U.i!==Y.i&&U.next.i!==Y.i&&T(U,U.next,B,Y))return!0;U=U.next}while(U!==B);return!1}function M(B,Y){return b(B.prev,B,B.next)<0?b(B,Y,B.next)>=0&&b(B,B.prev,Y)>=0:b(B,Y,B.prev)<0||b(B,B.next,Y)<0}function k(B,Y){var U=B,O=!1,L=(B.x+Y.x)/2,R=(B.y+Y.y)/2;do U.y>R!=U.next.y>R&&U.next.y!==U.y&&L<(U.next.x-U.x)*(R-U.y)/(U.next.y-U.y)+U.x&&(O=!O),U=U.next;while(U!==B);return O}function P(B,Y){var U=new $(B.i,B.x,B.y),O=new $(Y.i,Y.x,Y.y),L=B.next,R=Y.prev;return B.next=Y,Y.prev=B,U.next=L,L.prev=U,O.next=U,U.prev=O,R.next=O,O.prev=R,O}function I(B,Y,U,O){var L=new $(B,Y,U);return O?(L.next=O.next,L.prev=O,O.next.prev=L,O.next=L):(L.prev=L,L.next=L),L}function D(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function $(B,Y,U){this.i=B,this.x=Y,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}i.deviation=function(B,Y,U,O){var L=Y&&Y.length,R=L?Y[0]*U:B.length,X=Math.abs(j(B,0,R,U));if(L)for(var z=0,K=Y.length;z<K;z++){var Z=Y[z]*U,ae=z<K-1?Y[z+1]*U:B.length;X-=Math.abs(j(B,Z,ae,U))}var ce=0;for(z=0;z<O.length;z+=3){var ve=O[z]*U,we=O[z+1]*U,re=O[z+2]*U;ce+=Math.abs((B[ve]-B[re])*(B[we+1]-B[ve+1])-(B[ve]-B[we])*(B[re+1]-B[ve+1]))}return X===0&&ce===0?0:Math.abs((ce-X)/X)};function j(B,Y,U,O){for(var L=0,R=Y,X=U-O;R<U;R+=O)L+=(B[X]-B[R])*(B[R+1]+B[X+1]),X=R;return L}return i.flatten=function(B){for(var Y=B[0][0].length,U={vertices:[],holes:[],dimensions:Y},O=0,L=0;L<B.length;L++){for(var R=0;R<B[L].length;R++)for(var X=0;X<Y;X++)U.vertices.push(B[L][R][X]);L>0&&(O+=B[L-1].length,U.holes.push(O))}return U},Vc.exports}var MP=_P();const PP=yw(MP);var vo={},El={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var kP=El.exports,Ab;function IP(){return Ab||(Ab=1,(function(i,e){(function(t){var n=e&&!e.nodeType&&e,s=i&&!i.nodeType&&i,r=typeof Qd=="object"&&Qd;(r.global===r||r.window===r||r.self===r)&&(t=r);var o,a=2147483647,c=36,l=1,d=26,u=38,h=700,f=72,p=128,m="-",g=/^xn--/,v=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=c-l,T=Math.floor,E=String.fromCharCode,S;function C(L){throw new RangeError(b[L])}function M(L,R){for(var X=L.length,z=[];X--;)z[X]=R(L[X]);return z}function k(L,R){var X=L.split("@"),z="";X.length>1&&(z=X[0]+"@",L=X[1]),L=L.replace(y,".");var K=L.split("."),Z=M(K,R).join(".");return z+Z}function P(L){for(var R=[],X=0,z=L.length,K,Z;X<z;)K=L.charCodeAt(X++),K>=55296&&K<=56319&&X<z?(Z=L.charCodeAt(X++),(Z&64512)==56320?R.push(((K&1023)<<10)+(Z&1023)+65536):(R.push(K),X--)):R.push(K);return R}function I(L){return M(L,function(R){var X="";return R>65535&&(R-=65536,X+=E(R>>>10&1023|55296),R=56320|R&1023),X+=E(R),X}).join("")}function D(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:c}function $(L,R){return L+22+75*(L<26)-((R!=0)<<5)}function j(L,R,X){var z=0;for(L=X?T(L/h):L>>1,L+=T(L/R);L>x*d>>1;z+=c)L=T(L/x);return T(z+(x+1)*L/(L+u))}function B(L){var R=[],X=L.length,z,K=0,Z=p,ae=f,ce,ve,we,re,Ee,q,J,ie,se;for(ce=L.lastIndexOf(m),ce<0&&(ce=0),ve=0;ve<ce;++ve)L.charCodeAt(ve)>=128&&C("not-basic"),R.push(L.charCodeAt(ve));for(we=ce>0?ce+1:0;we<X;){for(re=K,Ee=1,q=c;we>=X&&C("invalid-input"),J=D(L.charCodeAt(we++)),(J>=c||J>T((a-K)/Ee))&&C("overflow"),K+=J*Ee,ie=q<=ae?l:q>=ae+d?d:q-ae,!(J<ie);q+=c)se=c-ie,Ee>T(a/se)&&C("overflow"),Ee*=se;z=R.length+1,ae=j(K-re,z,re==0),T(K/z)>a-Z&&C("overflow"),Z+=T(K/z),K%=z,R.splice(K++,0,Z)}return I(R)}function Y(L){var R,X,z,K,Z,ae,ce,ve,we,re,Ee,q=[],J,ie,se,H;for(L=P(L),J=L.length,R=p,X=0,Z=f,ae=0;ae<J;++ae)Ee=L[ae],Ee<128&&q.push(E(Ee));for(z=K=q.length,K&&q.push(m);z<J;){for(ce=a,ae=0;ae<J;++ae)Ee=L[ae],Ee>=R&&Ee<ce&&(ce=Ee);for(ie=z+1,ce-R>T((a-X)/ie)&&C("overflow"),X+=(ce-R)*ie,R=ce,ae=0;ae<J;++ae)if(Ee=L[ae],Ee<R&&++X>a&&C("overflow"),Ee==R){for(ve=X,we=c;re=we<=Z?l:we>=Z+d?d:we-Z,!(ve<re);we+=c)H=ve-re,se=c-re,q.push(E($(re+H%se,0))),ve=T(H/se);q.push(E($(ve,0))),Z=j(X,ie,z==K),X=0,++z}++X,++R}return q.join("")}function U(L){return k(L,function(R){return g.test(R)?B(R.slice(4).toLowerCase()):R})}function O(L){return k(L,function(R){return v.test(R)?"xn--"+Y(R):R})}if(o={version:"1.4.1",ucs2:{decode:P,encode:I},decode:B,encode:Y,toASCII:O,toUnicode:U},n&&s)if(i.exports==n)s.exports=o;else for(S in o)o.hasOwnProperty(S)&&(n[S]=o[S]);else t.punycode=o})(kP)})(El,El.exports)),El.exports}var Hh,Tb;function il(){return Tb||(Tb=1,Hh=TypeError),Hh}const RP={},FP=Object.freeze(Object.defineProperty({__proto__:null,default:RP},Symbol.toStringTag,{value:"Module"})),LP=AP(FP);var Gh,Eb;function oh(){if(Eb)return Gh;Eb=1;var i=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=i&&e&&typeof e.get=="function"?e.get:null,n=i&&Map.prototype.forEach,s=typeof Set=="function"&&Set.prototype,r=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o=s&&r&&typeof r.get=="function"?r.get:null,a=s&&Set.prototype.forEach,c=typeof WeakMap=="function"&&WeakMap.prototype,l=c?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,u=d?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,f=h?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,x=String.prototype.toUpperCase,T=String.prototype.toLowerCase,E=RegExp.prototype.test,S=Array.prototype.concat,C=Array.prototype.join,M=Array.prototype.slice,k=Math.floor,P=typeof BigInt=="function"?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,$=typeof Symbol=="function"&&typeof Symbol.iterator=="object",j=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$||!0)?Symbol.toStringTag:null,B=Object.prototype.propertyIsEnumerable,Y=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ue){return ue.__proto__}:null);function U(ue,fe){if(ue===1/0||ue===-1/0||ue!==ue||ue&&ue>-1e3&&ue<1e3||E.call(/e/,fe))return fe;var nt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ue=="number"){var mt=ue<0?-k(-ue):k(ue);if(mt!==ue){var lt=String(mt),ct=y.call(fe,lt.length+1);return b.call(lt,nt,"$&_")+"."+b.call(b.call(ct,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(fe,nt,"$&_")}var O=LP,L=O.custom,R=ie(L)?L:null,X={__proto__:null,double:'"',single:"'"},z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Gh=function ue(fe,nt,mt,lt){var ct=nt||{};if(G(ct,"quoteStyle")&&!G(X,ct.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(ct,"maxStringLength")&&(typeof ct.maxStringLength=="number"?ct.maxStringLength<0&&ct.maxStringLength!==1/0:ct.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Kn=G(ct,"customInspect")?ct.customInspect:!0;if(typeof Kn!="boolean"&&Kn!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(ct,"indent")&&ct.indent!==null&&ct.indent!==" "&&!(parseInt(ct.indent,10)===ct.indent&&ct.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(ct,"numericSeparator")&&typeof ct.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _i=ct.numericSeparator;if(typeof fe>"u")return"undefined";if(fe===null)return"null";if(typeof fe=="boolean")return fe?"true":"false";if(typeof fe=="string")return de(fe,ct);if(typeof fe=="number"){if(fe===0)return 1/0/fe>0?"0":"-0";var wn=String(fe);return _i?U(fe,wn):wn}if(typeof fe=="bigint"){var gi=String(fe)+"n";return _i?U(fe,gi):gi}var Bn=typeof ct.depth>"u"?5:ct.depth;if(typeof mt>"u"&&(mt=0),mt>=Bn&&Bn>0&&typeof fe=="object")return ce(fe)?"[Array]":"[Object]";var Pn=Oe(ct,mt);if(typeof lt>"u")lt=[];else if(W(lt,fe)>=0)return"[Circular]";function xt(Er,na,Mh){if(na&&(lt=M.call(lt),lt.push(na)),Mh){var ls={depth:ct.depth};return G(ct,"quoteStyle")&&(ls.quoteStyle=ct.quoteStyle),ue(Er,ls,mt+1,lt)}return ue(Er,ct,mt+1,lt)}if(typeof fe=="function"&&!we(fe)){var vi=V(fe),Jn=Te(fe,xt);return"[Function"+(vi?": "+vi:" (anonymous)")+"]"+(Jn.length>0?" { "+C.call(Jn,", ")+" }":"")}if(ie(fe)){var Ui=$?b.call(String(fe),/^(Symbol\(.*\))_[^)]*$/,"$1"):D.call(fe);return typeof fe=="object"&&!$?Ve(Ui):Ui}if(Ae(fe)){for(var Un="<"+T.call(String(fe.nodeName)),Vi=fe.attributes||[],Zn=0;Zn<Vi.length;Zn++)Un+=" "+Vi[Zn].name+"="+K(Z(Vi[Zn].value),"double",ct);return Un+=">",fe.childNodes&&fe.childNodes.length&&(Un+="..."),Un+="</"+T.call(String(fe.nodeName))+">",Un}if(ce(fe)){if(fe.length===0)return"[]";var as=Te(fe,xt);return Pn&&!ft(as)?"["+ot(as,Pn)+"]":"[ "+C.call(as,", ")+" ]"}if(re(fe)){var ho=Te(fe,xt);return!("cause"in Error.prototype)&&"cause"in fe&&!B.call(fe,"cause")?"{ ["+String(fe)+"] "+C.call(S.call("[cause]: "+xt(fe.cause),ho),", ")+" }":ho.length===0?"["+String(fe)+"]":"{ ["+String(fe)+"] "+C.call(ho,", ")+" }"}if(typeof fe=="object"&&Kn){if(R&&typeof fe[R]=="function"&&O)return O(fe,{depth:Bn-mt});if(Kn!=="symbol"&&typeof fe.inspect=="function")return fe.inspect()}if(ee(fe)){var Ic=[];return n&&n.call(fe,function(Er,na){Ic.push(xt(na,fe,!0)+" => "+xt(Er,fe))}),bt("Map",t.call(fe),Ic,Pn)}if(he(fe)){var Rc=[];return a&&a.call(fe,function(Er){Rc.push(xt(Er,fe))}),bt("Set",o.call(fe),Rc,Pn)}if(be(fe))return qe("WeakMap");if(Be(fe))return qe("WeakSet");if(ye(fe))return qe("WeakRef");if(q(fe))return Ve(xt(Number(fe)));if(se(fe))return Ve(xt(P.call(fe)));if(J(fe))return Ve(p.call(fe));if(Ee(fe))return Ve(xt(String(fe)));if(typeof window<"u"&&fe===window)return"{ [object Window] }";if(typeof globalThis<"u"&&fe===globalThis||typeof Qd<"u"&&fe===Qd)return"{ [object globalThis] }";if(!ve(fe)&&!we(fe)){var al=Te(fe,xt),Fc=Y?Y(fe)===Object.prototype:fe instanceof Object||fe.constructor===Object,ll=fe instanceof Object?"":"null prototype",Lc=!Fc&&j&&Object(fe)===fe&&j in fe?y.call(N(fe),8,-1):ll?"Object":"",cl=Fc||typeof fe.constructor!="function"?"":fe.constructor.name?fe.constructor.name+" ":"",dl=cl+(Lc||ll?"["+C.call(S.call([],Lc||[],ll||[]),": ")+"] ":"");return al.length===0?dl+"{}":Pn?dl+"{"+ot(al,Pn)+"}":dl+"{ "+C.call(al,", ")+" }"}return String(fe)};function K(ue,fe,nt){var mt=nt.quoteStyle||fe,lt=X[mt];return lt+ue+lt}function Z(ue){return b.call(String(ue),/"/g,""")}function ae(ue){return!j||!(typeof ue=="object"&&(j in ue||typeof ue[j]<"u"))}function ce(ue){return N(ue)==="[object Array]"&&ae(ue)}function ve(ue){return N(ue)==="[object Date]"&&ae(ue)}function we(ue){return N(ue)==="[object RegExp]"&&ae(ue)}function re(ue){return N(ue)==="[object Error]"&&ae(ue)}function Ee(ue){return N(ue)==="[object String]"&&ae(ue)}function q(ue){return N(ue)==="[object Number]"&&ae(ue)}function J(ue){return N(ue)==="[object Boolean]"&&ae(ue)}function ie(ue){if($)return ue&&typeof ue=="object"&&ue instanceof Symbol;if(typeof ue=="symbol")return!0;if(!ue||typeof ue!="object"||!D)return!1;try{return D.call(ue),!0}catch{}return!1}function se(ue){if(!ue||typeof ue!="object"||!P)return!1;try{return P.call(ue),!0}catch{}return!1}var H=Object.prototype.hasOwnProperty||function(ue){return ue in this};function G(ue,fe){return H.call(ue,fe)}function N(ue){return m.call(ue)}function V(ue){if(ue.name)return ue.name;var fe=v.call(g.call(ue),/^function\s*([\w$]+)/);return fe?fe[1]:null}function W(ue,fe){if(ue.indexOf)return ue.indexOf(fe);for(var nt=0,mt=ue.length;nt<mt;nt++)if(ue[nt]===fe)return nt;return-1}function ee(ue){if(!t||!ue||typeof ue!="object")return!1;try{t.call(ue);try{o.call(ue)}catch{return!0}return ue instanceof Map}catch{}return!1}function be(ue){if(!l||!ue||typeof ue!="object")return!1;try{l.call(ue,l);try{u.call(ue,u)}catch{return!0}return ue instanceof WeakMap}catch{}return!1}function ye(ue){if(!f||!ue||typeof ue!="object")return!1;try{return f.call(ue),!0}catch{}return!1}function he(ue){if(!o||!ue||typeof ue!="object")return!1;try{o.call(ue);try{t.call(ue)}catch{return!0}return ue instanceof Set}catch{}return!1}function Be(ue){if(!u||!ue||typeof ue!="object")return!1;try{u.call(ue,u);try{l.call(ue,l)}catch{return!0}return ue instanceof WeakSet}catch{}return!1}function Ae(ue){return!ue||typeof ue!="object"?!1:typeof HTMLElement<"u"&&ue instanceof HTMLElement?!0:typeof ue.nodeName=="string"&&typeof ue.getAttribute=="function"}function de(ue,fe){if(ue.length>fe.maxStringLength){var nt=ue.length-fe.maxStringLength,mt="... "+nt+" more character"+(nt>1?"s":"");return de(y.call(ue,0,fe.maxStringLength),fe)+mt}var lt=z[fe.quoteStyle||"single"];lt.lastIndex=0;var ct=b.call(b.call(ue,lt,"\\$1"),/[\x00-\x1f]/g,ge);return K(ct,"single",fe)}function ge(ue){var fe=ue.charCodeAt(0),nt={8:"b",9:"t",10:"n",12:"f",13:"r"}[fe];return nt?"\\"+nt:"\\x"+(fe<16?"0":"")+x.call(fe.toString(16))}function Ve(ue){return"Object("+ue+")"}function qe(ue){return ue+" { ? }"}function bt(ue,fe,nt,mt){var lt=mt?ot(nt,mt):C.call(nt,", ");return ue+" ("+fe+") {"+lt+"}"}function ft(ue){for(var fe=0;fe<ue.length;fe++)if(W(ue[fe],`
|
||
`)>=0)return!1;return!0}function Oe(ue,fe){var nt;if(ue.indent===" ")nt=" ";else if(typeof ue.indent=="number"&&ue.indent>0)nt=C.call(Array(ue.indent+1)," ");else return null;return{base:nt,prev:C.call(Array(fe+1),nt)}}function ot(ue,fe){if(ue.length===0)return"";var nt=`
|
||
`+fe.prev+fe.base;return nt+C.call(ue,","+nt)+`
|
||
`+fe.prev}function Te(ue,fe){var nt=ce(ue),mt=[];if(nt){mt.length=ue.length;for(var lt=0;lt<ue.length;lt++)mt[lt]=G(ue,lt)?fe(ue[lt],ue):""}var ct=typeof I=="function"?I(ue):[],Kn;if($){Kn={};for(var _i=0;_i<ct.length;_i++)Kn["$"+ct[_i]]=ct[_i]}for(var wn in ue)G(ue,wn)&&(nt&&String(Number(wn))===wn&&wn<ue.length||$&&Kn["$"+wn]instanceof Symbol||(E.call(/[^\w$]/,wn)?mt.push(fe(wn,ue)+": "+fe(ue[wn],ue)):mt.push(wn+": "+fe(ue[wn],ue))));if(typeof I=="function")for(var gi=0;gi<ct.length;gi++)B.call(ue,ct[gi])&&mt.push("["+fe(ct[gi])+"]: "+fe(ue[ct[gi]],ue));return mt}return Gh}var Wh,_b;function DP(){if(_b)return Wh;_b=1;var i=oh(),e=il(),t=function(a,c,l){for(var d=a,u;(u=d.next)!=null;d=u)if(u.key===c)return d.next=u.next,l||(u.next=a.next,a.next=u),u},n=function(a,c){if(a){var l=t(a,c);return l&&l.value}},s=function(a,c,l){var d=t(a,c);d?d.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 Wh=function(){var c,l={assert:function(d){if(!l.has(d))throw new e("Side channel does not contain "+i(d))},delete:function(d){var u=o(c,d);return u&&c&&!c.next&&(c=void 0),!!u},get:function(d){return n(c,d)},has:function(d){return r(c,d)},set:function(d,u){c||(c={next:void 0}),s(c,d,u)}};return l},Wh}var qh,Mb;function xw(){return Mb||(Mb=1,qh=Object),qh}var Kh,Pb;function OP(){return Pb||(Pb=1,Kh=Error),Kh}var Jh,kb;function NP(){return kb||(kb=1,Jh=EvalError),Jh}var Zh,Ib;function $P(){return Ib||(Ib=1,Zh=RangeError),Zh}var Qh,Rb;function BP(){return Rb||(Rb=1,Qh=ReferenceError),Qh}var ef,Fb;function UP(){return Fb||(Fb=1,ef=SyntaxError),ef}var tf,Lb;function VP(){return Lb||(Lb=1,tf=URIError),tf}var nf,Db;function XP(){return Db||(Db=1,nf=Math.abs),nf}var sf,Ob;function YP(){return Ob||(Ob=1,sf=Math.floor),sf}var rf,Nb;function zP(){return Nb||(Nb=1,rf=Math.max),rf}var of,$b;function jP(){return $b||($b=1,of=Math.min),of}var af,Bb;function HP(){return Bb||(Bb=1,af=Math.pow),af}var lf,Ub;function GP(){return Ub||(Ub=1,lf=Math.round),lf}var cf,Vb;function WP(){return Vb||(Vb=1,cf=Number.isNaN||function(e){return e!==e}),cf}var df,Xb;function qP(){if(Xb)return df;Xb=1;var i=WP();return df=function(t){return i(t)||t===0?t:t<0?-1:1},df}var uf,Yb;function KP(){return Yb||(Yb=1,uf=Object.getOwnPropertyDescriptor),uf}var hf,zb;function ww(){if(zb)return hf;zb=1;var i=KP();if(i)try{i([],"length")}catch{i=null}return hf=i,hf}var ff,jb;function Sw(){if(jb)return ff;jb=1;var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return ff=i,ff}var pf,Hb;function JP(){return Hb||(Hb=1,pf=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;e[t]=s;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!==s||a.enumerable!==!0)return!1}return!0}),pf}var mf,Gb;function ZP(){if(Gb)return mf;Gb=1;var i=typeof Symbol<"u"&&Symbol,e=JP();return mf=function(){return typeof i!="function"||typeof Symbol!="function"||typeof i("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},mf}var gf,Wb;function Cw(){return Wb||(Wb=1,gf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),gf}var vf,qb;function Aw(){if(qb)return vf;qb=1;var i=xw();return vf=i.getPrototypeOf||null,vf}var bf,Kb;function QP(){if(Kb)return bf;Kb=1;var i="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",s=function(c,l){for(var d=[],u=0;u<c.length;u+=1)d[u]=c[u];for(var h=0;h<l.length;h+=1)d[h+c.length]=l[h];return d},r=function(c,l){for(var d=[],u=l,h=0;u<c.length;u+=1,h+=1)d[h]=c[u];return d},o=function(a,c){for(var l="",d=0;d<a.length;d+=1)l+=a[d],d+1<a.length&&(l+=c);return l};return bf=function(c){var l=this;if(typeof l!="function"||e.apply(l)!==n)throw new TypeError(i+l);for(var d=r(arguments,1),u,h=function(){if(this instanceof u){var v=l.apply(this,s(d,arguments));return Object(v)===v?v:this}return l.apply(c,s(d,arguments))},f=t(0,l.length-d.length),p=[],m=0;m<f;m++)p[m]="$"+m;if(u=Function("binder","return function ("+o(p,",")+"){ return binder.apply(this,arguments); }")(h),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u},bf}var yf,Jb;function ah(){if(Jb)return yf;Jb=1;var i=QP();return yf=Function.prototype.bind||i,yf}var xf,Zb;function Fg(){return Zb||(Zb=1,xf=Function.prototype.call),xf}var wf,Qb;function Tw(){return Qb||(Qb=1,wf=Function.prototype.apply),wf}var Sf,e0;function ek(){return e0||(e0=1,Sf=typeof Reflect<"u"&&Reflect&&Reflect.apply),Sf}var Cf,t0;function tk(){if(t0)return Cf;t0=1;var i=ah(),e=Tw(),t=Fg(),n=ek();return Cf=n||i.call(t,e),Cf}var Af,n0;function Ew(){if(n0)return Af;n0=1;var i=ah(),e=il(),t=Fg(),n=tk();return Af=function(r){if(r.length<1||typeof r[0]!="function")throw new e("a function is required");return n(i,t,r)},Af}var Tf,i0;function nk(){if(i0)return Tf;i0=1;var i=Ew(),e=ww(),t;try{t=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!t&&e&&e(Object.prototype,"__proto__"),s=Object,r=s.getPrototypeOf;return Tf=n&&typeof n.get=="function"?i([n.get]):typeof r=="function"?function(a){return r(a==null?a:s(a))}:!1,Tf}var Ef,s0;function ik(){if(s0)return Ef;s0=1;var i=Cw(),e=Aw(),t=nk();return Ef=i?function(s){return i(s)}:e?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return e(s)}:t?function(s){return t(s)}:null,Ef}var _f,r0;function sk(){if(r0)return _f;r0=1;var i=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=ah();return _f=t.call(i,e),_f}var Mf,o0;function Lg(){if(o0)return Mf;o0=1;var i,e=xw(),t=OP(),n=NP(),s=$P(),r=BP(),o=UP(),a=il(),c=VP(),l=XP(),d=YP(),u=zP(),h=jP(),f=HP(),p=GP(),m=qP(),g=Function,v=function(we){try{return g('"use strict"; return ('+we+").constructor;")()}catch{}},y=ww(),b=Sw(),x=function(){throw new a},T=y?(function(){try{return arguments.callee,x}catch{try{return y(arguments,"callee").get}catch{return x}}})():x,E=ZP()(),S=ik(),C=Aw(),M=Cw(),k=Tw(),P=Fg(),I={},D=typeof Uint8Array>"u"||!S?i:S(Uint8Array),$={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?i:ArrayBuffer,"%ArrayIteratorPrototype%":E&&S?S([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":typeof Atomics>"u"?i:Atomics,"%BigInt%":typeof BigInt>"u"?i:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?i:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?i:Float16Array,"%Float32Array%":typeof Float32Array>"u"?i:Float32Array,"%Float64Array%":typeof Float64Array>"u"?i:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?i:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":I,"%Int8Array%":typeof Int8Array>"u"?i:Int8Array,"%Int16Array%":typeof Int16Array>"u"?i:Int16Array,"%Int32Array%":typeof Int32Array>"u"?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&S?S(S([][Symbol.iterator]())):i,"%JSON%":typeof JSON=="object"?JSON:i,"%Map%":typeof Map>"u"?i:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!S?i:S(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?i:Promise,"%Proxy%":typeof Proxy>"u"?i:Proxy,"%RangeError%":s,"%ReferenceError%":r,"%Reflect%":typeof Reflect>"u"?i:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?i:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E||!S?i:S(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&S?S(""[Symbol.iterator]()):i,"%Symbol%":E?Symbol:i,"%SyntaxError%":o,"%ThrowTypeError%":T,"%TypedArray%":D,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?i:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?i:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?i:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?i:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?i:WeakMap,"%WeakRef%":typeof WeakRef>"u"?i:WeakRef,"%WeakSet%":typeof WeakSet>"u"?i:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":k,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":C,"%Math.abs%":l,"%Math.floor%":d,"%Math.max%":u,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":p,"%Math.sign%":m,"%Reflect.getPrototypeOf%":M};if(S)try{null.error}catch(we){var j=S(S(we));$["%Error.prototype%"]=j}var B=function we(re){var Ee;if(re==="%AsyncFunction%")Ee=v("async function () {}");else if(re==="%GeneratorFunction%")Ee=v("function* () {}");else if(re==="%AsyncGeneratorFunction%")Ee=v("async function* () {}");else if(re==="%AsyncGenerator%"){var q=we("%AsyncGeneratorFunction%");q&&(Ee=q.prototype)}else if(re==="%AsyncIteratorPrototype%"){var J=we("%AsyncGenerator%");J&&S&&(Ee=S(J.prototype))}return $[re]=Ee,Ee},Y={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=ah(),O=sk(),L=U.call(P,Array.prototype.concat),R=U.call(k,Array.prototype.splice),X=U.call(P,String.prototype.replace),z=U.call(P,String.prototype.slice),K=U.call(P,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ae=/\\(\\)?/g,ce=function(re){var Ee=z(re,0,1),q=z(re,-1);if(Ee==="%"&&q!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(q==="%"&&Ee!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var J=[];return X(re,Z,function(ie,se,H,G){J[J.length]=H?X(G,ae,"$1"):se||ie}),J},ve=function(re,Ee){var q=re,J;if(O(Y,q)&&(J=Y[q],q="%"+J[0]+"%"),O($,q)){var ie=$[q];if(ie===I&&(ie=B(q)),typeof ie>"u"&&!Ee)throw new a("intrinsic "+re+" exists, but is not available. Please file an issue!");return{alias:J,name:q,value:ie}}throw new o("intrinsic "+re+" does not exist!")};return Mf=function(re,Ee){if(typeof re!="string"||re.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ee!="boolean")throw new a('"allowMissing" argument must be a boolean');if(K(/^%?[^%]*%?$/,re)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var q=ce(re),J=q.length>0?q[0]:"",ie=ve("%"+J+"%",Ee),se=ie.name,H=ie.value,G=!1,N=ie.alias;N&&(J=N[0],R(q,L([0,1],N)));for(var V=1,W=!0;V<q.length;V+=1){var ee=q[V],be=z(ee,0,1),ye=z(ee,-1);if((be==='"'||be==="'"||be==="`"||ye==='"'||ye==="'"||ye==="`")&&be!==ye)throw new o("property names with quotes must have matching quotes");if((ee==="constructor"||!W)&&(G=!0),J+="."+ee,se="%"+J+"%",O($,se))H=$[se];else if(H!=null){if(!(ee in H)){if(!Ee)throw new a("base intrinsic for "+re+" exists, but the property is not available.");return}if(y&&V+1>=q.length){var he=y(H,ee);W=!!he,W&&"get"in he&&!("originalValue"in he.get)?H=he.get:H=H[ee]}else W=O(H,ee),H=H[ee];W&&!G&&($[se]=H)}}return H},Mf}var Pf,a0;function _w(){if(a0)return Pf;a0=1;var i=Lg(),e=Ew(),t=e([i("%String.prototype.indexOf%")]);return Pf=function(s,r){var o=i(s,!!r);return typeof o=="function"&&t(s,".prototype.")>-1?e([o]):o},Pf}var kf,l0;function Mw(){if(l0)return kf;l0=1;var i=Lg(),e=_w(),t=oh(),n=il(),s=i("%Map%",!0),r=e("Map.prototype.get",!0),o=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),c=e("Map.prototype.delete",!0),l=e("Map.prototype.size",!0);return kf=!!s&&function(){var u,h={assert:function(f){if(!h.has(f))throw new n("Side channel does not contain "+t(f))},delete:function(f){if(u){var p=c(u,f);return l(u)===0&&(u=void 0),p}return!1},get:function(f){if(u)return r(u,f)},has:function(f){return u?a(u,f):!1},set:function(f,p){u||(u=new s),o(u,f,p)}};return h},kf}var If,c0;function rk(){if(c0)return If;c0=1;var i=Lg(),e=_w(),t=oh(),n=Mw(),s=il(),r=i("%WeakMap%",!0),o=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),c=e("WeakMap.prototype.has",!0),l=e("WeakMap.prototype.delete",!0);return If=r?function(){var u,h,f={assert:function(p){if(!f.has(p))throw new s("Side channel does not contain "+t(p))},delete:function(p){if(r&&p&&(typeof p=="object"||typeof p=="function")){if(u)return l(u,p)}else if(n&&h)return h.delete(p);return!1},get:function(p){return r&&p&&(typeof p=="object"||typeof p=="function")&&u?o(u,p):h&&h.get(p)},has:function(p){return r&&p&&(typeof p=="object"||typeof p=="function")&&u?c(u,p):!!h&&h.has(p)},set:function(p,m){r&&p&&(typeof p=="object"||typeof p=="function")?(u||(u=new r),a(u,p,m)):n&&(h||(h=n()),h.set(p,m))}};return f}:n,If}var Rf,d0;function Pw(){if(d0)return Rf;d0=1;var i=il(),e=oh(),t=DP(),n=Mw(),s=rk(),r=s||n||t;return Rf=function(){var a,c={assert:function(l){if(!c.has(l)){var d=l&&Object(l)===l?"the given object key":e(l);throw new i("Side channel does not contain "+d)}},delete:function(l){return!!a&&a.delete(l)},get:function(l){return a&&a.get(l)},has:function(l){return!!a&&a.has(l)},set:function(l,d){a||(a=r()),a.set(l,d)}};return c},Rf}var Ff,u0;function Dg(){if(u0)return Ff;u0=1;var i=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Ff={default:t.RFC3986,formatters:{RFC1738:function(n){return i.call(n,e,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},Ff}var Lf,h0;function kw(){if(h0)return Lf;h0=1;var i=Dg(),e=Pw(),t=Sw(),n=Object.prototype.hasOwnProperty,s=Array.isArray,r=e(),o=function(M,k){return r.set(M,k),M},a=function(M){return r.has(M)},c=function(M){return r.get(M)},l=function(M,k){r.set(M,k)},d=(function(){for(var C=[],M=0;M<256;++M)C[C.length]="%"+((M<16?"0":"")+M.toString(16)).toUpperCase();return C})(),u=function(M){for(;M.length>1;){var k=M.pop(),P=k.obj[k.prop];if(s(P)){for(var I=[],D=0;D<P.length;++D)typeof P[D]<"u"&&(I[I.length]=P[D]);k.obj[k.prop]=I}}},h=function(M,k){for(var P=k&&k.plainObjects?{__proto__:null}:{},I=0;I<M.length;++I)typeof M[I]<"u"&&(P[I]=M[I]);return P},f=function(M,k,P){k==="__proto__"&&t?t(M,k,{configurable:!0,enumerable:!0,value:P,writable:!0}):M[k]=P},p=function C(M,k,P){if(!k)return M;if(typeof k!="object"&&typeof k!="function"){if(s(M)){var I=M.length;if(P&&typeof P.arrayLimit=="number"&&I>=P.arrayLimit){if(P.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+P.arrayLimit+" element"+(P.arrayLimit===1?"":"s")+" allowed in an array.");return o(h(M.concat(k),P),I)}M[I]=k}else if(M&&typeof M=="object")if(a(M)){var D=c(M)+1;M[D]=k,l(M,D)}else{if(P&&P.strictMerge)return[M,k];(P&&(P.plainObjects||P.allowPrototypes)||!n.call(Object.prototype,k))&&(M[k]=!0)}else return[M,k];return M}if(!M||typeof M!="object"){if(a(k)){for(var $=Object.keys(k),j=P&&P.plainObjects?{__proto__:null,0:M}:{0:M},B=0;B<$.length;B++){var Y=parseInt($[B],10);j[Y+1]=k[$[B]]}return o(j,c(k)+1)}var U=[M].concat(k);if(P&&typeof P.arrayLimit=="number"&&U.length>P.arrayLimit){if(P.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+P.arrayLimit+" element"+(P.arrayLimit===1?"":"s")+" allowed in an array.");return o(h(U,P),U.length-1)}return U}var O=M;if(s(M)&&!s(k)&&(O=h(M,P)),s(M)&&s(k)){if(k.forEach(function(L,R){if(n.call(M,R)){var X=M[R];X&&typeof X=="object"&&L&&typeof L=="object"?M[R]=C(X,L,P):M[M.length]=L}else M[R]=L}),P&&typeof P.arrayLimit=="number"&&M.length>P.arrayLimit){if(P.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+P.arrayLimit+" element"+(P.arrayLimit===1?"":"s")+" allowed in an array.");return o(h(M,P),M.length-1)}return M}return Object.keys(k).reduce(function(L,R){var X=k[R];if(n.call(L,R)?f(L,R,C(L[R],X,P)):f(L,R,X),a(k)&&!a(L)&&o(L,c(k)),a(L)){var z=parseInt(R,10);String(z)===R&&z>=0&&z>c(L)&&l(L,z)}return L},O)},m=function(M,k){return Object.keys(k).reduce(function(P,I){return f(P,I,k[I]),P},M)},g=function(C,M,k){var P=C.replace(/\+/g," ");if(k==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},v=1024,y=function(M,k,P,I,D){if(M.length===0)return M;var $=M;if(typeof M=="symbol"?$=Symbol.prototype.toString.call(M):typeof M!="string"&&($=String(M)),P==="iso-8859-1")return escape($).replace(/%u[0-9a-f]{4}/gi,function(X){return"%26%23"+parseInt(X.slice(2),16)+"%3B"});for(var j="",B=0;B<$.length;B+=v){var Y=$.length>=v?$.slice(B,B+v):$;if(B+v<$.length){var U=Y.charCodeAt(Y.length-1);U>=55296&&U<=56319&&(Y=Y.slice(0,-1),B-=1)}for(var O=[],L=0;L<Y.length;++L){var R=Y.charCodeAt(L);if(R===45||R===46||R===95||R===126||R>=48&&R<=57||R>=65&&R<=90||R>=97&&R<=122||D===i.RFC1738&&(R===40||R===41)){O[O.length]=Y.charAt(L);continue}if(R<128){O[O.length]=d[R];continue}if(R<2048){O[O.length]=d[192|R>>6]+d[128|R&63];continue}if(R<55296||R>=57344){O[O.length]=d[224|R>>12]+d[128|R>>6&63]+d[128|R&63];continue}L+=1,R=65536+((R&1023)<<10|Y.charCodeAt(L)&1023),O[O.length]=d[240|R>>18]+d[128|R>>12&63]+d[128|R>>6&63]+d[128|R&63]}j+=O.join("")}return j},b=function(M){for(var k=[{obj:{o:M},prop:"o"}],P=e(),I=0;I<k.length;++I)for(var D=k[I],$=D.obj[D.prop],j=Object.keys($),B=0;B<j.length;++B){var Y=j[B],U=$[Y];typeof U=="object"&&U!==null&&!P.has(U)&&(k[k.length]={obj:$,prop:Y},P.set(U,!0))}return u(k),M},x=function(M){return Object.prototype.toString.call(M)==="[object RegExp]"},T=function(M){return!M||typeof M!="object"?!1:!!(M.constructor&&M.constructor.isBuffer&&M.constructor.isBuffer(M))},E=function(M,k,P,I,D){if(a(M)){if(D)throw new RangeError("Array limit exceeded. Only "+P+" element"+(P===1?"":"s")+" allowed in an array.");var $=c(M)+1;return M[$]=k,l(M,$),M}var j=[].concat(M,k);if(j.length>P){if(D)throw new RangeError("Array limit exceeded. Only "+P+" element"+(P===1?"":"s")+" allowed in an array.");return o(h(j,{plainObjects:I}),j.length-1)}return j},S=function(M,k){if(s(M)){for(var P=[],I=0;I<M.length;I+=1)P[P.length]=k(M[I]);return P}return k(M)};return Lf={arrayToObject:h,assign:m,combine:E,compact:b,decode:g,encode:y,isBuffer:T,isOverflow:a,isRegExp:x,markOverflow:o,maybeMap:S,merge:p},Lf}var Df,f0;function ok(){if(f0)return Df;f0=1;var i=Pw(),e=kw(),t=Dg(),n=Object.prototype.hasOwnProperty,s={brackets:function(g){return g+"[]"},comma:"comma",indices:function(g,v){return g+"["+v+"]"},repeat:function(g){return g}},r=Array.isArray,o=Array.prototype.push,a=function(m,g){o.apply(m,r(g)?g:[g])},c=Date.prototype.toISOString,l=t.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:l,formatter:t.formatters[l],indices:!1,serializeDate:function(g){return c.call(g)},skipNulls:!1,strictNullHandling:!1},u=function(g){return typeof g=="string"||typeof g=="number"||typeof g=="boolean"||typeof g=="symbol"||typeof g=="bigint"},h={},f=function m(g,v,y,b,x,T,E,S,C,M,k,P,I,D,$,j,B,Y){for(var U=g,O=Y,L=0,R=!1;(O=O.get(h))!==void 0&&!R;){var X=O.get(g);if(L+=1,typeof X<"u"){if(X===L)throw new RangeError("Cyclic object value");R=!0}typeof O.get(h)>"u"&&(L=0)}if(typeof M=="function"?U=M(v,U):U instanceof Date?U=I(U):y==="comma"&&r(U)&&(U=e.maybeMap(U,function(se){return se instanceof Date?I(se):se})),U===null){if(T)return $(C&&!j?C(v,d.encoder,B,"key",D):v);U=""}if(u(U)||e.isBuffer(U)){if(C){var z=j?v:C(v,d.encoder,B,"key",D);return[$(z)+"="+$(C(U,d.encoder,B,"value",D))]}return[$(v)+"="+$(String(U))]}var K=[];if(typeof U>"u")return K;var Z;if(y==="comma"&&r(U))j&&C&&(U=e.maybeMap(U,function(se){return se==null?se:C(se)})),Z=[{value:U.length>0?U.join(",")||null:void 0}];else if(r(M))Z=M;else{var ae=Object.keys(U);Z=k?ae.sort(k):ae}var ce=S?String(v).replace(/\./g,"%2E"):String(v),ve=b&&r(U)&&U.length===1?ce+"[]":ce;if(x&&r(U)&&U.length===0)return ve+"[]";for(var we=0;we<Z.length;++we){var re=Z[we],Ee=typeof re=="object"&&re&&typeof re.value<"u"?re.value:U[re];if(!(E&&Ee===null)){var q=P&&S?String(re).replace(/\./g,"%2E"):String(re),J=r(U)?typeof y=="function"?y(ve,q):ve:ve+(P?"."+q:"["+q+"]");Y.set(g,L);var ie=i();ie.set(h,Y),a(K,m(Ee,J,y,b,x,T,E,S,y==="comma"&&j&&r(U)?null:C,M,k,P,I,D,$,j,B,ie))}}return K},p=function(g){if(!g)return d;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.encodeDotInKeys<"u"&&typeof g.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(g.encoder!==null&&typeof g.encoder<"u"&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=g.charset||d.charset;if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=t.default;if(typeof g.format<"u"){if(!n.call(t.formatters,g.format))throw new TypeError("Unknown format option provided.");y=g.format}var b=t.formatters[y],x=d.filter;(typeof g.filter=="function"||r(g.filter))&&(x=g.filter);var T;if(g.arrayFormat in s?T=g.arrayFormat:"indices"in g?T=g.indices?"indices":"repeat":T=d.arrayFormat,"commaRoundTrip"in g&&typeof g.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var E=typeof g.allowDots>"u"?g.encodeDotInKeys===!0?!0:d.allowDots:!!g.allowDots;return{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:d.addQueryPrefix,allowDots:E,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:T,charset:v,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!g.commaRoundTrip,delimiter:typeof g.delimiter>"u"?d.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:d.encode,encodeDotInKeys:typeof g.encodeDotInKeys=="boolean"?g.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof g.encoder=="function"?g.encoder:d.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:d.encodeValuesOnly,filter:x,format:y,formatter:b,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:d.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:d.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:d.strictNullHandling}};return Df=function(m,g){var v=m,y=p(g),b,x;typeof y.filter=="function"?(x=y.filter,v=x("",v)):r(y.filter)&&(x=y.filter,b=x);var T=[];if(typeof v!="object"||v===null)return"";var E=s[y.arrayFormat],S=E==="comma"&&y.commaRoundTrip;b||(b=Object.keys(v)),y.sort&&b.sort(y.sort);for(var C=i(),M=0;M<b.length;++M){var k=b[M];if(!(typeof k>"u"||k===null)){var P=v[k];y.skipNulls&&P===null||a(T,f(P,k,E,S,y.allowEmptyArrays,y.strictNullHandling,y.skipNulls,y.encodeDotInKeys,y.encode?y.encoder:null,y.filter,y.sort,y.allowDots,y.serializeDate,y.format,y.formatter,y.encodeValuesOnly,y.charset,C))}}var I=T.join(y.delimiter),D=y.addQueryPrefix===!0?"?":"";return y.charsetSentinel&&(y.charset==="iso-8859-1"?D+="utf8=%26%2310003%3B"+y.delimiter:D+="utf8=%E2%9C%93"+y.delimiter),I.length>0?D+I:""},Df}var Of,p0;function ak(){if(p0)return Of;p0=1;var i=kw(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:i.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(f){return f.replace(/&#(\d+);/g,function(p,m){return String.fromCharCode(parseInt(m,10))})},r=function(f,p,m,g){if(f&&typeof f=="string"&&p.comma&&f.indexOf(",")>-1){if(g&&p.throwOnLimitExceeded)for(var v=0,y=f.indexOf(",");y>-1;){if(v+=1,v>=p.arrayLimit)throw new RangeError("Array limit exceeded. Only "+p.arrayLimit+" element"+(p.arrayLimit===1?"":"s")+" allowed in an array.");y=f.indexOf(",",y+1)}return f.split(",")}if(p.throwOnLimitExceeded&&m>=p.arrayLimit)throw new RangeError("Array limit exceeded. Only "+p.arrayLimit+" element"+(p.arrayLimit===1?"":"s")+" allowed in an array.");return f},o="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",c=function(p,m){var g={__proto__:null},v=m.ignoreQueryPrefix?p.replace(/^\?/,""):p;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=m.parameterLimit===1/0?void 0:m.parameterLimit,b=v.split(m.delimiter,m.throwOnLimitExceeded&&typeof y<"u"?y+1:y);if(m.throwOnLimitExceeded&&typeof y<"u"&&b.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var x=-1,T,E=m.charset;if(m.charsetSentinel)for(T=0;T<b.length;++T)b[T].indexOf("utf8=")===0&&(b[T]===a?E="utf-8":b[T]===o&&(E="iso-8859-1"),x=T,T=b.length);for(T=0;T<b.length;++T)if(T!==x){var S=b[T],C=S.indexOf("]="),M=C===-1?S.indexOf("="):C+1,k,P;if(M===-1?(k=m.decoder(S,n.decoder,E,"key"),P=m.strictNullHandling?null:""):(k=m.decoder(S.slice(0,M),n.decoder,E,"key"),k!==null&&(P=i.maybeMap(r(S.slice(M+1),m,t(g[k])?g[k].length:0,S.indexOf("[]=")===-1),function(D){return m.decoder(D,n.decoder,E,"value")}))),P&&m.interpretNumericEntities&&E==="iso-8859-1"&&(P=s(String(P))),S.indexOf("[]=")>-1&&(P=t(P)?[P]:P),m.comma&&t(P)&&P.length>m.arrayLimit&&(P=i.combine([],P,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded)),k!==null){var I=e.call(g,k);I&&(m.duplicates==="combine"||S.indexOf("[]=")>-1)?g[k]=i.combine(g[k],P,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded):(!I||m.duplicates==="last")&&(g[k]=P)}}return g},l=function(f,p,m,g){var v=0;if(f.length>0&&f[f.length-1]==="[]"){var y=f.slice(0,-1).join("");v=Array.isArray(p)&&p[y]?p[y].length:0}for(var b=g?p:r(p,m,v),x=f.length-1;x>=0;--x){var T,E=f[x];if(E==="[]"&&m.parseArrays)i.isOverflow(b)?T=b:T=m.allowEmptyArrays&&(b===""||m.strictNullHandling&&b===null)?[]:i.combine([],b,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded);else{T=m.plainObjects?{__proto__:null}:{};var S=E.charAt(0)==="["&&E.charAt(E.length-1)==="]"?E.slice(1,-1):E,C=m.decodeDotInKeys?S.replace(/%2E/g,"."):S,M=parseInt(C,10),k=!isNaN(M)&&E!==C&&String(M)===C&&M>=0&&m.parseArrays;if(!m.parseArrays&&C==="")T={0:b};else if(k&&M<m.arrayLimit)T=[],T[M]=b;else{if(k&&m.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+m.arrayLimit+" element"+(m.arrayLimit===1?"":"s")+" allowed in an array.");k?(T[M]=b,i.markOverflow(T,M)):C!=="__proto__"&&(T[C]=b)}}b=T}return b},d=function(p,m){var g=m.allowDots?p.replace(/\.([^.[]+)/g,"[$1]"):p;if(m.depth<=0)return!m.plainObjects&&e.call(Object.prototype,g)&&!m.allowPrototypes?void 0:[g];var v=[],y=g.indexOf("["),b=y>=0?g.slice(0,y):g;if(b){if(!m.plainObjects&&e.call(Object.prototype,b)&&!m.allowPrototypes)return;v[v.length]=b}for(var x=g.length,T=y,E=0;T>=0&&E<m.depth;){for(var S=1,C=T+1,M=-1;C<x&&M<0;){var k=g.charCodeAt(C);k===91?S+=1:k===93&&(S-=1,S===0&&(M=C)),C+=1}if(M<0)return v[v.length]="["+g.slice(T)+"]",v;var P=g.slice(T,M+1),I=P.slice(1,-1);if(!m.plainObjects&&e.call(Object.prototype,I)&&!m.allowPrototypes)return;v[v.length]=P,E+=1,T=g.indexOf("[",M+1)}if(T>=0){if(m.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+m.depth+" and strictDepth is true");v[v.length]="["+g.slice(T)+"]"}return v},u=function(p,m,g,v){if(p){var y=d(p,g);if(y)return l(y,m,g,v)}},h=function(p){if(!p)return n;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.decodeDotInKeys<"u"&&typeof p.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(p.decoder!==null&&typeof p.decoder<"u"&&typeof p.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof p.throwOnLimitExceeded<"u"&&typeof p.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof p.charset>"u"?n.charset:p.charset,g=typeof p.duplicates>"u"?n.duplicates:p.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof p.allowDots>"u"?p.decodeDotInKeys===!0?!0:n.allowDots:!!p.allowDots;return{allowDots:v,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof p.allowPrototypes=="boolean"?p.allowPrototypes:n.allowPrototypes,allowSparse:typeof p.allowSparse=="boolean"?p.allowSparse:n.allowSparse,arrayLimit:typeof p.arrayLimit=="number"?p.arrayLimit:n.arrayLimit,charset:m,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:n.charsetSentinel,comma:typeof p.comma=="boolean"?p.comma:n.comma,decodeDotInKeys:typeof p.decodeDotInKeys=="boolean"?p.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof p.decoder=="function"?p.decoder:n.decoder,delimiter:typeof p.delimiter=="string"||i.isRegExp(p.delimiter)?p.delimiter:n.delimiter,depth:typeof p.depth=="number"||p.depth===!1?+p.depth:n.depth,duplicates:g,ignoreQueryPrefix:p.ignoreQueryPrefix===!0,interpretNumericEntities:typeof p.interpretNumericEntities=="boolean"?p.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof p.parameterLimit=="number"?p.parameterLimit:n.parameterLimit,parseArrays:p.parseArrays!==!1,plainObjects:typeof p.plainObjects=="boolean"?p.plainObjects:n.plainObjects,strictDepth:typeof p.strictDepth=="boolean"?!!p.strictDepth:n.strictDepth,strictMerge:typeof p.strictMerge=="boolean"?!!p.strictMerge:n.strictMerge,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:typeof p.throwOnLimitExceeded=="boolean"?p.throwOnLimitExceeded:!1}};return Of=function(f,p){var m=h(p);if(f===""||f===null||typeof f>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof f=="string"?c(f,m):f,v=m.plainObjects?{__proto__:null}:{},y=Object.keys(g),b=0;b<y.length;++b){var x=y[b],T=u(x,g[x],m,typeof f=="string");v=i.merge(v,T,m)}return m.allowSparse===!0?v:i.compact(v)},Of}var Nf,m0;function lk(){if(m0)return Nf;m0=1;var i=ok(),e=ak(),t=Dg();return Nf={formats:t,parse:e,stringify:i},Nf}var g0;function ck(){if(g0)return vo;g0=1;var i=IP();function e(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var t=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,r=["<",">",'"',"`"," ","\r",`
|
||
`," "],o=["{","}","|","\\","^","`"].concat(r),a=["'"].concat(o),c=["%","/","?",";","#"].concat(a),l=["/","?","#"],d=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=lk();function v(T,E,S){if(T&&typeof T=="object"&&T instanceof e)return T;var C=new e;return C.parse(T,E,S),C}e.prototype.parse=function(T,E,S){if(typeof T!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof T);var C=T.indexOf("?"),M=C!==-1&&C<T.indexOf("#")?"?":"#",k=T.split(M),P=/\\/g;k[0]=k[0].replace(P,"/"),T=k.join(M);var I=T;if(I=I.trim(),!S&&T.split("#").length===1){var D=s.exec(I);if(D)return this.path=I,this.href=I,this.pathname=D[1],D[2]?(this.search=D[2],E?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):E&&(this.search="",this.query={}),this}var $=t.exec(I);if($){$=$[0];var j=$.toLowerCase();this.protocol=j,I=I.substr($.length)}if(S||$||I.match(/^\/\/[^@/]+@[^@/]+/)){var B=I.substr(0,2)==="//";B&&!($&&p[$])&&(I=I.substr(2),this.slashes=!0)}if(!p[$]&&(B||$&&!m[$])){for(var Y=-1,U=0;U<l.length;U++){var O=I.indexOf(l[U]);O!==-1&&(Y===-1||O<Y)&&(Y=O)}var L,R;Y===-1?R=I.lastIndexOf("@"):R=I.lastIndexOf("@",Y),R!==-1&&(L=I.slice(0,R),I=I.slice(R+1),this.auth=decodeURIComponent(L)),Y=-1;for(var U=0;U<c.length;U++){var O=I.indexOf(c[U]);O!==-1&&(Y===-1||O<Y)&&(Y=O)}Y===-1&&(Y=I.length),this.host=I.slice(0,Y),I=I.slice(Y),this.parseHost(),this.hostname=this.hostname||"";var X=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!X)for(var z=this.hostname.split(/\./),U=0,K=z.length;U<K;U++){var Z=z[U];if(Z&&!Z.match(u)){for(var ae="",ce=0,ve=Z.length;ce<ve;ce++)Z.charCodeAt(ce)>127?ae+="x":ae+=Z[ce];if(!ae.match(u)){var we=z.slice(0,U),re=z.slice(U+1),Ee=Z.match(h);Ee&&(we.push(Ee[1]),re.unshift(Ee[2])),re.length&&(I="/"+re.join(".")+I),this.hostname=we.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),X||(this.hostname=i.toASCII(this.hostname));var q=this.port?":"+this.port:"",J=this.hostname||"";this.host=J+q,this.href+=this.host,X&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),I[0]!=="/"&&(I="/"+I))}if(!f[j])for(var U=0,K=a.length;U<K;U++){var ie=a[U];if(I.indexOf(ie)!==-1){var se=encodeURIComponent(ie);se===ie&&(se=escape(ie)),I=I.split(ie).join(se)}}var H=I.indexOf("#");H!==-1&&(this.hash=I.substr(H),I=I.slice(0,H));var G=I.indexOf("?");if(G!==-1?(this.search=I.substr(G),this.query=I.substr(G+1),E&&(this.query=g.parse(this.query)),I=I.slice(0,G)):E&&(this.search="",this.query={}),I&&(this.pathname=I),m[j]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",N=this.search||"";this.path=q+N}return this.href=this.format(),this};function y(T){return typeof T=="string"&&(T=v(T)),T instanceof e?T.format():e.prototype.format.call(T)}e.prototype.format=function(){var T=this.auth||"";T&&(T=encodeURIComponent(T),T=T.replace(/%3A/i,":"),T+="@");var E=this.protocol||"",S=this.pathname||"",C=this.hash||"",M=!1,k="";this.host?M=T+this.host:this.hostname&&(M=T+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(M+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(k=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var P=this.search||k&&"?"+k||"";return E&&E.substr(-1)!==":"&&(E+=":"),this.slashes||(!E||m[E])&&M!==!1?(M="//"+(M||""),S&&S.charAt(0)!=="/"&&(S="/"+S)):M||(M=""),C&&C.charAt(0)!=="#"&&(C="#"+C),P&&P.charAt(0)!=="?"&&(P="?"+P),S=S.replace(/[?#]/g,function(I){return encodeURIComponent(I)}),P=P.replace("#","%23"),E+M+S+P+C};function b(T,E){return v(T,!1,!0).resolve(E)}e.prototype.resolve=function(T){return this.resolveObject(v(T,!1,!0)).format()};function x(T,E){return T?v(T,!1,!0).resolveObject(E):E}return e.prototype.resolveObject=function(T){if(typeof T=="string"){var E=new e;E.parse(T,!1,!0),T=E}for(var S=new e,C=Object.keys(this),M=0;M<C.length;M++){var k=C[M];S[k]=this[k]}if(S.hash=T.hash,T.href==="")return S.href=S.format(),S;if(T.slashes&&!T.protocol){for(var P=Object.keys(T),I=0;I<P.length;I++){var D=P[I];D!=="protocol"&&(S[D]=T[D])}return m[S.protocol]&&S.hostname&&!S.pathname&&(S.pathname="/",S.path=S.pathname),S.href=S.format(),S}if(T.protocol&&T.protocol!==S.protocol){if(!m[T.protocol]){for(var $=Object.keys(T),j=0;j<$.length;j++){var B=$[j];S[B]=T[B]}return S.href=S.format(),S}if(S.protocol=T.protocol,!T.host&&!p[T.protocol]){for(var K=(T.pathname||"").split("/");K.length&&!(T.host=K.shift()););T.host||(T.host=""),T.hostname||(T.hostname=""),K[0]!==""&&K.unshift(""),K.length<2&&K.unshift(""),S.pathname=K.join("/")}else S.pathname=T.pathname;if(S.search=T.search,S.query=T.query,S.host=T.host||"",S.auth=T.auth,S.hostname=T.hostname||T.host,S.port=T.port,S.pathname||S.search){var Y=S.pathname||"",U=S.search||"";S.path=Y+U}return S.slashes=S.slashes||T.slashes,S.href=S.format(),S}var O=S.pathname&&S.pathname.charAt(0)==="/",L=T.host||T.pathname&&T.pathname.charAt(0)==="/",R=L||O||S.host&&T.pathname,X=R,z=S.pathname&&S.pathname.split("/")||[],K=T.pathname&&T.pathname.split("/")||[],Z=S.protocol&&!m[S.protocol];if(Z&&(S.hostname="",S.port=null,S.host&&(z[0]===""?z[0]=S.host:z.unshift(S.host)),S.host="",T.protocol&&(T.hostname=null,T.port=null,T.host&&(K[0]===""?K[0]=T.host:K.unshift(T.host)),T.host=null),R=R&&(K[0]===""||z[0]==="")),L)S.host=T.host||T.host===""?T.host:S.host,S.hostname=T.hostname||T.hostname===""?T.hostname:S.hostname,S.search=T.search,S.query=T.query,z=K;else if(K.length)z||(z=[]),z.pop(),z=z.concat(K),S.search=T.search,S.query=T.query;else if(T.search!=null){if(Z){S.host=z.shift(),S.hostname=S.host;var ae=S.host&&S.host.indexOf("@")>0?S.host.split("@"):!1;ae&&(S.auth=ae.shift(),S.hostname=ae.shift(),S.host=S.hostname)}return S.search=T.search,S.query=T.query,(S.pathname!==null||S.search!==null)&&(S.path=(S.pathname?S.pathname:"")+(S.search?S.search:"")),S.href=S.format(),S}if(!z.length)return S.pathname=null,S.search?S.path="/"+S.search:S.path=null,S.href=S.format(),S;for(var ce=z.slice(-1)[0],ve=(S.host||T.host||z.length>1)&&(ce==="."||ce==="..")||ce==="",we=0,re=z.length;re>=0;re--)ce=z[re],ce==="."?z.splice(re,1):ce===".."?(z.splice(re,1),we++):we&&(z.splice(re,1),we--);if(!R&&!X)for(;we--;we)z.unshift("..");R&&z[0]!==""&&(!z[0]||z[0].charAt(0)!=="/")&&z.unshift(""),ve&&z.join("/").substr(-1)!=="/"&&z.push("");var Ee=z[0]===""||z[0]&&z[0].charAt(0)==="/";if(Z){S.hostname=Ee?"":z.length?z.shift():"",S.host=S.hostname;var ae=S.host&&S.host.indexOf("@")>0?S.host.split("@"):!1;ae&&(S.auth=ae.shift(),S.hostname=ae.shift(),S.host=S.hostname)}return R=R||S.host&&z.length,R&&!Ee&&z.unshift(""),z.length>0?S.pathname=z.join("/"):(S.pathname=null,S.path=null),(S.pathname!==null||S.search!==null)&&(S.path=(S.pathname?S.pathname:"")+(S.search?S.search:"")),S.auth=T.auth||S.auth,S.slashes=S.slashes||T.slashes,S.href=S.format(),S},e.prototype.parseHost=function(){var T=this.host,E=n.exec(T);E&&(E=E[0],E!==":"&&(this.port=E.substr(1)),T=T.substr(0,T.length-E.length)),T&&(this.hostname=T)},vo.parse=v,vo.resolve=b,vo.resolveObject=x,vo.format=y,vo.Url=e,vo}ck();const v0={};function yt(i,e,t=3){if(v0[e])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
|
||
Deprecated since v${i}`):(n=n.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${i}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
|
||
Deprecated since v${i}`),console.warn(n))),v0[e]=!0}function Xi(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function gl(i){return i.split("?")[0].split("#")[0]}function dk(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uk(i,e,t){return i.replace(new RegExp(dk(e),"g"),t)}function hk(i,e){let t="",n=0,s=-1,r=0,o=-1;for(let a=0;a<=i.length;++a){if(a<i.length)o=i.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||r===1))if(s!==a-1&&r===2){if(t.length<2||n!==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="",n=0):(t=t.slice(0,c),n=t.length-1-t.lastIndexOf("/")),s=a,r=0;continue}}else if(t.length===2||t.length===1){t="",n=0,s=a,r=0;continue}}}else t.length>0?t+=`/${i.slice(s+1,a)}`:t=i.slice(s+1,a),n=a-s-1;s=a,r=0}else o===46&&r!==-1?++r:r=-1}return t}const pn={toPosix(i){return uk(i,"\\","/")},isUrl(i){return/^https?:/.test(this.toPosix(i))},isDataUrl(i){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(i)},isBlobUrl(i){return i.startsWith("blob:")},hasProtocol(i){return/^[^/:]+:/.test(this.toPosix(i))},getProtocol(i){Xi(i),i=this.toPosix(i);const e=/^file:\/\/\//.exec(i);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(i);return t?t[0]:""},toAbsolute(i,e,t){if(Xi(i),this.isDataUrl(i)||this.isBlobUrl(i))return i;const n=gl(this.toPosix(e??Xe.ADAPTER.getBaseUrl())),s=gl(this.toPosix(t??this.rootname(n)));return i=this.toPosix(i),i.startsWith("/")?pn.join(s,i.slice(1)):this.isAbsolute(i)?i:this.join(n,i)},normalize(i){if(Xi(i),i.length===0)return".";if(this.isDataUrl(i)||this.isBlobUrl(i))return i;i=this.toPosix(i);let e="";const t=i.startsWith("/");this.hasProtocol(i)&&(e=this.rootname(i),i=i.slice(e.length));const n=i.endsWith("/");return i=hk(i),i.length>0&&n&&(i+="/"),t?`/${i}`:e+i},isAbsolute(i){return Xi(i),i=this.toPosix(i),this.hasProtocol(i)?!0:i.startsWith("/")},join(...i){if(i.length===0)return".";let e;for(let t=0;t<i.length;++t){const n=i[t];if(Xi(n),n.length>0)if(e===void 0)e=n;else{const s=i[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${n}`:e+=`/${n}`}}return e===void 0?".":this.normalize(e)},dirname(i){if(Xi(i),i.length===0)return".";i=this.toPosix(i);let e=i.charCodeAt(0);const t=e===47;let n=-1,s=!0;const r=this.getProtocol(i),o=i;i=i.slice(r.length);for(let a=i.length-1;a>=1;--a)if(e=i.charCodeAt(a),e===47){if(!s){n=a;break}}else s=!1;return n===-1?t?"/":this.isUrl(o)?r+i:r:t&&n===1?"//":r+i.slice(0,n)},rootname(i){Xi(i),i=this.toPosix(i);let e="";if(i.startsWith("/")?e="/":e=this.getProtocol(i),this.isUrl(i)){const t=i.indexOf("/",e.length);t!==-1?e=i.slice(0,t):e=i,e.endsWith("/")||(e+="/")}return e},basename(i,e){Xi(i),e&&Xi(e),i=gl(this.toPosix(i));let t=0,n=-1,s=!0,r;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e.length===i.length&&e===i)return"";let o=e.length-1,a=-1;for(r=i.length-1;r>=0;--r){const c=i.charCodeAt(r);if(c===47){if(!s){t=r+1;break}}else a===-1&&(s=!1,a=r+1),o>=0&&(c===e.charCodeAt(o)?--o===-1&&(n=r):(o=-1,n=a))}return t===n?n=a:n===-1&&(n=i.length),i.slice(t,n)}for(r=i.length-1;r>=0;--r)if(i.charCodeAt(r)===47){if(!s){t=r+1;break}}else n===-1&&(s=!1,n=r+1);return n===-1?"":i.slice(t,n)},extname(i){Xi(i),i=gl(this.toPosix(i));let e=-1,t=0,n=-1,s=!0,r=0;for(let o=i.length-1;o>=0;--o){const a=i.charCodeAt(o);if(a===47){if(!s){t=o+1;break}continue}n===-1&&(s=!1,n=o+1),a===46?e===-1?e=o:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||n===-1||r===0||r===1&&e===n-1&&e===t+1?"":i.slice(e,n)},parse(i){Xi(i);const e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;i=gl(this.toPosix(i));let t=i.charCodeAt(0);const n=this.isAbsolute(i);let s;e.root=this.rootname(i),n||this.hasProtocol(i)?s=1:s=0;let r=-1,o=0,a=-1,c=!0,l=i.length-1,d=0;for(;l>=s;--l){if(t=i.charCodeAt(l),t===47){if(!c){o=l+1;break}continue}a===-1&&(c=!1,a=l+1),t===46?r===-1?r=l:d!==1&&(d=1):r!==-1&&(d=-1)}return r===-1||a===-1||d===0||d===1&&r===a-1&&r===o+1?a!==-1&&(o===0&&n?e.base=e.name=i.slice(1,a):e.base=e.name=i.slice(o,a)):(o===0&&n?(e.name=i.slice(1,r),e.base=i.slice(1,a)):(e.name=i.slice(o,r),e.base=i.slice(o,a)),e.ext=i.slice(r,a)),e.dir=this.dirname(i),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let $f;async function fk(){return $f??($f=(async()=>{var r;const i=document.createElement("canvas").getContext("webgl");if(!i)return Fn.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,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!e)return Fn.UNPACK;const t=i.createTexture();i.bindTexture(i.TEXTURE_2D,t);const n=i.createFramebuffer();i.bindFramebuffer(i.FRAMEBUFFER,n),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,t,0),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,i.NONE),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e);const s=new Uint8Array(4);return i.readPixels(0,0,1,1,i.RGBA,i.UNSIGNED_BYTE,s),i.deleteFramebuffer(n),i.deleteTexture(t),(r=i.getExtension("WEBGL_lose_context"))==null||r.loseContext(),s[0]<=s[3]?Fn.PMA:Fn.UNPACK})()),$f}let Bf;function pk(){return typeof Bf>"u"&&(Bf=(function(){var e;const i={stencil:!0,failIfMajorPerformanceCaveat:Xe.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Xe.ADAPTER.getWebGLRenderingContext())return!1;const t=Xe.ADAPTER.createCanvas();let n=t.getContext("webgl",i)||t.getContext("experimental-webgl",i);const s=!!((e=n==null?void 0:n.getContextAttributes())!=null&&e.stencil);if(n){const r=n.getExtension("WEBGL_lose_context");r&&r.loseContext()}return n=null,s}catch{return!1}})()),Bf}var mk={grad:.9,turn:360,rad:360/(2*Math.PI)},zs=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},In=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},Oi=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},Iw=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},b0=function(i){return{r:Oi(i.r,0,255),g:Oi(i.g,0,255),b:Oi(i.b,0,255),a:Oi(i.a)}},Uf=function(i){return{r:In(i.r),g:In(i.g),b:In(i.b),a:In(i.a,3)}},gk=/^#([0-9a-f]{3,8})$/i,Xc=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},Rw=function(i){var e=i.r,t=i.g,n=i.b,s=i.a,r=Math.max(e,t,n),o=r-Math.min(e,t,n),a=o?r===e?(t-n)/o:r===t?2+(n-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:r?o/r*100:0,v:r/255*100,a:s}},Fw=function(i){var e=i.h,t=i.s,n=i.v,s=i.a;e=e/360*6,t/=100,n/=100;var r=Math.floor(e),o=n*(1-t),a=n*(1-(e-r)*t),c=n*(1-(1-e+r)*t),l=r%6;return{r:255*[n,a,o,o,c,n][l],g:255*[c,n,n,a,o,o][l],b:255*[o,o,c,n,n,a][l],a:s}},y0=function(i){return{h:Iw(i.h),s:Oi(i.s,0,100),l:Oi(i.l,0,100),a:Oi(i.a)}},x0=function(i){return{h:In(i.h),s:In(i.s),l:In(i.l),a:In(i.a,3)}},w0=function(i){return Fw((t=(e=i).s,{h:e.h,s:(t*=((n=e.l)<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}));var e,t,n},Bl=function(i){return{h:(e=Rw(i)).h,s:(s=(200-(t=e.s))*(n=e.v)/100)>0&&s<200?t*n/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,n,s},vk=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bk=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yk=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xk=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jp={string:[[function(i){var e=gk.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?In(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?In(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=yk.exec(i)||xk.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:b0({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=vk.exec(i)||bk.exec(i);if(!e)return null;var t,n,s=y0({h:(t=e[1],n=e[2],n===void 0&&(n="deg"),Number(t)*(mk[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return w0(s)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,n=i.b,s=i.a,r=s===void 0?1:s;return zs(e)&&zs(t)&&zs(n)?b0({r:Number(e),g:Number(t),b:Number(n),a:Number(r)}):null},"rgb"],[function(i){var e=i.h,t=i.s,n=i.l,s=i.a,r=s===void 0?1:s;if(!zs(e)||!zs(t)||!zs(n))return null;var o=y0({h:Number(e),s:Number(t),l:Number(n),a:Number(r)});return w0(o)},"hsl"],[function(i){var e=i.h,t=i.s,n=i.v,s=i.a,r=s===void 0?1:s;if(!zs(e)||!zs(t)||!zs(n))return null;var o=(function(a){return{h:Iw(a.h),s:Oi(a.s,0,100),v:Oi(a.v,0,100),a:Oi(a.a)}})({h:Number(e),s:Number(t),v:Number(n),a:Number(r)});return Fw(o)},"hsv"]]},S0=function(i,e){for(var t=0;t<e.length;t++){var n=e[t][0](i);if(n)return[n,e[t][1]]}return[null,void 0]},wk=function(i){return typeof i=="string"?S0(i.trim(),jp.string):typeof i=="object"&&i!==null?S0(i,jp.object):[null,void 0]},Vf=function(i,e){var t=Bl(i);return{h:t.h,s:Oi(t.s+100*e,0,100),l:t.l,a:t.a}},Xf=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},C0=function(i,e){var t=Bl(i);return{h:t.h,s:t.s,l:Oi(t.l+100*e,0,100),a:t.a}},Hp=(function(){function i(e){this.parsed=wk(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return In(Xf(this.rgba),2)},i.prototype.isDark=function(){return Xf(this.rgba)<.5},i.prototype.isLight=function(){return Xf(this.rgba)>=.5},i.prototype.toHex=function(){return e=Uf(this.rgba),t=e.r,n=e.g,s=e.b,o=(r=e.a)<1?Xc(In(255*r)):"","#"+Xc(t)+Xc(n)+Xc(s)+o;var e,t,n,s,r,o},i.prototype.toRgb=function(){return Uf(this.rgba)},i.prototype.toRgbString=function(){return e=Uf(this.rgba),t=e.r,n=e.g,s=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+s+", "+r+")":"rgb("+t+", "+n+", "+s+")";var e,t,n,s,r},i.prototype.toHsl=function(){return x0(Bl(this.rgba))},i.prototype.toHslString=function(){return e=x0(Bl(this.rgba)),t=e.h,n=e.s,s=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+s+"%, "+r+")":"hsl("+t+", "+n+"%, "+s+"%)";var e,t,n,s,r},i.prototype.toHsv=function(){return e=Rw(this.rgba),{h:In(e.h),s:In(e.s),v:In(e.v),a:In(e.a,3)};var e},i.prototype.invert=function(){return hs({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),hs(Vf(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),hs(Vf(this.rgba,-e))},i.prototype.grayscale=function(){return hs(Vf(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),hs(C0(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),hs(C0(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?hs({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):In(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Bl(this.rgba);return typeof e=="number"?hs({h:e,s:t.s,l:t.l,a:t.a}):In(t.h)},i.prototype.isEqual=function(e){return this.toHex()===hs(e).toHex()},i})(),hs=function(i){return i instanceof Hp?i:new Hp(i)},A0=[],Sk=function(i){i.forEach(function(e){A0.indexOf(e)<0&&(e(Hp,jp),A0.push(e))})};function Ck(i,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var s in t)n[t[s]]=s;var r={};i.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,l=n[this.toHex()];if(l)return l;if(o!=null&&o.closest){var d=this.toRgb(),u=1/0,h="black";if(!r.length)for(var f in t)r[f]=new i(t[f]).toRgb();for(var p in t){var m=(a=d,c=r[p],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));m<u&&(u=m,h=p)}return h}},e.string.push([function(o){var a=o.toLowerCase(),c=a==="transparent"?"#0000":t[a];return c?new i(c).toRgb():null},"name"])}Sk([Ck]);const ga=class _d{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof _d)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const n=typeof e;if(n!==typeof t)return!1;if(n==="number"||n==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((s,r)=>s===t[r]);if(e!==null&&t!==null){const s=Object.keys(e),r=Object.keys(t);return s.length!==r.length?!1:s.every(o=>e[o]===t[o])}return e===t}toRgba(){const[e,t,n,s]=this._components;return{r:e,g:t,b:n,a:s}}toRgb(){const[e,t,n]=this._components;return{r:e,g:t,b:n}}toRgbaString(){const[e,t,n]=this.toUint8RgbArray();return`rgba(${e},${t},${n},${this.alpha})`}toUint8RgbArray(e){const[t,n,s]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(n*255),e[2]=Math.round(s*255),e}toRgbArray(e){e=e??[];const[t,n,s]=this._components;return e[0]=t,e[1]=n,e[2]=s,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,n,s,r]=_d.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=n,this._components[2]*=s,this._components[3]*=r,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let n=this._int>>16&255,s=this._int>>8&255,r=this._int&255;return t&&(n=n*e+.5|0,s=s*e+.5|0,r=r*e+.5|0),(e*255<<24)+(n<<16)+(s<<8)+r}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,n,s]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(n*e)/e,this._components[2]=Math.round(s*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,n,s,r]=this._components;return e[0]=t,e[1]=n,e[2]=s,e[3]=r,e}normalize(e){let t,n,s,r;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;t=(o>>16&255)/255,n=(o>>8&255)/255,s=(o&255)/255,r=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,n,s,r=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,n,s,r=255]=e,t/=255,n/=255,s/=255,r/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const a=_d.HEX_PATTERN.exec(e);a&&(e=`#${a[2]}`)}const o=hs(e);o.isValid()&&({r:t,g:n,b:s,a:r}=o.rgba,t/=255,n/=255,s/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=n,this._components[2]=s,this._components[3]=r,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,n]=this._components;this._int=(e*255<<16)+(t*255<<8)+(n*255|0)}_clamp(e,t=0,n=1){return typeof e=="number"?Math.min(Math.max(e,t),n):(e.forEach((s,r)=>{e[r]=Math.min(Math.max(s,t),n)}),e)}};ga.shared=new ga,ga.temp=new ga,ga.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Ot=ga;function Ak(i){return yt("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),Ot.shared.setValue(i).toHex()}function Tk(i){return yt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Ot.shared.setValue(i).toNumber()}function Ek(){const i=[],e=[];for(let n=0;n<32;n++)i[n]=n,e[n]=n;i[Qe.NORMAL_NPM]=Qe.NORMAL,i[Qe.ADD_NPM]=Qe.ADD,i[Qe.SCREEN_NPM]=Qe.SCREEN,e[Qe.NORMAL]=Qe.NORMAL_NPM,e[Qe.ADD]=Qe.ADD_NPM,e[Qe.SCREEN]=Qe.SCREEN_NPM;const t=[];return t.push(e),t.push(i),t}const Lw=Ek();function Dw(i,e){return Lw[e?1:0][i]}function _k(i,e=null){const t=i*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let n=0,s=0;n<t;n+=6,s+=4)e[n+0]=s+0,e[n+1]=s+1,e[n+2]=s+2,e[n+3]=s+0,e[n+4]=s+2,e[n+5]=s+3;return e}function Ow(i){if(i.BYTES_PER_ELEMENT===4)return i instanceof Float32Array?"Float32Array":i instanceof Uint32Array?"Uint32Array":"Int32Array";if(i.BYTES_PER_ELEMENT===2){if(i instanceof Uint16Array)return"Uint16Array"}else if(i.BYTES_PER_ELEMENT===1&&i instanceof Uint8Array)return"Uint8Array";return null}function eu(i){return i+=i===0?1:0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1}function T0(i){return!(i&i-1)&&!!i}function E0(i){let e=(i>65535?1:0)<<4;i>>>=e;let t=(i>255?1:0)<<3;return i>>>=t,e|=t,t=(i>15?1:0)<<2,i>>>=t,e|=t,t=(i>3?1:0)<<1,i>>>=t,e|=t,e|i>>1}function Fa(i,e,t){const n=i.length;let s;if(e>=n||t===0)return;t=e+t>n?n-e:t;const r=n-t;for(s=e;s<r;++s)i[s]=i[s+t];i.length=r}function Gr(i){return i===0?0:i<0?-1:1}let Mk=0;function zo(){return++Mk}const Gp=class{constructor(i,e,t,n){this.left=i,this.top=e,this.right=t,this.bottom=n}get width(){return this.right-this.left}get height(){return this.bottom-this.top}isEmpty(){return this.left===this.right||this.top===this.bottom}};Gp.EMPTY=new Gp(0,0,0,0);let _0=Gp;const M0={},fs=Object.create(null),Mr=Object.create(null);class Pk{constructor(e,t,n){this._canvas=Xe.ADAPTER.createCanvas(),this._context=this._canvas.getContext("2d"),this.resolution=n||Xe.RESOLUTION,this.resize(e,t)}clear(){this._checkDestroyed(),this._context.setTransform(1,0,0,1,0,0),this._context.clearRect(0,0,this._canvas.width,this._canvas.height)}resize(e,t){this._checkDestroyed(),this._canvas.width=Math.round(e*this.resolution),this._canvas.height=Math.round(t*this.resolution)}destroy(){this._context=null,this._canvas=null}get width(){return this._checkDestroyed(),this._canvas.width}set width(e){this._checkDestroyed(),this._canvas.width=Math.round(e)}get height(){return this._checkDestroyed(),this._canvas.height}set height(e){this._checkDestroyed(),this._canvas.height=Math.round(e)}get canvas(){return this._checkDestroyed(),this._canvas}get context(){return this._checkDestroyed(),this._context}_checkDestroyed(){if(this._canvas===null)throw new TypeError("The CanvasRenderTarget has already been destroyed")}}function P0(i,e,t){for(let n=0,s=4*t*e;n<e;++n,s+=4)if(i[s+3]!==0)return!1;return!0}function k0(i,e,t,n,s){const r=4*e;for(let o=n,a=n*r+4*t;o<=s;++o,a+=r)if(i[a+3]!==0)return!1;return!0}function kk(i){const{width:e,height:t}=i,n=i.getContext("2d",{willReadFrequently:!0});if(n===null)throw new TypeError("Failed to get canvas 2D context");const s=n.getImageData(0,0,e,t).data;let r=0,o=0,a=e-1,c=t-1;for(;o<t&&P0(s,e,o);)++o;if(o===t)return _0.EMPTY;for(;P0(s,e,c);)--c;for(;k0(s,e,r,o,c);)++r;for(;k0(s,e,a,o,c);)--a;return++a,++c,new _0(r,o,a,c)}function Ik(i){const e=kk(i),{width:t,height:n}=e;let s=null;if(!e.isEmpty()){const r=i.getContext("2d");if(r===null)throw new TypeError("Failed to get canvas 2D context");s=r.getImageData(e.left,e.top,t,n)}return{width:t,height:n,data:s}}function Rk(i,e=globalThis.location){if(i.startsWith("data:"))return"";e=e||globalThis.location;const t=new URL(i,document.baseURI);return t.hostname!==e.hostname||t.port!==e.port||t.protocol!==e.protocol?"anonymous":""}function br(i,e=1){var n;const t=(n=Xe.RETINA_PREFIX)==null?void 0:n.exec(i);return t?parseFloat(t[1]):e}var $e=(i=>(i.Renderer="renderer",i.Application="application",i.RendererSystem="renderer-webgl-system",i.RendererPlugin="renderer-webgl-plugin",i.CanvasRendererSystem="renderer-canvas-system",i.CanvasRendererPlugin="renderer-canvas-plugin",i.Asset="asset",i.LoadParser="load-parser",i.ResolveParser="resolve-parser",i.CacheParser="cache-parser",i.DetectionParser="detection-parser",i))($e||{});const Wp=i=>{if(typeof i=="function"||typeof i=="object"&&i.extension){if(!i.extension)throw new Error("Extension class must have an extension object");i={...typeof i.extension!="object"?{type:i.extension}:i.extension,ref:i}}if(typeof i=="object")i={...i};else throw new Error("Invalid extension type");return typeof i.type=="string"&&(i.type=[i.type]),i},I0=(i,e)=>Wp(i).priority??e,He={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...i){return i.map(Wp).forEach(e=>{e.type.forEach(t=>{var n,s;return(s=(n=this._removeHandlers)[t])==null?void 0:s.call(n,e)})}),this},add(...i){return i.map(Wp).forEach(e=>{e.type.forEach(t=>{var r,o;const n=this._addHandlers,s=this._queue;n[t]?(r=n[t])==null||r.call(n,e):(s[t]=s[t]||[],(o=s[t])==null||o.push(e))})}),this},handle(i,e,t){var o;const n=this._addHandlers,s=this._removeHandlers;if(n[i]||s[i])throw new Error(`Extension type ${i} already has a handler`);n[i]=e,s[i]=t;const r=this._queue;return r[i]&&((o=r[i])==null||o.forEach(a=>e(a)),delete r[i]),this},handleByMap(i,e){return this.handle(i,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByList(i,e,t=-1){return this.handle(i,n=>{e.includes(n.ref)||(e.push(n.ref),e.sort((s,r)=>I0(r,t)-I0(s,t)))},n=>{const s=e.indexOf(n.ref);s!==-1&&e.splice(s,1)})}};class qp{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const Fk=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
||
`);function Lk(i){let e="";for(let t=0;t<i;++t)t>0&&(e+=`
|
||
else `),t<i-1&&(e+=`if(test == ${t}.0){}`);return e}function Dk(i,e){if(i===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const n=Fk.replace(/%forloop%/gi,Lk(i));if(e.shaderSource(t,n),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))i=i/2|0;else break}return i}const Yf=0,zf=1,jf=2,Hf=3,Gf=4,Wf=5;class $s{constructor(){this.data=0,this.blendMode=Qe.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Yf)}set blend(e){!!(this.data&1<<Yf)!==e&&(this.data^=1<<Yf)}get offsets(){return!!(this.data&1<<zf)}set offsets(e){!!(this.data&1<<zf)!==e&&(this.data^=1<<zf)}get culling(){return!!(this.data&1<<jf)}set culling(e){!!(this.data&1<<jf)!==e&&(this.data^=1<<jf)}get depthTest(){return!!(this.data&1<<Hf)}set depthTest(e){!!(this.data&1<<Hf)!==e&&(this.data^=1<<Hf)}get depthMask(){return!!(this.data&1<<Wf)}set depthMask(e){!!(this.data&1<<Wf)!==e&&(this.data^=1<<Wf)}get clockwiseFrontFace(){return!!(this.data&1<<Gf)}set clockwiseFrontFace(e){!!(this.data&1<<Gf)!==e&&(this.data^=1<<Gf)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==Qe.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new $s;return e.depthTest=!1,e.blend=!0,e}}$s.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const Kp=[];function Nw(i,e){if(!i)return null;let t="";if(typeof i=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(i);n&&(t=n[1].toLowerCase())}for(let n=Kp.length-1;n>=0;--n){const s=Kp[n];if(s.test&&s.test(i,t))return new s(i,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class ns{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,n,s,r,o,a,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:d}=this;this._aliasCount++;for(let u=0,h=d.length;u<h;u++)d[u][l](e,t,n,s,r,o,a,c);return d===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(ns.prototype,{dispatch:{value:ns.prototype.emit},run:{value:ns.prototype.emit}});class rc{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new ns("setRealSize"),this.onUpdate=new ns("update"),this.onError=new ns("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,n){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 lh extends rc{constructor(e,t){const{width:n,height:s}=t||{};if(!n||!s)throw new Error("BufferResource width or height invalid");super(n,s),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,n){const s=e.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Fn.UNPACK);const r=t.realWidth,o=t.realHeight;return n.width===r&&n.height===o?s.texSubImage2D(t.target,0,0,0,r,o,t.format,n.type,this.data):(n.width=r,n.height=o,s.texImage2D(t.target,0,n.internalFormat,r,o,0,t.format,n.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 Ok={scaleMode:Ki.NEAREST,alphaMode:Fn.NPM},Jp=class va extends Cc{constructor(e=null,t=null){super(),t=Object.assign({},va.defaultOptions,t);const{alphaMode:n,mipmap:s,anisotropicLevel:r,scaleMode:o,width:a,height:c,wrapMode:l,format:d,type:u,target:h,resolution:f,resourceOptions:p}=t;e&&!(e instanceof rc)&&(e=Nw(e,p),e.internal=!0),this.resolution=f||Xe.RESOLUTION,this.width=Math.round((a||0)*this.resolution)/this.resolution,this.height=Math.round((c||0)*this.resolution)/this.resolution,this._mipmap=s,this.anisotropicLevel=r,this._wrapMode=l,this._scaleMode=o,this.format=d,this.type=u,this.target=h,this.alphaMode=n,this.uid=zo(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&c>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this}setSize(e,t,n){return n=n||this.resolution,this.setRealSize(e*n,t*n,n)}setRealSize(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=T0(this.realWidth)&&T0(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Mr[this.cacheId],delete fs[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),va.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,n=Xe.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let r=null;if(s)r=e;else{if(!e._pixiId){const a=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${a}_${zo()}`}r=e._pixiId}let o=Mr[r];if(s&&n&&!o)throw new Error(`The cacheId "${r}" does not exist in BaseTextureCache.`);return o||(o=new va(e,t),o.cacheId=r,va.addToCache(o,r)),o}static fromBuffer(e,t,n,s){e=e||new Float32Array(t*n*4);const r=new lh(e,{width:t,height:n,...s==null?void 0:s.resourceOptions});let o,a;return e instanceof Float32Array?(o=Ie.RGBA,a=je.FLOAT):e instanceof Int32Array?(o=Ie.RGBA_INTEGER,a=je.INT):e instanceof Uint32Array?(o=Ie.RGBA_INTEGER,a=je.UNSIGNED_INT):e instanceof Int16Array?(o=Ie.RGBA_INTEGER,a=je.SHORT):e instanceof Uint16Array?(o=Ie.RGBA_INTEGER,a=je.UNSIGNED_SHORT):e instanceof Int8Array?(o=Ie.RGBA,a=je.BYTE):(o=Ie.RGBA,a=je.UNSIGNED_BYTE),r.internal=!0,new va(r,Object.assign({},Ok,{type:a,format:o},s))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Mr[t]&&Mr[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Mr[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Mr[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Mr[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete Mr[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};Jp.defaultOptions={mipmap:Bi.POW2,anisotropicLevel:0,scaleMode:Ki.LINEAR,wrapMode:ts.CLAMP,alphaMode:Fn.UNPACK,target:Ra.TEXTURE_2D,format:Ie.RGBA,type:je.UNSIGNED_BYTE},Jp._globalBatch=0;let st=Jp;class Zp{constructor(){this.texArray=null,this.blend=0,this.type=Ps.TRIANGLES,this.start=0,this.size=0,this.data=null}}let Nk=0;class Kt{constructor(e,t=!0,n=!1){this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=t,this.id=Nk++,this.disposeRunner=new ns("disposeBuffer")}update(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(e){this.type=e?Ls.ELEMENT_ARRAY_BUFFER:Ls.ARRAY_BUFFER}get index(){return this.type===Ls.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new Kt(e)}}class tu{constructor(e,t=0,n=!1,s=je.FLOAT,r,o,a,c=1){this.buffer=e,this.size=t,this.normalized=n,this.type=s,this.stride=r,this.start=o,this.instance=a,this.divisor=c}destroy(){this.buffer=null}static from(e,t,n,s,r){return new tu(e,t,n,s,r)}}const $k={Float32Array,Uint32Array,Int32Array,Uint8Array};function Bk(i,e){let t=0,n=0;const s={};for(let c=0;c<i.length;c++)n+=e[c],t+=i[c].length;const r=new ArrayBuffer(t*4);let o=null,a=0;for(let c=0;c<i.length;c++){const l=e[c],d=i[c],u=Ow(d);s[u]||(s[u]=new $k[u](r)),o=s[u];for(let h=0;h<d.length;h++){const f=(h/l|0)*n+a,p=h%l;o[f+p]=d[h]}a+=l}return new Float32Array(r)}const R0={5126:4,5123:2,5121:1};let Uk=0;const Vk={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class Ns{constructor(e=[],t={}){this.buffers=e,this.indexBuffer=null,this.attributes=t,this.glVertexArrayObjects={},this.id=Uk++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new ns("disposeGeometry"),this.refCount=0}addAttribute(e,t,n=0,s=!1,r,o,a,c=!1){if(!t)throw new Error("You must pass a buffer when creating an attribute");t instanceof Kt||(t instanceof Array&&(t=new Float32Array(t)),t=new Kt(t));const l=e.split("|");if(l.length>1){for(let u=0;u<l.length;u++)this.addAttribute(l[u],t,n,s,r);return this}let d=this.buffers.indexOf(t);return d===-1&&(this.buffers.push(t),d=this.buffers.length-1),this.attributes[e]=new tu(d,n,s,r,o,a,c),this.instanced=this.instanced||c,this}getAttribute(e){return this.attributes[e]}getBuffer(e){return this.buffers[this.getAttribute(e).buffer]}addIndex(e){return e instanceof Kt||(e instanceof Array&&(e=new Uint16Array(e)),e=new Kt(e)),e.type=Ls.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.includes(e)||this.buffers.push(e),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const e=[],t=[],n=new Kt;let s;for(s in this.attributes){const r=this.attributes[s],o=this.buffers[r.buffer];e.push(o.data),t.push(r.size*R0[r.type]/4),r.buffer=0}for(n.data=Bk(e,t),s=0;s<this.buffers.length;s++)this.buffers[s]!==this.indexBuffer&&this.buffers[s].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const e in this.attributes){const t=this.attributes[e];return this.buffers[t.buffer].data.length/(t.stride/4||t.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const e=new Ns;for(let t=0;t<this.buffers.length;t++)e.buffers[t]=new Kt(this.buffers[t].data.slice(0));for(const t in this.attributes){const n=this.attributes[t];e.attributes[t]=new tu(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=Ls.ELEMENT_ARRAY_BUFFER),e}static merge(e){const t=new Ns,n=[],s=[],r=[];let o;for(let a=0;a<e.length;a++){o=e[a];for(let c=0;c<o.buffers.length;c++)s[c]=s[c]||0,s[c]+=o.buffers[c].data.length,r[c]=0}for(let a=0;a<o.buffers.length;a++)n[a]=new Vk[Ow(o.buffers[a].data)](s[a]),t.buffers[a]=new Kt(n[a]);for(let a=0;a<e.length;a++){o=e[a];for(let c=0;c<o.buffers.length;c++)n[c].set(o.buffers[c].data,r[c]),r[c]+=o.buffers[c].data.length}if(t.attributes=o.attributes,o.indexBuffer){t.indexBuffer=t.buffers[o.buffers.indexOf(o.indexBuffer)],t.indexBuffer.type=Ls.ELEMENT_ARRAY_BUFFER;let a=0,c=0,l=0,d=0;for(let u=0;u<o.buffers.length;u++)if(o.buffers[u]!==o.indexBuffer){d=u;break}for(const u in o.attributes){const h=o.attributes[u];(h.buffer|0)===d&&(c+=h.size*R0[h.type]/4)}for(let u=0;u<e.length;u++){const h=e[u].indexBuffer.data;for(let f=0;f<h.length;f++)t.indexBuffer.data[f+l]+=a;a+=e[u].buffers[d].data.length/c,l+=h.length}}return t}}class $w extends Ns{constructor(e=!1){super(),this._buffer=new Kt(null,e,!1),this._indexBuffer=new Kt(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,je.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,je.FLOAT).addAttribute("aColor",this._buffer,4,!0,je.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,je.FLOAT).addIndex(this._indexBuffer)}}const nu=Math.PI*2,Xk=180/Math.PI,Yk=Math.PI/180;var $n=(i=>(i[i.POLY=0]="POLY",i[i.RECT=1]="RECT",i[i.CIRC=2]="CIRC",i[i.ELIP=3]="ELIP",i[i.RREC=4]="RREC",i))($n||{});class Pt{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new Pt(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}}Pt.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const Yc=[new Pt,new Pt,new Pt,new Pt];class ht{constructor(e=0,t=0,n=0,s=0){this.x=Number(e),this.y=Number(t),this.width=Number(n),this.height=Number(s),this.type=$n.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ht(0,0,0,0)}clone(){return new ht(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&t>=this.y&&t<this.y+this.height}intersects(e,t){if(!t){const C=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=C)return!1;const M=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>M}const n=this.left,s=this.right,r=this.top,o=this.bottom;if(s<=n||o<=r)return!1;const a=Yc[0].set(e.left,e.top),c=Yc[1].set(e.left,e.bottom),l=Yc[2].set(e.right,e.top),d=Yc[3].set(e.right,e.bottom);if(l.x<=a.x||c.y<=a.y)return!1;const u=Math.sign(t.a*t.d-t.b*t.c);if(u===0||(t.apply(a,a),t.apply(c,c),t.apply(l,l),t.apply(d,d),Math.max(a.x,c.x,l.x,d.x)<=n||Math.min(a.x,c.x,l.x,d.x)>=s||Math.max(a.y,c.y,l.y,d.y)<=r||Math.min(a.y,c.y,l.y,d.y)>=o))return!1;const h=u*(c.y-a.y),f=u*(a.x-c.x),p=h*n+f*r,m=h*s+f*r,g=h*n+f*o,v=h*s+f*o;if(Math.max(p,m,g,v)<=h*a.x+f*a.y||Math.min(p,m,g,v)>=h*d.x+f*d.y)return!1;const y=u*(a.y-l.y),b=u*(l.x-a.x),x=y*n+b*r,T=y*s+b*r,E=y*n+b*o,S=y*s+b*o;return!(Math.max(x,T,E,S)<=y*a.x+b*a.y||Math.min(x,T,E,S)>=y*d.x+b*d.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),r=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(n-t,0),this.y=s,this.height=Math.max(r-s,0),this}ceil(e=1,t=.001){const n=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=n-this.x,this.height=s-this.y,this}enlarge(e){const t=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),r=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=n-t,this.y=s,this.height=r-s,this}}ht.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class ch{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.radius=n,this.type=$n.CIRC}clone(){return new ch(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;const n=this.radius*this.radius;let s=this.x-e,r=this.y-t;return s*=s,r*=r,s+r<=n}getBounds(){return new ht(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}ch.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class dh{constructor(e=0,t=0,n=0,s=0){this.x=e,this.y=t,this.width=n,this.height=s,this.type=$n.ELIP}clone(){return new dh(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let n=(e-this.x)/this.width,s=(t-this.y)/this.height;return n*=n,s*=s,n+s<=1}getBounds(){return new ht(this.x-this.width,this.y-this.height,this.width,this.height)}}dh.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Bo{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){const n=[];for(let s=0,r=t.length;s<r;s++)n.push(t[s].x,t[s].y);t=n}this.points=t,this.type=$n.POLY,this.closeStroke=!0}clone(){const e=this.points.slice(),t=new Bo(e);return t.closeStroke=this.closeStroke,t}contains(e,t){let n=!1;const s=this.points.length/2;for(let r=0,o=s-1;r<s;o=r++){const a=this.points[r*2],c=this.points[r*2+1],l=this.points[o*2],d=this.points[o*2+1];c>t!=d>t&&e<(l-a)*((t-c)/(d-c))+a&&(n=!n)}return n}}Bo.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((i,e)=>`${i}, ${e}`,"")}]`};class uh{constructor(e=0,t=0,n=0,s=0,r=20){this.x=e,this.y=t,this.width=n,this.height=s,this.radius=r,this.type=$n.RREC}clone(){return new uh(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let s=e-(this.x+n),r=t-(this.y+n);const o=n*n;if(s*s+r*r<=o||(s=e-(this.x+this.width-n),s*s+r*r<=o)||(r=t-(this.y+this.height-n),s*s+r*r<=o)||(s=e-(this.x+n),s*s+r*r<=o))return!0}return!1}}uh.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class zt{constructor(e=1,t=0,n=0,s=1,r=0,o=0){this.array=null,this.a=e,this.b=t,this.c=n,this.d=s,this.tx=r,this.ty=o}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,n,s,r,o){return this.a=e,this.b=t,this.c=n,this.d=s,this.tx=r,this.ty=o,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const n=t||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(e,t){t=t||new Pt;const n=e.x,s=e.y;return t.x=this.a*n+this.c*s+this.tx,t.y=this.b*n+this.d*s+this.ty,t}applyInverse(e,t){t=t||new Pt;const n=1/(this.a*this.d+this.c*-this.b),s=e.x,r=e.y;return t.x=this.d*n*s+-this.c*n*r+(this.ty*this.c-this.tx*this.d)*n,t.y=this.a*n*r+-this.b*n*s+(-this.ty*this.a+this.tx*this.b)*n,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),s=this.a,r=this.c,o=this.tx;return this.a=s*t-this.b*n,this.b=s*n+this.b*t,this.c=r*t-this.d*n,this.d=r*n+this.d*t,this.tx=o*t-this.ty*n,this.ty=o*n+this.ty*t,this}append(e){const t=this.a,n=this.b,s=this.c,r=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*n+e.b*r,this.c=e.c*t+e.d*s,this.d=e.c*n+e.d*r,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*n+e.ty*r+this.ty,this}setTransform(e,t,n,s,r,o,a,c,l){return this.a=Math.cos(a+l)*r,this.b=Math.sin(a+l)*r,this.c=-Math.sin(a-c)*o,this.d=Math.cos(a-c)*o,this.tx=e-(n*this.a+s*this.c),this.ty=t-(n*this.b+s*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const n=this.a,s=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,n=this.b,s=this.c,r=this.d,o=e.pivot,a=-Math.atan2(-s,r),c=Math.atan2(n,t),l=Math.abs(a+c);return l<1e-5||Math.abs(nu-l)<1e-5?(e.rotation=c,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=c),e.scale.x=Math.sqrt(t*t+n*n),e.scale.y=Math.sqrt(s*s+r*r),e.position.x=this.tx+(o.x*t+o.y*s),e.position.y=this.ty+(o.x*n+o.y*r),e}invert(){const e=this.a,t=this.b,n=this.c,s=this.d,r=this.tx,o=e*s-t*n;return this.a=s/o,this.b=-t/o,this.c=-n/o,this.d=e/o,this.tx=(n*this.ty-s*r)/o,this.ty=-(e*this.ty-t*r)/o,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new zt;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new zt}static get TEMP_MATRIX(){return new zt}}zt.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const wo=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],So=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Co=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Ao=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Qp=[],Bw=[],zc=Math.sign;function zk(){for(let i=0;i<16;i++){const e=[];Qp.push(e);for(let t=0;t<16;t++){const n=zc(wo[i]*wo[t]+Co[i]*So[t]),s=zc(So[i]*wo[t]+Ao[i]*So[t]),r=zc(wo[i]*Co[t]+Co[i]*Ao[t]),o=zc(So[i]*Co[t]+Ao[i]*Ao[t]);for(let a=0;a<16;a++)if(wo[a]===n&&So[a]===s&&Co[a]===r&&Ao[a]===o){e.push(a);break}}}for(let i=0;i<16;i++){const e=new zt;e.set(wo[i],So[i],Co[i],Ao[i],0,0),Bw.push(e)}}zk();const on={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:i=>wo[i],uY:i=>So[i],vX:i=>Co[i],vY:i=>Ao[i],inv:i=>i&8?i&15:-i&7,add:(i,e)=>Qp[i][e],sub:(i,e)=>Qp[i][on.inv(e)],rotate180:i=>i^4,isVertical:i=>(i&3)===2,byDirection:(i,e)=>Math.abs(i)*2<=Math.abs(e)?e>=0?on.S:on.N:Math.abs(e)*2<=Math.abs(i)?i>0?on.E:on.W:e>0?i>0?on.SE:on.SW:i>0?on.NE:on.NW,matrixAppendRotationInv:(i,e,t=0,n=0)=>{const s=Bw[on.inv(e)];s.tx=t,s.ty=n,i.append(s)}};class ir{constructor(e,t,n=0,s=0){this._x=n,this._y=s,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new ir(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}ir.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const em=class{constructor(){this.worldTransform=new zt,this.localTransform=new zt,this.position=new ir(this.onChange,this,0,0),this.scale=new ir(this.onChange,this,1,1),this.pivot=new ir(this.onChange,this,0,0),this.skew=new ir(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const i=this.localTransform;this._localID!==this._currentLocalID&&(i.a=this._cx*this.scale.x,i.b=this._sx*this.scale.x,i.c=this._cy*this.scale.y,i.d=this._sy*this.scale.y,i.tx=this.position.x-(this.pivot.x*i.a+this.pivot.y*i.c),i.ty=this.position.y-(this.pivot.x*i.b+this.pivot.y*i.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(i){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==i._worldID){const t=i.worldTransform,n=this.worldTransform;n.a=e.a*t.a+e.b*t.c,n.b=e.a*t.b+e.b*t.d,n.c=e.c*t.a+e.d*t.c,n.d=e.c*t.b+e.d*t.d,n.tx=e.tx*t.a+e.ty*t.c+t.tx,n.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=i._worldID,this._worldID++}}setFromMatrix(i){i.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(i){this._rotation!==i&&(this._rotation=i,this.updateSkew())}};em.IDENTITY=new em;let Og=em;Og.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};var jk=`varying vec2 vTextureCoord;
|
||
|
||
uniform sampler2D uSampler;
|
||
|
||
void main(void){
|
||
gl_FragColor *= texture2D(uSampler, vTextureCoord);
|
||
}`,Hk=`attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
void main(void){
|
||
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
vTextureCoord = aTextureCoord;
|
||
}
|
||
`;function F0(i,e,t){const n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}function qf(i){const e=new Array(i);for(let t=0;t<e.length;t++)e[t]=!1;return e}function Uw(i,e){switch(i){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return qf(2*e);case"bvec3":return qf(3*e);case"bvec4":return qf(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const La=[{test:i=>i.type==="float"&&i.size===1&&!i.isArray,code:i=>`
|
||
if(uv["${i}"] !== ud["${i}"].value)
|
||
{
|
||
ud["${i}"].value = uv["${i}"]
|
||
gl.uniform1f(ud["${i}"].location, uv["${i}"])
|
||
}
|
||
`},{test:(i,e)=>(i.type==="sampler2D"||i.type==="samplerCube"||i.type==="sampler2DArray")&&i.size===1&&!i.isArray&&(e==null||e.castToBaseTexture!==void 0),code:i=>`t = syncData.textureCount++;
|
||
|
||
renderer.texture.bind(uv["${i}"], t);
|
||
|
||
if(ud["${i}"].value !== t)
|
||
{
|
||
ud["${i}"].value = t;
|
||
gl.uniform1i(ud["${i}"].location, t);
|
||
; // eslint-disable-line max-len
|
||
}`},{test:(i,e)=>i.type==="mat3"&&i.size===1&&!i.isArray&&e.a!==void 0,code:i=>`
|
||
gl.uniformMatrix3fv(ud["${i}"].location, false, uv["${i}"].toArray(true));
|
||
`,codeUbo:i=>`
|
||
var ${i}_matrix = uv.${i}.toArray(true);
|
||
|
||
data[offset] = ${i}_matrix[0];
|
||
data[offset+1] = ${i}_matrix[1];
|
||
data[offset+2] = ${i}_matrix[2];
|
||
|
||
data[offset + 4] = ${i}_matrix[3];
|
||
data[offset + 5] = ${i}_matrix[4];
|
||
data[offset + 6] = ${i}_matrix[5];
|
||
|
||
data[offset + 8] = ${i}_matrix[6];
|
||
data[offset + 9] = ${i}_matrix[7];
|
||
data[offset + 10] = ${i}_matrix[8];
|
||
`},{test:(i,e)=>i.type==="vec2"&&i.size===1&&!i.isArray&&e.x!==void 0,code:i=>`
|
||
cv = ud["${i}"].value;
|
||
v = uv["${i}"];
|
||
|
||
if(cv[0] !== v.x || cv[1] !== v.y)
|
||
{
|
||
cv[0] = v.x;
|
||
cv[1] = v.y;
|
||
gl.uniform2f(ud["${i}"].location, v.x, v.y);
|
||
}`,codeUbo:i=>`
|
||
v = uv.${i};
|
||
|
||
data[offset] = v.x;
|
||
data[offset+1] = v.y;
|
||
`},{test:i=>i.type==="vec2"&&i.size===1&&!i.isArray,code:i=>`
|
||
cv = ud["${i}"].value;
|
||
v = uv["${i}"];
|
||
|
||
if(cv[0] !== v[0] || cv[1] !== v[1])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
gl.uniform2f(ud["${i}"].location, v[0], v[1]);
|
||
}
|
||
`},{test:(i,e)=>i.type==="vec4"&&i.size===1&&!i.isArray&&e.width!==void 0,code:i=>`
|
||
cv = ud["${i}"].value;
|
||
v = uv["${i}"];
|
||
|
||
if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
|
||
{
|
||
cv[0] = v.x;
|
||
cv[1] = v.y;
|
||
cv[2] = v.width;
|
||
cv[3] = v.height;
|
||
gl.uniform4f(ud["${i}"].location, v.x, v.y, v.width, v.height)
|
||
}`,codeUbo:i=>`
|
||
v = uv.${i};
|
||
|
||
data[offset] = v.x;
|
||
data[offset+1] = v.y;
|
||
data[offset+2] = v.width;
|
||
data[offset+3] = v.height;
|
||
`},{test:(i,e)=>i.type==="vec4"&&i.size===1&&!i.isArray&&e.red!==void 0,code:i=>`
|
||
cv = ud["${i}"].value;
|
||
v = uv["${i}"];
|
||
|
||
if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)
|
||
{
|
||
cv[0] = v.red;
|
||
cv[1] = v.green;
|
||
cv[2] = v.blue;
|
||
cv[3] = v.alpha;
|
||
gl.uniform4f(ud["${i}"].location, v.red, v.green, v.blue, v.alpha)
|
||
}`,codeUbo:i=>`
|
||
v = uv.${i};
|
||
|
||
data[offset] = v.red;
|
||
data[offset+1] = v.green;
|
||
data[offset+2] = v.blue;
|
||
data[offset+3] = v.alpha;
|
||
`},{test:(i,e)=>i.type==="vec3"&&i.size===1&&!i.isArray&&e.red!==void 0,code:i=>`
|
||
cv = ud["${i}"].value;
|
||
v = uv["${i}"];
|
||
|
||
if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)
|
||
{
|
||
cv[0] = v.red;
|
||
cv[1] = v.green;
|
||
cv[2] = v.blue;
|
||
|
||
gl.uniform3f(ud["${i}"].location, v.red, v.green, v.blue)
|
||
}`,codeUbo:i=>`
|
||
v = uv.${i};
|
||
|
||
data[offset] = v.red;
|
||
data[offset+1] = v.green;
|
||
data[offset+2] = v.blue;
|
||
`},{test:i=>i.type==="vec4"&&i.size===1&&!i.isArray,code:i=>`
|
||
cv = ud["${i}"].value;
|
||
v = uv["${i}"];
|
||
|
||
if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
cv[3] = v[3];
|
||
|
||
gl.uniform4f(ud["${i}"].location, v[0], v[1], v[2], v[3])
|
||
}`}],Gk={float:`
|
||
if (cv !== v)
|
||
{
|
||
cu.value = v;
|
||
gl.uniform1f(location, v);
|
||
}`,vec2:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
|
||
gl.uniform2f(location, v[0], v[1])
|
||
}`,vec3:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
|
||
gl.uniform3f(location, v[0], v[1], v[2])
|
||
}`,vec4:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
cv[3] = v[3];
|
||
|
||
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
|
||
}`,int:`
|
||
if (cv !== v)
|
||
{
|
||
cu.value = v;
|
||
|
||
gl.uniform1i(location, v);
|
||
}`,ivec2:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
|
||
gl.uniform2i(location, v[0], v[1]);
|
||
}`,ivec3:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
|
||
gl.uniform3i(location, v[0], v[1], v[2]);
|
||
}`,ivec4:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
cv[3] = v[3];
|
||
|
||
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
||
}`,uint:`
|
||
if (cv !== v)
|
||
{
|
||
cu.value = v;
|
||
|
||
gl.uniform1ui(location, v);
|
||
}`,uvec2:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
|
||
gl.uniform2ui(location, v[0], v[1]);
|
||
}`,uvec3:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
|
||
gl.uniform3ui(location, v[0], v[1], v[2]);
|
||
}`,uvec4:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
cv[3] = v[3];
|
||
|
||
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
|
||
}`,bool:`
|
||
if (cv !== v)
|
||
{
|
||
cu.value = v;
|
||
gl.uniform1i(location, v);
|
||
}`,bvec2:`
|
||
if (cv[0] != v[0] || cv[1] != v[1])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
|
||
gl.uniform2i(location, v[0], v[1]);
|
||
}`,bvec3:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
|
||
gl.uniform3i(location, v[0], v[1], v[2]);
|
||
}`,bvec4:`
|
||
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
||
{
|
||
cv[0] = v[0];
|
||
cv[1] = v[1];
|
||
cv[2] = v[2];
|
||
cv[3] = v[3];
|
||
|
||
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
||
}`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:`
|
||
if (cv !== v)
|
||
{
|
||
cu.value = v;
|
||
|
||
gl.uniform1i(location, v);
|
||
}`,samplerCube:`
|
||
if (cv !== v)
|
||
{
|
||
cu.value = v;
|
||
|
||
gl.uniform1i(location, v);
|
||
}`,sampler2DArray:`
|
||
if (cv !== v)
|
||
{
|
||
cu.value = v;
|
||
|
||
gl.uniform1i(location, v);
|
||
}`},Wk={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function qk(i,e){var n;const t=[`
|
||
var v = null;
|
||
var cv = null;
|
||
var cu = null;
|
||
var t = 0;
|
||
var gl = renderer.gl;
|
||
`];for(const s in i.uniforms){const r=e[s];if(!r){((n=i.uniforms[s])==null?void 0:n.group)===!0&&(i.uniforms[s].ubo?t.push(`
|
||
renderer.shader.syncUniformBufferGroup(uv.${s}, '${s}');
|
||
`):t.push(`
|
||
renderer.shader.syncUniformGroup(uv.${s}, syncData);
|
||
`));continue}const o=i.uniforms[s];let a=!1;for(let c=0;c<La.length;c++)if(La[c].test(r,o)){t.push(La[c].code(s,o)),a=!0;break}if(!a){const c=(r.size===1&&!r.isArray?Gk:Wk)[r.type].replace("location",`ud["${s}"].location`);t.push(`
|
||
cu = ud["${s}"];
|
||
cv = cu.value;
|
||
v = uv["${s}"];
|
||
${c};`)}}return new Function("ud","uv","renderer","syncData",t.join(`
|
||
`))}const Vw={};let aa=Vw;function Kk(){if(aa===Vw||aa!=null&&aa.isContextLost()){const i=Xe.ADAPTER.createCanvas();let e;Xe.PREFER_ENV>=Ko.WEBGL2&&(e=i.getContext("webgl2",{})),e||(e=i.getContext("webgl",{})||i.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),aa=e}return aa}let jc;function Jk(){if(!jc){jc=Di.MEDIUM;const i=Kk();if(i&&i.getShaderPrecisionFormat){const e=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);e&&(jc=e.precision?Di.HIGH:Di.MEDIUM)}}return jc}function L0(i,e){const t=i.getShaderSource(e).split(`
|
||
`).map((l,d)=>`${d}: ${l}`),n=i.getShaderInfoLog(e),s=n.split(`
|
||
`),r={},o=s.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(n),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function Zk(i,e,t,n){i.getProgramParameter(e,i.LINK_STATUS)||(i.getShaderParameter(t,i.COMPILE_STATUS)||L0(i,t),i.getShaderParameter(n,i.COMPILE_STATUS)||L0(i,n),console.error("PixiJS Error: Could not initialize shader."),i.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",i.getProgramInfoLog(e)))}const Qk={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 Xw(i){return Qk[i]}let Hc=null;const D0={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 Yw(i,e){if(!Hc){const t=Object.keys(D0);Hc={};for(let n=0;n<t.length;++n){const s=t[n];Hc[i[s]]=D0[s]}}return Hc[e]}function O0(i,e,t){if(i.substring(0,9)!=="precision"){let n=e;return e===Di.HIGH&&t!==Di.HIGH&&(n=Di.MEDIUM),`precision ${n} float;
|
||
${i}`}else if(t!==Di.HIGH&&i.substring(0,15)==="precision highp")return i.replace("precision highp","precision mediump");return i}let vl;function eI(){if(typeof vl=="boolean")return vl;try{vl=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{vl=!1}return vl}let tI=0;const Gc={},tm=class ba{constructor(e,t,n="pixi-shader",s={}){this.extra={},this.id=tI++,this.vertexSrc=e||ba.defaultVertexSrc,this.fragmentSrc=t||ba.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=s,this.vertexSrc.substring(0,8)!=="#version"&&(n=n.replace(/\s+/g,"-"),Gc[n]?(Gc[n]++,n+=`-${Gc[n]}`):Gc[n]=1,this.vertexSrc=`#define SHADER_NAME ${n}
|
||
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${n}
|
||
${this.fragmentSrc}`,this.vertexSrc=O0(this.vertexSrc,ba.defaultVertexPrecision,Di.HIGH),this.fragmentSrc=O0(this.fragmentSrc,ba.defaultFragmentPrecision,Jk())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return Hk}static get defaultFragmentSrc(){return jk}static from(e,t,n){const s=e+t;let r=M0[s];return r||(M0[s]=r=new ba(e,t,n)),r}};tm.defaultVertexPrecision=Di.HIGH,tm.defaultFragmentPrecision=nr.apple.device?Di.HIGH:Di.MEDIUM;let ks=tm,nI=0;class is{constructor(e,t,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=nI++,this.static=!!t,this.ubo=!!n,e instanceof Kt?(this.buffer=e,this.buffer.type=Ls.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new Kt(new Float32Array(1)),this.buffer.type=Ls.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,n){if(!this.ubo)this.uniforms[e]=new is(t,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,n){return new is(e,t,n)}static uboFrom(e,t){return new is(e,t??!0,!0)}}class ss{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof is?this.uniformGroup=t:this.uniformGroup=new is(t):this.uniformGroup=new is({}),this.disposeRunner=new ns("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(const n in t.uniforms){const s=t.uniforms[n];if(s.group===!0&&this.checkUniformExists(e,s))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,n){const s=ks.from(e,t);return new ss(s,n)}}class zw{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 n=new Int32Array(e);for(let r=0;r<e;r++)n[r]=r;this.defaultGroupCache[e]=is.from({uSamplers:n},!0);let s=this.fragTemplate;s=s.replace(/%count%/gi,`${e}`),s=s.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new ks(this.vertexSrc,s)}const t={tint:new Float32Array([1,1,1,1]),translationMatrix:new zt,default:this.defaultGroupCache[e]};return new ss(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
|
||
`,t+=`
|
||
`;for(let n=0;n<e;n++)n>0&&(t+=`
|
||
else `),n<e-1&&(t+=`if(vTextureId < ${n}.5)`),t+=`
|
||
{`,t+=`
|
||
color = texture2D(uSamplers[${n}], vTextureCoord);`,t+=`
|
||
}`;return t+=`
|
||
`,t+=`
|
||
`,t}}class nm{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function iI(){return!nr.apple.device}function sI(i){let e=!0;const t=Xe.ADAPTER.getNavigator();if(nr.tablet||nr.phone){if(nr.apple.device){const n=t.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(e=!1)}if(nr.android.device){const n=t.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(e=!1)}}return e?i:4}class hh{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var rI=`varying vec2 vTextureCoord;
|
||
varying vec4 vColor;
|
||
varying float vTextureId;
|
||
uniform sampler2D uSamplers[%count%];
|
||
|
||
void main(void){
|
||
vec4 color;
|
||
%forloop%
|
||
gl_FragColor = color * vColor;
|
||
}
|
||
`,oI=`precision highp float;
|
||
attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
attribute vec4 aColor;
|
||
attribute float aTextureId;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
uniform mat3 translationMatrix;
|
||
uniform vec4 tint;
|
||
|
||
varying vec2 vTextureCoord;
|
||
varying vec4 vColor;
|
||
varying float vTextureId;
|
||
|
||
void main(void){
|
||
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
||
vTextureCoord = aTextureCoord;
|
||
vTextureId = aTextureId;
|
||
vColor = aColor * tint;
|
||
}
|
||
`;const _l=class ji extends hh{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=$w,this.vertexSize=6,this.state=$s.for2d(),this.size=ji.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??sI(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??iI(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return yt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return oI}static get defaultFragmentTemplate(){return rI}setShaderGenerator({vertex:e=ji.defaultVertexSrc,fragment:t=ji.defaultFragmentTemplate}={}){this.shaderGenerator=new zw(e,t)}contextChange(){const e=this.renderer.gl;Xe.PREFER_ENV===Ko.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),ji.defaultMaxTextures),this.maxTextures=Dk(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}=ji,n=this.size/4,s=Math.floor(n/this.maxTextures)+1;for(;e.length<n;)e.push(new Zp);for(;t.length<s;)t.push(new nm);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,n=ji._textureArrayPool,s=this.renderer.batch,r=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++st._globalBatch,c=0,l=n[0],d=0;s.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const h=e[u];e[u]=null,h._batchEnabled!==a&&(l.count>=t&&(s.boundArray(l,r,a,t),this.buildDrawCalls(l,d,u),d=u,l=n[++c],++a),h._batchEnabled=a,h.touched=o,l.elements[l.count++]=h)}l.count>0&&(s.boundArray(l,r,a,t),this.buildDrawCalls(l,d,this._bufferSize),++c,++a);for(let u=0;u<r.length;u++)r[u]=null;st._globalBatch=a}buildDrawCalls(e,t,n){const{_bufferedElements:s,_attributeBuffer:r,_indexBuffer:o,vertexSize:a}=this,c=ji._drawCallPool;let l=this._dcIndex,d=this._aIndex,u=this._iIndex,h=c[l];h.start=this._iIndex,h.texArray=e;for(let f=t;f<n;++f){const p=s[f],m=p._texture.baseTexture,g=Lw[m.alphaMode?1:0][p.blendMode];s[f]=null,t<f&&h.blend!==g&&(h.size=u-h.start,t=f,h=c[++l],h.texArray=e,h.start=u),this.packInterleavedGeometry(p,r,o,d,u),d+=p.vertexData.length/2*a,u+=p.indices.length,h.blend=g}t<n&&(h.size=u-h.start,++l),this._dcIndex=l,this._aIndex=d,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let n=0;n<e.count;n++)t.bind(e.elements[n],e.ids[n]),e.elements[n]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:n}=this;ji.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(n),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(n),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:n}=this.renderer,s=ji._drawCallPool;let r=null;for(let o=0;o<e;o++){const{texArray:a,type:c,size:l,start:d,blend:u}=s[o];r!==a&&(r=a,this.bindAndClearTexArray(a)),this.state.blendMode=u,n.set(this.state),t.drawElements(c,l,t.UNSIGNED_SHORT,d*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),ji.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=eu(Math.ceil(e/8)),n=E0(t),s=t*8;this._aBuffers.length<=n&&(this._iBuffers.length=n+1);let r=this._aBuffers[s];return r||(this._aBuffers[s]=r=new qp(s*this.vertexSize*4)),r}getIndexBuffer(e){const t=eu(Math.ceil(e/12)),n=E0(t),s=t*12;this._iBuffers.length<=n&&(this._iBuffers.length=n+1);let r=this._iBuffers[n];return r||(this._iBuffers[n]=r=new Uint16Array(s)),r}packInterleavedGeometry(e,t,n,s,r){const{uint32View:o,float32View:a}=t,c=s/this.vertexSize,l=e.uvs,d=e.indices,u=e.vertexData,h=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),p=Ot.shared.setValue(e._tintRGB).toPremultiplied(f,e._texture.baseTexture.alphaMode>0);for(let m=0;m<u.length;m+=2)a[s++]=u[m],a[s++]=u[m+1],a[s++]=l[m],a[s++]=l[m+1],o[s++]=p,a[s++]=h;for(let m=0;m<d.length;m++)n[r++]=c+d[m]}};_l.defaultBatchSize=4096,_l.extension={name:"batch",type:$e.RendererPlugin},_l._drawCallPool=[],_l._textureArrayPool=[];let Nr=_l;He.add(Nr);var aI=`varying vec2 vTextureCoord;
|
||
|
||
uniform sampler2D uSampler;
|
||
|
||
void main(void){
|
||
gl_FragColor = texture2D(uSampler, vTextureCoord);
|
||
}
|
||
`,lI=`attribute vec2 aVertexPosition;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
uniform vec4 inputSize;
|
||
uniform vec4 outputFrame;
|
||
|
||
vec4 filterVertexPosition( void )
|
||
{
|
||
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
||
|
||
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
||
}
|
||
|
||
vec2 filterTextureCoord( void )
|
||
{
|
||
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
||
}
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = filterVertexPosition();
|
||
vTextureCoord = filterTextureCoord();
|
||
}
|
||
`;const im=class Ml extends ss{constructor(e,t,n){const s=ks.from(e||Ml.defaultVertexSrc,t||Ml.defaultFragmentSrc);super(s,n),this.padding=0,this.resolution=Ml.defaultResolution,this.multisample=Ml.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new $s}apply(e,t,n,s,r){e.applyFilter(this,t,n,s)}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 lI}static get defaultFragmentSrc(){return aI}};im.defaultResolution=1,im.defaultMultisample=yn.NONE;let oi=im;class iu{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Ot(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:n,backgroundAlpha:s}=e,r=n??t;r!==void 0&&(this.color=r),this.alpha=s}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(){}}iu.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},iu.extension={type:[$e.RendererSystem,$e.CanvasRendererSystem],name:"background"};He.add(iu);class jw{constructor(e){this.renderer=e,this.emptyRenderer=new hh(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:n}=this.renderer.texture;for(let s=t-1;s>=0;--s)e[s]=n[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,n,s){const{elements:r,ids:o,count:a}=e;let c=0;for(let l=0;l<a;l++){const d=r[l],u=d._batchLocation;if(u>=0&&u<s&&t[u]===d){o[l]=u;continue}for(;c<s;){const h=t[c];if(h&&h._batchEnabled===n&&h._batchLocation===c){c++;continue}o[l]=c,d._batchLocation=c,t[c]=d;break}}}destroy(){this.renderer=null}}jw.extension={type:$e.RendererSystem,name:"batch"};He.add(jw);let N0=0;class su{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=N0++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,n=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:n,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=N0++,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 n;if(Xe.PREFER_ENV>=Ko.WEBGL2&&(n=e.getContext("webgl2",t)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,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_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const t=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=n||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}su.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},su.extension={type:$e.RendererSystem,name:"context"};He.add(su);class sm{constructor(e,t){if(this.width=Math.round(e),this.height=Math.round(t),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ns("disposeFramebuffer"),this.multisample=yn.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new st(null,{scaleMode:Ki.NEAREST,resolution:1,mipmap:Bi.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new st(null,{scaleMode:Ki.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Bi.OFF,format:Ie.DEPTH_COMPONENT,type:je.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!e||!t)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const s=this.colorTextures[n],r=s.resolution;s.setSize(e/r,t/r)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(e/n,t/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class Hw extends st{constructor(e={}){if(typeof e=="number"){const t=arguments[0],n=arguments[1],s=arguments[2],r=arguments[3];e={width:t,height:n,scaleMode:s,resolution:r}}e.width=e.width??100,e.height=e.height??100,e.multisample??(e.multisample=yn.NONE),super(null,e),this.mipmap=Bi.OFF,this.valid=!0,this._clear=new Ot([0,0,0,0]),this.framebuffer=new sm(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=e.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(e){this._clear.setValue(e)}get clearColor(){return this._clear.value}get clear(){return this._clear}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t){this.framebuffer.resize(e*this.resolution,t*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class yr extends rc{constructor(e){const t=e,n=t.naturalWidth||t.videoWidth||t.displayWidth||t.width,s=t.naturalHeight||t.videoHeight||t.displayHeight||t.height;super(n,s),this.source=e,this.noSubImage=!1}static crossOrigin(e,t,n){n===void 0&&!t.startsWith("data:")?e.crossOrigin=Rk(t):n!==!1&&(e.crossOrigin=typeof n=="string"?n:"anonymous")}upload(e,t,n,s){const r=e.gl,o=t.realWidth,a=t.realHeight;if(s=s||this.source,typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement){if(!s.complete||s.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&s instanceof HTMLVideoElement&&s.readyState<=1)return!1;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Fn.UNPACK),!this.noSubImage&&t.target===r.TEXTURE_2D&&n.width===o&&n.height===a?r.texSubImage2D(r.TEXTURE_2D,0,0,0,t.format,n.type,s):(n.width=o,n.height=a,r.texImage2D(t.target,0,n.internalFormat,t.format,n.type,s)),!0}update(){if(this.destroyed)return;const e=this.source,t=e.naturalWidth||e.videoWidth||e.width,n=e.naturalHeight||e.videoHeight||e.height;this.resize(t,n),super.update()}dispose(){this.source=null}}class Gw extends yr{constructor(e,t){if(t=t||{},typeof e=="string"){const n=new Image;yr.crossOrigin(n,e,t.crossorigin),n.src=e,e=n}super(e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(t.createBitmap??Xe.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof t.alphaMode=="number"?t.alphaMode:null,this.bitmap=null,this._load=null,t.autoLoad!==!1&&this.load()}load(e){return this._load?this._load:(e!==void 0&&(this.createBitmap=e),this._load=new Promise((t,n)=>{const s=this.source;this.url=s.src;const r=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.update(),this._load=null,this.createBitmap?t(this.process()):t(this))};s.complete&&s.src?r():(s.onload=r,s.onerror=o=>{n(o),this.onError.emit(o)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const t=globalThis.createImageBitmap,n=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:n?"cors":"no-cors"}).then(s=>s.blob()).then(s=>t(s,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Fn.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,n){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,n,this.bitmap),!this.preserveBitmap){let s=!0;const r=t._glTextures;for(const o in r){const a=r[o];if(a!==n&&a.dirtyId!==t.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class Ng{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,t,n){const s=t.width,r=t.height;if(n){const o=e.width/2/s,a=e.height/2/r,c=e.x/s+o,l=e.y/r+a;n=on.add(n,on.NW),this.x0=c+o*on.uX(n),this.y0=l+a*on.uY(n),n=on.add(n,2),this.x1=c+o*on.uX(n),this.y1=l+a*on.uY(n),n=on.add(n,2),this.x2=c+o*on.uX(n),this.y2=l+a*on.uY(n),n=on.add(n,2),this.x3=c+o*on.uX(n),this.y3=l+a*on.uY(n)}else this.x0=e.x/s,this.y0=e.y/r,this.x1=(e.x+e.width)/s,this.y1=e.y/r,this.x2=(e.x+e.width)/s,this.y2=(e.y+e.height)/r,this.x3=e.x/s,this.y3=(e.y+e.height)/r;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}Ng.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const $0=new Ng;function Wc(i){i.destroy=function(){},i.on=function(){},i.once=function(){},i.emit=function(){}}let tt=class Wt extends Cc{constructor(e,t,n,s,r,o,a){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new ht(0,0,1,1)),e instanceof Wt&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=s,this.valid=!1,this.destroyed=!1,this._uvs=$0,this.uvMatrix=null,this.orig=n||t,this._rotate=Number(r||0),r===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=o?new Pt(o.x,o.y):new Pt(0,0),this.defaultBorders=a,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:t}=this.baseTexture;t!=null&&t.url&&fs[t.url]&&Wt.removeFromCache(t.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Wt.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){var s;const e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),n=new Wt(this.baseTexture,!this.noFrame&&e,t,(s=this.trim)==null?void 0:s.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=e),n}updateUvs(){this._uvs===$0&&(this._uvs=new Ng),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},n=Xe.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let r=null;if(s)r=e;else if(e instanceof st){if(!e.cacheId){const a=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e.cacheId=`${a}-${zo()}`,st.addToCache(e,e.cacheId)}r=e.cacheId}else{if(!e._pixiId){const a=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${a}_${zo()}`}r=e._pixiId}let o=fs[r];if(s&&n&&!o)throw new Error(`The cacheId "${r}" does not exist in TextureCache.`);return!o&&!(e instanceof st)?(t.resolution||(t.resolution=br(e)),o=new Wt(new st(e,t)),o.baseTexture.cacheId=r,st.addToCache(o.baseTexture,r),Wt.addToCache(o,r)):!o&&e instanceof st&&(o=new Wt(e),Wt.addToCache(o,r)),o}static fromURL(e,t){const n=Object.assign({autoLoad:!1},t==null?void 0:t.resourceOptions),s=Wt.from(e,Object.assign({resourceOptions:n},t),!1),r=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):r.load().then(()=>Promise.resolve(s))}static fromBuffer(e,t,n,s){return new Wt(st.fromBuffer(e,t,n,s))}static fromLoader(e,t,n,s){const r=new st(e,Object.assign({scaleMode:st.defaultOptions.scaleMode,resolution:br(t)},s)),{resource:o}=r;o instanceof Gw&&(o.url=t);const a=new Wt(r);return n||(n=t),st.addToCache(a.baseTexture,n),Wt.addToCache(a,n),n!==t&&(st.addToCache(a.baseTexture,t),Wt.addToCache(a,t)),a.baseTexture.valid?Promise.resolve(a):new Promise(c=>{a.baseTexture.once("loaded",()=>c(a))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),fs[t]&&fs[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),fs[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=fs[e];if(t){const n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete fs[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)fs[e.textureCacheIds[t]]===e&&delete fs[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(e){this._frame=e,this.noFrame=!1;const{x:t,y:n,width:s,height:r}=e,o=t+s>this.baseTexture.width,a=n+r>this.baseTexture.height;if(o||a){const c=o&&a?"and":"or",l=`X: ${t} + ${s} = ${t+s} > ${this.baseTexture.width}`,d=`Y: ${n} + ${r} = ${n+r} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${l} ${c} ${d}`)}this.valid=s&&r&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Wt._EMPTY||(Wt._EMPTY=new Wt(new st),Wc(Wt._EMPTY),Wc(Wt._EMPTY.baseTexture)),Wt._EMPTY}static get WHITE(){if(!Wt._WHITE){const e=Xe.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),Wt._WHITE=new Wt(st.from(e)),Wc(Wt._WHITE),Wc(Wt._WHITE.baseTexture)}return Wt._WHITE}};class Jo extends tt{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,n=!0){const s=this.baseTexture.resolution,r=Math.round(e*s)/s,o=Math.round(t*s)/s;this.valid=r>0&&o>0,this._frame.width=this.orig.width=r,this._frame.height=this.orig.height=o,n&&this.baseTexture.resize(r,o),this.updateUvs()}setResolution(e){const{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new Jo(new Hw(e))}}class Ww{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,n=yn.NONE){const s=new Hw(Object.assign({width:e,height:t,resolution:1,multisample:n},this.textureOptions));return new Jo(s)}getOptimalTexture(e,t,n=1,s=yn.NONE){let r;e=Math.max(Math.ceil(e*n-1e-6),1),t=Math.max(Math.ceil(t*n-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=eu(e),t=eu(t),r=((e&65535)<<16|t&65535)>>>0,s>1&&(r+=s*4294967296)):r=s>1?-s:-1,this.texturePool[r]||(this.texturePool[r]=[]);let o=this.texturePool[r].pop();return o||(o=this.createTexture(e,t,s)),o.filterPoolKey=r,o.setResolution(n),o}getFilterTexture(e,t,n){const s=this.getOptimalTexture(e.width,e.height,t||e.resolution,n||yn.NONE);return s.filterFrame=e.filterFrame,s}returnTexture(e){const t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const t in this.texturePool){const n=this.texturePool[t];if(n)for(let s=0;s<n.length;s++)n[s].destroy(!0)}this.texturePool={}}setScreenSize(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(const t in this.texturePool){if(!(Number(t)<0))continue;const n=this.texturePool[t];if(n)for(let s=0;s<n.length;s++)n[s].destroy(!0);this.texturePool[t]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}}}Ww.SCREEN_KEY=-1;class cI extends Ns{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class qw extends Ns{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Kt(this.vertices),this.uvBuffer=new Kt(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(e,t){let n=0,s=0;return this.uvs[0]=n,this.uvs[1]=s,this.uvs[2]=n+t.width/e.width,this.uvs[3]=s,this.uvs[4]=n+t.width/e.width,this.uvs[5]=s+t.height/e.height,this.uvs[6]=n,this.uvs[7]=s+t.height/e.height,n=t.x,s=t.y,this.vertices[0]=n,this.vertices[1]=s,this.vertices[2]=n+t.width,this.vertices[3]=s,this.vertices[4]=n+t.width,this.vertices[5]=s+t.height,this.vertices[6]=n,this.vertices[7]=s+t.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class dI{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=yn.NONE,this.sourceFrame=new ht,this.destinationFrame=new ht,this.bindingSourceFrame=new ht,this.bindingDestinationFrame=new ht,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const qc=[new Pt,new Pt,new Pt,new Pt],Kf=new zt;class Kw{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new Ww,this.statePool=[],this.quad=new cI,this.quadUv=new qw,this.tempRect=new ht,this.activeState={},this.globalUniforms=new is({outputFrame:new ht,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(e,t){const n=this.renderer,s=this.defaultFilterStack,r=this.statePool.pop()||new dI,o=n.renderTexture;let a,c;if(o.current){const g=o.current;a=g.resolution,c=g.multisample}else a=n.resolution,c=n.multisample;let l=t[0].resolution||a,d=t[0].multisample??c,u=t[0].padding,h=t[0].autoFit,f=t[0].legacy??!0;for(let g=1;g<t.length;g++){const v=t[g];l=Math.min(l,v.resolution||a),d=Math.min(d,v.multisample??c),u=this.useMaxPadding?Math.max(u,v.padding):u+v.padding,h=h&&v.autoFit,f=f||(v.legacy??!0)}s.length===1&&(this.defaultFilterStack[0].renderTexture=o.current),s.push(r),r.resolution=l,r.multisample=d,r.legacy=f,r.target=e,r.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),r.sourceFrame.pad(u);const p=this.tempRect.copyFrom(o.sourceFrame);n.projection.transform&&this.transformAABB(Kf.copyFrom(n.projection.transform).invert(),p),h?(r.sourceFrame.fit(p),(r.sourceFrame.width<=0||r.sourceFrame.height<=0)&&(r.sourceFrame.width=0,r.sourceFrame.height=0)):r.sourceFrame.intersects(p)||(r.sourceFrame.width=0,r.sourceFrame.height=0),this.roundFrame(r.sourceFrame,o.current?o.current.resolution:n.resolution,o.sourceFrame,o.destinationFrame,n.projection.transform),r.renderTexture=this.getOptimalFilterTexture(r.sourceFrame.width,r.sourceFrame.height,l,d),r.filters=t,r.destinationFrame.width=r.renderTexture.width,r.destinationFrame.height=r.renderTexture.height;const m=this.tempRect;m.x=0,m.y=0,m.width=r.sourceFrame.width,m.height=r.sourceFrame.height,r.renderTexture.filterFrame=r.sourceFrame,r.bindingSourceFrame.copyFrom(o.sourceFrame),r.bindingDestinationFrame.copyFrom(o.destinationFrame),r.transform=n.projection.transform,n.projection.transform=null,o.bind(r.renderTexture,r.sourceFrame,m),n.framebuffer.clear(0,0,0,0)}pop(){const e=this.defaultFilterStack,t=e.pop(),n=t.filters;this.activeState=t;const s=this.globalUniforms.uniforms;s.outputFrame=t.sourceFrame,s.resolution=t.resolution;const r=s.inputSize,o=s.inputPixel,a=s.inputClamp;if(r[0]=t.destinationFrame.width,r[1]=t.destinationFrame.height,r[2]=1/r[0],r[3]=1/r[1],o[0]=Math.round(r[0]*t.resolution),o[1]=Math.round(r[1]*t.resolution),o[2]=1/o[0],o[3]=1/o[1],a[0]=.5*o[2],a[1]=.5*o[3],a[2]=t.sourceFrame.width*r[2]-.5*o[2],a[3]=t.sourceFrame.height*r[3]-.5*o[3],t.legacy){const l=s.filterArea;l[0]=t.destinationFrame.width,l[1]=t.destinationFrame.height,l[2]=t.sourceFrame.x,l[3]=t.sourceFrame.y,s.filterClamp=s.inputClamp}this.globalUniforms.update();const c=e[e.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,t.renderTexture,c.renderTexture,As.BLEND,t),this.returnFilterTexture(t.renderTexture);else{let l=t.renderTexture,d=this.getOptimalFilterTexture(l.width,l.height,t.resolution);d.filterFrame=l.filterFrame;let u=0;for(u=0;u<n.length-1;++u){u===1&&t.multisample>1&&(d=this.getOptimalFilterTexture(l.width,l.height,t.resolution),d.filterFrame=l.filterFrame),n[u].apply(this,l,d,As.CLEAR,t);const h=l;l=d,d=h}n[u].apply(this,l,c.renderTexture,As.BLEND,t),u>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(d)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=As.CLEAR){const{renderTexture:n,state:s}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e==null?void 0:e.filterFrame){const o=this.tempRect;o.x=0,o.y=0,o.width=e.filterFrame.width,o.height=e.filterFrame.height,n.bind(e,e.filterFrame,o)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const r=s.stateId&1||this.forceClear;(t===As.CLEAR||t===As.BLIT&&r)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,n,s){const r=this.renderer;r.state.set(e.state),this.bindAndClear(n,s),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,r.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),r.geometry.bind(this.quadUv),r.geometry.draw(Ps.TRIANGLES)):(r.geometry.bind(this.quad),r.geometry.draw(Ps.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){const{sourceFrame:n,destinationFrame:s}=this.activeState,{orig:r}=t._texture,o=e.set(s.width,0,0,s.height,n.x,n.y),a=t.worldTransform.copyTo(zt.TEMP_MATRIX);return a.invert(),o.prepend(a),o.scale(1/r.width,1/r.height),o.translate(t.anchor.x,t.anchor.y),o}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,n=1,s=yn.NONE){return this.texturePool.getOptimalTexture(e,t,n,s)}getFilterTexture(e,t,n){if(typeof e=="number"){const r=e;e=t,t=r}e=e||this.activeState.renderTexture;const s=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,n||yn.NONE);return s.filterFrame=e.filterFrame,s}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){const n=qc[0],s=qc[1],r=qc[2],o=qc[3];n.set(t.left,t.top),s.set(t.left,t.bottom),r.set(t.right,t.top),o.set(t.right,t.bottom),e.apply(n,n),e.apply(s,s),e.apply(r,r),e.apply(o,o);const a=Math.min(n.x,s.x,r.x,o.x),c=Math.min(n.y,s.y,r.y,o.y),l=Math.max(n.x,s.x,r.x,o.x),d=Math.max(n.y,s.y,r.y,o.y);t.x=a,t.y=c,t.width=l-a,t.height=d-c}roundFrame(e,t,n,s,r){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(r){const{a:o,b:a,c,d:l}=r;if((Math.abs(a)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(l)>1e-4))return}r=r?Kf.copyFrom(r):Kf.identity(),r.translate(-n.x,-n.y).scale(s.width/n.width,s.height/n.height).translate(s.x,s.y),this.transformAABB(r,e),e.ceil(t),this.transformAABB(r.invert(),e)}}}Kw.extension={type:$e.RendererSystem,name:"filter"};He.add(Kw);class uI{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=yn.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const hI=new ht;class Jw{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new sm(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ht,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Xe.PREFER_ENV===Ko.WEBGL_LEGACY&&(t=null,n=null),t?e.drawBuffers=s=>t.drawBuffersWEBGL(s):(this.hasMRT=!1,e.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,n=0){const{gl:s}=this;if(e){const r=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,s.bindFramebuffer(s.FRAMEBUFFER,r.framebuffer)),r.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,r.mipLevel=n),r.dirtyId!==e.dirtyId&&(r.dirtyId=e.dirtyId,r.dirtyFormat!==e.dirtyFormat?(r.dirtyFormat=e.dirtyFormat,r.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):r.dirtySize!==e.dirtySize&&(r.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let o=0;o<e.colorTextures.length;o++){const a=e.colorTextures[o];this.renderer.texture.unbind(a.parentTextureArray||a)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),t){const o=t.width>>n,a=t.height>>n,c=o/t.width;this.setViewport(t.x*c,t.y*c,o,a)}else{const o=e.width>>n,a=e.height>>n;this.setViewport(0,0,o,a)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,n,s){const r=this.viewport;e=Math.round(e),t=Math.round(t),n=Math.round(n),s=Math.round(s),(r.width!==n||r.height!==s||r.x!==e||r.y!==t)&&(r.x=e,r.y=t,r.width=n,r.height=s,this.gl.viewport(e,t,n,s))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,t,n,s,r=zp.COLOR|zp.DEPTH){const{gl:o}=this;o.clearColor(e,t,n,s),o.clear(r)}initFramebuffer(e){const{gl:t}=this,n=new uI(t.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n}resizeFramebuffer(e){const{gl:t}=this,n=e.glFramebuffers[this.CONTEXT_UID];if(n.stencil){t.bindRenderbuffer(t.RENDERBUFFER,n.stencil);let o;this.renderer.context.webGLVersion===1?o=t.DEPTH_STENCIL:e.depth&&e.stencil?o=t.DEPTH24_STENCIL8:e.depth?o=t.DEPTH_COMPONENT24:o=t.STENCIL_INDEX8,n.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,o,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,o,e.width,e.height)}const s=e.colorTextures;let r=s.length;t.drawBuffers||(r=Math.min(r,1));for(let o=0;o<r;o++){const a=s[o],c=a.parentTextureArray||a;this.renderer.texture.bind(c,0),o===0&&n.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,n.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,c._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height))}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)}updateFramebuffer(e,t){const{gl:n}=this,s=e.glFramebuffers[this.CONTEXT_UID],r=e.colorTextures;let o=r.length;n.drawBuffers||(o=Math.min(o,1)),s.multisample>1&&this.canMultisampleFramebuffer(e)?s.msaaBuffer=s.msaaBuffer||n.createRenderbuffer():s.msaaBuffer&&(n.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));const a=[];for(let c=0;c<o;c++){const l=r[c],d=l.parentTextureArray||l;this.renderer.texture.bind(d,0),c===0&&s.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,s.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,s.multisample,d._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,s.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+c,l.target,d._glTextures[this.CONTEXT_UID].texture,t),a.push(n.COLOR_ATTACHMENT0+c))}if(a.length>1&&n.drawBuffers(a),e.depthTexture&&this.writeDepthTexture){const c=e.depthTexture;this.renderer.texture.bind(c,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,c._glTextures[this.CONTEXT_UID].texture,t)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){s.stencil=s.stencil||n.createRenderbuffer();let c,l;this.renderer.context.webGLVersion===1?(c=n.DEPTH_STENCIL_ATTACHMENT,l=n.DEPTH_STENCIL):e.depth&&e.stencil?(c=n.DEPTH_STENCIL_ATTACHMENT,l=n.DEPTH24_STENCIL8):e.depth?(c=n.DEPTH_ATTACHMENT,l=n.DEPTH_COMPONENT24):(c=n.STENCIL_ATTACHMENT,l=n.STENCIL_INDEX8),n.bindRenderbuffer(n.RENDERBUFFER,s.stencil),s.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,s.multisample,l,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,l,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,c,n.RENDERBUFFER,s.stencil)}else s.stencil&&(n.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:t}=this;let n=yn.NONE;if(e<=1||t===null)return n;for(let s=0;s<t.length;s++)if(t[s]<=e){n=t[s];break}return n===1&&(n=yn.NONE),n}blit(e,t,n){const{current:s,renderer:r,gl:o,CONTEXT_UID:a}=this;if(r.context.webGLVersion!==2||!s)return;const c=s.glFramebuffers[a];if(!c)return;if(!e){if(!c.msaaBuffer)return;const d=s.colorTextures[0];if(!d)return;c.blitFramebuffer||(c.blitFramebuffer=new sm(s.width,s.height),c.blitFramebuffer.addColorTexture(0,d)),e=c.blitFramebuffer,e.colorTextures[0]!==d&&(e.colorTextures[0]=d,e.dirtyId++,e.dirtyFormat++),(e.width!==s.width||e.height!==s.height)&&(e.width=s.width,e.height=s.height,e.dirtyId++,e.dirtySize++)}t||(t=hI,t.width=s.width,t.height=s.height),n||(n=t);const l=t.width===n.width&&t.height===n.height;this.bind(e),o.bindFramebuffer(o.READ_FRAMEBUFFER,c.framebuffer),o.blitFramebuffer(t.left,t.top,t.right,t.bottom,n.left,n.top,n.right,n.bottom,o.COLOR_BUFFER_BIT,l?o.NEAREST:o.LINEAR),o.bindFramebuffer(o.READ_FRAMEBUFFER,e.glFramebuffers[this.CONTEXT_UID].framebuffer)}disposeFramebuffer(e,t){const n=e.glFramebuffers[this.CONTEXT_UID],s=this.gl;if(!n)return;delete e.glFramebuffers[this.CONTEXT_UID];const r=this.managedFramebuffers.indexOf(e);r>=0&&this.managedFramebuffers.splice(r,1),e.disposeRunner.remove(this),t||(s.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&s.deleteRenderbuffer(n.msaaBuffer),n.stencil&&s.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,t)}disposeAll(e){const t=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<t.length;n++)this.disposeFramebuffer(t[n],e)}forceStencil(){const e=this.current;if(!e)return;const t=e.glFramebuffers[this.CONTEXT_UID];if(!t||t.stencil&&e.stencil)return;e.stencil=!0;const n=e.width,s=e.height,r=this.gl,o=t.stencil=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,o);let a,c;this.renderer.context.webGLVersion===1?(a=r.DEPTH_STENCIL_ATTACHMENT,c=r.DEPTH_STENCIL):e.depth?(a=r.DEPTH_STENCIL_ATTACHMENT,c=r.DEPTH24_STENCIL8):(a=r.STENCIL_ATTACHMENT,c=r.STENCIL_INDEX8),t.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,t.multisample,c,n,s):r.renderbufferStorage(r.RENDERBUFFER,c,n,s),r.framebufferRenderbuffer(r.FRAMEBUFFER,a,r.RENDERBUFFER,o)}reset(){this.current=this.unknownFramebuffer,this.viewport=new ht}destroy(){this.renderer=null}}Jw.extension={type:$e.RendererSystem,name:"framebuffer"};He.add(Jw);const Jf={5126:4,5123:2,5121:1};class Zw{constructor(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl,t=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,t.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;Xe.PREFER_ENV===Ko.WEBGL_LEGACY&&(n=null),n?(e.createVertexArray=()=>n.createVertexArrayOES(),e.bindVertexArray=s=>n.bindVertexArrayOES(s),e.deleteVertexArray=s=>n.deleteVertexArrayOES(s)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){const n=e.getExtension("ANGLE_instanced_arrays");n?(e.vertexAttribDivisor=(s,r)=>n.vertexAttribDivisorANGLE(s,r),e.drawElementsInstanced=(s,r,o,a,c)=>n.drawElementsInstancedANGLE(s,r,o,a,c),e.drawArraysInstanced=(s,r,o,a)=>n.drawArraysInstancedANGLE(s,r,o,a)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;const{gl:n}=this;let s=e.glVertexArrayObjects[this.CONTEXT_UID],r=!1;s||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=s={},r=!0);const o=s[t.program.id]||this.initGeometryVao(e,t,r);this._activeGeometry=e,this._activeVao!==o&&(this._activeVao=o,this.hasVao?n.bindVertexArray(o):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,t=this.renderer.buffer;for(let n=0;n<e.buffers.length;n++){const s=e.buffers[n];t.update(s)}}checkCompatibility(e,t){const n=e.attributes,s=t.attributeData;for(const r in s)if(!n[r])throw new Error(`shader and geometry incompatible, geometry missing the "${r}" attribute`)}getSignature(e,t){const n=e.attributes,s=t.attributeData,r=["g",e.id];for(const o in n)s[o]&&r.push(o,s[o].location);return r.join("-")}initGeometryVao(e,t,n=!0){const s=this.gl,r=this.CONTEXT_UID,o=this.renderer.buffer,a=t.program;a.glPrograms[r]||this.renderer.shader.generateProgram(t),this.checkCompatibility(e,a);const c=this.getSignature(e,a),l=e.glVertexArrayObjects[this.CONTEXT_UID];let d=l[c];if(d)return l[a.id]=d,d;const u=e.buffers,h=e.attributes,f={},p={};for(const m in u)f[m]=0,p[m]=0;for(const m in h)!h[m].size&&a.attributeData[m]?h[m].size=a.attributeData[m].size:h[m].size||console.warn(`PIXI Geometry attribute '${m}' size cannot be determined (likely the bound shader does not have the attribute)`),f[h[m].buffer]+=h[m].size*Jf[h[m].type];for(const m in h){const g=h[m],v=g.size;g.stride===void 0&&(f[g.buffer]===v*Jf[g.type]?g.stride=0:g.stride=f[g.buffer]),g.start===void 0&&(g.start=p[g.buffer],p[g.buffer]+=v*Jf[g.type])}d=s.createVertexArray(),s.bindVertexArray(d);for(let m=0;m<u.length;m++){const g=u[m];o.bind(g),n&&g._glBuffers[r].refCount++}return this.activateVao(e,a),l[a.id]=d,l[c]=d,s.bindVertexArray(null),o.unbind(Ls.ARRAY_BUFFER),d}disposeGeometry(e,t){var a;if(!this.managedGeometries[e.id])return;delete this.managedGeometries[e.id];const n=e.glVertexArrayObjects[this.CONTEXT_UID],s=this.gl,r=e.buffers,o=(a=this.renderer)==null?void 0:a.buffer;if(e.disposeRunner.remove(this),!!n){if(o)for(let c=0;c<r.length;c++){const l=r[c]._glBuffers[this.CONTEXT_UID];l&&(l.refCount--,l.refCount===0&&!t&&o.dispose(r[c],t))}if(!t){for(const c in n)if(c[0]==="g"){const l=n[c];this._activeVao===l&&this.unbind(),s.deleteVertexArray(l)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(e){const t=Object.keys(this.managedGeometries);for(let n=0;n<t.length;n++)this.disposeGeometry(this.managedGeometries[t[n]],e)}activateVao(e,t){const n=this.gl,s=this.CONTEXT_UID,r=this.renderer.buffer,o=e.buffers,a=e.attributes;e.indexBuffer&&r.bind(e.indexBuffer);let c=null;for(const l in a){const d=a[l],u=o[d.buffer],h=u._glBuffers[s];if(t.attributeData[l]){c!==h&&(r.bind(u),c=h);const f=t.attributeData[l].location;if(n.enableVertexAttribArray(f),n.vertexAttribPointer(f,d.size,d.type||n.FLOAT,d.normalized,d.stride,d.start),d.instance)if(this.hasInstance)n.vertexAttribDivisor(f,d.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,t,n,s){const{gl:r}=this,o=this._activeGeometry;if(o.indexBuffer){const a=o.indexBuffer.data.BYTES_PER_ELEMENT,c=a===2?r.UNSIGNED_SHORT:r.UNSIGNED_INT;a===2||a===4&&this.canUseUInt32ElementIndex?o.instanced?r.drawElementsInstanced(e,t||o.indexBuffer.data.length,c,(n||0)*a,s||1):r.drawElements(e,t||o.indexBuffer.data.length,c,(n||0)*a):console.warn("unsupported index buffer type: uint32")}else o.instanced?r.drawArraysInstanced(e,n,t||o.getSize(),s||1):r.drawArrays(e,n,t||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}Zw.extension={type:$e.RendererSystem,name:"geometry"};He.add(Zw);const B0=new zt;class $g{constructor(e,t){this._texture=e,this.mapCoord=new zt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof t>"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);const n=this.mapCoord;for(let s=0;s<e.length;s+=2){const r=e[s],o=e[s+1];t[s]=r*n.a+o*n.c+n.tx,t[s+1]=r*n.b+o*n.d+n.ty}return t}update(e){const t=this._texture;if(!t||!t.valid||!e&&this._textureID===t._updateID)return!1;this._textureID=t._updateID,this._updateID++;const n=t._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const s=t.orig,r=t.trim;r&&(B0.set(s.width/r.width,0,0,s.height/r.height,-r.x/r.width,-r.y/r.height),this.mapCoord.append(B0));const o=t.baseTexture,a=this.uClampFrame,c=this.clampMargin/o.resolution,l=this.clampOffset;return a[0]=(t._frame.x+c+l)/o.width,a[1]=(t._frame.y+c+l)/o.height,a[2]=(t._frame.x+t._frame.width-c+l)/o.width,a[3]=(t._frame.y+t._frame.height-c+l)/o.height,this.uClampOffset[0]=l/o.realWidth,this.uClampOffset[1]=l/o.realHeight,this.isSimple=t._frame.width===o.width&&t._frame.height===o.height&&t.rotate===0,!0}}var fI=`varying vec2 vMaskCoord;
|
||
varying vec2 vTextureCoord;
|
||
|
||
uniform sampler2D uSampler;
|
||
uniform sampler2D mask;
|
||
uniform float alpha;
|
||
uniform float npmAlpha;
|
||
uniform vec4 maskClamp;
|
||
|
||
void main(void)
|
||
{
|
||
float clip = step(3.5,
|
||
step(maskClamp.x, vMaskCoord.x) +
|
||
step(maskClamp.y, vMaskCoord.y) +
|
||
step(vMaskCoord.x, maskClamp.z) +
|
||
step(vMaskCoord.y, maskClamp.w));
|
||
|
||
vec4 original = texture2D(uSampler, vTextureCoord);
|
||
vec4 masky = texture2D(mask, vMaskCoord);
|
||
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
|
||
|
||
original *= (alphaMul * masky.r * alpha * clip);
|
||
|
||
gl_FragColor = original;
|
||
}
|
||
`,pI=`attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
uniform mat3 otherMatrix;
|
||
|
||
varying vec2 vMaskCoord;
|
||
varying vec2 vTextureCoord;
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
||
vTextureCoord = aTextureCoord;
|
||
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
|
||
}
|
||
`;class mI extends oi{constructor(e,t,n){let s=null;typeof e!="string"&&t===void 0&&n===void 0&&(s=e,e=void 0,t=void 0,n=void 0),super(e||pI,t||fI,n),this.maskSprite=s,this.maskMatrix=new zt}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,n,s){const r=this._maskSprite,o=r._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new $g(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,n,s))}}class gI{constructor(e=null){this.type=Cn.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=oi.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=Cn.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 Qw{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 n=t;if(!n.isMaskData){const r=this.maskDataPool.pop()||new gI;r.pooled=!0,r.maskObject=t,n=r}const s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(s),n._colorMask=s?s._colorMask:15,n.autoDetect&&this.detect(n),n._target=e,n.type!==Cn.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case Cn.SCISSOR:this.renderer.scissor.push(n);break;case Cn.STENCIL:this.renderer.stencil.push(n);break;case Cn.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case Cn.COLOR:this.pushColorMask(n);break}n.type===Cn.SPRITE&&this.maskStack.push(n)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case Cn.SCISSOR:this.renderer.scissor.pop(t);break;case Cn.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case Cn.SPRITE:this.popSpriteMask(t);break;case Cn.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===Cn.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=Cn.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=Cn.SCISSOR:e.type=Cn.STENCIL:e.type=Cn.COLOR}pushSpriteMask(e){const{maskObject:t}=e,n=e._target;let s=e._filters;s||(s=this.alphaMaskPool[this.alphaMaskIndex],s||(s=this.alphaMaskPool[this.alphaMaskIndex]=[new mI])),s[0].resolution=e.resolution,s[0].multisample=e.multisample,s[0].maskSprite=t;const r=n.filterArea;n.filterArea=t.getBounds(!0),this.renderer.filter.push(n,s),n.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,n=e._colorMask=t&e.colorMask;n!==t&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(e){const t=e._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==t&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Qw.extension={type:$e.RendererSystem,name:"mask"};He.add(Qw);class eS{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,n=this.getStackLength();this.maskStack=e;const s=this.getStackLength();s!==n&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const U0=new zt,V0=[],tS=class Md extends eS{constructor(e){super(e),this.glConst=Xe.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:n}=e,{renderer:s}=this,r=s.renderTexture,o=n.getBounds(!0,V0.pop()??new ht);this.roundFrameToPixels(o,r.current?r.current.resolution:s.resolution,r.sourceFrame,r.destinationFrame,s.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:n,c:s,d:r}=e;return(Math.abs(n)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(r)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||Md.isMatrixRotated(t.worldTransform)||Md.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const n=e._scissorRectLocal;return n.width>0&&n.height>0}roundFrameToPixels(e,t,n,s,r){Md.isMatrixRotated(r)||(r=r?U0.copyFrom(r):U0.identity(),r.translate(-n.x,-n.y).scale(s.width/n.width,s.height/n.height).translate(s.x,s.y),this.renderer.filter.transformAABB(r,e),e.fit(s),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&V0.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};tS.extension={type:$e.RendererSystem,name:"scissor"};let vI=tS;He.add(vI);class nS extends eS{constructor(e){super(e),this.glConst=Xe.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const t=e.maskObject,{gl:n}=this.renderer,s=e._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;const r=e._colorMask;r!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,s,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,r!==0&&(e._colorMask=r,n.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)),this._useCurrent()}pop(e){const t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=n?n._colorMask:15;s!==0&&(n._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,s!==0&&(n._colorMask=s,t.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}nS.extension={type:$e.RendererSystem,name:"stencil"};He.add(nS);class iS{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return yt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return yt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return yt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}iS.extension={type:[$e.RendererSystem,$e.CanvasRendererSystem],name:"_plugin"};He.add(iS);class sS{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new zt,this.transform=null}update(e,t,n,s){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,s),this.transform&&this.projectionMatrix.append(this.transform);const r=this.renderer;r.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,r.globalUniforms.update(),r.shader.shader&&r.shader.syncUniformGroup(r.shader.shader.uniforms.globals)}calculateProjection(e,t,n,s){const r=this.projectionMatrix,o=s?-1:1;r.identity(),r.a=1/t.width*2,r.d=o*(1/t.height*2),r.tx=-1-t.x*r.a,r.ty=-o-t.y*r.d}setTransform(e){}destroy(){this.renderer=null}}sS.extension={type:$e.RendererSystem,name:"projection"};He.add(sS);const bI=new Og,X0=new ht;class rS{constructor(e){this.renderer=e,this._tempMatrix=new zt}generateTexture(e,t){const{region:n,...s}=t||{},r=(n==null?void 0:n.copyTo(X0))||e.getLocalBounds(X0,!0),o=s.resolution||this.renderer.resolution;r.width=Math.max(r.width,1/o),r.height=Math.max(r.height,1/o),s.width=r.width,s.height=r.height,s.resolution=o,s.multisample??(s.multisample=this.renderer.multisample);const a=Jo.create(s);this._tempMatrix.tx=-r.x,this._tempMatrix.ty=-r.y;const c=e.transform;return e.transform=bI,this.renderer.render(e,{renderTexture:a,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=c,a}destroy(){}}rS.extension={type:[$e.RendererSystem,$e.CanvasRendererSystem],name:"textureGenerator"};He.add(rS);const bo=new ht,bl=new ht;class oS{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ht,this.destinationFrame=new ht,this.viewportFrame=new ht}contextChange(){var t;const e=(t=this.renderer)==null?void 0:t.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,n){const s=this.renderer;this.current=e;let r,o,a;e?(r=e.baseTexture,a=r.resolution,t||(bo.width=e.frame.width,bo.height=e.frame.height,t=bo),n||(bl.x=e.frame.x,bl.y=e.frame.y,bl.width=t.width,bl.height=t.height,n=bl),o=r.framebuffer):(a=s.resolution,t||(bo.width=s._view.screen.width,bo.height=s._view.screen.height,t=bo),n||(n=bo,n.width=t.width,n.height=t.height));const c=this.viewportFrame;c.x=n.x*a,c.y=n.y*a,c.width=n.width*a,c.height=n.height*a,e||(c.y=s.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(o,c),this.renderer.projection.update(n,t,a,!o),e?this.renderer.mask.setMaskStack(r.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(n)}clear(e,t){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=Ot.shared.setValue(e||n);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&s.premultiply(s.alpha);const r=this.destinationFrame,o=this.current?this.current.baseTexture:this.renderer._view.screen,a=r.width!==o.width||r.height!==o.height;if(a){let{x:c,y:l,width:d,height:u}=this.viewportFrame;c=Math.round(c),l=Math.round(l),d=Math.round(d),u=Math.round(u),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,l,d,u)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,t),a&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}oS.extension={type:$e.RendererSystem,name:"renderTexture"};He.add(oS);class yI{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function xI(i,e){const t={},n=e.getProgramParameter(i,e.ACTIVE_ATTRIBUTES);for(let s=0;s<n;s++){const r=e.getActiveAttrib(i,s);if(r.name.startsWith("gl_"))continue;const o=Yw(e,r.type),a={type:o,name:r.name,size:Xw(o),location:e.getAttribLocation(i,r.name)};t[r.name]=a}return t}function wI(i,e){const t={},n=e.getProgramParameter(i,e.ACTIVE_UNIFORMS);for(let s=0;s<n;s++){const r=e.getActiveUniform(i,s),o=r.name.replace(/\[.*?\]$/,""),a=!!r.name.match(/\[.*?\]$/),c=Yw(e,r.type);t[o]={name:o,index:s,type:c,size:r.size,isArray:a,value:Uw(c,r.size)}}return t}function SI(i,e){var a;const t=F0(i,i.VERTEX_SHADER,e.vertexSrc),n=F0(i,i.FRAGMENT_SHADER,e.fragmentSrc),s=i.createProgram();i.attachShader(s,t),i.attachShader(s,n);const r=(a=e.extra)==null?void 0:a.transformFeedbackVaryings;if(r&&(typeof i.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):i.transformFeedbackVaryings(s,r.names,r.bufferMode==="separate"?i.SEPARATE_ATTRIBS:i.INTERLEAVED_ATTRIBS)),i.linkProgram(s),i.getProgramParameter(s,i.LINK_STATUS)||Zk(i,s,t,n),e.attributeData=xI(s,i),e.uniformData=wI(s,i),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){const c=Object.keys(e.attributeData);c.sort((l,d)=>l>d?1:-1);for(let l=0;l<c.length;l++)e.attributeData[c[l]].location=l,i.bindAttribLocation(s,l,c[l]);i.linkProgram(s)}i.deleteShader(t),i.deleteShader(n);const o={};for(const c in e.uniformData){const l=e.uniformData[c];o[c]={location:i.getUniformLocation(s,c),value:Uw(l.type,l.size)}}return new yI(s,o)}function CI(i,e,t,n,s){t.buffer.update(s)}const AI={float:`
|
||
data[offset] = v;
|
||
`,vec2:`
|
||
data[offset] = v[0];
|
||
data[offset+1] = v[1];
|
||
`,vec3:`
|
||
data[offset] = v[0];
|
||
data[offset+1] = v[1];
|
||
data[offset+2] = v[2];
|
||
|
||
`,vec4:`
|
||
data[offset] = v[0];
|
||
data[offset+1] = v[1];
|
||
data[offset+2] = v[2];
|
||
data[offset+3] = v[3];
|
||
`,mat2:`
|
||
data[offset] = v[0];
|
||
data[offset+1] = v[1];
|
||
|
||
data[offset+4] = v[2];
|
||
data[offset+5] = v[3];
|
||
`,mat3:`
|
||
data[offset] = v[0];
|
||
data[offset+1] = v[1];
|
||
data[offset+2] = v[2];
|
||
|
||
data[offset + 4] = v[3];
|
||
data[offset + 5] = v[4];
|
||
data[offset + 6] = v[5];
|
||
|
||
data[offset + 8] = v[6];
|
||
data[offset + 9] = v[7];
|
||
data[offset + 10] = v[8];
|
||
`,mat4:`
|
||
for(var i = 0; i < 16; i++)
|
||
{
|
||
data[offset + i] = v[i];
|
||
}
|
||
`},aS={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function TI(i){const e=i.map(r=>({data:r,offset:0,dataLen:0,dirty:0}));let t=0,n=0,s=0;for(let r=0;r<e.length;r++){const o=e[r];if(t=aS[o.data.type],o.data.size>1&&(t=Math.max(t,16)*o.data.size),o.dataLen=t,n%t!==0&&n<16){const a=n%t%16;n+=a,s+=a}n+t>16?(s=Math.ceil(s/16)*16,o.offset=s,s+=t,n=t):(o.offset=s,n+=t,s+=t)}return s=Math.ceil(s/16)*16,{uboElements:e,size:s}}function EI(i,e){const t=[];for(const n in i)e[n]&&t.push(e[n]);return t.sort((n,s)=>n.index-s.index),t}function _I(i,e){if(!i.autoManage)return{size:0,syncFunc:CI};const t=EI(i.uniforms,e),{uboElements:n,size:s}=TI(t),r=[`
|
||
var v = null;
|
||
var v2 = null;
|
||
var cv = null;
|
||
var t = 0;
|
||
var gl = renderer.gl
|
||
var index = 0;
|
||
var data = buffer.data;
|
||
`];for(let o=0;o<n.length;o++){const a=n[o],c=i.uniforms[a.data.name],l=a.data.name;let d=!1;for(let u=0;u<La.length;u++){const h=La[u];if(h.codeUbo&&h.test(a.data,c)){r.push(`offset = ${a.offset/4};`,La[u].codeUbo(a.data.name,c)),d=!0;break}}if(!d)if(a.data.size>1){const u=Xw(a.data.type),h=Math.max(aS[a.data.type]/16,1),f=u/h,p=(4-f%4)%4;r.push(`
|
||
cv = ud.${l}.value;
|
||
v = uv.${l};
|
||
offset = ${a.offset/4};
|
||
|
||
t = 0;
|
||
|
||
for(var i=0; i < ${a.data.size*h}; i++)
|
||
{
|
||
for(var j = 0; j < ${f}; j++)
|
||
{
|
||
data[offset++] = v[t++];
|
||
}
|
||
offset += ${p};
|
||
}
|
||
|
||
`)}else{const u=AI[a.data.type];r.push(`
|
||
cv = ud.${l}.value;
|
||
v = uv.${l};
|
||
offset = ${a.offset/4};
|
||
${u};
|
||
`)}}return r.push(`
|
||
renderer.buffer.update(buffer);
|
||
`),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",r.join(`
|
||
`))}}let MI=0;const Kc={textureCount:0,uboCount:0};class lS{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=MI++}systemCheck(){if(!eI())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 n=e.program,s=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==n&&(this.program=n,this.gl.useProgram(s.program)),t||(Kc.textureCount=0,Kc.uboCount=0,this.syncUniformGroup(e.uniformGroup,Kc)),s}setUniforms(e){const t=this.shader.program,n=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(n.uniformData,e,this.renderer)}syncUniformGroup(e,t){const n=this.getGlProgram();(!e.static||e.dirtyId!==n.uniformDirtyGroups[e.id])&&(n.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,n,t))}syncUniforms(e,t,n){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,n)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=qk(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const n=this.getGlProgram();if(!e.static||e.dirtyId!==0||!n.uniformGroups[e.id]){e.dirtyId=0;const s=n.uniformGroups[e.id]||this.createSyncBufferGroup(e,n,t);e.buffer.update(),s(n.uniformData,e.uniforms,this.renderer,Kc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,n.uniformBufferBindings[t])}createSyncBufferGroup(e,t,n){const{gl:s}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,n);t.uniformBufferBindings[n]=this.shader.uniformBindCount,s.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]=_I(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,n){const s=e.uniforms,r=[`${n}-`];for(const o in s)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,n=e.program,s=SI(t,n);return n.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}lS.extension={type:$e.RendererSystem,name:"shader"};He.add(lS);class ru{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(){}}ru.defaultOptions={hello:!1},ru.extension={type:[$e.RendererSystem,$e.CanvasRendererSystem],name:"startup"};He.add(ru);function PI(i,e=[]){return e[Qe.NORMAL]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.ADD]=[i.ONE,i.ONE],e[Qe.MULTIPLY]=[i.DST_COLOR,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SCREEN]=[i.ONE,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.OVERLAY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.DARKEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.LIGHTEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR_DODGE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR_BURN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.HARD_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SOFT_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.DIFFERENCE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.EXCLUSION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.HUE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SATURATION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.LUMINOSITY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.NONE]=[0,0],e[Qe.NORMAL_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.ADD_NPM]=[i.SRC_ALPHA,i.ONE,i.ONE,i.ONE],e[Qe.SCREEN_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SRC_IN]=[i.DST_ALPHA,i.ZERO],e[Qe.SRC_OUT]=[i.ONE_MINUS_DST_ALPHA,i.ZERO],e[Qe.SRC_ATOP]=[i.DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],e[Qe.DST_OVER]=[i.ONE_MINUS_DST_ALPHA,i.ONE],e[Qe.DST_IN]=[i.ZERO,i.SRC_ALPHA],e[Qe.DST_OUT]=[i.ZERO,i.ONE_MINUS_SRC_ALPHA],e[Qe.DST_ATOP]=[i.ONE_MINUS_DST_ALPHA,i.SRC_ALPHA],e[Qe.XOR]=[i.ONE_MINUS_DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],e[Qe.SUBTRACT]=[i.ONE,i.ONE,i.ONE,i.ONE,i.FUNC_REVERSE_SUBTRACT,i.FUNC_ADD],e}const kI=0,II=1,RI=2,FI=3,LI=4,DI=5,cS=class rm{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Qe.NONE,this._blendEq=!1,this.map=[],this.map[kI]=this.setBlend,this.map[II]=this.setOffset,this.map[RI]=this.setCullFace,this.map[FI]=this.setDepthTest,this.map[LI]=this.setFrontFace,this.map[DI]=this.setDepthMask,this.checks=[],this.defaultState=new $s,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=PI(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,n=0;for(;t;)t&1&&this.map[n].call(this,!!(e.data&1<<n)),t=t>>1,n++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(rm.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(rm.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],n=this.gl;t.length===2?n.blendFunc(t[0],t[1]):n.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,n.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,n.blendEquationSeparate(n.FUNC_ADD,n.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const n=this.checks.indexOf(e);t&&n===-1?this.checks.push(e):!t&&n!==-1&&this.checks.splice(n,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};cS.extension={type:$e.RendererSystem,name:"state"};let OI=cS;He.add(OI);class NI extends Cc{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);const t=(e.priority??[]).filter(s=>e.systems[s]),n=[...t,...Object.keys(e.systems).filter(s=>!t.includes(s))];for(const s of n)this.addSystem(e.systems[s],s)}addRunners(...e){e.forEach(t=>{this.runners[t]=new ns(t)})}addSystem(e,t){const n=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=n,this._systemsHash[t]=n;for(const s in this.runners)this.runners[s].add(n);return this}emitWithCustomOptions(e,t){const n=Object.keys(this._systemsHash);e.items.forEach(s=>{const r=n.find(o=>this._systemsHash[o]===s);s[e.name](t[r])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const Pl=class Pd{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Pd.defaultMaxIdle,this.checkCountMax=Pd.defaultCheckCountMax,this.mode=Pd.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==Rg.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let n=!1;for(let s=0;s<t.length;s++){const r=t[s];r.resource&&this.count-r.touched>this.maxIdle&&(e.destroyTexture(r,!0),t[s]=null,n=!0)}if(n){let s=0;for(let r=0;r<t.length;r++)t[r]!==null&&(t[s++]=t[r]);t.length=s}}unload(e){const t=this.renderer.texture,n=e._texture;n&&!n.framebuffer&&t.destroyTexture(n);for(let s=e.children.length-1;s>=0;s--)this.unload(e.children[s])}destroy(){this.renderer=null}};Pl.defaultMode=Rg.AUTO,Pl.defaultMaxIdle=3600,Pl.defaultCheckCountMax=600,Pl.extension={type:$e.RendererSystem,name:"textureGC"};let To=Pl;He.add(To);class Zf{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=je.UNSIGNED_BYTE,this.internalFormat=Ie.RGBA,this.samplerType=0}}function $I(i){let e;return"WebGL2RenderingContext"in globalThis&&i instanceof globalThis.WebGL2RenderingContext?e={[i.RGB]:Ye.FLOAT,[i.RGBA]:Ye.FLOAT,[i.ALPHA]:Ye.FLOAT,[i.LUMINANCE]:Ye.FLOAT,[i.LUMINANCE_ALPHA]:Ye.FLOAT,[i.R8]:Ye.FLOAT,[i.R8_SNORM]:Ye.FLOAT,[i.RG8]:Ye.FLOAT,[i.RG8_SNORM]:Ye.FLOAT,[i.RGB8]:Ye.FLOAT,[i.RGB8_SNORM]:Ye.FLOAT,[i.RGB565]:Ye.FLOAT,[i.RGBA4]:Ye.FLOAT,[i.RGB5_A1]:Ye.FLOAT,[i.RGBA8]:Ye.FLOAT,[i.RGBA8_SNORM]:Ye.FLOAT,[i.RGB10_A2]:Ye.FLOAT,[i.RGB10_A2UI]:Ye.FLOAT,[i.SRGB8]:Ye.FLOAT,[i.SRGB8_ALPHA8]:Ye.FLOAT,[i.R16F]:Ye.FLOAT,[i.RG16F]:Ye.FLOAT,[i.RGB16F]:Ye.FLOAT,[i.RGBA16F]:Ye.FLOAT,[i.R32F]:Ye.FLOAT,[i.RG32F]:Ye.FLOAT,[i.RGB32F]:Ye.FLOAT,[i.RGBA32F]:Ye.FLOAT,[i.R11F_G11F_B10F]:Ye.FLOAT,[i.RGB9_E5]:Ye.FLOAT,[i.R8I]:Ye.INT,[i.R8UI]:Ye.UINT,[i.R16I]:Ye.INT,[i.R16UI]:Ye.UINT,[i.R32I]:Ye.INT,[i.R32UI]:Ye.UINT,[i.RG8I]:Ye.INT,[i.RG8UI]:Ye.UINT,[i.RG16I]:Ye.INT,[i.RG16UI]:Ye.UINT,[i.RG32I]:Ye.INT,[i.RG32UI]:Ye.UINT,[i.RGB8I]:Ye.INT,[i.RGB8UI]:Ye.UINT,[i.RGB16I]:Ye.INT,[i.RGB16UI]:Ye.UINT,[i.RGB32I]:Ye.INT,[i.RGB32UI]:Ye.UINT,[i.RGBA8I]:Ye.INT,[i.RGBA8UI]:Ye.UINT,[i.RGBA16I]:Ye.INT,[i.RGBA16UI]:Ye.UINT,[i.RGBA32I]:Ye.INT,[i.RGBA32UI]:Ye.UINT,[i.DEPTH_COMPONENT16]:Ye.FLOAT,[i.DEPTH_COMPONENT24]:Ye.FLOAT,[i.DEPTH_COMPONENT32F]:Ye.FLOAT,[i.DEPTH_STENCIL]:Ye.FLOAT,[i.DEPTH24_STENCIL8]:Ye.FLOAT,[i.DEPTH32F_STENCIL8]:Ye.FLOAT}:e={[i.RGB]:Ye.FLOAT,[i.RGBA]:Ye.FLOAT,[i.ALPHA]:Ye.FLOAT,[i.LUMINANCE]:Ye.FLOAT,[i.LUMINANCE_ALPHA]:Ye.FLOAT,[i.DEPTH_STENCIL]:Ye.FLOAT},e}function BI(i){let e;return"WebGL2RenderingContext"in globalThis&&i instanceof globalThis.WebGL2RenderingContext?e={[je.UNSIGNED_BYTE]:{[Ie.RGBA]:i.RGBA8,[Ie.RGB]:i.RGB8,[Ie.RG]:i.RG8,[Ie.RED]:i.R8,[Ie.RGBA_INTEGER]:i.RGBA8UI,[Ie.RGB_INTEGER]:i.RGB8UI,[Ie.RG_INTEGER]:i.RG8UI,[Ie.RED_INTEGER]:i.R8UI,[Ie.ALPHA]:i.ALPHA,[Ie.LUMINANCE]:i.LUMINANCE,[Ie.LUMINANCE_ALPHA]:i.LUMINANCE_ALPHA},[je.BYTE]:{[Ie.RGBA]:i.RGBA8_SNORM,[Ie.RGB]:i.RGB8_SNORM,[Ie.RG]:i.RG8_SNORM,[Ie.RED]:i.R8_SNORM,[Ie.RGBA_INTEGER]:i.RGBA8I,[Ie.RGB_INTEGER]:i.RGB8I,[Ie.RG_INTEGER]:i.RG8I,[Ie.RED_INTEGER]:i.R8I},[je.UNSIGNED_SHORT]:{[Ie.RGBA_INTEGER]:i.RGBA16UI,[Ie.RGB_INTEGER]:i.RGB16UI,[Ie.RG_INTEGER]:i.RG16UI,[Ie.RED_INTEGER]:i.R16UI,[Ie.DEPTH_COMPONENT]:i.DEPTH_COMPONENT16},[je.SHORT]:{[Ie.RGBA_INTEGER]:i.RGBA16I,[Ie.RGB_INTEGER]:i.RGB16I,[Ie.RG_INTEGER]:i.RG16I,[Ie.RED_INTEGER]:i.R16I},[je.UNSIGNED_INT]:{[Ie.RGBA_INTEGER]:i.RGBA32UI,[Ie.RGB_INTEGER]:i.RGB32UI,[Ie.RG_INTEGER]:i.RG32UI,[Ie.RED_INTEGER]:i.R32UI,[Ie.DEPTH_COMPONENT]:i.DEPTH_COMPONENT24},[je.INT]:{[Ie.RGBA_INTEGER]:i.RGBA32I,[Ie.RGB_INTEGER]:i.RGB32I,[Ie.RG_INTEGER]:i.RG32I,[Ie.RED_INTEGER]:i.R32I},[je.FLOAT]:{[Ie.RGBA]:i.RGBA32F,[Ie.RGB]:i.RGB32F,[Ie.RG]:i.RG32F,[Ie.RED]:i.R32F,[Ie.DEPTH_COMPONENT]:i.DEPTH_COMPONENT32F},[je.HALF_FLOAT]:{[Ie.RGBA]:i.RGBA16F,[Ie.RGB]:i.RGB16F,[Ie.RG]:i.RG16F,[Ie.RED]:i.R16F},[je.UNSIGNED_SHORT_5_6_5]:{[Ie.RGB]:i.RGB565},[je.UNSIGNED_SHORT_4_4_4_4]:{[Ie.RGBA]:i.RGBA4},[je.UNSIGNED_SHORT_5_5_5_1]:{[Ie.RGBA]:i.RGB5_A1},[je.UNSIGNED_INT_2_10_10_10_REV]:{[Ie.RGBA]:i.RGB10_A2,[Ie.RGBA_INTEGER]:i.RGB10_A2UI},[je.UNSIGNED_INT_10F_11F_11F_REV]:{[Ie.RGB]:i.R11F_G11F_B10F},[je.UNSIGNED_INT_5_9_9_9_REV]:{[Ie.RGB]:i.RGB9_E5},[je.UNSIGNED_INT_24_8]:{[Ie.DEPTH_STENCIL]:i.DEPTH24_STENCIL8},[je.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ie.DEPTH_STENCIL]:i.DEPTH32F_STENCIL8}}:e={[je.UNSIGNED_BYTE]:{[Ie.RGBA]:i.RGBA,[Ie.RGB]:i.RGB,[Ie.ALPHA]:i.ALPHA,[Ie.LUMINANCE]:i.LUMINANCE,[Ie.LUMINANCE_ALPHA]:i.LUMINANCE_ALPHA},[je.UNSIGNED_SHORT_5_6_5]:{[Ie.RGB]:i.RGB},[je.UNSIGNED_SHORT_4_4_4_4]:{[Ie.RGBA]:i.RGBA},[je.UNSIGNED_SHORT_5_5_5_1]:{[Ie.RGBA]:i.RGBA}},e}class dS{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new st,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=BI(e),this.samplerTypes=$I(e);const t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let s=0;s<t;s++)this.boundTextures[s]=null;this.emptyTextures={};const n=new Zf(e.createTexture());e.bindTexture(e.TEXTURE_2D,n.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=n,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new Zf(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let s=0;s<6;s++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let s=0;s<this.boundTextures.length;s++)this.bind(null,s)}bind(e,t=0){const{gl:n}=this;if(e=e==null?void 0:e.castToBaseTexture(),(e==null?void 0:e.valid)&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;const s=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[t]!==e&&(this.currentLocation!==t&&(this.currentLocation=t,n.activeTexture(n.TEXTURE0+t)),n.bindTexture(e.target,s.texture)),s.dirtyId!==e.dirtyId?(this.currentLocation!==t&&(this.currentLocation=t,n.activeTexture(n.TEXTURE0+t)),this.updateTexture(e)):s.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[t]=e}else this.currentLocation!==t&&(this.currentLocation=t,n.activeTexture(n.TEXTURE0+t)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[t]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){const{gl:t,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let s=0;s<n.length;s++)n[s]===this.unknownTexture&&this.bind(null,s)}for(let s=0;s<n.length;s++)n[s]===e&&(this.currentLocation!==s&&(t.activeTexture(t.TEXTURE0+s),this.currentLocation=s),t.bindTexture(e.target,this.emptyTextures[e.target].texture),n[s]=null)}ensureSamplerType(e){const{boundTextures:t,hasIntegerTextures:n,CONTEXT_UID:s}=this;if(n)for(let r=e-1;r>=0;--r){const o=t[r];o&&o._glTextures[s].samplerType!==Ye.FLOAT&&this.renderer.texture.unbind(o)}}initTexture(e){const t=new Zf(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){var n;t.internalFormat=((n=this.internalFormats[e.type])==null?void 0:n[e.format])??e.format,t.samplerType=this.samplerTypes[t.internalFormat]??Ye.FLOAT,this.webGLVersion===2&&e.type===je.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){var s;const t=e._glTextures[this.CONTEXT_UID];if(!t)return;const n=this.renderer;if(this.initTextureType(e,t),(s=e.resource)==null?void 0:s.upload(n,e,t))t.samplerType!==Ye.FLOAT&&(this.hasIntegerTextures=!0);else{const r=e.realWidth,o=e.realHeight,a=n.gl;(t.width!==r||t.height!==o||t.dirtyId<0)&&(t.width=r,t.height=o,a.texImage2D(e.target,0,t.internalFormat,r,o,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){const{gl:n}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){const s=this.managedTextures.indexOf(e);s!==-1&&Fa(this.managedTextures,s,1)}}updateTextureStyle(e){var n;const t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===Bi.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=ts.CLAMP:t.wrapMode=e.wrapMode,(n=e.resource)!=null&&n.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){const n=this.gl;if(t.mipmap&&e.mipmap!==Bi.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,t.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ki.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const s=this.renderer.context.extensions.anisotropicFiltering;if(s&&e.anisotropicLevel>0&&e.scaleMode===Ki.LINEAR){const r=Math.min(e.anisotropicLevel,n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,s.TEXTURE_MAX_ANISOTROPY_EXT,r)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ki.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Ki.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}dS.extension={type:$e.RendererSystem,name:"texture"};He.add(dS);class uS{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:n}=this,s=e._glTransformFeedbacks[n]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,s)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){const{gl:n,renderer:s}=this;t&&s.shader.bind(t),n.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:t,renderer:n,CONTEXT_UID:s}=this,r=t.createTransformFeedback();e._glTransformFeedbacks[s]=r,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,r);for(let o=0;o<e.buffers.length;o++){const a=e.buffers[o];a&&(n.buffer.update(a),a._glBuffers[s].refCount++,t.bindBufferBase(t.TRANSFORM_FEEDBACK_BUFFER,o,a._glBuffers[s].buffer||null))}return t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),r}disposeTransformFeedback(e,t){const n=e._glTransformFeedbacks[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this);const r=this.renderer.buffer;if(r)for(let o=0;o<e.buffers.length;o++){const a=e.buffers[o];if(!a)continue;const c=a._glBuffers[this.CONTEXT_UID];c&&(c.refCount--,c.refCount===0&&!t&&r.dispose(a,t))}n&&(t||s.deleteTransformFeedback(n),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}uS.extension={type:$e.RendererSystem,name:"transformFeedback"};He.add(uS);class ou{constructor(e){this.renderer=e}init(e){this.screen=new ht(0,0,e.width,e.height),this.element=e.view||Xe.ADAPTER.createCanvas(),this.resolution=e.resolution||Xe.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,t){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(t*this.resolution);const n=this.element.width/this.resolution,s=this.element.height/this.resolution;this.screen.width=n,this.screen.height=s,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${s}px`),this.renderer.emit("resize",n,s),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){var t;e&&((t=this.element.parentNode)==null||t.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}ou.defaultOptions={width:800,height:600,resolution:void 0,autoDensity:!1},ou.extension={type:[$e.RendererSystem,$e.CanvasRendererSystem],name:"_view"};He.add(ou);Xe.PREFER_ENV=Ko.WEBGL2;Xe.STRICT_TEXTURE_CACHE=!1;Xe.RENDER_OPTIONS={...su.defaultOptions,...iu.defaultOptions,...ou.defaultOptions,...ru.defaultOptions};Object.defineProperties(Xe,{WRAP_MODE:{get(){return st.defaultOptions.wrapMode},set(i){yt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),st.defaultOptions.wrapMode=i}},SCALE_MODE:{get(){return st.defaultOptions.scaleMode},set(i){yt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),st.defaultOptions.scaleMode=i}},MIPMAP_TEXTURES:{get(){return st.defaultOptions.mipmap},set(i){yt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),st.defaultOptions.mipmap=i}},ANISOTROPIC_LEVEL:{get(){return st.defaultOptions.anisotropicLevel},set(i){yt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),st.defaultOptions.anisotropicLevel=i}},FILTER_RESOLUTION:{get(){return yt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),oi.defaultResolution},set(i){oi.defaultResolution=i}},FILTER_MULTISAMPLE:{get(){return yt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),oi.defaultMultisample},set(i){oi.defaultMultisample=i}},SPRITE_MAX_TEXTURES:{get(){return Nr.defaultMaxTextures},set(i){yt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),Nr.defaultMaxTextures=i}},SPRITE_BATCH_SIZE:{get(){return Nr.defaultBatchSize},set(i){yt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),Nr.defaultBatchSize=i}},CAN_UPLOAD_SAME_BUFFER:{get(){return Nr.canUploadSameBuffer},set(i){yt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),Nr.canUploadSameBuffer=i}},GC_MODE:{get(){return To.defaultMode},set(i){yt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),To.defaultMode=i}},GC_MAX_IDLE:{get(){return To.defaultMaxIdle},set(i){yt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),To.defaultMaxIdle=i}},GC_MAX_CHECK_COUNT:{get(){return To.defaultCheckCountMax},set(i){yt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),To.defaultCheckCountMax=i}},PRECISION_VERTEX:{get(){return ks.defaultVertexPrecision},set(i){yt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),ks.defaultVertexPrecision=i}},PRECISION_FRAGMENT:{get(){return ks.defaultFragmentPrecision},set(i){yt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),ks.defaultFragmentPrecision=i}}});var jo=(i=>(i[i.INTERACTION=50]="INTERACTION",i[i.HIGH=25]="HIGH",i[i.NORMAL=0]="NORMAL",i[i.LOW=-25]="LOW",i[i.UTILITY=-50]="UTILITY",i))(jo||{});class Qf{constructor(e,t=null,n=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=n,this.once=s}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const t=this.next;return this.next=e?null:t,this.previous=null,t}}const hS=class xi{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Qf(null,null,1/0),this.deltaMS=1/xi.targetFPMS,this.elapsedMS=1/xi.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,n=jo.NORMAL){return this._addListener(new Qf(e,t,n))}addOnce(e,t,n=jo.NORMAL){return this._addListener(new Qf(e,t,n,!0))}_addListener(e){let t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,t){let n=this._head.next;for(;n;)n.match(e,t)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const r=e-this._lastFrame|0;if(r<this._minElapsedMS)return;this._lastFrame=e-r%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*xi.targetFPMS;const n=this._head;let s=n.next;for(;s;)s=s.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),n=Math.min(Math.max(0,t)/1e3,xi.targetFPMS);this._maxElapsedMS=1/n}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!xi._shared){const e=xi._shared=new xi;e.autoStart=!0,e._protected=!0}return xi._shared}static get system(){if(!xi._system){const e=xi._system=new xi;e.autoStart=!0,e._protected=!0}return xi._system}};hS.targetFPMS=.06;let ai=hS;Object.defineProperties(Xe,{TARGET_FPMS:{get(){return ai.targetFPMS},set(i){yt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),ai.targetFPMS=i}}});class fS{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,jo.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?ai.shared:new ai,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}fS.extension=$e.Application;He.add(fS);const pS=[];He.handleByList($e.Renderer,pS);function UI(i){for(const e of pS)if(e.test(i))return new e(i);throw new Error("Unable to auto-detect a suitable renderer.")}var VI=`attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
vTextureCoord = aTextureCoord;
|
||
}`,XI=`attribute vec2 aVertexPosition;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
uniform vec4 inputSize;
|
||
uniform vec4 outputFrame;
|
||
|
||
vec4 filterVertexPosition( void )
|
||
{
|
||
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
||
|
||
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
||
}
|
||
|
||
vec2 filterTextureCoord( void )
|
||
{
|
||
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
||
}
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = filterVertexPosition();
|
||
vTextureCoord = filterTextureCoord();
|
||
}
|
||
`;const YI=VI,mS=XI;class gS{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const n=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,n)}else{const n=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,n)}t>=yn.HIGH?this.multisample=yn.HIGH:t>=yn.MEDIUM?this.multisample=yn.MEDIUM:t>=yn.LOW?this.multisample=yn.LOW:this.multisample=yn.NONE}destroy(){}}gS.extension={type:$e.RendererSystem,name:"_multisample"};He.add(gS);class zI{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class vS{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:n}=this,s=e._glBuffers[n]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:n,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,n.bindBufferBase(n.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,n){const{gl:s,CONTEXT_UID:r}=this;n=n||0;const o=e._glBuffers[r]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,o.buffer,n*256,256)}update(e){const{gl:t,CONTEXT_UID:n}=this,s=e._glBuffers[n]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.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 n=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),n&&(t||s.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let n=0;n<t.length;n++)this.dispose(this.managedBuffers[t[n]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:n}=this;return e._glBuffers[t]=new zI(n.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}vS.extension={type:$e.RendererSystem,name:"buffer"};He.add(vS);class bS{constructor(e){this.renderer=e}render(e,t){const n=this.renderer;let s,r,o,a;if(t&&(s=t.renderTexture,r=t.clear,o=t.transform,a=t.skipUpdateTransform),this.renderingToScreen=!s,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=o,!n.context.isLost){if(s||(this.lastObjectRendered=e),!a){const c=e.enableTempParent();e.updateTransform(),e.disableTempParent(c)}n.renderTexture.bind(s),n.batch.currentRenderer.start(),(r??n.background.clearBeforeRender)&&n.renderTexture.clear(),e.render(n),n.batch.currentRenderer.flush(),s&&(t.blit&&n.framebuffer.blit(),s.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}bS.extension={type:$e.RendererSystem,name:"objectRenderer"};He.add(bS);const kd=class om extends NI{constructor(e){super(),this.type=bw.WEBGL,e=Object.assign({},Xe.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new is({projectionMatrix:new zt},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:om.__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&&(yt("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=om.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:pk()}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 this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return yt("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return yt("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return yt("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return yt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){yt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return yt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){yt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return yt("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};kd.extension={type:$e.Renderer,priority:1},kd.__plugins={},kd.__systems={};let Bg=kd;He.handleByMap($e.RendererPlugin,Bg.__plugins);He.handleByMap($e.RendererSystem,Bg.__systems);He.add(Bg);class yS extends rc{constructor(e,t){const{width:n,height:s}=t||{};super(n,s),this.items=[],this.itemDirtyIds=[];for(let r=0;r<e;r++){const o=new st;this.items.push(o),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,t){for(let n=0;n<this.length;n++)e[n]&&(e[n].castToBaseTexture?this.addBaseTextureAt(e[n].castToBaseTexture(),n):e[n]instanceof rc?this.addResourceAt(e[n],n):this.addResourceAt(Nw(e[n],t),n))}dispose(){for(let e=0,t=this.length;e<t;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,t){if(!this.items[t])throw new Error(`Index ${t} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[t].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let t=0;t<this.length;t++)this.items[t].parentTextureArray=e,this.items[t].on("update",e.update,e)}unbind(e){super.unbind(e);for(let t=0;t<this.length;t++)this.items[t].parentTextureArray=null,this.items[t].off("update",e.update,e)}load(){if(this._load)return this._load;const e=this.items.map(t=>t.resource).filter(t=>t).map(t=>t.load());return this._load=Promise.all(e).then(()=>{const{realWidth:t,realHeight:n}=this.items[0];return this.resize(t,n),this.update(),Promise.resolve(this)}),this._load}}class jI extends yS{constructor(e,t){const{width:n,height:s}=t||{};let r,o;Array.isArray(e)?(r=e,o=e.length):o=e,super(o,{width:n,height:s}),r&&this.initFromArray(r,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=Ra.TEXTURE_2D_ARRAY}upload(e,t,n){const{length:s,itemDirtyIds:r,items:o}=this,{gl:a}=e;n.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,s,0,t.format,n.type,null);for(let c=0;c<s;c++){const l=o[c];r[c]<l.dirtyId&&(r[c]=l.dirtyId,l.valid&&a.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,c,l.resource.width,l.resource.height,1,t.format,n.type,l.resource.source))}return!0}}class HI extends yr{constructor(e){super(e)}static test(e){const{OffscreenCanvas:t}=globalThis;return t&&e instanceof t?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}}const xS=class kl extends yS{constructor(e,t){const{width:n,height:s,autoLoad:r,linkBaseTexture:o}=t||{};if(e&&e.length!==kl.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:n,height:s});for(let a=0;a<kl.SIDES;a++)this.items[a].target=Ra.TEXTURE_CUBE_MAP_POSITIVE_X+a;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,t),r!==!1&&this.load()}bind(e){super.bind(e),e.target=Ra.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,n){if(n===void 0&&(n=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Ra.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,n){const s=this.itemDirtyIds;for(let r=0;r<kl.SIDES;r++){const o=this.items[r];(s[r]<o.dirtyId||n.dirtyId<t.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(e,o,n),s[r]=o.dirtyId):s[r]<-1&&(e.gl.texImage2D(o.target,0,n.internalFormat,t.realWidth,t.realHeight,0,t.format,n.type,null),s[r]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===kl.SIDES}};xS.SIDES=6;let GI=xS;class Ca extends yr{constructor(e,t){t=t||{};let n,s,r;typeof e=="string"?(n=Ca.EMPTY,s=e,r=!0):(n=e,s=null,r=!1),super(n),this.url=s,this.crossOrigin=t.crossOrigin??!0,this.alphaMode=typeof t.alphaMode=="number"?t.alphaMode:null,this.ownsImageBitmap=t.ownsImageBitmap??r,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,t)=>{if(this.url===null){e(this);return}try{const n=await Xe.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const s=await n.blob();if(this.destroyed)return;const r=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Fn.UNPACK?"premultiply":"none"});if(this.destroyed){r.close();return}this.source=r,this.update(),e(this)}catch(n){if(this.destroyed)return;t(n),this.onError.emit(n)}}),this._load)}upload(e,t,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,n)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return Ca._EMPTY=Ca._EMPTY??Xe.ADAPTER.createCanvas(0,0),Ca._EMPTY}}const am=class Id extends yr{constructor(e,t){t=t||{},super(Xe.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},Id.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;yr.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,n=e.height;if(!t||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let s=t*this.scale,r=n*this.scale;(this._overrideWidth||this._overrideHeight)&&(s=this._overrideWidth||this._overrideHeight/n*t,r=this._overrideHeight||this._overrideWidth/t*n),s=Math.round(s),r=Math.round(r);const o=this.source;o.width=s,o.height=r,o._pixiId=`canvas_${zo()}`,o.getContext("2d").drawImage(e,0,0,t,n,0,0,s,r),this._resolve(),this._resolve=null}}static getSize(e){const t=Id.SVG_SIZE.exec(e),n={};return t&&(n[t[1]]=Math.round(parseFloat(t[3])),n[t[5]]=Math.round(parseFloat(t[7]))),n}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Id.SVG_XML.test(e)}};am.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,am.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let lm=am;class WI extends yr{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const cm=class dm extends yr{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const n=document.createElement("video");t.autoLoad!==!1&&n.setAttribute("preload","auto"),t.playsinline!==!1&&(n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline","")),t.muted===!0&&(n.setAttribute("muted",""),n.muted=!0),t.loop===!0&&n.setAttribute("loop",""),t.autoPlay!==!1&&n.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const s=e[0].src||e[0];yr.crossOrigin(n,s,t.crossorigin);for(let r=0;r<e.length;++r){const o=document.createElement("source");let{src:a,mime:c}=e[r];if(a=a||e[r],a.startsWith("data:"))c=a.slice(5,a.indexOf(";"));else if(!a.startsWith("blob:")){const l=a.split("?").shift().toLowerCase(),d=l.slice(l.lastIndexOf(".")+1);c=c||dm.MIME_TYPES[d]||`video/${d}`}o.src=a,c&&(o.type=c),n.appendChild(o)}e=n}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){if(this._updateFPS){const t=ai.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}_videoFrameRequestCallback(){this.update(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback)}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart),e.addEventListener("pause",this._onPlayStop),e.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise((t,n)=>{this.valid?t(this):(this._resolve=t,this._reject=n,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!t&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(ai.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(ai.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(ai.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||dm.TYPES.includes(t)}};cm.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],cm.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let wS=cm;Kp.push(Ca,Gw,HI,wS,WI,lm,lh,GI,jI);class oc{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?ht.EMPTY:(e=e||new ht(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){const{a:n,b:s,c:r,d:o,tx:a,ty:c}=e,l=n*t.x+r*t.y+a,d=s*t.x+o*t.y+c;this.minX=Math.min(this.minX,l),this.maxX=Math.max(this.maxX,l),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(e){let t=this.minX,n=this.minY,s=this.maxX,r=this.maxY,o=e[0],a=e[1];t=o<t?o:t,n=a<n?a:n,s=o>s?o:s,r=a>r?a:r,o=e[2],a=e[3],t=o<t?o:t,n=a<n?a:n,s=o>s?o:s,r=a>r?a:r,o=e[4],a=e[5],t=o<t?o:t,n=a<n?a:n,s=o>s?o:s,r=a>r?a:r,o=e[6],a=e[7],t=o<t?o:t,n=a<n?a:n,s=o>s?o:s,r=a>r?a:r,this.minX=t,this.minY=n,this.maxX=s,this.maxY=r}addFrame(e,t,n,s,r){this.addFrameMatrix(e.worldTransform,t,n,s,r)}addFrameMatrix(e,t,n,s,r){const o=e.a,a=e.b,c=e.c,l=e.d,d=e.tx,u=e.ty;let h=this.minX,f=this.minY,p=this.maxX,m=this.maxY,g=o*t+c*n+d,v=a*t+l*n+u;h=g<h?g:h,f=v<f?v:f,p=g>p?g:p,m=v>m?v:m,g=o*s+c*n+d,v=a*s+l*n+u,h=g<h?g:h,f=v<f?v:f,p=g>p?g:p,m=v>m?v:m,g=o*t+c*r+d,v=a*t+l*r+u,h=g<h?g:h,f=v<f?v:f,p=g>p?g:p,m=v>m?v:m,g=o*s+c*r+d,v=a*s+l*r+u,h=g<h?g:h,f=v<f?v:f,p=g>p?g:p,m=v>m?v:m,this.minX=h,this.minY=f,this.maxX=p,this.maxY=m}addVertexData(e,t,n){let s=this.minX,r=this.minY,o=this.maxX,a=this.maxY;for(let c=t;c<n;c+=2){const l=e[c],d=e[c+1];s=l<s?l:s,r=d<r?d:r,o=l>o?l:o,a=d>a?d:a}this.minX=s,this.minY=r,this.maxX=o,this.maxY=a}addVertices(e,t,n,s){this.addVerticesMatrix(e.worldTransform,t,n,s)}addVerticesMatrix(e,t,n,s,r=0,o=r){const a=e.a,c=e.b,l=e.c,d=e.d,u=e.tx,h=e.ty;let f=this.minX,p=this.minY,m=this.maxX,g=this.maxY;for(let v=n;v<s;v+=2){const y=t[v],b=t[v+1],x=a*y+l*b+u,T=d*b+c*y+h;f=Math.min(f,x-r),m=Math.max(m,x+r),p=Math.min(p,T-o),g=Math.max(g,T+o)}this.minX=f,this.minY=p,this.maxX=m,this.maxY=g}addBounds(e){const t=this.minX,n=this.minY,s=this.maxX,r=this.maxY;this.minX=e.minX<t?e.minX:t,this.minY=e.minY<n?e.minY:n,this.maxX=e.maxX>s?e.maxX:s,this.maxY=e.maxY>r?e.maxY:r}addBoundsMask(e,t){const n=e.minX>t.minX?e.minX:t.minX,s=e.minY>t.minY?e.minY:t.minY,r=e.maxX<t.maxX?e.maxX:t.maxX,o=e.maxY<t.maxY?e.maxY:t.maxY;if(n<=r&&s<=o){const a=this.minX,c=this.minY,l=this.maxX,d=this.maxY;this.minX=n<a?n:a,this.minY=s<c?s:c,this.maxX=r>l?r:l,this.maxY=o>d?o:d}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){const n=e.minX>t.x?e.minX:t.x,s=e.minY>t.y?e.minY:t.y,r=e.maxX<t.x+t.width?e.maxX:t.x+t.width,o=e.maxY<t.y+t.height?e.maxY:t.y+t.height;if(n<=r&&s<=o){const a=this.minX,c=this.minY,l=this.maxX,d=this.maxY;this.minX=n<a?n:a,this.minY=s<c?s:c,this.maxX=r>l?r:l,this.maxY=o>d?o:d}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,n,s,r,o){e-=r,t-=o,n+=r,s+=o,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<t?this.minY:t,this.maxY=this.maxY>s?this.maxY:s}}class cn extends Cc{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Og,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new oc,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const t=Object.keys(e);for(let n=0;n<t.length;++n){const s=t[n];Object.defineProperty(cn.prototype,s,Object.getOwnPropertyDescriptor(e,s))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(e,t){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),t||(this._boundsRect||(this._boundsRect=new ht),t=this._boundsRect),this._bounds.getRectangle(t)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new ht),e=this._localBoundsRect),this._localBounds||(this._localBounds=new oc);const t=this.transform,n=this.parent;this.parent=null,this._tempDisplayObjectParent.worldAlpha=(n==null?void 0:n.worldAlpha)??1,this.transform=this._tempDisplayObjectParent.transform;const s=this._bounds,r=this._boundsID;this._bounds=this._localBounds;const o=this.getBounds(!1,e);return this.parent=n,this.transform=t,this._bounds=s,this._bounds.updateID+=this._boundsID-r,o}toGlobal(e,t,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,t)}toLocal(e,t,n,s){return t&&(e=t.toGlobal(e,n,s)),s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,n)}setParent(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e}removeFromParent(){var e;(e=this.parent)==null||e.removeChild(this)}setTransform(e=0,t=0,n=1,s=1,r=0,o=0,a=0,c=0,l=0){return this.position.x=e,this.position.y=t,this.scale.x=n||1,this.scale.y=s||1,this.rotation=r,this.skew.x=o,this.skew.y=a,this.pivot.x=c,this.pivot.y=l,this}destroy(e){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new qI),this.tempDisplayObjectParent}enableTempParent(){const e=this.parent;return this.parent=this._tempDisplayObjectParent,e}disableTempParent(e){this.parent=e}get x(){return this.position.x}set x(e){this.transform.position.x=e}get y(){return this.position.y}set y(e){this.transform.position.y=e}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(e){this.transform.position.copyFrom(e)}get scale(){return this.transform.scale}set scale(e){this.transform.scale.copyFrom(e)}get pivot(){return this.transform.pivot}set pivot(e){this.transform.pivot.copyFrom(e)}get skew(){return this.transform.skew}set skew(e){this.transform.skew.copyFrom(e)}get rotation(){return this.transform.rotation}set rotation(e){this.transform.rotation=e}get angle(){return this.transform.rotation*Xk}set angle(e){this.transform.rotation=e*Yk}get zIndex(){return this._zIndex}set zIndex(e){this._zIndex!==e&&(this._zIndex=e,this.parent&&(this.parent.sortDirty=!0))}get worldVisible(){let e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}get mask(){return this._mask}set mask(e){if(this._mask!==e){if(this._mask){const t=this._mask.isMaskData?this._mask.maskObject:this._mask;t&&(t._maskRefCount--,t._maskRefCount===0&&(t.renderable=!0,t.isMask=!1))}if(this._mask=e,this._mask){const t=this._mask.isMaskData?this._mask.maskObject:this._mask;t&&(t._maskRefCount===0&&(t.renderable=!1,t.isMask=!0),t._maskRefCount++)}}}}class qI extends cn{constructor(){super(...arguments),this.sortDirty=null}}cn.prototype.displayObjectUpdateTransform=cn.prototype.updateTransform;const KI=new zt;function JI(i,e){return i.zIndex===e.zIndex?i._lastSortedIndex-e._lastSortedIndex:i.zIndex-e.zIndex}const SS=class um extends cn{constructor(){super(),this.children=[],this.sortableChildren=um.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const n=this.getChildIndex(e),s=this.getChildIndex(t);this.children[n]=t,this.children[s]=e,this.onChildrenChange(n<s?n:s)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const n=this.getChildIndex(e);Fa(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],n=this.children.indexOf(t);if(n===-1)return null;t.parent=null,t.transform._parentID=-1,Fa(this.children,n,1),this._boundsID++,this.onChildrenChange(n),t.emit("removed",this),this.emit("childRemoved",t,this,n)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,Fa(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const n=e,s=t,r=s-n;let o;if(r>0&&r<=s){o=this.children.splice(n,r);for(let a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<o.length;++a)o[a].emit("removed",this),this.emit("childRemoved",o[a],this,a);return o}else if(r===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,n=this.children.length;t<n;++t){const s=this.children[t];s._lastSortedIndex=t,!e&&s.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(JI),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const n=this.children[e];n.visible&&n.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const n=t._mask.isMaskData?t._mask.maskObject:t._mask;n?(n.calculateBounds(),this._bounds.addBoundsMask(t._bounds,n._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const n=super.getLocalBounds(e);if(!t)for(let s=0,r=this.children.length;s<r;++s){const o=this.children[s];o.visible&&o.updateTransform()}return n}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let n,s;this.cullArea?(n=this.cullArea,s=this.worldTransform):this._render!==um.prototype._render&&(n=this.getBounds(!0));const r=e.projection.transform;if(r&&(s?(s=KI.copyFrom(s),s.prepend(r)):s=r),n&&t.intersects(n,s))this._render(e);else if(this.cullArea)return;for(let o=0,a=this.children.length;o<a;++o){const c=this.children[o],l=c.cullable;c.cullable=l||!this.cullArea,c.render(e),c.cullable=l}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let n=0,s=this.children.length;n<s;++n)this.children[n].render(e)}}renderAdvanced(e){var r,o,a;const t=this.filters,n=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let c=0;c<t.length;c++)t[c].enabled&&this._enabledFilters.push(t[c])}const s=t&&((r=this._enabledFilters)==null?void 0:r.length)||n&&(!n.isMaskData||n.enabled&&(n.autoDetect||n.type!==Cn.NONE));if(s&&e.batch.flush(),t&&((o=this._enabledFilters)!=null&&o.length)&&e.filter.push(this,this._enabledFilters),n&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let c=0,l=this.children.length;c<l;++c)this.children[c].render(e)}s&&e.batch.flush(),n&&e.mask.pop(this),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,n=this.removeChildren(0,this.children.length);if(t)for(let s=0;s<n.length;++s)n[s].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};SS.defaultSortableChildren=!1;let Mn=SS;Mn.prototype.containerUpdateTransform=Mn.prototype.updateTransform;Object.defineProperties(Xe,{SORTABLE_CHILDREN:{get(){return Mn.defaultSortableChildren},set(i){yt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Mn.defaultSortableChildren=i}}});const yl=new Pt,ZI=new Uint16Array([0,1,2,0,2,3]);class oo extends Mn{constructor(e){super(),this._anchor=new ir(this._onAnchorUpdate,this,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new Ot(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Qe.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=e||tt.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=ZI,this.pluginName="batch",this.isSprite=!0,this._roundPixels=Xe.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Gr(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Gr(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const e=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===e._updateID)return;this._textureID!==e._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=e._updateID;const t=this.transform.worldTransform,n=t.a,s=t.b,r=t.c,o=t.d,a=t.tx,c=t.ty,l=this.vertexData,d=e.trim,u=e.orig,h=this._anchor;let f=0,p=0,m=0,g=0;if(d?(p=d.x-h._x*u.width,f=p+d.width,g=d.y-h._y*u.height,m=g+d.height):(p=-h._x*u.width,f=p+u.width,g=-h._y*u.height,m=g+u.height),l[0]=n*p+r*g+a,l[1]=o*g+s*p+c,l[2]=n*f+r*g+a,l[3]=o*g+s*f+c,l[4]=n*f+r*m+a,l[5]=o*m+s*f+c,l[6]=n*p+r*m+a,l[7]=o*m+s*p+c,this._roundPixels){const v=Xe.RESOLUTION;for(let y=0;y<l.length;++y)l[y]=Math.round(l[y]*v)/v}}calculateTrimmedVertices(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;const e=this._texture,t=this.vertexTrimmedData,n=e.orig,s=this._anchor,r=this.transform.worldTransform,o=r.a,a=r.b,c=r.c,l=r.d,d=r.tx,u=r.ty,h=-s._x*n.width,f=h+n.width,p=-s._y*n.height,m=p+n.height;if(t[0]=o*h+c*p+d,t[1]=l*p+a*h+u,t[2]=o*f+c*p+d,t[3]=l*p+a*f+u,t[4]=o*f+c*m+d,t[5]=l*m+a*f+u,t[6]=o*h+c*m+d,t[7]=l*m+a*h+u,this._roundPixels){const g=Xe.RESOLUTION;for(let v=0;v<t.length;++v)t[v]=Math.round(t[v]*g)/g}}_render(e){this.calculateVertices(),e.batch.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this)}_calculateBounds(){const e=this._texture.trim,t=this._texture.orig;!e||e.width===t.width&&e.height===t.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))}getLocalBounds(e){return this.children.length===0?(this._localBounds||(this._localBounds=new oc),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new ht),e=this._localBoundsRect),this._localBounds.getRectangle(e)):super.getLocalBounds.call(this,e)}containsPoint(e){this.worldTransform.applyInverse(e,yl);const t=this._texture.orig.width,n=this._texture.orig.height,s=-t*this.anchor.x;let r=0;return yl.x>=s&&yl.x<s+t&&(r=-n*this.anchor.y,yl.y>=r&&yl.y<r+n)}destroy(e){if(super.destroy(e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,typeof e=="boolean"?e:e==null?void 0:e.texture){const t=typeof e=="boolean"?e:e==null?void 0:e.baseTexture;this._texture.destroy(!!t)}this._texture=null}static from(e,t){const n=e instanceof tt?e:tt.from(e,t);return new oo(n)}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1,this._transformTrimmedID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){const t=Gr(this.scale.x)||1;this.scale.x=t*e/this._texture.orig.width,this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){const t=Gr(this.scale.y)||1;this.scale.y=t*e/this._texture.orig.height,this._height=e}get anchor(){return this._anchor}set anchor(e){this._anchor.copyFrom(e)}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber()}get tintValue(){return this._tintColor.toNumber()}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=e||tt.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,e&&(e.baseTexture.valid?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this)))}}const CS=new zt;cn.prototype._cacheAsBitmap=!1;cn.prototype._cacheData=null;cn.prototype._cacheAsBitmapResolution=null;cn.prototype._cacheAsBitmapMultisample=null;class QI{constructor(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}}Object.defineProperties(cn.prototype,{cacheAsBitmapResolution:{get(){return this._cacheAsBitmapResolution},set(i){i!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=i,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get(){return this._cacheAsBitmapMultisample},set(i){i!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=i,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get(){return this._cacheAsBitmap},set(i){if(this._cacheAsBitmap===i)return;this._cacheAsBitmap=i;let e;i?(this._cacheData||(this._cacheData=new QI),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}});cn.prototype._renderCached=function(i){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(i),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(i))};cn.prototype._initCachedDisplayObject=function(i){var h,f;if((h=this._cacheData)!=null&&h.sprite)return;const e=this.alpha;this.alpha=1,i.batch.flush();const t=this.getLocalBounds(new ht,!0);if((f=this.filters)!=null&&f.length){const p=this.filters[0].padding;t.pad(p)}const n=this.cacheAsBitmapResolution||i.resolution;t.ceil(n),t.width=Math.max(t.width,1/n),t.height=Math.max(t.height,1/n);const s=i.renderTexture.current,r=i.renderTexture.sourceFrame.clone(),o=i.renderTexture.destinationFrame.clone(),a=i.projection.transform,c=Jo.create({width:t.width,height:t.height,resolution:n,multisample:this.cacheAsBitmapMultisample??i.multisample}),l=`cacheAsBitmap_${zo()}`;this._cacheData.textureCacheId=l,st.addToCache(c.baseTexture,l),tt.addToCache(c,l);const d=this.transform.localTransform.copyTo(CS).invert().translate(-t.x,-t.y);this.render=this._cacheData.originalRender,i.render(this,{renderTexture:c,clear:!0,transform:d,skipUpdateTransform:!1}),i.framebuffer.blit(),i.projection.transform=a,i.renderTexture.bind(s,r,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=e;const u=new oo(c);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-(t.x/t.width),u.anchor.y=-(t.y/t.height),u.alpha=e,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=u.containsPoint.bind(u)};cn.prototype._renderCachedCanvas=function(i){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(i),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(i))};cn.prototype._initCachedDisplayObjectCanvas=function(i){var d;if((d=this._cacheData)!=null&&d.sprite)return;const e=this.getLocalBounds(new ht,!0),t=this.alpha;this.alpha=1;const n=i.canvasContext.activeContext,s=i._projTransform,r=this.cacheAsBitmapResolution||i.resolution;e.ceil(r),e.width=Math.max(e.width,1/r),e.height=Math.max(e.height,1/r);const o=Jo.create({width:e.width,height:e.height,resolution:r}),a=`cacheAsBitmap_${zo()}`;this._cacheData.textureCacheId=a,st.addToCache(o.baseTexture,a),tt.addToCache(o,a);const c=CS;this.transform.localTransform.copyTo(c),c.invert(),c.tx-=e.x,c.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,i.render(this,{renderTexture:o,clear:!0,transform:c,skipUpdateTransform:!1}),i.canvasContext.activeContext=n,i._projTransform=s,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=t;const l=new oo(o);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-(e.x/e.width),l.anchor.y=-(e.y/e.height),l.alpha=t,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=i._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)};cn.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};cn.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};cn.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,st.removeFromCache(this._cacheData.textureCacheId),tt.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};cn.prototype._cacheAsBitmapDestroy=function(i){this.cacheAsBitmap=!1,this.destroy(i)};cn.prototype.name=null;Mn.prototype.getChildByName=function(i,e){for(let t=0,n=this.children.length;t<n;t++)if(this.children[t].name===i)return this.children[t];if(e)for(let t=0,n=this.children.length;t<n;t++){const s=this.children[t];if(!s.getChildByName)continue;const r=s.getChildByName(i,!0);if(r)return r}return null};cn.prototype.getGlobalPosition=function(i=new Pt,e=!1){return this.parent?this.parent.toGlobal(this.position,i,e):(i.x=this.position.x,i.y=this.position.y),i};var eR=`varying vec2 vTextureCoord;
|
||
|
||
uniform sampler2D uSampler;
|
||
uniform float uAlpha;
|
||
|
||
void main(void)
|
||
{
|
||
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
|
||
}
|
||
`;class tR extends oi{constructor(e=1){super(YI,eR,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}const nR={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]},iR=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
|
||
`);function sR(i){const e=nR[i],t=e.length;let n=iR,s="";const r="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let o;for(let a=0;a<i;a++){let c=r.replace("%index%",a.toString());o=a,a>=t&&(o=i-a-1),c=c.replace("%value%",e[o].toString()),s+=c,s+=`
|
||
`}return n=n.replace("%blur%",s),n=n.replace("%size%",i.toString()),n}const rR=`
|
||
attribute vec2 aVertexPosition;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
|
||
uniform float strength;
|
||
|
||
varying vec2 vBlurTexCoords[%size%];
|
||
|
||
uniform vec4 inputSize;
|
||
uniform vec4 outputFrame;
|
||
|
||
vec4 filterVertexPosition( void )
|
||
{
|
||
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
||
|
||
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
||
}
|
||
|
||
vec2 filterTextureCoord( void )
|
||
{
|
||
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
||
}
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = filterVertexPosition();
|
||
|
||
vec2 textureCoord = filterTextureCoord();
|
||
%blur%
|
||
}`;function oR(i,e){const t=Math.ceil(i/2);let n=rR,s="",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<i;o++){let a=r.replace("%index%",o.toString());a=a.replace("%sampleIndex%",`${o-(t-1)}.0`),s+=a,s+=`
|
||
`}return n=n.replace("%blur%",s),n=n.replace("%size%",i.toString()),n}class hm extends oi{constructor(e,t=8,n=4,s=oi.defaultResolution,r=5){const o=oR(r,e),a=sR(r);super(o,a),this.horizontal=e,this.resolution=s,this._quality=0,this.quality=n,this.blur=t}apply(e,t,n,s){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/t.width):this.uniforms.strength=1/n.height*(n.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,n,s);else{const r=e.getFilterTexture(),o=e.renderer;let a=t,c=r;this.state.blend=!1,e.applyFilter(this,a,c,As.CLEAR);for(let l=1;l<this.passes-1;l++){e.bindAndClear(a,As.BLIT),this.uniforms.uSampler=c;const d=c;c=a,a=d,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,c,n,s),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 aR extends oi{constructor(e=8,t=4,n=oi.defaultResolution,s=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new hm(!0,e,t,n,s),this.blurYFilter=new hm(!1,e,t,n,s),this.resolution=n,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,n,s){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,As.CLEAR),this.blurYFilter.apply(e,a,n,s),e.returnFilterTexture(a)}else o?this.blurYFilter.apply(e,t,n,s):this.blurXFilter.apply(e,t,n,s)}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 lR=`varying vec2 vTextureCoord;
|
||
uniform sampler2D uSampler;
|
||
uniform float m[20];
|
||
uniform float uAlpha;
|
||
|
||
void main(void)
|
||
{
|
||
vec4 c = texture2D(uSampler, vTextureCoord);
|
||
|
||
if (uAlpha == 0.0) {
|
||
gl_FragColor = c;
|
||
return;
|
||
}
|
||
|
||
// Un-premultiply alpha before applying the color matrix. See issue #3539.
|
||
if (c.a > 0.0) {
|
||
c.rgb /= c.a;
|
||
}
|
||
|
||
vec4 result;
|
||
|
||
result.r = (m[0] * c.r);
|
||
result.r += (m[1] * c.g);
|
||
result.r += (m[2] * c.b);
|
||
result.r += (m[3] * c.a);
|
||
result.r += m[4];
|
||
|
||
result.g = (m[5] * c.r);
|
||
result.g += (m[6] * c.g);
|
||
result.g += (m[7] * c.b);
|
||
result.g += (m[8] * c.a);
|
||
result.g += m[9];
|
||
|
||
result.b = (m[10] * c.r);
|
||
result.b += (m[11] * c.g);
|
||
result.b += (m[12] * c.b);
|
||
result.b += (m[13] * c.a);
|
||
result.b += m[14];
|
||
|
||
result.a = (m[15] * c.r);
|
||
result.a += (m[16] * c.g);
|
||
result.a += (m[17] * c.b);
|
||
result.a += (m[18] * c.a);
|
||
result.a += m[19];
|
||
|
||
vec3 rgb = mix(c.rgb, result.rgb, uAlpha);
|
||
|
||
// Premultiply alpha again.
|
||
rgb *= result.a;
|
||
|
||
gl_FragColor = vec4(rgb, result.a);
|
||
}
|
||
`;class fm extends oi{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(mS,lR,e),this.alpha=1}_loadMatrix(e,t=!1){let n=e;t&&(this._multiply(n,this.uniforms.m,e),n=this._colorMatrix(n)),this.uniforms.m=n}_multiply(e,t,n){return e[0]=t[0]*n[0]+t[1]*n[5]+t[2]*n[10]+t[3]*n[15],e[1]=t[0]*n[1]+t[1]*n[6]+t[2]*n[11]+t[3]*n[16],e[2]=t[0]*n[2]+t[1]*n[7]+t[2]*n[12]+t[3]*n[17],e[3]=t[0]*n[3]+t[1]*n[8]+t[2]*n[13]+t[3]*n[18],e[4]=t[0]*n[4]+t[1]*n[9]+t[2]*n[14]+t[3]*n[19]+t[4],e[5]=t[5]*n[0]+t[6]*n[5]+t[7]*n[10]+t[8]*n[15],e[6]=t[5]*n[1]+t[6]*n[6]+t[7]*n[11]+t[8]*n[16],e[7]=t[5]*n[2]+t[6]*n[7]+t[7]*n[12]+t[8]*n[17],e[8]=t[5]*n[3]+t[6]*n[8]+t[7]*n[13]+t[8]*n[18],e[9]=t[5]*n[4]+t[6]*n[9]+t[7]*n[14]+t[8]*n[19]+t[9],e[10]=t[10]*n[0]+t[11]*n[5]+t[12]*n[10]+t[13]*n[15],e[11]=t[10]*n[1]+t[11]*n[6]+t[12]*n[11]+t[13]*n[16],e[12]=t[10]*n[2]+t[11]*n[7]+t[12]*n[12]+t[13]*n[17],e[13]=t[10]*n[3]+t[11]*n[8]+t[12]*n[13]+t[13]*n[18],e[14]=t[10]*n[4]+t[11]*n[9]+t[12]*n[14]+t[13]*n[19]+t[14],e[15]=t[15]*n[0]+t[16]*n[5]+t[17]*n[10]+t[18]*n[15],e[16]=t[15]*n[1]+t[16]*n[6]+t[17]*n[11]+t[18]*n[16],e[17]=t[15]*n[2]+t[16]*n[7]+t[17]*n[12]+t[18]*n[17],e[18]=t[15]*n[3]+t[16]*n[8]+t[17]*n[13]+t[18]*n[18],e[19]=t[15]*n[4]+t[16]*n[9]+t[17]*n[14]+t[18]*n[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 n=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(n,t)}tint(e,t){const[n,s,r]=Ot.shared.setValue(e).toArray(),o=[n,0,0,0,0,0,s,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(o,t)}greyscale(e,t){const n=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(n,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 n=Math.cos(e),s=Math.sin(e),r=Math.sqrt,o=1/3,a=r(o),c=n+(1-n)*o,l=o*(1-n)-a*s,d=o*(1-n)+a*s,u=o*(1-n)+a*s,h=n+o*(1-n),f=o*(1-n)-a*s,p=o*(1-n)-a*s,m=o*(1-n)+a*s,g=n+o*(1-n),v=[c,l,d,0,0,u,h,f,0,0,p,m,g,0,0,0,0,0,1,0];this._loadMatrix(v,t)}contrast(e,t){const n=(e||0)+1,s=-.5*(n-1),r=[n,0,0,0,s,0,n,0,0,s,0,0,n,0,s,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const n=e*2/3+1,s=(n-1)*-.5,r=[n,s,s,0,0,s,n,s,0,0,s,s,n,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,n,s,r){e=e||.2,t=t||.15,n=n||16770432,s=s||3375104;const o=Ot.shared,[a,c,l]=o.setValue(n).toArray(),[d,u,h]=o.setValue(s).toArray(),f=[.3,.59,.11,0,0,a,c,l,e,0,d,u,h,t,0,a-d,c-u,l-h,0,0];this._loadMatrix(f,r)}night(e,t){e=e||.1;const n=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(n,t)}predator(e,t){const n=[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(n,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}}fm.prototype.grayscale=fm.prototype.greyscale;var cR=`varying vec2 vFilterCoord;
|
||
varying vec2 vTextureCoord;
|
||
|
||
uniform vec2 scale;
|
||
uniform mat2 rotation;
|
||
uniform sampler2D uSampler;
|
||
uniform sampler2D mapSampler;
|
||
|
||
uniform highp vec4 inputSize;
|
||
uniform vec4 inputClamp;
|
||
|
||
void main(void)
|
||
{
|
||
vec4 map = texture2D(mapSampler, vFilterCoord);
|
||
|
||
map -= 0.5;
|
||
map.xy = scale * inputSize.zw * (rotation * map.xy);
|
||
|
||
gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));
|
||
}
|
||
`,dR=`attribute vec2 aVertexPosition;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
uniform mat3 filterMatrix;
|
||
|
||
varying vec2 vTextureCoord;
|
||
varying vec2 vFilterCoord;
|
||
|
||
uniform vec4 inputSize;
|
||
uniform vec4 outputFrame;
|
||
|
||
vec4 filterVertexPosition( void )
|
||
{
|
||
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
||
|
||
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
||
}
|
||
|
||
vec2 filterTextureCoord( void )
|
||
{
|
||
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
||
}
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = filterVertexPosition();
|
||
vTextureCoord = filterTextureCoord();
|
||
vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;
|
||
}
|
||
`;class uR extends oi{constructor(e,t){const n=new zt;e.renderable=!1,super(dR,cR,{mapSampler:e._texture,filterMatrix:n,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=n,t==null&&(t=20),this.scale=new Pt(t,t)}apply(e,t,n,s){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const r=this.maskSprite.worldTransform,o=Math.sqrt(r.a*r.a+r.b*r.b),a=Math.sqrt(r.c*r.c+r.d*r.d);o!==0&&a!==0&&(this.uniforms.rotation[0]=r.a/o,this.uniforms.rotation[1]=r.b/o,this.uniforms.rotation[2]=r.c/a,this.uniforms.rotation[3]=r.d/a),e.applyFilter(this,t,n,s)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}}var hR=`varying vec2 v_rgbNW;
|
||
varying vec2 v_rgbNE;
|
||
varying vec2 v_rgbSW;
|
||
varying vec2 v_rgbSE;
|
||
varying vec2 v_rgbM;
|
||
|
||
varying vec2 vFragCoord;
|
||
uniform sampler2D uSampler;
|
||
uniform highp vec4 inputSize;
|
||
|
||
|
||
/**
|
||
Basic FXAA implementation based on the code on geeks3d.com with the
|
||
modification that the texture2DLod stuff was removed since it's
|
||
unsupported by WebGL.
|
||
|
||
--
|
||
|
||
From:
|
||
https://github.com/mitsuhiko/webgl-meincraft
|
||
|
||
Copyright (c) 2011 by Armin Ronacher.
|
||
|
||
Some rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without
|
||
modification, are permitted provided that the following conditions are
|
||
met:
|
||
|
||
* Redistributions of source code must retain the above copyright
|
||
notice, this list of conditions and the following disclaimer.
|
||
|
||
* Redistributions in binary form must reproduce the above
|
||
copyright notice, this list of conditions and the following
|
||
disclaimer in the documentation and/or other materials provided
|
||
with the distribution.
|
||
|
||
* The names of the contributors may not be used to endorse or
|
||
promote products derived from this software without specific
|
||
prior written permission.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
|
||
#ifndef FXAA_REDUCE_MIN
|
||
#define FXAA_REDUCE_MIN (1.0/ 128.0)
|
||
#endif
|
||
#ifndef FXAA_REDUCE_MUL
|
||
#define FXAA_REDUCE_MUL (1.0 / 8.0)
|
||
#endif
|
||
#ifndef FXAA_SPAN_MAX
|
||
#define FXAA_SPAN_MAX 8.0
|
||
#endif
|
||
|
||
//optimized version for mobile, where dependent
|
||
//texture reads can be a bottleneck
|
||
vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,
|
||
vec2 v_rgbNW, vec2 v_rgbNE,
|
||
vec2 v_rgbSW, vec2 v_rgbSE,
|
||
vec2 v_rgbM) {
|
||
vec4 color;
|
||
vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;
|
||
vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;
|
||
vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;
|
||
vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;
|
||
vec4 texColor = texture2D(tex, v_rgbM);
|
||
vec3 rgbM = texColor.xyz;
|
||
vec3 luma = vec3(0.299, 0.587, 0.114);
|
||
float lumaNW = dot(rgbNW, luma);
|
||
float lumaNE = dot(rgbNE, luma);
|
||
float lumaSW = dot(rgbSW, luma);
|
||
float lumaSE = dot(rgbSE, luma);
|
||
float lumaM = dot(rgbM, luma);
|
||
float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
|
||
float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
|
||
|
||
mediump vec2 dir;
|
||
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
|
||
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
|
||
|
||
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *
|
||
(0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
|
||
|
||
float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);
|
||
dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
|
||
max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),
|
||
dir * rcpDirMin)) * inverseVP;
|
||
|
||
vec3 rgbA = 0.5 * (
|
||
texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +
|
||
texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);
|
||
vec3 rgbB = rgbA * 0.5 + 0.25 * (
|
||
texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +
|
||
texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);
|
||
|
||
float lumaB = dot(rgbB, luma);
|
||
if ((lumaB < lumaMin) || (lumaB > lumaMax))
|
||
color = vec4(rgbA, texColor.a);
|
||
else
|
||
color = vec4(rgbB, texColor.a);
|
||
return color;
|
||
}
|
||
|
||
void main() {
|
||
|
||
vec4 color;
|
||
|
||
color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
|
||
|
||
gl_FragColor = color;
|
||
}
|
||
`,fR=`
|
||
attribute vec2 aVertexPosition;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
|
||
varying vec2 v_rgbNW;
|
||
varying vec2 v_rgbNE;
|
||
varying vec2 v_rgbSW;
|
||
varying vec2 v_rgbSE;
|
||
varying vec2 v_rgbM;
|
||
|
||
varying vec2 vFragCoord;
|
||
|
||
uniform vec4 inputSize;
|
||
uniform vec4 outputFrame;
|
||
|
||
vec4 filterVertexPosition( void )
|
||
{
|
||
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
||
|
||
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
||
}
|
||
|
||
void texcoords(vec2 fragCoord, vec2 inverseVP,
|
||
out vec2 v_rgbNW, out vec2 v_rgbNE,
|
||
out vec2 v_rgbSW, out vec2 v_rgbSE,
|
||
out vec2 v_rgbM) {
|
||
v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;
|
||
v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;
|
||
v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;
|
||
v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;
|
||
v_rgbM = vec2(fragCoord * inverseVP);
|
||
}
|
||
|
||
void main(void) {
|
||
|
||
gl_Position = filterVertexPosition();
|
||
|
||
vFragCoord = aVertexPosition * outputFrame.zw;
|
||
|
||
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
|
||
}
|
||
`;class pR extends oi{constructor(){super(fR,hR)}}var mR=`precision highp float;
|
||
|
||
varying vec2 vTextureCoord;
|
||
varying vec4 vColor;
|
||
|
||
uniform float uNoise;
|
||
uniform float uSeed;
|
||
uniform sampler2D uSampler;
|
||
|
||
float rand(vec2 co)
|
||
{
|
||
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
|
||
}
|
||
|
||
void main()
|
||
{
|
||
vec4 color = texture2D(uSampler, vTextureCoord);
|
||
float randomValue = rand(gl_FragCoord.xy * uSeed);
|
||
float diff = (randomValue - 0.5) * uNoise;
|
||
|
||
// Un-premultiply alpha before applying the color matrix. See issue #3539.
|
||
if (color.a > 0.0) {
|
||
color.rgb /= color.a;
|
||
}
|
||
|
||
color.r += diff;
|
||
color.g += diff;
|
||
color.b += diff;
|
||
|
||
// Premultiply alpha again.
|
||
color.rgb *= color.a;
|
||
|
||
gl_FragColor = color;
|
||
}
|
||
`;class gR extends oi{constructor(e=.5,t=Math.random()){super(mS,mR,{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 Y0={AlphaFilter:tR,BlurFilter:aR,BlurFilterPass:hm,ColorMatrixFilter:fm,DisplacementFilter:uR,FXAAFilter:pR,NoiseFilter:gR};Object.entries(Y0).forEach(([i,e])=>{Object.defineProperty(Y0,i,{get(){return yt("7.1.0",`filters.${i} has moved to ${i}`),e}})});class vR{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||(ai.system.add(this.tickerUpdate,this,jo.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(ai.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 Yr=new vR;class Ac{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Ac.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Pt,this.page=new Pt,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,n){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,n,s,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 au extends Ac{constructor(){super(...arguments),this.client=new Pt,this.movement=new Pt,this.offset=new Pt,this.global=new Pt,this.screen=new Pt}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,n){return e.worldTransform.applyInverse(n||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,n,s,r,o,a,c,l,d,u,h,f,p,m){throw new Error("Method not implemented.")}}class Hi extends au{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 Da extends au{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}Da.DOM_DELTA_PIXEL=0,Da.DOM_DELTA_LINE=1,Da.DOM_DELTA_PAGE=2;const bR=2048,yR=new Pt,ep=new Pt;class xR{constructor(e){this.dispatch=new Cc,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("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((n,s)=>n.priority-s.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let n=0,s=t.length;n<s;n++)t[n].fn(e);else console.warn(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){Yr.pauseUpdate=!0;const n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",s=this[n](this.rootTarget,this.rootTarget.eventMode,yR.set(e,t),this.hitTestFn,this.hitPruneFn);return s&&s[0]}propagate(e,t){if(!e.target)return;const n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let s=0,r=n.length-1;s<r;s++)if(e.currentTarget=n[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let s=n.length-2;s>=0;s--)if(e.currentTarget=n[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,n=this._allInteractiveElements){if(n.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const s=Array.isArray(t)?t:[t];for(let r=n.length-1;r>=0;r--)s.forEach(o=>{e.currentTarget=n[r],this.notifyTarget(e,o)})}propagationPath(e){const t=[e];for(let n=0;n<bR&&e!==this.rootTarget;n++){if(!e.parent)throw new Error("Cannot find propagation path to disconnected target");t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,n,s,r,o=!1){let a=!1;if(this._interactivePrune(e))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Yr.pauseUpdate=!1),e.interactiveChildren&&e.children){const d=e.children;for(let u=d.length-1;u>=0;u--){const h=d[u],f=this.hitTestMoveRecursive(h,this._isInteractive(t)?t:h.eventMode,n,s,r,o||r(e,n));if(f){if(f.length>0&&!f[f.length-1].parent)continue;const p=e.isInteractive();(f.length>0||p)&&(p&&this._allInteractiveElements.push(e),f.push(e)),this._hitElements.length===0&&(this._hitElements=f),a=!0}}}const c=this._isInteractive(t),l=e.isInteractive();return c&&l&&this._allInteractiveElements.push(e),o||this._hitElements.length>0?null:a?this._hitElements:c&&!r(e,n)&&s(e,n)?l?[e]:[]:null}hitTestRecursive(e,t,n,s,r){if(this._interactivePrune(e)||r(e,n))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Yr.pauseUpdate=!1),e.interactiveChildren&&e.children){const c=e.children;for(let l=c.length-1;l>=0;l--){const d=c[l],u=this.hitTestRecursive(d,this._isInteractive(t)?t:d.eventMode,n,s,r);if(u){if(u.length>0&&!u[u.length-1].parent)continue;const h=e.isInteractive();return(u.length>0||h)&&u.push(e),u}}}const o=this._isInteractive(t),a=e.isInteractive();return o&&s(e,n)?a?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){var n;if(e.hitArea&&(e.worldTransform.applyInverse(t,ep),!e.hitArea.contains(ep.x,ep.y)))return!0;if(e._mask){const s=e._mask.isMaskData?e._mask.maskObject:e._mask;if(s&&!((n=s.containsPoint)!=null&&n.call(s,t)))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){var r,o;t=t??e.type;const n=`on${t}`;(o=(r=e.currentTarget)[n])==null||o.call(r,e);const s=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,s),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof Hi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const s=t.button===2;this.dispatchEvent(t,s?"rightdown":"mousedown")}const n=this.trackingData(e.pointerId);n.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){var c,l;if(!(e instanceof Hi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const n=t.pointerType==="mouse"||t.pointerType==="pen",s=this.trackingData(e.pointerId),r=this.findMountedTarget(s.overTargets);if(((c=s.overTargets)==null?void 0:c.length)>0&&r!==t.target){const d=e.type==="mousemove"?"mouseout":"pointerout",u=this.createPointerEvent(e,d,r);if(this.dispatchEvent(u,"pointerout"),n&&this.dispatchEvent(u,"mouseout"),!t.composedPath().includes(r)){const h=this.createPointerEvent(e,"pointerleave",r);for(h.eventPhase=h.AT_TARGET;h.target&&!t.composedPath().includes(h.target);)h.currentTarget=h.target,this.notifyTarget(h),n&&this.notifyTarget(h,"mouseleave"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(u)}if(r!==t.target){const d=e.type==="mousemove"?"mouseover":"pointerover",u=this.clonePointerEvent(t,d);this.dispatchEvent(u,"pointerover"),n&&this.dispatchEvent(u,"mouseover");let h=r==null?void 0:r.parent;for(;h&&h!==this.rootTarget.parent&&h!==t.target;)h=h.parent;if(!h||h===this.rootTarget.parent){const f=this.clonePointerEvent(t,"pointerenter");for(f.eventPhase=f.AT_TARGET;f.target&&f.target!==r&&f.target!==this.rootTarget.parent;)f.currentTarget=f.target,this.notifyTarget(f),n&&this.notifyTarget(f,"mouseenter"),f.target=f.target.parent;this.freeEvent(f)}this.freeEvent(u)}const o=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?o.push("pointermove"):this.dispatchEvent(t,"pointermove"),a&&o.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?o.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),a&&o.push("globaltouchmove")),n&&(this.moveOnAll?o.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),a&&o.push("globalmousemove"),this.cursor=(l=t.target)==null?void 0:l.cursor),o.length>0&&this.all(t,o),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){var o;if(!(e instanceof Hi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),n=this.createPointerEvent(e),s=n.pointerType==="mouse"||n.pointerType==="pen";this.dispatchEvent(n,"pointerover"),s&&this.dispatchEvent(n,"mouseover"),n.pointerType==="mouse"&&(this.cursor=(o=n.target)==null?void 0:o.cursor);const r=this.clonePointerEvent(n,"pointerenter");for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==this.rootTarget.parent;)r.currentTarget=r.target,this.notifyTarget(r),s&&this.notifyTarget(r,"mouseenter"),r.target=r.target.parent;t.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(r)}mapPointerOut(e){if(!(e instanceof Hi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const n=e.pointerType==="mouse"||e.pointerType==="pen",s=this.findMountedTarget(t.overTargets),r=this.createPointerEvent(e,"pointerout",s);this.dispatchEvent(r),n&&this.dispatchEvent(r,"mouseout");const o=this.createPointerEvent(e,"pointerleave",s);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;t.overTargets=null,this.freeEvent(r),this.freeEvent(o)}this.cursor=null}mapPointerUp(e){if(!(e instanceof Hi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),n=this.createPointerEvent(e);if(this.dispatchEvent(n,"pointerup"),n.pointerType==="touch")this.dispatchEvent(n,"touchend");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const a=n.button===2;this.dispatchEvent(n,a?"rightup":"mouseup")}const s=this.trackingData(e.pointerId),r=this.findMountedTarget(s.pressTargetsByButton[e.button]);let o=r;if(r&&!n.composedPath().includes(r)){let a=r;for(;a&&!n.composedPath().includes(a);){if(n.currentTarget=a,this.notifyTarget(n,"pointerupoutside"),n.pointerType==="touch")this.notifyTarget(n,"touchendoutside");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const c=n.button===2;this.notifyTarget(n,c?"rightupoutside":"mouseupoutside")}a=a.parent}delete s.pressTargetsByButton[e.button],o=a}if(o){const a=this.clonePointerEvent(n,"click");a.target=o,a.path=null,s.clicksByButton[e.button]||(s.clicksByButton[e.button]={clickCount:0,target:a.target,timeStamp:t});const c=s.clicksByButton[e.button];if(c.target===a.target&&t-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=a.target,c.timeStamp=t,a.detail=c.clickCount,a.pointerType==="mouse"){const l=a.button===2;this.dispatchEvent(a,l?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(n)}mapPointerUpOutside(e){if(!(e instanceof Hi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),n=this.findMountedTarget(t.pressTargetsByButton[e.button]),s=this.createPointerEvent(e);if(n){let r=n;for(;r;)s.currentTarget=r,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),r=r.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(s)}mapWheel(e){if(!(e instanceof Da)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let n=1;n<e.length&&e[n].parent===t;n++)t=e[n];return t}createPointerEvent(e,t,n){const s=this.allocateEvent(Hi);return this.copyPointerData(e,s),this.copyMouseData(e,s),this.copyData(e,s),s.nativeEvent=e.nativeEvent,s.originalEvent=e,s.target=n??this.hitTest(s.global.x,s.global.y)??this._hitElements[0],typeof t=="string"&&(s.type=t),s}createWheelEvent(e){const t=this.allocateEvent(Da);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){const n=this.allocateEvent(Hi);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=t??n.type,n}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof Hi&&t instanceof Hi&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof au&&t instanceof au&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);const t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");const t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}notifyListeners(e,t){const n=e.currentTarget._events[t];if(n&&e.currentTarget.isInteractive())if("fn"in n)n.once&&e.currentTarget.removeListener(t,n.fn,void 0,!0),n.fn.call(n.context,e);else for(let s=0,r=n.length;s<r&&!e.propagationImmediatelyStopped;s++)n[s].once&&e.currentTarget.removeListener(t,n[s].fn,void 0,!0),n[s].fn.call(n[s].context,e)}}const wR=1,SR={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},pm=class mm{constructor(e){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=e,this.rootBoundary=new xR(null),Yr.init(this),this.autoPreventDefault=!0,this.eventsAdded=!1,this.rootPointerEvent=new Hi(null),this.rootWheelEvent=new Da(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...mm.defaultEventFeatures},{set:(t,n,s)=>(n==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=s),t[n]=s,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:n}=this.renderer;this.setTargetElement(t),this.resolution=n,mm._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const n=this.cursorStyles[e];if(n)switch(typeof n){case"string":t&&(this.domElement.style.cursor=n);break;case"function":n(e);break;case"object":t&&Object.assign(this.domElement.style,n);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let n=0,s=t.length;n<s;n++){const r=t[n],o=this.bootstrapEvent(this.rootPointerEvent,r);this.rootBoundary.mapEvent(o)}this.setCursor(this.rootBoundary.cursor)}onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,Yr.pointerMoved();const t=this.normalizeToPointerData(e);for(let n=0,s=t.length;n<s;n++){const r=this.bootstrapEvent(this.rootPointerEvent,t[n]);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);const n=t!==this.domElement?"outside":"",s=this.normalizeToPointerData(e);for(let r=0,o=s.length;r<o;r++){const a=this.bootstrapEvent(this.rootPointerEvent,s[r]);a.type+=n,this.rootBoundary.mapEvent(a)}this.setCursor(this.rootBoundary.cursor)}onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this.normalizeToPointerData(e);for(let n=0,s=t.length;n<s;n++){const r=this.bootstrapEvent(this.rootPointerEvent,t[n]);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;const t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this.removeEvents(),this.domElement=e,Yr.domElement=e,this.addEvents()}addEvents(){if(this.eventsAdded||!this.domElement)return;Yr.addTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,!0),this.domElement.addEventListener("pointerdown",this.onPointerDown,!0),this.domElement.addEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this.onPointerOverOut,!0),globalThis.addEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,!0),this.domElement.addEventListener("mousedown",this.onPointerDown,!0),this.domElement.addEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this.onPointerOverOut,!0),globalThis.addEventListener("mouseup",this.onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this.onPointerDown,!0),this.domElement.addEventListener("touchend",this.onPointerUp,!0),this.domElement.addEventListener("touchmove",this.onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this.eventsAdded=!0}removeEvents(){if(!this.eventsAdded||!this.domElement)return;Yr.removeTickerListener();const e=this.domElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this.onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,!0),this.domElement.removeEventListener("mousedown",this.onPointerDown,!0),this.domElement.removeEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this.onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this.onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this.onPointerDown,!0),this.domElement.removeEventListener("touchend",this.onPointerUp,!0),this.domElement.removeEventListener("touchmove",this.onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this.eventsAdded=!1}mapPositionToPoint(e,t,n){const s=this.domElement.isConnected?this.domElement.getBoundingClientRect():{width:this.domElement.width,height:this.domElement.height,left:0,top:0},r=1/this.resolution;e.x=(t-s.left)*(this.domElement.width/s.width)*r,e.y=(n-s.top)*(this.domElement.height/s.height)*r}normalizeToPointerData(e){const t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let n=0,s=e.changedTouches.length;n<s;n++){const r=e.changedTouches[n];typeof r.button>"u"&&(r.button=0),typeof r.buttons>"u"&&(r.buttons=1),typeof r.isPrimary>"u"&&(r.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof r.width>"u"&&(r.width=r.radiusX||1),typeof r.height>"u"&&(r.height=r.radiusY||1),typeof r.tiltX>"u"&&(r.tiltX=0),typeof r.tiltY>"u"&&(r.tiltY=0),typeof r.pointerType>"u"&&(r.pointerType="touch"),typeof r.pointerId>"u"&&(r.pointerId=r.identifier||0),typeof r.pressure>"u"&&(r.pressure=r.force||.5),typeof r.twist>"u"&&(r.twist=0),typeof r.tangentialPressure>"u"&&(r.tangentialPressure=0),typeof r.layerX>"u"&&(r.layerX=r.offsetX=r.clientX),typeof r.layerY>"u"&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=e.type,t.push(r)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const n=e;typeof n.isPrimary>"u"&&(n.isPrimary=!0),typeof n.width>"u"&&(n.width=1),typeof n.height>"u"&&(n.height=1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="mouse"),typeof n.pointerId>"u"&&(n.pointerId=wR),typeof n.pressure>"u"&&(n.pressure=.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=SR[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};pm.extension={name:"events",type:[$e.RendererSystem,$e.CanvasRendererSystem]},pm.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let gm=pm;He.add(gm);function z0(i){return i==="dynamic"||i==="static"}const CR={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??z0(gm.defaultEventMode)},set interactive(i){yt("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=i,this.eventMode=i?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??gm.defaultEventMode},set eventMode(i){this._internalInteractive=z0(i),this._internalEventMode=i},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(i,e,t){const n=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof t=="object"?t.signal:void 0,r=typeof t=="object"?t.once===!0:!1,o=typeof e=="function"?void 0:e;i=n?`${i}capture`:i;const a=typeof e=="function"?e:e.handleEvent,c=this;s&&s.addEventListener("abort",()=>{c.off(i,a,o)}),r?c.once(i,a,o):c.on(i,a,o)},removeEventListener(i,e,t){const n=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;i=n?`${i}capture`:i,e=typeof e=="function"?e:e.handleEvent,this.off(i,e,s)},dispatchEvent(i){if(!(i instanceof Ac))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return i.defaultPrevented=!1,i.path=null,i.target=this,i.manager.dispatchEvent(i),!i.defaultPrevented}};cn.mixin(CR);const AR={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};cn.mixin(AR);const TR=9,Jc=100,ER=0,_R=0,j0=2,H0=1,MR=-1e3,PR=-1e3,kR=2;class AS{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(nr.tablet||nr.phone)&&this.createTouchHook();const t=document.createElement("div");t.style.width=`${Jc}px`,t.style.height=`${Jc}px`,t.style.position="absolute",t.style.top=`${ER}px`,t.style.left=`${_R}px`,t.style.zIndex=j0.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${H0}px`,e.style.height=`${H0}px`,e.style.position="absolute",e.style.top=`${MR}px`,e.style.left=`${PR}px`,e.style.zIndex=kR.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var e;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(e=this.renderer.view.parentNode)==null||e.appendChild(this.div))}deactivate(){var e;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(e=this.div.parentNode)==null||e.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const t=e.children;if(t)for(let n=0;n<t.length;n++)this.updateAccessibleObjects(t[n])}update(){const e=performance.now();if(nr.android.device&&e<this.androidUpdateCount||(this.androidUpdateCount=e+this.androidUpdateFrequency,!this.renderer.renderingToScreen))return;this.renderer.lastObjectRendered&&this.updateAccessibleObjects(this.renderer.lastObjectRendered);const{x:t,y:n,width:s,height:r}=this.renderer.view.getBoundingClientRect(),{width:o,height:a,resolution:c}=this.renderer,l=s/o*c,d=r/a*c;let u=this.div;u.style.left=`${t}px`,u.style.top=`${n}px`,u.style.width=`${o}px`,u.style.height=`${a}px`;for(let h=0;h<this.children.length;h++){const f=this.children[h];if(f.renderId!==this.renderId)f._accessibleActive=!1,Fa(this.children,h,1),this.div.removeChild(f._accessibleDiv),this.pool.push(f._accessibleDiv),f._accessibleDiv=null,h--;else{u=f._accessibleDiv;let p=f.hitArea;const m=f.worldTransform;f.hitArea?(u.style.left=`${(m.tx+p.x*m.a)*l}px`,u.style.top=`${(m.ty+p.y*m.d)*d}px`,u.style.width=`${p.width*m.a*l}px`,u.style.height=`${p.height*m.d*d}px`):(p=f.getBounds(),this.capHitArea(p),u.style.left=`${p.x*l}px`,u.style.top=`${p.y*d}px`,u.style.width=`${p.width*l}px`,u.style.height=`${p.height*d}px`,u.title!==f.accessibleTitle&&f.accessibleTitle!==null&&(u.title=f.accessibleTitle),u.getAttribute("aria-label")!==f.accessibleHint&&f.accessibleHint!==null&&u.setAttribute("aria-label",f.accessibleHint)),(f.accessibleTitle!==u.title||f.tabIndex!==u.tabIndex)&&(u.title=f.accessibleTitle,u.tabIndex=f.tabIndex,this.debug&&this.updateDebugHTML(u))}}this.renderId++}updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:n}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>n&&(e.height=n-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${Jc}px`,t.style.height=`${Jc}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=j0.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{displayObject:n}=e.target,s=this.renderer.events.rootBoundary,r=Object.assign(new Ac(s),{target:n});s.rootTarget=this.renderer.lastObjectRendered,t.forEach(o=>s.dispatchEvent(r,o))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===TR&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}AS.extension={name:"accessibility",type:[$e.RendererPlugin,$e.CanvasRendererPlugin]};He.add(AS);const TS=class vm{constructor(e){this.stage=new Mn,e=Object.assign({forceCanvas:!1},e),this.renderer=UI(e),vm._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){var e;return(e=this.renderer)==null?void 0:e.view}get screen(){var e;return(e=this.renderer)==null?void 0:e.screen}destroy(e,t){const n=vm._plugins.slice(0);n.reverse(),n.forEach(s=>{s.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};TS._plugins=[];let ES=TS;He.handleByList($e.Application,ES._plugins);class _S{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,n;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,n=globalThis.innerHeight;else{const{clientWidth:s,clientHeight:r}=this._resizeTo;t=s,n=r}this.renderer.resize(t,n),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}_S.extension=$e.Application;He.add(_S);const G0={loader:$e.LoadParser,resolver:$e.ResolveParser,cache:$e.CacheParser,detection:$e.DetectionParser};He.handle($e.Asset,i=>{const e=i.ref;Object.entries(G0).filter(([t])=>!!e[t]).forEach(([t,n])=>He.add(Object.assign(e[t],{extension:e[t].extension??n})))},i=>{const e=i.ref;Object.keys(G0).filter(t=>!!e[t]).forEach(t=>He.remove(e[t]))});class IR{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let n=0;n<t;n++)e.push(this._assetList.pop());await this._loader.load(e),this._isLoading=!1,this._next()}}get active(){return this._isActive}set active(e){this._isActive!==e&&(this._isActive=e,e&&!this._isLoading&&this._next())}}function sl(i,e){if(Array.isArray(e)){for(const t of e)if(i.startsWith(`data:${t}`))return!0;return!1}return i.startsWith(`data:${e}`)}function fi(i,e){const t=i.split("?")[0],n=pn.extname(t).toLowerCase();return Array.isArray(e)?e.includes(n):n===e}const Wi=(i,e,t=!1)=>(Array.isArray(i)||(i=[i]),e?i.map(n=>typeof n=="string"||t?e(n):n):i),lu=(i,e)=>{const t=e.split("?")[1];return t&&(i+=`?${t}`),i};function MS(i,e,t,n,s){const r=e[t];for(let o=0;o<r.length;o++){const a=r[o];t<e.length-1?MS(i.replace(n[t],a),e,t+1,n,s):s.push(i.replace(n[t],a))}}function RR(i){const e=/\{(.*?)\}/g,t=i.match(e),n=[];if(t){const s=[];t.forEach(r=>{const o=r.substring(1,r.length-1).split(",");s.push(o)}),MS(i,s,0,t,n)}else n.push(i);return n}const cu=i=>!Array.isArray(i);class FR{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const n=Wi(e);let s;for(let a=0;a<this.parsers.length;a++){const c=this.parsers[a];if(c.test(t)){s=c.getCacheableAssets(n,t);break}}s||(s={},n.forEach(a=>{s[a]=t}));const r=Object.keys(s),o={cacheKeys:r,keys:n};if(n.forEach(a=>{this._cacheMap.set(a,o)}),r.forEach(a=>{const c=s?s[a]:t;this._cache.has(a)&&this._cache.get(a)!==c&&console.warn("[Cache] already has key:",a),this._cache.set(a,s[a])}),t instanceof tt){const a=t;n.forEach(c=>{a.baseTexture!==tt.EMPTY.baseTexture&&st.addToCache(a.baseTexture,c),tt.addToCache(a,c)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(n=>{this._cache.delete(n)}),t.keys.forEach(n=>{this._cacheMap.delete(n)})}get parsers(){return this._parsers}}const Mo=new FR;class LR{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,n)=>(this._parsersValidated=!1,e[t]=n,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){const n={promise:null,parser:null};return n.promise=(async()=>{var o,a;let s=null,r=null;if(t.loadParser&&(r=this._parserHash[t.loadParser],r||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!r){for(let c=0;c<this.parsers.length;c++){const l=this.parsers[c];if(l.load&&((o=l.test)!=null&&o.call(l,e,t,this))){r=l;break}}if(!r)return console.warn(`[Assets] ${e} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),null}s=await r.load(e,t,this),n.parser=r;for(let c=0;c<this.parsers.length;c++){const l=this.parsers[c];l.parse&&l.parse&&await((a=l.testParse)==null?void 0:a.call(l,s,t,this))&&(s=await l.parse(s,t,this)||s,n.parser=l)}return s})(),n}async load(e,t){this._parsersValidated||this._validateParsers();let n=0;const s={},r=cu(e),o=Wi(e,l=>({alias:[l],src:l})),a=o.length,c=o.map(async l=>{const d=pn.toAbsolute(l.src);if(!s[l.src])try{this.promiseCache[d]||(this.promiseCache[d]=this._getLoadPromiseAndParser(d,l)),s[l.src]=await this.promiseCache[d].promise,t&&t(++n/a)}catch(u){throw delete this.promiseCache[d],delete s[l.src],new Error(`[Loader.load] Failed to load ${d}.
|
||
${u}`)}});return await Promise.all(c),r?s[o[0].src]:s}async unload(e){const t=Wi(e,n=>({alias:[n],src:n})).map(async n=>{var o,a;const s=pn.toAbsolute(n.src),r=this.promiseCache[s];if(r){const c=await r.promise;delete this.promiseCache[s],(a=(o=r.parser)==null?void 0:o.unload)==null||a.call(o,c,n,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 Ei=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(Ei||{});const DR=".json",OR="application/json",NR={extension:{type:$e.LoadParser,priority:Ei.Low},name:"loadJson",test(i){return sl(i,OR)||fi(i,DR)},async load(i){return await(await Xe.ADAPTER.fetch(i)).json()}};He.add(NR);const $R=".txt",BR="text/plain",UR={name:"loadTxt",extension:{type:$e.LoadParser,priority:Ei.Low},test(i){return sl(i,BR)||fi(i,$R)},async load(i){return await(await Xe.ADAPTER.fetch(i)).text()}};He.add(UR);const VR=["normal","bold","100","200","300","400","500","600","700","800","900"],XR=[".ttf",".otf",".woff",".woff2"],YR=["font/ttf","font/otf","font/woff","font/woff2"],zR=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function jR(i){const e=pn.extname(i),t=pn.basename(i,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let n=t.length>0;for(const r of t)if(!r.match(zR)){n=!1;break}let s=t.join(" ");return n||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const HR=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function GR(i){return HR.test(i)?i:encodeURI(i)}const WR={extension:{type:$e.LoadParser,priority:Ei.Low},name:"loadWebFont",test(i){return sl(i,YR)||fi(i,XR)},async load(i,e){var n,s,r;const t=Xe.ADAPTER.getFontFaceSet();if(t){const o=[],a=((n=e.data)==null?void 0:n.family)??jR(i),c=((r=(s=e.data)==null?void 0:s.weights)==null?void 0:r.filter(d=>VR.includes(d)))??["normal"],l=e.data??{};for(let d=0;d<c.length;d++){const u=c[d],h=new FontFace(a,`url(${GR(i)})`,{...l,weight:u});await h.load(),t.add(h),o.push(h)}return o.length===1?o[0]:o}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(i){(Array.isArray(i)?i:[i]).forEach(e=>Xe.ADAPTER.getFontFaceSet().delete(e))}};He.add(WR);const qR=`(function() {
|
||
"use strict";
|
||
const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
|
||
async function checkImageBitmap() {
|
||
try {
|
||
if (typeof createImageBitmap != "function")
|
||
return !1;
|
||
const imageBlob = await (await fetch(WHITE_PNG)).blob(), imageBitmap = await createImageBitmap(imageBlob);
|
||
return imageBitmap.width === 1 && imageBitmap.height === 1;
|
||
} catch {
|
||
return !1;
|
||
}
|
||
}
|
||
checkImageBitmap().then((result) => {
|
||
self.postMessage(result);
|
||
});
|
||
})();
|
||
`;let Oa=null,bm=class{constructor(){Oa||(Oa=URL.createObjectURL(new Blob([qR],{type:"application/javascript"}))),this.worker=new Worker(Oa)}};bm.revokeObjectURL=function(){Oa&&(URL.revokeObjectURL(Oa),Oa=null)};const KR=`(function() {
|
||
"use strict";
|
||
async function loadImageBitmap(url) {
|
||
const response = await fetch(url);
|
||
if (!response.ok)
|
||
throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \${response.status} \${response.statusText}\`);
|
||
const imageBlob = await response.blob();
|
||
return await createImageBitmap(imageBlob);
|
||
}
|
||
self.onmessage = async (event) => {
|
||
try {
|
||
const imageBitmap = await loadImageBitmap(event.data.data[0]);
|
||
self.postMessage({
|
||
data: imageBitmap,
|
||
uuid: event.data.uuid,
|
||
id: event.data.id
|
||
}, [imageBitmap]);
|
||
} catch (e) {
|
||
self.postMessage({
|
||
error: e,
|
||
uuid: event.data.uuid,
|
||
id: event.data.id
|
||
});
|
||
}
|
||
};
|
||
})();
|
||
`;let Na=null;class PS{constructor(){Na||(Na=URL.createObjectURL(new Blob([KR],{type:"application/javascript"}))),this.worker=new Worker(Na)}}PS.revokeObjectURL=function(){Na&&(URL.revokeObjectURL(Na),Na=null)};let W0=0,tp;class JR{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 bm;t.addEventListener("message",n=>{t.terminate(),bm.revokeObjectURL(),e(n.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){tp===void 0&&(tp=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<tp&&(this._createdWorkers++,e=new PS().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 n=new Promise((s,r)=>{this.queue.push({id:e,arguments:t,resolve:s,reject:r})});return this.next(),n}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),n=t.id;this.resolveHash[W0]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:W0++,id:n})}}const q0=new JR;function Tc(i,e,t){i.resource.internal=!0;const n=new tt(i),s=()=>{delete e.promiseCache[t],Mo.has(t)&&Mo.remove(t)};return n.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."),s())}),n.once("destroyed",()=>{i.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),s())}),n}const ZR=[".jpeg",".jpg",".png",".webp",".avif"],QR=["image/jpeg","image/png","image/webp","image/avif"];async function e2(i){const e=await Xe.ADAPTER.fetch(i);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${i}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const fh={name:"loadTextures",extension:{type:$e.LoadParser,priority:Ei.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(i){return sl(i,QR)||fi(i,ZR)},async load(i,e,t){var a;const n=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let s;n?this.config.preferWorkers&&await q0.isImageBitmapSupported()?s=await q0.loadImageBitmap(i):s=await e2(i):s=await new Promise((c,l)=>{const d=new Image;d.crossOrigin=this.config.crossOrigin,d.src=i,d.complete?c(d):(d.onload=()=>c(d),d.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=br(i)),n&&((a=r.resourceOptions)==null?void 0:a.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const o=new st(s,r);return o.resource.src=i,Tc(o,t,i)},unload(i){i.destroy(!0)}};He.add(fh);const t2=".svg",n2="image/svg+xml",i2={extension:{type:$e.LoadParser,priority:Ei.High},name:"loadSVG",test(i){return sl(i,n2)||fi(i,t2)},async testParse(i){return lm.test(i)},async parse(i,e,t){var r;const n=new lm(i,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await n.load();const s=new st(n,{resolution:br(i),...e==null?void 0:e.data});return s.resource.src=e.src,Tc(s,t,e.src)},async load(i,e){return(await Xe.ADAPTER.fetch(i)).text()},unload:fh.unload};He.add(i2);const s2=[".mp4",".m4v",".webm",".ogv"],r2=["video/mp4","video/webm","video/ogg"],o2={name:"loadVideo",extension:{type:$e.LoadParser,priority:Ei.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(i){return sl(i,r2)||fi(i,s2)},async load(i,e,t){var o;let n;const s=await(await Xe.ADAPTER.fetch(i)).blob(),r=URL.createObjectURL(s);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 wS(r,a);await c.load();const l=new st(c,{alphaMode:await fk(),resolution:br(i),...e==null?void 0:e.data});l.resource.src=i,n=Tc(l,t,i),n.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(a){throw URL.revokeObjectURL(r),a}return n},unload(i){i.destroy(!0)}};He.add(o2);class a2{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=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const t=e;this._defaultSearchParams=Object.keys(t).map(n=>`${encodeURIComponent(n)}=${encodeURIComponent(t[n])}`).join("&")}}getAlias(e){const{alias:t,name:n,src:s,srcs:r}=e;return Wi(t||n||s||r,o=>typeof o=="string"?o:Array.isArray(o)?o.map(a=>(a==null?void 0:a.src)??(a==null?void 0:a.srcs)??a):o!=null&&o.src||o!=null&&o.srcs?o.src??o.srcs:o,!0)}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){const n=[];Array.isArray(t)?t.forEach(s=>{const r=s.src??s.srcs,o=s.alias??s.name;let a;if(typeof o=="string"){const c=this._createBundleAssetId(e,o);n.push(c),a=[o,c]}else{const c=o.map(l=>this._createBundleAssetId(e,l));n.push(...c),a=[...o,...c]}this.add({...s,alias:a,src:r})}):Object.keys(t).forEach(s=>{const r=[s,this._createBundleAssetId(e,s)];if(typeof t[s]=="string")this.add({alias:r,src:t[s]});else if(Array.isArray(t[s]))this.add({alias:r,src:t[s]});else{const o=t[s],a=o.src??o.srcs;this.add({...o,alias:r,src:Array.isArray(a)?a:[a]})}n.push(...r)}),this._bundles[e]=n}add(e,t,n,s,r){const o=[];typeof e=="string"||Array.isArray(e)&&typeof e[0]=="string"?(yt("7.2.0",`Assets.add now uses an object instead of individual parameters.
|
||
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),o.push({alias:e,src:t,data:n,format:s,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`)},Wi(o).forEach(c=>{const{src:l,srcs:d}=c;let{data:u,format:h,loadParser:f}=c;const p=Wi(l||d).map(v=>typeof v=="string"?RR(v):Array.isArray(v)?v:[v]),m=this.getAlias(c);Array.isArray(m)?m.forEach(a):a(m);const g=[];p.forEach(v=>{v.forEach(y=>{let b={};if(typeof y!="object"){b.src=y;for(let x=0;x<this._parsers.length;x++){const T=this._parsers[x];if(T.test(y)){b=T.parse(y);break}}}else u=y.data??u,h=y.format??h,f=y.loadParser??f,b={...b,...y};if(!m)throw new Error(`[Resolver] alias is undefined for this asset: ${b.src}`);b=this.buildResolvedAsset(b,{aliases:m,data:u,format:h,loadParser:f}),g.push(b)})}),m.forEach(v=>{this._assetMap[v]=g})})}resolveBundle(e){const t=cu(e);e=Wi(e);const n={};return e.forEach(s=>{const r=this._bundles[s];if(r){const o=this.resolve(r),a={};for(const c in o){const l=o[c];a[this._extractAssetIdFromBundle(s,c)]=l}n[s]=a}}),t?n[e[0]]:n}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const n={};for(const s in t)n[s]=t[s].src;return n}return t.src}resolve(e){const t=cu(e);e=Wi(e);const n={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let r=this._assetMap[s];const o=r[0],a=this._getPreferredOrder(r);a==null||a.priority.forEach(c=>{a.params[c].forEach(l=>{const d=r.filter(u=>u[c]?u[c]===l:!1);d.length&&(r=d)})}),this._resolverHash[s]=r[0]??o}else this._resolverHash[s]=this.buildResolvedAsset({alias:[s],src:s},{});n[s]=this._resolverHash[s]}),t?n[e[0]]:n}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const n=e[0],s=this._preferredOrder.find(r=>r.params.format.includes(n.format));if(s)return s}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:n,data:s,loadParser:r,format:o}=t;return(this._basePath||this._rootPath)&&(e.src=pn.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=n??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=r??e.loadParser,e.format=o??e.format??pn.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class l2{constructor(){this._detections=[],this._initialized=!1,this.resolver=new a2,this.loader=new LR,this.cache=Mo,this._backgroundLoader=new IR(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,n=typeof t=="number"?[t]:t,s=await this._detectFormats({preferredFormats:(o=e.texturePreference)==null?void 0:o.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:s,resolution:n}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,n,s,r){this.resolver.add(e,t,n,s,r)}async load(e,t){this._initialized||await this.init();const n=cu(e),s=Wi(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(s),o=await this._mapLoadToResolve(r,t);return n?o[s[0]]:o}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let n=!1;typeof e=="string"&&(n=!0,e=[e]);const s=this.resolver.resolveBundle(e),r={},o=Object.keys(s);let a=0,c=0;const l=()=>{t==null||t(++a/c)},d=o.map(u=>{const h=s[u];return c+=Object.keys(h).length,this._mapLoadToResolve(h,l).then(f=>{r[u]=f})});return await Promise.all(d),n?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(n=>{this._backgroundLoader.add(Object.values(n))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return Mo.get(e);const t={};for(let n=0;n<e.length;n++)t[n]=Mo.get(e[n]);return t}async _mapLoadToResolve(e,t){const n=Object.values(e),s=Object.keys(e);this._backgroundLoader.active=!1;const r=await this.loader.load(n,t);this._backgroundLoader.active=!0;const o={};return n.forEach((a,c)=>{const l=r[a.src],d=[a.src];a.alias&&d.push(...a.alias),o[s[c]]=l,Mo.set(d,l)}),o}async unload(e){this._initialized||await this.init();const t=Wi(e).map(s=>typeof s!="string"?s.src:s),n=this.resolver.resolve(t);await this._unloadFromResolved(n)}async unloadBundle(e){this._initialized||await this.init(),e=Wi(e);const t=this.resolver.resolveBundle(e),n=Object.keys(t).map(s=>this._unloadFromResolved(t[s]));await Promise.all(n)}async _unloadFromResolved(e){const t=Object.values(e);t.forEach(n=>{Mo.remove(n.src)}),await this.loader.unload(t)}async _detectFormats(e){let t=[];e.preferredFormats&&(t=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const n of e.detections)e.skipDetections||await n.test()?t=await n.add(t):e.skipDetections||(t=await n.remove(t));return t=t.filter((n,s)=>t.indexOf(n)===s),t}get detections(){return this._detections}get preferWorkers(){return fh.config.preferWorkers}set preferWorkers(e){yt("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(n=>n in e).forEach(n=>{t.config[n]=e[n]})})}}const Is=new l2;He.handleByList($e.LoadParser,Is.loader.parsers).handleByList($e.ResolveParser,Is.resolver.parsers).handleByList($e.CacheParser,Is.cache.parsers).handleByList($e.DetectionParser,Is.detections);const c2={extension:$e.CacheParser,test:i=>Array.isArray(i)&&i.every(e=>e instanceof tt),getCacheableAssets:(i,e)=>{const t={};return i.forEach(n=>{e.forEach((s,r)=>{t[n+(r===0?"":r+1)]=s})}),t}};He.add(c2);async function kS(i){if("Image"in globalThis)return new Promise(e=>{const t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src=i});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(i)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const d2={extension:{type:$e.DetectionParser,priority:1},test:async()=>kS("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async i=>[...i,"avif"],remove:async i=>i.filter(e=>e!=="avif")};He.add(d2);const u2={extension:{type:$e.DetectionParser,priority:0},test:async()=>kS("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async i=>[...i,"webp"],remove:async i=>i.filter(e=>e!=="webp")};He.add(u2);const K0=["png","jpg","jpeg"],h2={extension:{type:$e.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async i=>[...i,...K0],remove:async i=>i.filter(e=>!K0.includes(e))};He.add(h2);const f2="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function Ug(i){return f2?!1:document.createElement("video").canPlayType(i)!==""}const p2={extension:{type:$e.DetectionParser,priority:0},test:async()=>Ug("video/webm"),add:async i=>[...i,"webm"],remove:async i=>i.filter(e=>e!=="webm")};He.add(p2);const m2={extension:{type:$e.DetectionParser,priority:0},test:async()=>Ug("video/mp4"),add:async i=>[...i,"mp4","m4v"],remove:async i=>i.filter(e=>e!=="mp4"&&e!=="m4v")};He.add(m2);const g2={extension:{type:$e.DetectionParser,priority:0},test:async()=>Ug("video/ogg"),add:async i=>[...i,"ogv"],remove:async i=>i.filter(e=>e!=="ogv")};He.add(g2);const v2={extension:$e.ResolveParser,test:fh.test,parse:i=>{var e;return{resolution:parseFloat(((e=Xe.RETINA_PREFIX.exec(i))==null?void 0:e[1])??"1"),format:pn.extname(i).slice(1),src:i}}};He.add(v2);var Ln=(i=>(i[i.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",i[i.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",i[i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",i[i.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",i[i.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",i[i.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",i[i.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",i[i.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",i[i.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",i[i.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",i[i.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",i[i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",i[i.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",i[i.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",i[i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",i[i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",i[i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",i[i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",i[i.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",i[i.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",i[i.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",i[i.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",i[i.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",i[i.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",i[i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",i[i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",i[i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",i))(Ln||{});const du={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let ps,ya;function J0(){ya={bptc:ps.getExtension("EXT_texture_compression_bptc"),astc:ps.getExtension("WEBGL_compressed_texture_astc"),etc:ps.getExtension("WEBGL_compressed_texture_etc"),s3tc:ps.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:ps.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:ps.getExtension("WEBGL_compressed_texture_pvrtc")||ps.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:ps.getExtension("WEBGL_compressed_texture_etc1"),atc:ps.getExtension("WEBGL_compressed_texture_atc")}}const b2={extension:{type:$e.DetectionParser,priority:2},test:async()=>{const i=Xe.ADAPTER.createCanvas().getContext("webgl");return i?(ps=i,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async i=>{ya||J0();const e=[];for(const t in ya)ya[t]&&e.push(t);return[...e,...i]},remove:async i=>(ya||J0(),i.filter(e=>!(e in ya)))};He.add(b2);class y2 extends lh{constructor(e,t={width:1,height:1,autoLoad:!0}){let n,s;typeof e=="string"?(n=e,s=new Uint8Array):(n=null,s=e),super(s,t),this.origin=n,this.buffer=s?new qp(s):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new qp(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class Uo extends y2{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=Uo._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||Uo._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,n){const s=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;s.pixelStorei(s.UNPACK_ALIGNMENT,4);for(let r=0,o=this.levels;r<o;r++){const{levelID:a,levelWidth:c,levelHeight:l,levelBuffer:d}=this._levelBuffers[r];s.compressedTexImage2D(s.TEXTURE_2D,a,this.format,c,l,0,d)}return!0}onBlobLoaded(){this._levelBuffers=Uo._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)}static _formatToExtension(e){if(e>=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,t,n,s,r,o,a){const c=new Array(n);let l=e.byteOffset,d=o,u=a,h=d+s-1&~(s-1),f=u+r-1&~(r-1),p=h*f*du[t];for(let m=0;m<n;m++)c[m]={levelID:m,levelWidth:n>1?d:h,levelHeight:n>1?u:f,levelBuffer:new Uint8Array(e.buffer,l,p)},l+=p,d=d>>1||1,u=u>>1||1,h=d+s-1&~(s-1),f=u+r-1&~(r-1),p=h*f*du[t];return c}}const np=4,Zc=124,x2=32,Z0=20,w2=542327876,Qc={HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},S2={FOURCC:2},ed={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3},C2=1,A2=2,T2=4,E2=64,_2=512,M2=131072,P2=827611204,k2=861165636,I2=894720068,R2=808540228,F2=4,L2={[P2]:Ln.COMPRESSED_RGBA_S3TC_DXT1_EXT,[k2]:Ln.COMPRESSED_RGBA_S3TC_DXT3_EXT,[I2]:Ln.COMPRESSED_RGBA_S3TC_DXT5_EXT},D2={70:Ln.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Ln.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Ln.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Ln.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Ln.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Ln.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Ln.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Ln.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Ln.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:Ln.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:Ln.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:Ln.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:Ln.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function O2(i){const e=new Uint32Array(i);if(e[0]!==w2)throw new Error("Invalid DDS file magic word");const t=new Uint32Array(i,0,Zc/Uint32Array.BYTES_PER_ELEMENT),n=t[Qc.HEIGHT],s=t[Qc.WIDTH],r=t[Qc.MIPMAP_COUNT],o=new Uint32Array(i,Qc.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,x2/Uint32Array.BYTES_PER_ELEMENT),a=o[C2];if(a&T2){const c=o[S2.FOURCC];if(c!==R2){const y=L2[c],b=np+Zc,x=new Uint8Array(i,b);return[new Uo(x,{format:y,width:s,height:n,levels:r})]}const l=np+Zc,d=new Uint32Array(e.buffer,l,Z0/Uint32Array.BYTES_PER_ELEMENT),u=d[ed.DXGI_FORMAT],h=d[ed.RESOURCE_DIMENSION],f=d[ed.MISC_FLAG],p=d[ed.ARRAY_SIZE],m=D2[u];if(m===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${u}`);if(f===F2)throw new Error("DDSParser does not support cubemap textures");if(h===6)throw new Error("DDSParser does not supported 3D texture data");const g=new Array,v=np+Zc+Z0;if(p===1)g.push(new Uint8Array(i,v));else{const y=du[m];let b=0,x=s,T=n;for(let S=0;S<r;S++){const C=Math.max(1,x+3&-4),M=Math.max(1,T+3&-4),k=C*M*y;b+=k,x=x>>>1,T=T>>>1}let E=v;for(let S=0;S<p;S++)g.push(new Uint8Array(i,E,b)),E+=b}return g.map(y=>new Uo(y,{format:m,width:s,height:n,levels:r}))}throw a&E2?new Error("DDSParser does not support uncompressed texture data."):a&_2?new Error("DDSParser does not supported YUV uncompressed texture data."):a&M2?new Error("DDSParser does not support single-channel (lumninance) texture data!"):a&A2?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const Q0=[171,75,84,88,32,49,49,187,13,10,26,10],N2=67305985,Yi={ENDIANNESS:12,GL_TYPE:16,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},ym=64,ey={[je.UNSIGNED_BYTE]:1,[je.UNSIGNED_SHORT]:2,[je.INT]:4,[je.UNSIGNED_INT]:4,[je.FLOAT]:4,[je.HALF_FLOAT]:8},$2={[Ie.RGBA]:4,[Ie.RGB]:3,[Ie.RG]:2,[Ie.RED]:1,[Ie.LUMINANCE]:1,[Ie.LUMINANCE_ALPHA]:2,[Ie.ALPHA]:1},B2={[je.UNSIGNED_SHORT_4_4_4_4]:2,[je.UNSIGNED_SHORT_5_5_5_1]:2,[je.UNSIGNED_SHORT_5_6_5]:2};function U2(i,e,t=!1){const n=new DataView(e);if(!V2(i,n))return null;const s=n.getUint32(Yi.ENDIANNESS,!0)===N2,r=n.getUint32(Yi.GL_TYPE,s),o=n.getUint32(Yi.GL_FORMAT,s),a=n.getUint32(Yi.GL_INTERNAL_FORMAT,s),c=n.getUint32(Yi.PIXEL_WIDTH,s),l=n.getUint32(Yi.PIXEL_HEIGHT,s)||1,d=n.getUint32(Yi.PIXEL_DEPTH,s)||1,u=n.getUint32(Yi.NUMBER_OF_ARRAY_ELEMENTS,s)||1,h=n.getUint32(Yi.NUMBER_OF_FACES,s),f=n.getUint32(Yi.NUMBER_OF_MIPMAP_LEVELS,s),p=n.getUint32(Yi.BYTES_OF_KEY_VALUE_DATA,s);if(l===0||d!==1)throw new Error("Only 2D textures are supported");if(h!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(u!==1)throw new Error("WebGL does not support array textures");const m=4,g=4,v=c+3&-4,y=l+3&-4,b=new Array(u);let x=c*l;r===0&&(x=v*y);let T;if(r!==0?ey[r]?T=ey[r]*$2[o]:T=B2[r]:T=du[a],T===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const E=t?Y2(n,p,s):null;let S=x*T,C=c,M=l,k=v,P=y,I=ym+p;for(let D=0;D<f;D++){const $=n.getUint32(I,s);let j=I+4;for(let B=0;B<u;B++){let Y=b[B];Y||(Y=b[B]=new Array(f)),Y[D]={levelID:D,levelWidth:f>1||r!==0?C:k,levelHeight:f>1||r!==0?M:P,levelBuffer:new Uint8Array(e,j,S)},j+=S}I+=$+4,I=I%4!==0?I+4-I%4:I,C=C>>1||1,M=M>>1||1,k=C+m-1&-4,P=M+g-1&-4,S=k*P*T}return r!==0?{uncompressed:b.map(D=>{let $=D[0].levelBuffer,j=!1;return r===je.FLOAT?$=new Float32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4):r===je.UNSIGNED_INT?(j=!0,$=new Uint32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)):r===je.INT&&(j=!0,$=new Int32Array(D[0].levelBuffer.buffer,D[0].levelBuffer.byteOffset,D[0].levelBuffer.byteLength/4)),{resource:new lh($,{width:D[0].levelWidth,height:D[0].levelHeight}),type:r,format:j?X2(o):o}}),kvData:E}:{compressed:b.map(D=>new Uo(null,{format:a,width:c,height:l,levels:f,levelBuffers:D})),kvData:E}}function V2(i,e){for(let t=0;t<Q0.length;t++)if(e.getUint8(t)!==Q0[t])return console.error(`${i} is not a valid *.ktx file!`),!1;return!0}function X2(i){switch(i){case Ie.RGBA:return Ie.RGBA_INTEGER;case Ie.RGB:return Ie.RGB_INTEGER;case Ie.RG:return Ie.RG_INTEGER;case Ie.RED:return Ie.RED_INTEGER;default:return i}}function Y2(i,e,t){const n=new Map;let s=0;for(;s<e;){const r=i.getUint32(ym+s,t),o=ym+s+4,a=3-(r+3)%4;if(r===0||r>e-s){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let c=0;for(;c<r&&i.getUint8(o+c)!==0;c++);if(c===-1){console.error("KTXLoader: Failed to find null byte terminating kvData key");break}const l=new TextDecoder().decode(new Uint8Array(i.buffer,o,c)),d=new DataView(i.buffer,o+c+1,r-c-1);n.set(l,d),s+=4+r+a}return n}const z2={extension:{type:$e.LoadParser,priority:Ei.High},name:"loadDDS",test(i){return fi(i,".dds")},async load(i,e,t){const n=await(await Xe.ADAPTER.fetch(i)).arrayBuffer(),s=O2(n).map(r=>{const o=new st(r,{mipmap:Bi.OFF,alphaMode:Fn.NO_PREMULTIPLIED_ALPHA,resolution:br(i),...e.data});return Tc(o,t,i)});return s.length===1?s[0]:s},unload(i){Array.isArray(i)?i.forEach(e=>e.destroy(!0)):i.destroy(!0)}};He.add(z2);const j2={extension:{type:$e.LoadParser,priority:Ei.High},name:"loadKTX",test(i){return fi(i,".ktx")},async load(i,e,t){const n=await(await Xe.ADAPTER.fetch(i)).arrayBuffer(),{compressed:s,uncompressed:r,kvData:o}=U2(i,n),a=s??r,c={mipmap:Bi.OFF,alphaMode:Fn.NO_PREMULTIPLIED_ALPHA,resolution:br(i),...e.data},l=a.map(d=>{a===r&&Object.assign(c,{type:d.type,format:d.format});const u=d.resource??d,h=new st(u,c);return h.ktxKeyValueData=o,Tc(h,t,i)});return l.length===1?l[0]:l},unload(i){Array.isArray(i)?i.forEach(e=>e.destroy(!0)):i.destroy(!0)}};He.add(j2);const H2=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],G2={extension:$e.ResolveParser,test:i=>{const e=pn.extname(i).slice(1);return["basis","ktx","dds"].includes(e)},parse:i=>{var n,s;const e=i.split("."),t=e.pop();if(["ktx","dds"].includes(t)){const r=e.pop();if(H2.includes(r))return{resolution:parseFloat(((n=Xe.RETINA_PREFIX.exec(i))==null?void 0:n[1])??"1"),format:r,src:i}}return{resolution:parseFloat(((s=Xe.RETINA_PREFIX.exec(i))==null?void 0:s[1])??"1"),format:t,src:i}}};He.add(G2);const td=new ht,W2=4,IS=class Il{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){var t;const e=(t=this.renderer)==null?void 0:t.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,t,n,s){const r=new Image;return r.src=await this.base64(e,t,n,s),r}async base64(e,t,n,s){const r=this.canvas(e,s);if(r.toBlob!==void 0)return new Promise((o,a)=>{r.toBlob(c=>{if(!c){a(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>o(l.result),l.onerror=a,l.readAsDataURL(c)},t,n)});if(r.toDataURL!==void 0)return r.toDataURL(t,n);if(r.convertToBlob!==void 0){const o=await r.convertToBlob({type:t,quality:n});return new Promise((a,c)=>{const l=new FileReader;l.onload=()=>a(l.result),l.onerror=c,l.readAsDataURL(o)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:n,width:s,height:r,flipY:o,premultipliedAlpha:a}=this._rawPixels(e,t);o&&Il._flipY(n,s,r),a&&Il._unpremultiplyAlpha(n);const c=new Pk(s,r,1),l=new ImageData(new Uint8ClampedArray(n.buffer),s,r);return c.context.putImageData(l,0,0),c.canvas}pixels(e,t){const{pixels:n,width:s,height:r,flipY:o,premultipliedAlpha:a}=this._rawPixels(e,t);return o&&Il._flipY(n,s,r),a&&Il._unpremultiplyAlpha(n),n}_rawPixels(e,t){const n=this.renderer;if(!n)throw new Error("The Extract has already been destroyed");let s,r=!1,o=!1,a,c=!1;e&&(e instanceof Jo?a=e:(a=n.generateTexture(e,{region:t,resolution:n.resolution,multisample:n.multisample}),c=!0,t&&(td.width=t.width,td.height=t.height,t=td)));const l=n.gl;if(a){if(s=a.baseTexture.resolution,t=t??a.frame,r=!1,o=a.baseTexture.alphaMode>0&&a.baseTexture.format===Ie.RGBA,!c){n.renderTexture.bind(a);const f=a.framebuffer.glFramebuffers[n.CONTEXT_UID];f.blitFramebuffer&&n.framebuffer.bind(f.blitFramebuffer)}}else s=n.resolution,t||(t=td,t.width=n.width/s,t.height=n.height/s),r=!0,o=this._rendererPremultipliedAlpha,n.renderTexture.bind();const d=Math.max(Math.round(t.width*s),1),u=Math.max(Math.round(t.height*s),1),h=new Uint8Array(W2*d*u);return l.readPixels(Math.round(t.x*s),Math.round(t.y*s),d,u,l.RGBA,l.UNSIGNED_BYTE,h),c&&(a==null||a.destroy(!0)),{pixels:h,width:d,height:u,flipY:r,premultipliedAlpha:o}}destroy(){this.renderer=null}static _flipY(e,t,n){const s=t<<2,r=n>>1,o=new Uint8Array(s);for(let a=0;a<r;a++){const c=a*s,l=(n-a-1)*s;o.set(e.subarray(c,c+s)),e.copyWithin(c,l,l+s),e.set(o,l)}}static _unpremultiplyAlpha(e){e instanceof Uint8ClampedArray&&(e=new Uint8Array(e.buffer));const t=e.length;for(let n=0;n<t;n+=4){const s=e[n+3];if(s!==0){const r=255.001/s;e[n]=e[n]*r+.5,e[n+1]=e[n+1]*r+.5,e[n+2]=e[n+2]*r+.5}}}};IS.extension={name:"extract",type:$e.RendererSystem};let q2=IS;He.add(q2);const uu={build(i){const e=i.points;let t,n,s,r,o,a;if(i.type===$n.CIRC){const p=i.shape;t=p.x,n=p.y,o=a=p.radius,s=r=0}else if(i.type===$n.ELIP){const p=i.shape;t=p.x,n=p.y,o=p.width,a=p.height,s=r=0}else{const p=i.shape,m=p.width/2,g=p.height/2;t=p.x+m,n=p.y+g,o=a=Math.max(0,Math.min(p.radius,Math.min(m,g))),s=m-o,r=g-a}if(!(o>=0&&a>=0&&s>=0&&r>=0)){e.length=0;return}const c=Math.ceil(2.3*Math.sqrt(o+a)),l=c*8+(s?4:0)+(r?4:0);if(e.length=l,l===0)return;if(c===0){e.length=8,e[0]=e[6]=t+s,e[1]=e[3]=n+r,e[2]=e[4]=t-s,e[5]=e[7]=n-r;return}let d=0,u=c*4+(s?2:0)+2,h=u,f=l;{const p=s+o,m=r,g=t+p,v=t-p,y=n+m;if(e[d++]=g,e[d++]=y,e[--u]=y,e[--u]=v,r){const b=n-m;e[h++]=v,e[h++]=b,e[--f]=b,e[--f]=g}}for(let p=1;p<c;p++){const m=Math.PI/2*(p/c),g=s+Math.cos(m)*o,v=r+Math.sin(m)*a,y=t+g,b=t-g,x=n+v,T=n-v;e[d++]=y,e[d++]=x,e[--u]=x,e[--u]=b,e[h++]=b,e[h++]=T,e[--f]=T,e[--f]=y}{const p=s,m=r+a,g=t+p,v=t-p,y=n+m,b=n-m;e[d++]=g,e[d++]=y,e[--f]=b,e[--f]=g,s&&(e[d++]=v,e[d++]=y,e[--f]=b,e[--f]=v)}},triangulate(i,e){const t=i.points,n=e.points,s=e.indices;if(t.length===0)return;let r=n.length/2;const o=r;let a,c;if(i.type!==$n.RREC){const d=i.shape;a=d.x,c=d.y}else{const d=i.shape;a=d.x+d.width/2,c=d.y+d.height/2}const l=i.matrix;n.push(i.matrix?l.a*a+l.c*c+l.tx:a,i.matrix?l.b*a+l.d*c+l.ty:c),r++,n.push(t[0],t[1]);for(let d=2;d<t.length;d+=2)n.push(t[d],t[d+1]),s.push(r++,o,r);s.push(o+1,o,r)}};function ty(i,e=!1){const t=i.length;if(t<6)return;let n=0;for(let s=0,r=i[t-2],o=i[t-1];s<t;s+=2){const a=i[s],c=i[s+1];n+=(a-r)*(c+o),r=a,o=c}if(!e&&n>0||e&&n<=0){const s=t/2;for(let r=s+s%2;r<t;r+=2){const o=t-r-2,a=t-r-1,c=r,l=r+1;[i[o],i[c]]=[i[c],i[o]],[i[a],i[l]]=[i[l],i[a]]}}}const RS={build(i){i.points=i.shape.points.slice()},triangulate(i,e){let t=i.points;const n=i.holes,s=e.points,r=e.indices;if(t.length>=6){ty(t,!1);const o=[];for(let l=0;l<n.length;l++){const d=n[l];ty(d.points,!0),o.push(t.length/2),t=t.concat(d.points)}const a=PP(t,o,2);if(!a)return;const c=s.length/2;for(let l=0;l<a.length;l+=3)r.push(a[l]+c),r.push(a[l+1]+c),r.push(a[l+2]+c);for(let l=0;l<t.length;l++)s.push(t[l])}}},K2={build(i){const e=i.shape,t=e.x,n=e.y,s=e.width,r=e.height,o=i.points;o.length=0,s>=0&&r>=0&&o.push(t,n,t+s,n,t+s,n+r,t,n+r)},triangulate(i,e){const t=i.points,n=e.points;if(t.length===0)return;const s=n.length/2;n.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(s,s+1,s+2,s+1,s+2,s+3)}},J2={build(i){uu.build(i)},triangulate(i,e){uu.triangulate(i,e)}};var Ii=(i=>(i.MITER="miter",i.BEVEL="bevel",i.ROUND="round",i))(Ii||{}),Wr=(i=>(i.BUTT="butt",i.ROUND="round",i.SQUARE="square",i))(Wr||{});const za={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(i,e=20){if(!this.adaptive||!i||isNaN(i))return e;let t=Math.ceil(i/this.maxLength);return t<this.minSegments?t=this.minSegments:t>this.maxSegments&&(t=this.maxSegments),t}};class ny{static curveTo(e,t,n,s,r,o){const a=o[o.length-2],c=o[o.length-1]-t,l=a-e,d=s-t,u=n-e,h=Math.abs(c*u-l*d);if(h<1e-8||r===0)return(o[o.length-2]!==e||o[o.length-1]!==t)&&o.push(e,t),null;const f=c*c+l*l,p=d*d+u*u,m=c*d+l*u,g=r*Math.sqrt(f)/h,v=r*Math.sqrt(p)/h,y=g*m/f,b=v*m/p,x=g*u+v*l,T=g*d+v*c,E=l*(v+y),S=c*(v+y),C=u*(g+b),M=d*(g+b),k=Math.atan2(S-T,E-x),P=Math.atan2(M-T,C-x);return{cx:x+e,cy:T+t,radius:r,startAngle:k,endAngle:P,anticlockwise:l*d>u*c}}static arc(e,t,n,s,r,o,a,c,l){const d=a-o,u=za._segmentsCount(Math.abs(d)*r,Math.ceil(Math.abs(d)/nu)*40),h=d/(u*2),f=h*2,p=Math.cos(h),m=Math.sin(h),g=u-1,v=g%1/g;for(let y=0;y<=g;++y){const b=y+v*y,x=h+o+f*b,T=Math.cos(x),E=-Math.sin(x);l.push((p*T+m*E)*r+n,(p*-E+m*T)*r+s)}}}class Z2{constructor(){this.reset()}begin(e,t,n){this.reset(),this.style=e,this.start=t,this.attribStart=n}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Vg{static curveLength(e,t,n,s,r,o,a,c){let l=0,d=0,u=0,h=0,f=0,p=0,m=0,g=0,v=0,y=0,b=0,x=e,T=t;for(let E=1;E<=10;++E)d=E/10,u=d*d,h=u*d,f=1-d,p=f*f,m=p*f,g=m*e+3*p*d*n+3*f*u*r+h*a,v=m*t+3*p*d*s+3*f*u*o+h*c,y=x-g,b=T-v,x=g,T=v,l+=Math.sqrt(y*y+b*b);return l}static curveTo(e,t,n,s,r,o,a){const c=a[a.length-2],l=a[a.length-1];a.length-=2;const d=za._segmentsCount(Vg.curveLength(c,l,e,t,n,s,r,o));let u=0,h=0,f=0,p=0,m=0;a.push(c,l);for(let g=1,v=0;g<=d;++g)v=g/d,u=1-v,h=u*u,f=h*u,p=v*v,m=p*v,a.push(f*c+3*h*v*e+3*u*p*n+m*r,f*l+3*h*v*t+3*u*p*s+m*o)}}function iy(i,e,t,n,s,r,o,a){const c=i-t*s,l=e-n*s,d=i+t*r,u=e+n*r;let h,f;o?(h=n,f=-t):(h=-n,f=t);const p=c+h,m=l+f,g=d+h,v=u+f;return a.push(p,m,g,v),2}function yo(i,e,t,n,s,r,o,a){const c=t-i,l=n-e;let d=Math.atan2(c,l),u=Math.atan2(s-i,r-e);a&&d<u?d+=Math.PI*2:!a&&d>u&&(u+=Math.PI*2);let h=d;const f=u-d,p=Math.abs(f),m=Math.sqrt(c*c+l*l),g=(15*p*Math.sqrt(m)/Math.PI>>0)+1,v=f/g;if(h+=v,a){o.push(i,e,t,n);for(let y=1,b=h;y<g;y++,b+=v)o.push(i,e,i+Math.sin(b)*m,e+Math.cos(b)*m);o.push(i,e,s,r)}else{o.push(t,n,i,e);for(let y=1,b=h;y<g;y++,b+=v)o.push(i+Math.sin(b)*m,e+Math.cos(b)*m,i,e);o.push(s,r,i,e)}return g*2}function Q2(i,e){const t=i.shape;let n=i.points||t.points.slice();const s=e.closePointEps;if(n.length===0)return;const r=i.lineStyle,o=new Pt(n[0],n[1]),a=new Pt(n[n.length-2],n[n.length-1]),c=t.type!==$n.POLY||t.closeStroke,l=Math.abs(o.x-a.x)<s&&Math.abs(o.y-a.y)<s;if(c){n=n.slice(),l&&(n.pop(),n.pop(),a.set(n[n.length-2],n[n.length-1]));const Y=(o.x+a.x)*.5,U=(a.y+o.y)*.5;n.unshift(Y,U),n.push(Y,U)}const d=e.points,u=n.length/2;let h=n.length;const f=d.length/2,p=r.width/2,m=p*p,g=r.miterLimit*r.miterLimit;let v=n[0],y=n[1],b=n[2],x=n[3],T=0,E=0,S=-(y-x),C=v-b,M=0,k=0,P=Math.sqrt(S*S+C*C);S/=P,C/=P,S*=p,C*=p;const I=r.alignment,D=(1-I)*2,$=I*2;c||(r.cap===Wr.ROUND?h+=yo(v-S*(D-$)*.5,y-C*(D-$)*.5,v-S*D,y-C*D,v+S*$,y+C*$,d,!0)+2:r.cap===Wr.SQUARE&&(h+=iy(v,y,S,C,D,$,!0,d))),d.push(v-S*D,y-C*D,v+S*$,y+C*$);for(let Y=1;Y<u-1;++Y){v=n[(Y-1)*2],y=n[(Y-1)*2+1],b=n[Y*2],x=n[Y*2+1],T=n[(Y+1)*2],E=n[(Y+1)*2+1],S=-(y-x),C=v-b,P=Math.sqrt(S*S+C*C),S/=P,C/=P,S*=p,C*=p,M=-(x-E),k=b-T,P=Math.sqrt(M*M+k*k),M/=P,k/=P,M*=p,k*=p;const U=b-v,O=y-x,L=b-T,R=E-x,X=U*L+O*R,z=O*L-R*U,K=z<0;if(Math.abs(z)<.001*Math.abs(X)){d.push(b-S*D,x-C*D,b+S*$,x+C*$),X>=0&&(r.join===Ii.ROUND?h+=yo(b,x,b-S*D,x-C*D,b-M*D,x-k*D,d,!1)+4:h+=2,d.push(b-M*$,x-k*$,b+M*D,x+k*D));continue}const Z=(-S+v)*(-C+x)-(-S+b)*(-C+y),ae=(-M+T)*(-k+x)-(-M+b)*(-k+E),ce=(U*ae-L*Z)/z,ve=(R*Z-O*ae)/z,we=(ce-b)*(ce-b)+(ve-x)*(ve-x),re=b+(ce-b)*D,Ee=x+(ve-x)*D,q=b-(ce-b)*$,J=x-(ve-x)*$,ie=Math.min(U*U+O*O,L*L+R*R),se=K?D:$,H=ie+se*se*m,G=we<=H;let N=r.join;if(N===Ii.MITER&&we/m>g&&(N=Ii.BEVEL),G)switch(N){case Ii.MITER:{d.push(re,Ee,q,J);break}case Ii.BEVEL:{K?d.push(re,Ee,b+S*$,x+C*$,re,Ee,b+M*$,x+k*$):d.push(b-S*D,x-C*D,q,J,b-M*D,x-k*D,q,J),h+=2;break}case Ii.ROUND:{K?(d.push(re,Ee,b+S*$,x+C*$),h+=yo(b,x,b+S*$,x+C*$,b+M*$,x+k*$,d,!0)+4,d.push(re,Ee,b+M*$,x+k*$)):(d.push(b-S*D,x-C*D,q,J),h+=yo(b,x,b-S*D,x-C*D,b-M*D,x-k*D,d,!1)+4,d.push(b-M*D,x-k*D,q,J));break}}else{switch(d.push(b-S*D,x-C*D,b+S*$,x+C*$),N){case Ii.MITER:{K?d.push(q,J,q,J):d.push(re,Ee,re,Ee),h+=2;break}case Ii.ROUND:{K?h+=yo(b,x,b+S*$,x+C*$,b+M*$,x+k*$,d,!0)+2:h+=yo(b,x,b-S*D,x-C*D,b-M*D,x-k*D,d,!1)+2;break}}d.push(b-M*D,x-k*D,b+M*$,x+k*$),h+=2}}v=n[(u-2)*2],y=n[(u-2)*2+1],b=n[(u-1)*2],x=n[(u-1)*2+1],S=-(y-x),C=v-b,P=Math.sqrt(S*S+C*C),S/=P,C/=P,S*=p,C*=p,d.push(b-S*D,x-C*D,b+S*$,x+C*$),c||(r.cap===Wr.ROUND?h+=yo(b-S*(D-$)*.5,x-C*(D-$)*.5,b-S*D,x-C*D,b+S*$,x+C*$,d,!1)+2:r.cap===Wr.SQUARE&&(h+=iy(b,x,S,C,D,$,!1,d)));const j=e.indices,B=za.epsilon*za.epsilon;for(let Y=f;Y<h+f-2;++Y)v=d[Y*2],y=d[Y*2+1],b=d[(Y+1)*2],x=d[(Y+1)*2+1],T=d[(Y+2)*2],E=d[(Y+2)*2+1],!(Math.abs(v*(x-E)+b*(E-y)+T*(y-x))<B)&&j.push(Y,Y+1,Y+2)}function eF(i,e){let t=0;const n=i.shape,s=i.points||n.points,r=n.type!==$n.POLY||n.closeStroke;if(s.length===0)return;const o=e.points,a=e.indices,c=s.length/2,l=o.length/2;let d=l;for(o.push(s[0],s[1]),t=1;t<c;t++)o.push(s[t*2],s[t*2+1]),a.push(d,d+1),d++;r&&a.push(d,l)}function sy(i,e){i.lineStyle.native?eF(i,e):Q2(i,e)}class Xg{static curveLength(e,t,n,s,r,o){const a=e-2*n+r,c=t-2*s+o,l=2*n-2*e,d=2*s-2*t,u=4*(a*a+c*c),h=4*(a*l+c*d),f=l*l+d*d,p=2*Math.sqrt(u+h+f),m=Math.sqrt(u),g=2*u*m,v=2*Math.sqrt(f),y=h/m;return(g*p+m*h*(p-v)+(4*f*u-h*h)*Math.log((2*m+y+p)/(y+v)))/(4*g)}static curveTo(e,t,n,s,r){const o=r[r.length-2],a=r[r.length-1],c=za._segmentsCount(Xg.curveLength(o,a,e,t,n,s));let l=0,d=0;for(let u=1;u<=c;++u){const h=u/c;l=o+(e-o)*h,d=a+(t-a)*h,r.push(l+(e+(n-e)*h-l)*h,d+(t+(s-t)*h-d)*h)}}}const ip={[$n.POLY]:RS,[$n.CIRC]:uu,[$n.ELIP]:uu,[$n.RECT]:K2,[$n.RREC]:J2},ry=[],nd=[];class hu{constructor(e,t=null,n=null,s=null){this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=t,this.matrix=s,this.type=e.type}clone(){return new hu(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const la=new Pt,FS=class LS extends $w{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new oc,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),nd.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),ry.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,n=null,s=null){const r=new hu(e,t,n,s);return this.graphicsData.push(r),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const n=new hu(e,null,null,t),s=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=s.lineStyle,s.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let n=0;n<t.length;++n){const s=t[n];if(s.fillStyle.visible&&s.shape&&(s.matrix?s.matrix.applyInverse(e,la):la.copyFrom(e),s.shape.contains(la.x,la.y))){let r=!1;if(s.holes){for(let o=0;o<s.holes.length;o++)if(s.holes[o].shape.contains(la.x,la.y)){r=!0;break}}if(!r)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let n=null,s=null;this.batches.length>0&&(n=this.batches[this.batches.length-1],s=n.style);for(let c=this.shapeIndex;c<t.length;c++){this.shapeIndex++;const l=t[c],d=l.fillStyle,u=l.lineStyle;ip[l.type].build(l),l.matrix&&this.transformPoints(l.points,l.matrix),(d.visible||u.visible)&&this.processHoles(l.holes);for(let h=0;h<2;h++){const f=h===0?d:u;if(!f.visible)continue;const p=f.texture.baseTexture,m=this.indices.length,g=this.points.length/2;p.wrapMode=ts.REPEAT,h===0?this.processFill(l):this.processLine(l);const v=this.points.length/2-g;v!==0&&(n&&!this._compareStyles(s,f)&&(n.end(m,g),n=null),n||(n=ry.pop()||new Z2,n.begin(f,m,g),this.batches.push(n),s=f),this.addUvs(this.points,e,f.texture,g,v,f.matrix))}}const r=this.indices.length,o=this.points.length/2;if(n&&n.end(r,o),this.batches.length===0){this.batchable=!0;return}const a=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&a===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=a?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const n=this.graphicsData[e],s=n.fillStyle,r=n.lineStyle;if(s&&!s.texture.baseTexture.valid||r&&!r.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,n=e.length;t<n;t++){const s=e[t];for(let r=0;r<s.size;r++){const o=s.start+r;this.indicesUint16[o]=this.indicesUint16[o]-s.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<LS.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++st._globalBatch;for(let u=0;u<this.drawCalls.length;u++)this.drawCalls[u].texArray.clear(),nd.push(this.drawCalls[u]);this.drawCalls.length=0;const t=this.colors,n=this.textureIds;let s=nd.pop();s||(s=new Zp,s.texArray=new nm),s.texArray.count=0,s.start=0,s.size=0,s.type=Ps.TRIANGLES;let r=0,o=null,a=0,c=!1,l=Ps.TRIANGLES,d=0;this.drawCalls.push(s);for(let u=0;u<this.batches.length;u++){const h=this.batches[u],f=8,p=h.style,m=p.texture.baseTexture;c!==!!p.native&&(c=!!p.native,l=c?Ps.LINES:Ps.TRIANGLES,o=null,r=f,e++),o!==m&&(o=m,m._batchEnabled!==e&&(r===f&&(e++,r=0,s.size>0&&(s=nd.pop(),s||(s=new Zp,s.texArray=new nm),this.drawCalls.push(s)),s.start=d,s.size=0,s.texArray.count=0,s.type=l),m.touched=1,m._batchEnabled=e,m._batchLocation=r,m.wrapMode=ts.REPEAT,s.texArray.elements[s.texArray.count++]=m,r++)),s.size+=h.size,d+=h.size,a=m._batchLocation,this.addColors(t,p.color,p.alpha,h.attribSize,h.attribStart),this.addTextureIds(n,a,h.attribSize,h.attribStart)}st._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,n=this.colors,s=this.textureIds,r=new ArrayBuffer(e.length*3*4),o=new Float32Array(r),a=new Uint32Array(r);let c=0;for(let l=0;l<e.length/2;l++)o[c++]=e[l*2],o[c++]=e[l*2+1],o[c++]=t[l*2],o[c++]=t[l*2+1],a[c++]=n[l],o[c++]=s[l];this._buffer.update(r),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?RS.triangulate(e,this):ip[e.type].triangulate(e,this)}processLine(e){sy(e,this);for(let t=0;t<e.holes.length;t++)sy(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const n=e[t];ip[n.type].build(n),n.matrix&&this.transformPoints(n.points,n.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let n=0;n<e.length/2;n++){const s=e[n*2],r=e[n*2+1];e[n*2]=t.a*s+t.c*r+t.tx,e[n*2+1]=t.b*s+t.d*r+t.ty}}addColors(e,t,n,s,r=0){const o=Ot.shared.setValue(t).toLittleEndianNumber(),a=Ot.shared.setValue(o).toPremultiplied(n);e.length=Math.max(e.length,r+s);for(let c=0;c<s;c++)e[r+c]=a}addTextureIds(e,t,n,s=0){e.length=Math.max(e.length,s+n);for(let r=0;r<n;r++)e[s+r]=t}addUvs(e,t,n,s,r,o=null){let a=0;const c=t.length,l=n.frame;for(;a<r;){let u=e[(s+a)*2],h=e[(s+a)*2+1];if(o){const f=o.a*u+o.c*h+o.tx;h=o.b*u+o.d*h+o.ty,u=f}a++,t.push(u/l.width,h/l.height)}const d=n.baseTexture;(l.width<d.width||l.height<d.height)&&this.adjustUvs(t,n,c,r)}adjustUvs(e,t,n,s){const r=t.baseTexture,o=1e-6,a=n+s*2,c=t.frame,l=c.width/r.width,d=c.height/r.height;let u=c.x/c.width,h=c.y/c.height,f=Math.floor(e[n]+o),p=Math.floor(e[n+1]+o);for(let m=n+2;m<a;m+=2)f=Math.min(f,Math.floor(e[m]+o)),p=Math.min(p,Math.floor(e[m+1]+o));u-=f,h-=p;for(let m=n;m<a;m+=2)e[m]=(e[m]+u)*l,e[m+1]=(e[m+1]+h)*d}};FS.BATCHABLE_SIZE=100;let tF=FS;class ph{constructor(){this.color=16777215,this.alpha=1,this.texture=tt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new ph;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e}reset(){this.color=16777215,this.alpha=1,this.texture=tt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Yg extends ph{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Wr.BUTT,this.join=Ii.MITER,this.miterLimit=10}clone(){const e=new Yg;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e.width=this.width,e.alignment=this.alignment,e.native=this.native,e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1,this.cap=Wr.BUTT,this.join=Ii.MITER,this.miterLimit=10}}const sp={},xm=class Rd extends Mn{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new ph,this._lineStyle=new Yg,this._matrix=null,this._holeMode=!1,this.state=$s.for2d(),this._geometry=e||new tF,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ot(16777215),this.blendMode=Qe.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Rd(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,n,s=.5,r=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:n,alignment:s,native:r}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:tt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Wr.BUTT,join:Ii.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const n=e.width>0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new Bo,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Bo,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const n=this.currentPath.points,s=n[n.length-2],r=n[n.length-1];return(s!==e||r!==t)&&n.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,n,s){this._initCurve();const r=this.currentPath.points;return r.length===0&&this.moveTo(0,0),Xg.curveTo(e,t,n,s,r),this}bezierCurveTo(e,t,n,s,r,o){return this._initCurve(),Vg.curveTo(e,t,n,s,r,o,this.currentPath.points),this}arcTo(e,t,n,s,r){this._initCurve(e,t);const o=this.currentPath.points,a=ny.curveTo(e,t,n,s,r,o);if(a){const{cx:c,cy:l,radius:d,startAngle:u,endAngle:h,anticlockwise:f}=a;this.arc(c,l,d,u,h,f)}return this}arc(e,t,n,s,r,o=!1){if(s===r)return this;if(!o&&r<=s?r+=nu:o&&s<=r&&(s+=nu),r-s===0)return this;const a=e+Math.cos(s)*n,c=t+Math.sin(s)*n,l=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const u=Math.abs(d[d.length-2]-a),h=Math.abs(d[d.length-1]-c);u<l&&h<l||d.push(a,c)}else this.moveTo(a,c),d=this.currentPath.points;return ny.arc(a,c,e,t,n,s,r,o,d),this}beginFill(e=0,t){return this.beginTextureFill({texture:tt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Ot.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:tt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const n=e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,n,s){return this.drawShape(new ht(e,t,n,s))}drawRoundedRect(e,t,n,s,r){return this.drawShape(new uh(e,t,n,s,r))}drawCircle(e,t,n){return this.drawShape(new ch(e,t,n))}drawEllipse(e,t,n,s){return this.drawShape(new dh(e,t,n,s))}drawPolygon(...e){let t,n=!0;const s=e[0];s.points?(n=s.closeStroke,t=s.points):Array.isArray(e[0])?t=e[0]:t=e;const r=new Bo(t);return r.closeStroke=n,this.drawShape(r),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===$n.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,n=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(e.points);for(let s=0;s<n;s++){const r=e.batches[s],o=r.style.color,a=new Float32Array(this.vertexData.buffer,r.attribStart*4*2,r.attribSize*2),c=new Float32Array(e.uvsFloat32.buffer,r.attribStart*4*2,r.attribSize*2),l=new Uint16Array(e.indicesUint16.buffer,r.start*2,r.size),d={vertexData:a,blendMode:t,indices:l,uvs:c,_batchRGB:Ot.shared.setValue(o).toRgbArray(),_tintRGB:o,_texture:r.style.texture,alpha:r.style.alpha,worldAlpha:1};this.batches[s]=d}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,n=this.batches.length;t<n;t++){const s=this.batches[t];s.worldAlpha=this.worldAlpha*s.alpha,e.plugins[this.pluginName].render(s)}}}_renderDirect(e){const t=this._resolveDirectShader(e),n=this._geometry,s=this.worldAlpha,r=t.uniforms,o=n.drawCalls;r.translationMatrix=this.transform.worldTransform,Ot.shared.setValue(this._tintColor).premultiply(s).toArray(r.tint),e.shader.bind(t),e.geometry.bind(n,t),e.state.set(this.state);for(let a=0,c=o.length;a<c;a++)this._renderDrawCallDirect(e,n.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:n,type:s,size:r,start:o}=t,a=n.count;for(let c=0;c<a;c++)e.texture.bind(n.elements[c],c);e.geometry.draw(s,r,o)}_resolveDirectShader(e){let t=this.shader;const n=this.pluginName;if(!t){if(!sp[n]){const{maxTextures:s}=e.plugins[n],r=new Int32Array(s);for(let c=0;c<s;c++)r[c]=c;const o={tint:new Float32Array([1,1,1,1]),translationMatrix:new zt,default:is.from({uSamplers:r},!0)},a=e.plugins[n]._shader.program;sp[n]=new ss(a,o)}t=sp[n]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:n,maxX:s,maxY:r}=e.bounds;this._bounds.addFrame(this.transform,t,n,s,r)}containsPoint(e){return this.worldTransform.applyInverse(e,Rd._TEMP_POINT),this._geometry.containsPoint(Rd._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Ot.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,n=t.a,s=t.b,r=t.c,o=t.d,a=t.tx,c=t.ty,l=this._geometry.points,d=this.vertexData;let u=0;for(let h=0;h<l.length;h+=2){const f=l[h],p=l[h+1];d[u++]=n*f+r*p+a,d[u++]=o*p+s*f+c}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};xm.curves=za,xm._TEMP_POINT=new Pt;let ti=xm;class nF{constructor(e,t){this.uvBuffer=e,this.uvMatrix=t,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}update(e){if(!e&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)return;this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;const t=this.uvBuffer.data;(!this.data||this.data.length!==t.length)&&(this.data=new Float32Array(t.length)),this.uvMatrix.multiplyUvs(t,this.data),this._updateID++}}const rp=new Pt,oy=new Bo,DS=class OS extends Mn{constructor(e,t,n,s=Ps.TRIANGLES){super(),this.geometry=e,this.shader=t,this.state=n||$s.for2d(),this.drawMode=s,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=-1,this._transformID=-1,this._roundPixels=Xe.ROUND_PIXELS,this.batchUvs=null}get geometry(){return this._geometry}set geometry(e){this._geometry!==e&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=e,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)}get uvBuffer(){return this.geometry.buffers[1]}get verticesBuffer(){return this.geometry.buffers[0]}set material(e){this.shader=e}get material(){return this.shader}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get tint(){return"tint"in this.shader?this.shader.tint:null}set tint(e){this.shader.tint=e}get tintValue(){return this.shader.tintValue}get texture(){return"texture"in this.shader?this.shader.texture:null}set texture(e){this.shader.texture=e}_render(e){const t=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===Ps.TRIANGLES&&t.length<OS.BATCHABLE_SIZE*2?this._renderToBatch(e):this._renderDefault(e)}_renderDefault(e){const t=this.shader;t.alpha=this.worldAlpha,t.update&&t.update(),e.batch.flush(),t.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),e.shader.bind(t),e.state.set(this.state),e.geometry.bind(this.geometry,t),e.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)}_renderToBatch(e){const t=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=t.indexBuffer.data,this._tintRGB=n._tintRGB,this._texture=n.texture;const s=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[s]),e.plugins[s].render(this)}calculateVertices(){const e=this.geometry.buffers[0],t=e.data,n=e._updateID;if(n===this.vertexDirty&&this._transformID===this.transform._worldID)return;this._transformID=this.transform._worldID,this.vertexData.length!==t.length&&(this.vertexData=new Float32Array(t.length));const s=this.transform.worldTransform,r=s.a,o=s.b,a=s.c,c=s.d,l=s.tx,d=s.ty,u=this.vertexData;for(let h=0;h<u.length/2;h++){const f=t[h*2],p=t[h*2+1];u[h*2]=r*f+a*p+l,u[h*2+1]=o*f+c*p+d}if(this._roundPixels){const h=Xe.RESOLUTION;for(let f=0;f<u.length;++f)u[f]=Math.round(u[f]*h)/h}this.vertexDirty=n}calculateUvs(){const e=this.geometry.buffers[1],t=this.shader;t.uvMatrix.isSimple?this.uvs=e.data:(this.batchUvs||(this.batchUvs=new nF(e,t.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)}_calculateBounds(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)}containsPoint(e){if(!this.getBounds().contains(e.x,e.y))return!1;this.worldTransform.applyInverse(e,rp);const t=this.geometry.getBuffer("aVertexPosition").data,n=oy.points,s=this.geometry.getIndex().data,r=s.length,o=this.drawMode===4?3:1;for(let a=0;a+2<r;a+=o){const c=s[a]*2,l=s[a+1]*2,d=s[a+2]*2;if(n[0]=t[c],n[1]=t[c+1],n[2]=t[l],n[3]=t[l+1],n[4]=t[d],n[5]=t[d+1],oy.contains(rp.x,rp.y))return!0}return!1}destroy(e){super.destroy(e),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null}};DS.BATCHABLE_SIZE=100;let ac=DS;class zg extends Ns{constructor(e,t,n){super();const s=new Kt(e),r=new Kt(t,!0),o=new Kt(n,!0,!0);this.addAttribute("aVertexPosition",s,2,!1,je.FLOAT).addAttribute("aTextureCoord",r,2,!1,je.FLOAT).addIndex(o),this._updateId=-1}get vertexDirtyId(){return this.buffers[0]._updateID}}var iF=`varying vec2 vTextureCoord;
|
||
uniform vec4 uColor;
|
||
|
||
uniform sampler2D uSampler;
|
||
|
||
void main(void)
|
||
{
|
||
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
|
||
}
|
||
`,sF=`attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
uniform mat3 translationMatrix;
|
||
uniform mat3 uTextureMatrix;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
||
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
|
||
}
|
||
`;class fu extends ss{constructor(e,t){const n={uSampler:e,alpha:1,uTextureMatrix:zt.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(n,t.uniforms),super(t.program||ks.from(sF,iF),n),this._colorDirty=!1,this.uvMatrix=new $g(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new Ot(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;Ot.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class rF extends ac{constructor(e=tt.EMPTY,t,n,s,r){const o=new zg(t,n,s);o.getBuffer("aVertexPosition").static=!1;const a=new fu(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 ay{constructor(e,t,n){this.geometry=new Ns,this.indexBuffer=null,this.size=n,this.dynamicProperties=[],this.staticProperties=[];for(let s=0;s<e.length;++s){let r=e[s];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||je.FLOAT,offset:r.offset},t[s]?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 Kt(_k(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 n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new Kt(this.dynamicData,!1,!1);let s=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];a.offset=s,s+=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 Kt(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===je.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===je.UNSIGNED_BYTE,a.type,this.staticStride*4,a.offset*4)}}uploadDynamic(e,t,n){for(let s=0;s<this.dynamicProperties.length;s++){const r=this.dynamicProperties[s];r.uploadFunction(e,t,n,r.type===je.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,n){for(let s=0;s<this.staticProperties.length;s++){const r=this.staticProperties[s];r.uploadFunction(e,t,n,r.type===je.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 oF=`varying vec2 vTextureCoord;
|
||
varying vec4 vColor;
|
||
|
||
uniform sampler2D uSampler;
|
||
|
||
void main(void){
|
||
vec4 color = texture2D(uSampler, vTextureCoord) * vColor;
|
||
gl_FragColor = color;
|
||
}`,aF=`attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
attribute vec4 aColor;
|
||
|
||
attribute vec2 aPositionCoord;
|
||
attribute float aRotation;
|
||
|
||
uniform mat3 translationMatrix;
|
||
uniform vec4 uColor;
|
||
|
||
varying vec2 vTextureCoord;
|
||
varying vec4 vColor;
|
||
|
||
void main(void){
|
||
float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);
|
||
float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);
|
||
|
||
vec2 v = vec2(x, y);
|
||
v = v + aPositionCoord;
|
||
|
||
gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);
|
||
|
||
vTextureCoord = aTextureCoord;
|
||
vColor = aColor * uColor;
|
||
}
|
||
`;class NS extends hh{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new zt,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:je.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=ss.from(aF,oF,{}),this.state=$s.for2d()}render(e){const t=e.children,n=e._maxSize,s=e._batchSize,r=this.renderer;let o=t.length;if(o===0)return;o>n&&!e.autoResize&&(o=n);let a=e._buffers;a||(a=e._buffers=this.generateBuffers(e));const c=t[0]._texture.baseTexture,l=c.alphaMode>0;this.state.blendMode=Dw(e.blendMode,l),r.state.set(this.state);const d=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=Ot.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 h=!1;for(let f=0,p=0;f<o;f+=s,p+=1){let m=o-f;m>s&&(m=s),p>=a.length&&a.push(this._generateOneMoreBuffer(e));const g=a[p];g.uploadDynamic(t,f,m);const v=e._bufferUpdateIDs[p]||0;h=h||g._updateID<v,h&&(g._updateID=e._updateID,g.uploadStatic(t,f,m)),r.geometry.bind(g.geometry),d.drawElements(d.TRIANGLES,m*6,d.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],n=e._maxSize,s=e._batchSize,r=e._properties;for(let o=0;o<n;o+=s)t.push(new ay(this.properties,r,s));return t}_generateOneMoreBuffer(e){const t=e._batchSize,n=e._properties;return new ay(this.properties,n,t)}uploadVertices(e,t,n,s,r,o){let a=0,c=0,l=0,d=0;for(let u=0;u<n;++u){const h=e[t+u],f=h._texture,p=h.scale.x,m=h.scale.y,g=f.trim,v=f.orig;g?(c=g.x-h.anchor.x*v.width,a=c+g.width,d=g.y-h.anchor.y*v.height,l=d+g.height):(a=v.width*(1-h.anchor.x),c=v.width*-h.anchor.x,l=v.height*(1-h.anchor.y),d=v.height*-h.anchor.y),s[o]=c*p,s[o+1]=d*m,s[o+r]=a*p,s[o+r+1]=d*m,s[o+r*2]=a*p,s[o+r*2+1]=l*m,s[o+r*3]=c*p,s[o+r*3+1]=l*m,o+=r*4}}uploadPosition(e,t,n,s,r,o){for(let a=0;a<n;a++){const c=e[t+a].position;s[o]=c.x,s[o+1]=c.y,s[o+r]=c.x,s[o+r+1]=c.y,s[o+r*2]=c.x,s[o+r*2+1]=c.y,s[o+r*3]=c.x,s[o+r*3+1]=c.y,o+=r*4}}uploadRotation(e,t,n,s,r,o){for(let a=0;a<n;a++){const c=e[t+a].rotation;s[o]=c,s[o+r]=c,s[o+r*2]=c,s[o+r*3]=c,o+=r*4}}uploadUvs(e,t,n,s,r,o){for(let a=0;a<n;++a){const c=e[t+a]._texture._uvs;c?(s[o]=c.x0,s[o+1]=c.y0,s[o+r]=c.x1,s[o+r+1]=c.y1,s[o+r*2]=c.x2,s[o+r*2+1]=c.y2,s[o+r*3]=c.x3,s[o+r*3+1]=c.y3,o+=r*4):(s[o]=0,s[o+1]=0,s[o+r]=0,s[o+r+1]=0,s[o+r*2]=0,s[o+r*2+1]=0,s[o+r*3]=0,s[o+r*3+1]=0,o+=r*4)}}uploadTint(e,t,n,s,r,o){for(let a=0;a<n;++a){const c=e[t+a],l=Ot.shared.setValue(c._tintRGB).toPremultiplied(c.alpha,c.texture.baseTexture.alphaMode>0);s[o]=l,s[o+r]=l,s[o+r*2]=l,s[o+r*3]=l,o+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}NS.extension={name:"particle",type:$e.RendererPlugin};He.add(NS);var mh=(i=>(i[i.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",i[i.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",i))(mh||{});const id={willReadFrequently:!0},ms=class Ke{static get experimentalLetterSpacingSupported(){let e=Ke._experimentalLetterSpacingSupported;if(e!==void 0){const t=Xe.ADAPTER.getCanvasRenderingContext2D().prototype;e=Ke._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,n,s,r,o,a,c,l){this.text=e,this.style=t,this.width=n,this.height=s,this.lines=r,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=c,this.fontProperties=l}static measureText(e,t,n,s=Ke._canvas){n=n??t.wordWrap;const r=t.toFontString(),o=Ke.measureFont(r);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const a=s.getContext("2d",id);a.font=r;const c=(n?Ke.wordWrap(e,t,s):e).split(/(?:\r\n|\r|\n)/),l=new Array(c.length);let d=0;for(let p=0;p<c.length;p++){const m=Ke._measureText(c[p],t.letterSpacing,a);l[p]=m,d=Math.max(d,m)}let u=d+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const h=t.lineHeight||o.fontSize+t.strokeThickness;let f=Math.max(h,o.fontSize+t.strokeThickness*2)+t.leading+(c.length-1)*(h+t.leading);return t.dropShadow&&(f+=t.dropShadowDistance),new Ke(e,t,u,f,c,l,h+t.leading,d,o)}static _measureText(e,t,n){let s=!1;Ke.experimentalLetterSpacingSupported&&(Ke.experimentalLetterSpacing?(n.letterSpacing=`${t}px`,n.textLetterSpacing=`${t}px`,s=!0):(n.letterSpacing="0px",n.textLetterSpacing="0px"));let r=n.measureText(e).width;return r>0&&(s?r-=t:r+=(Ke.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,n=Ke._canvas){const s=n.getContext("2d",id);let r=0,o="",a="";const c=Object.create(null),{letterSpacing:l,whiteSpace:d}=t,u=Ke.collapseSpaces(d),h=Ke.collapseNewlines(d);let f=!u;const p=t.wordWrapWidth+l,m=Ke.tokenize(e);for(let g=0;g<m.length;g++){let v=m[g];if(Ke.isNewline(v)){if(!h){a+=Ke.addLine(o),f=!u,o="",r=0;continue}v=" "}if(u){const b=Ke.isBreakingSpace(v),x=Ke.isBreakingSpace(o[o.length-1]);if(b&&x)continue}const y=Ke.getFromCache(v,l,c,s);if(y>p)if(o!==""&&(a+=Ke.addLine(o),o="",r=0),Ke.canBreakWords(v,t.breakWords)){const b=Ke.wordWrapSplit(v);for(let x=0;x<b.length;x++){let T=b[x],E=T,S=1;for(;b[x+S];){const M=b[x+S];if(!Ke.canBreakChars(E,M,v,x,t.breakWords))T+=M;else break;E=M,S++}x+=S-1;const C=Ke.getFromCache(T,l,c,s);C+r>p&&(a+=Ke.addLine(o),f=!1,o="",r=0),o+=T,r+=C}}else{o.length>0&&(a+=Ke.addLine(o),o="",r=0);const b=g===m.length-1;a+=Ke.addLine(v,!b),f=!1,o="",r=0}else y+r>p&&(f=!1,a+=Ke.addLine(o),o="",r=0),(o.length>0||!Ke.isBreakingSpace(v)||f)&&(o+=v,r+=y)}return a+=Ke.addLine(o,!1),a}static addLine(e,t=!0){return e=Ke.trimRight(e),e=t?`${e}
|
||
`:e,e}static getFromCache(e,t,n,s){let r=n[e];return typeof r!="number"&&(r=Ke._measureText(e,t,s)+t,n[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 n=e[t];if(!Ke.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:Ke._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:Ke._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let n="";if(typeof e!="string")return t;for(let s=0;s<e.length;s++){const r=e[s],o=e[s+1];if(Ke.isBreakingSpace(r,o)||Ke.isNewline(r)){n!==""&&(t.push(n),n=""),t.push(r);continue}n+=r}return n!==""&&t.push(n),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,n,s,r){return!0}static wordWrapSplit(e){return Ke.graphemeSegmenter(e)}static measureFont(e){if(Ke._fonts[e])return Ke._fonts[e];const t={ascent:0,descent:0,fontSize:0},n=Ke._canvas,s=Ke._context;s.font=e;const r=Ke.METRICS_STRING+Ke.BASELINE_SYMBOL,o=Math.ceil(s.measureText(r).width);let a=Math.ceil(s.measureText(Ke.BASELINE_SYMBOL).width);const c=Math.ceil(Ke.HEIGHT_MULTIPLIER*a);if(a=a*Ke.BASELINE_MULTIPLIER|0,o===0||c===0)return Ke._fonts[e]=t,t;n.width=o,n.height=c,s.fillStyle="#f00",s.fillRect(0,0,o,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(r,0,a);const l=s.getImageData(0,0,o,c).data,d=l.length,u=o*4;let h=0,f=0,p=!1;for(h=0;h<a;++h){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f+=u;else break}for(t.ascent=a-h,f=d-u,p=!1,h=c;h>a;--h){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f-=u;else break}return t.descent=h-a,t.fontSize=t.ascent+t.descent,Ke._fonts[e]=t,t}static clearMetrics(e=""){e?delete Ke._fonts[e]:Ke._fonts={}}static get _canvas(){var e;if(!Ke.__canvas){let t;try{const n=new OffscreenCanvas(0,0);if((e=n.getContext("2d",id))!=null&&e.measureText)return Ke.__canvas=n,n;t=Xe.ADAPTER.createCanvas()}catch{t=Xe.ADAPTER.createCanvas()}t.width=t.height=10,Ke.__canvas=t}return Ke.__canvas}static get _context(){return Ke.__context||(Ke.__context=Ke._canvas.getContext("2d",id)),Ke.__context}};ms.METRICS_STRING="|ÉqÅ",ms.BASELINE_SYMBOL="M",ms.BASELINE_MULTIPLIER=1.4,ms.HEIGHT_MULTIPLIER=2,ms.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const i=new Intl.Segmenter;return e=>[...i.segment(e)].map(t=>t.segment)}return i=>[...i]})(),ms.experimentalLetterSpacing=!1,ms._fonts={},ms._newlines=[10,13],ms._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let $r=ms;const lF=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],$S=class Rl{constructor(e){this.styleID=0,this.reset(),ap(this,e,e)}clone(){const e={};return ap(e,this,Rl.defaultStyle),new Rl(e)}reset(){ap(this,Rl.defaultStyle,Rl.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=op(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=op(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){cF(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._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=op(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let n=t.length-1;n>=0;n--){let s=t[n].trim();!/([\"\'])[^\'\"]+\1/.test(s)&&!lF.includes(s)&&(s=`"${s}"`),t[n]=s}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};$S.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:mh.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let no=$S;function op(i){const e=Ot.shared,t=n=>{const s=e.setValue(n);return s.alpha===1?s.toHex():s.toRgbaString()};return Array.isArray(i)?i.map(t):t(i)}function cF(i,e){if(!Array.isArray(i)||!Array.isArray(e)||i.length!==e.length)return!1;for(let t=0;t<i.length;++t)if(i[t]!==e[t])return!1;return!0}function ap(i,e,t){for(const n in t)Array.isArray(e[n])?i[n]=e[n].slice():i[n]=e[n]}const dF={texture:!0,children:!1,baseTexture:!0},BS=class wm extends oo{constructor(e,t,n){let s=!1;n||(n=Xe.ADAPTER.createCanvas(),s=!0),n.width=3,n.height=3;const r=tt.from(n);r.orig=new ht,r.trim=new ht,super(r),this._ownCanvas=s,this.canvas=n,this.context=n.getContext("2d",{willReadFrequently:!0}),this._resolution=wm.defaultResolution??Xe.RESOLUTION,this._autoResolution=wm.defaultAutoResolution,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=e,this.style=t,this.localStyleID=-1}static get experimentalLetterSpacing(){return $r.experimentalLetterSpacing}static set experimentalLetterSpacing(e){yt("7.1.0","Text.experimentalLetterSpacing is deprecated, use TextMetrics.experimentalLetterSpacing"),$r.experimentalLetterSpacing=e}updateText(e){const t=this._style;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;this._font=this._style.toFontString();const n=this.context,s=$r.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),r=s.width,o=s.height,a=s.lines,c=s.lineHeight,l=s.lineWidths,d=s.maxLineWidth,u=s.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,r)+t.padding*2)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,o)+t.padding*2)*this._resolution),n.scale(this._resolution,this._resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.lineWidth=t.strokeThickness,n.textBaseline=t.textBaseline,n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit;let h,f;const p=t.dropShadow?2:1;for(let m=0;m<p;++m){const g=t.dropShadow&&m===0,v=g?Math.ceil(Math.max(1,o)+t.padding*2):0,y=v*this._resolution;if(g){n.fillStyle="black",n.strokeStyle="black";const x=t.dropShadowColor,T=t.dropShadowBlur*this._resolution,E=t.dropShadowDistance*this._resolution;n.shadowColor=Ot.shared.setValue(x).setAlpha(t.dropShadowAlpha).toRgbaString(),n.shadowBlur=T,n.shadowOffsetX=Math.cos(t.dropShadowAngle)*E,n.shadowOffsetY=Math.sin(t.dropShadowAngle)*E+y}else n.fillStyle=this._generateFillStyle(t,a,s),n.strokeStyle=t.stroke,n.shadowColor="black",n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0;let b=(c-u.fontSize)/2;c-u.fontSize<0&&(b=0);for(let x=0;x<a.length;x++)h=t.strokeThickness/2,f=t.strokeThickness/2+x*c+u.ascent+b,t.align==="right"?h+=d-l[x]:t.align==="center"&&(h+=(d-l[x])/2),t.stroke&&t.strokeThickness&&this.drawLetterSpacing(a[x],h+t.padding,f+t.padding-v,!0),t.fill&&this.drawLetterSpacing(a[x],h+t.padding,f+t.padding-v)}this.updateTexture()}drawLetterSpacing(e,t,n,s=!1){const r=this._style.letterSpacing;let o=!1;if($r.experimentalLetterSpacingSupported&&($r.experimentalLetterSpacing?(this.context.letterSpacing=`${r}px`,this.context.textLetterSpacing=`${r}px`,o=!0):(this.context.letterSpacing="0px",this.context.textLetterSpacing="0px")),r===0||o){s?this.context.strokeText(e,t,n):this.context.fillText(e,t,n);return}let a=t;const c=$r.graphemeSegmenter(e);let l=this.context.measureText(e).width,d=0;for(let u=0;u<c.length;++u){const h=c[u];s?this.context.strokeText(h,a,n):this.context.fillText(h,a,n);let f="";for(let p=u+1;p<c.length;++p)f+=c[p];d=this.context.measureText(f).width,a+=l-d+r,l=d}}updateTexture(){const e=this.canvas;if(this._style.trim){const o=Ik(e);o.data&&(e.width=o.width,e.height=o.height,this.context.putImageData(o.data,0,0))}const t=this._texture,n=this._style,s=n.trim?0:n.padding,r=t.baseTexture;t.trim.width=t._frame.width=e.width/this._resolution,t.trim.height=t._frame.height=e.height/this._resolution,t.trim.x=-s,t.trim.y=-s,t.orig.width=t._frame.width-s*2,t.orig.height=t._frame.height-s*2,this._onTextureUpdate(),r.setRealSize(e.width,e.height,this._resolution),t.updateUvs(),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}updateTransform(){this.updateText(!0),super.updateTransform()}getBounds(e,t){return this.updateText(!0),this._textureID===-1&&(e=!1),super.getBounds(e,t)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds.call(this,e)}_calculateBounds(){this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_generateFillStyle(e,t,n){const s=e.fill;if(Array.isArray(s)){if(s.length===1)return s[0]}else return s;let r;const o=e.dropShadow?e.dropShadowDistance:0,a=e.padding||0,c=this.canvas.width/this._resolution-o-a*2,l=this.canvas.height/this._resolution-o-a*2,d=s.slice(),u=e.fillGradientStops.slice();if(!u.length){const h=d.length+1;for(let f=1;f<h;++f)u.push(f/h)}if(d.unshift(s[0]),u.unshift(0),d.push(s[s.length-1]),u.push(1),e.fillGradientType===mh.LINEAR_VERTICAL){r=this.context.createLinearGradient(c/2,a,c/2,l+a);const h=n.fontProperties.fontSize+e.strokeThickness;for(let f=0;f<t.length;f++){const p=n.lineHeight*(f-1)+h,m=n.lineHeight*f;let g=m;f>0&&p>m&&(g=(m+p)/2);const v=m+h,y=n.lineHeight*(f+1);let b=v;f+1<t.length&&y<v&&(b=(v+y)/2);const x=(b-g)/l;for(let T=0;T<d.length;T++){let E=0;typeof u[T]=="number"?E=u[T]:E=T/d.length;let S=Math.min(1,Math.max(0,g/l+E*x));S=Number(S.toFixed(5)),r.addColorStop(S,d[T])}}}else{r=this.context.createLinearGradient(a,l/2,c+a,l/2);const h=d.length+1;let f=1;for(let p=0;p<d.length;p++){let m;typeof u[p]=="number"?m=u[p]:m=f/h,r.addColorStop(m,d[p]),f++}}return r}destroy(e){typeof e=="boolean"&&(e={children:e}),e=Object.assign({},dF,e),super.destroy(e),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this.updateText(!0);const t=Gr(this.scale.x)||1;this.scale.x=t*e/this._texture.orig.width,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this.updateText(!0);const t=Gr(this.scale.y)||1;this.scale.y=t*e/this._texture.orig.height,this._height=e}get style(){return this._style}set style(e){e=e||{},e instanceof no?this._style=e:this._style=new no(e),this.localStyleID=-1,this.dirty=!0}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}};BS.defaultAutoResolution=!0;let jg=BS;class uF{constructor(e){this.maxItemsPerFrame=e,this.itemsLeft=0}beginFrame(){this.itemsLeft=this.maxItemsPerFrame}allowedToUpload(){return this.itemsLeft-- >0}}function hF(i,e){var n;let t=!1;if((n=i==null?void 0:i._textures)!=null&&n.length){for(let s=0;s<i._textures.length;s++)if(i._textures[s]instanceof tt){const r=i._textures[s].baseTexture;e.includes(r)||(e.push(r),t=!0)}}return t}function fF(i,e){if(i.baseTexture instanceof st){const t=i.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function pF(i,e){if(i._texture&&i._texture instanceof tt){const t=i._texture.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function mF(i,e){return e instanceof jg?(e.updateText(!0),!0):!1}function gF(i,e){if(e instanceof no){const t=e.toFontString();return $r.measureFont(t),!0}return!1}function vF(i,e){if(i instanceof jg){e.includes(i.style)||e.push(i.style),e.includes(i)||e.push(i);const t=i._texture.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function bF(i,e){return i instanceof no?(e.includes(i)||e.push(i),!0):!1}const US=class VS{constructor(e){this.limiter=new uF(VS.uploadsPerFrame),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=()=>{this.queue&&this.prepareItems()},this.registerFindHook(vF),this.registerFindHook(bF),this.registerFindHook(hF),this.registerFindHook(fF),this.registerFindHook(pF),this.registerUploadHook(mF),this.registerUploadHook(gF)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,ai.system.addOnce(this.tick,this,jo.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let n=0,s=this.uploadHooks.length;n<s;n++)if(this.uploadHooks[n](this.uploadHookHelper,e)){this.queue.shift(),t=!0;break}}t||this.queue.shift()}if(this.queue.length)ai.system.addOnce(this.tick,this,jo.UTILITY);else{this.ticking=!1;const e=this.completes.slice(0);this.completes.length=0;for(let t=0,n=e.length;t<n;t++)e[t]()}}registerFindHook(e){return e&&this.addHooks.push(e),this}registerUploadHook(e){return e&&this.uploadHooks.push(e),this}add(e){for(let t=0,n=this.addHooks.length;t<n&&!this.addHooks[t](e,this.queue);t++);if(e instanceof Mn)for(let t=e.children.length-1;t>=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&ai.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};US.uploadsPerFrame=4;let Sm=US;Object.defineProperties(Xe,{UPLOADS_PER_FRAME:{get(){return Sm.uploadsPerFrame},set(i){yt("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),Sm.uploadsPerFrame=i}}});function XS(i,e){return e instanceof st?(e._glTextures[i.CONTEXT_UID]||i.texture.bind(e),!0):!1}function yF(i,e){if(!(e instanceof ti))return!1;const{geometry:t}=e;e.finishPoly(),t.updateBatches();const{batches:n}=t;for(let s=0;s<n.length;s++){const{texture:r}=n[s].style;r&&XS(i,r.baseTexture)}return t.batchable||i.geometry.bind(t,e._resolveDirectShader(i)),!0}function xF(i,e){return i instanceof ti?(e.push(i),!0):!1}class YS extends Sm{constructor(e){super(e),this.uploadHookHelper=this.renderer,this.registerFindHook(xF),this.registerUploadHook(XS),this.registerUploadHook(yF)}}YS.extension={name:"prepare",type:$e.RendererSystem};He.add(YS);var wF=`#version 300 es
|
||
#define SHADER_NAME Tiling-Sprite-100
|
||
|
||
precision lowp float;
|
||
|
||
in vec2 vTextureCoord;
|
||
|
||
out vec4 fragmentColor;
|
||
|
||
uniform sampler2D uSampler;
|
||
uniform vec4 uColor;
|
||
uniform mat3 uMapCoord;
|
||
uniform vec4 uClampFrame;
|
||
uniform vec2 uClampOffset;
|
||
|
||
void main(void)
|
||
{
|
||
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
|
||
coord = (uMapCoord * vec3(coord, 1.0)).xy;
|
||
vec2 unclamped = coord;
|
||
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
|
||
|
||
vec4 texSample = texture(uSampler, coord, unclamped == coord ? 0.0f : -32.0f);// lod-bias very negative to force lod 0
|
||
|
||
fragmentColor = texSample * uColor;
|
||
}
|
||
`,SF=`#version 300 es
|
||
#define SHADER_NAME Tiling-Sprite-300
|
||
|
||
precision lowp float;
|
||
|
||
in vec2 aVertexPosition;
|
||
in vec2 aTextureCoord;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
uniform mat3 translationMatrix;
|
||
uniform mat3 uTransform;
|
||
|
||
out vec2 vTextureCoord;
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
||
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
|
||
}
|
||
`,CF=`#version 100
|
||
#ifdef GL_EXT_shader_texture_lod
|
||
#extension GL_EXT_shader_texture_lod : enable
|
||
#endif
|
||
#define SHADER_NAME Tiling-Sprite-100
|
||
|
||
precision lowp float;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
uniform sampler2D uSampler;
|
||
uniform vec4 uColor;
|
||
uniform mat3 uMapCoord;
|
||
uniform vec4 uClampFrame;
|
||
uniform vec2 uClampOffset;
|
||
|
||
void main(void)
|
||
{
|
||
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
|
||
coord = (uMapCoord * vec3(coord, 1.0)).xy;
|
||
vec2 unclamped = coord;
|
||
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
|
||
|
||
#ifdef GL_EXT_shader_texture_lod
|
||
vec4 texSample = unclamped == coord
|
||
? texture2D(uSampler, coord)
|
||
: texture2DLodEXT(uSampler, coord, 0);
|
||
#else
|
||
vec4 texSample = texture2D(uSampler, coord);
|
||
#endif
|
||
|
||
gl_FragColor = texSample * uColor;
|
||
}
|
||
`,ly=`#version 100
|
||
#define SHADER_NAME Tiling-Sprite-100
|
||
|
||
precision lowp float;
|
||
|
||
attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
uniform mat3 translationMatrix;
|
||
uniform mat3 uTransform;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
||
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
|
||
}
|
||
`,AF=`#version 100
|
||
#define SHADER_NAME Tiling-Sprite-Simple-100
|
||
|
||
precision lowp float;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
uniform sampler2D uSampler;
|
||
uniform vec4 uColor;
|
||
|
||
void main(void)
|
||
{
|
||
vec4 texSample = texture2D(uSampler, vTextureCoord);
|
||
gl_FragColor = texSample * uColor;
|
||
}
|
||
`;const sd=new zt;class zS extends hh{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new qw,this.state=$s.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=ss.from(ly,AF,t),this.shader=e.context.webGLVersion>1?ss.from(SF,wF,t):ss.from(ly,CF,t)}render(e){const t=this.renderer,n=this.quad;let s=n.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,o=e.uvRespectAnchor?e.anchor.y:0;s=n.uvs,s[0]=s[6]=-r,s[1]=s[3]=-o,s[2]=s[4]=1-r,s[5]=s[7]=1-o,n.invalidate();const a=e._texture,c=a.baseTexture,l=c.alphaMode>0,d=e.tileTransform.localTransform,u=e.uvMatrix;let h=c.isPowerOfTwo&&a.frame.width===c.width&&a.frame.height===c.height;h&&(c._glTextures[t.CONTEXT_UID]?h=c.wrapMode!==ts.CLAMP:c.wrapMode===ts.CLAMP&&(c.wrapMode=ts.REPEAT));const f=h?this.simpleShader:this.shader,p=a.width,m=a.height,g=e._width,v=e._height;sd.set(d.a*p/g,d.b*p/v,d.c*m/g,d.d*m/v,d.tx/g,d.ty/v),sd.invert(),h?sd.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=sd.toArray(!0),f.uniforms.uColor=Ot.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(n),this.state.blendMode=Dw(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}zS.extension={name:"tilingSprite",type:$e.RendererPlugin};He.add(zS);const jS=class Fl{constructor(e,t,n){this.linkedSheets=[],(e instanceof st||e instanceof tt)&&(e={texture:e,data:t,resolutionFilename:n});const{texture:s,data:r,resolutionFilename:o=null,cachePrefix:a=""}=e;this.cachePrefix=a,this._texture=s instanceof tt?s:null,this.baseTexture=s instanceof st?s: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 n=br(e,null);return n===null&&(n=typeof t=="number"?t:parseFloat(t??"1")),n!==1&&this.baseTexture.setResolution(n),n}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=Fl.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const n=Fl.BATCH_SIZE;for(;t-e<n&&t<this._frameKeys.length;){const s=this._frameKeys[t],r=this._frames[s],o=r.frame;if(o){let a=null,c=null;const l=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,d=new ht(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);r.rotated?a=new ht(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 ht(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 ht(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[s]=new tt(this.baseTexture,a,d,c,r.rotated?2:0,r.anchor,r.borders),tt.addToCache(this.textures[s],this.cachePrefix+s.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let n=0;n<e[t].length;n++){const s=e[t][n];this.animations[t].push(this.textures[s])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Fl.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Fl.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const n in this.textures)this.textures[n].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=[]}};jS.BATCH_SIZE=1e3;let cy=jS;const TF=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function HS(i,e,t){const n={};if(i.forEach(s=>{n[s]=e}),Object.keys(e.textures).forEach(s=>{n[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=pn.dirname(i[0]);e.linkedSheets.forEach((r,o)=>{Object.assign(n,HS([`${s}/${e.data.meta.related_multi_packs[o]}`],r,!0))})}return n}const EF={extension:$e.Asset,cache:{test:i=>i instanceof cy,getCacheableAssets:(i,e)=>HS(i,e,!1)},resolver:{test:i=>{const e=i.split("?")[0].split("."),t=e.pop(),n=e.pop();return t==="json"&&TF.includes(n)},parse:i=>{var t;const e=i.split(".");return{resolution:parseFloat(((t=Xe.RETINA_PREFIX.exec(i))==null?void 0:t[1])??"1"),format:e[e.length-2],src:i}}},loader:{name:"spritesheetLoader",extension:{type:$e.LoadParser,priority:Ei.Normal},async testParse(i,e){return pn.extname(e.src).toLowerCase()===".json"&&!!i.frames},async parse(i,e,t){var d,u;const{texture:n,imageFilename:s,cachePrefix:r}=(e==null?void 0:e.data)??{};let o=pn.dirname(e.src);o&&o.lastIndexOf("/")!==o.length-1&&(o+="/");let a;if(n&&n.baseTexture)a=n;else{const h=lu(o+(s??i.meta.image),e.src);a=(await t.load([h]))[h]}const c=new cy({texture:a.baseTexture,data:i,resolutionFilename:e.src,cachePrefix:r});await c.parse();const l=(d=i==null?void 0:i.meta)==null?void 0:d.related_multi_packs;if(Array.isArray(l)){const h=[];for(const p of l){if(typeof p!="string")continue;let m=o+p;(u=e.data)!=null&&u.ignoreMultiPack||(m=lu(m,e.src),h.push(t.load({src:m,data:{ignoreMultiPack:!0}})))}const f=await Promise.all(h);c.linkedSheets=f,f.forEach(p=>{p.linkedSheets=[c].concat(c.linkedSheets.filter(m=>m!==p))})}return c},unload(i){i.destroy(!0)}}};He.add(EF);class pu{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class Fd{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const t=e.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const r in t){const o=t[r].match(/^[a-z]+/gm)[0],a=t[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),c={};for(const l in a){const d=a[l].split("="),u=d[0],h=d[1].replace(/"/gm,""),f=parseFloat(h),p=isNaN(f)?h:f;c[u]=p}n[o].push(c)}const s=new pu;return n.info.forEach(r=>s.info.push({face:r.face,size:parseInt(r.size,10)})),n.common.forEach(r=>s.common.push({lineHeight:parseInt(r.lineHeight,10)})),n.page.forEach(r=>s.page.push({id:parseInt(r.id,10),file:r.file})),n.char.forEach(r=>s.char.push({id:parseInt(r.id,10),page:parseInt(r.page,10),x:parseInt(r.x,10),y:parseInt(r.y,10),width:parseInt(r.width,10),height:parseInt(r.height,10),xoffset:parseInt(r.xoffset,10),yoffset:parseInt(r.yoffset,10),xadvance:parseInt(r.xadvance,10)})),n.kerning.forEach(r=>s.kerning.push({first:parseInt(r.first,10),second:parseInt(r.second,10),amount:parseInt(r.amount,10)})),n.distanceField.forEach(r=>s.distanceField.push({distanceRange:parseInt(r.distanceRange,10),fieldType:r.fieldType})),s}}class Cm{static test(e){const t=e;return typeof e!="string"&&"getElementsByTagName"in e&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const t=new pu,n=e.getElementsByTagName("info"),s=e.getElementsByTagName("common"),r=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),a=e.getElementsByTagName("kerning"),c=e.getElementsByTagName("distanceField");for(let l=0;l<n.length;l++)t.info.push({face:n[l].getAttribute("face"),size:parseInt(n[l].getAttribute("size"),10)});for(let l=0;l<s.length;l++)t.common.push({lineHeight:parseInt(s[l].getAttribute("lineHeight"),10)});for(let l=0;l<r.length;l++)t.page.push({id:parseInt(r[l].getAttribute("id"),10)||0,file:r[l].getAttribute("file")});for(let l=0;l<o.length;l++){const d=o[l];t.char.push({id:parseInt(d.getAttribute("id"),10),page:parseInt(d.getAttribute("page"),10)||0,x:parseInt(d.getAttribute("x"),10),y:parseInt(d.getAttribute("y"),10),width:parseInt(d.getAttribute("width"),10),height:parseInt(d.getAttribute("height"),10),xoffset:parseInt(d.getAttribute("xoffset"),10),yoffset:parseInt(d.getAttribute("yoffset"),10),xadvance:parseInt(d.getAttribute("xadvance"),10)})}for(let l=0;l<a.length;l++)t.kerning.push({first:parseInt(a[l].getAttribute("first"),10),second:parseInt(a[l].getAttribute("second"),10),amount:parseInt(a[l].getAttribute("amount"),10)});for(let l=0;l<c.length;l++)t.distanceField.push({fieldType:c[l].getAttribute("fieldType"),distanceRange:parseInt(c[l].getAttribute("distanceRange"),10)});return t}}class Am{static test(e){return typeof e=="string"&&e.includes("<font>")?Cm.test(Xe.ADAPTER.parseXML(e)):!1}static parse(e){return Cm.parse(Xe.ADAPTER.parseXML(e))}}const lp=[Fd,Cm,Am];function _F(i){for(let e=0;e<lp.length;e++)if(lp[e].test(i))return lp[e];return null}function MF(i,e,t,n,s,r){const o=t.fill;if(Array.isArray(o)){if(o.length===1)return o[0]}else return o;let a;const c=t.dropShadow?t.dropShadowDistance:0,l=t.padding||0,d=i.width/n-c-l*2,u=i.height/n-c-l*2,h=o.slice(),f=t.fillGradientStops.slice();if(!f.length){const p=h.length+1;for(let m=1;m<p;++m)f.push(m/p)}if(h.unshift(o[0]),f.unshift(0),h.push(o[o.length-1]),f.push(1),t.fillGradientType===mh.LINEAR_VERTICAL){a=e.createLinearGradient(d/2,l,d/2,u+l);let p=0;const m=(r.fontProperties.fontSize+t.strokeThickness)/u;for(let g=0;g<s.length;g++){const v=r.lineHeight*g;for(let y=0;y<h.length;y++){let b=0;typeof f[y]=="number"?b=f[y]:b=y/h.length;const x=v/u+b*m;let T=Math.max(p,x);T=Math.min(T,1),a.addColorStop(T,h[y]),p=T}}}else{a=e.createLinearGradient(l,u/2,d+l,u/2);const p=h.length+1;let m=1;for(let g=0;g<h.length;g++){let v;typeof f[g]=="number"?v=f[g]:v=m/p,a.addColorStop(v,h[g]),m++}}return a}function PF(i,e,t,n,s,r,o){const a=t.text,c=t.fontProperties;e.translate(n,s),e.scale(r,r);const l=o.strokeThickness/2,d=-(o.strokeThickness/2);if(e.font=o.toFontString(),e.lineWidth=o.strokeThickness,e.textBaseline=o.textBaseline,e.lineJoin=o.lineJoin,e.miterLimit=o.miterLimit,e.fillStyle=MF(i,e,o,r,[a],t),e.strokeStyle=o.stroke,o.dropShadow){const u=o.dropShadowColor,h=o.dropShadowBlur*r,f=o.dropShadowDistance*r;e.shadowColor=Ot.shared.setValue(u).setAlpha(o.dropShadowAlpha).toRgbaString(),e.shadowBlur=h,e.shadowOffsetX=Math.cos(o.dropShadowAngle)*f,e.shadowOffsetY=Math.sin(o.dropShadowAngle)*f}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0;o.stroke&&o.strokeThickness&&e.strokeText(a,l,d+t.lineHeight-c.descent),o.fill&&e.fillText(a,l,d+t.lineHeight-c.descent),e.setTransform(1,0,0,1,0,0),e.fillStyle="rgba(0, 0, 0, 0)"}function Ld(i){return i.codePointAt?i.codePointAt(0):i.charCodeAt(0)}function GS(i){return Array.from?Array.from(i):i.split("")}function kF(i){typeof i=="string"&&(i=[i]);const e=[];for(let t=0,n=i.length;t<n;t++){const s=i[t];if(Array.isArray(s)){if(s.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${s.length}.`);const r=s[0].charCodeAt(0),o=s[1].charCodeAt(0);if(o<r)throw new Error("[BitmapFont]: Invalid character range.");for(let a=r,c=o;a<=c;a++)e.push(String.fromCharCode(a))}else e.push(...GS(s))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}const Fr=class gs{constructor(e,t,n){var d;const[s]=e.info,[r]=e.common,[o]=e.page,[a]=e.distanceField,c=br(o.file),l={};this._ownsTextures=n,this.font=s.face,this.size=s.size,this.lineHeight=r.lineHeight/c,this.chars={},this.pageTextures=l;for(let u=0;u<e.page.length;u++){const{id:h,file:f}=e.page[u];l[h]=t instanceof Array?t[u]:t[f],a!=null&&a.fieldType&&a.fieldType!=="none"&&(l[h].baseTexture.alphaMode=Fn.NO_PREMULTIPLIED_ALPHA,l[h].baseTexture.mipmap=Bi.OFF)}for(let u=0;u<e.char.length;u++){const{id:h,page:f}=e.char[u];let{x:p,y:m,width:g,height:v,xoffset:y,yoffset:b,xadvance:x}=e.char[u];p/=c,m/=c,g/=c,v/=c,y/=c,b/=c,x/=c;const T=new ht(p+l[f].frame.x/c,m+l[f].frame.y/c,g,v);this.chars[h]={xOffset:y,yOffset:b,xAdvance:x,kerning:{},texture:new tt(l[f].baseTexture,T),page:f}}for(let u=0;u<e.kerning.length;u++){let{first:h,second:f,amount:p}=e.kerning[u];h/=c,f/=c,p/=c,this.chars[f]&&(this.chars[f].kerning[h]=p)}this.distanceFieldRange=a==null?void 0:a.distanceRange,this.distanceFieldType=((d=a==null?void 0:a.fieldType)==null?void 0:d.toLowerCase())??"none"}destroy(){for(const e in this.chars)this.chars[e].texture.destroy(),this.chars[e].texture=null;for(const e in this.pageTextures)this._ownsTextures&&this.pageTextures[e].destroy(!0),this.pageTextures[e]=null;this.chars=null,this.pageTextures=null}static install(e,t,n){let s;if(e instanceof pu)s=e;else{const o=_F(e);if(!o)throw new Error("Unrecognized data format for font.");s=o.parse(e)}t instanceof tt&&(t=[t]);const r=new gs(s,t,n);return gs.available[r.font]=r,r}static uninstall(e){const t=gs.available[e];if(!t)throw new Error(`No font found named '${e}'`);t.destroy(),delete gs.available[e]}static from(e,t,n){if(!e)throw new Error("[BitmapFont] Property `name` is required.");const{chars:s,padding:r,resolution:o,textureWidth:a,textureHeight:c,...l}=Object.assign({},gs.defaultOptions,n),d=kF(s),u=t instanceof no?t:new no(t),h=a,f=new pu;f.info[0]={face:u.fontFamily,size:u.fontSize},f.common[0]={lineHeight:u.fontSize};let p=0,m=0,g,v,y,b=0;const x=[];for(let E=0;E<d.length;E++){g||(g=Xe.ADAPTER.createCanvas(),g.width=a,g.height=c,v=g.getContext("2d"),y=new st(g,{resolution:o,...l}),x.push(new tt(y)),f.page.push({id:x.length-1,file:""}));const S=d[E],C=$r.measureText(S,u,!1,g),M=C.width,k=Math.ceil(C.height),P=Math.ceil((u.fontStyle==="italic"?2:1)*M);if(m>=c-k*o){if(m===0)throw new Error(`[BitmapFont] textureHeight ${c}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${S}')`);--E,g=null,v=null,y=null,m=0,p=0,b=0;continue}if(b=Math.max(k+C.fontProperties.descent,b),P*o+p>=h){if(p===0)throw new Error(`[BitmapFont] textureWidth ${a}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${S}')`);--E,m+=b*o,m=Math.ceil(m),p=0,b=0;continue}PF(g,v,C,p,m,o,u);const I=Ld(C.text);f.char.push({id:I,page:x.length-1,x:p/o,y:m/o,width:P,height:k,xoffset:0,yoffset:0,xadvance:M-(u.dropShadow?u.dropShadowDistance:0)-(u.stroke?u.strokeThickness:0)}),p+=(P+2*r)*o,p=Math.ceil(p)}if(!(n!=null&&n.skipKerning))for(let E=0,S=d.length;E<S;E++){const C=d[E];for(let M=0;M<S;M++){const k=d[M],P=v.measureText(C).width,I=v.measureText(k).width,D=v.measureText(C+k).width-(P+I);D&&f.kerning.push({first:Ld(C),second:Ld(k),amount:D})}}const T=new gs(f,x,!0);return gs.available[e]!==void 0&&gs.uninstall(e),gs.available[e]=T,T}};Fr.ALPHA=[["a","z"],["A","Z"]," "],Fr.NUMERIC=[["0","9"]],Fr.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],Fr.ASCII=[[" ","~"]],Fr.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:Fr.ALPHANUMERIC},Fr.available={};let Lr=Fr;var IF=`// Pixi texture info\r
|
||
varying vec2 vTextureCoord;\r
|
||
uniform sampler2D uSampler;\r
|
||
\r
|
||
// Tint\r
|
||
uniform vec4 uColor;\r
|
||
\r
|
||
// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r
|
||
uniform float uFWidth;\r
|
||
\r
|
||
void main(void) {\r
|
||
\r
|
||
// To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r
|
||
vec4 texColor = texture2D(uSampler, vTextureCoord);\r
|
||
\r
|
||
// MSDF\r
|
||
float median = texColor.r + texColor.g + texColor.b -\r
|
||
min(texColor.r, min(texColor.g, texColor.b)) -\r
|
||
max(texColor.r, max(texColor.g, texColor.b));\r
|
||
// SDF\r
|
||
median = min(median, texColor.a);\r
|
||
\r
|
||
float screenPxDistance = uFWidth * (median - 0.5);\r
|
||
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r
|
||
if (median < 0.01) {\r
|
||
alpha = 0.0;\r
|
||
} else if (median > 0.99) {\r
|
||
alpha = 1.0;\r
|
||
}\r
|
||
\r
|
||
// Gamma correction for coverage-like alpha\r
|
||
float luma = dot(uColor.rgb, vec3(0.299, 0.587, 0.114));\r
|
||
float gamma = mix(1.0, 1.0 / 2.2, luma);\r
|
||
float coverage = pow(uColor.a * alpha, gamma); \r
|
||
\r
|
||
// NPM Textures, NPM outputs\r
|
||
gl_FragColor = vec4(uColor.rgb, coverage);\r
|
||
}\r
|
||
`,RF=`// Mesh material default fragment\r
|
||
attribute vec2 aVertexPosition;\r
|
||
attribute vec2 aTextureCoord;\r
|
||
\r
|
||
uniform mat3 projectionMatrix;\r
|
||
uniform mat3 translationMatrix;\r
|
||
uniform mat3 uTextureMatrix;\r
|
||
\r
|
||
varying vec2 vTextureCoord;\r
|
||
\r
|
||
void main(void)\r
|
||
{\r
|
||
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r
|
||
\r
|
||
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
|
||
}\r
|
||
`;const dy=[],uy=[],hy=[],FF=class WS extends Mn{constructor(e,t={}){super();const{align:n,tint:s,maxWidth:r,letterSpacing:o,fontName:a,fontSize:c}=Object.assign({},WS.styleDefaults,t);if(!Lr.available[a])throw new Error(`Missing BitmapFont "${a}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=n,this._tintColor=new Ot(s),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 ir(()=>{this.dirty=!0},this,0,0),this._roundPixels=Xe.ROUND_PIXELS,this.dirty=!0,this._resolution=Xe.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var P;const e=Lr.available[this._fontName],t=this.fontSize,n=t/e.size,s=new Pt,r=[],o=[],a=[],c=this._text.replace(/(?:\r\n|\r)/g,`
|
||
`)||" ",l=GS(c),d=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?dy:uy;let h=null,f=0,p=0,m=0,g=-1,v=0,y=0,b=0,x=0;for(let I=0;I<l.length;I++){const D=l[I],$=Ld(D);if(/(?:\s)/.test(D)&&(g=I,v=f,x++),D==="\r"||D===`
|
||
`){o.push(f),a.push(-1),p=Math.max(p,f),++m,++y,s.x=0,s.y+=e.lineHeight,h=null,x=0;continue}const j=e.chars[$];if(!j)continue;h&&j.kerning[h]&&(s.x+=j.kerning[h]);const B=hy.pop()||{texture:tt.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Pt};B.texture=j.texture,B.line=m,B.charCode=$,B.position.x=Math.round(s.x+j.xOffset+this._letterSpacing/2),B.position.y=Math.round(s.y+j.yOffset),B.prevSpaces=x,r.push(B),f=B.position.x+Math.max(j.xAdvance-j.xOffset,j.texture.orig.width),s.x+=j.xAdvance+this._letterSpacing,b=Math.max(b,j.yOffset+j.texture.height),h=$,g!==-1&&d>0&&s.x>d&&(++y,Fa(r,1+g-y,1+I-g),I=g,g=-1,o.push(v),a.push(r.length>0?r[r.length-1].prevSpaces:0),p=Math.max(p,v),m++,s.x=0,s.y+=e.lineHeight,h=null,x=0)}const T=l[l.length-1];T!=="\r"&&T!==`
|
||
`&&(/(?:\s)/.test(T)&&(f=v),o.push(f),p=Math.max(p,f),a.push(-1));const E=[];for(let I=0;I<=m;I++){let D=0;this._align==="right"?D=p-o[I]:this._align==="center"?D=(p-o[I])/2:this._align==="justify"&&(D=a[I]<0?0:(p-o[I])/a[I]),E.push(D)}const S=r.length,C={},M=[],k=this._activePagesMeshData;u.push(...k);for(let I=0;I<S;I++){const D=r[I].texture,$=D.baseTexture.uid;if(!C[$]){let j=u.pop();if(!j){const Y=new zg;let U,O;e.distanceFieldType==="none"?(U=new fu(tt.EMPTY),O=Qe.NORMAL):(U=new fu(tt.EMPTY,{program:ks.from(RF,IF),uniforms:{uFWidth:0}}),O=Qe.NORMAL_NPM);const L=new ac(Y,U);L.blendMode=O,j={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:L,vertices:null,uvs:null,indices:null}}j.index=0,j.indexCount=0,j.vertexCount=0,j.uvsCount=0,j.total=0;const{_textureCache:B}=this;B[$]=B[$]||new tt(D.baseTexture),j.mesh.texture=B[$],j.mesh.tint=this._tintColor.value,M.push(j),C[$]=j}C[$].total++}for(let I=0;I<k.length;I++)M.includes(k[I])||this.removeChild(k[I].mesh);for(let I=0;I<M.length;I++)M[I].mesh.parent!==this&&this.addChild(M[I].mesh);this._activePagesMeshData=M;for(const I in C){const D=C[I],$=D.total;if(!(((P=D.indices)==null?void 0:P.length)>6*$)||D.vertices.length<ac.BATCHABLE_SIZE*2)D.vertices=new Float32Array(8*$),D.uvs=new Float32Array(8*$),D.indices=new Uint16Array(6*$);else{const j=D.total,B=D.vertices;for(let Y=j*4*2;Y<B.length;Y++)B[Y]=0}D.mesh.size=6*$}for(let I=0;I<S;I++){const D=r[I];let $=D.position.x+E[D.line]*(this._align==="justify"?D.prevSpaces:1);this._roundPixels&&($=Math.round($));const j=$*n,B=D.position.y*n,Y=D.texture,U=C[Y.baseTexture.uid],O=Y.frame,L=Y._uvs,R=U.index++;U.indices[R*6+0]=0+R*4,U.indices[R*6+1]=1+R*4,U.indices[R*6+2]=2+R*4,U.indices[R*6+3]=0+R*4,U.indices[R*6+4]=2+R*4,U.indices[R*6+5]=3+R*4,U.vertices[R*8+0]=j,U.vertices[R*8+1]=B,U.vertices[R*8+2]=j+O.width*n,U.vertices[R*8+3]=B,U.vertices[R*8+4]=j+O.width*n,U.vertices[R*8+5]=B+O.height*n,U.vertices[R*8+6]=j,U.vertices[R*8+7]=B+O.height*n,U.uvs[R*8+0]=L.x0,U.uvs[R*8+1]=L.y0,U.uvs[R*8+2]=L.x1,U.uvs[R*8+3]=L.y1,U.uvs[R*8+4]=L.x2,U.uvs[R*8+5]=L.y2,U.uvs[R*8+6]=L.x3,U.uvs[R*8+7]=L.y3}this._textWidth=p*n,this._textHeight=(s.y+e.lineHeight)*n;for(const I in C){const D=C[I];if(this.anchor.x!==0||this.anchor.y!==0){let Y=0;const U=this._textWidth*this.anchor.x,O=this._textHeight*this.anchor.y;for(let L=0;L<D.total;L++)D.vertices[Y++]-=U,D.vertices[Y++]-=O,D.vertices[Y++]-=U,D.vertices[Y++]-=O,D.vertices[Y++]-=U,D.vertices[Y++]-=O,D.vertices[Y++]-=U,D.vertices[Y++]-=O}this._maxLineHeight=b*n;const $=D.mesh.geometry.getBuffer("aVertexPosition"),j=D.mesh.geometry.getBuffer("aTextureCoord"),B=D.mesh.geometry.getIndex();$.data=D.vertices,j.data=D.uvs,B.data=D.indices,$.update(),j.update(),B.update()}for(let I=0;I<r.length;I++)hy.push(r[I]);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:n,size:s}=Lr.available[this._fontName];if(n!=="none"){const{a:r,b:o,c:a,d:c}=this.worldTransform,l=Math.sqrt(r*r+o*o),d=Math.sqrt(a*a+c*c),u=(Math.abs(l)+Math.abs(d))/2,h=this.fontSize/s,f=e._view.resolution;for(const p of this._activePagesMeshData)p.mesh.shader.uniforms.uFWidth=u*t*h*f}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=Lr.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(!Lr.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??Lr.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._resolution!==e&&(this._resolution=e,this.dirty=!0)}destroy(e){const{_textureCache:t}=this,n=Lr.available[this._fontName].distanceFieldType==="none"?dy:uy;n.push(...this._activePagesMeshData);for(const s of this._activePagesMeshData)this.removeChild(s.mesh);this._activePagesMeshData=[],n.filter(s=>t[s.mesh.texture.baseTexture.uid]).forEach(s=>{s.mesh.texture=tt.EMPTY});for(const s in t)t[s].destroy(),delete t[s];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};FF.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const LF=[".xml",".fnt"],DF={extension:{type:$e.LoadParser,priority:Ei.Normal},name:"loadBitmapFont",test(i){return LF.includes(pn.extname(i).toLowerCase())},async testParse(i){return Fd.test(i)||Am.test(i)},async parse(i,e,t){const n=Fd.test(i)?Fd.parse(i):Am.parse(i),{src:s}=e,{page:r}=n,o=[];for(let l=0;l<r.length;++l){const d=r[l].file;let u=pn.join(pn.dirname(s),d);u=lu(u,s),o.push(u)}const a=await t.load(o),c=o.map(l=>a[l]);return Lr.install(n,c,!0)},async load(i,e){return(await Xe.ADAPTER.fetch(i)).text()},unload(i){i.destroy()}};He.add(DF);const Tm=class xa extends no{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new xa(Object.keys(xa.defaultOptions).reduce((t,n)=>({...t,[n]:e[n]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete xa.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:n}=xa;if(n[e]){const s=n[e];return this._fonts.push(s),s.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return Xe.ADAPTER.fetch(e).then(s=>s.blob()).then(async s=>new Promise((r,o)=>{const a=URL.createObjectURL(s),c=new FileReader;c.onload=()=>r([a,c.result]),c.onerror=o,c.readAsDataURL(s)})).then(async([s,r])=>{const o=Object.assign({family:pn.basename(e,pn.extname(e)),weight:"normal",style:"normal",display:"auto",src:s,dataSrc:r,refs:1,originalUrl:e,fontFace:null},t);n[e]=o,this._fonts.push(o),this.styleID++;const a=new FontFace(o.family,`url(${o.src})`,{weight:o.weight,style:o.style,display:o.display});o.fontFace=a,await a.load(),document.fonts.add(a),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(n=>!this._overrides.includes(n));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(n=>this._overrides.includes(n));t.length>0&&(this._overrides=this._overrides.filter(n=>!t.includes(n)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e}
|
||
@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=Tk(e)),typeof e=="number"?Ak(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,n=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),s=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${n}px ${s}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,xa.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}=Xe.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}};Tm.availableFonts={},Tm.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 cp=Tm;const rd=class wa extends oo{constructor(e="",t={}){super(tt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const n=new Image,s=tt.from(n,{scaleMode:Xe.SCALE_MODE,resourceOptions:{autoLoad:!1}});s.orig=new ht,s.trim=new ht,this.texture=s;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"),d=document.createElementNS(o,"style");c.setAttribute("width","10000"),c.setAttribute("height","10000"),c.style.overflow="hidden",a.appendChild(c),this.maxWidth=wa.defaultMaxWidth,this.maxHeight=wa.defaultMaxHeight,this._domElement=l,this._styleElement=d,this._svgRoot=a,this._foreignObject=c,this._foreignObject.appendChild(d),this._foreignObject.appendChild(l),this._image=n,this._loadImage=new Image,this._autoResolution=wa.defaultAutoResolution,this._resolution=wa.defaultResolution??Xe.RESOLUTION,this.text=e,this.style=t}measureText(e){var d,u;const{text:t,style:n,resolution:s}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:n.toCSS(s)}),this._styleElement.textContent=n.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),n!==this._style&&(Object.assign(this._domElement,{style:(d=this._style)==null?void 0:d.toCSS(s)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:c+n.padding*2,height:l+n.padding*2}}async updateText(e=!0){const{style:t,_image:n,_loadImage:s}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:o}=this.measureText();n.width=s.width=Math.ceil(Math.max(1,r)),n.height=s.height=Math.ceil(Math.max(1,o)),this._updateID++;const a=this._updateID;await new Promise(c=>{s.onload=async()=>{if(a<this._updateID){c();return}await t.onBeforeDraw(),n.src=s.src,s.onload=null,s.src="",this.updateTexture(),c()};const l=new XMLSerializer().serializeToString(this._svgRoot);s.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:n,resolution:s}=this,{padding:r}=e,{baseTexture:o}=t;t.trim.width=t._frame.width=n.width/s,t.trim.height=t._frame.height=n.height/s,t.trim.x=-r,t.trim.y=-r,t.orig.width=t._frame.width-r*2,t.orig.height=t._frame.height-r*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,s),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,s,r,o,a;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},wa.defaultDestroyOptions,e),super.destroy(e);const t=null;this.ownsStyle&&((n=this._style)==null||n.cleanFonts()),this._style=t,(s=this._svgRoot)==null||s.remove(),this._svgRoot=t,(r=this._domElement)==null||r.remove(),this._domElement=t,(o=this._foreignObject)==null||o.remove(),this._foreignObject=t,(a=this._styleElement)==null||a.remove(),this._styleElement=t,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=t,this._image.src="",this._image=t}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(e){this.updateText(!0);const t=Gr(this.scale.x)||1;this.scale.x=t*e/this._image.width/this.resolution,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(e){this.updateText(!0);const t=Gr(this.scale.y)||1;this.scale.y=t*e/this._image.height/this.resolution,this._height=e}get style(){return this._style}set style(e){this._style!==e&&(e=e||{},e instanceof cp?(this.ownsStyle=!1,this._style=e):e instanceof no?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=cp.from(e)):(this.ownsStyle=!0,this._style=new cp(e)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(e){e=String(e===""||e===null||e===void 0?" ":e),e=this.sanitiseText(e),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}sanitiseText(e){return e.replace(/<br>/gi,"<br/>").replace(/<hr>/gi,"<hr/>").replace(/ /gi," ")}};rd.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},rd.defaultMaxWidth=2024,rd.defaultMaxHeight=2024,rd.defaultAutoResolution=!0;function mu(i,e){const t=Math.max(0,Number(i)||0),n=Math.max(0,Number(e)||0);return{inner:Math.min(t,n),outer:Math.max(t,n)}}function qS(i){const e=Math.max(0,Number(i.outerRectW)||0),t=Math.max(0,Number(i.outerRectH)||0);return{innerW:Math.min(e,Math.max(0,Number(i.innerRectW)||0)),innerH:Math.min(t,Math.max(0,Number(i.innerRectH)||0)),outerW:e,outerH:t}}function OF(i,e,t,n,s){if(i==="random")return s();const r=Math.max(1,Math.round(t)),o=Math.max(0,Math.round(e))%r;return n?o/r:r<=1?.5:o/(r-1)}function fy(i,e,t,n){const s=Math.sqrt(i*i+n()*(e*e-i*i));return{x:Math.cos(t)*s,y:-Math.sin(t)*s,radialAngle:-t*180/Math.PI}}function NF(i,e){const{innerW:t,innerH:n,outerW:s,outerH:r}=qS(i),o=Math.max(0,(s-t)/2),a=Math.max(0,(r-n)/2),c=o*r,l=t*a,d=c*2+l*2;if(d<=0){const p=s*2+r*2;if(p<=0)return{x:0,y:0,radialAngle:0};let m=e()*p,g,v;return m<s?(g=-s/2+m,v=-r/2):(m-=s)<r?(g=s/2,v=-r/2+m):(m-=r)<s?(g=s/2-m,v=r/2):(m-=s,g=-s/2,v=r/2-m),{x:g,y:v,radialAngle:Math.atan2(v,g)*180/Math.PI}}let u=e()*d,h=0,f=0;return u<c?(h=-s/2+e()*o,f=(e()-.5)*r):(u-=c)<c?(h=t/2+e()*o,f=(e()-.5)*r):(u-=c)<l?(h=(e()-.5)*t,f=-r/2+e()*a):(h=(e()-.5)*t,f=n/2+e()*a),{x:h,y:f,radialAngle:Math.atan2(f,h)*180/Math.PI}}function $F(i,e){if(i.shape==="circle"){const{inner:t,outer:n}=mu(i.innerRadius,i.outerRadius);return fy(t,n,e()*Math.PI*2,e)}if(i.shape==="rect")return NF(i,e);if(i.shape==="cone"){const{inner:t,outer:n}=mu(i.innerRadius,i.outerRadius),s=Math.max(0,Math.min(360,Number(i.coneAngle)||0))/2,r=(Number(i.coneDirection)||0)+(e()-.5)*s*2;return fy(t,n,r*Math.PI/180,e)}return{x:0,y:0,radialAngle:0}}function BF(i,e,t,n){if(i.shape==="path"||i.shape==="orbit"){if(i.emissionAngleMode==="path-tangent"&&Number.isFinite(e.pathAngle))return(e.pathAngle+t)*Math.PI/180;if(i.emissionAngleMode==="path-normal"&&Number.isFinite(e.pathAngle))return(e.pathAngle-90+t)*Math.PI/180}if(i.emissionAngleMode==="radial"&&i.shape!=="point"&&i.shape!=="orbit")return(e.radialAngle+t)*Math.PI/180;const s=i.emissionAngleMode==="random"?(n()-.5)*Math.max(0,Number(i.spread)||0):0,r=((Number(i.direction)||0)+t+s)*Math.PI/180;return i.shape==="cone"?-r:r}const qr={normal:0,add:1,multiply:2,screen:3},py=400;function Dn(i,e,t){return i+(e-i)*t}function od(i,e){return Number.isFinite(i)?i:e}function Pr(i,e,t,n=null){const s=Math.max(1e-4,Math.abs((n==null?void 0:n.scaleX)??i.rootScaleX)),r=Math.max(1e-4,Math.abs((n==null?void 0:n.scaleY)??i.rootScaleY)),o=-((n==null?void 0:n.rotation)??i.rootRotation)*Math.PI/180,a=Math.cos(o),c=Math.sin(o),l=(n==null?void 0:n.centerX)??i.centerX,d=(n==null?void 0:n.centerY)??i.centerY,u=l+a*s*e-c*r*t,h=-d+c*s*e+a*r*t;return{x:u,y:-h}}function ad(i,e,t,n=null){const s=Math.max(1e-4,Math.abs((n==null?void 0:n.scaleX)??i.rootScaleX)),r=Math.max(1e-4,Math.abs((n==null?void 0:n.scaleY)??i.rootScaleY)),o=-((n==null?void 0:n.rotation)??i.rootRotation)*Math.PI/180,a=Math.cos(o),c=Math.sin(o),l=e-((n==null?void 0:n.centerX)??i.centerX),d=-t+((n==null?void 0:n.centerY)??i.centerY);return{x:(a*l+c*d)/s,y:(-c*l+a*d)/r}}function UF(i,e,t,n=null){const s=Math.max(1e-4,Math.abs((n==null?void 0:n.scaleX)??i.rootScaleX)),r=Math.max(1e-4,Math.abs((n==null?void 0:n.scaleY)??i.rootScaleY)),o=-((n==null?void 0:n.rotation)??i.rootRotation)*Math.PI/180,a=Math.cos(o),c=Math.sin(o),l=a*s*e-c*r*t,d=c*s*e+a*r*t;return{x:l,y:-d}}function my(i,e,t,n=null){const s=Math.max(1e-4,Math.abs((n==null?void 0:n.scaleX)??i.rootScaleX)),r=Math.max(1e-4,Math.abs((n==null?void 0:n.scaleY)??i.rootScaleY)),o=-((n==null?void 0:n.rotation)??i.rootRotation)*Math.PI/180,a=Math.cos(o),c=Math.sin(o),l=-t;return{x:(a*e+c*l)/s,y:(-c*e+a*l)/r}}function KS(i,e,t){return t<=0||e<0||e>t?0:i==="linear"?1-e/t:i==="inverse"?Math.min(10,t/Math.max(e,t*.1)):1}function VF(i,e,t,n,s,r,o){const a=i-t,c=e-n,l=Math.hypot(a,c);if(l<=1e-4||l>r)return{x:0,y:0};const d=s*KS(o,l,r)*10;return{x:-c/l*d,y:a/l*d}}function XF(i,e,t){const n=i.rotation*Math.PI/180,s=Math.cos(n),r=Math.sin(n),o=Math.max(1e-4,Math.abs(i.scaleX??1)),a=Math.max(1e-4,Math.abs(i.scaleY??1)),c=e-i.x,l=t-i.y,d=(s*c+r*l)/o,u=(-r*c+s*l)/a,h=(E,S,C,M)=>{const k=C/o,P=M/a,I=Math.max(1e-4,Math.hypot(k,P)),D=k/I,$=P/I,j=s*D-r*$,B=r*D+s*$;return{x:i.x+s*E*o-r*S*a+j*.05,y:i.y+r*E*o+s*S*a+B*.05,nx:j,ny:B}};if(i.shape==="circle"){const E=Math.max(.001,i.radius),S=Math.hypot(d,u);if(S>=E)return null;const C=S>1e-4?d/S:1,M=S>1e-4?u/S:0;return h(C*E,M*E,C,M)}if(i.shape==="ellipse"){const E=Math.max(.001,i.radiusX),S=Math.max(.001,i.radiusY),C=Math.hypot(d/E,u/S);if(C>=1)return null;const M=C>1e-4?1/C:1,k=C>1e-4?d*M:E,P=C>1e-4?u*M:0,I=Math.max(1e-4,Math.hypot(k/(E*E),P/(S*S)));return h(k,P,k/(E*E)/I,P/(S*S)/I)}if(i.shape==="rect"){const E=Math.max(.001,i.width*.5),S=Math.max(.001,i.height*.5);if(Math.abs(d)>=E||Math.abs(u)>=S)return null;const C=E-Math.abs(d),M=S-Math.abs(u);if(C<M){const P=d>=0?1:-1;return h(P*E,u,P,0)}const k=u>=0?1:-1;return h(d,k*S,0,k)}const f=Math.max(3,Math.min(16,Math.round(i.sides||(i.shape==="custom"?5:6)))),p=Math.max(.001,i.width*.5),m=Math.max(.001,i.height*.5),g=Array.from({length:f},(E,S)=>{const C=Math.PI*.5+S/f*Math.PI*2;return{x:Math.cos(C)*p,y:Math.sin(C)*m}});let v=!1;for(let E=0,S=g.length-1;E<g.length;S=E++){const C=g[E],M=g[S];C.y>u!=M.y>u&&d<(M.x-C.x)*(u-C.y)/(M.y-C.y)+C.x&&(v=!v)}if(!v)return null;let y=g[0].x,b=g[0].y,x=1/0;for(let E=0;E<g.length;E++){const S=g[E],C=g[(E+1)%g.length],M=C.x-S.x,k=C.y-S.y,P=Math.max(1e-4,M*M+k*k),I=Math.min(1,Math.max(0,((d-S.x)*M+(u-S.y)*k)/P)),D=S.x+M*I,$=S.y+k*I,j=Math.hypot(D-d,$-u);j<x&&(x=j,y=D,b=$)}const T=Math.max(1e-4,Math.hypot(y-d,b-u));return h(y,b,(y-d)/T,(b-u)/T)}function YF(i){return Math.min(1,Math.max(0,1-i.life/Math.max(1e-4,i.maxLife)))}function Dr(i,e,t){let n=(i>>>0^Math.imul(e+1,2654435761)^t)>>>0;return n^=n>>>16,n=Math.imul(n,2146121005),n^=n>>>15,n=Math.imul(n,2221713035),n^=n>>>16,(n>>>0)/4294967296}function ca(i,e,t,n,s){return i==="fixed"?e:i==="curve"?Dn(e,t,_s(n,s)):Dn(e,t,s)}function dp(i,e,t,n,s,r){return i==="curve"?Dn(e,t,_s(n,s)):i==="random"?r:e}function gy(i,e,t,n,s){const r=1-s;return r*r*r*i+3*r*r*s*e+3*r*s*s*t+s*s*s*n}function _s(i,e,t="线性"){if(!Array.isArray(i)||i.length===0)return 1;const n=[...i].sort((s,r)=>s.x-r.x);if(e<=n[0].x)return n[0].y;if(e>=n[n.length-1].x)return n[n.length-1].y;for(let s=0;s<n.length-1;s++)if(e>=n[s].x&&e<=n[s+1].x){const r=n[s],o=n[s+1],a=o.x-r.x||1;if(t!=="贝塞尔")return Dn(r.y,o.y,(e-r.x)/a);const c=r.x+(r.outX??a/3),l=r.y+(r.outY??(o.y-r.y)/3),d=o.x+(o.inX??-a/3),u=o.y+(o.inY??-(o.y-r.y)/3);let h=0,f=1;for(let p=0;p<14;p++){const m=(h+f)/2;gy(r.x,c,d,o.x,m)<e?h=m:f=m}return gy(r.y,l,u,o.y,(h+f)/2)}return n[n.length-1].y}function up(i){let e=i>>>0;return function(){e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}function $a(i){let e=i.replace("#","");return e.length===3&&(e=e.split("").map(t=>t+t).join("")),parseInt(e,16)}function zF(i,e,t){const n=vy(i),s=vy(e),r=Math.round(n[0]+(s[0]-n[0])*t),o=Math.round(n[1]+(s[1]-n[1])*t),a=Math.round(n[2]+(s[2]-n[2])*t);return r<<16|o<<8|a}function Em(i,e){if(!Array.isArray(i)||i.length===0)return 16777215;const t=[...i].sort((n,s)=>n.position-s.position);if(e<=t[0].position)return $a(t[0].color);if(e>=t[t.length-1].position)return $a(t[t.length-1].color);for(let n=0;n<t.length-1;n++){const s=t[n],r=t[n+1];if(e<s.position||e>r.position)continue;const o=(e-s.position)/Math.max(1e-4,r.position-s.position);return zF(s.color,r.color,o)}return $a(t[t.length-1].color)}function vy(i){let e=i.replace("#","");e.length===3&&(e=e.split("").map(n=>n+n).join(""));const t=parseInt(e,16);return[t>>16&255,t>>8&255,t&255]}function by(i,e){const t=Math.min(255,(i>>16&255)+(e>>16&255)),n=Math.min(255,(i>>8&255)+(e>>8&255)),s=Math.min(255,(i&255)+(e&255));return t<<16|n<<8|s}function jF(){return{sprite:null,boneName:"",mesh:null,meshSignature:"",history:[],bones:[],skinWeights:[],currentWidth:0,currentAlpha:0,currentColor:16777215,resourceId:1,enabled:!1,sampledLength:100,sampledWidth:100}}function Dd(i){i.history.length=0,i.bones.length=0,i.mesh&&(i.mesh.visible=!1)}class HF{constructor(e){A(this,"container");this.container=e}ensureMesh(e,t,n){const s=t.trailResources.find(g=>g.id===e.resourceId)||t.trailResources[0],r=(s==null?void 0:s.texture)||tt.EMPTY,o=Number(s==null?void 0:s.rotation)||0,a=Math.max(2,Math.min(16,Math.round(t.trailGridRows))),c=Math.max(2,Math.min(32,Math.round(t.trailGridCols))),l=Math.max(2,Math.min(16,Math.round((s==null?void 0:s.boneCount)??3))),d=`${a}:${c}:${l}:${(s==null?void 0:s.id)??0}:${o}`;if(e.mesh&&e.meshSignature===d)return e.mesh.texture!==r&&(e.mesh.texture=r),e.mesh;e.mesh&&(this.container.removeChild(e.mesh),e.mesh.destroy()),e.meshSignature&&e.meshSignature!==d&&(e.history.length=0,e.bones.length=0);const u=new Float32Array(a*c*2),h=new Float32Array(a*c*2),f=[],p=[];for(let g=0;g<c;g++){const v=g/(c-1),y=v*(l-1),b=Math.min(l-1,Math.floor(y)),x=Math.min(l-1,b+1),T=y-b;for(let E=0;E<a;E++){const S=g*a+E,C=v,M=E/(a-1),k=o*Math.PI/180,P=Math.cos(k),I=Math.sin(k);h[S*2]=.5+P*(C-.5)-I*(M-.5),h[S*2+1]=.5+I*(C-.5)+P*(M-.5),p.push({boneA:b,boneB:x,weight:T})}}for(let g=0;g<c-1;g++)for(let v=0;v<a-1;v++){const y=g*a+v,b=(g+1)*a+v,x=y+1,T=b+1;f.push(y,b,x,b,T,x)}const m=new rF(r,u,h,new Uint16Array(f));return m.visible=!1,m.blendMode=qr.normal,this.container.addChildAt(m,Math.max(0,this.container.getChildIndex(n))),e.mesh=m,e.meshSignature=d,e.skinWeights=p,m}appendPoint(e,t,n,s){const r=e.history[0];!r||Math.hypot(r.x-t,r.y-n)>.05?e.history.unshift({x:t,y:n}):(r.x=t,r.y=n);const o=Math.max(1,s)*1.5;let a=0,c=e.history.length;for(let l=1;l<e.history.length;l++)if(a+=Math.hypot(e.history[l].x-e.history[l-1].x,e.history[l].y-e.history[l-1].y),a>=o||l>=239){c=l+1;break}e.history.length>c&&(e.history.length=c)}sampleBones(e,t,n){const s=Math.max(2,Math.min(16,Math.round(n))),r=e.history,o=[];if(!r.length)return o;let a=0;for(let l=1;l<r.length;l++)a+=Math.hypot(r[l].x-r[l-1].x,r[l].y-r[l-1].y);const c=Math.min(Math.max(0,t),a);for(let l=0;l<s;l++){const d=c*l/(s-1);let u=0,h=r[r.length-1];for(let f=1;f<r.length;f++){const p=r[f-1],m=r[f],g=Math.hypot(m.x-p.x,m.y-p.y);if(u+g>=d&&g>1e-4){const v=(d-u)/g;h={x:Dn(p.x,m.x,v),y:Dn(p.y,m.y,v)};break}u+=g}o.push({boneName:`${e.boneName}_trail_${l}`,x:h.x,y:h.y,rotation:0})}for(let l=0;l<o.length;l++){const d=o[Math.min(o.length-1,l+1)],u=o[Math.max(0,l-1)],h=l<o.length-1?d.x-o[l].x:o[l].x-u.x,f=l<o.length-1?d.y-o[l].y:o[l].y-u.y;o[l].rotation=Math.atan2(f,h)*180/Math.PI}if(c+1e-4<Math.max(0,t)&&o.length>1){const l=o[0].rotation,u=(o[o.length-1].rotation-l+540)%360-180;for(let h=0;h<o.length;h++)o[h].rotation=l+u*h/(o.length-1)}return o}skinMesh(e,t,n){if(!e.sprite)return;const s=this.ensureMesh(e,t,e.sprite),r=t.trailResources.find(d=>d.id===n.resourceId)||t.trailResources[0];if(!(r!=null&&r.texture)||n.bones.length<2){s.visible=!1;return}e.resourceId=r.id,s.texture!==r.texture&&(s.texture=r.texture);const o=Math.max(2,Math.min(16,Math.round(t.trailGridRows))),a=Math.max(2,Math.min(32,Math.round(t.trailGridCols))),c=s.vertices,l=[];for(let d=0;d<a;d++){const u=e.skinWeights[d*o],h=n.bones[Math.min(n.bones.length-1,u.boneA)],f=n.bones[Math.min(n.bones.length-1,u.boneB)];l.push({x:Dn(h.x,f.x,u.weight),y:Dn(h.y,f.y,u.weight)})}for(let d=0;d<a;d++){const u=l[Math.max(0,d-1)],h=l[Math.min(a-1,d+1)],f=h.x-u.x,p=h.y-u.y,m=Math.max(1e-4,Math.hypot(f,p)),g=-p/m,v=f/m,y=d/(a-1),b=r.shapeEnabled?Math.max(0,_s(r.shapeCurve,y)):1;for(let x=0;x<o;x++){const E=(x/(o-1)-.5)*n.width*b,S=(d*o+x)*2;c[S]=l[d].x+g*E,c[S+1]=l[d].y+v*E}}s.tint=n.colorHex,s.alpha=n.alpha,s.blendMode=qr[r.blend],s.visible=Math.hypot(l[0].x-l[a-1].x,l[0].y-l[a-1].y)>.5&&n.alpha>0}update(e,t,n,s,r,o,a){if(e.sprite=a,e.boneName=n,!t.trail||!e.enabled||e.sampledLength<=0||e.sampledWidth<=0){Dd(e);return}this.ensureMesh(e,t,a);const c=t.trailResources.find(f=>f.id===e.resourceId)||t.trailResources[0];this.appendPoint(e,s,r,e.sampledLength);const l=c!=null&&c.lifeLengthEnabled?Math.max(0,_s(c.lifeLengthCurve,o)):1,d=Math.max(0,e.sampledLength)*l;e.bones=this.sampleBones(e,d,(c==null?void 0:c.boneCount)??3),e.bones[0]&&(e.bones[0].x=s,e.bones[0].y=r);const u=(c==null?void 0:c.widthMode)==="particle"?(Math.abs(a.scale.x)+Math.abs(a.scale.y))*.5:1;e.currentWidth=Math.max(0,e.sampledWidth)*u,e.currentAlpha=(c==null?void 0:c.alphaMode)==="particle"?a.alpha:(c==null?void 0:c.alphaMode)==="curve"?_s(c.alphaCurve,o):(c==null?void 0:c.alpha)??1,e.currentColor=(c==null?void 0:c.colorMode)==="particle"?a.tint:(c==null?void 0:c.colorMode)==="curve"?Em(c.colorGradient,o):$a((c==null?void 0:c.color)||"#ffffff");const h={bones:e.bones.map(f=>({...f})),activeBoneCount:e.bones.length,width:e.currentWidth,alpha:Math.min(1,Math.max(0,e.currentAlpha)),colorHex:e.currentColor,resourceId:e.resourceId};return this.skinMesh(e,t,h),h}applyState(e,t,n,s){var r;e.sprite=n,e.resourceId=s.resourceId??((r=t.trailResources[0])==null?void 0:r.id)??1,e.bones=s.bones.map(o=>({...o})),e.currentWidth=s.width,e.currentAlpha=s.alpha,this.skinMesh(e,t,s)}drawDebug(e,t,n,s){if(e.clear(),!t||!n.trail)return;const r=Math.max(2,Math.min(16,Math.round(n.trailGridRows))),o=Math.max(2,Math.min(32,Math.round(n.trailGridCols)));e.lineStyle(1,3790847,.72);for(const a of s){const c=a.mesh;if(!(c!=null&&c.visible))continue;const l=c.vertices,d=(u,h)=>{const f=(u*r+h)*2;return{x:l[f],y:l[f+1]}};for(let u=0;u<r;u++)for(let h=0;h<o;h++){const f=d(h,u);h===0?e.moveTo(f.x,f.y):e.lineTo(f.x,f.y)}for(let u=0;u<o;u++)for(let h=0;h<r;h++){const f=d(u,h);h===0?e.moveTo(f.x,f.y):e.lineTo(f.x,f.y)}e.beginFill(9235711,.9);for(let u=0;u<o;u++)for(let h=0;h<r;h++){const f=d(u,h);e.drawCircle(f.x,f.y,1.6)}e.endFill()}}}function GF(i){return{id:1,texture:i,textureName:"star",textureFolder:"",previewUrl:"/images/star.png",imageMode:"fixed",sequencePlayback:"loop-forward",sequenceFps:30,sequenceFrames:[],weight:100,locked:!1,scale:1,anchorX:.5,anchorY:.5,colorMode:"fixed",colorStart:"#ffffff",colorEnd:"#ff4d4d",blend:"normal",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],independentAlpha:"off",alpha:1,alphaCurveMode:"跟随导出",alphaCurve:[{x:0,y:0},{x:.1,y:1},{x:.9,y:1},{x:1,y:0}]}}function WF(){return{id:1,texture:null,textureName:"trail",previewUrl:"/images/trail.png",weight:100,locked:!1,rotation:0,colorMode:"particle",color:"#ffffff",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],blend:"normal",alphaMode:"particle",alpha:1,alphaCurve:[{x:0,y:1},{x:1,y:1}],boneCount:3,trailRatio:100,lengthMode:"fixed",length:100,lengthMin:100,lengthMax:100,widthSizeMode:"fixed",width:100,widthMin:100,widthMax:100,widthMode:"particle",lifeLengthEnabled:!1,lifeLengthCurve:[{x:0,y:1},{x:1,y:1}],shapeEnabled:!1,shapeCurve:[{x:0,y:1},{x:1,y:1}]}}function qF(i,e){const t=i.imageResources.filter(r=>r.texture||r.sequenceFrames.some(o=>o.texture));if(!t.length)return GF(i.texture);const n=t.reduce((r,o)=>r+Math.max(0,o.weight),0);if(n<=0)return t[Math.floor(e()*t.length)];let s=e()*n;for(const r of t)if(s-=Math.max(0,r.weight),s<=0)return r;return t[t.length-1]}function KF(i,e){const t=i.trailResources.filter(r=>r.texture);if(!t.length)return i.trailResources[0]||WF();const n=t.reduce((r,o)=>r+Math.max(0,o.weight),0);if(n<=0)return t[Math.min(t.length-1,Math.floor(e*t.length))];let s=e*n;for(const r of t)if(s-=Math.max(0,r.weight),s<=0)return r;return t[t.length-1]}function yy(i,e){if(i.imageMode!=="sequence"||i.sequenceFrames.length<=1)return{index:0,visible:!0};const t=Math.min(120,Math.max(1,Number(i.sequenceFps)||30)),n=Math.max(0,Math.floor(Math.max(0,e)*t)),s=i.sequenceFrames.length-1;return i.sequencePlayback==="once-hide"?{index:Math.min(s,n),visible:n<=s}:i.sequencePlayback==="once-hold"?{index:Math.min(s,n),visible:!0}:i.sequencePlayback==="loop-reverse"?{index:s-n%i.sequenceFrames.length,visible:!0}:{index:n%i.sequenceFrames.length,visible:!0}}function hp(i,e,t){var n;return i.imageMode==="sequence"&&i.sequenceFrames.length?((n=i.sequenceFrames[Math.max(0,Math.min(i.sequenceFrames.length-1,t))])==null?void 0:n.texture)||i.texture||e:i.texture||e}function lc(){return{texture:null,imageResources:[{id:1,texture:null,textureName:"star",textureFolder:"",previewUrl:"/images/star.png",imageMode:"fixed",sequencePlayback:"loop-forward",sequenceFps:30,sequenceFrames:[],weight:100,locked:!1,scale:1,anchorX:.5,anchorY:.5,colorMode:"fixed",colorStart:"#ffffff",colorEnd:"#ff4d4d",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],blend:"normal",independentAlpha:"off",alpha:1,alphaCurveMode:"跟随导出",alphaCurve:[{x:0,y:0},{x:.1,y:1},{x:.9,y:1},{x:1,y:0}]}],imageWeightVersion:1,name:"ParticleSystem1",mode:"stream",rate:20,streamBehavior:"normal",loopDurationFrames:30,generateLoopStartAnimation:!1,loopStartUseCustomDuration:!1,loopStartDurationFrames:30,generateLoopEndAnimation:!1,loopEndUseCustomDuration:!1,loopEndDurationFrames:30,burstCount:50,burstLoop:!1,delay:0,duration:1,shape:"point",showShape:!0,shapeRangeVersion:1,innerRadius:0,outerRadius:30,innerRectW:0,innerRectH:0,outerRectW:60,outerRectH:40,spawnPathId:0,spawnPathDistribution:"fixed",radius:30,rectW:60,rectH:40,centerX:0,centerY:0,rootRotation:0,rootScaleX:1,rootScaleY:1,renderLayerMode:"top",renderLayerSpineId:0,renderLayerSlotName:"",renderLayerSlotPosition:"above",renderLayerFollowAttachment:!1,emissionAngleMode:"random",direction:0,spread:360,coneDirection:90,coneAngle:60,lifeMin:.6,lifeMax:1.8,lifeMode:"random",lifeCurve:[{x:0,y:0},{x:1,y:1}],speedMin:30,speedMax:140,speedMode:"random",speedCurve:[{x:0,y:0},{x:1,y:1}],scaleMin:.3,scaleMax:.8,scaleMode:"random",scaleAxisMode:"uniform",scaleYMin:.3,scaleYMax:.8,scaleCurve:[{x:0,y:0},{x:1,y:1}],scaleYCurve:[{x:0,y:0},{x:1,y:1}],scaleEndRatio:.3,initialRotationMode:"random",initialRotationMin:0,initialRotationMax:360,initialRotationCurve:[{x:0,y:0},{x:1,y:1}],alpha:.9,alphaEnd:0,rotationSpeedMin:-180,rotationSpeedMax:180,speedOverLifeEnabled:!1,speedOverLifeMode:"fixed",speedOverLifeMin:1,speedOverLifeMax:1,speedOverLifeCurve:[{x:0,y:1},{x:1,y:1}],scaleOverLifeEnabled:!1,scaleOverLifeMode:"curve",scaleOverLifeAxisMode:"uniform",scaleOverLifeMin:0,scaleOverLifeMax:1,scaleYOverLifeMin:0,scaleYOverLifeMax:1,scaleOverLifeCurve:[{x:0,y:1},{x:1,y:1}],scaleYOverLifeCurve:[{x:0,y:1},{x:1,y:1}],rotationOverLifeEnabled:!1,rotationOverLifeMode:"random",rotationOverLifeCurve:[{x:0,y:0},{x:1,y:1}],gravity:980,gravityMode:"fixed",gravityMin:980,gravityMax:980,gravityDirection:-90,gravityCurve:[{x:0,y:1},{x:1,y:1}],damping:0,seed:0,colorStart:"#ffffff",colorEnd:"#ff4d4d",colorOverLife:!1,blend:"add",alphaMode:"curve",curveMode:"线性",alphaCurve:[{x:0,y:0},{x:.2,y:1},{x:.8,y:1},{x:1,y:0}],textureName:"star",textureFolder:"",alphaScale:1,anchorX:.5,anchorY:.5,independentAlpha:"off",offsetX:0,offsetY:0,noise:!1,noiseAmt:30,noiseRange:100,noiseSpeed:1,useGravity:!1,wind:!1,windX:0,windY:0,windMode:"fixed",windMin:100,windMax:100,windDirection:0,windCurve:[{x:0,y:1},{x:1,y:1}],forceField:!1,forceStrength:10,forceRadius:100,forceCenterX:0,forceCenterY:0,forceFalloff:"linear",showForceFieldShape:!0,vortex:!1,vortexStrength:10,vortexRadius:100,vortexCenterX:0,vortexCenterY:0,vortexFalloff:"linear",showVortexShape:!0,attraction:!1,attractionCenterX:200,attractionCenterY:0,attractionRadius:20,attractionDuration:.5,attractionDelay:.1,attractionDelayMode:"particle",attractionPath:"curve",showAttractionShape:!0,trail:!1,trailConfigVersion:3,trailResources:[{id:1,texture:null,textureName:"trail",previewUrl:"/images/trail.png",weight:100,locked:!1,rotation:0,colorMode:"particle",color:"#ffffff",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],blend:"normal",alphaMode:"particle",alpha:1,alphaCurve:[{x:0,y:1},{x:1,y:1}],boneCount:3,trailRatio:100,lengthMode:"fixed",length:100,lengthMin:100,lengthMax:100,widthSizeMode:"fixed",width:100,widthMin:100,widthMax:100,widthMode:"particle",lifeLengthEnabled:!1,lifeLengthCurve:[{x:0,y:1},{x:1,y:1}],shapeEnabled:!1,shapeCurve:[{x:0,y:1},{x:1,y:1}]}],trailResourceVersion:6,trailTexture:null,trailTextureName:"trail",trailPreviewUrl:"/images/trail.png",trailColorMode:"particle",trailColor:"#ffffff",trailColorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],trailAlphaMode:"particle",trailAlpha:1,trailAlphaCurve:[{x:0,y:1},{x:1,y:1}],trailBoneCount:3,trailLength:100,trailWidth:100,trailWidthMode:"particle",trailLifeLengthEnabled:!1,trailLifeLengthCurve:[{x:0,y:1},{x:1,y:1}],trailShapeEnabled:!1,trailShapeCurve:[{x:0,y:1},{x:1,y:1}],trailGridRows:4,trailGridCols:4,collision:!1,collisionColliderIds:[],pathFollow:!1,eventEnabled:!1,events:[],emitterFollow:!1,emitterFollowMode:"none",emitterFollowPathId:0,emitterFollowSpineId:0,emitterFollowBoneName:"",emitterFollowBoneOffsetX:0,emitterFollowBoneOffsetY:0,emitterFollowBoneRotation:0,emitterFollowBoneScaleX:1,emitterFollowBoneScaleY:1,emitterAngleMode:"fixed",emitterFollowCurve:[{x:0,y:0},{x:1,y:1}],emitterFollowDuration:2,emitterFollowSpace:"world",emitterFollowDirection:"forward",emitterFollowOffset:0}}function fr(i){var k;const e=lc(),t=i,n=t.shapeRangeVersion!==1,s=Number(t.radius),r=Number(t.rectW),o=Number(t.rectH),a=Number(t.direction),c=Number(t.spread),l=t.shape,d=t.imageWeightVersion!==1,u=t.loopDurationFrames==null,h=t.gravityMode==null,f=Number(t.gravity),p=t.windMode==null,m=Number(t.windX),g=Number(t.windY),v=t.forceFalloff==null,y=Number(t.forceStrength),b=t.trailConfigVersion!==3,x=!Array.isArray(t.trailResources),T=t.trailResourceVersion!==6,E=t.trailTexture,S=String(t.trailTextureName||"trail"),C=String(t.trailPreviewUrl||"/images/trail.png").replace("/trails/trail.png","/images/trail.png");for(const[P,I]of Object.entries(e))t[P]!==void 0&&t[P]!==null||(t[P]=Array.isArray(I)?I.map(D=>typeof D=="object"&&D!==null?{...D}:D):I);n&&(i.innerRadius=0,i.outerRadius=Math.max(0,Number.isFinite(s)?s:e.outerRadius),i.innerRectW=0,i.innerRectH=0,i.outerRectW=Math.max(0,Number.isFinite(r)?r:e.outerRectW),i.outerRectH=Math.max(0,Number.isFinite(o)?o:e.outerRectH),i.coneDirection=Number.isFinite(a)?a:90,i.emissionAngleMode=Number.isFinite(c)&&c>0?"random":"fixed",l==="cone"&&(i.spread=Math.max(0,Number(i.coneAngle)||0)),i.shapeRangeVersion=1),i.shape==="orbit"&&(i.shape="path"),["fixed","random","radial","path-normal","path-tangent"].includes(i.emissionAngleMode)||(i.emissionAngleMode="fixed"),!["circle","rect","cone"].includes(i.shape)&&i.emissionAngleMode==="radial"&&(i.emissionAngleMode="fixed"),i.shape!=="path"&&(i.emissionAngleMode==="path-normal"||i.emissionAngleMode==="path-tangent")&&(i.emissionAngleMode="fixed"),i.spawnPathId=Math.max(0,Math.round(Number(i.spawnPathId)||0)),i.spawnPathDistribution!=="fixed"&&i.spawnPathDistribution!=="random"&&(i.spawnPathDistribution="fixed"),i.renderLayerMode!=="top"&&i.renderLayerMode!=="slot"&&(i.renderLayerMode="top"),i.renderLayerSpineId=Math.max(0,Math.round(Number(i.renderLayerSpineId)||0)),typeof i.renderLayerSlotName!="string"&&(i.renderLayerSlotName=""),i.renderLayerSlotPosition!=="above"&&i.renderLayerSlotPosition!=="below"&&(i.renderLayerSlotPosition="above"),typeof i.renderLayerFollowAttachment!="boolean"&&(i.renderLayerFollowAttachment=!1),typeof i.eventEnabled!="boolean"&&(i.eventEnabled=!1),Array.isArray(i.events)||(i.events=[]);for(const P of i.events){P.id=Math.max(1,Math.round(Number(P.id)||1)),P.event!=="birth"&&P.event!=="death"&&P.event!=="collision"&&(P.event="birth"),P.targetSystemId=Math.max(0,Math.round(Number(P.targetSystemId)||0));const I=Number(P.probability);P.probability=Math.min(1,Math.max(0,Number.isFinite(I)?I:1));const D=Math.round(Number(P.collisionLimit));P.collisionLimit=Math.min(4,Math.max(1,Number.isFinite(D)?D:1));const $=P.inherit,j=["color","scale","rotation","life"],B=Array.isArray($)?$:$==="all"?[...j]:j.includes(String($))?[String($)]:[],Y=[...new Set(B.filter(O=>j.includes(String(O))))],U=Array.isArray($)?$:null;(!U||U.length!==Y.length||Y.some((O,L)=>O!==U[L]))&&(P.inherit=Y),P.colorInheritMode!=="add"&&P.colorInheritMode!=="replace"&&(P.colorInheritMode="add")}i.innerRadius=Math.max(0,Number(i.innerRadius)||0),i.outerRadius=Math.max(i.innerRadius,Number(i.outerRadius)||0),i.innerRectW=Math.max(0,Number(i.innerRectW)||0),i.innerRectH=Math.max(0,Number(i.innerRectH)||0),i.outerRectW=Math.max(i.innerRectW,Number(i.outerRectW)||0),i.outerRectH=Math.max(i.innerRectH,Number(i.outerRectH)||0);const M=Array.from(new Set((Array.isArray(i.collisionColliderIds)?i.collisionColliderIds:[]).map(P=>Math.round(Number(P))).filter(P=>Number.isFinite(P)&&P>0)));(M.length!==i.collisionColliderIds.length||M.some((P,I)=>P!==i.collisionColliderIds[I]))&&(i.collisionColliderIds=M),i.streamBehavior!=="normal"&&i.streamBehavior!=="loop"&&(i.streamBehavior="normal"),(u||!Number.isFinite(i.loopDurationFrames))&&(i.loopDurationFrames=Math.ceil(Math.max(1/30,Number(i.duration)||1)*30)),i.loopDurationFrames=Math.min(1800,Math.max(1,Math.ceil(i.loopDurationFrames))),typeof i.generateLoopStartAnimation!="boolean"&&(i.generateLoopStartAnimation=!1),typeof i.generateLoopEndAnimation!="boolean"&&(i.generateLoopEndAnimation=!1),typeof i.loopStartUseCustomDuration!="boolean"&&(i.loopStartUseCustomDuration=!1),typeof i.loopEndUseCustomDuration!="boolean"&&(i.loopEndUseCustomDuration=!1),i.loopStartDurationFrames=Math.min(1800,Math.max(1,Math.ceil(Number(i.loopStartDurationFrames)||30))),i.loopEndDurationFrames=Math.min(1800,Math.max(1,Math.ceil(Number(i.loopEndDurationFrames)||30))),(!Array.isArray(i.imageResources)||i.imageResources.length===0)&&(i.imageResources=lc().imageResources);for(const P of i.imageResources){!P.texture&&i.texture&&(P.texture=i.texture),P.textureName||(P.textureName="star"),P.previewUrl==="/particles/star.png"&&(P.previewUrl="/images/star.png"),P.previewUrl||(P.previewUrl=P.textureName==="star"?"/images/star.png":""),P.imageMode!=="fixed"&&P.imageMode!=="sequence"&&(P.imageMode="fixed"),P.sequencePlayback==="once"?P.sequencePlayback="once-hold":P.sequencePlayback==="loop"?P.sequencePlayback="loop-forward":["once-hide","once-hold","loop-forward","loop-reverse"].includes(P.sequencePlayback)||(P.sequencePlayback="loop-forward"),Number.isFinite(P.sequenceFps)||(P.sequenceFps=30),P.sequenceFps=Math.min(120,Math.max(1,Number(P.sequenceFps)||30)),Array.isArray(P.sequenceFrames)||(P.sequenceFrames=[]);for(const I of P.sequenceFrames)typeof I.name!="string"&&(I.name=""),typeof I.previewUrl!="string"&&(I.previewUrl=""),I.texture===void 0&&(I.texture=null);Number.isFinite(P.weight)||(P.weight=100),typeof P.locked!="boolean"&&(P.locked=!1),Number.isFinite(P.scale)||(P.scale=1),Number.isFinite(P.anchorX)||(P.anchorX=.5),Number.isFinite(P.anchorY)||(P.anchorY=.5),P.colorMode!=="fixed"&&P.colorMode!=="random"&&P.colorMode!=="lifetime"&&(P.colorMode=i.colorOverLife?"lifetime":"fixed"),P.colorStart||(P.colorStart=i.colorStart||"#ffffff"),P.colorEnd||(P.colorEnd=i.colorEnd||P.colorStart),(!Array.isArray(P.colorGradient)||P.colorGradient.length<2)&&(P.colorGradient=[{position:0,color:P.colorStart},{position:1,color:P.colorEnd}]),Object.prototype.hasOwnProperty.call(qr,P.blend)||(P.blend=i.blend||"normal"),["off","fixed","curve"].includes(P.independentAlpha)||(P.independentAlpha=i.independentAlpha||"off"),Number.isFinite(P.alpha)||(P.alpha=Number.isFinite(i.alphaScale)?i.alphaScale:1),["跟随导出","线性","贝塞尔"].includes(P.alphaCurveMode)||(P.alphaCurveMode=i.curveMode||"跟随导出"),(!Array.isArray(P.alphaCurve)||P.alphaCurve.length<2)&&(P.alphaCurve=(i.alphaCurve||[{x:0,y:1},{x:1,y:1}]).map(I=>({...I})))}if(i.imageResources.length===1)i.imageResources[0].weight=100,i.imageResources[0].locked=!1;else if(d){const P=100/i.imageResources.length;i.imageResources.forEach((I,D)=>{I.weight=D===i.imageResources.length-1?100-P*(i.imageResources.length-1):P,I.locked=!1})}if(i.imageWeightVersion=1,h){const P=Number.isFinite(f)&&f!==0?f:980;i.gravity=P,i.gravityMin=P,i.gravityMax=P}if(p){const P=Number.isFinite(m)&&Number.isFinite(g)&&(m!==0||g!==0);i.windMin=P?Math.hypot(m,g):100,i.windMax=i.windMin,i.windDirection=P?Math.atan2(-g,m)*180/Math.PI:0}v&&(i.forceStrength=Number.isFinite(y)&&y!==0?y:10),b&&(i.trailConfigVersion=3,i.trailAlphaCurve=[{x:0,y:1},{x:1,y:1}],i.trailLifeLengthCurve=[{x:0,y:1},{x:1,y:1}],i.trailShapeCurve=[{x:0,y:1},{x:1,y:1}],i.trailGridRows=4,i.trailGridCols=4),(x||!i.trailResources.length)&&(i.trailResources=[{id:1,texture:E||null,textureName:S,previewUrl:C,weight:100,locked:!1,rotation:0,colorMode:i.trailColorMode,color:i.trailColor,colorGradient:i.trailColorGradient.map(P=>({...P})),blend:"normal",alphaMode:i.trailAlphaMode,alpha:i.trailAlpha,alphaCurve:i.trailAlphaCurve.map(P=>({...P})),boneCount:i.trailBoneCount,trailRatio:100,lengthMode:"fixed",length:i.trailLength,lengthMin:i.trailLength,lengthMax:i.trailLength,widthSizeMode:"fixed",width:i.trailWidth,widthMin:i.trailWidth,widthMax:i.trailWidth,widthMode:i.trailWidthMode,lifeLengthEnabled:i.trailLifeLengthEnabled,lifeLengthCurve:i.trailLifeLengthCurve.map(P=>({...P})),shapeEnabled:i.trailShapeEnabled,shapeCurve:i.trailShapeCurve.map(P=>({...P}))}]);for(const P of i.trailResources)P.textureName||(P.textureName="trail"),P.previewUrl==="/trails/trail.png"&&(P.previewUrl="/images/trail.png"),P.previewUrl||(P.previewUrl="/images/trail.png"),Number.isFinite(P.weight)||(P.weight=100),typeof P.locked!="boolean"&&(P.locked=!1),Number.isFinite(P.rotation)||(P.rotation=0),["particle","fixed","curve"].includes(P.colorMode)||(P.colorMode=i.trailColorMode||"particle"),P.color||(P.color=i.trailColor||"#ffffff"),(!Array.isArray(P.colorGradient)||P.colorGradient.length<2)&&(P.colorGradient=(i.trailColorGradient||[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}]).map(I=>({...I}))),Object.prototype.hasOwnProperty.call(qr,P.blend)||(P.blend="normal"),["particle","fixed","curve"].includes(P.alphaMode)||(P.alphaMode=i.trailAlphaMode||"particle"),Number.isFinite(P.alpha)||(P.alpha=Number.isFinite(i.trailAlpha)?i.trailAlpha:1),(!Array.isArray(P.alphaCurve)||P.alphaCurve.length<2)&&(P.alphaCurve=(i.trailAlphaCurve||[{x:0,y:1},{x:1,y:1}]).map(I=>({...I}))),Number.isFinite(P.boneCount)||(P.boneCount=Number.isFinite(i.trailBoneCount)?i.trailBoneCount:3),Number.isFinite(P.trailRatio)||(P.trailRatio=100),P.trailRatio=Math.min(100,Math.max(0,P.trailRatio)),["fixed","random"].includes(P.lengthMode)||(P.lengthMode="fixed"),Number.isFinite(P.length)||(P.length=Number.isFinite(i.trailLength)?i.trailLength:100),Number.isFinite(P.lengthMin)||(P.lengthMin=P.length),Number.isFinite(P.lengthMax)||(P.lengthMax=P.length),["fixed","random"].includes(P.widthSizeMode)||(P.widthSizeMode="fixed"),Number.isFinite(P.width)||(P.width=Number.isFinite(i.trailWidth)?i.trailWidth:100),Number.isFinite(P.widthMin)||(P.widthMin=P.width),Number.isFinite(P.widthMax)||(P.widthMax=P.width),["particle","fixed"].includes(P.widthMode)||(P.widthMode=i.trailWidthMode||"particle"),typeof P.lifeLengthEnabled!="boolean"&&(P.lifeLengthEnabled=!!i.trailLifeLengthEnabled),(!Array.isArray(P.lifeLengthCurve)||P.lifeLengthCurve.length<2)&&(P.lifeLengthCurve=(i.trailLifeLengthCurve||[{x:0,y:1},{x:1,y:1}]).map(I=>({...I}))),typeof P.shapeEnabled!="boolean"&&(P.shapeEnabled=!!i.trailShapeEnabled),(!Array.isArray(P.shapeCurve)||P.shapeCurve.length<2)&&(P.shapeCurve=(i.trailShapeCurve||[{x:0,y:1},{x:1,y:1}]).map(I=>({...I})));if(i.trailResources.length===1&&(i.trailResources[0].weight=100,i.trailResources[0].locked=!1),T)for(const P of i.trailResources)P.alphaCurve=((k=P.alphaCurve)==null?void 0:k.length)>=2?P.alphaCurve:[{x:0,y:1},{x:1,y:1}];return i.trailResourceVersion=6,i}class xy extends Mn{constructor(t,n=py){super();A(this,"pool",[]);A(this,"cfg");A(this,"accumulator",0);A(this,"burstTimer",0);A(this,"_spawnSerial",0);A(this,"_elapsed",0);A(this,"_attractionEnabledAt",0);A(this,"_attractionWasEnabled",!1);A(this,"autoEmission",!0);A(this,"pendingEventSpawns",[]);A(this,"states",[]);A(this,"onParticleEvent",null);A(this,"rng",Math.random);A(this,"_lastSeed",-1);A(this,"trailDebugGfx",new ti);A(this,"trail");A(this,"colliders",[]);A(this,"followSpawnX",0);A(this,"followSpawnY",0);A(this,"followSpawnAngle",0);A(this,"spawnPathSampler",null);A(this,"spawnPathClosed",!1);A(this,"followExportCurveMode","线性");A(this,"simulationTransform",null);this.cfg=fr(t),this.trail=new HF(this),this._ensurePool(n),this.addChild(this.trailDebugGfx)}setFollowExportCurveMode(t){this.followExportCurveMode=t}resolveCurveMode(t){return t==="跟随导出"?this.followExportCurveMode:t}reseed(){const t=this.cfg.seed;t!==this._lastSeed&&(this._lastSeed=t,this.rng=up(t>>>0))}_ensurePool(t){for(;this.pool.length<t;){const n=this.pool.length,s=new oo(this.cfg.texture);s.blendMode=qr[this.cfg.blend],s.anchor.set(.5),s.visible=!1,this.addChild(s),this.pool.push({sprite:s,active:!1,boneName:"p_"+n,spawnId:-1,life:0,maxLife:1,x:0,y:0,vx:0,vy:0,scaleStartX:1,scaleStartY:1,alphaStart:1,alphaEnd:1,rotation:0,rotationSpeed:0,speedScale:1,speedScaleTarget:1,scaleOverLifeX:1,scaleOverLifeY:1,noisePhaseX:0,noisePhaseY:0,gravityStrength:980,windStrength:100,attractionActive:!1,attractionElapsed:0,attractionStartWorldX:0,attractionStartWorldY:0,attractionCurveSide:1,trail:jF(),resourceId:1,colorSample:16777215,colorAdd:0,colorOverride:null,currentScaleX:1,currentScaleY:1,imageFrameIndex:0,collisionPaused:!1,collisionCount:0,eventDepth:0})}}setSpawnPathSampler(t,n=!1){this.spawnPathSampler=t,this.spawnPathClosed=n}setColliders(t){this.colliders=t}setAutoEmission(t){this.autoEmission=t}setEmitterFollowSpawn(t,n,s){this.followSpawnX=t,this.followSpawnY=n,this.followSpawnAngle=s}setSimulationTransform(t,n,s,r,o){this.simulationTransform={centerX:t,centerY:n,rotation:s,scaleX:r,scaleY:o}}applyColliders(t,n){if(!this.cfg.collision||!this.colliders.length)return!1;const s=this.cfg;let r=Pr(s,t.x,t.y,this.simulationTransform),o=UF(s,t.vx,t.vy,this.simulationTransform);for(const a of this.colliders){if(!a.enabled)continue;const c=XF(a,r.x,r.y);if(!c)continue;if(t.collisionCount++,this.emitWorldEvent("collision",t,c.x,c.y,{normalX:c.nx,normalY:c.ny}),a.response==="destroy")return this.kill(n),!0;if(r={x:c.x,y:c.y},a.response==="pause")t.collisionPaused=!0,o={x:0,y:0};else{const u=o.x*c.nx+o.y*c.ny,h=o.x-u*c.nx,f=o.y-u*c.ny,p=Math.min(1,Math.max(0,a.elasticity)),m=1-Math.min(1,Math.max(0,a.friction)),g=u<0?-u*p:u;o.x=h*m+g*c.nx,o.y=f*m+g*c.ny}const l=ad(s,r.x,r.y,this.simulationTransform),d=my(s,o.x,o.y,this.simulationTransform);t.x=l.x,t.y=l.y,t.vx=d.x,t.vy=d.y}return!1}update(t,n="normal"){var c,l,d,u,h,f;const s=this.cfg;if((s.lifeMode==null||s.speedMode==null||s.scaleMode==null||s.shapeRangeVersion!==1||s.initialRotationMode==null||s.speedOverLifeEnabled==null||s.scaleOverLifeEnabled==null||s.rotationOverLifeEnabled==null||!Array.isArray(s.scaleOverLifeCurve)||s.attraction==null||s.trailBoneCount==null)&&fr(s),this.reseed(),this._elapsed+=t,s.attraction&&!this._attractionWasEnabled){this._attractionEnabledAt=this._elapsed;for(const p of this.pool)p.attractionActive=!1,p.attractionElapsed=0}else if(!s.attraction&&this._attractionWasEnabled)for(const p of this.pool)p.attractionActive=!1;this._attractionWasEnabled=s.attraction;const r=n==="force"||n==="normal"&&(s.delay<=0||this._elapsed>=s.delay),o=n==="force"||n==="normal"&&(s.mode==="burst"||this._elapsed<s.delay+Math.max(1/30,s.duration));if(this.autoEmission&&r&&o)if(s.mode==="stream")for(this.accumulator+=t*s.rate;this.accumulator>=1;)this.accumulator-=1,this.spawnOne();else this.burstTimer+=t,s.burstLoop?this.burstTimer>=1&&(this.burstTimer=0,this.emitBurst()):t>0&&this.burstTimer<=t&&this.emitBurst();if(this.pendingEventSpawns.length&&t>0){const p=[],m=[];for(const g of this.pendingEventSpawns)g.remaining-=t,g.remaining<=0?p.push(g):m.push(g);this.pendingEventSpawns=m;for(const g of p){const v=ad(this.cfg,g.worldX,g.worldY,this.simulationTransform);for(let y=0;y<g.count&&this.spawnOne({x:v.x,y:v.y},g.depth,g.inherit);y++);}}const a=[];for(let p=0;p<this.pool.length;p++){const m=this.pool[p];if(!m.active)continue;if(m.life-=t,m.life<=0){this.kill(p);continue}const g=YF(m);if(!m.collisionPaused&&s.useGravity){const O=Math.min(1,Math.max(0,_s(s.gravityCurve,g))),L=(s.gravityMode==="random"?m.gravityStrength:s.gravityMin)*O,R=s.gravityDirection*Math.PI/180;m.vx+=Math.cos(R)*L*t,m.vy+=-Math.sin(R)*L*t}if(!m.collisionPaused&&s.wind){const O=Math.min(1,Math.max(0,_s(s.windCurve,g))),L=(s.windMode==="random"?m.windStrength:s.windMin)*O,R=s.windDirection*Math.PI/180;m.vx+=Math.cos(R)*L*t,m.vy+=-Math.sin(R)*L*t}if(!m.collisionPaused&&s.forceField&&s.forceStrength!==0&&s.forceRadius>0){const O=Math.max(1e-4,Math.abs(s.rootScaleX)),L=Math.max(1e-4,Math.abs(s.rootScaleY)),R=-(((c=this.simulationTransform)==null?void 0:c.rotation)??s.rootRotation)*Math.PI/180,X=Math.cos(R),z=Math.sin(R),K=((l=this.simulationTransform)==null?void 0:l.centerX)??s.centerX,Z=((d=this.simulationTransform)==null?void 0:d.centerY)??s.centerY,ae=K+X*O*m.x-z*L*m.y,ce=-Z+z*O*m.x+X*L*m.y,ve=ae,we=-ce,re=s.forceCenterX-ve,Ee=s.forceCenterY-we,q=Math.hypot(re,Ee);if(q>1e-4&&q<=s.forceRadius){const J=KS(s.forceFalloff,q,s.forceRadius),ie=s.forceStrength*J*10,se=re/q*ie,H=Ee/q*ie,G=se,N=-H;m.vx+=(X*G+z*N)/O*t,m.vy+=(-z*G+X*N)/L*t}}if(!m.collisionPaused&&s.vortex&&s.vortexStrength!==0&&s.vortexRadius>0){const O=Pr(s,m.x,m.y,this.simulationTransform),L=VF(O.x,O.y,s.vortexCenterX,s.vortexCenterY,s.vortexStrength,s.vortexRadius,s.vortexFalloff),R=my(s,L.x,L.y,this.simulationTransform);m.vx+=R.x*t,m.vy+=R.y*t}if(!m.collisionPaused&&s.damping>0){const O=Math.max(0,1-s.damping*t);m.vx*=O,m.vy*=O}if(m.collisionPaused)m.vx=0,m.vy=0;else if(m.x+=m.vx*t,m.y+=m.vy*t,this.applyColliders(m,p))continue;if(s.attraction&&!m.collisionPaused){const O=m.maxLife-m.life;if(s.attractionDelayMode==="particle"?O>=Math.max(0,s.attractionDelay):this._elapsed-this._attractionEnabledAt>=Math.max(0,s.attractionDelay)){const R=Pr(s,m.x,m.y,this.simulationTransform),X=s.attractionCenterX,z=s.attractionCenterY,K=Math.max(0,s.attractionRadius);if(!m.attractionActive){if(Math.hypot(X-R.x,z-R.y)<=K){this.kill(p);continue}m.attractionActive=!0,m.attractionElapsed=0,m.attractionStartWorldX=R.x,m.attractionStartWorldY=R.y}m.attractionElapsed+=t;const Z=Math.max(1e-4,s.attractionDuration),ae=Math.min(1,m.attractionElapsed/Z);let ce=Dn(m.attractionStartWorldX,X,ae),ve=Dn(m.attractionStartWorldY,z,ae);if(s.attractionPath==="curve"){const Ee=X-m.attractionStartWorldX,q=z-m.attractionStartWorldY,J=Math.hypot(Ee,q);if(J>1e-4){const ie=J*.25*m.attractionCurveSide,se=(m.attractionStartWorldX+X)*.5-q/J*ie,H=(m.attractionStartWorldY+z)*.5+Ee/J*ie,G=1-ae;ce=G*G*m.attractionStartWorldX+2*G*ae*se+ae*ae*X,ve=G*G*m.attractionStartWorldY+2*G*ae*H+ae*ae*z}}const we=Math.hypot(X-ce,z-ve);if(ae>=1||we<=K){this.kill(p);continue}const re=ad(s,ce,ve,this.simulationTransform);m.x=re.x,m.y=re.y,m.vx=0,m.vy=0}}const v=g,y=m.sprite,b=s.imageResources.find(O=>O.id===m.resourceId);if(b){const O=yy(b,m.maxLife-m.life);m.imageFrameIndex=O.index,y.texture=hp(b,s.texture,m.imageFrameIndex),y.visible=O.visible}if(s.speedOverLifeEnabled){const O=od(dp(s.speedOverLifeMode,s.speedOverLifeMin,s.speedOverLifeMax,s.speedOverLifeCurve,v,m.speedScaleTarget),1),L=m.speedScale===0?O:O/m.speedScale;m.vx*=L,m.vy*=L,m.speedScale=O}let x=m.rotationSpeed;s.rotationOverLifeEnabled&&s.rotationOverLifeMode==="curve"&&(x=Dn(s.rotationSpeedMin,s.rotationSpeedMax,_s(s.rotationOverLifeCurve,v))),m.rotation+=x*t;let T=m.x,E=m.y;if(s.noise&&s.noiseAmt>0&&s.noiseRange>0&&s.noiseSpeed>0){const O=m.maxLife-m.life,L=Math.max(0,s.noiseRange)*Math.min(1,Math.max(0,s.noiseAmt)/100)*.5,R=O*Math.max(0,s.noiseSpeed)*Math.PI*2;T+=(Math.sin(m.noisePhaseX+R)-Math.sin(m.noisePhaseX))*L,E+=(Math.sin(m.noisePhaseY+R*.83)-Math.sin(m.noisePhaseY))*L}y.x=T,y.y=E,y.rotation=-m.rotation*Math.PI/180;let S=1,C=1;s.scaleOverLifeEnabled&&(S=dp(s.scaleOverLifeMode,s.scaleOverLifeMin,s.scaleOverLifeMax,s.scaleOverLifeCurve,v,m.scaleOverLifeX),C=s.scaleOverLifeAxisMode==="separate"?dp(s.scaleOverLifeMode,s.scaleYOverLifeMin,s.scaleYOverLifeMax,s.scaleYOverLifeCurve,v,m.scaleOverLifeY):S),y.scale.set(od(m.scaleStartX*S,1),od(m.scaleStartY*C,1)),m.currentScaleX=y.scale.x,m.currentScaleY=y.scale.y;const M=s.alphaMode==="curve"?_s(s.alphaCurve,v,this.resolveCurveMode(s.curveMode))*s.alphaScale:s.alpha*s.alphaScale;y.alpha=od((b==null?void 0:b.independentAlpha)==="fixed"?b.alpha:(b==null?void 0:b.independentAlpha)==="curve"?_s(b.alphaCurve,v,this.resolveCurveMode(b.alphaCurveMode)):M,1);const k=(b==null?void 0:b.colorStart)||"#ffffff",P=(b==null?void 0:b.colorMode)==="lifetime"?Em(b.colorGradient,v):(b==null?void 0:b.colorMode)==="random"?m.colorSample:$a(k),I=m.colorOverride??by(P,m.colorAdd);y.tint=I,y.blendMode=qr[(b==null?void 0:b.blend)||"normal"];const D=this.trail.update(m.trail,s,m.boneName,T,E,v,y),$=Pr(s,T,E,this.simulationTransform),j=((u=this.simulationTransform)==null?void 0:u.rotation)??s.rootRotation,B=Math.abs(((h=this.simulationTransform)==null?void 0:h.scaleX)??s.rootScaleX),Y=Math.abs(((f=this.simulationTransform)==null?void 0:f.scaleY)??s.rootScaleY),U=D?{...D,bones:D.bones.map(O=>{const L=Pr(s,O.x,O.y,this.simulationTransform);return{...O,worldX:L.x,worldY:L.y,worldRotation:j-O.rotation}})}:void 0;a.push({boneName:m.boneName,spawnId:m.spawnId,x:T,y:E,rotation:m.rotation,scaleX:y.scale.x,scaleY:y.scale.y,worldX:$.x,worldY:$.y,worldRotation:j+m.rotation,worldScaleX:y.scale.x*B,worldScaleY:y.scale.y*Y,alpha:y.alpha,colorHex:I,resourceId:m.resourceId,imageFrameIndex:m.imageFrameIndex,imageVisible:y.visible,trailState:U,active:!0})}return this.states=a,a}drawTrailMeshDebug(t){this.trail.drawDebug(this.trailDebugGfx,t,this.cfg,this.pool.map(n=>n.trail))}emitBurst(){for(let t=0;t<this.cfg.burstCount;t++)this.spawnOne()}spawnOrigin(){const t=this.cfg;let n=t.offsetX,s=t.offsetY;if(s=-s,t.shape==="path"&&t.spawnPathId>0&&this.spawnPathSampler){const a=this.estimatedEmissionCount(),c=OF(t.spawnPathDistribution,this._spawnSerial,a,this.spawnPathClosed,this.rng),l=this.spawnPathSampler(c);if(l)return{...this.applyFollowToOrigin(l.x+n,l.y+s),radialAngle:0,pathAngle:l.angle}}const r=$F(t,this.rng);return{...this.applyFollowToOrigin(n+r.x,s+r.y),radialAngle:r.radialAngle}}estimatedEmissionCount(){const t=this.cfg;return t.mode==="burst"?Math.max(1,Math.round(t.burstCount)):Math.max(1,Math.floor(t.rate*(t.streamBehavior==="loop"?Math.max(1,t.loopDurationFrames)/30:Math.max(0,t.duration))))}applyFollowToOrigin(t,n){const s=this.followSpawnAngle*Math.PI/180,r=Math.cos(s),o=Math.sin(s);return{x:this.followSpawnX+r*t-o*n,y:this.followSpawnY+o*t+r*n}}spawnEventParticle(t,n,s=1,r,o){if(s>2)return!1;const a=o??(this.cfg.mode==="burst"?this.cfg.burstCount:1),c=Math.max(1,Math.min(py,Math.round(Number(a)||1))),l=Math.max(0,Number(this.cfg.delay)||0);if(l>0)return this.pendingEventSpawns.push({worldX:t,worldY:n,depth:s,inherit:r,count:c,remaining:l}),!0;const d=ad(this.cfg,t,n,this.simulationTransform);let u=!1;for(let h=0;h<c&&this.spawnOne({x:d.x,y:d.y},s,r);h++)u=!0;return u}emitWorldEvent(t,n,s,r,o){this.onParticleEvent&&this.onParticleEvent({kind:t,worldX:s,worldY:r,rotation:n.rotation,spawnId:n.spawnId,depth:n.eventDepth,colorHex:n.sprite.tint,scaleX:n.currentScaleX,scaleY:n.currentScaleY,maxLife:n.maxLife,collisionCount:n.collisionCount,...o})}emitLocalEvent(t,n,s,r){if(!this.onParticleEvent)return;const o=Pr(this.cfg,s,r,this.simulationTransform);this.emitWorldEvent(t,n,o.x,o.y)}spawnOne(t,n=0,s){const r=this.cfg;let o=this.pool.findIndex(C=>!C.active);if(o===-1)return!1;const a=t?{x:t.x,y:t.y,radialAngle:0}:this.spawnOrigin(),{x:c,y:l}=a,d=ca(r.lifeMode,r.lifeMin,r.lifeMax,r.lifeCurve,this.rng()),u=ca(r.speedMode,r.speedMin,r.speedMax,r.speedCurve,this.rng()),h=s!=null&&s.attributes.includes("rotation")?s.data.rotation:0,f=BF(r,a,this.followSpawnAngle,this.rng)+h*Math.PI/180,p=this.pool[o],m=qF(r,this.rng),g=this._spawnSerial++;p.spawnId=g;const v=KF(r,Dr(r.seed,g,1540483477));p.noisePhaseX=Dr(r.seed,g,1757159915)*Math.PI*2,p.noisePhaseY=Dr(r.seed,g,48610963)*Math.PI*2,p.gravityStrength=r.useGravity&&r.gravityMode==="random"?Dn(r.gravityMin,r.gravityMax,this.rng()):r.gravityMin,p.windStrength=r.wind&&r.windMode==="random"?Dn(r.windMin,r.windMax,this.rng()):r.windMin,p.attractionActive=!1,p.attractionElapsed=0,p.collisionPaused=!1,p.collisionCount=0,p.eventDepth=n,p.attractionCurveSide=Dr(r.seed,g,2738958700)<.5?-1:1,p.trail.history.length=0,p.trail.bones.length=0,p.trail.currentWidth=0,p.trail.currentAlpha=0,p.trail.currentColor=16777215,p.trail.resourceId=v.id;const y=Math.min(100,Math.max(0,Number(v.trailRatio)||0)),b=r.mode==="burst"?Math.max(0,Math.round(r.burstCount)):Math.max(0,Math.floor(r.rate*(r.streamBehavior==="loop"?Math.max(1,r.loopDurationFrames)/30:Math.max(0,r.duration)))),x=y>0&&b===1&&g===0,T=Dr(r.seed,g,668265261)*100,E=(C,M,k,P,I)=>{if(C!=="random")return Math.max(0,Number(M)||0);const D=Math.max(0,Math.min(Number(k)||0,Number(P)||0)),$=Math.max(0,Math.max(Number(k)||0,Number(P)||0));return Dn(D,$,Dr(r.seed,g,I))};if(p.trail.sampledLength=E(v.lengthMode,v.length,v.lengthMin,v.lengthMax,374761393),p.trail.sampledWidth=E(v.widthSizeMode,v.width,v.widthMin,v.widthMax,3550635116),p.trail.enabled=r.trail&&(x||T<y)&&p.trail.sampledLength>0&&p.trail.sampledWidth>0,p.trail.mesh&&(p.trail.mesh.visible=!1),p.active=!0,p.life=d,p.maxLife=d,p.x=c,p.y=l,p.trail.enabled&&p.trail.history.push({x:c,y:l}),p.vx=Math.cos(f)*u,p.vy=Math.sin(f)*u,p.scaleStartX=ca(r.scaleMode,r.scaleMin,r.scaleMax,r.scaleCurve,this.rng())*m.scale,p.scaleStartY=r.scaleAxisMode==="separate"?ca(r.scaleMode,r.scaleYMin,r.scaleYMax,r.scaleYCurve,this.rng())*m.scale:p.scaleStartX,p.alphaStart=r.alpha,p.alphaEnd=r.alphaEnd,p.rotation=r.initialRotationMode==="direction"?-Math.atan2(p.vy,p.vx)*180/Math.PI+r.initialRotationMin:ca(r.initialRotationMode,r.initialRotationMin,r.initialRotationMax,r.initialRotationCurve,this.rng())+h,p.rotationSpeed=r.rotationOverLifeEnabled?ca(r.rotationOverLifeMode,r.rotationSpeedMin,r.rotationSpeedMax,r.rotationOverLifeCurve,this.rng()):0,p.speedScale=1,p.speedScaleTarget=r.speedOverLifeMode==="random"?Dn(r.speedOverLifeMin,r.speedOverLifeMax,this.rng()):r.speedOverLifeMin,p.scaleOverLifeX=r.scaleOverLifeMode==="random"?Dn(r.scaleOverLifeMin,r.scaleOverLifeMax,this.rng()):r.scaleOverLifeMin,p.scaleOverLifeY=r.scaleOverLifeMode==="random"?Dn(r.scaleYOverLifeMin,r.scaleYOverLifeMax,this.rng()):r.scaleYOverLifeMin,p.resourceId=m.id,p.colorSample=m.colorMode==="random"?Em(m.colorGradient,Dr(r.seed,g,2654435769)):$a(m.colorStart),p.colorAdd=0,p.colorOverride=null,s){const C=s.attributes;C.includes("color")&&(s.colorMode==="replace"?p.colorOverride=s.data.colorHex:p.colorAdd=s.data.colorHex),C.includes("scale")&&(p.scaleStartX*=s.data.scaleX,p.scaleStartY*=s.data.scaleY),C.includes("life")&&(p.life=Math.max(1e-4,s.data.life),p.maxLife=p.life)}p.currentScaleX=p.scaleStartX,p.currentScaleY=p.scaleStartY;const S=yy(m,0);return p.imageFrameIndex=S.index,p.sprite.texture=hp(m,r.texture,S.index),p.sprite.anchor.set(m.anchorX,m.anchorY),p.sprite.blendMode=qr[m.blend],p.sprite.tint=p.colorOverride??by(p.colorSample,p.colorAdd),p.sprite.visible=!0,this.emitLocalEvent("birth",p,p.x,p.y),!0}kill(t){const n=this.pool[t];n.active&&this.emitLocalEvent("death",n,n.x,n.y),n.active=!1,n.sprite.visible=!1,Dd(n.trail)}clear(){this.pendingEventSpawns.length=0;for(const t of this.pool)t.active=!1,t.sprite.visible=!1,Dd(t.trail)}get activeCount(){let t=0;for(const n of this.pool)n.active&&t++;return t}capture(){const t=[];for(const n of this.pool)n.active&&t.push({boneName:n.boneName,spawnId:n.spawnId,x:n.sprite.x,y:n.sprite.y,rotation:n.rotation,scaleX:n.sprite.scale.x,scaleY:n.sprite.scale.y,...this.captureWorldTransform(n),alpha:n.sprite.alpha,colorHex:n.sprite.tint,resourceId:n.resourceId,imageFrameIndex:n.imageFrameIndex,imageVisible:n.sprite.visible,active:!0,trailState:this.cfg.trail&&n.trail.bones.length?{bones:n.trail.bones.map(s=>{var o;const r=Pr(this.cfg,s.x,s.y,this.simulationTransform);return{...s,worldX:r.x,worldY:r.y,worldRotation:(((o=this.simulationTransform)==null?void 0:o.rotation)??this.cfg.rootRotation)-s.rotation}}),activeBoneCount:n.trail.bones.length,width:n.trail.currentWidth,alpha:n.trail.currentAlpha,colorHex:n.trail.currentColor,resourceId:n.trail.resourceId}:void 0});return t}captureWorldTransform(t){var r,o,a;const n=Pr(this.cfg,t.sprite.x,t.sprite.y,this.simulationTransform),s=((r=this.simulationTransform)==null?void 0:r.rotation)??this.cfg.rootRotation;return{worldX:n.x,worldY:n.y,worldRotation:s+t.rotation,worldScaleX:t.sprite.scale.x*Math.abs(((o=this.simulationTransform)==null?void 0:o.scaleX)??this.cfg.rootScaleX),worldScaleY:t.sprite.scale.y*Math.abs(((a=this.simulationTransform)==null?void 0:a.scaleY)??this.cfg.rootScaleY)}}apply(t){const n=new Map;for(const s of t)n.set(s.boneName,s);for(const s of this.pool){const r=n.get(s.boneName);if(!r){s.active=!1,s.sprite.visible=!1,s.trail.mesh&&(s.trail.mesh.visible=!1);continue}s.active=r.active;const o=s.sprite;if(o.visible=r.active&&r.imageVisible!==!1,o.x=r.x,o.y=r.y,o.rotation=-r.rotation*Math.PI/180,o.scale.set(r.scaleX,r.scaleY),o.alpha=r.alpha,o.tint=r.colorHex,r.resourceId!=null){const a=this.cfg.imageResources.find(c=>c.id===r.resourceId);a&&(s.imageFrameIndex=r.imageFrameIndex??0,o.texture=hp(a,this.cfg.texture,s.imageFrameIndex),o.anchor.set(a.anchorX,a.anchorY),o.blendMode=qr[a.blend])}this.cfg.trail&&r.trailState?this.trail.applyState(s.trail,this.cfg,s.sprite,r.trailState):s.trail.mesh&&(s.trail.mesh.visible=!1)}}reset(){this.pendingEventSpawns.length=0;for(const t of this.pool)t.active=!1,t.sprite.visible=!1,Dd(t.trail);this.accumulator=0,this.burstTimer=0,this._spawnSerial=0,this._elapsed=0,this._attractionEnabledAt=0,this._attractionWasEnabled=!1,this._lastSeed=this.cfg.seed,this.rng=up(this.cfg.seed>>>0)}restartEmissionCycle(){this.pendingEventSpawns.length=0,this.accumulator=0,this.burstTimer=0,this._spawnSerial=0,this._elapsed=0,this._attractionEnabledAt=0,this._attractionWasEnabled=this.cfg.attraction,this._lastSeed=this.cfg.seed,this.rng=up(this.cfg.seed>>>0)}}const Ho=new Map,Vo=new Map;function JF(i){return[...Ho.values()].some(e=>e===i)}function JS(i){if(!(JF(i)||(Vo.get(i)||0)>0)){Vo.delete(i);for(const e of i.textures)e.destroy(!0)}}function ZF(i){const e=Vo.get(i)||0;e>1?Vo.set(i,e-1):Vo.delete(i),JS(i)}function QF(i){return Ho.get(i)||null}function gh(i,e){Ec(i),Ho.set(i,e)}function eL(i){const e=Ho.get(i);return e?(Vo.set(e,(Vo.get(e)||0)+1),e):null}function tL(i,e){const t=Ho.get(i);return t?(gh(e,t),!0):!1}function Ec(i){const e=Ho.get(i);e&&(Ho.delete(i),JS(e))}function tn(i){if(Array.isArray(i))return i.map(e=>tn(e));if(i&&typeof i=="object"){const e=Object.getPrototypeOf(i);if(e===Object.prototype||e===null){const t={};for(const[n,s]of Object.entries(i))t[n]=tn(s);return t}}return i}const ZS=["3.8","4.0","4.1","4.2","4.3"];function gu(i){const e=String(i||"").trim();return ZS.find(t=>e===t||e.startsWith(`${t}.`))||null}function _m(){return ZS.join(" / ")}function nL(i){return i==="4.3"?"4.3":"4.2"}function Hg(){return{imagesPath:"./images/",spineVersion:"4.2",keyframeCurve:"bezier",fps:30,omitFps:!1,integerFrameAlignment:!0,bonePool:!0,excludeEmptyAnimations:!1,fileName:"SpineParticle.json"}}function QS(i){const e=Object.assign(Hg(),i||{});return e.imagesPath=String(e.imagesPath||"./images/"),e.spineVersion=gu(e.spineVersion)||"4.2",e.keyframeCurve=e.keyframeCurve==="bezier"?"bezier":"linear",e.fps=Math.min(240,Math.max(1,Math.round(Number(e.fps)||30))),e.omitFps=e.omitFps===!0,e.integerFrameAlignment=e.integerFrameAlignment!==!1,e.bonePool=e.bonePool!==!1,e.excludeEmptyAnimations=e.excludeEmptyAnimations===!0,e.fileName=String(e.fileName||"SpineParticle.json"),e}const Mm=30;function Od(i,e=1){return Math.min(1800,Math.max(1,Math.ceil(Number(i)||e)))}function eC(i,e=30){const t=Math.max(0,Number(i.lifeMin)||0),n=Math.max(0,Number(i.lifeMax)||0),s=i.lifeMode==="fixed"?t:Math.max(t,n);return Od(Math.ceil(s*Math.max(1,e)),Mm)}function Ji(i,e=30){const t=Od(i.loopDurationFrames),n=eC(i,e),s=i.generateLoopStartAnimation?i.loopStartUseCustomDuration?Od(i.loopStartDurationFrames,Mm):n:0,r=i.generateLoopEndAnimation?i.loopEndUseCustomDuration?Od(i.loopEndDurationFrames,Mm):n:0;return{start:s,loop:t,end:r,total:s+t+r}}function tC(i,e){const t=Ji(i,e),s=Math.max(0,Math.ceil(Math.max(0,Number(i.delay)||0)*Math.max(1,e)))+t.start;return{start:s,end:s+t.loop}}function ja(i){var t,n;const e=new Set;for(const s of i){if(((t=s.config)==null?void 0:t.eventEnabled)===!1)continue;const r=(n=s.config)==null?void 0:n.events;if(Array.isArray(r))for(const o of r)o.targetSystemId>0&&o.targetSystemId!==s.id&&e.add(o.targetSystemId)}return e}function nC(i,e){var r,o;const t=new Map;for(const a of i){if(((r=a.config)==null?void 0:r.eventEnabled)===!1)continue;const c=(o=a.config)==null?void 0:o.events;if(Array.isArray(c))for(const l of c){if(l.targetSystemId<=0||l.targetSystemId===a.id)continue;const d=t.get(l.targetSystemId);d?d.push(a.id):t.set(l.targetSystemId,[a.id])}}const n=new Set,s=[...t.get(e)||[]];for(;s.length;){const a=s.pop();n.has(a)||(n.add(a),s.push(...t.get(a)||[]))}return n.delete(e),n}const iL=.001;function iC(i,e){const t=Math.max(1,Number(e)||30),s=Math.max(0,Number(i)||0)*t+iL*t;return Math.max(0,Math.floor(s))}function sC(i,e,t){const n=Math.max(1,Math.floor(t)-1),s=Math.min(n-1,Math.max(0,Math.floor(Number(i)||0))),r=Math.min(n,Math.max(s+1,Math.floor(Number(e)||n)));return{start:s,end:r}}function fp(i,e,t,n){const s=Math.max(1,Math.floor(n)-1);return sC(i?e:0,i?t:s,n)}function sL(i,e,t){const n=Math.max(1,e-1),s=Math.max(1,t-1),r=i.end>=n?s:i.end;return sC(i.start,r,t)}let ld=1,cd=1,dd=1,ud=1;function hd(i,e){const t=new Set(e),n=`${i} Copy`;if(!t.has(n))return n;let s=2;for(;t.has(`${n} ${s}`);)s++;return`${n} ${s}`}const Zo=xP("particle",{state:()=>({editor:{viewScale:1,viewX:0,viewY:0},systems:[],colliders:[],paths:[],spines:[],activeId:0,activeObjectType:"particle",activeObjectId:0,timeline:{playing:!0,loop:!0,abLoop:!1,frame:0,totalFrames:60,playbackStart:0,playbackEnd:59,fps:30,recorded:!1,animation:"animation",animations:["animation"]},settings:{parameterPanelOnRight:!0,floatingMenuEnabled:!1,tickEnabled:!1,axisFontSize:12,tickWidth:1,showAxisLabels:!0,unsavedChangesPrompt:!1,showProjectSize:!1,axisColor:"#7a86ad",undoLimit:20,backgroundX:0,backgroundY:0,backgroundOpacity:1,backgroundImageName:"",backgroundImageData:"",showEmitter:!0,showBones:!1,bonePointDrawSize:1,boneAxisDrawSize:2,showSkinMesh:!1,showGrid:!0,exportSettings:Hg()}}),getters:{activeSystemCount:i=>i.systems.length,playbackRange:i=>fp(i.timeline.abLoop,i.timeline.playbackStart,i.timeline.playbackEnd,i.timeline.totalFrames)},actions:{syncSceneSequences(){ld=Math.max(ld,...this.systems.map(i=>i.id+1),1),cd=Math.max(cd,...this.colliders.map(i=>i.id+1),1),dd=Math.max(dd,...this.paths.map(i=>i.id+1),1),ud=Math.max(ud,...this.spines.map(i=>i.id+1),1)},addSystem(i){const e=lc();i!=null&&i.config&&Object.assign(e,i.config);const t=new Set(this.systems.map(r=>r.config.name));if(t.has(e.name)){let r=0;for(const a of this.systems){const c=/^ParticleSystem(\d+)$/.exec(a.config.name);c&&(r=Math.max(r,parseInt(c[1],10)))}e.name=`ParticleSystem${r+1}`;let o=2;for(;t.has(e.name);)e.name=`ParticleSystem${r+o}`,o++}const n=this.timeline.animations.includes(this.timeline.animation)?this.timeline.animation:this.timeline.animations[0]||"animation",s={id:ld++,visible:!0,animation:n,config:e};return this.systems.push(s),this.activeId=s.id,this.activeObjectType="particle",this.activeObjectId=s.id,s},removeSystem(i){var n;const e=this.systems.findIndex(s=>s.id===i);e>=0&&this.systems.splice(e,1),this.activeId===i&&(this.activeId=((n=this.systems[0])==null?void 0:n.id)??0);const t=this.systems.find(s=>s.id===this.activeId);if(t&&(this.timeline.animation=t.animation),this.activeObjectType==="particle"&&this.activeObjectId===i){const s=this.systems[0];this.activeObjectId=(s==null?void 0:s.id)??0}},selectSystem(i){this.activeId=i,this.activeObjectType="particle",this.activeObjectId=i;const e=this.systems.find(t=>t.id===i);e&&(this.timeline.animation=e.animation)},setSystemAnimation(i,e){if(!this.timeline.animations.includes(e))return;const t=this.systems.find(n=>n.id===i);t&&(t.animation=e,this.timeline.animation=e)},addAnimation(){const i=new Set(this.timeline.animations);let e=2,t=`animation${e}`;for(;i.has(t);)t=`animation${++e}`;this.timeline.animations.push(t),this.timeline.animation=t;const n=this.systems.find(s=>s.id===this.activeId);return n&&(n.animation=t),t},renameAnimation(i,e){const t=e.trim(),n=this.timeline.animations.indexOf(i);if(n<0||!t||t!==i&&this.timeline.animations.includes(t))return!1;this.timeline.animations[n]=t;for(const s of this.systems)s.animation===i&&(s.animation=t);return this.timeline.animation===i&&(this.timeline.animation=t),!0},removeAnimation(i){if(this.timeline.animations.length<=1)return!1;const e=this.timeline.animations.indexOf(i);if(e<0)return!1;this.timeline.animations.splice(e,1);const t=this.timeline.animations[Math.min(e,this.timeline.animations.length-1)];for(const n of this.systems)n.animation===i&&(n.animation=t);return this.timeline.animation===i&&(this.timeline.animation=t),!0},addCollider(){const i=cd++,e={id:i,name:`Collider${i}`,visible:!0,shape:"circle",enabled:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,radius:50,radiusX:70,radiusY:45,width:120,height:80,sides:6,response:"physics",elasticity:.8,friction:.3,followPath:!1,followPathId:0,followDuration:2,followPathRotation:!1,followCurveMode:"跟随导出",followCurve:[{x:0,y:0},{x:1,y:1}]};return this.colliders.push(e),this.activeObjectType="collision",this.activeObjectId=e.id,e},addPath(){const i=dd++,e={id:i,name:`Path${i}`,visible:!0,enabled:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,closed:!1,color:"#ff933e",preset:"",points:[]};return this.paths.push(e),this.activeObjectType="path",this.activeObjectId=e.id,e},addSpine(){const i=ud++,e={id:i,name:`SpineSkeleton${i}`,enabled:!0,visible:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,timeOffset:0,skeletonFileName:"",atlasFileName:"",textureFileNames:[],dataVersion:"",sourceBundle:null,selectedAnimation:"",selectedBone:"",selectedSlot:"",animations:[],bones:[],slots:[],assetVersion:0,status:"empty",error:""};return this.spines.push(e),this.activeObjectType="spine",this.activeObjectId=e.id,e},duplicateSelectedObject(){const i=this.activeObjectId;if(!i)return null;if(this.activeObjectType==="particle"){const n=this.systems.find(r=>r.id===i);if(!n)return null;const s=tn(n);return s.id=ld++,s.config.name=hd(n.config.name,this.systems.map(r=>r.config.name)),s.frames=void 0,this.systems.push(s),this.activeId=s.id,this.activeObjectId=s.id,this.timeline.animation=s.animation,s}if(this.activeObjectType==="collision"){const n=this.colliders.find(r=>r.id===i);if(!n)return null;const s=tn(n);return s.id=cd++,s.name=hd(n.name,this.colliders.map(r=>r.name)),this.colliders.push(s),this.activeObjectId=s.id,s}if(this.activeObjectType==="path"){const n=this.paths.find(r=>r.id===i);if(!n)return null;const s=tn(n);return s.id=dd++,s.name=hd(n.name,this.paths.map(r=>r.name)),this.paths.push(s),this.activeObjectId=s.id,s}const e=this.spines.find(n=>n.id===i);if(!e)return null;const t=tn(e);return t.id=ud++,t.name=hd(e.name,this.spines.map(n=>n.name)),t.selectedBone="",t.selectedSlot="",tL(e.id,t.id),this.spines.push(t),this.activeObjectId=t.id,t},selectSceneObject(i,e){if(this.activeObjectType=i,this.activeObjectId=e,i==="particle"){this.activeId=e;const t=this.systems.find(n=>n.id===e);t&&(this.timeline.animation=t.animation)}},removeCollider(i){var t;const e=this.colliders.findIndex(n=>n.id===i);e>=0&&this.colliders.splice(e,1);for(const n of this.systems){const s=fr(n.config);s.collisionColliderIds=s.collisionColliderIds.filter(r=>r!==i)}if(this.activeObjectType==="collision"&&this.activeObjectId===i){const n=this.systems[0];this.activeObjectType=n?"particle":"collision",this.activeObjectId=(n==null?void 0:n.id)??((t=this.colliders[0])==null?void 0:t.id)??0}},removePath(i){var t;const e=this.paths.findIndex(n=>n.id===i);if(e>=0&&this.paths.splice(e,1),this.activeObjectType==="path"&&this.activeObjectId===i){const n=this.systems[0];this.activeObjectType=n?"particle":"path",this.activeObjectId=(n==null?void 0:n.id)??((t=this.paths[0])==null?void 0:t.id)??0}},removeSpine(i){Ec(i);const e=this.spines.findIndex(t=>t.id===i);if(e>=0&&this.spines.splice(e,1),this.activeObjectType==="spine"&&this.activeObjectId===i){const t=this.systems[0],n=this.colliders[0],s=this.paths[0],r=this.spines[0];t?(this.activeObjectType="particle",this.activeObjectId=t.id,this.activeId=t.id):n?(this.activeObjectType="collision",this.activeObjectId=n.id):s?(this.activeObjectType="path",this.activeObjectId=s.id):(this.activeObjectType="spine",this.activeObjectId=(r==null?void 0:r.id)??0)}this.recalcTotalFrames()},play(){const i=this.playbackRange;(this.timeline.frame<i.start||this.timeline.frame>=i.end)&&(this.timeline.frame=i.start),this.timeline.playing=!0},pause(){this.timeline.playing=!1},togglePlay(){this.timeline.playing?this.pause():this.play()},toStart(){this.timeline.frame=this.playbackRange.start},previousFrame(){this.timeline.playing=!1,this.timeline.frame=Math.max(this.playbackRange.start,this.timeline.frame-1)},nextFrame(){this.timeline.playing=!1,this.timeline.frame=Math.min(this.playbackRange.end,this.timeline.frame+1)},toEnd(){this.timeline.playing=!1,this.timeline.frame=this.playbackRange.end},toggleLoop(){this.timeline.loop=!this.timeline.loop},toggleABLoop(){this.timeline.abLoop=!this.timeline.abLoop;const i=this.playbackRange;(this.timeline.frame<i.start||this.timeline.frame>i.end)&&(this.timeline.frame=i.start)},setFrame(i){this.timeline.frame=Math.max(0,Math.min(i,this.timeline.totalFrames-1))},setPlaybackStart(i){const e=fp(!0,i,this.timeline.playbackEnd,this.timeline.totalFrames);this.timeline.playbackStart=e.start,this.timeline.playbackEnd=e.end,this.timeline.abLoop&&this.timeline.frame<e.start&&(this.timeline.frame=e.start)},setPlaybackEnd(i){const e=fp(!0,this.timeline.playbackStart,i,this.timeline.totalFrames);this.timeline.playbackStart=e.start,this.timeline.playbackEnd=e.end,this.timeline.abLoop&&this.timeline.frame>e.end&&(this.timeline.frame=e.end)},recalcTotalFrames(){const i=Math.max(1,this.timeline.fps||30),e=u=>{const h=Math.max(0,Number(u.lifeMin)||0),f=Math.max(0,Number(u.lifeMax)||0);return u.lifeMode==="fixed"?h:Math.max(h,f)},t=new Map(this.systems.map(u=>[u.id,u])),n=new Map,s=new Set,r=u=>{const h=n.get(u.id);if(h!=null)return h;if(s.has(u.id))return 0;s.add(u.id);const f=u.config,p=e(f);let m=p;if(f.eventEnabled)for(const g of f.events||[]){const v=t.get(g.targetSystemId);if(!v||v.id===u.id)continue;const y=r(v),b=g.event==="birth"?0:p,x=Math.max(0,Number(v.config.delay)||0);m=Math.max(m,b+x+y)}return s.delete(u.id),n.set(u.id,m),m},o=ja(this.systems);let a=0;for(const u of this.systems){if(o.has(u.id))continue;const h=u.config,f=Math.max(0,Number(h.delay)||0),p=h.mode==="stream"&&h.streamBehavior==="loop";let m;if(h.mode==="stream"){const g=p?Ji(h,i).total/i:Math.max(1/i,Number(h.duration)||0);if(m=f+g,p){let v=0;if(h.eventEnabled){const y=e(h);for(const b of h.events||[]){const x=t.get(b.targetSystemId);if(!x||x.id===u.id)continue;const T=Math.max(0,Number(x.config.delay)||0);v=Math.max(v,(b.event==="birth"?0:y)+T+r(x))}}m+=v}else m+=r(u)}else m=f+r(u);m>a&&(a=m)}for(const u of this.spines){const h=u.animations.find(p=>p.name===u.selectedAnimation);if(!h)continue;const f=Math.max(0,Number(u.timeOffset)||0)+Math.max(0,h.duration||0);f>a&&(a=f)}for(const u of this.colliders){if(!u.followPath||!u.followPathId)continue;const h=Math.max(0,Number(u.followDuration)||0);h>a&&(a=h)}const c=this.timeline.totalFrames,l=Math.max(2,iC(a,i)+1);this.timeline.totalFrames=l;const d=sL({start:this.timeline.playbackStart,end:this.timeline.playbackEnd},c,l);return this.timeline.playbackStart=d.start,this.timeline.playbackEnd=d.end,this.timeline.frame>=l&&(this.timeline.frame=l-1),l}}});/*!
|
||
* shared v11.4.16
|
||
* (c) 2026 kazuya kawaguchi
|
||
* Released under the MIT License.
|
||
*/const vu=typeof window<"u",ao=(i,e=!1)=>e?Symbol.for(i):Symbol(i),rL=(i,e,t)=>oL({l:i,k:e,s:t}),oL=i=>JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),xn=i=>typeof i=="number"&&isFinite(i),rC=i=>Wg(i)==="[object Date]",Ha=i=>Wg(i)==="[object RegExp]",Gg=i=>Ht(i)&&Object.keys(i).length===0,vn=Object.assign,aL=Object.create,Xt=(i=null)=>aL(i);let wy;const Kr=()=>wy||(wy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Xt()),lL=Object.prototype.hasOwnProperty;function Ni(i,e){return lL.call(i,e)}function Rn(i,e){const t=i[e];return Ni(i,e)?t:void 0}function oC(i){return Ni(Object.prototype,i)}const en=Array.isArray,Qt=i=>typeof i=="function",ze=i=>typeof i=="string",Dt=i=>typeof i=="boolean",It=i=>i!==null&&typeof i=="object",cL=i=>It(i)&&Qt(i.then)&&Qt(i.catch),aC=Object.prototype.toString,Wg=i=>aC.call(i),Ht=i=>Wg(i)==="[object Object]",dL=i=>i==null?"":en(i)||Ht(i)&&i.toString===aC?JSON.stringify(i,null,2):String(i);function qg(i,e=""){return i.reduce((t,n,s)=>s===0?t+n:t+e+n,"")}function uL(i,e){typeof console<"u"&&(console.warn("[intlify] "+i),e&&console.warn(e.stack))}function Sy(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function hL(i){return i.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}const fL=/^javascript:/i,pL=/^(?:href|src|action|formaction)$/i,mL=/&#(?:x([0-9a-f]+)|(\d+));?/gi,gL=/&(?:Tab|NewLine);/g,vL=/:?/gi,bL=/[\u0000-\u0020\u007f-\u009f]/g,yL=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,xL=/(^|[\s"'<>/])on(\w+\s*=)/gi,wL=/(?:^|[\s"'<>/])srcdoc\s*=/i,SL=/(^|[\s"'<>/])s(rcdoc\s*=)/gi,CL=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function AL(i,e,t){const n=e||t;if(!n)return i;const s=Number.parseInt(n,e?16:10);return s<=127?String.fromCharCode(s):i}function Kg(i){const e=i.replace(mL,AL).replace(gL,"").replace(vL,":").replace(bL,"");return fL.test(e)}function TL(i){const e=/url\s*\(/gi;let t="",n=0,s;for(;(s=e.exec(i))!==null;){const r=s.index,o=e.lastIndex-1;let a=o+1,c=1,l=null;for(;a<i.length;a++){const h=i[a];if(l){h===l&&(l=null);continue}if(h==='"'||h==="'")l=h;else if(h==="(")c++;else if(h===")"&&(c--,c===0))break}if(c!==0)break;const d=i.slice(o+1,a).trim(),u=d.startsWith('"')&&d.endsWith('"')||d.startsWith("'")&&d.endsWith("'")?d.slice(1,-1).trim():d;t+=i.slice(n,r),t+=Kg(u)?"url(about:blank)":i.slice(r,a+1),n=a+1}return t+i.slice(n)}function Cy(i,e){if(pL.test(i)&&Kg(e))return"about:blank";const t=i.toLowerCase()==="style"?TL(e):e;return hL(t)}function EL(i){return i=i.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${Cy(t,n)}"`),i=i.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${Cy(t,n)}'`),yL.test(i)&&(i=i.replace(xL,"$1on$2")),wL.test(i)&&(i=i.replace(SL,"$1s$2")),i=i.replace(CL,(e,t,n,s)=>Kg(s)?`${t}${n}about:blank`:e),i}const Ay=i=>!It(i)||en(i);function Nd(i,e){if(Ay(i)||Ay(e)||e===Object.prototype)throw new Error("Invalid value");const t=[{src:i,des:e}];for(;t.length;){const{src:n,des:s}=t.pop();Object.keys(n).forEach(r=>{if(r==="__proto__")return;const o=n[r];if(en(o)){const a=[];a.length=o.length,s[r]=a,t.push({src:o,des:a})}else It(o)?((!It(s[r])||en(s[r]))&&(s[r]=Xt()),t.push({src:o,des:s[r]})):s[r]=o})}}/*!
|
||
* message-compiler v11.4.16
|
||
* (c) 2026 kazuya kawaguchi
|
||
* Released under the MIT License.
|
||
*/function _L(i,e,t){return{line:i,column:e,offset:t}}function Pm(i,e,t){return{start:i,end:e}}const Nt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},ML=17;function vh(i,e,t={}){const{domain:n,messages:s,args:r}=t,o=i,a=new SyntaxError(String(o));return a.code=i,e&&(a.location=e),a.domain=n,a}function PL(i){throw i}const ds=" ",kL="\r",Xn=`
|
||
`,IL="\u2028",RL="\u2029";function FL(i){const e=i;let t=0,n=1,s=1,r=0;const o=S=>e[S]===kL&&e[S+1]===Xn,a=S=>e[S]===Xn,c=S=>e[S]===RL,l=S=>e[S]===IL,d=S=>o(S)||a(S)||c(S)||l(S),u=()=>t,h=()=>n,f=()=>s,p=()=>r,m=S=>o(S)||c(S)||l(S)?Xn:e[S],g=()=>m(t),v=()=>m(t+r);function y(){return r=0,d(t)&&(n++,s=0),o(t)&&t++,t++,s++,e[t]}function b(){return o(t+r)&&r++,r++,e[t+r]}function x(){t=0,n=1,s=1,r=0}function T(S=0){r=S}function E(){const S=t+r;for(;S!==t;)y();r=0}return{index:u,line:h,column:f,peekOffset:p,charAt:m,currentChar:g,currentPeek:v,next:y,peek:b,reset:x,resetPeek:T,skipToPeek:E}}const js=void 0,LL=".",Ty="'",DL="tokenizer";function OL(i,e={}){const t=e.location!==!1,n=FL(i),s=()=>n.index(),r=()=>_L(n.line(),n.column(),n.index()),o=r(),a=s(),c={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},l=()=>c,{onError:d}=e;function u(N,V,W,...ee){const be=l();if(V.column+=W,V.offset+=W,d){const ye=t?Pm(be.startLoc,V):null,he=vh(N,ye,{domain:DL,args:ee});d(he)}}function h(N,V,W){N.endLoc=r(),N.currentType=V;const ee={type:V};return t&&(ee.loc=Pm(N.startLoc,N.endLoc)),W!=null&&(ee.value=W),ee}const f=N=>h(N,13);function p(N,V){return N.currentChar()===V?(N.next(),V):(u(Nt.EXPECTED_TOKEN,r(),0,V),"")}function m(N){let V="";for(;N.currentPeek()===ds||N.currentPeek()===Xn;)V+=N.currentPeek(),N.peek();return V}function g(N){const V=m(N);return N.skipToPeek(),V}function v(N){if(N===js)return!1;const V=N.charCodeAt(0);return V>=97&&V<=122||V>=65&&V<=90||V===95}function y(N){if(N===js)return!1;const V=N.charCodeAt(0);return V>=48&&V<=57}function b(N,V){const{currentType:W}=V;if(W!==2)return!1;m(N);const ee=v(N.currentPeek());return N.resetPeek(),ee}function x(N,V){const{currentType:W}=V;if(W!==2)return!1;m(N);const ee=N.currentPeek()==="-"?N.peek():N.currentPeek(),be=y(ee);return N.resetPeek(),be}function T(N,V){const{currentType:W}=V;if(W!==2)return!1;m(N);const ee=N.currentPeek()===Ty;return N.resetPeek(),ee}function E(N,V){const{currentType:W}=V;if(W!==7)return!1;m(N);const ee=N.currentPeek()===".";return N.resetPeek(),ee}function S(N,V){const{currentType:W}=V;if(W!==8)return!1;m(N);const ee=v(N.currentPeek());return N.resetPeek(),ee}function C(N,V){const{currentType:W}=V;if(!(W===7||W===11))return!1;m(N);const ee=N.currentPeek()===":";return N.resetPeek(),ee}function M(N,V){const{currentType:W}=V;if(W!==9)return!1;const ee=()=>{const ye=N.currentPeek();return ye==="{"?v(N.peek()):ye==="@"||ye==="|"||ye===":"||ye==="."||ye===ds||!ye?!1:ye===Xn?(N.peek(),ee()):P(N,!1)},be=ee();return N.resetPeek(),be}function k(N){m(N);const V=N.currentPeek()==="|";return N.resetPeek(),V}function P(N,V=!0){const W=(be=!1,ye="")=>{const he=N.currentPeek();return he==="{"||he==="@"||!he?be:he==="|"?!(ye===ds||ye===Xn):he===ds?(N.peek(),W(!0,ds)):he===Xn?(N.peek(),W(!0,Xn)):!0},ee=W();return V&&N.resetPeek(),ee}function I(N,V){const W=N.currentChar();return W===js?js:V(W)?(N.next(),W):null}function D(N){const V=N.charCodeAt(0);return V>=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===95||V===36}function $(N){return I(N,D)}function j(N){const V=N.charCodeAt(0);return V>=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===95||V===36||V===45}function B(N){return I(N,j)}function Y(N){const V=N.charCodeAt(0);return V>=48&&V<=57}function U(N){return I(N,Y)}function O(N){const V=N.charCodeAt(0);return V>=48&&V<=57||V>=65&&V<=70||V>=97&&V<=102}function L(N){return I(N,O)}function R(N){let V="",W="";for(;V=U(N);)W+=V;return W}function X(N){let V="";for(;;){const W=N.currentChar();if(W==="\\"){const ee=N.peek();ee==="{"||ee==="}"||ee==="@"||ee==="|"||ee==="\\"?(V+=W+ee,N.next(),N.next()):(N.resetPeek(),V+=W,N.next())}else{if(W==="{"||W==="}"||W==="@"||W==="|"||!W)break;if(W===ds||W===Xn)if(P(N))V+=W,N.next();else{if(k(N))break;V+=W,N.next()}else V+=W,N.next()}}return V}function z(N){g(N);let V="",W="";for(;V=B(N);)W+=V;const ee=N.currentChar();if(ee&&ee!=="}"&&ee!==js&&ee!==ds&&ee!==Xn&&ee!==" "){const be=re(N);return u(Nt.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,W+be),W+be}return N.currentChar()===js&&u(Nt.UNTERMINATED_CLOSING_BRACE,r(),0),W}function K(N){g(N);let V="";return N.currentChar()==="-"?(N.next(),V+=`-${R(N)}`):V+=R(N),N.currentChar()===js&&u(Nt.UNTERMINATED_CLOSING_BRACE,r(),0),V}function Z(N){return N!==Ty&&N!==Xn}function ae(N){g(N),p(N,"'");let V="",W="";for(;V=I(N,Z);)V==="\\"?W+=ce(N):W+=V;const ee=N.currentChar();return ee===Xn||ee===js?(u(Nt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),ee===Xn&&(N.next(),p(N,"'")),W):(p(N,"'"),W)}function ce(N){const V=N.currentChar();switch(V){case"\\":case"'":return N.next(),`\\${V}`;case"u":return ve(N,V,4);case"U":return ve(N,V,6);default:return u(Nt.UNKNOWN_ESCAPE_SEQUENCE,r(),0,V),""}}function ve(N,V,W){p(N,V);let ee="";for(let be=0;be<W;be++){const ye=L(N);if(!ye){u(Nt.INVALID_UNICODE_ESCAPE_SEQUENCE,r(),0,`\\${V}${ee}${N.currentChar()}`);break}ee+=ye}return`\\${V}${ee}`}function we(N){return N!=="{"&&N!=="}"&&N!==ds&&N!==Xn}function re(N){g(N);let V="",W="";for(;V=I(N,we);)W+=V;return W}function Ee(N){let V="",W="";for(;V=$(N);)W+=V;return W}function q(N){const V=W=>{const ee=N.currentChar();return ee==="{"||ee==="@"||ee==="|"||ee==="("||ee===")"||!ee||ee===ds?W:(W+=ee,N.next(),V(W))};return V("")}function J(N){g(N);const V=p(N,"|");return g(N),V}function ie(N,V){let W=null;switch(N.currentChar()){case"{":return V.braceNest>=1&&u(Nt.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),N.next(),W=h(V,2,"{"),g(N),V.braceNest++,W;case"}":return V.braceNest>0&&V.currentType===2&&u(Nt.EMPTY_PLACEHOLDER,r(),0),N.next(),W=h(V,3,"}"),V.braceNest--,V.braceNest>0&&g(N),V.inLinked&&V.braceNest===0&&(V.inLinked=!1),W;case"@":return V.braceNest>0&&u(Nt.UNTERMINATED_CLOSING_BRACE,r(),0),W=se(N,V)||f(V),V.braceNest=0,W;default:{let be=!0,ye=!0,he=!0;if(k(N))return V.braceNest>0&&u(Nt.UNTERMINATED_CLOSING_BRACE,r(),0),W=h(V,1,J(N)),V.braceNest=0,V.inLinked=!1,W;if(V.braceNest>0&&(V.currentType===4||V.currentType===5||V.currentType===6))return u(Nt.UNTERMINATED_CLOSING_BRACE,r(),0),V.braceNest=0,H(N,V);if(be=b(N,V))return W=h(V,4,z(N)),g(N),W;if(ye=x(N,V))return W=h(V,5,K(N)),g(N),W;if(he=T(N,V))return W=h(V,6,ae(N)),g(N),W;if(!be&&!ye&&!he)return W=h(V,12,re(N)),u(Nt.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,W.value),g(N),W;break}}return W}function se(N,V){const{currentType:W}=V;let ee=null;const be=N.currentChar();switch((W===7||W===8||W===11||W===9)&&(be===Xn||be===ds)&&u(Nt.INVALID_LINKED_FORMAT,r(),0),be){case"@":return N.next(),ee=h(V,7,"@"),V.inLinked=!0,ee;case".":return g(N),N.next(),h(V,8,".");case":":return g(N),N.next(),h(V,9,":");default:return k(N)?(ee=h(V,1,J(N)),V.braceNest=0,V.inLinked=!1,ee):E(N,V)||C(N,V)?(g(N),se(N,V)):S(N,V)?(g(N),h(V,11,Ee(N))):M(N,V)?(g(N),be==="{"?ie(N,V)||ee:h(V,10,q(N))):(W===7&&u(Nt.INVALID_LINKED_FORMAT,r(),0),V.braceNest=0,V.inLinked=!1,H(N,V))}}function H(N,V){let W={type:13};if(V.braceNest>0)return ie(N,V)||f(V);if(V.inLinked)return se(N,V)||f(V);switch(N.currentChar()){case"{":return ie(N,V)||f(V);case"}":return u(Nt.UNBALANCED_CLOSING_BRACE,r(),0),N.next(),h(V,3,"}");case"@":return se(N,V)||f(V);default:{if(k(N))return W=h(V,1,J(N)),V.braceNest=0,V.inLinked=!1,W;if(P(N))return h(V,0,X(N));break}}return W}function G(){const{currentType:N,offset:V,startLoc:W,endLoc:ee}=c;return c.lastType=N,c.lastOffset=V,c.lastStartLoc=W,c.lastEndLoc=ee,c.offset=s(),c.startLoc=r(),n.currentChar()===js?h(c,13):H(n,c)}return{nextToken:G,currentOffset:s,currentPosition:r,context:l}}const NL="parser",$L=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,BL=/\\([\\@{}|])/g;function UL(i,e){return e}function VL(i,e,t){switch(i){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(e||t,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function XL(i={}){const e=i.location!==!1,{onError:t}=i;function n(v,y,b,x,...T){const E=v.currentPosition();if(E.offset+=x,E.column+=x,t){const S=e?Pm(b,E):null,C=vh(y,S,{domain:NL,args:T});t(C)}}function s(v,y,b){const x={type:v};return e&&(x.start=y,x.end=y,x.loc={start:b,end:b}),x}function r(v,y,b,x){e&&(v.end=y,v.loc&&(v.loc.end=b))}function o(v,y){const b=v.context(),x=s(3,b.offset,b.startLoc);return x.value=y.replace(BL,UL),r(x,v.currentOffset(),v.currentPosition()),x}function a(v,y){const b=v.context(),{lastOffset:x,lastStartLoc:T}=b,E=s(5,x,T);return E.index=parseInt(y,10),v.nextToken(),r(E,v.currentOffset(),v.currentPosition()),E}function c(v,y){const b=v.context(),{lastOffset:x,lastStartLoc:T}=b,E=s(4,x,T);return E.key=y,v.nextToken(),r(E,v.currentOffset(),v.currentPosition()),E}function l(v,y){const b=v.context(),{lastOffset:x,lastStartLoc:T}=b,E=s(9,x,T);return E.value=y.replace($L,VL),v.nextToken(),r(E,v.currentOffset(),v.currentPosition()),E}function d(v){const y=v.nextToken(),b=v.context(),{lastOffset:x,lastStartLoc:T}=b,E=s(8,x,T);return y.type!==11?(n(v,Nt.UNEXPECTED_EMPTY_LINKED_MODIFIER,b.lastStartLoc,0),E.value="",r(E,x,T),{nextConsumeToken:y,node:E}):(y.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,us(y)),E.value=y.value||"",r(E,v.currentOffset(),v.currentPosition()),{node:E})}function u(v,y){const b=v.context(),x=s(7,b.offset,b.startLoc);return x.value=y,r(x,v.currentOffset(),v.currentPosition()),x}function h(v){const y=v.context(),b=s(6,y.offset,y.startLoc);let x=v.nextToken();if(x.type===8){const T=d(v);b.modifier=T.node,x=T.nextConsumeToken||v.nextToken()}switch(x.type!==9&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(x)),x=v.nextToken(),x.type===2&&(x=v.nextToken()),x.type){case 10:x.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(x)),b.key=u(v,x.value||"");break;case 4:x.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(x)),b.key=c(v,x.value||"");break;case 5:x.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(x)),b.key=a(v,x.value||"");break;case 6:x.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(x)),b.key=l(v,x.value||"");break;default:{n(v,Nt.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const T=v.context(),E=s(7,T.offset,T.startLoc);return E.value="",r(E,T.offset,T.startLoc),b.key=E,r(b,T.offset,T.startLoc),{nextConsumeToken:x,node:b}}}return r(b,v.currentOffset(),v.currentPosition()),{node:b}}function f(v){const y=v.context(),b=y.currentType===1?v.currentOffset():y.offset,x=y.currentType===1?y.endLoc:y.startLoc,T=s(2,b,x);T.items=[];let E=null;do{const M=E||v.nextToken();switch(E=null,M.type){case 0:M.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(M)),T.items.push(o(v,M.value||""));break;case 5:M.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(M)),T.items.push(a(v,M.value||""));break;case 4:M.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(M)),T.items.push(c(v,M.value||""));break;case 6:M.value==null&&n(v,Nt.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,us(M)),T.items.push(l(v,M.value||""));break;case 7:{const k=h(v);T.items.push(k.node),E=k.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const S=y.currentType===1?y.lastOffset:v.currentOffset(),C=y.currentType===1?y.lastEndLoc:v.currentPosition();return r(T,S,C),T}function p(v,y,b,x){const T=v.context();let E=x.items.length===0;const S=s(1,y,b);S.cases=[],S.cases.push(x);do{const C=f(v);E||(E=C.items.length===0),S.cases.push(C)}while(T.currentType!==13);return E&&n(v,Nt.MUST_HAVE_MESSAGES_IN_PLURAL,b,0),r(S,v.currentOffset(),v.currentPosition()),S}function m(v){const y=v.context(),{offset:b,startLoc:x}=y,T=f(v);return y.currentType===13?T:p(v,b,x,T)}function g(v){const y=OL(v,vn({},i)),b=y.context(),x=s(0,b.offset,b.startLoc);return e&&x.loc&&(x.loc.source=v),x.body=m(y),i.onCacheKey&&(x.cacheKey=i.onCacheKey(v)),b.currentType!==13&&n(y,Nt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,v[b.offset]||""),r(x,y.currentOffset(),y.currentPosition()),x}return{parse:g}}function us(i){if(i.type===13)return"EOF";const e=(i.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function YL(i,e={}){const t={ast:i,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function Ey(i,e){for(let t=0;t<i.length;t++)Jg(i[t],e)}function Jg(i,e){switch(i.type){case 1:Ey(i.cases,e),e.helper("plural");break;case 2:Ey(i.items,e);break;case 6:{Jg(i.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function zL(i,e={}){const t=YL(i);t.helper("normalize"),i.body&&Jg(i.body,t);const n=t.context();i.helpers=Array.from(n.helpers)}function jL(i){const e=i.body;return e.type===2?_y(e):e.cases.forEach(t=>_y(t)),i}function _y(i){if(i.items.length===1){const e=i.items[0];(e.type===3||e.type===9)&&(i.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<i.items.length;t++){const n=i.items[t];if(!(n.type===3||n.type===9)||n.value==null)break;e.push(n.value)}if(e.length===i.items.length){i.static=qg(e);for(let t=0;t<i.items.length;t++){const n=i.items[t];(n.type===3||n.type===9)&&delete n.value}}}}function Sa(i){switch(i.t=i.type,i.type){case 0:{const e=i;Sa(e.body),e.b=e.body,delete e.body;break}case 1:{const e=i,t=e.cases;for(let n=0;n<t.length;n++)Sa(t[n]);e.c=t,delete e.cases;break}case 2:{const e=i,t=e.items;for(let n=0;n<t.length;n++)Sa(t[n]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=i;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=i;Sa(e.key),e.k=e.key,delete e.key,e.modifier&&(Sa(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=i;e.i=e.index,delete e.index;break}case 4:{const e=i;e.k=e.key,delete e.key;break}}delete i.type}function HL(i,e){const{filename:t,breakLineCode:n,needIndent:s}=e,r=e.location!==!1,o={filename:t,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:s,indentLevel:0};r&&i.loc&&(o.source=i.loc.source);const a=()=>o;function c(m,g){o.code+=m}function l(m,g=!0){const v=g?n:"";c(s?v+" ".repeat(m):v)}function d(m=!0){const g=++o.indentLevel;m&&l(g)}function u(m=!0){const g=--o.indentLevel;m&&l(g)}function h(){l(o.indentLevel)}return{context:a,push:c,indent:d,deindent:u,newline:h,helper:m=>`_${m}`,needIndent:()=>o.needIndent}}function GL(i,e){const{helper:t}=i;i.push(`${t("linked")}(`),Ga(i,e.key),e.modifier?(i.push(", "),Ga(i,e.modifier),i.push(", _type")):i.push(", undefined, _type"),i.push(")")}function WL(i,e){const{helper:t,needIndent:n}=i;i.push(`${t("normalize")}([`),i.indent(n());const s=e.items.length;for(let r=0;r<s&&(Ga(i,e.items[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}function qL(i,e){const{helper:t,needIndent:n}=i;if(e.cases.length>1){i.push(`${t("plural")}([`),i.indent(n());const s=e.cases.length;for(let r=0;r<s&&(Ga(i,e.cases[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}}function KL(i,e){e.body?Ga(i,e.body):i.push("null")}function Ga(i,e){const{helper:t}=i;switch(e.type){case 0:KL(i,e);break;case 1:qL(i,e);break;case 2:WL(i,e);break;case 6:GL(i,e);break;case 8:i.push(JSON.stringify(e.value),e);break;case 7:i.push(JSON.stringify(e.value),e);break;case 5:i.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:i.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:i.push(JSON.stringify(e.value),e);break;case 3:i.push(JSON.stringify(e.value),e);break}}const JL=(i,e={})=>{const t=ze(e.mode)?e.mode:"normal",n=ze(e.filename)?e.filename:"message.intl";e.sourceMap;const s=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
|
||
`,r=e.needIndent?e.needIndent:t!=="arrow",o=i.helpers||[],a=HL(i,{filename:n,breakLineCode:s,needIndent:r});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(r),o.length>0&&(a.push(`const { ${qg(o.map(d=>`${d}: _${d}`),", ")} } = ctx`),a.newline()),a.push("return "),Ga(a,i),a.deindent(r),a.push("}"),delete i.helpers;const{code:c,map:l}=a.context();return{ast:i,code:c,map:l?l.toJSON():void 0}};function ZL(i,e={}){const t=vn({},e),n=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=XL(t).parse(i);return n?(r&&jL(a),s&&Sa(a),{ast:a,code:""}):(zL(a,t),JL(a,t))}/*!
|
||
* core-base v11.4.16
|
||
* (c) 2026 kazuya kawaguchi
|
||
* Released under the MIT License.
|
||
*/function QL(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Kr().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Kr().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Go(i){return It(i)&&Zg(i)===0&&(Ni(i,"b")||Ni(i,"body"))}const lC=["b","body"];function eD(i){return lo(i,lC)}const cC=["c","cases"];function tD(i){return lo(i,cC,[])}const dC=["s","static"];function nD(i){return lo(i,dC)}const uC=["i","items"];function iD(i){return lo(i,uC,[])}const hC=["t","type"];function Zg(i){return lo(i,hC)}const fC=["v","value"];function fd(i,e){const t=lo(i,fC);if(t!=null)return t;throw cc(e)}const pC=["m","modifier"];function sD(i){return lo(i,pC)}const mC=["k","key"];function rD(i){const e=lo(i,mC);if(e)return e;throw cc(6)}function lo(i,e,t){for(let n=0;n<e.length;n++){const s=e[n];if(Ni(i,s)&&i[s]!=null)return i[s]}return t}const gC=[...lC,...cC,...dC,...uC,...mC,...pC,...fC,...hC];function cc(i){return new Error(`unhandled node type: ${i}`)}function pp(i){return t=>oD(t,i)}function oD(i,e){const t=eD(e);if(t==null)throw cc(0);if(Zg(t)===1){const r=tD(t);return i.plural(r.reduce((o,a)=>[...o,My(i,a)],[]))}else return My(i,t)}function My(i,e){const t=nD(e);if(t!=null)return i.type==="text"?t:i.normalize([t]);{const n=iD(e).reduce((s,r)=>[...s,km(i,r)],[]);return i.normalize(n)}}function km(i,e){const t=Zg(e);switch(t){case 3:return fd(e,t);case 9:return fd(e,t);case 4:{const n=e;if(Ni(n,"k")&&n.k)return i.interpolate(i.named(n.k));if(Ni(n,"key")&&n.key)return i.interpolate(i.named(n.key));throw cc(t)}case 5:{const n=e;if(Ni(n,"i")&&xn(n.i))return i.interpolate(i.list(n.i));if(Ni(n,"index")&&xn(n.index))return i.interpolate(i.list(n.index));throw cc(t)}case 6:{const n=e,s=sD(n),r=rD(n);return i.linked(km(i,r),s?km(i,s):void 0,i.type)}case 7:return fd(e,t);case 8:return fd(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const aD=i=>i;let pd=Xt();function lD(i,e={}){let t=!1;const n=e.onError||PL;return e.onError=s=>{t=!0,n(s)},{...ZL(i,e),detectError:t}}function cD(i,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ze(i)){Dt(e.warnHtmlMessage)&&e.warnHtmlMessage;const n=(e.onCacheKey||aD)(i),s=pd[n];if(s)return s;const{ast:r,detectError:o}=lD(i,{...e,location:!1,jit:!0}),a=pp(r);return o?a:pd[n]=a}else{if(!Go(i))return(()=>i);const t=i.cacheKey;if(t){const n=pd[t];return n||(pd[t]=pp(i))}else return pp(i)}}let dc=null;function dD(i){dc=i}function uD(i,e,t){dc&&dc.emit("i18n:init",{timestamp:Date.now(),i18n:i,version:e,meta:t})}const hD=fD("function:translate");function fD(i){return e=>dc&&dc.emit(i,e)}const sr={INVALID_ARGUMENT:ML,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},pD=24;function rr(i){return vh(i,null,void 0)}function Qg(i,e){return e.locale!=null?Py(e.locale):Py(i.locale)}let mp;function Py(i){if(ze(i))return i;if(Qt(i)){if(i.resolvedOnce&&mp!=null)return mp;if(i.constructor.name==="Function"){const e=i();if(cL(e))throw rr(sr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return mp=e}else throw rr(sr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw rr(sr.NOT_SUPPORT_LOCALE_TYPE)}function mD(i,e,t){return[...new Set([t,...en(e)?e:It(e)?Object.keys(e).filter(n=>n!=="default"):ze(e)?[e]:[t]])]}function gD(i,e,t){const n=ze(t)?t:uc,s=i;let r;It(e)?(s.__localeChainObjectCache||(s.__localeChainObjectCache=new WeakMap),r=s.__localeChainObjectCache.get(e),r||(r=new Map,s.__localeChainObjectCache.set(e,r))):(s.__localeChainCache||(s.__localeChainCache=new Map),r=s.__localeChainCache.get(e),r||(r=new Map,s.__localeChainCache.set(e,r)));const o=r.get(n);if(o)return o;const a=[];let c=[t];for(;en(c);)c=ky(a,c,e);const l=en(e)||!Ht(e)?e:e.default?e.default:null;return c=ze(l)?[l]:l,en(c)&&ky(a,c,!1),r.set(n,a),a}function ky(i,e,t){let n=!0;for(let s=0;s<e.length&&Dt(n);s++){const r=e[s];ze(r)&&(n=vD(i,e[s],t))}return n}function vD(i,e,t){let n;const s=e.split("-");do{const r=s.join("-");n=bD(i,r,t),s.splice(-1,1)}while(s.length&&n===!0);return n}function bD(i,e,t){let n=!1;if(!i.includes(e)&&(n=!0,e)){n=e[e.length-1]!=="!";const s=e.replace(/!/g,"");i.push(s),(en(t)||Ht(t))&&t[s]&&(n=t[s])}return n}const co=[];co[0]={w:[0],i:[3,0],"[":[4],o:[7]};co[1]={w:[1],".":[2],"[":[4],o:[7]};co[2]={w:[2],i:[3,0],0:[3,0]};co[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};co[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};co[5]={"'":[4,0],o:8,l:[5,0]};co[6]={'"':[4,0],o:8,l:[6,0]};const yD=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function xD(i){return yD.test(i)}function wD(i){const e=i.charCodeAt(0),t=i.charCodeAt(i.length-1);return e===t&&(e===34||e===39)?i.slice(1,-1):i}function SD(i){if(i==null)return"o";switch(i.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return i;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function CD(i){const e=i.trim();return i.charAt(0)==="0"&&isNaN(parseInt(i))?!1:xD(e)?wD(e):"*"+e}function AD(i){const e=[];let t=-1,n=0,s=0,r,o,a,c,l,d,u;const h=[];h[0]=()=>{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),s++},h[3]=()=>{if(s>0)s--,n=4,h[0]();else{if(s=0,o===void 0||(o=CD(o),o===!1))return!1;h[1]()}};function f(){const p=i[t+1];if(n===5&&p==="'"||n===6&&p==='"')return t++,a="\\"+p,h[0](),!0}for(;n!==null;)if(t++,r=i[t],!(r==="\\"&&f())){if(c=SD(r),u=co[n],l=u[c]||u.l||8,l===8||(n=l[0],l[1]!==void 0&&(d=h[l[1]],d&&(a=r,d()===!1))))return;if(n===7)return e}}const Iy=new Map;function TD(i,e){return It(i)?Rn(i,e):null}function ED(i,e){if(!It(i))return null;let t=Iy.get(e);if(t||(t=AD(e),t&&Iy.set(e,t)),!t)return null;const n=t.length;let s=i,r=0;for(;r<n;){const o=t[r];if(gC.includes(o)&&Go(s)||!It(s)||!Ni(s,o))return null;const a=s[o];if(a===void 0||Qt(s))return null;s=a,r++}return s}const _D="11.4.16",bh=-1,uc="en-US",bu="",Ry=i=>`${i.charAt(0).toLocaleUpperCase()}${i.substr(1)}`;function MD(){return{upper:(i,e)=>e==="text"&&ze(i)?i.toUpperCase():e==="vnode"&&It(i)&&"__v_isVNode"in i?i.children.toUpperCase():i,lower:(i,e)=>e==="text"&&ze(i)?i.toLowerCase():e==="vnode"&&It(i)&&"__v_isVNode"in i?i.children.toLowerCase():i,capitalize:(i,e)=>e==="text"&&ze(i)?Ry(i):e==="vnode"&&It(i)&&"__v_isVNode"in i?Ry(i.children):i}}let vC;function PD(i){vC=i}let bC;function kD(i){bC=i}let yC;function ID(i){yC=i}let xC=null;const RD=i=>{xC=i},FD=()=>xC;let wC=null;const Fy=i=>{wC=i},LD=()=>wC;let Ly=0;function DD(i={}){const e=Qt(i.onWarn)?i.onWarn:uL,t=ze(i.version)?i.version:_D,n=ze(i.locale)||Qt(i.locale)?i.locale:uc,s=Qt(n)?uc:n,r=en(i.fallbackLocale)||Ht(i.fallbackLocale)||ze(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:s,o=Ht(i.messages)?i.messages:gp(s),a=Ht(i.datetimeFormats)?i.datetimeFormats:gp(s),c=Ht(i.numberFormats)?i.numberFormats:gp(s),l=vn(Xt(),i.modifiers,MD()),d=i.pluralRules||Xt(),u=Qt(i.missing)?i.missing:null,h=Dt(i.missingWarn)||Ha(i.missingWarn)?i.missingWarn:!0,f=Dt(i.fallbackWarn)||Ha(i.fallbackWarn)?i.fallbackWarn:!0,p=!!i.fallbackFormat,m=!!i.unresolving,g=Qt(i.postTranslation)?i.postTranslation:null,v=Ht(i.processor)?i.processor:null,y=Dt(i.warnHtmlMessage)?i.warnHtmlMessage:!0,b=!!i.escapeParameter,x=Qt(i.messageCompiler)?i.messageCompiler:vC,T=Qt(i.messageResolver)?i.messageResolver:bC||TD,E=Qt(i.localeFallbacker)?i.localeFallbacker:yC||mD,S=It(i.fallbackContext)?i.fallbackContext:void 0,C=i,M=It(C.__datetimeFormatters)?C.__datetimeFormatters:new Map,k=It(C.__numberFormatters)?C.__numberFormatters:new Map,P=It(C.__meta)?C.__meta:{};Ly++;const I={version:t,cid:Ly,locale:n,fallbackLocale:r,messages:o,modifiers:l,pluralRules:d,missing:u,missingWarn:h,fallbackWarn:f,fallbackFormat:p,unresolving:m,postTranslation:g,processor:v,warnHtmlMessage:y,escapeParameter:b,messageCompiler:x,messageResolver:T,localeFallbacker:E,fallbackContext:S,onWarn:e,__meta:P};return I.datetimeFormats=a,I.numberFormats=c,I.__datetimeFormatters=M,I.__numberFormatters=k,__INTLIFY_PROD_DEVTOOLS__&&uD(I,t,P),I}const gp=i=>({[i]:Xt()});function SC(i,e,t,n,s){const{missing:r,onWarn:o}=i;if(r!==null){const a=r(i,t,e,s);return ze(a)?a:e}else return e}function Dy(i,e){var n,s;const t=i;It(e)?(n=t.__localeChainObjectCache)==null||n.delete(e):(s=t.__localeChainCache)==null||s.delete(e)}function md(i,e,t){Dy(i,t),i.fallbackContext&&Dy(i.fallbackContext,t),i.localeFallbacker(i,t,e)}function OD(i,e){return i===e?!1:i.split("-")[0]===e.split("-")[0]}function ND(i,e){const t=e.indexOf(i);if(t===-1)return!1;for(let n=t+1;n<e.length;n++)if(OD(i,e[n]))return!0;return!1}function CC(i,e,t,n,s,r,o){const{fallbackLocale:a,localeFallbacker:c,onWarn:l}=i,d=c(i,a,t);for(let u=0;u<d.length;u++){const h=d[u],f=Rn(Rn(n,h)||{},e);if(Ht(f)&&ze(h))return h;SC(i,e,h,s,o)}return null}function AC(i,e,t){let n=`${i}__${e}`;return Ht(t)&&!Gg(t)&&(n=`${n}__${JSON.stringify(t)}`),n}function TC(i,e,t){for(const n in t){const s=`${e}__${n}`;for(const r of i.keys())(r===s||r.startsWith(`${s}__`))&&i.delete(r)}}function EC(i,e,t,n){const[,s,r,o]=i;let a=t;return ze(s)?e.key=s:Ht(s)&&Object.keys(s).forEach(c=>{n.includes(c)?a[c]=s[c]:e[c]=s[c]}),ze(r)?e.locale=r:Ht(r)&&(a=r),Ht(o)&&(a=o),a}function Oy(i,...e){const{datetimeFormats:t,unresolving:n,onWarn:s}=i,{__datetimeFormatters:r}=i;if(!ze(e[0])&&!rC(e[0])&&!xn(e[0]))return bu;const[o,a,c,l]=Im(...e),d=Dt(c.missingWarn)?c.missingWarn:i.missingWarn,u=Dt(c.fallbackWarn)?c.fallbackWarn:i.fallbackWarn,h=!!c.part,f=Qg(i,c);if(!ze(o)||o===""){const y=new Intl.DateTimeFormat(f.replace(/!/g,""),l);return h?y.formatToParts(a):y.format(a)}const p=CC(i,o,f,t,d,u,"datetime format");if(!ze(p))return n?bh:o;const m=t[p][o],g=AC(p,o,l);let v=r.get(g);return v||(v=new Intl.DateTimeFormat(p,vn({},m,l)),r.set(g,v)),h?v.formatToParts(a):v.format(a)}const _C=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Im(...i){const[e]=i,t=Xt(),n=Xt();let s;if(ze(e)){const o=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!o)throw rr(sr.INVALID_ISO_DATE_ARGUMENT);const a=o[3]?o[3].trim().startsWith("T")?`${o[1].trim()}${o[3].trim()}`:`${o[1].trim()}T${o[3].trim()}`:o[1].trim();s=new Date(a);try{s.toISOString()}catch{throw rr(sr.INVALID_ISO_DATE_ARGUMENT)}}else if(rC(e)){if(isNaN(e.getTime()))throw rr(sr.INVALID_DATE_ARGUMENT);s=e}else if(xn(e))s=e;else throw rr(sr.INVALID_ARGUMENT);const r=EC(i,t,n,_C);return[t.key||"",s,t,r]}function Ny(i,e,t){TC(i.__datetimeFormatters,e,t)}function $y(i,...e){const{numberFormats:t,unresolving:n,onWarn:s}=i,{__numberFormatters:r}=i;if(!xn(e[0]))return bu;const[o,a,c,l]=Rm(...e),d=Dt(c.missingWarn)?c.missingWarn:i.missingWarn,u=Dt(c.fallbackWarn)?c.fallbackWarn:i.fallbackWarn,h=!!c.part,f=Qg(i,c);if(!ze(o)||o===""){const y=new Intl.NumberFormat(f.replace(/!/g,""),l);return h?y.formatToParts(a):y.format(a)}const p=CC(i,o,f,t,d,u,"number format");if(!ze(p))return n?bh:o;const m=t[p][o],g=AC(p,o,l);let v=r.get(g);return v||(v=new Intl.NumberFormat(p,vn({},m,l)),r.set(g,v)),h?v.formatToParts(a):v.format(a)}const MC=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Rm(...i){const[e]=i,t=Xt(),n=Xt();if(!xn(e))throw rr(sr.INVALID_ARGUMENT);const s=e,r=EC(i,t,n,MC);return[t.key||"",s,t,r]}function By(i,e,t){TC(i.__numberFormatters,e,t)}const $D=i=>i,BD=i=>"",UD="text",VD=i=>i.length===0?"":qg(i),XD=dL;function vp(i,e){return i=Math.abs(i),e===2?i===1?0:1:Math.min(i,2)}function YD(i){var t,n;const e=xn(i.pluralIndex)?i.pluralIndex:-1;return xn((t=i.named)==null?void 0:t.count)?i.named.count:xn((n=i.named)==null?void 0:n.n)?i.named.n:e}function zD(i={}){var y,b,x;const e=i.locale,t=YD(i),n=ze(e)&&i.pluralRules&&Qt(Rn(i.pluralRules,e))?i.pluralRules[e]:vp,s=n===vp?void 0:vp,r=T=>T[n(t,T.length,s)],o=i.list||[],a=T=>o[T],c=i.named||Xt(),l=xn(i.pluralIndex),d=T=>{const E=oC(T)?Rn(c,T):c[T];return l&&!E&&(T==="count"||T==="n")?i.pluralIndex:E};function u(T,E){const S=Qt(i.messages)?i.messages(T,!!E):It(i.messages)?i.messages[T]:!1;return S||(i.parent?i.parent.message(T):BD)}const h=T=>i.modifiers?Rn(i.modifiers,T):$D,f=Qt((y=i.processor)==null?void 0:y.normalize)?i.processor.normalize:VD,p=Qt((b=i.processor)==null?void 0:b.interpolate)?i.processor.interpolate:XD,m=ze((x=i.processor)==null?void 0:x.type)?i.processor.type:UD,v={list:a,named:d,plural:r,linked:(T,...E)=>{const[S,C]=E;let M="text",k="";E.length===1?It(S)?(k=S.modifier||k,M=S.type||M):ze(S)&&(k=S||k):E.length===2&&(ze(S)&&(k=S||k),ze(C)&&(M=C||M));const P=u(T,!0)(v),I=P===""||P===void 0?T:P,D=M==="vnode"&&en(I)&&k?I[0]:I;if(!k)return D;const $=h(k);return Qt($)?$(D,M):D},message:u,type:m,interpolate:p,normalize:f,values:vn(Xt(),o,c,l?{count:d("count"),n:d("n")}:{})};return v}const Uy=()=>"",or=i=>Qt(i),yu=i=>ze(i)||Go(i)||or(i);function Vy(i,...e){const{fallbackFormat:t,postTranslation:n,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=i,[c,l]=Fm(...e),d=Dt(l.missingWarn)?l.missingWarn:i.missingWarn,u=Dt(l.fallbackWarn)?l.fallbackWarn:i.fallbackWarn,h=Dt(l.escapeParameter)?l.escapeParameter:i.escapeParameter,f=!!l.resolvedMessage,p=ze(l.default)||Dt(l.default)?Dt(l.default)?r?c:()=>c:l.default:t?r?c:()=>c:null,m=t||p!=null&&(ze(p)||Qt(p)),g=Qg(i,l);h&&jD(l);let[v,y,b]=f?[c,g,Rn(a,g)||Xt()]:PC(i,c,g,o,u,d),x=v,T=c;if(!f&&!yu(x)&&m&&(x=p,T=x),!f&&(!yu(x)||!ze(y)))return s?bh:c;let E=!1;const S=()=>{E=!0},C=or(x)?x:kC(i,c,y,x,T,S);if(E)return x;const M=WD(i,y,b,l),k=zD(M),P=HD(i,C,k);let I=n?n(P,c):P;if(h&&ze(I)&&(I=EL(I)),__INTLIFY_PROD_DEVTOOLS__){const D={timestamp:Date.now(),key:ze(c)?c:or(x)?x.key:"",locale:y||(or(x)?x.locale:""),format:ze(x)?x:or(x)?x.source:"",message:I};D.meta=vn({},i.__meta,FD()||{}),hD(D)}return I}function jD(i){if(en(i.list)&&(i.list=i.list.map(e=>ze(e)?Sy(e):e)),It(i.named)){const e=i.named,t=Xt();for(const n of Object.keys(e)){const s=e[n];t[n]=ze(s)?Sy(s):s}i.named=t}}function PC(i,e,t,n,s,r){const{messages:o,onWarn:a,messageResolver:c,localeFallbacker:l}=i,d=l(i,n,t);let u=Xt(),h,f=null;const p="translate";for(let m=0;m<d.length&&(h=d[m],u=Rn(o,h)||Xt(),(f=c(u,e))===null&&(f=Rn(u,e)),!yu(f));m++)if(!ND(h,d)){const g=SC(i,e,h,r,p);g!==e&&(f=g)}return[f,h,u]}function kC(i,e,t,n,s,r){const{messageCompiler:o,warnHtmlMessage:a}=i;if(or(n)){const l=n;return l.locale=l.locale||t,l.key=l.key||e,l}if(o==null){const l=(()=>n);return l.locale=t,l.key=e,l}const c=o(n,GD(i,t,s,n,a,r));return c.locale=t,c.key=e,c.source=n,c}function HD(i,e,t){return e(t)}function Fm(...i){const[e,t,n]=i,s=Xt();if(!ze(e)&&!xn(e)&&!or(e)&&!Go(e))throw rr(sr.INVALID_ARGUMENT);const r=xn(e)?String(e):(or(e),e);return xn(t)?s.plural=t:ze(t)?s.default=t:Ht(t)&&!Gg(t)?s.named=t:en(t)&&(s.list=t),xn(n)?s.plural=n:ze(n)?s.default=n:Ht(n)&&vn(s,n),[r,s]}function GD(i,e,t,n,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{throw r&&r(o),o},onCacheKey:o=>rL(e,t,o)}}function WD(i,e,t,n){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:c,missingWarn:l,fallbackContext:d}=i,h={locale:e,modifiers:s,pluralRules:r,messages:(f,p)=>{let m=o(t,f);if(m==null&&(d||p)){const[g,,v]=PC(d||i,f,e,a,c,l);m=g??o(v,f)}if(ze(m)||Go(m)){let g=!1;const y=kC(i,f,e,m,f,()=>{g=!0});return g?Uy:y}else return or(m)?m:Uy}};return i.processor&&(h.processor=i.processor),n.list&&(h.list=n.list),n.named&&(h.named=n.named),xn(n.plural)&&(h.pluralIndex=n.plural),h}QL();/*!
|
||
* vue-i18n v11.4.16
|
||
* (c) 2026 kazuya kawaguchi
|
||
* Released under the MIT License.
|
||
*/const qD="11.4.16";function KD(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Kr().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Kr().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Kr().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Kr().__INTLIFY_PROD_DEVTOOLS__=!1)}const li={UNEXPECTED_RETURN_TYPE:pD,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function pi(i,...e){return vh(i,null,void 0)}const Lm=ao("__translateVNode"),Dm=ao("__datetimeParts"),Om=ao("__numberParts"),IC=ao("__setPluralRules"),RC=ao("__injectWithOption"),Aa=ao("__dispose");let FC=null;{const i=Kr().__VUE_INSTANCE_SETTERS__;en(i)&&i.push(e=>{FC=e})}function Br(i){return!!oC(i)}function hc(i){if(!It(i)||Go(i))return i;for(const e in i)if(Ni(i,e))if(!e.includes("."))It(i[e])&&hc(i[e]);else{const t=e.split("."),n=t.length-1;let s=i,r=!1;for(let a=0;a<n;a++){if(t[a]==="__proto__")throw new Error(`unsafe key: ${t[a]}`);if(t[a]in s||(s[t[a]]=Xt()),!It(s[t[a]])){r=!0;break}if(Go(s[t[a]])&&(gC.includes(t[a+1])||t[a+1]==="cacheKey")){r=!0;break}s=s[t[a]]}r||(s[t[n]]=i[e],delete i[e]);const o=s[t[n]];It(o)&&hc(o)}return i}function ev(i,e){const{messages:t,__i18n:n,messageResolver:s,flatJson:r}=e,o=Ht(t)?t:en(n)?Xt():{[i]:Xt()};if(en(n)&&n.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:c,resource:l}=a;if(c){if(Br(c))return;o[c]=Rn(o,c)||Xt(),Nd(l,o[c])}else Nd(l,o)}else ze(a)&&Nd(JSON.parse(a),o)}),s==null&&r)for(const a in o)Ni(o,a)&&hc(o[a]);return o}function LC(i){return i.type}function DC(i,e,t){let n=It(e.messages)?e.messages:Xt();"__i18nGlobal"in t&&(n=ev(i.locale.value,{messages:n,__i18n:t.__i18nGlobal}));const s=Object.keys(n);s.length&&s.forEach(r=>{i.mergeLocaleMessage(r,n[r])});{if(It(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{i.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(It(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{i.mergeNumberFormat(o,e.numberFormats[o])})}}}function Xy(i){return Ce(wc,null,i,0)}function fc(){return FC??ih()}const Yy="__INTLIFY_META__",zy=()=>[],JD=()=>!1;let jy=0;function Hy(i){return((e,t,n,s)=>i(t,n,fc()||void 0,s))}const ZD=()=>{const i=fc();let e=null;return i&&(e=LC(i)[Yy])?{[Yy]:e}:null};function xu(i={}){const{__root:e,__injectWithOption:t}=i,n=e===void 0,s=i.flatJson,r=vu?Re:h_;let o=Dt(i.inheritLocale)?i.inheritLocale:!0;const a=r(e&&o?e.locale.value:ze(i.locale)?i.locale:uc),c=r(e&&o?e.fallbackLocale.value:ze(i.fallbackLocale)||en(i.fallbackLocale)||Ht(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:a.value),l=r(ev(a.value,i)),d=r(Ht(i.datetimeFormats)?i.datetimeFormats:{[a.value]:{}}),u=r(Ht(i.numberFormats)?i.numberFormats:{[a.value]:{}});let h=e?e.missingWarn:Dt(i.missingWarn)||Ha(i.missingWarn)?i.missingWarn:!0,f=e?e.fallbackWarn:Dt(i.fallbackWarn)||Ha(i.fallbackWarn)?i.fallbackWarn:!0,p=e?e.fallbackRoot:Dt(i.fallbackRoot)?i.fallbackRoot:!0,m=!!i.fallbackFormat,g=Qt(i.missing)?i.missing:null,v=Qt(i.missing)?Hy(i.missing):null,y=Qt(i.postTranslation)?i.postTranslation:null,b=e?e.warnHtmlMessage:Dt(i.warnHtmlMessage)?i.warnHtmlMessage:!0,x=!!i.escapeParameter;const T=e?e.modifiers:Ht(i.modifiers)?i.modifiers:{};let E=i.pluralRules||e&&e.pluralRules,S;S=(()=>{n&&Fy(null);const de={version:qD,locale:a.value,fallbackLocale:c.value,messages:l.value,modifiers:T,pluralRules:E,missing:v===null?void 0:v,missingWarn:h,fallbackWarn:f,fallbackFormat:m,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:b,escapeParameter:x,messageResolver:i.messageResolver,messageCompiler:i.messageCompiler,__meta:{framework:"vue"}};de.datetimeFormats=d.value,de.numberFormats=u.value;const ge=DD(de);return n&&Fy(ge),ge})(),md(S,a.value,c.value);function M(){return[a.value,c.value,l.value,d.value,u.value]}const k=Fe({get:()=>a.value,set:de=>{S.locale=de,a.value=de}});function P(de){n||(S.fallbackContext=LD());try{return de()}finally{n||(S.fallbackContext=void 0)}}function I(de){P(()=>md(S,a.value,de))}const D=Fe({get:()=>c.value,set:de=>{c.value=de,S.fallbackLocale=c.value,I(c.value)}}),$=Fe(()=>l.value),j=Fe(()=>d.value),B=Fe(()=>u.value);function Y(){return Qt(y)?y:null}function U(de){y=de,S.postTranslation=de}function O(){return g}function L(de){de!==null&&(v=Hy(de)),g=de,S.missing=v}const R=(de,ge,Ve,qe,bt,ft)=>{M();let Oe;try{__INTLIFY_PROD_DEVTOOLS__,Oe=P(()=>de(S))}finally{__INTLIFY_PROD_DEVTOOLS__}if(Ve!=="translate exists"&&xn(Oe)&&Oe===bh||Ve==="translate exists"&&!Oe){const[ot,Te]=ge();return e&&p?qe(e):bt(ot)}else{if(ft(Oe))return Oe;throw pi(li.UNEXPECTED_RETURN_TYPE)}};function X(...de){return R(ge=>Reflect.apply(Vy,null,[ge,...de]),()=>Fm(...de),"translate",ge=>Reflect.apply(ge.t,ge,[...de]),ge=>ge,ge=>ze(ge))}function z(...de){const[ge,Ve,qe]=de;if(qe&&!It(qe))throw pi(li.INVALID_ARGUMENT);return X(ge,Ve,vn({resolvedMessage:!0},qe||{}))}function K(...de){return R(ge=>Reflect.apply(Oy,null,[ge,...de]),()=>Im(...de),"datetime format",ge=>Reflect.apply(ge.d,ge,[...de]),()=>bu,ge=>ze(ge)||en(ge))}function Z(...de){return R(ge=>Reflect.apply($y,null,[ge,...de]),()=>Rm(...de),"number format",ge=>Reflect.apply(ge.n,ge,[...de]),()=>bu,ge=>ze(ge)||en(ge))}function ae(de){return de.map(ge=>ze(ge)||xn(ge)||Dt(ge)?Xy(String(ge)):ge)}const ve={normalize:ae,interpolate:de=>de,type:"vnode"};function we(...de){return R(ge=>{let Ve;const qe=ge;try{qe.processor=ve,Ve=Reflect.apply(Vy,null,[qe,...de])}finally{qe.processor=null}return Ve},()=>Fm(...de),"translate",ge=>ge[Lm](...de),ge=>[Xy(ge)],ge=>en(ge))}function re(...de){return R(ge=>Reflect.apply($y,null,[ge,...de]),()=>Rm(...de),"number format",ge=>ge[Om](...de),zy,ge=>ze(ge)||en(ge))}function Ee(...de){return R(ge=>Reflect.apply(Oy,null,[ge,...de]),()=>Im(...de),"datetime format",ge=>ge[Dm](...de),zy,ge=>ze(ge)||en(ge))}function q(de){E=de,S.pluralRules=E}function J(de,ge){const Ve=G(de),qe=S.messageResolver(Ve,ge);return qe===null?Rn(Ve,ge):qe}function ie(de,ge){return R(()=>{if(!de)return!1;const Ve=ze(ge)?ge:a.value,qe=ze(ge)?[Ve]:S.localeFallbacker(S,c.value,Ve);for(let bt=0;bt<qe.length;bt++)if(yu(J(qe[bt],de)))return!0;return!1},()=>[de],"translate exists",Ve=>Reflect.apply(Ve.te,Ve,[de,ge]),JD,Ve=>Dt(Ve))}function se(de){let ge=null;const Ve=S.localeFallbacker(S,c.value,a.value);for(let qe=0;qe<Ve.length;qe++){const bt=J(Ve[qe],de);if(bt!=null){ge=bt;break}}return ge}function H(de){const ge=se(de);return ge??(e?e.tm(de)||{}:{})}function G(de){return Rn(l.value,de)||{}}function N(de,ge){Br(de)||(s&&hc(ge),l.value[de]=ge,S.messages=l.value)}function V(de,ge){Br(de)||(l.value[de]=Rn(l.value,de)||{},s&&hc(ge),Nd(ge,l.value[de]),S.messages=l.value)}function W(de){return Rn(d.value,de)||{}}function ee(de,ge){Br(de)||(d.value[de]=ge,S.datetimeFormats=d.value,Ny(S,de,ge))}function be(de,ge){Br(de)||(d.value[de]=vn(Rn(d.value,de)||{},ge),S.datetimeFormats=d.value,Ny(S,de,ge))}function ye(de){return Rn(u.value,de)||{}}function he(de,ge){Br(de)||(u.value[de]=ge,S.numberFormats=u.value,By(S,de,ge))}function Be(de,ge){Br(de)||(u.value[de]=vn(Rn(u.value,de)||{},ge),S.numberFormats=u.value,By(S,de,ge))}jy++,Vt(c,()=>I(c.value),{deep:!0,flush:"sync"}),e&&vu&&(Vt(e.locale,de=>{o&&(a.value=de,S.locale=de,md(S,a.value,c.value))}),Vt(e.fallbackLocale,de=>{o&&(c.value=de,S.fallbackLocale=c.value,md(S,a.value,c.value))}));const Ae={id:jy,locale:k,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(de){o=de,de&&e&&(k.value=e.locale.value,D.value=e.fallbackLocale.value)},get availableLocales(){return Object.keys(l.value).sort()},messages:$,get modifiers(){return T},get pluralRules(){return E||{}},get isGlobal(){return n},get missingWarn(){return h},set missingWarn(de){h=de,S.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(de){f=de,S.fallbackWarn=f},get fallbackRoot(){return p},set fallbackRoot(de){p=de},get fallbackFormat(){return m},set fallbackFormat(de){m=de,S.fallbackFormat=m},get warnHtmlMessage(){return b},set warnHtmlMessage(de){b=de,S.warnHtmlMessage=de},get escapeParameter(){return x},set escapeParameter(de){x=de,S.escapeParameter=de},t:X,getLocaleMessage:G,setLocaleMessage:N,mergeLocaleMessage:V,getPostTranslationHandler:Y,setPostTranslationHandler:U,getMissingHandler:O,setMissingHandler:L,[IC]:q};return Ae.datetimeFormats=j,Ae.numberFormats=B,Ae.rt=z,Ae.te=ie,Ae.tm=H,Ae.d=K,Ae.n=Z,Ae.getDateTimeFormat=W,Ae.setDateTimeFormat=ee,Ae.mergeDateTimeFormat=be,Ae.getNumberFormat=ye,Ae.setNumberFormat=he,Ae.mergeNumberFormat=Be,Ae[RC]=t,Ae[Lm]=we,Ae[Dm]=Ee,Ae[Om]=re,Ae}function QD(i){const e=ze(i.locale)?i.locale:uc,t=ze(i.fallbackLocale)||en(i.fallbackLocale)||Ht(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:e,n=Qt(i.missing)?i.missing:void 0,s=Dt(i.silentTranslationWarn)||Ha(i.silentTranslationWarn)?!i.silentTranslationWarn:!0,r=Dt(i.silentFallbackWarn)||Ha(i.silentFallbackWarn)?!i.silentFallbackWarn:!0,o=Dt(i.fallbackRoot)?i.fallbackRoot:!0,a=!!i.formatFallbackMessages,c=Ht(i.modifiers)?i.modifiers:{},l=i.pluralizationRules,d=Qt(i.postTranslation)?i.postTranslation:void 0,u=ze(i.warnHtmlInMessage)?i.warnHtmlInMessage!=="off":!0,h=!!i.escapeParameterHtml,f=Dt(i.sync)?i.sync:!0;let p=i.messages;if(Ht(i.sharedMessages)){const T=i.sharedMessages;p=Object.keys(T).reduce((S,C)=>{if(Br(C))return S;const M=Rn(S,C)||(S[C]={});return vn(M,T[C]),S},p||{})}const{__i18n:m,__root:g,__injectWithOption:v}=i,y=i.datetimeFormats,b=i.numberFormats,x=i.flatJson;return{locale:e,fallbackLocale:t,messages:p,flatJson:x,datetimeFormats:y,numberFormats:b,missing:n,missingWarn:s,fallbackWarn:r,fallbackRoot:o,fallbackFormat:a,modifiers:c,pluralRules:l,postTranslation:d,warnHtmlMessage:u,escapeParameter:h,messageResolver:i.messageResolver,inheritLocale:f,__i18n:m,__root:g,__injectWithOption:v}}function Nm(i={}){const e=xu(QD(i)),{__extender:t}=i,n={id:e.id,get locale(){return e.locale.value},set locale(s){e.locale.value=s},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(s){e.fallbackLocale.value=s},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(s){e.setMissingHandler(s)},get silentTranslationWarn(){return Dt(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(s){e.missingWarn=Dt(s)?!s:s},get silentFallbackWarn(){return Dt(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(s){e.fallbackWarn=Dt(s)?!s:s},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(s){e.fallbackFormat=s},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(s){e.setPostTranslationHandler(s)},get sync(){return e.inheritLocale},set sync(s){e.inheritLocale=s},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){e.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(s){e.escapeParameter=s},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...s){return Reflect.apply(e.t,e,[...s])},rt(...s){return Reflect.apply(e.rt,e,[...s])},te(s,r){return e.te(s,r)},tm(s){return e.tm(s)},getLocaleMessage(s){return e.getLocaleMessage(s)},setLocaleMessage(s,r){e.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){e.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(e.d,e,[...s])},getDateTimeFormat(s){return e.getDateTimeFormat(s)},setDateTimeFormat(s,r){e.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){e.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(e.n,e,[...s])},getNumberFormat(s){return e.getNumberFormat(s)},setNumberFormat(s,r){e.setNumberFormat(s,r)},mergeNumberFormat(s,r){e.mergeNumberFormat(s,r)}};return n.__extender=t,n}function eO(i,e,t){return{beforeCreate(){const n=fc();if(!n)throw pi(li.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=vn({},s.i18n);if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=e,this===this.$root)this.$i18n=Gy(i,r);else{r.__injectWithOption=!0,r.__extender=t.__vueI18nExtend,this.$i18n=Nm(r);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=Gy(i,s);else{this.$i18n=Nm({__i18n:s.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:e});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=i;s.__i18nGlobal&&DC(e,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$te=(r,o)=>this.$i18n.te(r,o),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),t.__setInstance(n,this.$i18n)},mounted(){},unmounted(){const n=fc();if(!n)throw pi(li.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s!=null&&s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),t.__deleteInstance(n),delete this.$i18n)}}}function Gy(i,e){i.locale=e.locale||i.locale,i.fallbackLocale=e.fallbackLocale||i.fallbackLocale,i.missing=e.missing||i.missing,i.silentTranslationWarn=e.silentTranslationWarn||i.silentFallbackWarn,i.silentFallbackWarn=e.silentFallbackWarn||i.silentFallbackWarn,i.formatFallbackMessages=e.formatFallbackMessages||i.formatFallbackMessages,i.postTranslation=e.postTranslation||i.postTranslation,i.warnHtmlInMessage=e.warnHtmlInMessage||i.warnHtmlInMessage,i.escapeParameterHtml=e.escapeParameterHtml||i.escapeParameterHtml,i.sync=e.sync||i.sync,i.__composer[IC](e.pluralizationRules||i.pluralizationRules);const t=ev(i.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(t).forEach(n=>i.mergeLocaleMessage(n,t[n])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(n=>i.mergeDateTimeFormat(n,e.datetimeFormats[n])),e.numberFormats&&Object.keys(e.numberFormats).forEach(n=>i.mergeNumberFormat(n,e.numberFormats[n])),i}const tv={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:i=>i==="parent"||i==="global",default:"parent"},i18n:{type:Object}};function tO({slots:i},e){return e.length===1&&e[0]==="default"?(i.default?i.default():[]).reduce((n,s)=>[...n,...s.type===_e?s.children:[s]],[]):e.reduce((t,n)=>{const s=i[n];return s&&(t[n]=s()),t},Xt())}function OC(){return _e}const nO=Zt({name:"i18n-t",props:vn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:i=>xn(i)||!isNaN(i)}},tv),setup(i,e){const{slots:t,attrs:n}=e,s=i.i18n||mi({useScope:i.scope,__useComponent:!0});return()=>{const r=()=>{const c=Object.keys(t).filter(u=>u[0]!=="_"),l=Xt();i.locale&&(l.locale=i.locale),i.plural!==void 0&&(l.plural=ze(i.plural)?+i.plural:i.plural);const d=tO(e,c);return s[Lm](i.keypath,d,l)},o=vn(Xt(),n),a=ze(i.tag)||It(i.tag)?i.tag:OC();return It(a)?nc(a,o,{default:r}):nc(a,o,r())}}}),Wy=nO;function iO(i){return en(i)&&!ze(i[0])}function NC(i,e,t,n){const{slots:s,attrs:r}=e;return()=>{const o=()=>{const l={part:!0};let d=Xt();i.locale&&(l.locale=i.locale),ze(i.format)?l.key=i.format:It(i.format)&&(ze(i.format.key)&&(l.key=i.format.key),d=Object.keys(i.format).reduce((f,p)=>t.includes(p)?vn(Xt(),f,{[p]:i.format[p]}):f,Xt()));const u=n(i.value,l,d);let h=[l.key];return en(u)?h=u.map((f,p)=>{const m=s[f.type],g=m?m({[f.type]:f.value,index:p,parts:u}):[f.value];return iO(g)&&(g[0].key=`${f.type}-${p}`),g}):ze(u)&&(h=[u]),h},a=vn(Xt(),r),c=ze(i.tag)||It(i.tag)?i.tag:OC();return It(c)?nc(c,a,{default:o}):nc(c,a,o())}}const sO=Zt({name:"i18n-n",props:vn({value:{type:Number,required:!0},format:{type:[String,Object]}},tv),setup(i,e){const t=i.i18n||mi({useScope:i.scope,__useComponent:!0});return NC(i,e,MC,(...n)=>t[Om](...n))}}),qy=sO;function rO(i,e){const t=i;if(i.mode==="composition")return t.__getInstance(e)||i.global;{const n=t.__getInstance(e);return n!=null?n.__composer:i.global.__composer}}function oO(i){const e=o=>{const{instance:a,value:c}=o;if(!a||!a.$)throw pi(li.UNEXPECTED_ERROR);const l=rO(i,a.$),d=Ky(c);return[Reflect.apply(l.t,l,[...Jy(d)]),l]};return{created:(o,a)=>{const[c,l]=e(a);vu&&(o.__i18nWatcher=Vt(l.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=l,o.textContent=c},unmounted:o=>{vu&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const c=o.__composer,l=Ky(a);o.textContent=Reflect.apply(c.t,c,[...Jy(l)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function Ky(i){if(ze(i))return{path:i};if(Ht(i)){if(!("path"in i))throw pi(li.REQUIRED_VALUE,"path");return i}else throw pi(li.INVALID_VALUE)}function Jy(i){const{path:e,locale:t,args:n,choice:s,plural:r}=i,o={},a=n||{};return ze(t)&&(o.locale=t),xn(s)&&(o.plural=s),xn(r)&&(o.plural=r),[e,a,o]}function aO(i,e,...t){const n=Ht(t[0])?t[0]:{};(Dt(n.globalInstall)?n.globalInstall:!0)&&([Wy.name,"I18nT"].forEach(r=>i.component(r,Wy)),[qy.name,"I18nN"].forEach(r=>i.component(r,qy)),[ex.name,"I18nD"].forEach(r=>i.component(r,ex))),i.directive("t",oO(e))}const lO=ao("global-vue-i18n");function cO(i={}){const e=__VUE_I18N_LEGACY_API__&&Dt(i.legacy)?i.legacy:__VUE_I18N_LEGACY_API__,t=Dt(i.globalInjection)?i.globalInjection:!0,n=new Map,[s,r]=dO(i,e),o=ao("");function a(u){return n.get(u)||null}function c(u,h){n.set(u,h)}function l(u){n.delete(u)}const d={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(u,...h){if(u.__VUE_I18N_SYMBOL__=o,u.provide(u.__VUE_I18N_SYMBOL__,d),Ht(h[0])){const m=h[0];d.__composerExtend=m.__composerExtend,d.__vueI18nExtend=m.__vueI18nExtend}let f=null;!e&&t&&(f=vO(u,d.global)),__VUE_I18N_FULL_INSTALL__&&aO(u,d,...h),__VUE_I18N_LEGACY_API__&&e&&u.mixin(eO(r,r.__composer,d));const p=u.unmount;u.unmount=()=>{f&&f(),d.dispose(),p()}},get global(){return r},dispose(){s.stop()},__instances:n,__getInstance:a,__setInstance:c,__deleteInstance:l};return d}function mi(i={}){const e=fc();if(e==null)throw pi(li.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw pi(li.NOT_INSTALLED);const t=uO(e),n=fO(t),s=LC(e),r=hO(i,s);if(r==="global")return DC(n,i,s),n;if(r==="parent"){let c=Zy(t,e,i.__useComponent);return c==null&&(c=n),c}if(r==="isolated"){if(t.mode!=="composition")throw pi(li.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const c=t,l=vn({},i),d=Zy(t,e);l.__root=d||n;const u=xu(l);return c.__composerExtend&&(u[Aa]=c.__composerExtend(u)),yg()&&h1(()=>{const f=u[Aa];f&&(f(),delete u[Aa])}),u}const o=t;let a=o.__getInstance(e);if(a==null){const c=vn({},i);"__i18n"in s&&(c.__i18n=s.__i18n),n&&(c.__root=n),a=xu(c),o.__composerExtend&&(a[Aa]=o.__composerExtend(a)),mO(o,e,a),o.__setInstance(e,a)}return a}function dO(i,e){const t=bg(),n=__VUE_I18N_LEGACY_API__&&e?t.run(()=>Nm(i)):t.run(()=>xu(i));if(n==null)throw pi(li.UNEXPECTED_ERROR);return[t,n]}function uO(i){const e=No(i.isCE?lO:i.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw pi(i.isCE?li.NOT_INSTALLED_WITH_PROVIDE:li.UNEXPECTED_ERROR);return e}function hO(i,e){return Gg(i)?"__i18n"in e?"local":"global":i.useScope?i.useScope:"local"}function fO(i){return i.mode==="composition"?i.global:i.global.__composer}function Zy(i,e,t=!1){let n=null;const s=e.root;let r=pO(e,t);for(;r!=null;){const o=i;if(i.mode==="composition")n=o.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(r);a!=null&&(n=a.__composer,t&&n&&!n[RC]&&(n=null))}if(n!=null||s===r)break;r=r.parent}return n}function pO(i,e=!1){return i==null?null:e&&i.vnode.ctx||i.parent}function mO(i,e,t){Ti(()=>{},e),nl(()=>{const n=t;i.__deleteInstance(e);const s=n[Aa];s&&(s(),delete n[Aa])},e)}const gO=["locale","fallbackLocale","availableLocales"],Qy=["t","rt","d","n","tm","te"];function vO(i,e){const t=Object.create(null);return gO.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw pi(li.UNEXPECTED_ERROR);const o=Jt(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),i.config.globalProperties.$i18n=t,Qy.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw pi(li.UNEXPECTED_ERROR);Object.defineProperty(i.config.globalProperties,`$${s}`,r)}),()=>{delete i.config.globalProperties.$i18n,Qy.forEach(s=>{delete i.config.globalProperties[`$${s}`]})}}const bO=Zt({name:"i18n-d",props:vn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},tv),setup(i,e){const t=i.i18n||mi({useScope:i.scope,__useComponent:!0});return NC(i,e,_C,(...n)=>t[Dm](...n))}}),ex=bO;KD();PD(cD);kD(ED);ID(gD);if(__INTLIFY_PROD_DEVTOOLS__){const i=Kr();i.__INTLIFY__=!0,dD(i.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const yO={resizeTimeline:"Ziehen Sie, um die Höhe der Zeitleiste anzupassen",systems:"System",particlesBones:"Partikel (Knochen)",rootBone:"Wurzelknochen",hudTip:"Radzoom · Klicken Sie mit der linken Maustaste, um die Leinwand zu ziehen",title:"Spine-Partikeleditor - Yeomai"},xO={close:"Schließen",collapse:"Einklappen",reset:"Zurücksetzen",add:"Hinzufügen",remove:"Entfernen",delete:"Löschen",clear:"Leeren",cancel:"Abbrechen",confirm:"Bestätigen",none:"Keine",enabled:"Aktiviert",disabled:"Deaktiviert",fixed:"Fest",random:"Zufällig",curve:"Kurve",followExport:"Exporteinstellung folgen",linear:"Linear",bezier:"Bézier",above:"Über",below:"Unter",left:"Links",right:"Rechts",seconds:"s",frames:"Frames"},wO={settings:"Einstellungen",undo:"Rückgängig (Ctrl+Z)",pan:"Canvas verschieben (Q)",translate:"Verschieben (W)",rotate:"Drehen (E)",scale:"Skalieren (R)",zoomIn:"Vergrößern",zoomOut:"Verkleinern",fitView:"An Canvas anpassen",toggleGrid:"Raster umschalten",resetView:"Ansicht zurücksetzen",background:"Hintergrund",backgroundSettings:"Hintergrundeinstellungen",changeBackground:"Bild ersetzen",uploadBackground:"Bild hochladen",clearBackground:"Hintergrund löschen",noBackground:"Kein Bild",backgroundX:"X-Versatz des Hintergrundbilds",backgroundY:"Y-Versatz des Hintergrundbilds",backgroundOpacity:"Transparenz des Hintergrundbilds",opacity:"Deckkraft",help:"Hilfe",openHelp:"Hilfe öffnen"},SO={title:"Systemeinstellungen",layout:"Schnittstellenlayout",floatingMenu:"Schwebendes Menü",floatingMenuParticleOnly:"Wähle zuerst ein Partikelsystem",parameterPanelPosition:"Position des Parameterfelds",panelOnRight:"Das Parameterfeld wird rechts angezeigt",history:"Operationsgeschichte",maxUndo:"Maximale Anzahl Schritte zurück",canvasGuides:"Hilfsdisplay aus Leinwand",emitter:"Startpunkt",bones:"Knochenverbindung",bonePointSize:"Größe der Knochenpunktzeichnung",boneAxisSize:"Zeichnungsgröße der Achse",skinMesh:"enthäutetes Netz",enableTicks:"Häkchen aktivieren",tickFontSize:"Textgröße skalieren",tickWidth:"Dicke der Teilstriche",axisColor:"Achsenfarbe",showAxisLabels:"Skalenwert anzeigen",unsavedPrompt:"Warnung bei ungespeicherten Änderungen",showProjectSize:"Speicherplatz der Konfigurationen anzeigen",cacheNote:"Die gesamten Systemeinstellungen werden automatisch im aktuellen Browser gespeichert"},CO={title:"Konfiguration",save:"Konfiguration speichern",saveTitle:"Konfiguration im Browser-Cache speichern",load:"Konfiguration laden",loadTitle:"Lokale Editorkonfiguration laden",presets:"Voreinstellungsliste",selectPreset:"Voreinstellung wählen",noPresets:"Keine Voreinstellungen",saved:"Die Konfiguration wurde lokal gespeichert",loading:"Konfiguration wird geladen…",loaded:"Geladen: {name}",presetLoading:"Voreinstellungen werden geladen…",presetLoaded:"Voreinstellung geladen: {name}",presetNamingError:"{message}, bitte überprüfen Sie die Standarddateibenennung",presetTransferTitle:"Voreinstellung laden",presetDownloading:"{file} wird heruntergeladen…",presetParsing:"Standardkonfiguration wird analysiert...",presetRestoring:"Standardressourcen werden analysiert und wiederhergestellt...",presetComplete:"Das Laden der Voreinstellungen ist abgeschlossen",presetListError:"Voreinstellungsliste kann nicht gelesen werden",presetReadError:"Voreinstellung konnte nicht gelesen werden: {file}",local:{listTitle:"Konfigurationsliste",empty:"Keine Konfigurationen in diesem Browser gespeichert",saveTitle:"Konfiguration im Browser-Cache speichern",name:"Konfigurationsname",namePlaceholder:"Zum Beispiel: Feuerwerkseffekt",load:"Laden",loadHint:"Doppelklicken zum Laden",download:"Herunterladen",delete:"Löschen",downloadCurrent:"Aktuelle Konfiguration herunterladen",downloadAll:"Alle Konfigurationen herunterladen",loadAll:"Alle Konfigurationen laden",loadAllConfirm:"{count} Konfigurationsdateien importieren? Gleichnamige Konfigurationen werden überschrieben.",loadAllDone:"{count} Konfigurationen aus Dateien geladen",loadAllPartial:"{imported} Konfigurationen importiert; {failed} Dateien fehlgeschlagen",overwriteSave:"„{name}“ existiert bereits. Überschreiben?",loadOverwrite:"Beim Laden von „{name}“ wird die aktuelle Szene ersetzt und ungespeicherte Änderungen gehen verloren. Fortfahren?",deleteConfirm:"„{name}“ löschen?",nameRequired:"Geben Sie einen Konfigurationsnamen ein",nameInvalid:'Der Name darf \\ / : * ? " < > | nicht enthalten',storageUnavailable:"Der lokale Browserspeicher ist nicht verfügbar",saved:"Im Browser gespeichert: {name}",loaded:"Aus dem Browser geladen: {name}",deleted:"Browserkonfiguration gelöscht: {name}",downloadEmpty:"Keine Konfigurationen zum Herunterladen",downloaded:"Heruntergeladen: {name}"}},AO={bezierHint:"Ziehen Sie den quadratischen Griff, um den Bogen anzupassen. · Doppelklicken Sie auf eine leere Stelle, um einen neuen zu erstellen. · Doppelklicken Sie auf einen Knoten, um ihn zu löschen",linearHint:"Doppelklicken Sie auf eine leere Stelle, um eine neue zu erstellen. Doppelklicken Sie auf einen Knoten, um ihn zu löschen. Ziehen Sie einen Knoten, um ihn anzupassen.",resetTitle:"Standardkurve wiederherstellen"},TO={addTitle:"Doppelklicken Sie auf das Menüband, um eine Farbmarkierung hinzuzufügen",color:"Farbcode",colorValue:"Farbwert der Farbskala",position:"Position der Farbmarkierung",addMiddle:"Fügen Sie Farbe in der Mitte hinzu",delete:"Aktuelles Farbfeld löschen",hint:"Doppelklicken Sie auf das Farbband, um ein neues hinzuzufügen. · Ziehen Sie die Farbmarkierung, um ihre Position anzupassen. · Doppelklicken Sie auf die Farbmarkierung, um sie zu löschen"},EO={angleOffset:"Winkelversatz",value:"Zahlenwert",lower:"untere Grenze",upper:"Obergrenze",rangeLower:"Untere Bereichsgrenze",rangeUpper:"Oberer Bereich",curveInput:"Kurveneingabe →",direction:"Startrichtung"},_O={title:"Drehpunkt der Karte",zoomOut:"herauszoomen",zoomIn:"vergrößern",expand:"Zoomen Sie auf Vollbildbetrieb",interaction:"Klicken/Ziehen mit der linken Maustaste, um den Drehpunkt festzulegen · Rechtsklick zum Ziehen der Leinwand · Scrollrad zum Zoomen",previewAlt:"Pivot-Punkt-Vorschau",noImage:"Kein Bild ausgewählt",resetCenter:"Neupositionierung in der Mitte (50 %, 50 %)",coordinates:"Achspunktkoordinaten (%)",rotationTest:"Achsenrotationstest",static:"Trotzdem",spin:"Drehung",swing:"Swing",rotationAlt:"Rotationstest",topLeft:"oben links",top:"Ganz oben",topRight:"oben rechts",left:"Rechts links",center:"Mitte",right:"Rechts",bottomLeft:"unten links",bottom:"Direkt unten",bottomRight:"unten rechts"},MO={chooseSequence:"Wählen Sie Sequenzrahmenbilder aus",chooseLocal:"Lokales Bild auswählen",subfolder:"Unterordner",name:"Name",restore:"Stellen Sie {name} wieder her",deleteResource:"Bildressourcen löschen",imageMode:"Bildmodus",fixed:"Einzelbild",sequence:"Sequenz",playbackMode:"Wiedergabemodus",onceHide:"Einmal, am Ende ausblenden",onceHold:"Einmal, letztes Bild halten",loopForward:"Vorwärts-Schleife",loopReverse:"Rückwärts-Schleife",playbackFps:"Bildrate der Wiedergabe",chooseSequenceMulti:"Sequenzbilder auswählen (Mehrfachauswahl)",weight:"Gewicht %",unlockWeight:"Proportionssperre entsperren",lockWeight:"Sperren Sie das aktuelle Verhältnis",pivot:"Textur-Pivot",collapsePivot:"Einstellung des Drehpunkts einklappen",expandPivot:"Erweitern Sie die Drehpunktanpassung",pivotModal:"Texturrotationsachsenpunkt, große Bildverfeinerung",pivotModalDesc:"Klicken oder ziehen Sie irgendwo auf der Karte unten, um das Rotations-/Schwingzentrum der Partikel genau festzulegen.",pivotZoomHint:"Unterstützt 100 % ~ 400 % Vergrößerung, präzises Zielen auf die Spitze oder Wurzel:",confirmPivot:"Drehpunkt ermitteln und speichern",noSequence:"Kein Sequenzbild ausgewählt",firstFrame:"Rahmen 1",firstImage:"erstes Bild",lastImage:"letztes Bild",pivotOn:"Geöffnet: X {x}% | Y {y}%",pivotOff:"Nicht aktiviert, die Standardeinstellung liegt etwa in der Bildmitte (50 %, 50 %).",pivotCustom:"Der Drehpunkt wurde angepasst: X {x}% | Y {y}%",frameCountOne:"1 Rahmen · {name}",frameCountMany:"Rahmen {count} · {first} → {last}",sequenceSelected:"Der Frame {count} wurde ausgewählt und in der Reihenfolge {first}-{last} abgespielt"},PO={play:"Spielen(D)",pause:"Pause (D)",toStart:"Gehe zurück zum ersten Frame (S)",previous:"vorherigen Frame",next:"nächsten Frame",toEnd:"Zum letzten Bild wechseln",continuousLoop:"Dauerhaft in Schleife abspielen",abLoop:"Unabhängige A/B-Bereichsschleife",abLoopShort:"AB-Schleife",abRange:"AB Zyklusintervall",playbackStart:"Benutzerdefiniertes Startbild für die Wiedergabe",playbackEnd:"Benutzerdefiniertes Wiedergabe-Endbild",startFrame:"Startbild abspielen",endFrame:"Endbild abspielen",frame:"rahmen",emission:"Emission",particleLife:"Aktive Partikel",spineAnimation:"Spine-Animation",ownerAnimation:"Zugehörige Animation",setOwnerAnimation:"Legen Sie die Animation fest, zu der das aktuelle Partikelsystem gehört",chooseOwnerAnimation:"Wählen Sie die Animation aus",animationName:"Animationsname",renameAnimation:"Aktuelle Animation umbenennen",rename:"Umbenennen",newAnimation:"+ Neu",keepOneAnimation:"Mindestens eine Animation muss beibehalten werden",spinePreview:"Spine Vorschauanimation",noSpineAnimation:"Keine Spine-Animation verfügbar",none:"keiner",systemName:"System {index}",dragLoopDuration:"Dauer des Drag-Loop-Segments",dragEmissionDuration:"Drag-Dauer",dragSpineStart:"Ziehen Sie, um die Startzeit der Animation anzupassen",noAnimationData:"Derzeit sind keine Animationsdaten zum Anzeigen vorhanden.",animationNameEmpty:"Der Animationsname darf nicht leer sein",animationNameDuplicate:"Animationsnamen können nicht wiederholt werden",animationRenameFailed:"Der Animationsname kann nicht geändert werden",zoomIn:"vergrößern",zoomOut:"herauszoomen",zoomFit:"Mäßig",frameStatus:"Frame {current} / {total}"},kO={title:"Emissionsmodus",reset:"Sendemodusparameter zurücksetzen",stream:"Kontinuierlich",burst:"Burst",normalStream:"Normaler Stream",loopStream:"Loop-Stream",rate:"Emissionsrate",duration:"Emissionsdauer",loopDuration:"Startdauer (f)",generateStart:"Generieren Sie eine Startschleifenanimation",generateEnd:"Generieren Sie eine Endloop-Animation",customDuration:"Dauer angeben",auto:"Automatisch {frames}f",startLoopDuration:"Dauer des Schleifensegments starten",endLoopDuration:"Dauer des Endschleifensegments",loopWarning:"Der Schleifenpersistenzmodus unterstützt keine Knochenverfolgung und Pfadverfolgung; Die Partikelverfolgungseinstellungen werden beim Betreten oder Verlassen auf die Standardwerte zurückgesetzt.",burstCount:"Menge pro Burst",delay:"Verzögerung",shapeTitle:"Emitterform",shapeReset:"Setzen Sie die Parameter der Emitterform zurück",shape:"Form",point:"Punkt",circle:"Kreis",rect:"Rechteck",cone:"Kegel",path:"Pfad",innerDiameter:"Innendurchmesser",outerDiameter:"Außendurchmesser",innerRadius:"Innenradius",outerRadius:"Außenradius",coneDirection:"Kegelausrichtung",coneAngle:"Konischer Öffnungswinkel",innerWidth:"Innenweite",innerHeight:"Hoch drinnen",outerWidth:"Außenbreite",outerHeight:"Extra hoch",selectPath:"Pfad auswählen",noPath:"Kein Pfad (Punktemission)",birthDistribution:"Geburtenverteilung",evenDistribution:"Gleichmäßige feste Verteilung",randomDistribution:"Zufallsverteilung",emissionAngle:"Startwinkel",radial:"Radial (Mitte nach außen)",pathNormal:"senkrecht zum Pfad",pathTangent:"entlang der Wegrichtung",fixedAngle:"fester Winkel",baseAngle:"Basiswinkel",randomRange:"zufälliger Bereich",showShape:"Form zeigen"},IO={title:"Partikeleigenschaften",reset:"Partikelattributparameter zurücksetzen",initialParams:"Initialwerte",initialLife:"anfänglicher Lebenszyklus",randomSample:"Zufallsauswahl →",initialSpeed:"Anfangsgeschwindigkeit",initialScale:"anfängliche Skalierung",uniform:"vereinheitlicht",separateXY:"XY-Trennung",scaleX:"Zoom X",scaleY:"Zoom Y",initialRotation:"anfängliche Rotation",lifecycleTitle:"Änderung über die Lebensdauer",speedOverLife:"Lebenszyklusgeschwindigkeit",speedMultiplier:"Geschwindigkeitsmultiplikator",lifeTo:"Lebenszyklus →",scaleOverLife:"Skalierung während des Lebenszyklus",scaleMultiplier:"Zoomverhältnis",multiplierX:"Vergrößerung",multiplierY:"Vergrößerung Y",rotationOverLife:"Während des Lebenszyklus rotieren",rotationSpeed:"Rotationsgeschwindigkeit"},RO={title:"Aussehen und Ressourcen",reset:"Aussehen und Ressourcenparameter zurücksetzen",opacity:"Deckkraft",curveMode:"Kurvenmodus",transparent:"0 (transparent)",opaque:"1 (undurchsichtig)",renderLayer:"Renderebene (Spine-Slot)",top:"oberstes Niveau",spineSlot:"Spine-Steckplatz",selectSpine:"Bitte wählen Sie Spine aus",noSpine:"Nicht verfügbar Spine",noSlot:"Noch kein Slot ausgewählt",reselect:"Neu auswählen",selectSlot:"Steckplatz auswählen",searchSlots:"Nach Steckplatz- oder Zubehörnamen suchen…",searchSlotsAria:"Suchplätze",emptySlot:"Leerer Steckplatz",noMatchingSlots:"Kein passender Steckplatz",above:"oben auf diesem Slot-Bild",below:"unter diesem Slot-Bild",followAttachment:"Ein- und Ausblenden mit Slot-Zubehör",previewOnly:"Das Anpassen der Anzeigeebene wirkt sich nur auf die Editor-Vorschau aus und hat keinen Einfluss auf die exportierten Daten.",imageResources:"Bildressourcen",addImage:"Bildressourcen hinzufügen",scale:"Zoom",color:"Farbe",fixedColor:"feste Farbe",randomColor:"zufällige Farbe",lifetime:"Lebenszyklus",normal:"Normal",add:"Addieren",multiply:"Multiplizieren",screen:"Bildschirm",fixedColorValue:"fester Farbwert",randomColorHint:"Jedes Teilchen wählt bei seiner Geburt zufällig eine Farbe aus dem Band aus und bleibt während seines Lebenszyklus unverändert.",independentAlpha:"Unabhängige Deckkraft",off:"Aus"},FO={slotLabelAbove:"{spine} / {slot} · Bild oben",slotLabelBelow:"{spine} / {slot} · Unter dem Bild",resolvedAbove:"Über dem {slot}-Bild und unter seinem Slot gerendert",resolvedBetween:"Gerendert zwischen {previous} und {slot}",warningNoSpine:"Es ist kein Spine geladen und die Partikel werden vorübergehend oben angezeigt.",warningNoSelection:"Spine wurde noch nicht ausgewählt und die Partikel werden vorübergehend oben angezeigt.",warningMissingSpine:"Das Ziel Spine existiert nicht und die Partikel werden vorübergehend oben angezeigt.",warningNotReady:"Das Ziel Spine ist nicht bereit und die Partikel werden vorübergehend oben angezeigt.",warningMissingSlot:"Der Zielplatz existiert nicht (die Ressource wurde möglicherweise ersetzt) und die Partikel werden vorübergehend oben angezeigt.",warningFirstSlot:"Dies ist der erste Slot und kann nicht darunter angezeigt werden, die Partikel werden vorübergehend oben angezeigt."},LO={completed:"Vollendet",failed:"Der Vorgang ist fehlgeschlagen"},DO={title:"Szenenobjekte",addParticle:"Partikelsystem hinzufügen",addParticleShort:"+Teilchen",addCollider:"Collider hinzufügen",addColliderShort:"+Kollision",addPath:"Pfad hinzufügen",addPathShort:"+ Pfad",addSpine:"Fügen Sie Spine hinzu",copyTitle:"Kopieren Sie das aktuell ausgewählte Szenenobjekt",showParticle:"Partikelsystem anzeigen",hideParticle:"Partikelsystem ausblenden",showCollider:"Collider anzeigen",hideCollider:"Collider ausblenden",showPath:"Pfad anzeigen",hidePath:"Pfad ausblenden",showSpine:"Anzeige Spine",hideSpine:"Spine ausblenden",particle:"Partikel",subEmitter:"Sub-Emitter",collision:"Kollision",path:"Pfad",deleteParticle:"Partikelsystem löschen",deleteCollider:"Collider löschen",deletePath:"Pfad löschen",deleteSpine:"Löschen Sie Spine",empty:"Es sind noch keine Objekte in der Szene vorhanden",name:"Name",positionX:"X-Position",positionY:"Y-Position",offsetX:"X-Versatz",offsetY:"Y-Versatz",rotation:"Drehung",scaleX:"X-Skalierung",scaleY:"Y-Skalierung",seed:"Zufallsseed",seedTitle:"Steuern Sie alle Zufallsattribute, die Ressourcenauswahl und die Zufallsstichprobe von Modifikatoren im Partikelsystem",randomizeSeed:"Generieren Sie einen neuen globalen Zufallsstartwert",seedHint:"Steuern Sie die anfänglichen Zufallsparameter, die Ressourcenauswahl und die Modifikator-Zufallsstichprobe. Der gleiche Samen kann den gleichen Effekt hervorrufen",colliderTitle:"Collider-Eigenschaften",colliderName:"Collider-Name",type:"Typ",circle:"runden",ellipse:"Oval",rect:"Rechteck",polygon:"Polygon",custom:"Anpassen",enabled:"aktivieren",xPosition:"X-Position",yPosition:"Y-Position",scaleXShort:"X-Skalierung",scaleYShort:"Y-Skalierung",radius:"Radius",radiusX:"X-Radius",radiusY:"Y-Radius",width:"Breite",height:"hoch",sides:"Anzahl der Seiten",collisionResponse:"Crash-Reaktion",physics:"Physik (Sprung/Reibung)",pause:"Pause (Stopp)",destroy:"Verschwinden (sofort zerstören)",elasticity:"Elastizität (0-1)",friction:"Reibung (0-1)",followPath:"Folgen Sie dem Weg",targetPath:"Zielpfad",notSelected:"(nicht ausgewählt)",moveDuration:"Bewegungsdauer (Sekunden)",followDirection:"Richtung entlang des Pfades",moveProgressCurve:"Bewegliche Fortschrittskurve",moveProgressHelp:"Horizontale Achse: Echtzeit/Bewegungsdauer; vertikale Achse: Pfadfortschritt (0=Startpunkt → 1=Endpunkt)",pathTitle:"Pfadattribut",pathName:"Pfadname",closedPath:"geschlossener Weg",pathColor:"Pfadfarbe",pathHelp:"Bedienungsanleitung:",pathHelpItems:"Doppelklicken Sie auf den leeren Bereich/die leere Kurve: Erstellen Sie einen neuen Ankerpunkt, doppelklicken Sie auf den Ankerpunkt: löschen Sie den Knoten, doppelklicken Sie ein zweites Mal und ziehen Sie: erstellen Sie einen neuen und ziehen Sie den Griff heraus, ziehen Sie den Ankerpunkt, um die Position zu verschieben, ziehen Sie den Griff, um die Kurve anzupassen, Umschalt + Ziehgriff: vollständig symmetrisch auf beiden Seiten, Alt + Ziehgriff: unabhängige Steuerung einer Seite, Ctrl + Klick/Rahmenauswahl: ausgewählte Knoten hinzufügen, Alt+Klick/Rahmenauswahl: ausgewählte Knoten subtrahieren Knoten, Alt+Klick in den leeren Bereich: Löschen Sie alle Auswahlen, wählen Sie mehrere Knoten aus und ziehen Sie sie als Ganzes",applyPresetShape:"Wenden Sie eine voreingestellte Form an",choosePreset:"Wählen Sie eine Voreinstellung...",square:"Quadrat",star:"Sternform",applyPreset:"Voreinstellung anwenden",clearAnchors:"klarer Ankerpunkt",panelHint:"Verwenden Sie die Schaltfläche in der oberen rechten Ecke, um ein Szenenobjekt zu erstellen"},OO={title:"Modifikatoren",reset:"Modifikatorparameter zurücksetzen",damping:"Dämpfung",enableNoise:"Bewegungsrauschen aktivieren",strength:"Stärke",noiseRange:"Schwankungsbreite",noiseSpeed:"Zeitliche Durchflussrate",noiseHint:"Intensitätssteuerung beeinflusst den Anteil · Schwankungsbereich steuert die maximale Abweichung · Zeitfluss steuert die Änderungsgeschwindigkeit",enableGravity:"Schwerkraft aktivieren",gravityStrength:"Schwerkraftstärke",strengthMin:"Stärke min",strengthMax:"Stärke max",direction:"Richtung",gravityOverLife:"Schwerkraft während des Lebenszyklus",windOverLife:"Lebenszyklus Wind",axisStrength:"Vertikale Achse: Intensität 0~1",directionHint:"0° nach rechts · -90° nach unten · Negative Intensität kehrt die Richtung um",enableWind:"Wind aktivieren",windStrength:"Windstärke",enableForceField:"Kraftfeld aktivieren",centerX:"Mitte X",centerY:"Zentrum Y",forceStrength:"Kraftfeldstärke",forceRadius:"Kraftfeldradius",falloffMode:"Decay-Modus",constant:"Konstant (die Geschwindigkeit ändert sich innerhalb des Bereichs nicht)",linearFalloff:"Linearer Abfall (Kante ist 0)",inverseFalloff:"Umgekehrt proportional zur Entfernung (am stärksten in der Mitte)",forceHint:"Positive Zahlen ziehen sich zur Mitte hin an, negative Zahlen stoßen sich nach außen ab und der Kraftfeldkreis kann innerhalb der Leinwand gezogen werden.",showShape:"Form zeigen",enableVortex:"Wirbel aktivieren",vortexHint:"Positive Zahlen gegen den Uhrzeigersinn · Negative Zahlen im Uhrzeigersinn",enableAttraction:"Anziehung aktivieren",attractionX:"Adsorptionspunkt X",attractionY:"Adsorptionspunkt Y",attractionRadius:"Adsorptionsradius",attractionDuration:"Adsorptionszeit",delay:"Verzögerungszeit",delayMode:"Verzögerungsmodus",globalTime:"einheitliche Zeit",particleLife:"Das Leben einzelner Teilchen",attractionPath:"Adsorptionsmethode",straight:"Gerade",attractionHint:"Nach einer Verzögerung beginnt die Adsorption an der aktuellen Position. Wenn es den roten Bereich erreicht, stirbt es ab. Der Adsorptionskreis kann innerhalb der Leinwand gezogen werden.",enableTrail:"Schweif aktivieren",trailImages:"Nachgestellte unabhängige Bilder",addTrailImage:"Fügen Sie nachgestellte Bildressourcen hinzu",trailRotation:"drehen",trailBones:"Anzahl der nachlaufenden Knochen",trailRatio:"Trailing-Verhältnis (%)",trailLength:"Nachlauflänge",randomRange:"zufälliger Bereich",lengthRatio:"Längenverhältnis (%)",lengthMin:"Mindestlänge (%)",lengthMax:"Maximale Länge (%)",trailWidth:"Nachlaufbreite",widthRatio:"Breitenverhältnis (%)",widthMin:"Mindestbreite (%)",widthMax:"Maximale Breite (%)",widthScale:"Breitenskalierung",followParticle:"Teilchen folgen",lifeLengthCurve:"Lebenszykluslängenkurve",shapeCurve:"Formkurve (Kopf → Schwanzbreite)",colorMode:"Farbmodus",blendMode:"Mischmodus",fixedColor:"feste Farbe",alphaMode:"Transparenzmodus",opacity:"Transparenz",gridRows:"Anzahl der Rasterzeilen",gridCols:"Anzahl der Rasterspalten",trailHint:"Jedes Partikel generiert im Verhältnis zu den Ressourcen eine Reihe von Geschwister-Trailing-Bones. Die zufällige Länge und Breite werden bei der Geburt des Partikels bestimmt, und derselbe Samen kann stabil reproduziert werden",enableFollow:"Emitter-Verfolgung aktivieren",followMode:"Folgemodus",noFollow:"keiner",followPath:"Folge dem Weg",selectedBone:"ausgewählte Knochen",emitterAngleMode:"Senderwinkelmodus",fixedAngle:"fester Winkel",followMoveDirection:"Folgen Sie der Bewegungsrichtung",moveProgressCurve:"Bewegungsfortschrittskurve (0→1)",moveDuration:"Bewegungsdauer (s)",followSpace:"Folgen Sie dem Raum",localSpace:"Lokaler Raum (GEN-Bewegung)",worldSpace:"Weltraum (Partikelerzeugungspunktbewegung)",moveDirection:"Bewegungsrichtung",forward:"Vorwärts (Startpunkt → Endpunkt)",reverse:"Umkehren (Endpunkt → Startpunkt)",followOffset:"Offset-Startpunkt (0-1)",followSpaceHint:"Der lokale Raum bewegt den gesamten Emitter; Der Weltraum verschiebt nur den Entstehungspunkt neuer Partikel und die geborenen Partikel bleiben an der Weltposition.",followTarget:"Folgen Sie dem Ziel:",noValidBone:"Es wurde noch kein gültiger Bone gebunden. Bitte wählen Sie zuerst den Bone im Spine-Hierarchiebaum aus.",rebind:"neu binden",bind:"Bindung",selectedBoneLabel:"Aktuell ausgewählter Knochen:",boneLocalSpace:"Lokaler Raum (bewegt sich mit Knochen)",boneWorldSpace:"Weltraum (Partikel behalten ihre Position, nachdem sie erzeugt wurden)",offsetX:"Verschiebungsoffset X",offsetY:"Verschiebungsoffset Y",rotationOffset:"Rotationsversatz",scaleOffsetX:"Skalierungsversatz X",scaleOffsetY:"Skalenversatz Y",boneFollowHint:"Der Emitter folgt nur der Position des ausgewählten Spine-Bones und erbt nicht die Rotation oder Skalierung von Spine; Die Partikeltransformation verwendet die eigenen Parameter und den oberen Offset des Partikelsystems.",enableCollision:"Kollision aktivieren",collisionObjects:"Beteiligte Kollisionsobjekte",colliderDisabled:"{name} (Collider deaktiviert)",clearCollider:"Kollisionsobjekt löschen {name}",addCollider:"Szenenkollisionsobjekte hinzufügen",noAvailableColliders:"Es müssen keine Kollisionsobjekte hinzugefügt werden",noCollidersSelected:"Es ist kein Kollisionsobjekt ausgewählt und die aktuellen Partikel kollidieren nicht.",available:"Verfügbar",disabled:"Deaktiviert",collisionHint:"Nur hinzugefügte und aktivierte Szenenkollisionsobjekte nehmen an der Kollision des aktuellen Partikelsystems teil.",enableSubEmitter:"Sub-Emitter aktivieren",triggerTiming:"Wählen Sie die Triggerzeit",birth:"geboren",death:"sterben",collision:"Kollision",chooseTarget:"Zielpartikelsystem auswählen",noTarget:"Keine (Partikelsystem)",deleteSubEmitter:"Löschen Sie diesen Sub-Emitter",probability:"Emissionswahrscheinlichkeit",collisionLimit:"Kollisionsgrenze",inherit:"erben",colorInheritMode:"Farbvererbungsmethode",add:"Hinzufügen",replace:"Abdeckung",addSubEmitter:"+ Neuer Sub-Emitter hinzugefügt",inheritNone:"Keine (Standard)",inheritAll:"Alle Eigenschaften",inheritColor:"Farbe",inheritScale:"Größe",inheritRotation:"drehen",inheritLife:"Lebenszyklus"},NO={title:"Spine-Eigenschaften",name:"Spine-Name",xPosition:"X-Position",yPosition:"Y-Position",rotation:"Drehung",scaleX:"X-Skalierung",scaleY:"Y-Skalierung",startTime:"Startzeit",resources:"Spine-Ressourcen",chooseFolder:"Ordner auswählen und laden",folderHint:"Lesen Sie JSON / SKEL, Atlas und alle Texturen in einem Ordner gleichzeitig; Ressourcen können unten noch einzeln ausgetauscht werden.",choose:"wählen",chooseMultiple:"Auswählen (Mehrfachauswahl)",loading:"Laden…",load:"↧ Laden",clear:"Klar",supportNote:"Unterstützt Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · Laden bei Bedarf, wenn die entsprechende Version ausgeführt wird · Lokal offline",currentResource:"Aktuelle Ressource {version}",animations:"Spine-Animationen",noAnimations:"Keine Animation verfügbar",timelineAnimation:"Spielen Sie die Animation auf der Timeline ab",no:"keiner",hierarchy:"Hierarchie",clearBoneTitle:"Klicken Sie, um die Knochenauswahl zu löschen",noBoneTitle:"Derzeit sind keine Knochen ausgewählt",clearBone:"Ausgewählte Knochen löschen: {name}",currentBone:"Aktuelles Skelett:",clearSlotTitle:"Klicken Sie hier, um die Slot-Auswahl zu löschen",noSlotTitle:"Derzeit ist kein Steckplatz ausgewählt",clearSlot:"Ausgewählten Steckplatz löschen: {name}",currentSlot:"Aktueller Slot:",notSelected:"Nicht ausgewählt",expandAll:"Alles erweitern",collapseAll:"Alles einklappen",bones:"Skeleton",slots:"Slot",notLoaded:"Nicht geladen Spine",searchBones:"Suche nach Knochen",searchBonesPlaceholder:"Knochennamen suchen…",clearSearch:"Suche löschen",clearBoneSearch:"Klare Knochensuche",noMatchingBones:"Kein passender Knochen gefunden",expandChildren:"Untergeordnete Knochen erweitern",collapseChildren:"Kinderknochen kollabieren lassen",notLoadedSlots:"Spine-Steckplatz nicht geladen",searchSlots:"Suchplätze",searchSlotsPlaceholder:"Nach Steckplatz- oder Zubehörnamen suchen…",clearSlotSearch:"Slot-Suche löschen",noMatchingSlots:"Kein passender Steckplatz gefunden",slotTitle:"{name} (Skelett: {bone}, Anhang: {attachment})",empty:"null",textureSummary:"{count} Zhang: {names}",textureImages:"Texturbilder",missingFolderAssets:"Der ausgewählte Ordner fehlt: {missing}",chooseAssets:"Bitte wählen Sie nacheinander die Daten Spine, Atlas und alle Texturbilder aus"},$O={title:"Hilfe",subtitle:"Schneller Einstieg vom Erstellen von Partikeln bis zum Speichern und Exportieren",close:"Anweisungen schließen",closeShort:"Schließen (Esc)",quickStart:"Schnellstart",stepCreate:"Erstellen Sie ein Objekt: Verwenden Sie +Particles / +Collision / +Path / +Spine im „Szenenobjekt“ auf der linken Seite, um ein Szenenobjekt hinzuzufügen.",stepEdit:"Partikel bearbeiten: Wählen Sie das Partikelsystem aus und passen Sie „Emissionsmodus → Emitterform → Partikeleigenschaften → Aussehen und Ressourcen → Modifikator“ an.",stepPreview:"Überprüfen Sie den Effekt: Die untere Timeline kann Bild für Bild abgespielt, angehalten oder verschoben werden. Es wird automatisch neu berechnet, nachdem die Parameter geändert wurden.",stepExport:"Speichern und exportieren: Benutzen Sie „Konfiguration speichern“, um das Projekt beizubehalten; „Export Spine Json / images package / .spine package“, um das fertige Produkt auszugeben.",quickNote:"„Zurücksetzen“ auf der rechten Seite des Titels jeder Modulgruppe kann die Standardparameter der Gruppe wiederherstellen; Die Systemeinstellungen werden automatisch im aktuellen Browser gespeichert.",commonOps:"Häufige Aktionen",eye:"kleine Augen",eyeDesc:"Objekte einzeln ein-/ausblenden; Verborgene Partikelsysteme werden nicht exportiert.",copyDesc:"Kopiert das aktuell ausgewählte Objekt vollständig, um den Vergleich verschiedener Parameter zu erleichtern.",backgroundDesc:"Laden Sie das Referenzbild hoch und passen Sie Position und Transparenz nur für die Leinwandvorschau an.",settingsDesc:"Das Layout der Verwaltungsoberfläche, die Zusatzanzeige, der Maßstab usw. werden automatisch im Browser gespeichert.",undoDesc:"Ctrl+Z fährt einen Schritt zurück; Die maximale Schrittanzahl kann in den Systemeinstellungen angepasst werden.",spineBoneDesc:"Suchen und wählen Sie einen Knochen im Hierarchiebaum aus, der vom Partikelemitter zum Folgen verwendet werden kann.",shortcuts:"Tastenkürzel",undoShortcut:"Machen Sie den vorherigen Schritt rückgängig",saveShortcut:"Konfiguration speichern",panShortcut:"Leinwand ziehen",translateShortcut:"Verdrängungswerkzeug",rotateShortcut:"Rotationswerkzeug",scaleShortcut:"Zoom-Tool",playShortcut:"abspielen/pausieren",startShortcut:"Gehen Sie zurück zum ersten Bild",shortcutNote:"Q/W/E/R müssen zuerst auf die Leinwand klicken; Wenn sich der Cursor im Eingabefeld befindet, wird die Einzeltastenkombination nicht ausgelöst.",modules:"Modulhandbuch",configTitle:"Konfigurationsmanagement",saveConfigDesc:"Speichern Sie alle aktuellen Szenenobjekte und Parameter als Projekt-JSON-Dateien (Ctrl+S wird auch unterstützt).",loadConfigDesc:"Wählen Sie die lokale Konfigurationsdatei aus, um das gesamte Projekt wiederherzustellen.",presetDesc:"Wählen Sie im Dropdown-Menü eine Standard-Schnellanwendung aus. Klicken Sie auf das Dropdown-Menü, um die Liste zu aktualisieren.",configScope:"Umfang",configScopeDesc:"Die Konfiguration enthält Objekte und Parameter; Schnittstellen- und Systemeinstellungen werden separat im Browser gespeichert.",sceneTitle:"Szenenobjekt",particleDesc:"Kernobjekt. Position, Offset, Drehung, Skalierung und Zufallsstartwert können eingestellt werden; Der gleiche Samen kann den gleichen Effekt hervorrufen.",colliderDesc:"Kreis/Ellipse/Rechteck/Polygon/benutzerdefiniert, unterstützt physisches Abprallen, Anhalten, Zerstören und Bewegung entlang des Pfades.",pathDesc:"Bezier-Pfad mit Unterstützung für Ankerpunkte, Steuerpunkte, Abschluss, Farbe und voreingestellte Formen.",spineDesc:"Laden Sie Spine-Daten, Atlas und Texturen, durchsuchen Sie Bones und Slots und folgen Sie den Emittern.",sceneCommonDesc:"Objekte können unabhängig voneinander angezeigt und kopiert werden; Verborgene Partikelsysteme werden nicht exportiert.",emissionDesc:"Kontinuierliches Feuer, Feuerstoß, Verzögerung und dreistufige Start-/Schleifen-/End-Schleifendauer.",burstDesc:"Gibt eine bestimmte Anzahl von Partikeln auf einmal ab.",delayDesc:"Die Wartezeit bis zum Beginn der Emission, entsprechend dem linken Ende des Partikelbalkens.",loopNote:"Die Schleifenpersistenz unterstützt Knochen- und Pfadverfolgung nicht und die folgenden Einstellungen werden beim Umschalten wiederhergestellt.",shapeDesc:"Punkt-, Kreis-, Rechteck-, Kegel- oder Pfad-Spawn-Bereich. Kreise/Kegel unterstützen Innen- und Außenradien und Rechtecke unterstützen Innen- und Außenbreite und -höhe.",angleDesc:"Fest, zufällig, radial, Pfadnormale oder Pfadtangente.",initialDesc:"Lebenszyklus, Geschwindigkeit, Skalierung und Rotationsunterstützung sind fest, zufällig, Kurve und Rotation können der Startrichtung folgen.",overLifeDesc:"Geschwindigkeitsvergrößerung, Zoomvergrößerung und Rotationsgeschwindigkeit können über die Lebenszykluskurve gesteuert werden.",alphaDesc:"Transparenz unterstützt fest oder gekrümmt; Der Kurvenmodus kann abgeleitet, linear oder Bezier folgen.",imageDesc:"Einzelbild oder Sequenzrahmen, Multibild-Gewichtungs-Randomisierung, Drehpunkt, Farbe, Mischmodus und unabhängige Transparenz.",sequenceDesc:"Zu den Wiedergabemethoden gehören einmaliges Ausblenden, einmaliges Einfrieren, Vorwärtsschleife und Rückwärtsschleife.",noiseDesc:"Erzeugen Sie Jitter-Spuren und steuern Sie Intensität, Reichweite und Geschwindigkeit.",gravityDesc:"Schwerkraft-, Wind- und Lebenszyklusintensitätskurven.",forceDesc:"Globale Kraftfelder, Wirbel, Adsorption und Kollisionen.",trailDesc:"Unabhängige nachgestellte Assets, Knochenanzahl, Länge, Breite, Form, Farbe und Transparenzkurven.",followDesc:"Der Emitter kann einem Pfad oder Spine Bone folgen.",collisionDesc:"Wählen Sie Szenenkollisionsobjekte und Partikelkollisionsreaktionen aus.",exportDesc:"Legen Sie den Bildpfad, die Spine-Version, die Keyframe-Kurve, FPS, Integer-Frames, den Bone-Pool und die leere Animation fest.",exportButtonsDesc:"Sie können Spine JSON, Bilder ZIP exportieren oder .spine-Projekte über den Connector generieren.",connectorTitle:"Gebrauchsanweisung für den Spine-Stecker",connectorIntro:"Der Connector übermittelt JSON und von der Webseite generierte Bilder an Spine, das auf dem lokalen Computer installiert und aktiviert wurde, und konvertiert sie in bearbeitbare .spine-Projekte.",prerequisite:"Frontload",prerequisiteDesc:"Auf dem Computer ist Spine installiert und aktiviert, und der Desktop-Connector wurde gestartet.",download:"herunterladen",webSide:"Webseite",webSideDesc:"Nachdem „Connector verfügbar · Spine ist bereit“ angezeigt wird, klicken Sie auf „.spine-Paket exportieren“.",authorization:"erste Genehmigung",authorizationDesc:"Bei der ersten Verbindung muss die Quelle der Website überprüft und einmal zugelassen werden; Dieses Gerät speichert die Autorisierungs-Whitelist.",pathSetup:"Pfadeinstellungen",pathSetupDesc:"Der Connector erkennt Spine automatisch. Wenn es nicht gefunden werden kann, können Sie den Anwendungspfad manuell angeben.",downloadResult:"Ergebnisse herunterladen",downloadResultDesc:"Holen Sie sich das ZIP-Paket, das das .spine-Projekt und das Bildverzeichnis enthält.",version:"Version",versionDesc:"Der Stecker passt automatisch zu Spine 3.8~4.3 entsprechend der JSON-Version.",security:"Sicherheit",securityDesc:"Hören Sie nur auf die lokale Adresse, die Autorisierung wird im Connector gespeichert und die temporären Dateien werden nach der Konvertierung bereinigt.",differenceTitle:"Was ist der Unterschied zwischen Konfigurieren und Exportieren?",differenceDesc:"„Konfiguration speichern“ speichert alle editierbaren Objekte und Parameter; „Export Spine Json“ exportiert nur das angezeigte Partikelsystem und backt die Kollisions-, Folge-, Nachlauf- und Sub-Emitter-Ergebnisse in unabhängige Animationsdaten."},BO={confirmLoopFollowEnter:"Nach dem Aufrufen des kontinuierlichen Schleifenmodus werden die Partikelverfolgungseinstellungen ungültig und auf den Standardwert zurückgesetzt. Weitermachen?",confirmLoopFollowExit:"Nach dem Verlassen des Schleifenpersistenzmodus werden die Partikelverfolgungseinstellungen ungültig und auf ihre Standardwerte zurückgesetzt. Weitermachen?",invalidJson:"Die Konfigurationsdatei ist ungültig JSON",invalidConfigFormat:"Nicht das Editorprofil SpineParticle",unsupportedConfigVersion:"Konfigurationsversion noch nicht unterstützt: {version}",missingScene:"In der Konfigurationsdatei fehlen vollständige Szenendaten",missingEmbeddedSpine:"Die Konfiguration enthält keine wiederverwendbaren Spine-Originalressourcen",chooseJsonConfig:"Bitte wählen Sie eine .json-Konfigurationsdatei aus",settingsInvalidJson:"Der Systemeinstellungscache ist ungültig JSON",settingsFormat:"Nicht SpineParticle Editor-Systemeinstellungscache",settingsVersion:"Die Systemkonfigurationsversion wird noch nicht unterstützt: {version}",settingsMissing:"Im Systemeinstellungscache fehlen Einstellungen",noExportableImages:"Für das aktuell sichtbare Partikelsystem sind keine exportierbaren Bilder vorhanden",invalidZipPath:"ZIP Ungültiger Dateipfad",spineFileType:"Spine-Daten unterstützen nur .json oder .skel",atlasFileType:"Atlas-Dateien unterstützen nur .atlas",chooseTexture:"Bitte wählen Sie mindestens ein Texturbild aus",binaryParseFailed:"Binäres Parsen von Spine ist fehlgeschlagen (4.3: {v43}; alte Version: {v42})",invalidSpineJson:"Spine JSON Ungültiges Dateiformat",unsupportedSpineJsonVersion:"Spine JSON-Version wird nicht unterstützt, nur {versions} wird unterstützt",unsupportedSpineDataVersion:"Die Datenversion Spine wird nicht unterstützt, nur {versions} wird unterstützt",embeddedReadFailed:"Die eingebettete Spine-Datei kann nicht gelesen werden: {name}",missingImageWarning:"Bild „{file}“ fehlt oder hat unlesbare Abmessungen, Pfad bleibt erhalten.",missingTrailImageWarning:"Das nachgestellte Bild „{file}“ fehlt und der Pfad wurde beibehalten.",emptyCacheWarning:"Für „{name}“ ist kein Framebuffer verfügbar.",readExportImageFailed:"Exportiertes Bild kann nicht gelesen werden: {name}",connectorOffline:"Der lokale Spine-Connector wurde nicht erkannt. Bitte aktivieren Sie zuerst den Connector",connectorHttpError:"Der Spine-Connector gibt den Fehler HTTP {status} zurück",invalidTrailUV:"Ungültige UV-Daten für nachgestelltes Netz „{name}“",missingTrailVertices:"Im nachgestellten Netz „{name}“ fehlen Scheitelpunktdaten",trailIndexOutOfRange:"Dreiecksindex des nachgestellten Netzes „{name}“ außerhalb der Grenzen",invalidTrailHull:"Die Außenkonturnummer des nachlaufenden Netzes „{name}“ ist ungültig",trailHullIndexOutOfRange:"Der Außenkonturkantenindex des nachgestellten Netzes „{name}“ liegt außerhalb der Grenzen",invalidInfluenceCount:"Das nachgestellte Netz „{name}“ enthält eine ungültige Anzahl an Knochengewichten",missingBoneReference:"Das nachgestellte Netz „{name}“ verweist auf einen nicht vorhandenen Knochen",invalidWeight:"Das nachfolgende Raster „{name}“ enthält ungültige Gewichtsdaten",weightSum:"Die Scheitelpunktgewichte des nachgestellten Netzes „{name}“ ergeben in der Summe nicht 1",vertexCountMismatch:"Das nachgestellte Netz „{name}“ weist eine inkonsistente Anzahl von Scheitelpunkten und UVs auf",invalidInherit:"Der geerbte Wert „{inherit}“ für Bone „{name}“ entspricht nicht dem Spine {version} JSON-Format",trailBoneParent:"Der Trailing-Bone „{name}“ muss direkt unter dem Partikelsystem-Bone aufgehängt werden und darf keine Bone-Kette bilden.",trailSlotEmpty:"Der gewichtete Tailing-Slot „{name}“ kann keine leeren Anhänge verwenden. Die entsprechende Knochenskalierung sollte in der Nichterscheinungs- oder Todesphase auf 0 gesetzt werden.",spine38Version:"Spine 3.8 Die exportierte Versions-ID muss 3.8 sein",spine38Inherit:"Spine 3.8 Bone „{name}“ sollte „Transform“ verwenden und kann nicht „Inherit“ verwenden",spine38SlotColor:"Spine 3.8 Slot-Farbzeitleiste muss Farbe / TwoColor verwenden",spine38AttachmentName:"Spine 3.8 Der versteckte Rahmen der Anhang-Timeline muss explizit als Name geschrieben werden: null",spine38RotationAngle:"Spine 3.8 Sie müssen den Winkel verwenden, um die Zeitachse zu drehen",spine38Curve:"Spine 3.8 unterstützt das 4.x-Array-Kurvenformat nicht",unsupportedExportVersion:"Die exportierte Version wird nicht unterstützt, nur Spine {versions} wird unterstützt",exportVersionMismatch:"Inkonsistente Exportversion: auf Spine {expected} gesetzt, JSON markiert als Spine {actual}",exportMissingBones:"Beim Exportergebnis fehlen Knochen",missingAtlasTexture:"Die von Atlas referenzierte Textur ist nicht ausgewählt: {name}"},UO={label:"Sprache",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},VO={app:yO,common:xO,toolbar:wO,settings:SO,config:CO,curve:AO,gradient:TO,attributeControl:EO,pivot:_O,image:MO,timeline:PO,emission:kO,attributes:IO,appearance:RO,renderLayer:FO,export:{title:"Exportressourcen",reset:"Exportressourcen zurücksetzen",imagesPath:"Bildpfad (Spine-Bildpfad)",spineVersion:"Spine-Version",keyframeCurve:"Keyframe-Interpolationskurve",linear:"Linear",smoothBezier:"Glatter Bezier (Glatter Bézier)",bezierHelp:"Smooth Bezier passt kontinuierliche Bewegungen innerhalb der Fehlertoleranz an; Geburt, Tod, Bindungswechsel und Mutationen verwenden weiterhin Schritt-Keyframes.",spine38Help:"Spine 3.8 unterstützt das Bezier-Array pro Kanal von 4.x nicht und wird beim Export in toleranzreduzierte stückweise lineare Keyframes konvertiert.",fps:"Export-FPS",omitFps:"Schreiben Sie keine fps",fpsHelp:"Behalten Sie die tatsächlichen Sekunden der Animation bei, wenn Sie FPS ändern. „Keine FPS schreiben“ lässt nur die FPS-Metadaten von Spine weg.",integerFrames:"Ganzzahlige Frame-Ausrichtung",bonePool:"Knochenobjektpool",excludeEmpty:"Schließen Sie inhaltslose Animationen aus",baking:"Die Animation wird neu berechnet und gebacken",exportJsonTitle:"Exportieren Sie Spine {version} JSON",preparing:"Der Export wird vorbereitet...",exportJson:"Spine JSON exportieren",exportImagesTitle:"Laden Sie das vom aktuellen Partikelsystem ZIP verwendete Bild separat herunter",organizingImages:"Bilder sortieren...",exportImages:"Bilder-ZIP exportieren",generatingProject:"Projekt wird erstellt...",exportSpine:".spine-Paket exportieren",authorize:"Autorisieren Sie die aktuelle Website",authorizeTitle:"Autorisieren Sie die aktuelle Website im nativen Connector",refreshConnector:"Überprüfen Sie den Stecker erneut",refresh:"auffrischen",recalculating:"Partikelanimation wird neu berechnet...",exported:"Exportiert Spine {version}: {systems} Partikelsysteme, {animations} Animationen, {bones} Wurzelknochen {warning}",resourceWarning:";{count} Ressourcentipps (fehlende Bilder werden weiterhin exportiert)",timeout:"Neuberechnung des Animations-Timeouts. Bitte bestätigen Sie, dass die Seite noch ausgeführt wird, und versuchen Sie es erneut",preparingProject:"Bilder sortieren und diese Maschine Spine nennen…",projectExported:"{fileName} wurde generiert: einschließlich .spine-Projekt und {images}-Bilder, Spine {version}",collectingImages:"Zusammenstellung von Bildern, die derzeit vom Partikelsystem verwendet werden ...",imagesExported:"{fileName} wurde generiert: {folder}/ enthält {images}-Bilder",connectorChecking:"Lokaler Spine-Anschluss wird erkannt...",connectorOffline:"Der lokale Spine-Connector läuft nicht",spineNotFound:"Der Connector läuft, aber Spine wurde nicht gefunden",notAuthorized:"Der Connector läuft, aber diese Website ist nicht autorisiert",connectorReady:"Connector verfügbar · Spine bereit",connectorBusy:"Spine-Projekt wird neu berechnet und erstellt",connectorGenerate:"Spine-{version}-Projekt mit lokalem Spine erstellen",unknown:"unbekannt",checking:"Prüfung",offline:"Offline",notFound:"Spine nicht gefunden",unauthorized:"Nicht autorisiert",projectTransferTitle:"Exportieren Sie das Spine-Paket",projectTransferDetail:"Partikelanimation wird neu berechnet...",projectTransferDownload:"Das Spine-Projektpaket wurde heruntergeladen",generatingJson:"Generieren von Spine JSON…",preparingProjectFiles:"Projektbilder zusammenstellen...",uploading:"Daten werden in den Spine-Connector hochgeladen...",spineProcessing:"Spine konvertiert das Projekt, bitte warten...",downloadingProject:"Das generierte Spine-Projektpaket wird heruntergeladen ...",handingToBrowser:"Übergabe an den Browser zum Download..."},transfer:LO,scene:DO,modifiers:OO,spine:NO,help:$O,errors:BO,language:UO},XO={title:"Spine Particle Editor - Yeomai",resizeTimeline:"Drag to resize the timeline",systems:"Systems",particlesBones:"Particles (bones)",rootBone:"Root bone",hudTip:"Scroll to zoom · Drag with left mouse to pan"},YO={label:"Language",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},zO={close:"Close",collapse:"Collapse",reset:"Reset",add:"Add",remove:"Remove",delete:"Delete",clear:"Clear",cancel:"Cancel",confirm:"Confirm",none:"None",enabled:"Enabled",disabled:"Disabled",fixed:"Fixed",random:"Random",curve:"Curve",followExport:"Follow export",linear:"Linear",bezier:"Bézier",above:"Above",below:"Below",left:"Left",right:"Right",seconds:"s",frames:"f"},jO={settings:"Settings",undo:"Undo (Ctrl+Z)",pan:"Pan canvas (Q)",translate:"Move (W)",rotate:"Rotate (E)",scale:"Scale (R)",zoomIn:"Zoom in",zoomOut:"Zoom out",fitView:"Fit canvas",toggleGrid:"Toggle grid",resetView:"Reset view",background:"Background",backgroundSettings:"Background settings",changeBackground:"Replace image",uploadBackground:"Upload image",clearBackground:"Clear background",noBackground:"No image",backgroundX:"Background X offset",backgroundY:"Background Y offset",backgroundOpacity:"Background opacity",opacity:"Opacity",help:"Help",openHelp:"Open help"},HO={title:"Settings",layout:"Layout",floatingMenu:"Floating menu",floatingMenuParticleOnly:"Select a particle system first",parameterPanelPosition:"Parameter panel position",panelOnRight:"Show parameter panel on the right",history:"History",maxUndo:"Maximum undo steps",canvasGuides:"Canvas guides",emitter:"Emitter point",bones:"Bone links",bonePointSize:"Bone point size",boneAxisSize:"Axis size",skinMesh:"Skin mesh",enableTicks:"Show ticks",tickFontSize:"Tick text size",tickWidth:"Tick line width",axisColor:"Axis color",showAxisLabels:"Show tick values",unsavedPrompt:"Prompt for unsaved changes",showProjectSize:"Show configuration storage usage",cacheNote:"Settings are saved automatically in this browser"},GO={title:"Configuration",save:"Save Config",saveTitle:"Save configuration to browser cache",load:"Load Config",loadTitle:"Load an editor configuration file",presets:"Preset list",selectPreset:"Select preset",noPresets:"No presets",saved:"Configuration saved locally",loading:"Loading configuration…",loaded:"Loaded: {name}",presetLoading:"Loading preset…",presetLoaded:"Preset loaded: {name}",presetNamingError:"{message}. Check the preset file name.",presetTransferTitle:"Load Preset",presetDownloading:"Downloading {file}…",presetParsing:"Parsing preset configuration…",presetRestoring:"Parsing and restoring preset resources…",presetComplete:"Preset loaded",presetListError:"Unable to read preset list",presetReadError:"Unable to read preset: {file}",local:{listTitle:"Configuration List",empty:"No configurations saved in this browser",saveTitle:"Save configuration to browser cache",name:"Configuration name",namePlaceholder:"For example: Firework effect",load:"Load",loadHint:"Double-click to load",download:"Download",delete:"Delete",downloadCurrent:"Download Current Configuration",downloadAll:"Download All Configurations",loadAll:"Load All Configurations",loadAllConfirm:"Import {count} configuration files? Existing configurations with the same names will be overwritten.",loadAllDone:"Loaded {count} configurations from files",loadAllPartial:"Imported {imported} configurations; {failed} files failed",overwriteSave:"“{name}” already exists. Overwrite it?",loadOverwrite:"Loading “{name}” will replace the current scene and discard unsaved changes. Continue?",deleteConfirm:"Delete “{name}”?",nameRequired:"Enter a configuration name",nameInvalid:'The name cannot contain \\ / : * ? " < > |',storageUnavailable:"Browser local storage is unavailable",saved:"Saved to browser: {name}",loaded:"Loaded from browser: {name}",deleted:"Deleted browser configuration: {name}",downloadEmpty:"No configurations to download",downloaded:"Downloaded: {name}"}},WO={bezierHint:"Drag square handles · Double-click empty space to add · Double-click a node to delete",linearHint:"Double-click empty space to add · Double-click a node to delete · Drag nodes to adjust",resetTitle:"Restore default curve"},qO={addTitle:"Double-click the color bar to add a stop",color:"Stop color",colorValue:"Stop color value",position:"Stop position",addMiddle:"Add color in the middle",delete:"Delete selected stop",hint:"Double-click to add · Drag a stop to move · Double-click a stop to delete"},KO={angleOffset:"Angle offset",value:"Value",lower:"Min",upper:"Max",rangeLower:"Range min",rangeUpper:"Range max",curveInput:"Curve input →",direction:"Emission direction"},JO={title:"Texture Pivot",zoomOut:"Zoom out",zoomIn:"Zoom in",expand:"Open full-screen pivot editor",interaction:"Click/drag to set pivot · Right-drag to pan · Scroll to zoom",previewAlt:"Pivot preview",noImage:"No image selected",resetCenter:"Center (50%, 50%)",coordinates:"Pivot coordinates (%)",rotationTest:"Pivot rotation test",static:"Static",spin:"Spin",swing:"Swing",rotationAlt:"Rotation test",topLeft:"Top left",top:"Top",topRight:"Top right",left:"Left",center:"Center",right:"Right",bottomLeft:"Bottom left",bottom:"Bottom",bottomRight:"Bottom right"},ZO={chooseSequence:"Choose sequence images",chooseLocal:"Choose local image",subfolder:"Subfolder",name:"Name",restore:"Restore {name}",deleteResource:"Delete image resource",imageMode:"Image mode",fixed:"Single image",sequence:"Sequence",playbackMode:"Playback",onceHide:"Once, hide at end",onceHold:"Once, hold last frame",loopForward:"Loop forward",loopReverse:"Loop reverse",playbackFps:"Playback FPS",chooseSequenceMulti:"Choose sequence images (multiple)",weight:"Weight %",unlockWeight:"Unlock weight",lockWeight:"Lock current weight",pivot:"Texture Pivot",collapsePivot:"Collapse pivot editor",expandPivot:"Expand pivot editor",pivotModal:"Full-screen texture pivot editor",pivotModalDesc:"Click or drag on the texture to set the exact particle rotation center",pivotZoomHint:"Zoom from 100% to 400% to align tips or roots precisely:",confirmPivot:"Apply and save pivot",noSequence:"No sequence selected",firstFrame:"Frame 1",firstImage:"first image",lastImage:"last image",pivotOn:"Enabled: X {x}% | Y {y}%",pivotOff:"Disabled, using image center (50%, 50%)",pivotCustom:"Custom pivot: X {x}% | Y {y}%",frameCountOne:"1 frame · {name}",frameCountMany:"{count} frames · {first} → {last}",sequenceSelected:"{count} frames selected, playing {first} to {last}"},QO={play:"Play (D)",pause:"Pause (D)",toStart:"Go to first frame (S)",previous:"Previous frame",next:"Next frame",toEnd:"Go to last frame",continuousLoop:"Continuous loop playback",abLoop:"Independent A/B range loop",abLoopShort:"AB Loop",abRange:"A/B loop range",playbackStart:"Custom playback start frame",playbackEnd:"Custom playback end frame",startFrame:"Playback start frame",endFrame:"Playback end frame",frame:"Frame",emission:"Emitting",particleLife:"Particles alive",spineAnimation:"Spine animation",ownerAnimation:"Owner animation",setOwnerAnimation:"Set the animation that owns this particle system",chooseOwnerAnimation:"Choose owner animation",animationName:"Animation name",renameAnimation:"Rename current animation",rename:"Rename",newAnimation:"+ New",keepOneAnimation:"At least one animation is required",spinePreview:"Spine preview animation",noSpineAnimation:"No Spine animation available",none:"None",systemName:"System {index}",dragLoopDuration:"Drag to change loop duration",dragEmissionDuration:"Drag to change emission duration",dragSpineStart:"Drag to change animation start time",noAnimationData:"No animation data",animationNameEmpty:"Animation name cannot be empty",animationNameDuplicate:"Animation name already exists",animationRenameFailed:"Unable to rename animation",zoomIn:"Zoom in",zoomOut:"Zoom out",zoomFit:"Fit",frameStatus:"Frame {current} / {total}"},eN={title:"Emission",reset:"Reset emission settings",stream:"Stream",burst:"Burst",normalStream:"Standard stream",loopStream:"Loop stream",rate:"Emission rate",duration:"Emission duration",loopDuration:"Emission duration (f)",generateStart:"Generate loop start animation",generateEnd:"Generate loop end animation",customDuration:"Custom duration",auto:"Auto {frames}f",startLoopDuration:"Loop start duration",endLoopDuration:"Loop end duration",loopWarning:"Bone and path following are unavailable in loop stream mode and will be reset when entering or leaving it.",burstCount:"Burst count",delay:"Delay",shapeTitle:"Emitter Shape",shapeReset:"Reset emitter shape settings",shape:"Shape",point:"Point",circle:"Circle",rect:"Rectangle",cone:"Cone",path:"Path",innerDiameter:"Inner diameter",outerDiameter:"Outer diameter",innerRadius:"Inner radius",outerRadius:"Outer radius",coneDirection:"Cone direction",coneAngle:"Cone opening angle",innerWidth:"Inner width",innerHeight:"Inner height",outerWidth:"Outer width",outerHeight:"Outer height",selectPath:"Spawn path",noPath:"No path (point emission)",birthDistribution:"Birth distribution",evenDistribution:"Even spacing",randomDistribution:"Random",emissionAngle:"Emission angle",radial:"Radial (outward)",pathNormal:"Path normal",pathTangent:"Path tangent",fixedAngle:"Fixed angle",baseAngle:"Base angle",randomRange:"Random range",showShape:"Show shape"},tN={title:"Particle Attributes",reset:"Reset particle attribute settings",initialParams:"Initial particle values",initialLife:"Initial life",randomSample:"Random sample →",initialSpeed:"Initial speed",initialScale:"Initial scale",uniform:"Uniform",separateXY:"Separate XY",scaleX:"Scale X",scaleY:"Scale Y",initialRotation:"Initial rotation",lifecycleTitle:"Values over particle life",speedOverLife:"Speed over life",speedMultiplier:"Speed multiplier",lifeTo:"Lifetime →",scaleOverLife:"Scale over life",scaleMultiplier:"Scale multiplier",multiplierX:"Multiplier X",multiplierY:"Multiplier Y",rotationOverLife:"Rotation over life",rotationSpeed:"Rotation speed"},nN={title:"Appearance & Resources",reset:"Reset appearance and resource settings",opacity:"Opacity",curveMode:"Curve mode",transparent:"0 (transparent)",opaque:"1 (opaque)",renderLayer:"Render layer (Spine slot)",top:"Topmost",spineSlot:"Spine slot",selectSpine:"Select Spine",noSpine:"No Spine available",noSlot:"No slot selected",reselect:"Reselect",selectSlot:"Select slot",searchSlots:"Search slots or attachments…",searchSlotsAria:"Search slots",emptySlot:"Empty slot",noMatchingSlots:"No matching slots",above:"Above slot image",below:"Below slot image",followAttachment:"Follow attachment visibility",previewOnly:"Render layer changes only affect the editor preview and are not exported.",imageResources:"Image Resources",addImage:"Add image resource",scale:"Scale",color:"Color",fixedColor:"Fixed color",randomColor:"Random color",lifetime:"Over lifetime",normal:"Normal",add:"Add",multiply:"Multiply",screen:"Screen",fixedColorValue:"Fixed color value",randomColorHint:"Each particle samples a color from the gradient at birth and keeps it for its lifetime",independentAlpha:"Independent opacity",off:"Off"},iN={slotLabelAbove:"{spine} / {slot} · above image",slotLabelBelow:"{spine} / {slot} · below image",resolvedAbove:"Render above {slot} and below the following slot",resolvedBetween:"Render between {previous} and {slot}",warningNoSpine:"No loaded Spine resource. Particles are temporarily rendered on top.",warningNoSelection:"No Spine selected. Particles are temporarily rendered on top.",warningMissingSpine:"The target Spine no longer exists. Particles are temporarily rendered on top.",warningNotReady:"The target Spine is not ready. Particles are temporarily rendered on top.",warningMissingSlot:"The target slot no longer exists. Particles are temporarily rendered on top.",warningFirstSlot:"This is the first slot, so particles cannot render below it and are temporarily shown on top."},sN={completed:"Completed",failed:"Operation failed"},rN={title:"Scene Objects",addParticle:"Add particle system",addParticleShort:"+ Particle",addCollider:"Add collider",addColliderShort:"+ Collider",addPath:"Add path",addPathShort:"+ Path",addSpine:"Add Spine",copyTitle:"Duplicate selected scene object",showParticle:"Show particle system",hideParticle:"Hide particle system",showCollider:"Show collider",hideCollider:"Hide collider",showPath:"Show path",hidePath:"Hide path",showSpine:"Show Spine",hideSpine:"Hide Spine",particle:"Particle",subEmitter:"Sub-emitter",collision:"Collision",path:"Path",deleteParticle:"Delete particle system",deleteCollider:"Delete collider",deletePath:"Delete path",deleteSpine:"Delete Spine",empty:"No scene objects",name:"Name",positionX:"Position X",positionY:"Position Y",offsetX:"Offset X",offsetY:"Offset Y",rotation:"Rotation",scaleX:"Scale X",scaleY:"Scale Y",seed:"Random seed",seedTitle:"Controls random attributes, resource selection, and modifier sampling",randomizeSeed:"Generate a new global random seed",seedHint:"Controls initial random values, resource selection, and modifier sampling. The same seed reproduces the same result.",colliderTitle:"Collider Properties",colliderName:"Collider name",type:"Type",circle:"Circle",ellipse:"Ellipse",rect:"Rectangle",polygon:"Polygon",custom:"Custom",enabled:"Enabled",xPosition:"X position",yPosition:"Y position",scaleXShort:"Scale X",scaleYShort:"Scale Y",radius:"Radius",radiusX:"X radius",radiusY:"Y radius",width:"Width",height:"Height",sides:"Sides",collisionResponse:"Collision response",physics:"Physics (bounce / friction)",pause:"Pause in place",destroy:"Destroy immediately",elasticity:"Elasticity (0-1)",friction:"Friction (0-1)",followPath:"Follow a path",targetPath:"Target path",notSelected:"(Not selected)",moveDuration:"Move duration (s)",followDirection:"Orient along path",moveProgressCurve:"Movement progress curve",moveProgressHelp:"X: elapsed / duration · Y: path progress (0 = start, 1 = end)",pathTitle:"Path Properties",pathName:"Path name",closedPath:"Closed path",pathColor:"Path color",pathHelp:"Controls:",pathHelpItems:["Double-click empty space or a curve to add an anchor","Double-click an anchor to delete it","Double-click, hold on the second click, and drag to create handles","Drag anchors to move them and handles to reshape the curve","Shift + handle drag: symmetric handles","Alt + handle drag: independent handles","Ctrl + click / box select: add nodes","Alt + click / box select: remove nodes","Alt + click empty space: clear selection","Move multiple selected anchors together"],applyPresetShape:"Apply preset shape",choosePreset:"Choose preset…",square:"Square",star:"Star",applyPreset:"Apply preset",clearAnchors:"Clear anchors",panelHint:"Use the buttons above to create a scene object"},oN={title:"Modifiers",reset:"Reset modifiers",damping:"Damping",enableNoise:"Enable movement noise",strength:"Strength",noiseRange:"Wander range",noiseSpeed:"Time speed",noiseHint:"Strength controls influence · Wander range controls maximum offset · Time speed controls variation rate",enableGravity:"Enable gravity",gravityStrength:"Gravity strength",strengthMin:"Strength min",strengthMax:"Strength max",direction:"Direction",gravityOverLife:"Gravity over lifetime",windOverLife:"Wind over lifetime",axisStrength:"Y: strength 0–1",directionHint:"0° right · -90° down · Negative strength reverses direction",enableWind:"Enable wind",windStrength:"Wind strength",enableForceField:"Enable force field",centerX:"Center X",centerY:"Center Y",forceStrength:"Force strength",forceRadius:"Force radius",falloffMode:"Falloff",constant:"Constant",linearFalloff:"Linear (zero at edge)",inverseFalloff:"Inverse distance (strongest at center)",forceHint:"Positive attracts · Negative repels · Drag the force circle on the canvas",showShape:"Show shape",enableVortex:"Enable vortex",vortexHint:"Positive counter-clockwise · Negative clockwise",enableAttraction:"Enable attraction",attractionX:"Attraction point X",attractionY:"Attraction point Y",attractionRadius:"Arrival radius",attractionDuration:"Attraction duration",delay:"Delay",delayMode:"Delay mode",globalTime:"Global time",particleLife:"Per particle life",attractionPath:"Attraction path",straight:"Straight",attractionHint:"Starts attraction after the delay · Dies on reaching the red radius · Drag the attraction circle on the canvas",enableTrail:"Enable trail",trailImages:"Trail Images",addTrailImage:"Add trail image resource",trailRotation:"Rotation",trailBones:"Trail bones",trailRatio:"Trail ratio (%)",trailLength:"Trail length",randomRange:"Random range",lengthRatio:"Length ratio (%)",lengthMin:"Length min (%)",lengthMax:"Length max (%)",trailWidth:"Trail width",widthRatio:"Width ratio (%)",widthMin:"Width min (%)",widthMax:"Width max (%)",widthScale:"Width scale",followParticle:"Follow particle",lifeLengthCurve:"Length over lifetime",shapeCurve:"Shape curve (head to tail width)",colorMode:"Color mode",blendMode:"Blend mode",fixedColor:"Fixed color",alphaMode:"Opacity mode",opacity:"Opacity",gridRows:"Grid rows",gridCols:"Grid columns",trailHint:"Each particle creates a sibling trail bone group according to the resource ratio. Random length and width are fixed at birth and reproducible with the same seed.",enableFollow:"Enable emitter following",followMode:"Follow mode",noFollow:"None",followPath:"Follow path",selectedBone:"Selected bone",emitterAngleMode:"Emitter angle mode",fixedAngle:"Fixed angle",followMoveDirection:"Follow movement direction",moveProgressCurve:"Movement progress curve (0→1)",moveDuration:"Move duration (s)",followSpace:"Follow space",localSpace:"Local space (move emitter)",worldSpace:"World space (move spawn point)",moveDirection:"Movement direction",forward:"Forward (start → end)",reverse:"Reverse (end → start)",followOffset:"Start offset (0-1)",followSpaceHint:"Local space moves the entire emitter. World space moves only the spawn point; existing particles stay in world position.",followTarget:"Follow target: ",noValidBone:"No valid bone is bound. Select a bone in the Spine hierarchy first.",rebind:"Rebind",bind:"Bind",selectedBoneLabel:"Selected bone: ",boneLocalSpace:"Local space (follow bone)",boneWorldSpace:"World space (keep particle position)",offsetX:"Position offset X",offsetY:"Position offset Y",rotationOffset:"Rotation offset",scaleOffsetX:"Scale offset X",scaleOffsetY:"Scale offset Y",boneFollowHint:"The emitter follows only the selected Spine bone position. Particle transforms use the particle system settings and offsets above.",enableCollision:"Enable collision",collisionObjects:"Collision objects",colliderDisabled:"{name} (disabled)",clearCollider:"Remove collider {name}",addCollider:"Add a scene collider",noAvailableColliders:"No colliders available",noCollidersSelected:"No collider selected. Current particles will not collide.",available:"Available",disabled:"Disabled",collisionHint:"Only enabled scene colliders added here participate in this particle system's collisions.",enableSubEmitter:"Enable sub-emitters",triggerTiming:"Choose trigger event",birth:"Birth",death:"Death",collision:"Collision",chooseTarget:"Choose target particle system",noTarget:"None (particle system)",deleteSubEmitter:"Delete this sub-emitter",probability:"Trigger probability",collisionLimit:"Collision trigger limit",inherit:"Inherit",colorInheritMode:"Color inheritance",add:"Add",replace:"Replace",addSubEmitter:"+ Add sub-emitter",inheritNone:"None (default)",inheritAll:"All attributes",inheritColor:"Color",inheritScale:"Size",inheritRotation:"Rotation",inheritLife:"Lifetime"},aN={title:"Spine Properties",name:"Spine name",xPosition:"X position",yPosition:"Y position",rotation:"Rotation",scaleX:"Scale X",scaleY:"Scale Y",startTime:"Start time",resources:"Spine Resources",chooseFolder:"Choose folder and load",folderHint:"Reads JSON / SKEL, Atlas, and all textures from the folder. Assets can still be replaced individually below.",choose:"Choose",chooseMultiple:"Choose multiple",loading:"Loading…",load:"↧ Load",clear:"Clear",supportNote:"Supports Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · Runtime loaded on demand · Fully local",currentResource:"Current asset {version}",animations:"Spine Animations",noAnimations:"No animations available",timelineAnimation:"Timeline animation",no:"None",hierarchy:"Hierarchy",clearBoneTitle:"Click to clear bone selection",noBoneTitle:"No bone selected",clearBone:"Clear selected bone: {name}",currentBone:"Current bone: ",clearSlotTitle:"Click to clear slot selection",noSlotTitle:"No slot selected",clearSlot:"Clear selected slot: {name}",currentSlot:"Current slot: ",notSelected:"Not selected",expandAll:"Expand all",collapseAll:"Collapse all",bones:"Bones",slots:"Slots",notLoaded:"Spine not loaded",searchBones:"Search bones",searchBonesPlaceholder:"Search bone names…",clearSearch:"Clear search",clearBoneSearch:"Clear bone search",noMatchingBones:"No matching bones",expandChildren:"Expand child bones",collapseChildren:"Collapse child bones",notLoadedSlots:"Spine slots not loaded",searchSlots:"Search slots",searchSlotsPlaceholder:"Search slots or attachments…",clearSlotSearch:"Clear slot search",noMatchingSlots:"No matching slots",slotTitle:"{name} (bone: {bone}, attachment: {attachment})",empty:"Empty",textureSummary:"{count} textures: {names}",textureImages:"texture images",missingFolderAssets:"The selected folder is missing: {missing}",chooseAssets:"Select Spine data, Atlas, and all texture images"},lN={title:"Help",subtitle:"Quick start from creating particles to saving and exporting",close:"Close help",closeShort:"Close (Esc)",quickStart:"Quick Start",stepCreate:"Create objects: use + Particle / + Collider / + Path / + Spine in Scene Objects.",stepEdit:"Edit particles: select a particle system, then adjust Emission → Emitter Shape → Particle Attributes → Appearance & Resources → Modifiers.",stepPreview:"Preview: play, pause, step, or scrub on the timeline. Parameter changes are recalculated automatically.",stepExport:"Save and export: Save Config keeps the project; Export Spine JSON / images ZIP / .spine package produces the deliverable.",quickNote:"Reset beside each section restores that section's defaults. Settings are saved automatically in this browser.",commonOps:"Common Actions",eye:"Visibility",eyeDesc:"Show or hide an object independently. Hidden particle systems are not exported.",copyDesc:"Duplicate the selected object for parameter comparisons.",backgroundDesc:"Upload a reference image and adjust its position and opacity for canvas preview only.",settingsDesc:"Manage layout, canvas guides, tick display, and other editor settings.",undoDesc:"Ctrl+Z undoes one step. The maximum history size is configurable.",spineBoneDesc:"Search and select bones in the hierarchy for emitter following.",shortcuts:"Shortcuts",undoShortcut:"Undo",saveShortcut:"Save config",panShortcut:"Pan canvas",translateShortcut:"Move tool",rotateShortcut:"Rotate tool",scaleShortcut:"Scale tool",playShortcut:"Play / pause",startShortcut:"Go to first frame",shortcutNote:"Click the canvas before using Q / W / E / R. Single-key shortcuts are disabled while typing in inputs.",modules:"Module Guide",configTitle:"Configuration",saveConfigDesc:"Save all scene objects and parameters to a project JSON file. Ctrl+S is supported.",loadConfigDesc:"Load a local configuration and restore the complete project.",presetDesc:"Choose a preset from the dropdown. Open the dropdown to refresh the list.",configScope:"Scope",configScopeDesc:"The project includes objects and parameters. Interface settings are stored separately in the browser.",sceneTitle:"Scene Objects",particleDesc:"The core object. Set position, offset, rotation, scale, and random seed. The same seed reproduces the same result.",colliderDesc:"Circle, ellipse, rectangle, polygon, or custom shape with physics, pause, destroy, and path-following responses.",pathDesc:"Bézier path with anchors, handles, closing, color, and preset shapes.",spineDesc:"Load Spine data, Atlas, and textures; browse bones and slots, and use them for emitter following.",sceneCommonDesc:"Objects can be hidden and duplicated independently. Hidden particle systems are not exported.",emissionDesc:"Streaming, burst, delay, and three-part loop streaming with start, loop, and end sections.",burstDesc:"Emit a fixed number of particles once.",delayDesc:"Wait time before emission starts, shown at the left edge of the particle bar.",loopNote:"Loop streaming does not support bone or path following and resets those settings when enabled.",shapeDesc:"Point, circle, rectangle, cone, or path spawn areas. Circle/cone use inner and outer radii; rectangles use inner and outer dimensions.",angleDesc:"Fixed, random, radial, path normal, or path tangent.",initialDesc:"Life, speed, scale, and rotation support fixed, random, and curve modes. Rotation can follow emission direction.",overLifeDesc:"Speed, scale, and rotation can be controlled by lifetime curves.",alphaDesc:"Opacity can be fixed or curved. Curve mode can follow export, linear, or Bézier.",imageDesc:"Single images or sequence frames, weighted image selection, pivots, colors, blend modes, and independent opacity.",sequenceDesc:"Playback can hide after one pass, hold the last frame, loop forward, or loop in reverse.",noiseDesc:"Adds movement noise with strength, range, and speed controls.",gravityDesc:"Gravity, wind, and lifetime strength curves.",forceDesc:"Global force field, vortex, attraction, and collision.",trailDesc:"Independent trail resources with bones, length, width, shape, color, and opacity curves.",followDesc:"The emitter can follow a path or a Spine bone.",collisionDesc:"Choose scene colliders and particle collision response.",exportDesc:"Configure image path, Spine version, keyframe curves, FPS, frame alignment, bone pool, and empty animations.",exportButtonsDesc:"Export Spine JSON, an images ZIP, or a complete .spine project through the connector.",connectorTitle:"Spine Connector",connectorIntro:"The connector sends generated JSON and images to a locally installed and activated Spine editor and converts them into an editable .spine project.",prerequisite:"Requirements",prerequisiteDesc:"Install and activate Spine, then start the desktop connector.",download:"Download",webSide:"Website",webSideDesc:"When the connector reports ready, click Export .spine package.",authorization:"First authorization",authorizationDesc:"Approve the website origin once. The connector stores the local allowlist.",pathSetup:"Application path",pathSetupDesc:"The connector detects Spine automatically. Set the application path manually if detection fails.",downloadResult:"Output",downloadResultDesc:"The downloaded ZIP contains the .spine project and image folder.",version:"Version",versionDesc:"The connector matches Spine 3.8–4.3 from the JSON version.",security:"Security",securityDesc:"The connector listens only on the local machine and deletes temporary conversion files.",differenceTitle:"Config vs. export",differenceDesc:"Save Config preserves editable objects and parameters. Export Spine JSON includes only visible particle systems and bakes collisions, following, trails, and sub-emitters into editable animation data."},cN={confirmLoopFollowEnter:"Enabling loop stream disables particle following and resets its settings. Continue?",confirmLoopFollowExit:"Leaving loop stream disables particle following and resets its settings. Continue?",invalidJson:"The configuration file is not valid JSON",invalidConfigFormat:"This is not a SpineParticle editor configuration",unsupportedConfigVersion:"Unsupported configuration version: {version}",missingScene:"The configuration is missing complete scene data",missingEmbeddedSpine:"The configuration does not contain reusable Spine source assets",chooseJsonConfig:"Choose a .json configuration file",settingsInvalidJson:"The cached settings are not valid JSON",settingsFormat:"This is not a SpineParticle settings cache",settingsVersion:"Unsupported settings version: {version}",settingsMissing:"The settings cache is missing settings",noExportableImages:"The visible particle systems have no exportable images",invalidZipPath:"Invalid ZIP file path",spineFileType:"Spine data must be .json or .skel",atlasFileType:"Atlas files must use .atlas",chooseTexture:"Choose at least one texture image",binaryParseFailed:"Spine binary parsing failed (4.3: {v43}; legacy: {v42})",invalidSpineJson:"Invalid Spine JSON format",unsupportedSpineJsonVersion:"Unsupported Spine JSON version. Supported versions: {versions}",unsupportedSpineDataVersion:"Unsupported Spine data version. Supported versions: {versions}",embeddedReadFailed:"Unable to read embedded Spine file: {name}",missingImageWarning:"Image “{file}” is missing or has unreadable dimensions. Its path was kept.",missingTrailImageWarning:"Trail image “{file}” is missing. Its path was kept.",emptyCacheWarning:"“{name}” has no baked frame cache.",readExportImageFailed:"Unable to read export image: {name}",connectorOffline:"Local Spine connector was not detected. Start the connector first.",connectorHttpError:"Spine connector returned HTTP {status}",invalidTrailUV:"Trail mesh “{name}” has invalid UV data",missingTrailVertices:"Trail mesh “{name}” has no vertex data",trailIndexOutOfRange:"Trail mesh “{name}” has an out-of-range triangle index",invalidTrailHull:"Trail mesh “{name}” has an invalid hull size",trailHullIndexOutOfRange:"Trail mesh “{name}” has an out-of-range hull edge index",invalidInfluenceCount:"Trail mesh “{name}” has an invalid bone influence count",missingBoneReference:"Trail mesh “{name}” references a missing bone",invalidWeight:"Trail mesh “{name}” contains invalid weights",weightSum:"Trail mesh “{name}” vertex weights do not sum to 1",vertexCountMismatch:"Trail mesh “{name}” vertex count does not match its UV count",invalidInherit:"Bone “{name}” has inherit value “{inherit}” incompatible with Spine {version} JSON",trailBoneParent:"Trail bone “{name}” must be a direct child of the particle system bone, not a bone chain",trailSlotEmpty:"Weighted trail slot “{name}” cannot use an empty attachment. Hide the bones with zero scale instead.",spine38Version:"Spine 3.8 export must identify its version as 3.8",spine38Inherit:"Spine 3.8 bone “{name}” must use transform instead of inherit",spine38SlotColor:"Spine 3.8 slot color timelines must use color / twoColor",spine38AttachmentName:"Spine 3.8 hidden attachment frames must explicitly write name: null",spine38RotationAngle:"Spine 3.8 rotation timelines must use angle",spine38Curve:"Spine 3.8 does not support Spine 4.x array curves",unsupportedExportVersion:"Unsupported export version. Supported Spine versions: {versions}",exportVersionMismatch:"Export version mismatch: expected Spine {expected}, JSON reports Spine {actual}",exportMissingBones:"Export result contains no bones",missingAtlasTexture:"Atlas texture was not selected: {name}"},dN={app:XO,language:YO,common:zO,toolbar:jO,settings:HO,config:GO,curve:WO,gradient:qO,attributeControl:KO,pivot:JO,image:ZO,timeline:QO,emission:eN,attributes:tN,appearance:nN,renderLayer:iN,export:{title:"Export Resources",reset:"Reset export resources",imagesPath:"Image path (Spine Images Path)",spineVersion:"Spine version",keyframeCurve:"Keyframe interpolation",linear:"Linear",smoothBezier:"Smooth Bézier",bezierHelp:"Smooth Bézier fits continuous motion within the error tolerance; birth, death, attachment changes, and jumps still use stepped keys.",spine38Help:"Spine 3.8 does not support per-channel array Bézier curves. Export converts them to tolerance-reduced piecewise linear keys.",fps:"Export FPS",omitFps:"Omit fps",fpsHelp:"Changing FPS preserves real animation duration. “Omit fps” only removes the Spine fps metadata.",integerFrames:"Integer frame alignment",bonePool:"Bone object pool",excludeEmpty:"Exclude empty animations",baking:"Recalculating and baking animation",exportJsonTitle:"Export Spine {version} JSON",preparing:"Preparing export…",exportJson:"Export Spine JSON",exportImagesTitle:"Download the images used by the current particle systems as a ZIP",organizingImages:"Collecting images…",exportImages:"Export images ZIP",generatingProject:"Generating project…",exportSpine:"Export .spine package",authorize:"Authorize this site",authorizeTitle:"Authorize this site in the local connector",refreshConnector:"Check connector again",refresh:"Refresh",recalculating:"Recalculating particle animation…",exported:"Exported Spine {version}: {systems} particle systems, {animations} animations, {bones} bones{warning}",resourceWarning:"; {count} resource warnings (export continued without missing images)",timeout:"Baking timed out. Ensure the page is still running and try again.",preparingProject:"Collecting images and calling local Spine…",projectExported:"Generated {fileName}: .spine project with {images} images, Spine {version}",collectingImages:"Collecting images used by the current particle systems…",imagesExported:"Generated {fileName}: {images} images in {folder}/",connectorChecking:"Checking the local Spine connector…",connectorOffline:"Local Spine connector is not running",spineNotFound:"Connector is running, but Spine was not found",notAuthorized:"Connector is running, but this site is not authorized",connectorReady:"Connector available · Spine ready",connectorBusy:"Recalculating and generating the Spine project",connectorGenerate:"Generate a Spine {version} project with the local Spine",unknown:"Unknown",checking:"Checking",offline:"Offline",notFound:"Spine not found",unauthorized:"Not authorized",projectTransferTitle:"Export Spine Package",projectTransferDetail:"Recalculating particle animation…",projectTransferDownload:"Spine project download started",generatingJson:"Generating Spine JSON…",preparingProjectFiles:"Preparing project images…",uploading:"Uploading data to the Spine connector…",spineProcessing:"Spine is converting the project…",downloadingProject:"Downloading the generated Spine project…",handingToBrowser:"Starting browser download…"},transfer:sN,scene:rN,modifiers:oN,spine:aN,help:lN,errors:cN},uN={resizeTimeline:"Arrastra para ajustar la altura de la línea de tiempo",systems:"sistema",particlesBones:"Partículas (huesos)",rootBone:"hueso de la raíz",hudTip:"Zoom de rueda · Clic izquierdo para arrastrar el lienzo",title:"Editor de partículas Spine - Yeomai"},hN={close:"Cerrar",collapse:"Contraer",reset:"Restablecer",add:"Añadir",remove:"Quitar",delete:"Eliminar",clear:"Limpiar",cancel:"Cancelar",confirm:"Confirmar",none:"Ninguno",enabled:"Activado",disabled:"Desactivado",fixed:"Fijo",random:"Aleatorio",curve:"Curva",followExport:"Seguir exportación",linear:"Lineal",bezier:"Bézier",above:"Arriba",below:"Abajo",left:"Izquierda",right:"Derecha",seconds:"s",frames:"fotogramas"},fN={settings:"Ajustes",undo:"Deshacer (Ctrl+Z)",pan:"Mover lienzo (Q)",translate:"Mover (W)",rotate:"Girar (E)",scale:"Escalar (R)",zoomIn:"Acercar",zoomOut:"Alejar",fitView:"Ajustar al lienzo",toggleGrid:"Mostrar/ocultar cuadrícula",resetView:"Restablecer vista",background:"Fondo",backgroundSettings:"Ajustes del fondo",changeBackground:"Cambiar imagen",uploadBackground:"Subir imagen",clearBackground:"Borrar fondo",noBackground:"Sin imagen",backgroundX:"Desplazamiento X de la imagen de fondo",backgroundY:"Desplazamiento Y de la imagen de fondo",backgroundOpacity:"Transparencia de la imagen de fondo",opacity:"Opacidad",help:"Ayuda",openHelp:"Abrir ayuda"},pN={title:"Configuración del sistema",layout:"Diseño de interfaz",floatingMenu:"Menú flotante",floatingMenuParticleOnly:"Selecciona primero un sistema de partículas",parameterPanelPosition:"Ubicación del panel de parámetros",panelOnRight:"El panel de parámetros se muestra a la derecha.",history:"Historial de operaciones",maxUndo:"Número máximo de pasos hacia atrás",canvasGuides:"Display auxiliar de lona",emitter:"punto de lanzamiento",bones:"Conexión ósea",bonePointSize:"Tamaño del dibujo de la punta del hueso",boneAxisSize:"Tamaño del dibujo del eje",skinMesh:"malla desollada",enableTicks:"Habilitar ticks",tickFontSize:"Escalar el tamaño del texto",tickWidth:"espesor de la marca de verificación",axisColor:"color del eje",showAxisLabels:"Mostrar valor de escala",unsavedPrompt:"Avisar sobre cambios sin guardar",showProjectSize:"Mostrar espacio usado por las configuraciones",cacheNote:"Toda la configuración del sistema se guarda automáticamente en el navegador actual."},mN={title:"Gestión de configuración",save:"Guardar configuración",saveTitle:"Guardar configuración en la caché del navegador",load:"Cargar configuración",loadTitle:"Cargar la configuración del editor local",presets:"Lista preestablecida",selectPreset:"Seleccionar preajuste",noPresets:"Sin preajustes",saved:"La configuración se ha guardado localmente.",loading:"Cargando configuración…",loaded:"Cargado: {name}",presetLoading:"Cargando ajustes preestablecidos…",presetLoaded:"Preestablecido cargado: {name}",presetNamingError:"{message}, verifique el nombre de archivo predeterminado",presetTransferTitle:"Cargar preajuste",presetDownloading:"Descargando {file}…",presetParsing:"Analizando la configuración predeterminada...",presetRestoring:"Analizando y restaurando recursos predeterminados...",presetComplete:"Carga preestablecida completada",presetListError:"No se puede leer la lista preestablecida",presetReadError:"No se puede leer el ajuste preestablecido: {file}",local:{listTitle:"Lista de configuraciones",empty:"No hay configuraciones guardadas en este navegador",saveTitle:"Guardar configuración en la caché del navegador",name:"Nombre de la configuración",namePlaceholder:"Por ejemplo: Efecto de fuegos artificiales",load:"Cargar",loadHint:"Doble clic para cargar",download:"Descargar",delete:"Eliminar",downloadCurrent:"Descargar configuración actual",downloadAll:"Descargar todas las configuraciones",loadAll:"Cargar todas las configuraciones",loadAllConfirm:"¿Importar {count} archivos de configuración? Las configuraciones con el mismo nombre se sobrescribirán.",loadAllDone:"{count} configuraciones cargadas desde archivos",loadAllPartial:"{imported} configuraciones importadas; {failed} archivos fallaron",overwriteSave:"«{name}» ya existe. ¿Sobrescribir?",loadOverwrite:"Cargar «{name}» sustituirá la escena actual y descartará los cambios no guardados. ¿Continuar?",deleteConfirm:"¿Eliminar «{name}»?",nameRequired:"Introduce un nombre de configuración",nameInvalid:'El nombre no puede contener \\ / : * ? " < > |',storageUnavailable:"El almacenamiento local del navegador no está disponible",saved:"Guardado en el navegador: {name}",loaded:"Cargado desde el navegador: {name}",deleted:"Configuración eliminada del navegador: {name}",downloadEmpty:"No hay configuraciones para descargar",downloaded:"Descargado: {name}"}},gN={bezierHint:"Arrastre el controlador cuadrado para ajustar el arco · Haga doble clic en un espacio en blanco para crear uno nuevo · Haga doble clic en un nodo para eliminarlo",linearHint:"Haga doble clic en un espacio en blanco para crear uno nuevo. Haga doble clic en un nodo para eliminarlo. Arrastra un nodo para ajustarlo.",resetTitle:"Restaurar curva predeterminada"},vN={addTitle:"Haga doble clic en la cinta para agregar una marca de color.",color:"Código de colores",colorValue:"Valor de color de la escala de color",position:"Posición de la marca de color",addMiddle:"Añade color en el medio.",delete:"Eliminar parche de color actual",hint:"Haga doble clic en la banda de color para agregar una nueva · Arrastre la marca de color para ajustar su posición · Haga doble clic en la marca de color para eliminarla"},bN={angleOffset:"Desplazamiento de ángulo",value:"valor numérico",lower:"límite inferior",upper:"límite superior",rangeLower:"Límite inferior del rango",rangeUpper:"Rango superior",curveInput:"Entrada de curva →",direction:"Dirección de lanzamiento"},yN={title:"punto de pivote del mapa",zoomOut:"alejar",zoomIn:"agrandar",expand:"Operación de zoom a pantalla completa",interaction:"Haga clic izquierdo/arrastre para establecer el punto de pivote · Haga clic derecho para arrastrar el lienzo · Rueda de desplazamiento para hacer zoom",previewAlt:"Vista previa del punto de pivote",noImage:"Ninguna imagen seleccionada",resetCenter:"Reposicionar en el medio (50%, 50%)",coordinates:"Coordenadas del punto del eje (%)",rotationTest:"Prueba de rotación del eje",static:"aún",spin:"rotación",swing:"balancearse",rotationAlt:"prueba de rotación",topLeft:"arriba a la izquierda",top:"Justo arriba",topRight:"arriba a la derecha",left:"derecha izquierda",center:"medio",right:"Bien",bottomLeft:"abajo a la izquierda",bottom:"Directamente debajo·abajo",bottomRight:"abajo a la derecha"},xN={chooseSequence:"Seleccionar imágenes de fotogramas de secuencia",chooseLocal:"Seleccionar imagen local",subfolder:"subcarpeta",name:"nombre",restore:"Restaurar {name}",deleteResource:"Eliminar recursos de imagen",imageMode:"Modo de imagen",fixed:"Imagen única",sequence:"Secuencia",playbackMode:"modo de juego",onceHide:"Una vez, ocultar al final",onceHold:"Una vez, mantener último fotograma",loopForward:"Bucle hacia delante",loopReverse:"Bucle inverso",playbackFps:"Velocidad de fotogramas de reproducción",chooseSequenceMulti:"Seleccionar fotogramas de secuencia (múltiples selecciones)",weight:"Peso %",unlockWeight:"Desbloquear bloqueo de proporción",lockWeight:"Bloquear la proporción actual",pivot:"Pivote de textura",collapsePivot:"Ajuste del punto de pivote de colapso",expandPivot:"Ampliar el ajuste del punto de pivote",pivotModal:"Refinamiento de imagen grande del punto del eje de rotación de la textura",pivotModalDesc:"Haga clic o arrastre a cualquier parte del mapa a continuación para establecer con precisión el centro de rotación/oscilación de las partículas.",pivotZoomHint:"Admite un aumento del 100 % al 400 % y apunta con precisión a la punta o la raíz:",confirmPivot:"Determinar y guardar el punto de pivote",noSequence:"No se ha seleccionado ningún cuadro de secuencia",firstFrame:"Cuadro 1",firstImage:"primera foto",lastImage:"última foto",pivotOn:"Abierto: X {x}% | Y {y}%",pivotOff:"No activado, el valor predeterminado está alrededor del centro de la imagen (50%, 50%)",pivotCustom:"Se ha personalizado el punto de pivote: X {x}% | Y {y}%",frameCountOne:"1 cuadro · {name}",frameCountMany:"Marco {count} · {first} → {last}",sequenceSelected:"El fotograma {count} ha sido seleccionado y reproducido en el orden {first}-{last}."},wN={play:"Reproducir(D)",pause:"Pausa (D)",toStart:"Volver al primer cuadro (S)",previous:"fotograma anterior",next:"siguiente fotograma",toEnd:"Ir al último fotograma",continuousLoop:"Reproducción en bucle continuo",abLoop:"Bucle independiente del rango A/B",abLoopShort:"Bucle AB",abRange:"Intervalo de ciclo AB",playbackStart:"Cuadro de inicio de reproducción personalizado",playbackEnd:"Fotograma final de reproducción personalizado",startFrame:"Reproducir cuadro de inicio",endFrame:"Reproducir fotograma final",frame:"marco",emission:"Emisión",particleLife:"Partículas activas",spineAnimation:"Animación de Spine",ownerAnimation:"Animación asociada",setOwnerAnimation:"Establecer la animación a la que pertenece el sistema de partículas actual.",chooseOwnerAnimation:"Seleccione la animación",animationName:"Nombre de la animación",renameAnimation:"Cambiar el nombre de la animación actual",rename:"Rebautizar",newAnimation:"+ Nuevo",keepOneAnimation:"Es necesario conservar al menos una animación.",spinePreview:"Animación de vista previa Spine",noSpineAnimation:"No hay animación Spine disponible",none:"ninguno",systemName:"Sistema {index}",dragLoopDuration:"Duración del segmento del bucle de arrastre",dragEmissionDuration:"Duración del arrastre",dragSpineStart:"Arrastre para ajustar la hora de inicio de la animación",noAnimationData:"Actualmente no hay datos de animación para mostrar.",animationNameEmpty:"El nombre de la animación no puede estar vacío.",animationNameDuplicate:"Los nombres de las animaciones no se pueden repetir.",animationRenameFailed:"No se puede modificar el nombre de la animación",zoomIn:"agrandar",zoomOut:"alejar",zoomFit:"Moderado",frameStatus:"Fotograma {current} / {total}"},SN={title:"Modo de emisión",reset:"Restablecer los parámetros del modo de transmisión",stream:"Continuo",burst:"Ráfaga",normalStream:"Continuo normal",loopStream:"Bucle continuo",rate:"Tasa de emisión",duration:"Duración de emisión",loopDuration:"Duración del lanzamiento (f)",generateStart:"Generar animación de bucle de inicio",generateEnd:"Generar animación de bucle final",customDuration:"Especificar duración",auto:"Automático {frames}f",startLoopDuration:"Duración del segmento de bucle inicial",endLoopDuration:"Duración del segmento de bucle final",loopWarning:"El modo de persistencia de bucle no admite el seguimiento de huesos ni el seguimiento de rutas; Las siguientes configuraciones de partículas se restaurarán a los valores predeterminados al entrar o salir.",burstCount:"Cantidad por ráfaga",delay:"Retardo",shapeTitle:"Forma del emisor",shapeReset:"Restablecer los parámetros de forma del emisor",shape:"forma",point:"Punto",circle:"Círculo",rect:"Rectángulo",cone:"Cono",path:"Ruta",innerDiameter:"diámetro interior",outerDiameter:"diámetro exterior",innerRadius:"radio interior",outerRadius:"radio exterior",coneDirection:"Orientación cónica",coneAngle:"Ángulo de apertura cónica",innerWidth:"ancho interior",innerHeight:"Alto por dentro",outerWidth:"Ancho exterior",outerHeight:"extra alto",selectPath:"Seleccionar ruta",noPath:"Sin camino (emisión puntual)",birthDistribution:"distribución de nacimientos",evenDistribution:"Distribución fija equiespaciada",randomDistribution:"distribución aleatoria",emissionAngle:"ángulo de lanzamiento",radial:"Radial (centro hacia afuera)",pathNormal:"perpendicular al camino",pathTangent:"a lo largo de la dirección del camino",fixedAngle:"ángulo fijo",baseAngle:"ángulo base",randomRange:"rango aleatorio",showShape:"mostrar forma"},CN={title:"Atributos de partículas",reset:"Restablecer parámetros de atributos de partículas",initialParams:"Valores iniciales",initialLife:"ciclo de vida inicial",randomSample:"Muestreo aleatorio →",initialSpeed:"velocidad inicial",initialScale:"escalamiento inicial",uniform:"unificado",separateXY:"separación XY",scaleX:"Ampliar X",scaleY:"Zoom Y",initialRotation:"rotación inicial",lifecycleTitle:"Cambios durante la vida útil",speedOverLife:"velocidad del ciclo de vida",speedMultiplier:"multiplicador de velocidad",lifeTo:"ciclo de vida →",scaleOverLife:"Escalar durante el ciclo de vida",scaleMultiplier:"Relación de zoom",multiplierX:"Aumento",multiplierY:"Ampliación Y",rotationOverLife:"Girar durante el ciclo de vida.",rotationSpeed:"Velocidad de rotación"},AN={title:"Apariencia y recursos",reset:"Restablecer parámetros de apariencia y recursos",opacity:"Opacidad",curveMode:"Modo curva",transparent:"0 (transparente)",opaque:"1 (opaco)",renderLayer:"Capa de renderizado (slot de Spine)",top:"nivel superior",spineSlot:"Ranura Spine",selectSpine:"Por favor seleccione Spine",noSpine:"Ninguno disponible Spine",noSlot:"Aún no se ha seleccionado ningún espacio",reselect:"Reseleccionar",selectSlot:"Seleccionar ranura",searchSlots:"Busque el nombre de la ranura o del accesorio...",searchSlotsAria:"Buscar espacios",emptySlot:"Ranura vacía",noMatchingSlots:"No hay ranura coincidente",above:"encima de esta imagen de tragamonedas",below:"debajo de esta imagen de tragamonedas",followAttachment:"Mostrar y ocultar con accesorios de tragamonedas",previewOnly:"Ajustar el nivel de visualización solo afecta la vista previa del editor y no afecta los datos exportados.",imageResources:"Recursos de imagen",addImage:"Agregar recursos de imagen",scale:"Zoom",color:"color",fixedColor:"color fijo",randomColor:"color aleatorio",lifetime:"ciclo vital",normal:"Normal",add:"Suma",multiply:"Multiplicación",screen:"Pantalla",fixedColorValue:"valor de color fijo",randomColorHint:"Cada partícula elige aleatoriamente un color de la cinta cuando nace y permanece sin cambios durante su ciclo de vida.",independentAlpha:"Opacidad independiente",off:"Desactivado"},TN={slotLabelAbove:"{spine} / {slot} · Imagen de arriba",slotLabelBelow:"{spine} / {slot} · Debajo de la imagen",resolvedAbove:"Representado encima de la imagen {slot} y debajo de su ranura.",resolvedBetween:"Representado entre {previous} y {slot}",warningNoSpine:"No hay ningún Spine cargado y las partículas se muestran temporalmente en la parte superior.",warningNoSelection:"Spine aún no se ha seleccionado y las partículas se muestran temporalmente en la parte superior.",warningMissingSpine:"El objetivo Spine no existe y las partículas se muestran temporalmente en la parte superior.",warningNotReady:"El objetivo Spine no está listo y las partículas se muestran temporalmente en la parte superior.",warningMissingSlot:"La ranura de destino no existe (es posible que el recurso haya sido reemplazado) y las partículas se muestran temporalmente en la parte superior.",warningFirstSlot:"Esta es la primera ranura y no se puede mostrar debajo de ella; las partículas se muestran temporalmente en la parte superior."},EN={completed:"Terminado",failed:"Operación fallida"},_N={title:"Objetos de escena",addParticle:"Agregar sistema de partículas",addParticleShort:"+partícula",addCollider:"Agregar colisionador",addColliderShort:"+colisión",addPath:"agregar ruta",addPathShort:"+ camino",addSpine:"Añadir Spine",copyTitle:"Copiar el objeto de escena seleccionado actualmente",showParticle:"Mostrar sistema de partículas",hideParticle:"Ocultar sistema de partículas",showCollider:"mostrar colisionadores",hideCollider:"Ocultar colisionador",showPath:"mostrar ruta",hidePath:"Ocultar ruta",showSpine:"Pantalla Spine",hideSpine:"Ocultar Spine",particle:"Partículas",subEmitter:"Subemisor",collision:"Colisión",path:"Ruta",deleteParticle:"Eliminar sistema de partículas",deleteCollider:"Eliminar colisionadores",deletePath:"eliminar ruta",deleteSpine:"Eliminar Spine",empty:"Aún no hay objetos en la escena.",name:"nombre",positionX:"Posición X",positionY:"Posición Y",offsetX:"Desplazamiento X",offsetY:"Desplazamiento Y",rotation:"Rotación",scaleX:"Escala X",scaleY:"Escala Y",seed:"Semilla aleatoria",seedTitle:"Controle todos los atributos aleatorios, la selección de recursos y el muestreo aleatorio de modificadores en el sistema de partículas.",randomizeSeed:"Generar una nueva semilla aleatoria global",seedHint:"Controlar los parámetros aleatorios iniciales, la selección de recursos y el muestreo aleatorio modificador; la misma semilla puede reproducir el mismo efecto",colliderTitle:"Propiedades del colisionador",colliderName:"Nombre del colisionador",type:"tipo",circle:"redondo",ellipse:"oval",rect:"rectángulo",polygon:"polígono",custom:"Personalizar",enabled:"permitir",xPosition:"Posición X",yPosition:"Posición Y",scaleXShort:"Escala X",scaleYShort:"Escala Y",radius:"radio",radiusX:"radio X",radiusY:"radio Y",width:"ancho",height:"alto",sides:"Número de lados",collisionResponse:"Respuesta de choque",physics:"Física (rebote/fricción)",pause:"Pausa (parar)",destroy:"Desaparecer (destruir inmediatamente)",elasticity:"Elasticidad (0-1)",friction:"Fricción (0-1)",followPath:"Sigue el camino",targetPath:"ruta de destino",notSelected:"(no seleccionado)",moveDuration:"Duración del movimiento (segundos)",followDirection:"dirección a lo largo del camino",moveProgressCurve:"Curva de progreso en movimiento",moveProgressHelp:"Eje horizontal: tiempo real/duración del movimiento; eje vertical: progreso del camino (0=punto inicial → 1=punto final)",pathTitle:"atributo de ruta",pathName:"nombre de la ruta",closedPath:"camino cerrado",pathColor:"color del camino",pathHelp:"Instrucciones de funcionamiento:",pathHelpItems:"Haga doble clic en el espacio en blanco/curva: cree un nuevo punto de anclaje, haga doble clic en el punto de anclaje: elimine el nodo, haga doble clic la segunda vez y arrastre: cree uno nuevo y extraiga el controlador, arrastre el punto de anclaje para mover la posición, arrastre el controlador para ajustar la curva, Mayús + controlador de arrastre: completamente simétrico en ambos lados, Alt+control de arrastre: controle independientemente un lado, Ctrl+clic/selección de marco: agregue nodos seleccionados, Alt+clic/selección de marco: reste nodos seleccionados, Alt+clic en el espacio en blanco: borre todas las selecciones, seleccione varios nodos y arrástrelos como un todo",applyPresetShape:"Aplicar una forma preestablecida",choosePreset:"Seleccione un preajuste...",square:"Cuadrado",star:"forma de estrella",applyPreset:"Aplicar preajuste",clearAnchors:"punto de anclaje claro",panelHint:"Utilice el botón en la esquina superior derecha para crear un objeto de escena."},MN={title:"Modificadores",reset:"Restablecer parámetros del modificador",damping:"Amortiguación",enableNoise:"Activar ruido de movimiento",strength:"fortaleza",noiseRange:"Rango de fluctuación",noiseSpeed:"Flujo de tiempo",noiseHint:"El control de intensidad afecta la proporción · El rango de fluctuación controla la desviación máxima · El flujo de tiempo controla la velocidad de cambio",enableGravity:"Activar gravedad",gravityStrength:"Fuerza de gravedad",strengthMin:"Fuerza mínima",strengthMax:"Fuerza máxima",direction:"dirección",gravityOverLife:"Gravedad durante el ciclo de vida.",windOverLife:"viento del ciclo de vida",axisStrength:"Eje vertical: intensidad 0~1",directionHint:"0° derecha · -90° abajo · La intensidad negativa invierte la dirección",enableWind:"Activar viento",windStrength:"fuerza del viento",enableForceField:"Activar campo de fuerza",centerX:"Centro X",centerY:"Centro Y",forceStrength:"Fuerza del campo de fuerza",forceRadius:"radio del campo de fuerza",falloffMode:"modo de decadencia",constant:"Constante (la velocidad no cambia dentro del rango)",linearFalloff:"Caída lineal (el borde es 0)",inverseFalloff:"Inversamente proporcional a la distancia (más fuerte en el centro)",forceHint:"Los números positivos se atraen hacia el centro, los números negativos se repelen hacia afuera y el círculo del campo de fuerza se puede arrastrar dentro del lienzo.",showShape:"mostrar forma",enableVortex:"Activar vórtice",vortexHint:"Números positivos en sentido antihorario · Números negativos en sentido horario",enableAttraction:"Activar atracción",attractionX:"Punto de adsorción X",attractionY:"Punto de adsorción Y",attractionRadius:"radio de adsorción",attractionDuration:"tiempo de adsorción",delay:"tiempo de retraso",delayMode:"Modo de retardo",globalTime:"tiempo unificado",particleLife:"vida de una sola partícula",attractionPath:"Método de adsorción",straight:"linea recta",attractionHint:"Después del retraso, la adsorción comienza desde la posición actual. Cuando alcance el rango rojo, morirá. El círculo de adsorción se puede arrastrar dentro del lienzo.",enableTrail:"Activar estela",trailImages:"Imágenes finales independientes",addTrailImage:"Agregar recursos de imágenes finales",trailRotation:"girar",trailBones:"Número de huesos posteriores",trailRatio:"Relación de seguimiento (%)",trailLength:"longitud de salida",randomRange:"rango aleatorio",lengthRatio:"Relación de longitud (%)",lengthMin:"Longitud mínima (%)",lengthMax:"Longitud máxima (%)",trailWidth:"Ancho de salida",widthRatio:"relación de ancho (%)",widthMin:"Ancho mínimo (%)",widthMax:"Ancho máximo (%)",widthScale:"escala de ancho",followParticle:"seguir partículas",lifeLengthCurve:"curva de longitud del ciclo de vida",shapeCurve:"Curva de forma (cabeza → ancho de cola)",colorMode:"modo de color",blendMode:"modo de fusión",fixedColor:"color fijo",alphaMode:"modo de transparencia",opacity:"transparencia",gridRows:"Número de filas de la cuadrícula",gridCols:"Número de columnas de la cuadrícula",trailHint:"Cada partícula genera un conjunto de huesos posteriores hermanos en proporción a los recursos; la longitud y el ancho aleatorios se determinan cuando nace la partícula, y la misma semilla se puede reproducir de manera estable",enableFollow:"Activar seguimiento del emisor",followMode:"modo de seguimiento",noFollow:"ninguno",followPath:"sigue el camino",selectedBone:"huesos seleccionados",emitterAngleMode:"Modo de ángulo del transmisor",fixedAngle:"ángulo fijo",followMoveDirection:"Sigue la dirección del movimiento.",moveProgressCurve:"Curva de progreso del movimiento (0→1)",moveDuration:"Duración del movimiento (s)",followSpace:"seguir el espacio",localSpace:"Espacio local (movimiento GEN)",worldSpace:"Espacio mundial (movimiento del punto de generación de partículas)",moveDirection:"dirección de movimiento",forward:"Adelante (punto inicial → punto final)",reverse:"Invertir (punto final → punto inicial)",followOffset:"Punto de partida compensado (0-1)",followSpaceHint:"El espacio local mueve todo el emisor; el espacio mundial solo mueve el punto de generación de nuevas partículas, y las partículas nacidas permanecen en la posición mundial.",followTarget:"Sigue el objetivo:",noValidBone:"Aún no se ha vinculado ningún hueso válido; seleccione primero el hueso en el árbol jerárquico Spine.",rebind:"reencuadernar",bind:"vinculante",selectedBoneLabel:"Hueso actualmente seleccionado:",boneLocalSpace:"Espacio local (se mueve con huesos)",boneWorldSpace:"Espacio mundial (las partículas mantienen su posición después de generarse)",offsetX:"Compensación de desplazamiento X",offsetY:"Compensación de desplazamiento Y",rotationOffset:"Desplazamiento de rotación",scaleOffsetX:"Compensación de escala X",scaleOffsetY:"Desplazamiento de escala Y",boneFollowHint:"El emisor solo sigue la posición del hueso Spine seleccionado y no hereda la rotación o escala de Spine; la transformación de partículas utiliza los propios parámetros del sistema de partículas y el desplazamiento superior.",enableCollision:"Activar colisión",collisionObjects:"Objetos de colisión participantes",colliderDisabled:"{name} (colisionadores desactivados)",clearCollider:"Borrar objeto de colisión {name}",addCollider:"Agregar objetos de colisión de escena",noAvailableColliders:"No hay objetos de colisión para agregar",noCollidersSelected:"No se selecciona ningún objeto de colisión y las partículas actuales no colisionarán.",available:"Disponible",disabled:"Desactivado",collisionHint:"Sólo los objetos de colisión de escena agregados y habilitados participarán en la colisión del sistema de partículas actual.",enableSubEmitter:"Activar subemisores",triggerTiming:"Elija el tiempo de activación",birth:"nacido",death:"morir",collision:"colisión",chooseTarget:"Seleccione el sistema de partículas objetivo",noTarget:"Ninguno (sistema de partículas)",deleteSubEmitter:"Eliminar este subemisor",probability:"probabilidad de emisión",collisionLimit:"Límite de colisión",inherit:"heredar",colorInheritMode:"Método de herencia de color",add:"Agregar",replace:"cubrir",addSubEmitter:"+ Se agregó un nuevo subemisor",inheritNone:"Ninguno (predeterminado)",inheritAll:"Todas las propiedades",inheritColor:"color",inheritScale:"tamaño",inheritRotation:"girar",inheritLife:"ciclo vital"},PN={title:"Propiedades de Spine",name:"Nombre Spine",xPosition:"Posición X",yPosition:"Posición Y",rotation:"Rotación",scaleX:"Escala X",scaleY:"Escala Y",startTime:"Tiempo inicial",resources:"Recursos de Spine",chooseFolder:"Seleccionar carpeta y cargar",folderHint:"Lea JSON / SKEL, Atlas y todas las texturas en una carpeta a la vez; Los recursos aún se pueden reemplazar individualmente a continuación.",choose:"elegir",chooseMultiple:"Seleccionar (múltiples opciones)",loading:"cargando…",load:"↧ Cargar",clear:"Claro",supportNote:"Soporte Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · Carga bajo demanda cuando se está ejecutando la versión correspondiente · Local fuera de línea",currentResource:"Recurso actual {version}",animations:"Animaciones de Spine",noAnimations:"No hay animación disponible",timelineAnimation:"Reproducir animación en la línea de tiempo",no:"ninguno",hierarchy:"Jerarquía",clearBoneTitle:"Haga clic para borrar la selección de huesos",noBoneTitle:"No hay huesos seleccionados actualmente",clearBone:"Borrar huesos seleccionados: {name}",currentBone:"Esqueleto actual:",clearSlotTitle:"Haga clic para borrar la selección de ranuras",noSlotTitle:"Actualmente no hay ningún espacio seleccionado",clearSlot:"Borrar ranura seleccionada: {name}",currentSlot:"Ranura actual:",notSelected:"No seleccionado",expandAll:"Expandir todo",collapseAll:"Contraer todo",bones:"esqueleto",slots:"ranura",notLoaded:"No cargado Spine",searchBones:"buscar huesos",searchBonesPlaceholder:"Buscar nombre del hueso…",clearSearch:"Borrar búsqueda",clearBoneSearch:"Búsqueda ósea clara",noMatchingBones:"No se encontró ningún hueso coincidente",expandChildren:"Ampliar los huesos del niño",collapseChildren:"Colapso de huesos infantiles",notLoadedSlots:"Ranura Spine no cargada",searchSlots:"Buscar espacios",searchSlotsPlaceholder:"Busque el nombre de la ranura o del accesorio...",clearSlotSearch:"Borrar búsqueda de espacios",noMatchingSlots:"No se encontró ninguna ranura coincidente",slotTitle:"{name} (esqueleto: {bone}, accesorio: {attachment})",empty:"nulo",textureSummary:"{count}Zhang: {names}",textureImages:"Cuadros de textura",missingFolderAssets:"Falta la carpeta seleccionada: {missing}",chooseAssets:"Seleccione los datos Spine, Atlas y todas las imágenes de textura en secuencia"},kN={title:"Ayuda",subtitle:"Inicio rápido desde la creación de partículas hasta el guardado y la exportación",close:"Cerrar instrucciones",closeShort:"Cerrar (Esc)",quickStart:"inicio rápido",stepCreate:'Cree un objeto: use +Partículas / +Colisión / +Ruta / +Spine en el "Objeto de escena" a la izquierda para agregar un objeto de escena.',stepEdit:'Editar partículas: seleccione el sistema de partículas y ajuste "Modo de emisión → Forma del emisor → Propiedades de las partículas → Apariencia y recursos → Modificador".',stepPreview:"Compruebe el efecto: la línea de tiempo inferior se puede reproducir, pausar, cuadro por cuadro o arrastrar; se recalculará automáticamente después de modificar los parámetros.",stepExport:'Guardar y exportar: utilice "Guardar configuración" para conservar el proyecto; "Exportar Spine Json/paquete de imágenes/paquete .spine" para generar el producto terminado.',quickNote:'"Restablecer" en el lado derecho del título de cada grupo de módulos puede restaurar los parámetros predeterminados del grupo; La configuración del sistema se guardará automáticamente en el navegador actual.',commonOps:"Acciones comunes",eye:"ojos pequeños",eyeDesc:"Mostrar/ocultar objetos individualmente; Los sistemas de partículas ocultas no se exportan.",copyDesc:"Copia completamente el objeto seleccionado actualmente para facilitar la comparación de diferentes parámetros.",backgroundDesc:"Cargue la imagen de referencia y ajuste la posición y la transparencia solo para la vista previa del lienzo.",settingsDesc:"El diseño de la interfaz de administración, la pantalla auxiliar, la escala, etc. se guardan automáticamente en el navegador.",undoDesc:"Ctrl+Z retrocede un paso; el número máximo de pasos se puede ajustar en la configuración del sistema.",spineBoneDesc:"Busque y seleccione un hueso en el árbol jerárquico, que el emisor de partículas puede utilizar para seguir.",shortcuts:"Atajos",undoShortcut:"Deshacer el paso anterior",saveShortcut:"Guardar configuración",panShortcut:"Arrastrar lienzo",translateShortcut:"herramienta de desplazamiento",rotateShortcut:"herramienta rotativa",scaleShortcut:"herramienta de zoom",playShortcut:"reproducir/pausar",startShortcut:"Volver al primer fotograma",shortcutNote:"Q / W / E / R primero debe hacer clic en el lienzo; cuando el cursor está en el cuadro de entrada, la tecla de acceso directo de una sola tecla no se activará.",modules:"Guía de módulos",configTitle:"Gestión de configuración",saveConfigDesc:"Guarde todos los objetos y parámetros de la escena actual como archivos JSON del proyecto (también se admite Ctrl+S).",loadConfigDesc:"Seleccione el archivo de configuración local para restaurar el proyecto completo.",presetDesc:"Seleccione una Aplicación rápida predeterminada en el menú desplegable; haga clic en el menú desplegable para actualizar la lista.",configScope:"alcance",configScopeDesc:"La configuración contiene objetos y parámetros; La interfaz y la configuración del sistema se almacenan por separado en el navegador.",sceneTitle:"objeto de escena",particleDesc:"objeto central. Se pueden configurar posición, desplazamiento, rotación, escala y semilla aleatoria; la misma semilla puede reproducir el mismo efecto.",colliderDesc:"Círculo/elipse/rectángulo/polígono/personalizado, admite rebote físico, pausa, destrucción y movimiento a lo largo del camino.",pathDesc:"Ruta Bezier con soporte para puntos de anclaje, manijas de control, cierre, color y formas preestablecidas.",spineDesc:"Cargue datos Spine, Atlas y texturas, busque huesos y ranuras, y siga los emisores.",sceneCommonDesc:"Los objetos se pueden revelar y copiar de forma independiente; Los sistemas de partículas ocultas no se exportan.",emissionDesc:"Duración del bucle de tres etapas de disparo continuo, ráfaga, retraso e inicio/bucle/finalización.",burstDesc:"Emite un número específico de partículas a la vez.",delayDesc:"El tiempo de espera antes de que comience la emisión, correspondiente al extremo izquierdo de la barra de partículas.",loopNote:"La persistencia del bucle no admite el seguimiento de huesos ni de rutas, y las siguientes configuraciones se restaurarán al cambiar.",shapeDesc:"Área de generación de puntos, círculos, rectángulos, conos o caminos. Los círculos/conos admiten radios internos y externos, y los rectángulos admiten ancho y alto internos y externos.",angleDesc:"Fijo, aleatorio, radial, trayectoria normal o trayectoria tangente.",initialDesc:"El ciclo de vida, la velocidad, el escalado y la rotación admiten soporte fijo, aleatorio, curvo y la rotación puede seguir la dirección de lanzamiento.",overLifeDesc:"La ampliación de velocidad, la ampliación del zoom y la velocidad de rotación se pueden controlar mediante la curva del ciclo de vida.",alphaDesc:"Soportes de transparencia fijos o curvos; El modo de curva puede seguir la derivada, lineal o Bézier.",imageDesc:"Imagen única o fotograma de secuencia, aleatorización de peso de varias imágenes, punto de pivote, color, modo de fusión y transparencia independiente.",sequenceDesc:"Los métodos de reproducción incluyen ocultación de una sola vez, congelación de una sola vez, bucle de avance y bucle de retroceso.",noiseDesc:"Genere trazas de fluctuación y controle la intensidad, el alcance y la velocidad.",gravityDesc:"Curvas de intensidad de gravedad, viento y ciclo de vida.",forceDesc:"Campos de fuerza globales, vórtices, adsorción y colisiones.",trailDesc:"Activos finales independientes, número de huesos, longitud, ancho, forma, color y curvas de transparencia.",followDesc:"El emisor puede seguir un camino o hueso Spine.",collisionDesc:"Seleccione objetos de colisión de escena y respuestas de colisión de partículas.",exportDesc:"Establezca la ruta de la imagen, la versión Spine, la curva de fotogramas clave, FPS, los fotogramas enteros, el conjunto de huesos y la animación vacía.",exportButtonsDesc:"Puede exportar Spine JSON, imágenes ZIP o generar proyectos .spine a través del conector.",connectorTitle:"Instrucciones de uso del conector Spine",connectorIntro:"El conector entrega el JSON y las imágenes generadas por la página web al Spine que se ha instalado y activado en la máquina local, y los convierte en proyectos .spine editables.",prerequisite:"carga frontal",prerequisiteDesc:"La computadora tiene Spine instalado y activado, y se ha iniciado el conector de escritorio.",download:"descargar",webSide:"Página web",webSideDesc:'Después de que aparezca "Conector disponible · Spine está listo", haga clic en "Exportar paquete .spine".',authorization:"primera autorización",authorizationDesc:"La primera conexión debe verificar la fuente del sitio web y permitirla una vez; Esta máquina guarda la lista blanca de autorización.",pathSetup:"Configuración de ruta",pathSetupDesc:"El conector detectará automáticamente Spine; si no se puede encontrar, puede especificar manualmente la ruta de la aplicación.",downloadResult:"Descargar resultados",downloadResultDesc:"Obtenga el paquete ZIP, que contiene el proyecto .spine y el directorio de imágenes.",version:"Versión",versionDesc:"El conector coincide automáticamente con Spine 3.8~4.3 según la versión JSON.",security:"Seguridad",securityDesc:"Solo escuche la dirección local, la autorización se guarda en el conector y los archivos temporales se limpian después de la conversión.",differenceTitle:"¿Cuál es la diferencia entre configurar y exportar?",differenceDesc:'"Guardar configuración" guarda todos los objetos y parámetros que se pueden editar; "Exportar Spine Json" solo exporta el sistema de partículas mostrado y convierte los resultados de colisión, seguimiento, seguimiento y subemisor en datos de animación independientes.'},IN={confirmLoopFollowEnter:"Después de ingresar al modo de bucle continuo, la siguiente configuración de partículas no será válida y se restaurará al valor predeterminado. ¿Continuar?",confirmLoopFollowExit:"Después de salir del modo de persistencia del bucle, la siguiente configuración de partículas no será válida y se restaurará a sus valores predeterminados. ¿Continuar?",invalidJson:"El archivo de configuración no es válido JSON",invalidConfigFormat:"No es el perfil del editor SpineParticle",unsupportedConfigVersion:"Versión de configuración aún no compatible: {version}",missingScene:"Al archivo de configuración le faltan datos completos de la escena",missingEmbeddedSpine:"La configuración no contiene recursos originales Spine reutilizables",chooseJsonConfig:"Seleccione un archivo de configuración .json",settingsInvalidJson:"La caché de configuración del sistema no es válida JSON",settingsFormat:"No caché de configuración del sistema del editor SpineParticle",settingsVersion:"La versión de configuración del sistema aún no es compatible: {version}",settingsMissing:"A la caché de configuración del sistema le faltan configuraciones",noExportableImages:"No hay imágenes exportables para el sistema de partículas visible actualmente.",invalidZipPath:"ZIP Ruta de archivo no válida",spineFileType:"Los datos Spine solo admiten .json o .skel",atlasFileType:"Los archivos Atlas solo admiten .atlas",chooseTexture:"Por favor seleccione al menos una imagen de textura",binaryParseFailed:"Error en el análisis binario de Spine (4.3: {v43}; versión anterior: {v42})",invalidSpineJson:"Spine JSON Formato de archivo no válido",unsupportedSpineJsonVersion:"La versión Spine JSON no es compatible, solo se admite {versions}",unsupportedSpineDataVersion:"La versión de datos Spine no es compatible, solo se admite {versions}",embeddedReadFailed:"No se puede leer el archivo Spine incrustado: {name}",missingImageWarning:'Falta la imagen "{file}" o tiene dimensiones ilegibles, la ruta se conserva.',missingTrailImageWarning:'Falta la imagen final "{file}" y se ha conservado la ruta.',emptyCacheWarning:"No hay framebuffer disponible para '{name}'.",readExportImageFailed:"No se puede leer la imagen exportada: {name}",connectorOffline:"Conector local Spine no detectado, habilite el conector primero",connectorHttpError:"El conector Spine devuelve el error: HTTP {status}",invalidTrailUV:"Datos UV no válidos para la malla final '{name}'",missingTrailVertices:"A la malla final '{name}' le faltan datos de vértice",trailIndexOutOfRange:"Índice triangular de la malla final '{name}' fuera de límites",invalidTrailHull:'El número del contorno exterior de la malla final "{name}" no es válido',trailHullIndexOutOfRange:'El índice del borde del contorno exterior de la malla final "{name}" está fuera de límites',invalidInfluenceCount:"La malla final '{name}' contiene un número no válido de pesos óseos",missingBoneReference:"La malla final '{name}' hace referencia a un hueso inexistente",invalidWeight:'La cuadrícula final "{name}" contiene datos de peso no válidos',weightSum:"Los pesos de los vértices de la malla final '{name}' no suman 1",vertexCountMismatch:"La malla final '{name}' tiene un número inconsistente de vértices y UV",invalidInherit:"El valor heredado '{inherit}' para el hueso '{name}' no se ajusta al formato Spine {version} JSON",trailBoneParent:'El hueso posterior "{name}" debe colgarse directamente debajo del hueso del sistema de partículas y no puede formar una cadena ósea.',trailSlotEmpty:'La ranura de cola ponderada "{name}" no puede utilizar accesorios vacíos. La escala ósea correspondiente debe establecerse en 0 en la fase de no aparición o muerte.',spine38Version:"Spine 3.8 El ID de la versión exportada debe ser 3.8",spine38Inherit:'Spine 3.8 Bone "{name}" debería usar transformar y no puede usar heredar',spine38SlotColor:"La línea de tiempo de color de la ranura Spine 3.8 debe usar color/twoColor",spine38AttachmentName:"Spine 3.8 El fotograma oculto de la línea de tiempo del archivo adjunto debe tener un nombre escrito explícitamente: nulo",spine38RotationAngle:"Spine 3.8 Debes usar el ángulo para rotar el eje del tiempo",spine38Curve:"Spine 3.8 no admite el formato de curva de matriz 4.x",unsupportedExportVersion:"La versión exportada no es compatible, solo se admite Spine {versions}",exportVersionMismatch:"Versión de exportación inconsistente: establecida en Spine {expected}, JSON marcada como Spine {actual}",exportMissingBones:"Al resultado de la exportación le faltan huesos",missingAtlasTexture:"La textura a la que hace referencia Atlas no está seleccionada: {name}"},RN={label:"Idioma",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},FN={app:uN,common:hN,toolbar:fN,settings:pN,config:mN,curve:gN,gradient:vN,attributeControl:bN,pivot:yN,image:xN,timeline:wN,emission:SN,attributes:CN,appearance:AN,renderLayer:TN,export:{title:"Recursos de exportación",reset:"Restablecer recursos de exportación",imagesPath:"Ruta de imagen (Ruta de imágenes Spine)",spineVersion:"Versión de Spine",keyframeCurve:"Curva de interpolación de fotogramas clave",linear:"Lineal",smoothBezier:"Bézier suave (Suave Bézier)",bezierHelp:"Smooth Bezier ajusta el movimiento continuo dentro de la tolerancia al error; El nacimiento, la muerte, el cambio de apego y las mutaciones todavía utilizan fotogramas clave de pasos.",spine38Help:"Spine 3.8 no admite la matriz Bézier por canal de 4.x y se convierte a fotogramas clave lineales por partes con tolerancia reducida al exportar.",fps:"FPS de exportación",omitFps:"No escribas fps",fpsHelp:'Mantenga los segundos reales de la animación sin cambios al modificar FPS; "No escribir fps" solo omite los metadatos de fps de Spine.',integerFrames:"Alineación de marco entero",bonePool:"Conjunto de objetos óseos",excludeEmpty:"Excluir animaciones sin contenido",baking:"La animación se está recalculando y horneando.",exportJsonTitle:"Exportar Spine {version} JSON",preparing:"Preparándonos para exportar...",exportJson:"Exportar Spine JSON",exportImagesTitle:"Descargue por separado la imagen utilizada por el sistema de partículas actual ZIP",organizingImages:"Ordenando imágenes...",exportImages:"Exportar imágenes ZIP",generatingProject:"Generando proyecto...",exportSpine:"Exportar paquete .spine",authorize:"Autorizar sitio web actual",authorizeTitle:"Autorizar el sitio web actual en el conector nativo",refreshConnector:"Vuelva a comprobar el conector",refresh:"refrescar",recalculating:"Recalculando la animación de partículas...",exported:"Exportado Spine {version}: sistemas de partículas {systems}, animaciones {animations}, huesos de raíz {bones} {warning}",resourceWarning:";{count} sugerencias de recursos (las imágenes que faltan aún se exportan)",timeout:"Nuevo cálculo del tiempo de espera de la animación. Confirme que la página aún se está ejecutando e inténtelo nuevamente.",preparingProject:"Ordenando imágenes y llamando a esta máquina Spine…",projectExported:"Se ha generado {fileName}: incluye el proyecto .spine y las imágenes {images}, Spine {version}",collectingImages:"Cotejando imágenes utilizadas actualmente por el sistema de partículas...",imagesExported:"Se ha generado {fileName}: {folder}/ contiene imágenes {images}",connectorChecking:"Detectando el conector local Spine...",connectorOffline:"El conector local de Spine no está iniciado",spineNotFound:"El conector está iniciado, pero no se encontró Spine",notAuthorized:"El conector está iniciado, pero este sitio no está autorizado",connectorReady:"Conector disponible · Spine listo",connectorBusy:"Recalculando y generando el proyecto de Spine",connectorGenerate:"Generar proyecto Spine {version} con Spine local",unknown:"desconocido",checking:"Comprobando",offline:"Sin conexión",notFound:"Spine no encontrado",unauthorized:"No autorizado",projectTransferTitle:"Exportar paquete Spine",projectTransferDetail:"Recalculando la animación de partículas...",projectTransferDownload:"Se ha descargado el paquete del proyecto Spine.",generatingJson:"Generando Spine JSON…",preparingProjectFiles:"Recopilando imágenes del proyecto...",uploading:"Cargando datos al conector Spine...",spineProcessing:"Spine está convirtiendo el proyecto, espere...",downloadingProject:"Descargando el paquete de proyecto Spine generado...",handingToBrowser:"Entregando al navegador para descargar..."},transfer:EN,scene:_N,modifiers:MN,spine:PN,help:kN,errors:IN,language:RN},LN={resizeTimeline:"Faites glisser pour ajuster la hauteur de la timeline",systems:"système",particlesBones:"Particules (os)",rootBone:"os de la racine",hudTip:"Zoom sur la molette · Clic gauche pour faire glisser la toile",title:"Éditeur de particules Spine - Yeomai"},DN={close:"Fermer",collapse:"Réduire",reset:"Réinitialiser",add:"Ajouter",remove:"Retirer",delete:"Supprimer",clear:"Effacer",cancel:"Annuler",confirm:"Confirmer",none:"Aucun",enabled:"Activé",disabled:"Désactivé",fixed:"Fixe",random:"Aléatoire",curve:"Courbe",followExport:"Suivre l’export",linear:"Linéaire",bezier:"Bézier",above:"Au-dessus",below:"En dessous",left:"Gauche",right:"Droite",seconds:"s",frames:"images"},ON={settings:"Paramètres",undo:"Annuler (Ctrl+Z)",pan:"Déplacer le canevas (Q)",translate:"Déplacement (W)",rotate:"Rotation (E)",scale:"Échelle (R)",zoomIn:"Zoom avant",zoomOut:"Zoom arrière",fitView:"Ajuster le canevas",toggleGrid:"Afficher/masquer la grille",resetView:"Réinitialiser la vue",background:"Arrière-plan",backgroundSettings:"Paramètres de l’arrière-plan",changeBackground:"Remplacer l’image",uploadBackground:"Importer une image",clearBackground:"Effacer l’arrière-plan",noBackground:"Aucune image",backgroundX:"Décalage X de l'image d'arrière-plan",backgroundY:"Décalage Y de l'image d'arrière-plan",backgroundOpacity:"Transparence de l’image d’arrière-plan",opacity:"Opacité",help:"Aide",openHelp:"Ouvrir l’aide"},NN={title:"Paramètres système",layout:"Disposition de l'interface",floatingMenu:"Menu flottant",floatingMenuParticleOnly:"Sélectionnez d'abord un système de particules",parameterPanelPosition:"Emplacement du panneau de paramètres",panelOnRight:"Le panneau de paramètres est affiché à droite",history:"Historique des opérations",maxUndo:"Nombre maximum de pas en arrière",canvasGuides:"Affichage auxiliaire en toile",emitter:"point de lancement",bones:"Connexion osseuse",bonePointSize:"Taille du dessin de la pointe osseuse",boneAxisSize:"Taille du dessin des axes",skinMesh:"maille écorchée",enableTicks:"Activer les ticks",tickFontSize:"Taille du texte à l'échelle",tickWidth:"épaisseur de la graduation",axisColor:"couleur de l'axe",showAxisLabels:"Afficher la valeur de l'échelle",unsavedPrompt:"Avertir des modifications non enregistrées",showProjectSize:"Afficher la taille des configurations",cacheNote:"L'ensemble des paramètres du système sont automatiquement enregistrés dans le navigateur actuel"},$N={title:"Configuration",save:"Enregistrer",saveTitle:"Enregistrer la configuration dans le cache du navigateur",load:"Charger",loadTitle:"Charger la configuration de l'éditeur local",presets:"Liste des préréglages",selectPreset:"Choisir un préréglage",noPresets:"Aucun préréglage",saved:"La configuration a été enregistrée localement",loading:"Chargement de la configuration…",loaded:"Chargé : {name}",presetLoading:"Chargement des préréglages…",presetLoaded:"Préréglage chargé : {name}",presetNamingError:"{message}, veuillez vérifier le nom de fichier par défaut",presetTransferTitle:"Charger le préréglage",presetDownloading:"Téléchargement de {file}…",presetParsing:"Analyse de la configuration par défaut...",presetRestoring:"Analyse et restauration des ressources par défaut...",presetComplete:"Chargement du préréglage terminé",presetListError:"Impossible de lire la liste des préréglages",presetReadError:"Impossible de lire le préréglage : {file}",local:{listTitle:"Liste des configurations",empty:"Aucune configuration enregistrée dans ce navigateur",saveTitle:"Enregistrer la configuration dans le cache du navigateur",name:"Nom de la configuration",namePlaceholder:"Par exemple : Effet de feux d’artifice",load:"Charger",loadHint:"Double-cliquez pour charger",download:"Télécharger",delete:"Supprimer",downloadCurrent:"Télécharger la configuration actuelle",downloadAll:"Télécharger toutes les configurations",loadAll:"Charger toutes les configurations",loadAllConfirm:"Importer {count} fichiers de configuration ? Les configurations portant le même nom seront écrasées.",loadAllDone:"{count} configurations chargées depuis les fichiers",loadAllPartial:"{imported} configurations importées ; {failed} fichiers en échec",overwriteSave:"« {name} » existe déjà. L’écraser ?",loadOverwrite:"Le chargement de « {name} » remplacera la scène actuelle et perdra les modifications non enregistrées. Continuer ?",deleteConfirm:"Supprimer « {name} » ?",nameRequired:"Saisissez un nom de configuration",nameInvalid:'Le nom ne peut pas contenir \\ / : * ? " < > |',storageUnavailable:"Le stockage local du navigateur est indisponible",saved:"Enregistré dans le navigateur : {name}",loaded:"Chargé depuis le navigateur : {name}",deleted:"Configuration supprimée du navigateur : {name}",downloadEmpty:"Aucune configuration à télécharger",downloaded:"Téléchargé : {name}"}},BN={bezierHint:"Faites glisser la poignée carrée pour ajuster l'arc · Double-cliquez sur un espace vide pour en créer un nouveau · Double-cliquez sur un nœud pour le supprimer",linearHint:"Double-cliquez sur un espace vide pour en créer un nouveau. Double-cliquez sur un nœud pour le supprimer. Faites glisser un nœud pour l'ajuster.",resetTitle:"Restaurer la courbe par défaut"},UN={addTitle:"Double-cliquez sur le ruban pour ajouter une marque de couleur",color:"Code couleur",colorValue:"Valeur de couleur de l'échelle de couleurs",position:"Position de la marque de couleur",addMiddle:"Ajouter de la couleur au milieu",delete:"Supprimer le patch de couleur actuel",hint:"Double-cliquez sur la bande de couleur pour en ajouter une nouvelle · Faites glisser la marque de couleur pour ajuster sa position · Double-cliquez sur la marque de couleur pour la supprimer"},VN={angleOffset:"Décalage angulaire",value:"valeur numérique",lower:"limite inférieure",upper:"limite supérieure",rangeLower:"Limite inférieure de la plage",rangeUpper:"Gamme supérieure",curveInput:"Entrée de courbe →",direction:"Direction du lancement"},XN={title:"point pivot de la carte",zoomOut:"dézoomer",zoomIn:"agrandir",expand:"Zoom en mode plein écran",interaction:"Clic gauche/glissez pour définir le point pivot · Clic droit pour faire glisser la toile · Molette de défilement pour zoomer",previewAlt:"Aperçu du point pivot",noImage:"Aucune image sélectionnée",resetCenter:"Repositionner au milieu (50 %, 50 %)",coordinates:"Coordonnées du point de l'axe (%)",rotationTest:"Test de rotation des axes",static:"toujours",spin:"rotation",swing:"balançoire",rotationAlt:"Essai de rotation",topLeft:"en haut à gauche",top:"Tout de suite",topRight:"en haut à droite",left:"Droite gauche",center:"milieu",right:"Droite",bottomLeft:"en bas à gauche",bottom:"Directement en dessous·en bas",bottomRight:"en bas à droite"},YN={chooseSequence:"Sélectionnez des images de séquence",chooseLocal:"Sélectionnez une image locale",subfolder:"sous-dossier",name:"nom",restore:"Restaurer {name}",deleteResource:"Supprimer les ressources d'images",imageMode:"Mode image",fixed:"Image fixe",sequence:"Séquence",playbackMode:"mode de lecture",onceHide:"Une fois, masquer à la fin",onceHold:"Une fois, conserver la dernière image",loopForward:"Boucle avant",loopReverse:"Boucle arrière",playbackFps:"Fréquence d'images de lecture",chooseSequenceMulti:"Sélectionner des images de séquence (sélections multiples)",weight:"Poids %",unlockWeight:"Déverrouiller le verrouillage des proportions",lockWeight:"Verrouiller la proportion actuelle",pivot:"Pivot de texture",collapsePivot:"Réduire l’ajustement du point pivot",expandPivot:"Développer l'ajustement du point pivot",pivotModal:"Point d'axe de rotation de texture, raffinement de grande image",pivotModalDesc:"Cliquez ou faites glisser n'importe où sur la carte ci-dessous pour définir avec précision le centre de rotation/oscillation des particules.",pivotZoomHint:"Prend en charge un grossissement de 100 % à 400 %, une visée précise vers la pointe ou la racine :",confirmPivot:"Déterminer et enregistrer le point pivot",noSequence:"Aucune image de séquence sélectionnée",firstFrame:"Cadre 1",firstImage:"première photo",lastImage:"dernière photo",pivotOn:"Ouvert : X {x}% | Y {y}%",pivotOff:"Non activé, la valeur par défaut se situe autour du centre de l'image (50 %, 50 %)",pivotCustom:"Le point pivot a été personnalisé : X {x}% | Y {y}%",frameCountOne:"1 cadre · {name}",frameCountMany:"Cadre {count} · {first} → {last}",sequenceSelected:"L'image {count} a été sélectionnée et lue dans l'ordre {first}-{last}."},zN={play:"Jouer(D)",pause:"Pause (D)",toStart:"Revenir à la première image (S)",previous:"image précédente",next:"image suivante",toEnd:"Passer à la dernière image",continuousLoop:"Lecture en boucle continue",abLoop:"Boucle indépendante de plage A/B",abLoopShort:"Boucle AB",abRange:"Intervalle de cycle AB",playbackStart:"Image de début de lecture personnalisée",playbackEnd:"Image de fin de lecture personnalisée",startFrame:"Lire l'image de début",endFrame:"Lire l'image de fin",frame:"cadre",emission:"Émission",particleLife:"Particules actives",spineAnimation:"Animation Spine",ownerAnimation:"Animation associée",setOwnerAnimation:"Définir l'animation à laquelle appartient le système de particules actuel",chooseOwnerAnimation:"Sélectionnez l'animation",animationName:"Nom de l'animation",renameAnimation:"Renommer l'animation actuelle",rename:"Rebaptiser",newAnimation:"+ Nouveau",keepOneAnimation:"Au moins une animation doit être conservée",spinePreview:"Animation d'aperçu Spine",noSpineAnimation:"Aucune animation Spine disponible",none:"aucun",systemName:"Système {index}",dragLoopDuration:"Durée du segment de boucle de glisser",dragEmissionDuration:"Durée du glissement",dragSpineStart:"Faites glisser pour ajuster l'heure de début de l'animation",noAnimationData:"Il n'y a actuellement aucune donnée d'animation à afficher.",animationNameEmpty:"Le nom de l'animation ne peut pas être vide",animationNameDuplicate:"Les noms d'animation ne peuvent pas être répétés",animationRenameFailed:"Impossible de modifier le nom de l'animation",zoomIn:"agrandir",zoomOut:"dézoomer",zoomFit:"Modéré",frameStatus:"Image {current} / {total}"},jN={title:"Mode d’émission",reset:"Réinitialiser les paramètres du mode de transmission",stream:"Continu",burst:"Rafale",normalStream:"Continu standard",loopStream:"Boucle continue",rate:"Taux d’émission",duration:"Durée d’émission",loopDuration:"Durée de lancement (f)",generateStart:"Générer une animation de boucle de démarrage",generateEnd:"Générer une animation de fin de boucle",customDuration:"Préciser la durée",auto:"Automatique {frames}f",startLoopDuration:"Durée du segment de démarrage de la boucle",endLoopDuration:"Durée du segment de fin de boucle",loopWarning:"Le mode de persistance de boucle ne prend pas en charge le suivi d'os et le suivi de chemin ; les paramètres de suivi des particules seront restaurés aux valeurs par défaut lors de l'entrée ou de la sortie.",burstCount:"Quantité par rafale",delay:"Délai",shapeTitle:"Forme de l’émetteur",shapeReset:"Réinitialiser les paramètres de forme de l'émetteur",shape:"forme",point:"Point",circle:"Cercle",rect:"Rectangle",cone:"Cône",path:"Chemin",innerDiameter:"diamètre intérieur",outerDiameter:"diamètre extérieur",innerRadius:"rayon intérieur",outerRadius:"rayon extérieur",coneDirection:"Orientation conique",coneAngle:"Angle d'ouverture conique",innerWidth:"largeur intérieure",innerHeight:"Haut à l'intérieur",outerWidth:"Largeur extérieure",outerHeight:"Très haut",selectPath:"Sélectionnez le chemin",noPath:"Pas de chemin (émission ponctuelle)",birthDistribution:"répartition des naissances",evenDistribution:"Distribution fixe équidistante",randomDistribution:"distribution aléatoire",emissionAngle:"angle de lancement",radial:"Radial (centre vers l'extérieur)",pathNormal:"perpendiculaire au chemin",pathTangent:"dans la direction du chemin",fixedAngle:"angle fixe",baseAngle:"angle de base",randomRange:"plage aléatoire",showShape:"montrer la forme"},HN={title:"Attributs des particules",reset:"Réinitialiser les paramètres d'attributs de particules",initialParams:"Valeurs initiales",initialLife:"cycle de vie initial",randomSample:"Échantillonnage aléatoire →",initialSpeed:"vitesse initiale",initialScale:"mise à l'échelle initiale",uniform:"unifié",separateXY:"Séparation XY",scaleX:"ZoomX",scaleY:"Zoom Y",initialRotation:"rotation initiale",lifecycleTitle:"Évolution pendant la durée de vie",speedOverLife:"vitesse du cycle de vie",speedMultiplier:"multiplicateur de vitesse",lifeTo:"cycle de vie →",scaleOverLife:"Échelle pendant le cycle de vie",scaleMultiplier:"Taux de zoom",multiplierX:"Grossissement",multiplierY:"Grossissement Y",rotationOverLife:"Rotation pendant le cycle de vie",rotationSpeed:"Vitesse de rotation"},GN={title:"Apparence et ressources",reset:"Réinitialiser les paramètres d'apparence et de ressources",opacity:"Opacité",curveMode:"Mode courbe",transparent:"0 (transparent)",opaque:"1(opaque)",renderLayer:"Calque de rendu (slot Spine)",top:"niveau supérieur",spineSlot:"Emplacement Spine",selectSpine:"Veuillez sélectionner Spine",noSpine:"Aucun disponible Spine",noSlot:"Aucun créneau sélectionné pour l'instant",reselect:"Sélectionner de nouveau",selectSlot:"Sélectionnez un emplacement",searchSlots:"Rechercher le nom de l'emplacement ou de l'accessoire…",searchSlotsAria:"Rechercher des créneaux",emptySlot:"Emplacement vide",noMatchingSlots:"Aucun emplacement correspondant",above:"au-dessus de cette photo de machine à sous",below:"sous cette photo de machine à sous",followAttachment:"Afficher et masquer avec les accessoires de machines à sous",previewOnly:"Le réglage du niveau d'affichage affecte uniquement l'aperçu de l'éditeur et n'affecte pas les données exportées.",imageResources:"Ressources d’image",addImage:"Ajouter des ressources d'images",scale:"Zoom",color:"couleur",fixedColor:"couleur fixe",randomColor:"couleur aléatoire",lifetime:"cycle de vie",normal:"Normal",add:"Ajout",multiply:"Multiplication",screen:"Écran",fixedColorValue:"valeur de couleur fixe",randomColorHint:"Chaque particule choisit au hasard une couleur sur le ruban à sa naissance et reste inchangée tout au long de son cycle de vie.",independentAlpha:"Opacité indépendante",off:"Désactivé"},WN={slotLabelAbove:"{spine} / {slot} · Photo ci-dessus",slotLabelBelow:"{spine} / {slot} · Sous la photo",resolvedAbove:"Rendu au-dessus de l'image {slot} et en dessous de son emplacement",resolvedBetween:"Rendu entre {previous} et {slot}",warningNoSpine:"Aucun Spine n'est chargé et les particules sont temporairement affichées en haut.",warningNoSelection:"Spine n'a pas encore été sélectionné et les particules sont temporairement affichées en haut.",warningMissingSpine:"La cible Spine n'existe pas et les particules sont temporairement affichées en haut.",warningNotReady:"La cible Spine n'est pas prête et les particules sont temporairement affichées en haut.",warningMissingSlot:"L'emplacement cible n'existe pas (la ressource a peut-être été remplacée) et les particules sont temporairement affichées en haut.",warningFirstSlot:"Il s'agit du premier emplacement et ne peut pas être affiché en dessous, les particules sont temporairement affichées en haut."},qN={completed:"Complété",failed:"L'opération a échoué"},KN={title:"Objets de scène",addParticle:"Ajouter un système de particules",addParticleShort:"+particule",addCollider:"Ajouter un collisionneur",addColliderShort:"+collision",addPath:"ajouter un chemin",addPathShort:"+ chemin",addSpine:"Ajouter Spine",copyTitle:"Copier l'objet de scène actuellement sélectionné",showParticle:"Afficher le système de particules",hideParticle:"Masquer le système de particules",showCollider:"montrer les collisionneurs",hideCollider:"Masquer le collisionneur",showPath:"montrer le chemin",hidePath:"Masquer le chemin",showSpine:"Affichage Spine",hideSpine:"Masquer Spine",particle:"Particules",subEmitter:"Sous-émetteur",collision:"Collision",path:"Chemin",deleteParticle:"Supprimer le système de particules",deleteCollider:"Supprimer les collisionneurs",deletePath:"supprimer le chemin",deleteSpine:"Supprimer Spine",empty:"Il n'y a pas encore d'objets dans la scène",name:"nom",positionX:"Position X",positionY:"Position Y",offsetX:"Décalage X",offsetY:"Décalage Y",rotation:"Rotation",scaleX:"Échelle X",scaleY:"Échelle Y",seed:"Graine aléatoire",seedTitle:"Contrôlez tous les attributs aléatoires, la sélection des ressources et l'échantillonnage aléatoire du modificateur dans le système de particules",randomizeSeed:"Générer une nouvelle graine aléatoire globale",seedHint:"Contrôler les paramètres aléatoires initiaux, la sélection des ressources et l'échantillonnage aléatoire du modificateur ; la même graine peut reproduire le même effet",colliderTitle:"Propriétés du collisionneur",colliderName:"Nom du collisionneur",type:"taper",circle:"rond",ellipse:"ovale",rect:"rectangle",polygon:"polygone",custom:"Personnaliser",enabled:"activer",xPosition:"Position X",yPosition:"Position Y",scaleXShort:"Échelle X",scaleYShort:"Échelle Y",radius:"rayon",radiusX:"Rayon X",radiusY:"Rayon Y",width:"largeur",height:"haut",sides:"Nombre de côtés",collisionResponse:"Réponse en cas d'accident",physics:"Physique (rebond/frottement)",pause:"Pause (arrêter)",destroy:"Disparaître (détruire immédiatement)",elasticity:"Élasticité (0-1)",friction:"Frictions (0-1)",followPath:"Suivez le chemin",targetPath:"chemin cible",notSelected:"(non sélectionné)",moveDuration:"Durée du mouvement (secondes)",followDirection:"direction le long du chemin",moveProgressCurve:"Courbe de progression en mouvement",moveProgressHelp:"Axe horizontal : temps réel/durée du mouvement ; axe vertical : progression du chemin (0=point de départ → 1=point final)",pathTitle:"attribut de chemin",pathName:"nom du chemin",closedPath:"chemin fermé",pathColor:"couleur du chemin",pathHelp:"Mode d'emploi :",pathHelpItems:"Double-cliquez sur l'espace vide/la courbe : créez un nouveau point d'ancrage, double-cliquez sur le point d'ancrage : supprimez le nœud, double-cliquez une deuxième fois et faites glisser : créez-en un nouveau et retirez la poignée, faites glisser le point d'ancrage pour déplacer la position, faites glisser la poignée pour ajuster la courbe, Maj + faites glisser la poignée : complètement symétrique des deux côtés, A lt+glissez la poignée : contrôlez indépendamment un côté, Ctrl+sélection clic/cadre : ajouter les nœuds sélectionnés, Alt+clic/sélection de cadre : soustraire la sélection nœuds, Alt+clic dans l'espace vide : effacez toutes les sélections, sélectionnez plusieurs nœuds et faites-les glisser dans leur ensemble",applyPresetShape:"Appliquer une forme prédéfinie",choosePreset:"Sélectionnez un préréglage...",square:"Carré",star:"forme d'étoile",applyPreset:"Appliquer le préréglage",clearAnchors:"point d'ancrage clair",panelHint:"Utilisez le bouton dans le coin supérieur droit pour créer un objet de scène"},JN={title:"Modificateurs",reset:"Réinitialiser les paramètres du modificateur",damping:"Amortissement",enableNoise:"Activer le bruit de mouvement",strength:"force",noiseRange:"Plage de fluctuation",noiseSpeed:"Débit temporel",noiseHint:"Le contrôle de l'intensité affecte la proportion · La plage de fluctuation contrôle l'écart maximum · Le flux temporel contrôle la vitesse de changement",enableGravity:"Activer la gravité",gravityStrength:"Force de gravité",strengthMin:"Force min.",strengthMax:"Force maximale",direction:"direction",gravityOverLife:"La gravité pendant le cycle de vie",windOverLife:"Vent du cycle de vie",axisStrength:"Axe vertical : intensité 0~1",directionHint:"0° à droite · -90° vers le bas · L'intensité négative inverse la direction",enableWind:"Activer le vent",windStrength:"force du vent",enableForceField:"Activer le champ de force",centerX:"Centre X",centerY:"Centre Y",forceStrength:"Intensité du champ de force",forceRadius:"rayon du champ de force",falloffMode:"mode de désintégration",constant:"Constante (la vitesse ne change pas dans la plage)",linearFalloff:"Atténuation linéaire (le bord est 0)",inverseFalloff:"Inversement proportionnel à la distance (le plus fort au centre)",forceHint:"Les nombres positifs attirent vers le centre, les nombres négatifs se repoussent vers l'extérieur et le cercle du champ de force peut être déplacé dans le canevas.",showShape:"montrer la forme",enableVortex:"Activer le tourbillon",vortexHint:"Nombres positifs dans le sens inverse des aiguilles d'une montre · Nombres négatifs dans le sens des aiguilles d'une montre",enableAttraction:"Activer l’attraction",attractionX:"Point d'adsorption X",attractionY:"Point d'adsorption Y",attractionRadius:"rayon d'adsorption",attractionDuration:"Temps d'adsorption",delay:"Temps de retard",delayMode:"Mode retard",globalTime:"temps unifié",particleLife:"durée de vie d'une seule particule",attractionPath:"Méthode d'adsorption",straight:"ligne droite",attractionHint:"Après un délai, l'adsorption démarre à partir de la position actuelle. Lorsqu'il atteint la zone rouge, il mourra. Le cercle d'adsorption peut être glissé dans la toile.",enableTrail:"Activer la traînée",trailImages:"Images indépendantes de fin",addTrailImage:"Ajouter des ressources d'image de fin",trailRotation:"tourner",trailBones:"Nombre d'os arrière",trailRatio:"Ratio de suivi (%)",trailLength:"Longueur de fuite",randomRange:"plage aléatoire",lengthRatio:"Rapport de longueur (%)",lengthMin:"Longueur minimale (%)",lengthMax:"Longueur maximale (%)",trailWidth:"Largeur de fuite",widthRatio:"rapport de largeur (%)",widthMin:"Largeur minimale (%)",widthMax:"Largeur maximale (%)",widthScale:"mise à l'échelle de la largeur",followParticle:"suivre les particules",lifeLengthCurve:"courbe de longueur du cycle de vie",shapeCurve:"Courbe de forme (largeur tête → queue)",colorMode:"mode couleur",blendMode:"mode de fusion",fixedColor:"couleur fixe",alphaMode:"mode transparence",opacity:"transparence",gridRows:"Nombre de lignes de grille",gridCols:"Nombre de colonnes de grille",trailHint:"Chaque particule génère un ensemble d’os frères et sœurs proportionnels aux ressources ; la longueur et la largeur aléatoires sont déterminées à la naissance de la particule, et la même graine peut être reproduite de manière stable",enableFollow:"Activer le suivi de l’émetteur",followMode:"mode suivi",noFollow:"aucun",followPath:"suivre le chemin",selectedBone:"os sélectionnés",emitterAngleMode:"Mode angle de l'émetteur",fixedAngle:"angle fixe",followMoveDirection:"Suivre la direction du mouvement",moveProgressCurve:"Courbe de progression du mouvement (0→1)",moveDuration:"Durée(s) du mouvement",followSpace:"suivre l'espace",localSpace:"Espace local (mouvement GEN)",worldSpace:"Espace mondial (mouvement du point de génération de particules)",moveDirection:"direction de déplacement",forward:"Suivant (point de départ → point final)",reverse:"Inverse (point final → point de départ)",followOffset:"Point de départ décalé (0-1)",followSpaceHint:"L'espace local déplace l'émetteur tout entier ; l'espace mondial ne déplace que le point d'apparition des nouvelles particules, et les particules nées restent à la position du monde.",followTarget:"Suivez la cible :",noValidBone:"Aucun os valide n'a encore été lié, veuillez d'abord sélectionner l'os dans l'arborescence hiérarchique Spine.",rebind:"relier",bind:"obligatoire",selectedBoneLabel:"Os actuellement sélectionné :",boneLocalSpace:"Espace local (se déplace avec les os)",boneWorldSpace:"Espace mondial (les particules conservent leur position après avoir été générées)",offsetX:"Décalage de déplacement X",offsetY:"Décalage de déplacement Y",rotationOffset:"Décalage de rotation",scaleOffsetX:"Décalage d'échelle X",scaleOffsetY:"Décalage d'échelle Y",boneFollowHint:"L'émetteur suit uniquement la position de l'os Spine sélectionné et n'hérite pas de la rotation ou de la mise à l'échelle de Spine ; la transformation des particules utilise les propres paramètres et le décalage supérieur du système de particules.",enableCollision:"Activer la collision",collisionObjects:"Objets de collision participants",colliderDisabled:"{name} (collisionneurs désactivés)",clearCollider:"Effacer l'objet de collision {name}",addCollider:"Ajouter des objets de collision de scène",noAvailableColliders:"Aucun objet de collision à ajouter",noCollidersSelected:"Aucun objet de collision n'est sélectionné et les particules actuelles n'entreront pas en collision.",available:"Disponible",disabled:"Désactivé",collisionHint:"Seuls les objets de collision de scène ajoutés et activés participeront à la collision du système de particules actuel.",enableSubEmitter:"Activer les sous-émetteurs",triggerTiming:"Choisissez l'heure de déclenchement",birth:"né",death:"mourir",collision:"collision",chooseTarget:"Sélectionnez le système de particules cible",noTarget:"Aucun (système de particules)",deleteSubEmitter:"Supprimer ce sous-émetteur",probability:"probabilité d'émission",collisionLimit:"Limite de collision",inherit:"hériter",colorInheritMode:"Méthode d'héritage des couleurs",add:"Ajouter",replace:"couverture",addSubEmitter:"+ Ajout d'un nouveau sous-émetteur",inheritNone:"Aucun (par défaut)",inheritAll:"Toutes les propriétés",inheritColor:"couleur",inheritScale:"taille",inheritRotation:"tourner",inheritLife:"cycle de vie"},ZN={title:"Propriétés Spine",name:"Nom Spine",xPosition:"Position X",yPosition:"Position Y",rotation:"Rotation",scaleX:"Échelle X",scaleY:"Échelle Y",startTime:"Heure de début",resources:"Ressources Spine",chooseFolder:"Sélectionnez le dossier et chargez",folderHint:"Lisez JSON / SKEL, Atlas et toutes les textures d'un dossier en même temps ; les ressources peuvent toujours être remplacées individuellement ci-dessous.",choose:"choisir",chooseMultiple:"Sélectionner (choix multiples)",loading:"chargement…",load:"↧ Charger",clear:"Clair",supportNote:"Prise en charge de Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · Chargement à la demande lorsque la version correspondante est en cours d'exécution · Local hors ligne",currentResource:"Ressource actuelle {version}",animations:"Animations Spine",noAnimations:"Aucune animation disponible",timelineAnimation:"Lire l'animation sur la chronologie",no:"aucun",hierarchy:"Hiérarchie",clearBoneTitle:"Cliquez pour effacer la sélection d'os",noBoneTitle:"Aucun os n'est actuellement sélectionné",clearBone:"Effacer les os sélectionnés : {name}",currentBone:"Squelette actuel :",clearSlotTitle:"Cliquez pour effacer la sélection d'emplacement",noSlotTitle:"Aucun emplacement n'est actuellement sélectionné",clearSlot:"Effacer l'emplacement sélectionné : {name}",currentSlot:"Emplacement actuel :",notSelected:"Non sélectionné",expandAll:"Tout développer",collapseAll:"Tout réduire",bones:"squelette",slots:"fente",notLoaded:"Non chargé Spine",searchBones:"Rechercher des os",searchBonesPlaceholder:"Rechercher le nom de l'os…",clearSearch:"Effacer la recherche",clearBoneSearch:"Recherche osseuse claire",noMatchingBones:"Aucun os correspondant trouvé",expandChildren:"Développer les os enfants",collapseChildren:"Réduire les os de l'enfant",notLoadedSlots:"Emplacement Spine non chargé",searchSlots:"Rechercher des créneaux",searchSlotsPlaceholder:"Rechercher le nom de l'emplacement ou de l'accessoire…",clearSlotSearch:"Effacer la recherche de créneau",noMatchingSlots:"Aucun emplacement correspondant trouvé",slotTitle:"{name} (squelette : {bone}, accessoire : {attachment})",empty:"nul",textureSummary:"{count} Zhang : {names}",textureImages:"Images de textures",missingFolderAssets:"Le dossier sélectionné est manquant : {missing}",chooseAssets:"Veuillez sélectionner les données Spine, Atlas et toutes les images de texture dans l'ordre"},QN={title:"Aide",subtitle:"Démarrage rapide de la création de particules à l'enregistrement et à l'exportation",close:"Fermer les instructions",closeShort:"Fermer (Échap)",quickStart:"démarrage rapide",stepCreate:"Créer un objet : utilisez +Particles / +Collision / +Path / +Spine dans « Objet de scène » à gauche pour ajouter un objet de scène.",stepEdit:`Modifier les particules : sélectionnez le système de particules et ajustez "Mode d'émission → Forme de l'émetteur → Propriétés des particules → Apparence et ressources → Modificateur".`,stepPreview:"Vérifiez l'effet : la chronologie inférieure peut être lue, mise en pause, image par image ou glissée ; il sera automatiquement recalculé après modification des paramètres.",stepExport:'Enregistrer et exporter : utilisez « Enregistrer la configuration » pour conserver le projet ; "Exporter le package Spine Json / images / .spine" pour sortir le produit fini.',quickNote:"« Réinitialiser » sur le côté droit du titre de chaque groupe de modules peut restaurer les paramètres par défaut du groupe ; les paramètres système seront automatiquement enregistrés dans le navigateur actuel.",commonOps:"Actions courantes",eye:"petits yeux",eyeDesc:"Afficher/masquer les objets individuellement ; les systèmes de particules cachées ne sont pas exportés.",copyDesc:"Copie entièrement l'objet actuellement sélectionné pour faciliter la comparaison des différents paramètres.",backgroundDesc:"Téléchargez l'image de référence et ajustez la position et la transparence pour l'aperçu du canevas uniquement.",settingsDesc:"La disposition de l'interface de gestion, l'affichage auxiliaire, la balance, etc. sont automatiquement enregistrés dans le navigateur.",undoDesc:"Ctrl+Z se rétracte d'un pas ; le nombre maximum d'étapes peut être ajusté dans les paramètres du système.",spineBoneDesc:"Recherchez et sélectionnez un os dans l'arborescence hiérarchique, qui peut être utilisé par l'émetteur de particules à suivre.",shortcuts:"Raccourcis",undoShortcut:"Annuler l'étape précédente",saveShortcut:"Enregistrer la configuration",panShortcut:"Faites glisser la toile",translateShortcut:"Outil de déplacement",rotateShortcut:"Outil rotatif",scaleShortcut:"Outil Zoom",playShortcut:"lecture/pause",startShortcut:"Revenir à la première image",shortcutNote:"Q / W / E / R devez d'abord cliquer sur la toile ; lorsque le curseur est dans la zone de saisie, la touche de raccourci à touche unique ne sera pas déclenchée.",modules:"Guide des modules",configTitle:"Gestion des configurations",saveConfigDesc:"Enregistrez tous les objets et paramètres de scène actuels en tant que fichiers de projet JSON (Ctrl+S est également pris en charge).",loadConfigDesc:"Sélectionnez le fichier de configuration local pour restaurer le projet complet.",presetDesc:"Sélectionnez une application rapide par défaut dans la liste déroulante ; cliquez sur la liste déroulante pour actualiser la liste.",configScope:"portée",configScopeDesc:"La configuration contient des objets et des paramètres ; les paramètres de l'interface et du système sont stockés séparément dans le navigateur.",sceneTitle:"objet de scène",particleDesc:"objet de base. La position, le décalage, la rotation, la mise à l'échelle et la graine aléatoire peuvent être définis ; la même graine peut reproduire le même effet.",colliderDesc:"Cercle/ellipse/rectangle/polygone/personnalisé, prend en charge le rebond physique, la pause, la destruction et le mouvement le long du chemin.",pathDesc:"Chemin de Bézier avec prise en charge des points d'ancrage, poignées de contrôle, fermeture, couleur et formes prédéfinies.",spineDesc:"Chargez les données Spine, Atlas et les textures, parcourez les os et les emplacements et suivez les émetteurs.",sceneCommonDesc:"Les objets peuvent être révélés et copiés indépendamment ; les systèmes de particules cachées ne sont pas exportés.",emissionDesc:"Tir continu, rafale, retard et durée de boucle en trois étapes de démarrage/boucle/fin.",burstDesc:"Émet un nombre spécifié de particules à la fois.",delayDesc:"Le temps d'attente avant le début de l'émission, correspondant à l'extrémité gauche de la barre de particules.",loopNote:"La persistance de la boucle ne prend pas en charge le suivi des os et des chemins, et les paramètres suivants seront restaurés lors du changement.",shapeDesc:"Zone d'apparition d'un point, d'un cercle, d'un rectangle, d'un cône ou d'un chemin. Les cercles/cônes prennent en charge les rayons internes et externes, et les rectangles prennent en charge la largeur et la hauteur internes et externes.",angleDesc:"Fixe, aléatoire, radial, trajectoire normale ou tangente à la trajectoire.",initialDesc:"Le cycle de vie, la vitesse, la mise à l'échelle et la rotation supportent la direction fixe, aléatoire, la courbe et la rotation peuvent suivre la direction de lancement.",overLifeDesc:"Le grossissement de la vitesse, le grossissement du zoom et la vitesse de rotation peuvent être contrôlés par la courbe du cycle de vie.",alphaDesc:"Supports de transparence fixes ou courbes ; Le mode courbe peut suivre dérivé, linéaire ou Bézier.",imageDesc:"Image unique ou image de séquence, randomisation du poids de plusieurs images, point pivot, couleur, mode de fusion et transparence indépendante.",sequenceDesc:"Les méthodes de lecture incluent le masquage ponctuel, le gel ponctuel, la boucle avant et la boucle inverse.",noiseDesc:"Générez des traces de gigue et contrôlez l’intensité, la portée et la vitesse.",gravityDesc:"Courbes d'intensité de gravité, de vent et de cycle de vie.",forceDesc:"Champs de force globaux, vortex, adsorption et collisions.",trailDesc:"Actifs de fin indépendants, nombre d’os, courbes de longueur, largeur, forme, couleur et transparence.",followDesc:"L'émetteur peut suivre un chemin ou un os Spine.",collisionDesc:"Sélectionnez les objets de collision de scène et les réponses aux collisions de particules.",exportDesc:"Définissez le chemin de l'image, la version Spine, la courbe d'images clés, FPS, les images entières, le pool d'os et l'animation vide.",exportButtonsDesc:"Vous pouvez exporter Spine JSON, des images ZIP ou générer des projets .spine via le connecteur.",connectorTitle:"Mode d'emploi du connecteur Spine",connectorIntro:"Le connecteur transmet le JSON et les images générées par la page Web au Spine qui a été installé et activé sur la machine locale, et les convertit en projets .spine modifiables.",prerequisite:"chargement initial",prerequisiteDesc:"L'ordinateur a Spine installé et activé, et le connecteur de bureau a été lancé.",download:"télécharger",webSide:"page web",webSideDesc:"Une fois que « Connecteur disponible · Spine est prêt » s'affiche, cliquez sur « Exporter le package .spine ».",authorization:"première autorisation",authorizationDesc:"La première connexion doit vérifier la source du site Web et l'autoriser une fois ; cette machine enregistre la liste blanche d'autorisation.",pathSetup:"Paramètres du chemin",pathSetupDesc:"Le connecteur détectera automatiquement Spine ; s'il est introuvable, vous pouvez spécifier manuellement le chemin de l'application.",downloadResult:"Télécharger les résultats",downloadResultDesc:"Obtenez le package ZIP, qui contient le projet .spine et le répertoire d'images.",version:"Version",versionDesc:"Le connecteur correspond automatiquement à Spine 3.8~4.3 selon la version JSON.",security:"Sécurité",securityDesc:"Écoutez uniquement l'adresse locale, l'autorisation est enregistrée dans le connecteur et les fichiers temporaires sont nettoyés après conversion.",differenceTitle:"Quelle est la différence entre configurer et exporter ?",differenceDesc:`« Enregistrer la configuration » enregistre tous les objets et paramètres pouvant être modifiés ; "Exporter Spine Json" exporte uniquement le système de particules affiché et intègre les résultats de collision, de suivi, de fuite et de sous-émetteur dans des données d'animation indépendantes.`},e$={confirmLoopFollowEnter:"Après être entré en mode continu de boucle, les paramètres de suivi des particules seront invalides et restaurés à leur valeur par défaut. Continuer?",confirmLoopFollowExit:"Après avoir quitté le mode de persistance de boucle, les paramètres de suivi des particules seront invalides et restaurés à leurs valeurs par défaut. Continuer?",invalidJson:"Le fichier de configuration n'est pas valide JSON",invalidConfigFormat:"Pas le profil de l'éditeur SpineParticle",unsupportedConfigVersion:"Version de configuration non encore prise en charge : {version}",missingScene:"Le fichier de configuration ne contient pas de données complètes sur la scène",missingEmbeddedSpine:"La configuration ne contient pas de ressources originales Spine réutilisables",chooseJsonConfig:"Veuillez sélectionner un fichier de configuration .json",settingsInvalidJson:"Le cache des paramètres système n'est pas valide JSON",settingsFormat:"Pas le cache des paramètres système de l'éditeur SpineParticle",settingsVersion:"La version de la configuration du système n'est pas encore prise en charge : {version}",settingsMissing:"Le cache des paramètres système ne contient pas de paramètres",noExportableImages:"Il n'y a pas d'images exportables pour le système de particules actuellement visible",invalidZipPath:"ZIP Chemin de fichier invalide",spineFileType:"Les données Spine ne prennent en charge que .json ou .skel",atlasFileType:"Les fichiers Atlas ne prennent en charge que .atlas",chooseTexture:"Veuillez sélectionner au moins une image de texture",binaryParseFailed:"Échec de l'analyse binaire Spine (4.3 : {v43} ; ancienne version : {v42})",invalidSpineJson:"Spine JSON Format de fichier invalide",unsupportedSpineJsonVersion:"La version Spine JSON n'est pas prise en charge, seul {versions} est pris en charge",unsupportedSpineDataVersion:"La version des données Spine n'est pas prise en charge, seul {versions} est pris en charge",embeddedReadFailed:"Impossible de lire le fichier Spine intégré : {name}",missingImageWarning:`L'image "{file}" est manquante ou présente des dimensions illisibles, chemin conservé.`,missingTrailImageWarning:`L'image de fin "{file}" est manquante et le chemin a été conservé.`,emptyCacheWarning:"Aucun framebuffer disponible pour '{name}'.",readExportImageFailed:"Impossible de lire l'image exportée : {name}",connectorOffline:"Connecteur local Spine non détecté, veuillez d'abord activer le connecteur",connectorHttpError:"Le connecteur Spine renvoie l'erreur : HTTP {status}",invalidTrailUV:"Données UV non valides pour le maillage final '{name}'",missingTrailVertices:"Le maillage final '{name}' ne contient pas de données de sommet",trailIndexOutOfRange:"Indice triangulaire du maillage final '{name}' hors limites",invalidTrailHull:`Le numéro de contour extérieur du maillage final "{name}" n'est pas valide`,trailHullIndexOutOfRange:`L'index du bord du contour extérieur du maillage final "{name}" est hors limites`,invalidInfluenceCount:"Le maillage final « {name} » contient un nombre non valide de poids d'os.",missingBoneReference:"Le maillage final '{name}' fait référence à un os inexistant",invalidWeight:'La grille finale "{name}" contient des données de poids non valides',weightSum:"Les poids des sommets du maillage final '{name}' ne totalisent pas 1",vertexCountMismatch:"Le maillage final '{name}' a un nombre incohérent de sommets et d'UV",invalidInherit:"La valeur héritée « {inherit} » pour l'os « {name} » n'est pas conforme au format Spine {version} JSON.",trailBoneParent:`L'os arrière "{name}" doit être directement suspendu sous l'os du système de particules et ne peut pas former de chaîne osseuse.`,trailSlotEmpty:`L'emplacement de queue pondéré "{name}" ne peut pas utiliser de pièces jointes vides. La mise à l'échelle osseuse correspondante doit être fixée à 0 en phase de non-apparition ou de mort.`,spine38Version:"Spine 3.8 L'ID de version exporté doit être 3.8",spine38Inherit:`Spine 3.8 Bone "{name}" doit utiliser la transformation et ne peut pas utiliser l'héritage`,spine38SlotColor:"La chronologie des couleurs de l'emplacement Spine 3.8 doit utiliser color / twoColor",spine38AttachmentName:"Spine 3.8 L'image cachée de la chronologie de la pièce jointe doit être explicitement écrite en nom : null",spine38RotationAngle:"Spine 3.8 Vous devez utiliser l'angle pour faire pivoter l'axe du temps",spine38Curve:"Spine 3.8 ne prend pas en charge le format de courbe de tableau 4.x",unsupportedExportVersion:"La version exportée n'est pas prise en charge, seul Spine {versions} est pris en charge",exportVersionMismatch:"Version d'exportation incohérente : définie sur Spine {expected}, JSON marquée comme Spine {actual}",exportMissingBones:"Le résultat de l'exportation ne contient pas d'os",missingAtlasTexture:"La texture référencée par Atlas n'est pas sélectionnée : {name}"},t$={label:"Langue",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},n$={app:LN,common:DN,toolbar:ON,settings:NN,config:$N,curve:BN,gradient:UN,attributeControl:VN,pivot:XN,image:YN,timeline:zN,emission:jN,attributes:HN,appearance:GN,renderLayer:WN,export:{title:"Ressources d’export",reset:"Réinitialiser les ressources d'exportation",imagesPath:"Chemin de l'image (Chemin des images Spine)",spineVersion:"Version de Spine",keyframeCurve:"Courbe d'interpolation d'images clés",linear:"Linéaire",smoothBezier:"Bézier Lisse (Lisse Bézier)",bezierHelp:"Smooth Bezier s'adapte au mouvement continu dans la tolérance d'erreur ; la naissance, la mort, le changement d'attachement et les mutations utilisent toujours des images clés d'étape.",spine38Help:"Spine 3.8 ne prend pas en charge le tableau Bézier par canal de 4.x et est converti en images clés linéaires par morceaux à tolérance réduite lors de l'exportation.",fps:"FPS d’export",omitFps:"N'écrivez pas de fps",fpsHelp:`Conservez les secondes réelles de l'animation inchangées lors de la modification de FPS ; "Ne pas écrire de fps" omet uniquement les métadonnées fps de Spine.`,integerFrames:"Alignement du cadre entier",bonePool:"Pool d'objets osseux",excludeEmpty:"Exclure les animations sans contenu",baking:"L'animation est recalculée et cuite",exportJsonTitle:"Exporter Spine {version} JSON",preparing:"Préparation à l'exportation...",exportJson:"Exporter Spine JSON",exportImagesTitle:"Téléchargez séparément l'image utilisée par le système de particules actuel ZIP",organizingImages:"Tri des images...",exportImages:"Exporter les images ZIP",generatingProject:"Génération du projet...",exportSpine:"Exporter le package .spine",authorize:"Autoriser le site Web actuel",authorizeTitle:"Autoriser le site web actuel dans le connecteur natif",refreshConnector:"Revérifiez le connecteur",refresh:"rafraîchir",recalculating:"Recalcul de l'animation des particules...",exported:"Spine {version} exportés : systèmes de particules {systems}, animations {animations}, os racinaires {bones} {warning}",resourceWarning:";{count} astuces sur les ressources (les images manquantes sont toujours exportées)",timeout:"Recalcul du délai d'expiration de l'animation, veuillez confirmer que la page est toujours en cours d'exécution et réessayer",preparingProject:"Trier les images et appeler cette machine Spine…",projectExported:"{fileName} a été généré : y compris le projet .spine et les images {images}, Spine {version}",collectingImages:"Rassembler les images actuellement utilisées par le système de particules...",imagesExported:"{fileName} a été généré : {folder}/ contient des images {images}",connectorChecking:"Détection du connecteur Spine local...",connectorOffline:"Le connecteur Spine local n’est pas démarré",spineNotFound:"Le connecteur est démarré, mais Spine est introuvable",notAuthorized:"Le connecteur est démarré, mais ce site n’est pas autorisé",connectorReady:"Connecteur disponible · Spine prêt",connectorBusy:"Recalcul et génération du projet Spine",connectorGenerate:"Générer un projet Spine {version} avec Spine local",unknown:"inconnu",checking:"Vérification",offline:"Hors ligne",notFound:"Spine introuvable",unauthorized:"Non autorisé",projectTransferTitle:"Exporter le package Spine",projectTransferDetail:"Recalcul de l'animation des particules...",projectTransferDownload:"Le package du projet Spine a été téléchargé",generatingJson:"Génération de Spine JSON…",preparingProjectFiles:"Rassemblement des photos du projet...",uploading:"Téléchargement des données vers le connecteur Spine...",spineProcessing:"Spine est en train de convertir le projet, veuillez patienter...",downloadingProject:"Téléchargement du package de projet Spine généré...",handingToBrowser:"Passage au navigateur pour le téléchargement..."},transfer:qN,scene:KN,modifiers:JN,spine:ZN,help:QN,errors:e$,language:t$},i$={resizeTimeline:"ドラッグしてタイムラインの高さを調整します",systems:"システム",particlesBones:"粒子(骨)",rootBone:"根の骨",hudTip:"ホイールズーム・左クリックでキャンバスをドラッグ",title:"Spineパーティクルエディター-Yeomai"},s$={close:"閉じる",collapse:"折りたたむ",reset:"リセット",add:"追加",remove:"削除",delete:"削除",clear:"クリア",cancel:"キャンセル",confirm:"確定",none:"なし",enabled:"有効",disabled:"無効",fixed:"固定",random:"ランダム",curve:"カーブ",followExport:"エクスポート設定に従う",linear:"リニア",bezier:"ベジェ",above:"上",below:"下",left:"左",right:"右",seconds:"秒",frames:"フレーム"},r$={settings:"設定",undo:"元に戻す (Ctrl+Z)",pan:"キャンバス移動 (Q)",translate:"移動 (W)",rotate:"回転 (E)",scale:"拡大縮小 (R)",zoomIn:"拡大",zoomOut:"縮小",fitView:"キャンバスに合わせる",toggleGrid:"グリッド切替",resetView:"ビューをリセット",background:"背景",backgroundSettings:"背景画像設定",changeBackground:"画像を変更",uploadBackground:"画像をアップロード",clearBackground:"背景をクリア",noBackground:"画像なし",backgroundX:"背景画像のXオフセット",backgroundY:"背景画像のYオフセット",backgroundOpacity:"背景画像の透明度",opacity:"不透明度",help:"ヘルプ",openHelp:"ヘルプを開く"},o$={title:"システム設定",layout:"インターフェースのレイアウト",floatingMenu:"フローティングメニュー",floatingMenuParticleOnly:"先にパーティクルシステムを選択してください",parameterPanelPosition:"パラメータパネルの位置",panelOnRight:"パラメータパネルは右側に表示されます",history:"動作履歴",maxUndo:"戻る最大ステップ数",canvasGuides:"キャンバス補助ディスプレイ",emitter:"発射点",bones:"骨の接続",bonePointSize:"骨点描画サイズ",boneAxisSize:"軸描画サイズ",skinMesh:"スキンメッシュ",enableTicks:"ティックを有効にする",tickFontSize:"文字サイズの拡大縮小",tickWidth:"目盛りの太さ",axisColor:"軸の色",showAxisLabels:"表示スケール値",unsavedPrompt:"未保存の変更を確認",showProjectSize:"設定の使用容量を表示",cacheNote:"システム設定全体が現在のブラウザに自動的に保存されます"},a$={title:"設定管理",save:"設定を保存",saveTitle:"設定をブラウザキャッシュに保存",load:"設定を読み込む",loadTitle:"ローカルエディタ設定をロードする",presets:"プリセットリスト",selectPreset:"プリセットを選択",noPresets:"プリセットなし",saved:"設定はローカルに保存されました",loading:"設定を読み込み中…",loaded:"ロード済み: {name}",presetLoading:"プリセットをロード中…",presetLoaded:"ロードされたプリセット: {name}",presetNamingError:"{message}、デフォルトのファイル名を確認してください",presetTransferTitle:"プリセットをロードする",presetDownloading:"{file}をダウンロード中…",presetParsing:"デフォルト設定を解析しています...",presetRestoring:"デフォルトのリソースを解析して復元しています...",presetComplete:"プリセットのロードが完了しました",presetListError:"プリセットリストを読み取れません",presetReadError:"プリセットを読み取れません: {file}",local:{listTitle:"設定一覧",empty:"このブラウザに保存された設定はありません",saveTitle:"設定をブラウザキャッシュに保存",name:"設定名",namePlaceholder:"例:花火エフェクト",load:"読み込む",loadHint:"ダブルクリックで読み込む",download:"ダウンロード",delete:"削除",downloadCurrent:"現在の設定をダウンロード",downloadAll:"すべての設定をダウンロード",loadAll:"すべての設定を読み込む",loadAllConfirm:"{count} 個の設定ファイルを読み込みます。同名の設定は上書きされます。続行しますか?",loadAllDone:"ファイルから {count} 個の設定を読み込みました",loadAllPartial:"{imported} 個の設定を読み込み、{failed} 個のファイルが失敗しました",overwriteSave:"「{name}」は既に存在します。上書きしますか?",loadOverwrite:"「{name}」を読み込むと現在のシーンが置き換えられ、未保存の変更は失われます。続行しますか?",deleteConfirm:"「{name}」を削除しますか?",nameRequired:"設定名を入力してください",nameInvalid:'設定名に \\ / : * ? " < > | は使用できません',storageUnavailable:"ブラウザのローカルストレージを利用できません",saved:"ブラウザに保存しました:{name}",loaded:"ブラウザから読み込みました:{name}",deleted:"ブラウザの設定を削除しました:{name}",downloadEmpty:"ダウンロードできる設定がありません",downloaded:"ダウンロードしました:{name}"}},l$={bezierHint:"四角いハンドルをドラッグして円弧を調整します。 · 空白スペースをダブルクリックして新しいスペースを作成します。 · ノードをダブルクリックして削除します。",linearHint:"空白スペースをダブルクリックして、新しいスペースを作成します。ノードをダブルクリックして削除します。ノードをドラッグして調整します。",resetTitle:"デフォルトのカーブを復元する"},c$={addTitle:"リボンをダブルクリックしてカラーマークを追加します",color:"カラーコード",colorValue:"カラースケールのカラー値",position:"カラーマーク位置",addMiddle:"真ん中に色を入れる",delete:"現在のカラーパッチを削除します",hint:"カラーバンドをダブルクリックして新規追加・カラーマークをドラッグして位置を調整・カラーマークをダブルクリックして削除"},d$={angleOffset:"角度オフセット",value:"数値",lower:"下限",upper:"上限",rangeLower:"範囲の下限",rangeUpper:"上限範囲",curveInput:"曲線入力→",direction:"発射方向"},u$={title:"マップのピボットポイント",zoomOut:"ズームアウト",zoomIn:"拡大する",expand:"全画面へのズーム操作",interaction:"左クリック/ドラッグしてピボット ポイントを設定します。 · 右クリックしてキャンバスをドラッグします。 · スクロール ホイールでズームします。",previewAlt:"ピボットポイントのプレビュー",noImage:"画像が選択されていません",resetCenter:"中央に再配置 (50%、50%)",coordinates:"軸点座標(%)",rotationTest:"軸回転試験",static:"まだ",spin:"回転",swing:"スイング",rotationAlt:"回転試験",topLeft:"左上",top:"すぐ上",topRight:"右上",left:"右左",center:"真ん中",right:"右",bottomLeft:"左下",bottom:"真下・底",bottomRight:"右下"},h$={chooseSequence:"連番フレーム画像を選択",chooseLocal:"ローカル画像を選択",subfolder:"サブフォルダー",name:"名前",restore:"{name}を復元する",deleteResource:"画像リソースを削除する",imageMode:"ピクチャーモード",fixed:"固定",sequence:"シーケンス",playbackMode:"プレイモード",onceHide:"1回・最終フレームで非表示",onceHold:"1回・最終フレームを保持",loopForward:"正方向ループ",loopReverse:"逆方向ループ",playbackFps:"再生フレームレート",chooseSequenceMulti:"シーケンスフレームの選択(複数選択)",weight:"重み %",unlockWeight:"プロポーションロックを解除する",lockWeight:"現在の比率をロックする",pivot:"テクスチャピボット",collapsePivot:"折り畳むピボットポイントの調整",expandPivot:"ピボットポイントの調整を拡張する",pivotModal:"テクスチャ回転軸ポイント大画面リファインメント",pivotModalDesc:"下のマップ上の任意の場所をクリックまたはドラッグして、パーティクルの回転/スイング中心を正確に設定します。",pivotZoomHint:"100% ~ 400% の倍率をサポートし、先端または根元を正確に狙うことができます。",confirmPivot:"ピボットポイントを決定して保存する",noSequence:"シーケンスフレームが選択されていません",firstFrame:"フレーム 1",firstImage:"最初の写真",lastImage:"最後の写真",pivotOn:"オープン済み: X {x}% | Y {y}%",pivotOff:"オンになっていません。デフォルトは画像の中心付近 (50%、50%)",pivotCustom:"ピボット ポイントがカスタマイズされました: X {x}% | Y {y}%",frameCountOne:"1フレーム・{name}",frameCountMany:"{count}フレーム・{first}→{last}",sequenceSelected:"{count} フレームが選択され、{first}-{last} の順序で再生されます"},f$={play:"プレイ(D)",pause:"一時停止(D)",toStart:"最初のフレームに戻る(S)",previous:"前のフレーム",next:"次のフレーム",toEnd:"最後のフレームに移動",continuousLoop:"連続ループ再生",abLoop:"独立した A/B 区間ループ",abLoopShort:"AB ループ",abRange:"AB サイクル間隔",playbackStart:"カスタム再生開始フレーム",playbackEnd:"カスタム再生終了フレーム",startFrame:"再生開始フレーム",endFrame:"再生終了フレーム",frame:"フレーム",emission:"放出中",particleLife:"パーティクル存在",spineAnimation:"Spine アニメーション",ownerAnimation:"所属アニメーション",setOwnerAnimation:"現在のパーティクル システムが属するアニメーションを設定します",chooseOwnerAnimation:"アニメーションを選択してください",animationName:"アニメ名",renameAnimation:"現在のアニメーションの名前を変更する",rename:"名前の変更",newAnimation:"+ 新しい",keepOneAnimation:"少なくとも 1 つのアニメーションを保持する必要があります",spinePreview:"Spine プレビュー アニメーション",noSpineAnimation:"利用できる Spine アニメーションはありません",none:"なし",systemName:"システム {index}",dragLoopDuration:"ドラッグループセグメントの継続時間",dragEmissionDuration:"ドラッグ時間",dragSpineStart:"ドラッグしてアニメーションの開始時間を調整します",noAnimationData:"現在、表示するアニメーション データがありません。",animationNameEmpty:"アニメーション名を空にすることはできません",animationNameDuplicate:"アニメーション名を繰り返すことはできません",animationRenameFailed:"アニメーション名は変更できません",zoomIn:"拡大する",zoomOut:"ズームアウト",zoomFit:"適度",frameStatus:"フレーム {current} / {total}"},p$={title:"エミッションモード",reset:"送信モードパラメータをリセット",stream:"ストリーム",burst:"バースト",normalStream:"通常ストリーム",loopStream:"ループストリーム",rate:"放出レート",duration:"放出時間",loopDuration:"発射持続時間 (f)",generateStart:"開始ループアニメーションを生成する",generateEnd:"ループ終了アニメーションを生成する",customDuration:"期間を指定する",auto:"自動{frames}f",startLoopDuration:"ループセグメントの開始時間",endLoopDuration:"ループセグメントの終了時間",loopWarning:"ループ永続モードは、ボーン追跡とパス追跡をサポートしていません。パーティクルの次の設定は、開始または終了時にデフォルト値に復元されます。",burstCount:"一度の放出数",delay:"遅延時間",shapeTitle:"エミッター形状",shapeReset:"エミッタ形状パラメータをリセット",shape:"形",point:"点",circle:"円",rect:"矩形",cone:"円錐",path:"パス",innerDiameter:"内径",outerDiameter:"外径",innerRadius:"内半径",outerRadius:"外半径",coneDirection:"テーパ方向",coneAngle:"テーパー開き角度",innerWidth:"内幅",innerHeight:"高い内側",outerWidth:"外幅",outerHeight:"エクストラハイ",selectPath:"パスの選択",noPath:"パスなし (ポイント放出)",birthDistribution:"出生分布",evenDistribution:"等間隔固定分布",randomDistribution:"ランダムな分布",emissionAngle:"打ち出し角",radial:"ラジアル(中心外側)",pathNormal:"パスに対して垂直",pathTangent:"パス方向に沿って",fixedAngle:"固定角度",baseAngle:"底角",randomRange:"ランダムな範囲",showShape:"形状を表示"},m$={title:"パーティクル属性",reset:"パーティクル属性パラメータをリセット",initialParams:"パーティクル初期値",initialLife:"初期ライフサイクル",randomSample:"ランダムサンプリング →",initialSpeed:"初速",initialScale:"初期スケーリング",uniform:"統一された",separateXY:"XY分離",scaleX:"ズームX",scaleY:"ズームY",initialRotation:"初期回転",lifecycleTitle:"ライフタイム中の変化",speedOverLife:"ライフサイクル速度",speedMultiplier:"スピードマルチプライヤー",lifeTo:"ライフサイクル →",scaleOverLife:"ライフサイクル中のスケーリング",scaleMultiplier:"ズーム倍率",multiplierX:"倍率",multiplierY:"倍率Y",rotationOverLife:"ライフサイクル中に回転する",rotationSpeed:"回転速度"},g$={title:"外観とリソース",reset:"外観とリソースのパラメータをリセットする",opacity:"不透明度",curveMode:"カーブモード",transparent:"0(透明)",opaque:"1(不透明)",renderLayer:"レンダー階層(Spine スロット)",top:"トップレベル",spineSlot:"Spineスロット",selectSpine:"Spineを選択してください",noSpine:"利用可能なものはありません",noSlot:"スロットがまだ選択されていません",reselect:"再選択",selectSlot:"スロットを選択",searchSlots:"スロット名またはアクセサリ名を検索してください…",searchSlotsAria:"スロットを検索する",emptySlot:"空のスロット",noMatchingSlots:"一致するスロットがありません",above:"このスロットの絵の上に",below:"このスロットの絵の下に",followAttachment:"スロットアクセサリの表示と非表示を切り替える",previewOnly:"表示レベルの調整はエディターのプレビューにのみ影響し、エクスポートされたデータには影響しません。",imageResources:"画像リソース",addImage:"画像リソースを追加する",scale:"ズーム",color:"色",fixedColor:"固定色",randomColor:"ランダムな色",lifetime:"ライフサイクル",normal:"通常",add:"加算",multiply:"乗算",screen:"スクリーン",fixedColorValue:"固定色の値",randomColorHint:"各パーティクルは、生成時にリボンからランダムに色を選択し、ライフ サイクルを通じて変更されません。",independentAlpha:"独立した不透明度",off:"オフ"},v$={slotLabelAbove:"{spine} / {slot} · 上の写真",slotLabelBelow:"{spine} / {slot} · 写真の下",resolvedAbove:"{slot} イメージの上とそのスロットの下にレンダリングされます",resolvedBetween:"{previous} と {slot} の間でレンダリング",warningNoSpine:"Spine はロードされておらず、パーティクルが一時的に上部に表示されます。",warningNoSelection:"Spine はまだ選択されておらず、パーティクルが一時的に上部に表示されます。",warningMissingSpine:"ターゲットの Spine が存在しないため、パーティクルが一時的に上に表示されます。",warningNotReady:"ターゲット Spine の準備ができていないため、パーティクルが一時的に上部に表示されます。",warningMissingSlot:"ターゲット スロットが存在せず (リソースが置き換えられた可能性があります)、パーティクルが一時的に上部に表示されます。",warningFirstSlot:"これは最初のスロットであり、その下に表示することはできません。パーティクルは一時的に上に表示されます。"},b$={completed:"完了",failed:"操作が失敗しました"},y$={title:"シーンオブジェクト",addParticle:"パーティクルシステムを追加",addParticleShort:"+粒子",addCollider:"コライダーの追加",addColliderShort:"+衝突",addPath:"パスを追加",addPathShort:"+ パス",addSpine:"Spineを追加",copyTitle:"現在選択されているシーン オブジェクトをコピーします",showParticle:"パーティクル システムを表示する",hideParticle:"パーティクル システムを非表示にする",showCollider:"コライダーを表示",hideCollider:"コライダーを非表示にする",showPath:"パスを表示",hidePath:"パスを非表示にする",showSpine:"表示 Spine",hideSpine:"隠す",particle:"パーティクル",subEmitter:"サブエミッター",collision:"コリジョン",path:"パス",deleteParticle:"パーティクル システムの削除",deleteCollider:"コライダーの削除",deletePath:"パスを削除する",deleteSpine:"Spineを削除",empty:"シーンにはまだオブジェクトがありません",name:"名前",positionX:"X 位置",positionY:"Y 位置",offsetX:"X オフセット",offsetY:"Y オフセット",rotation:"回転",scaleX:"X スケール",scaleY:"Y スケール",seed:"ランダムシード",seedTitle:"パーティクル システム内のすべてのランダム アトリビュート、リソースの選択、モディファイアのランダム サンプリングを制御します。",randomizeSeed:"新しいグローバルランダムシードを生成する",seedHint:"初期ランダムパラメータ、リソース選択、および修飾子のランダムサンプリングを制御します。同じ種で同じ効果が再現できる",colliderTitle:"コライダーのプロパティ",colliderName:"コライダー名",type:"タイプ",circle:"ラウンド",ellipse:"楕円形",rect:"矩形",polygon:"ポリゴン",custom:"カスタマイズ",enabled:"有効にする",xPosition:"X 位置",yPosition:"Y 位置",scaleXShort:"X スケール",scaleYShort:"Y スケール",radius:"半径",radiusX:"X半径",radiusY:"Y半径",width:"幅",height:"高い",sides:"辺の数",collisionResponse:"クラッシュレスポンス",physics:"物理学 (バウンス/摩擦)",pause:"一時停止(停止)",destroy:"消えます(すぐに破壊します)",elasticity:"弾力性 (0-1)",friction:"摩擦 (0-1)",followPath:"道をたどってください",targetPath:"ターゲットパス",notSelected:"(選択されていません)",moveDuration:"移動時間(秒)",followDirection:"パスに沿った方向",moveProgressCurve:"進行曲線の移動",moveProgressHelp:"横軸: リアルタイム/移動時間。縦軸: パスの進行状況 (0=開始点 → 1=終了点)",pathTitle:"パス属性",pathName:"パス名",closedPath:"閉じたパス",pathColor:"パスの色",pathHelp:"操作説明:",pathHelpItems:"空白スペース/曲線をダブルクリック: 新しいアンカーポイントを作成、アンカーポイントをダブルクリック: ノードを削除、2 回目のダブルクリックしてドラッグ: 新しいノードを作成してハンドルを引き出し、アンカーポイントをドラッグして位置を移動、ハンドルをドラッグして曲線を調整、Shift + ハンドルをドラッグ: 両側で完全に対称、Alt+ ハンドルをドラッグ: 片側を独立して制御、Ctrl+クリック/フレーム選択: 選択したノードを追加、Alt+クリック/フレーム選択:選択したノードを減算し、Alt キーを押しながら空白スペースをクリックします。すべての選択をクリアし、複数のノードを選択して全体としてドラッグします。",applyPresetShape:"プリセット形状を適用する",choosePreset:"プリセットを選択...",square:"四角",star:"星形",applyPreset:"プリセットを適用する",clearAnchors:"明確なアンカーポイント",panelHint:"右上隅のボタンを使用してシーン オブジェクトを作成します"},x$={title:"モディファイア",reset:"モディファイアパラメータをリセット",damping:"減衰",enableNoise:"移動ノイズを有効化",strength:"強さ",noiseRange:"変動幅",noiseSpeed:"時間流量",noiseHint:"強度制御は比率に影響を与える ・変動範囲は最大偏差を制御する ・時間の流れは変化速度を制御する",enableGravity:"重力を有効化",gravityStrength:"重力の強さ",strengthMin:"最小強度",strengthMax:"強度最大値",direction:"方向",gravityOverLife:"ライフサイクル中の重力",windOverLife:"ライフサイクルの風",axisStrength:"縦軸:強度0~1",directionHint:"右 0°、下 -90°、負の強度で方向を反転",enableWind:"風を有効化",windStrength:"風の強さ",enableForceField:"フォースフィールドを有効化",centerX:"センターX",centerY:"センターY",forceStrength:"力場の強さ",forceRadius:"力場の半径",falloffMode:"ディケイモード",constant:"一定(範囲内で速度が変化しない)",linearFalloff:"リニアフォールオフ(エッジは0)",inverseFalloff:"距離に反比例(中心が最も強くなる)",forceHint:"正の数は中心に向かって引き寄せられ、負の数は外側に反発し、力場の円をキャンバス内でドラッグできます。",showShape:"形状を表示",enableVortex:"渦を有効化",vortexHint:"正の数は反時計回り、負の数は時計回り",enableAttraction:"吸着を有効化",attractionX:"吸着点X",attractionY:"吸着点Y",attractionRadius:"吸着半径",attractionDuration:"吸着時間",delay:"遅延時間",delayMode:"ディレイモード",globalTime:"統一時間",particleLife:"単一粒子の寿命",attractionPath:"吸着法",straight:"直線",attractionHint:"遅延後、現在位置から吸着を開始します。赤い範囲に到達すると死亡します。吸着円はキャンバス内でドラッグすることができます。",enableTrail:"トレイルを有効化",trailImages:"独立した画像を後続する",addTrailImage:"末尾の画像リソースを追加する",trailRotation:"回転させる",trailBones:"後続ボーンの数",trailRatio:"トレーリング率(%)",trailLength:"トレーリングの長さ",randomRange:"ランダムな範囲",lengthRatio:"長さ比率(%)",lengthMin:"最小長さ (%)",lengthMax:"最大長さ(%)",trailWidth:"トレーリング幅",widthRatio:"幅比(%)",widthMin:"幅の最小値 (%)",widthMax:"最大幅(%)",widthScale:"幅のスケーリング",followParticle:"粒子を追跡する",lifeLengthCurve:"ライフサイクル長曲線",shapeCurve:"形状カーブ(ヘッド→テール幅)",colorMode:"カラーモード",blendMode:"ブレンドモード",fixedColor:"固定色",alphaMode:"透明度モード",opacity:"透明性",gridRows:"グリッド行数",gridCols:"グリッド列の数",trailHint:"各パーティクルは、リソースに応じて一連の兄弟末尾ボーンを生成します。パーティクル誕生時にランダムな長さと幅が決まり、同じ種を安定して再現できる",enableFollow:"エミッター追従を有効化",followMode:"フォローモード",noFollow:"なし",followPath:"道をたどってください",selectedBone:"選択されたボーン",emitterAngleMode:"送信機角度モード",fixedAngle:"固定角度",followMoveDirection:"進行方向に従ってください",moveProgressCurve:"動作進行曲線(0→1)",moveDuration:"移動時間(秒)",followSpace:"スペースに従ってください",localSpace:"ローカル空間(GEN動作)",worldSpace:"ワールド空間(パーティクル生成点の移動)",moveDirection:"進行方向",forward:"前進(始点→終点)",reverse:"リバース(終点→始点)",followOffset:"オフセット開始点(0-1)",followSpaceHint:"ローカル空間はエミッタ全体を移動します。ワールド空間は新しいパーティクルのスポーン ポイントを移動するだけで、生成されたパーティクルはワールド位置に留まります。",followTarget:"目標に従ってください:",noValidBone:"有効なボーンがまだバインドされていません。最初に Spine 階層ツリーでボーンを選択してください。",rebind:"再バインド",bind:"バインディング",selectedBoneLabel:"現在選択されているボーン:",boneLocalSpace:"ローカル空間(ボーンと一緒に動きます)",boneWorldSpace:"ワールド空間 (パーティクルは生成後に位置を維持します)",offsetX:"変位オフセットX",offsetY:"変位オフセットY",rotationOffset:"回転オフセット",scaleOffsetX:"スケールオフセットX",scaleOffsetY:"スケールオフセットY",boneFollowHint:"エミッタは、選択した Spine ボーンの位置のみに従い、Spine の回転やスケーリングを継承しません。パーティクル変換では、パーティクル システム独自のパラメータと上限オフセットが使用されます。",enableCollision:"コリジョンを有効化",collisionObjects:"参加している衝突オブジェクト",colliderDisabled:"{name} (コライダー無効)",clearCollider:"衝突オブジェクトをクリア {name}",addCollider:"シーン衝突オブジェクトを追加する",noAvailableColliders:"追加する衝突オブジェクトはありません",noCollidersSelected:"衝突オブジェクトが選択されていないため、現在のパーティクルは衝突しません。",available:"利用可能",disabled:"無効",collisionHint:"追加および有効化されたシーン衝突オブジェクトのみが、現在のパーティクル システムの衝突に参加します。",enableSubEmitter:"サブエミッターを有効化",triggerTiming:"トリガー時間を選択してください",birth:"生まれる",death:"死ぬ",collision:"衝突",chooseTarget:"ターゲットパーティクルシステムを選択してください",noTarget:"なし (パーティクル システム)",deleteSubEmitter:"このサブエミッタを削除します",probability:"放出確率",collisionLimit:"衝突限界",inherit:"継承する",colorInheritMode:"色の継承方法",add:"追加",replace:"カバー",addSubEmitter:"+ 新しいサブエミッターを追加",inheritNone:"なし (デフォルト)",inheritAll:"すべてのプロパティ",inheritColor:"色",inheritScale:"サイズ",inheritRotation:"回転させる",inheritLife:"ライフサイクル"},w$={title:"Spine プロパティ",name:"Spine 名前",xPosition:"X 位置",yPosition:"Y 位置",rotation:"回転",scaleX:"X スケール",scaleY:"Y スケール",startTime:"開始時間",resources:"Spine リソース",chooseFolder:"フォルダを選択してロードする",folderHint:"JSON / SKEL、Atlas、およびフォルダー内のすべてのテクスチャを一度に読み取ります。リソースは引き続き以下で個別に置き換えることができます。",choose:"選ぶ",chooseMultiple:"選択(複数の選択肢)",loading:"読み込み中…",load:"↧ ロード",clear:"クリア",supportNote:"Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSONをサポート · 対応するバージョンの実行時にオンデマンドでロード · ローカルオフライン",currentResource:"現在のリソース {version}",animations:"Spine アニメーション",noAnimations:"利用できるアニメーションはありません",timelineAnimation:"タイムライン上でアニメーションを再生する",no:"なし",hierarchy:"階層ツリー",clearBoneTitle:"クリックしてボーンの選択をクリアします",noBoneTitle:"現在ボーンが選択されていません",clearBone:"選択したボーンをクリア: {name}",currentBone:"現在のスケルトン:",clearSlotTitle:"クリックしてスロットの選択をクリアします",noSlotTitle:"現在スロットが選択されていません",clearSlot:"選択したスロットをクリア: {name}",currentSlot:"現在のスロット:",notSelected:"未選択",expandAll:"すべて展開",collapseAll:"すべて折りたたむ",bones:"スケルトン",slots:"スロット",notLoaded:"ロードされていません Spine",searchBones:"骨を探す",searchBonesPlaceholder:"ボーン名を検索…",clearSearch:"検索をクリア",clearBoneSearch:"クリアボーン検索",noMatchingBones:"一致するボーンが見つかりません",expandChildren:"子ボーンを展開する",collapseChildren:"子ボーンを折りたたむ",notLoadedSlots:"Spine スロットがロードされていません",searchSlots:"スロットを検索する",searchSlotsPlaceholder:"スロット名またはアクセサリ名を検索してください…",clearSlotSearch:"スロット検索をクリアする",noMatchingSlots:"一致するスロットが見つかりません",slotTitle:"{name}(スケルトン:{bone}、アタッチメント:{attachment})",empty:"ヌル",textureSummary:"{count} 張: {names}",textureImages:"テクスチャ画像",missingFolderAssets:"選択したフォルダーが見つかりません: {missing}",chooseAssets:"Spine データ、Atlas、およびすべてのテクスチャ画像を順番に選択してください"},S$={title:"ヘルプ",subtitle:"パーティクルの作成から保存、エクスポートまでクイックスタート",close:"指示を閉じる",closeShort:"閉じる (Esc)",quickStart:"クイックスタート",stepCreate:"オブジェクトの作成: 左側の「シーン オブジェクト」で +Particles / +Collision / +Path / +Spine を使用して、シーン オブジェクトを追加します。",stepEdit:"パーティクルの編集: パーティクル システムを選択し、「放出モード → エミッタ形状 → パーティクル プロパティ → 外観とリソース → モディファイア」を調整します。",stepPreview:"効果を確認します: 下部のタイムラインは再生、一時停止、フレームごと、またはドラッグできます。パラメータを変更すると、自動的に再計算されます。",stepExport:"保存とエクスポート: 「設定の保存」を使用してプロジェクトを保持します。 「Spine Json/images package/.spine packageをエクスポート」で完成品を出力します。",quickNote:"各モジュールグループのタイトルの右側にある「リセット」をクリックすると、グループのデフォルトパラメータを復元できます。システム設定は現在のブラウザに自動的に保存されます。",commonOps:"よく使う操作",eye:"小さな目",eyeDesc:"オブジェクトを個別に表示/非表示にします。非表示のパーティクル システムはエクスポートされません。",copyDesc:"現在選択されているオブジェクトを完全にコピーして、さまざまなパラメータの比較を容易にします。",backgroundDesc:"参照画像をアップロードし、キャンバスプレビューのみ位置と透明度を調整します。",settingsDesc:"管理インターフェイスのレイアウト、補助表示、スケールなどはブラウザに自動的に保存されます。",undoDesc:"Ctrl+Z は 1 ステップ後退します。最大ステップ数はシステム設定で調整できます。",spineBoneDesc:"階層ツリーでボーンを検索して選択します。これは、追跡するパーティクル エミッタで使用できます。",shortcuts:"ショートカット",undoShortcut:"前のステップを元に戻す",saveShortcut:"設定の保存",panShortcut:"キャンバスをドラッグする",translateShortcut:"変位ツール",rotateShortcut:"回転工具",scaleShortcut:"ズームツール",playShortcut:"再生/一時停止",startShortcut:"最初のフレームに戻る",shortcutNote:"Q / W / E / R は最初にキャンバスをクリックする必要があります。カーソルが入力ボックス内にある場合、単一キーのショートカット キーはトリガーされません。",modules:"機能モジュール",configTitle:"構成管理",saveConfigDesc:"現在のシーン オブジェクトとパラメータをすべてプロジェクト JSON ファイルとして保存します (Ctrl+S もサポートされています)。",loadConfigDesc:"ローカル構成ファイルを選択して、完全なプロジェクトを復元します。",presetDesc:"ドロップダウンからデフォルトのクイック適用を選択します。ドロップダウンをクリックしてリストを更新します。",configScope:"範囲",configScopeDesc:"設定にはオブジェクトとパラメータが含まれます。インターフェースとシステム設定はブラウザーに別々に保存されます。",sceneTitle:"シーンオブジェクト",particleDesc:"コアオブジェクト。位置、オフセット、回転、スケーリング、ランダム シードを設定できます。同じ種は同じ効果を再現できます。",colliderDesc:"円/楕円/長方形/多角形/カスタム、物理的なバウンス、一時停止、破壊、パスに沿った移動をサポートします。",pathDesc:"アンカー ポイント、コントロール ハンドル、クロージャー、カラー、プリセット形状をサポートするベジェ パス。",spineDesc:"Spine データ、Atlas およびテクスチャをロードし、ボーンとスロットを参照し、エミッタを追跡します。",sceneCommonDesc:"オブジェクトは個別に公開およびコピーできます。非表示のパーティクル システムはエクスポートされません。",emissionDesc:"連射、バースト、ディレイ、開始/ループ/終了の3段階ループ持続時間。",burstDesc:"指定した数のパーティクルを一度に放出します。",delayDesc:"パーティクル バーの左端に対応する、放出が開始されるまでの待ち時間。",loopNote:"ループ永続性はボーンとパスのフォローをサポートしていません。切り替え時に次の設定が復元されます。",shapeDesc:"点、円、長方形、円錐、またはパスの生成エリア。円/円錐は内部半径と外部半径をサポートし、長方形は内部と外部の幅と高さをサポートします。",angleDesc:"固定、ランダム、放射状、パス法線、またはパス接線。",initialDesc:"ライフサイクル、速度、スケーリング、回転は、固定、ランダム、カーブ、および回転をサポートしており、起動方向に従うことができます。",overLifeDesc:"ライフサイクルカーブにより速度倍率、ズーム倍率、回転速度を制御できます。",alphaDesc:"透明度は固定または曲線をサポートします。曲線モードは、派生、線形、またはベジェに従うことができます。",imageDesc:"単一の画像またはシーケンス フレーム、複数画像のウェイトのランダム化、ピボット ポイント、カラー、ブレンド モード、および独立した透明度。",sequenceDesc:"再生方法には、1 回の非表示、1 回のフリーズ、順方向ループ、および逆方向ループが含まれます。",noiseDesc:"ジッター トレースを生成し、強度、範囲、速度を制御します。",gravityDesc:"重力、風、ライフサイクルの強度曲線。",forceDesc:"グローバルな力場、渦、吸着、衝突。",trailDesc:"独立したトレーリング アセット、ボーン数、長さ、幅、形状、色、透明度のカーブ。",followDesc:"エミッタはパスまたは Spine ボーンをたどることができます。",collisionDesc:"シーン衝突オブジェクトとパーティクル衝突応答を選択します。",exportDesc:"画像パス、Spine バージョン、キーフレーム カーブ、FPS、整数フレーム、ボーン プール、空のアニメーションを設定します。",exportButtonsDesc:"コネクタを介して、Spine JSON、画像 ZIP をエクスポートしたり、.spine プロジェクトを生成したりできます。",connectorTitle:"Spine コネクタの使用説明書",connectorIntro:"コネクタは、JSON と Web ページによって生成されたイメージを、ローカル マシンにインストールされアクティブ化されている Spine に配信し、編集可能な .spine プロジェクトに変換します。",prerequisite:"フロントロード",prerequisiteDesc:"コンピューターには Spine がインストールされてアクティブ化されており、デスクトップ コネクタが起動されています。",download:"ダウンロード",webSide:"ウェブページ",webSideDesc:"「コネクタが利用可能・Spineの準備ができました」と表示されたら、「.spineパッケージをエクスポート」をクリックします。",authorization:"最初の認可",authorizationDesc:"最初の接続では、Web サイトのソースを確認し、一度許可する必要があります。このマシンは認証ホワイトリストを保存します。",pathSetup:"パスの設定",pathSetupDesc:"コネクタは Spine を自動的に検出します。見つからない場合は、アプリケーション パスを手動で指定できます。",downloadResult:"ダウンロード結果",downloadResultDesc:".spine プロジェクトとイメージ ディレクトリが含まれる ZIP パッケージを取得します。",version:"バージョン",versionDesc:"コネクタは、JSON バージョンに応じて、Spine 3.8 ~ 4.3 に自動的に一致します。",security:"安全性",securityDesc:"ローカル アドレスのみをリッスンし、認証はコネクタに保存され、一時ファイルは変換後にクリーンアップされます。",differenceTitle:"構成とエクスポートの違いは何ですか?",differenceDesc:"「設定の保存」では、編集可能なすべてのオブジェクトとパラメータが保存されます。 「Spine Json のエクスポート」は、表示されているパーティクル システムのみをエクスポートし、コリジョン、フォロー、トレーリング、サブエミッターの結果を独立したアニメーション データにベイクします。"},C$={confirmLoopFollowEnter:"ループ連続モードに入ると、パーティクル追従設定は無効になり、デフォルト値に戻ります。続く?",confirmLoopFollowExit:"ループ永続モードを終了すると、パーティクル追従設定は無効になり、デフォルト値に戻ります。続く?",invalidJson:"構成ファイルが有効ではありません JSON",invalidConfigFormat:"SpineParticle 編集者プロフィールではありません",unsupportedConfigVersion:"構成バージョンはまだサポートされていません: {version}",missingScene:"設定ファイルに完全なシーン データがありません",missingEmbeddedSpine:"構成には再利用可能な Spine の元のリソースが含まれていません",chooseJsonConfig:".json 構成ファイルを選択してください",settingsInvalidJson:"システム設定キャッシュが有効ではありません JSON",settingsFormat:"SpineParticle エディターのシステム設定キャッシュではありません",settingsVersion:"システム構成バージョンはまだサポートされていません: {version}",settingsMissing:"システム設定キャッシュに設定がありません",noExportableImages:"現在表示されているパーティクル システムにはエクスポート可能なイメージがありません",invalidZipPath:"ZIP 無効なファイル パス",spineFileType:"Spine データは .json または .skel のみをサポートします",atlasFileType:"アトラス ファイルは .atlas のみをサポートします",chooseTexture:"少なくとも 1 つのテクスチャ画像を選択してください",binaryParseFailed:"Spine バイナリ解析に失敗しました (4.3: {v43}、旧バージョン: {v42})",invalidSpineJson:"Spine JSON 無効なファイル形式です",unsupportedSpineJsonVersion:"Spine JSON バージョンはサポートされていません。{versions} のみがサポートされています",unsupportedSpineDataVersion:"Spine データ バージョンはサポートされていません。{versions} のみがサポートされています",embeddedReadFailed:"埋め込み Spine ファイルを読み取れません: {name}",missingImageWarning:"画像「{file}」が見つからないか、読み取り不能な寸法があり、パスは保存されています。",missingTrailImageWarning:"末尾のイメージ「{file}」がありませんが、パスは保存されています。",emptyCacheWarning:"「{name}」に使用できるフレームバッファがありません。",readExportImageFailed:"エクスポートされた画像を読み取れません: {name}",connectorOffline:"ローカルの Spine コネクタが検出されません。最初にコネクタを有効にしてください",connectorHttpError:"Spine コネクタがエラーを返します: HTTP {status}",invalidTrailUV:"後続メッシュ「{name}」の UV データが無効です",missingTrailVertices:"後続メッシュ '{name}' に頂点データがありません",trailIndexOutOfRange:"後続メッシュ「{name}」の三角形インデックスが範囲外です",invalidTrailHull:"後続メッシュ「{name}」の外側輪郭番号が無効です",trailHullIndexOutOfRange:"トレーリングメッシュ「{name}」の外側輪郭エッジインデックスが範囲外です",invalidInfluenceCount:"後続メッシュ '{name}' に無効な数のボーン ウェイトが含まれています",missingBoneReference:"後続メッシュ「{name}」が存在しないボーンを参照しています",invalidWeight:"後続グリッド「{name}」に無効な重量データが含まれています",weightSum:"後続メッシュ「{name}」の頂点の重みの合計が 1 になりません",vertexCountMismatch:"後続メッシュ「{name}」の頂点と UV の数が一貫していません",invalidInherit:"ボーン「{name}」の継承値「{inherit}」は、Spine {version} JSON 形式に準拠していません",trailBoneParent:"後続のボーン「{name}」はパーティクル システム ボーンの下に直接ぶら下げる必要があり、ボーン チェーンを形成することはできません。",trailSlotEmpty:"加重末尾スロット「{name}」では空のアタッチメントを使用できません。対応するボーン スケーリングは、非出現フェーズまたは死亡フェーズでは 0 に設定する必要があります。",spine38Version:"Spine 3.8 エクスポートされるバージョン ID は 3.8 である必要があります",spine38Inherit:"Spine 3.8 ボーン「{name}」は変換を使用する必要があり、継承は使用できません",spine38SlotColor:"Spine 3.8 スロット カラー タイムラインはカラー / twoColor を使用する必要があります",spine38AttachmentName:"Spine 3.8 添付ファイルのタイムラインの非表示フレームは明示的に記述する必要があります name: null",spine38RotationAngle:"Spine 3.8 時間軸を回転するには角度を使用する必要があります",spine38Curve:"Spine 3.8 は 4.x 配列曲線形式をサポートしていません",unsupportedExportVersion:"エクスポートされたバージョンはサポートされていません。Spine {versions} のみがサポートされています",exportVersionMismatch:"一貫性のないエクスポート バージョン: Spine {expected}、JSON に設定され、Spine {actual} としてマークされます",exportMissingBones:"エクスポート結果にボーンがありません",missingAtlasTexture:"Atlas によって参照されるテクスチャが選択されていません: {name}"},A$={label:"言語",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},T$={app:i$,common:s$,toolbar:r$,settings:o$,config:a$,curve:l$,gradient:c$,attributeControl:d$,pivot:u$,image:h$,timeline:f$,emission:p$,attributes:m$,appearance:g$,renderLayer:v$,export:{title:"エクスポートリソース",reset:"エクスポートリソースをリセット",imagesPath:"画像パス (Spine 画像パス)",spineVersion:"Spine バージョン",keyframeCurve:"キーフレーム補間カーブ",linear:"リニア",smoothBezier:"スムーズ ベジェ (スムーズ Bézier)",bezierHelp:"スムーズ ベジェは連続モーションを誤差許容範囲内に適合させます。誕生、死亡、アタッチメントの切り替え、突然変異では引き続きステップ キーフレームが使用されます。",spine38Help:"Spine 3.8 は 4.x のチャネルごとの配列ベジェをサポートしておらず、エクスポート時に許容差が低減された区分的線形キーフレームに変換されます。",fps:"エクスポート FPS",omitFps:"fpsは書かないでください",fpsHelp:"FPS を変更するときは、アニメーションの実際の秒数を変更しないでください。 「fps を書かない」は、Spine の fps メタデータのみを省略します。",integerFrames:"整数フレームの位置合わせ",bonePool:"ボーン オブジェクト プール",excludeEmpty:"内容のないアニメーションを除外する",baking:"アニメーションが再計算されてベイクされています",exportJsonTitle:"エクスポート Spine {version} JSON",preparing:"エクスポートの準備中...",exportJson:"Spine JSON を書き出す",exportImagesTitle:"現在のパーティクル システム ZIP で使用されているイメージを別途ダウンロードします。",organizingImages:"写真を並べ替えています...",exportImages:"画像 ZIP を書き出す",generatingProject:"プロジェクトを生成中...",exportSpine:".spine パッケージをエクスポートする",authorize:"現在の Web サイトを認証する",authorizeTitle:"ネイティブ コネクタで現在の Web サイトを承認する",refreshConnector:"コネクタを再確認してください",refresh:"リフレッシュする",recalculating:"パーティクル アニメーションを再計算しています...",exported:"エクスポートされた Spine {version}: {systems} パーティクル システム、{animations} アニメーション、{bones} ルート ボーン {warning}",resourceWarning:";{count} リソースのヒント (不足している画像もエクスポートされます)",timeout:"アニメーションのタイムアウトを再計算します。ページがまだ実行中であることを確認して、再試行してください。",preparingProject:"写真を並べ替えて、このマシンを Spine と呼び出します…",projectExported:"{fileName} が生成されました: .spine プロジェクトと {images} 画像、Spine {version} を含む",collectingImages:"現在パーティクル システムで使用されている画像を照合しています...",imagesExported:"{fileName} が生成されました: {folder}/ {images} 画像が含まれています",connectorChecking:"ローカルの Spine コネクタを検出しています...",connectorOffline:"ローカル Spine コネクタが起動していません",spineNotFound:"コネクタは起動していますが Spine が見つかりません",notAuthorized:"コネクタは起動していますが、このサイトは未認証です",connectorReady:"コネクタ使用可能 · Spine 準備完了",connectorBusy:"Spine プロジェクトを再計算して生成中",connectorGenerate:"ローカル Spine で Spine {version} プロジェクトを生成",unknown:"未知",checking:"確認中",offline:"未起動",notFound:"Spine が見つかりません",unauthorized:"未認証",projectTransferTitle:"Spine パッケージをエクスポートする",projectTransferDetail:"パーティクル アニメーションを再計算しています...",projectTransferDownload:"Spine プロジェクト パッケージがダウンロードされました",generatingJson:"Spine JSON を生成中…",preparingProjectFiles:"プロジェクトの写真を照合中...",uploading:"Spine コネクタにデータをアップロードしています...",spineProcessing:"Spine がプロジェクトを変換中です。お待ちください...",downloadingProject:"生成された Spine プロジェクト パッケージをダウンロードしています...",handingToBrowser:"ダウンロードのためにブラウザに引き渡しています..."},transfer:b$,scene:y$,modifiers:x$,spine:w$,help:S$,errors:C$,language:A$},E$={resizeTimeline:"드래그하여 타임라인 높이 조정",systems:"체계",particlesBones:"입자(뼈)",rootBone:"뿌리뼈",hudTip:"휠 확대/축소 · 캔버스를 드래그하려면 왼쪽 클릭",title:"Spine 파티클 에디터-Yeomai"},_$={close:"닫기",collapse:"접기",reset:"초기화",add:"추가",remove:"제거",delete:"삭제",clear:"지우기",cancel:"취소",confirm:"확인",none:"없음",enabled:"사용",disabled:"사용 안 함",fixed:"고정",random:"랜덤",curve:"곡선",followExport:"내보내기 설정 따르기",linear:"선형",bezier:"베지어",above:"위",below:"아래",left:"왼쪽",right:"오른쪽",seconds:"초",frames:"프레임"},M$={settings:"설정",undo:"실행 취소 (Ctrl+Z)",pan:"캔버스 이동 (Q)",translate:"이동 (W)",rotate:"회전 (E)",scale:"크기 조절 (R)",zoomIn:"확대",zoomOut:"축소",fitView:"캔버스에 맞추기",toggleGrid:"그리드 전환",resetView:"보기 초기화",background:"배경",backgroundSettings:"배경 이미지 설정",changeBackground:"이미지 교체",uploadBackground:"이미지 업로드",clearBackground:"배경 지우기",noBackground:"이미지 없음",backgroundX:"배경 이미지 X 오프셋",backgroundY:"배경 이미지 Y 오프셋",backgroundOpacity:"배경 이미지 투명도",opacity:"불투명도",help:"도움말",openHelp:"도움말 열기"},P$={title:"시스템 설정",layout:"인터페이스 레이아웃",floatingMenu:"플로팅 메뉴",floatingMenuParticleOnly:"먼저 파티클 시스템을 선택하세요",parameterPanelPosition:"매개변수 패널 위치",panelOnRight:"매개변수 패널이 오른쪽에 표시됩니다.",history:"운영 이력",maxUndo:"뒤로 최대 단계 수",canvasGuides:"캔버스 보조 디스플레이",emitter:"발사 지점",bones:"뼈 연결",bonePointSize:"뼈점 도면 크기",boneAxisSize:"축 도면 크기",skinMesh:"스킨드 메쉬",enableTicks:"진드기 활성화",tickFontSize:"텍스트 크기 조정",tickWidth:"눈금 표시 두께",axisColor:"축 색상",showAxisLabels:"표시 스케일 값",unsavedPrompt:"저장되지 않은 변경 확인",showProjectSize:"설정 사용 공간 표시",cacheNote:"전체 시스템 설정이 현재 브라우저에 자동으로 저장됩니다."},k$={title:"설정 관리",save:"설정 저장",saveTitle:"브라우저 캐시에 설정 저장",load:"설정 불러오기",loadTitle:"로컬 편집기 구성 로드",presets:"프리셋 목록",selectPreset:"프리셋 선택",noPresets:"프리셋 없음",saved:"구성이 로컬에 저장되었습니다.",loading:"구성 로드 중…",loaded:"로드됨: {name}",presetLoading:"사전 설정 로드 중…",presetLoaded:"프리셋 로드됨: {name}",presetNamingError:"{message}, 기본 파일 이름을 확인하세요",presetTransferTitle:"사전 설정 로드",presetDownloading:"{file} 다운로드 중…",presetParsing:"기본 구성을 구문 분석하는 중...",presetRestoring:"기본 리소스를 구문 분석하고 복원하는 중...",presetComplete:"프리셋 로딩 완료",presetListError:"사전 설정 목록을 읽을 수 없습니다.",presetReadError:"사전 설정을 읽을 수 없습니다: {file}",local:{listTitle:"설정 목록",empty:"이 브라우저에 저장된 설정이 없습니다",saveTitle:"브라우저 캐시에 설정 저장",name:"설정 이름",namePlaceholder:"예: 폭죽 효과",load:"불러오기",loadHint:"더블클릭하여 불러오기",download:"다운로드",delete:"삭제",downloadCurrent:"현재 설정 다운로드",downloadAll:"모든 설정 다운로드",loadAll:"모든 설정 불러오기",loadAllConfirm:"설정 파일 {count}개를 가져옵니다. 같은 이름의 설정은 덮어씁니다. 계속할까요?",loadAllDone:"파일에서 설정 {count}개를 불러왔습니다",loadAllPartial:"설정 {imported}개를 가져왔고 {failed}개 파일이 실패했습니다",overwriteSave:"'{name}'이(가) 이미 있습니다. 덮어쓸까요?",loadOverwrite:"'{name}'을(를) 불러오면 현재 장면이 교체되고 저장하지 않은 변경 사항이 사라집니다. 계속할까요?",deleteConfirm:"'{name}'을(를) 삭제할까요?",nameRequired:"설정 이름을 입력하세요",nameInvalid:'설정 이름에는 \\ / : * ? " < > | 문자를 사용할 수 없습니다',storageUnavailable:"브라우저 로컬 저장소를 사용할 수 없습니다",saved:"브라우저에 저장했습니다: {name}",loaded:"브라우저에서 불러왔습니다: {name}",deleted:"브라우저 설정을 삭제했습니다: {name}",downloadEmpty:"다운로드할 설정이 없습니다",downloaded:"다운로드했습니다: {name}"}},I$={bezierHint:"원호를 조정하려면 사각형 핸들을 드래그하세요. · 새 공간을 만들려면 빈 공간을 두 번 클릭하세요. · 삭제하려면 노드를 두 번 클릭하세요.",linearHint:"빈 공간을 더블클릭하면 새로운 공간이 생성됩니다. 삭제하려면 노드를 두 번 클릭하세요. 노드를 드래그하여 조정하세요.",resetTitle:"기본 곡선 복원"},R$={addTitle:"색상 표시를 추가하려면 리본을 두 번 클릭하세요.",color:"색상 코드",colorValue:"색상 스케일 색상 값",position:"컬러마크 위치",addMiddle:"중간에 색을 넣어주세요",delete:"현재 색상 패치 삭제",hint:"색상 밴드를 두 번 클릭하여 새 색상 추가 · 색상 표시를 드래그하여 위치 조정 · 색상 표시를 두 번 클릭하여 삭제"},F$={angleOffset:"각도 오프셋",value:"수치",lower:"하한",upper:"상한",rangeLower:"범위의 하한",rangeUpper:"상위 범위",curveInput:"곡선 입력 →",direction:"발사방향"},L$={title:"지도 피벗 포인트",zoomOut:"축소",zoomIn:"크게 하다",expand:"전체 화면으로 확대 작업",interaction:"피벗 포인트를 설정하려면 왼쪽 클릭/드래그 · 캔버스를 드래그하려면 마우스 오른쪽 버튼을 클릭 · 확대/축소하려면 휠 스크롤",previewAlt:"피벗 포인트 미리보기",noImage:"선택한 사진이 없습니다.",resetCenter:"중간에 재배치 (50%, 50%)",coordinates:"축점 좌표(%)",rotationTest:"축 회전 테스트",static:"아직",spin:"회전",swing:"그네",rotationAlt:"회전 테스트",topLeft:"왼쪽 위",top:"바로",topRight:"오른쪽 위",left:"오른쪽 왼쪽",center:"가운데",right:"오른쪽",bottomLeft:"왼쪽 아래",bottom:"바로 아래·아래",bottomRight:"오른쪽 아래"},D$={chooseSequence:"시퀀스 프레임 사진 선택",chooseLocal:"로컬 이미지 선택",subfolder:"하위 폴더",name:"이름",restore:"{name} 복원",deleteResource:"이미지 리소스 삭제",imageMode:"영상 모드",fixed:"고정",sequence:"시퀀스",playbackMode:"플레이 모드",onceHide:"1회·마지막 프레임에서 숨김",onceHold:"1회·마지막 프레임 유지",loopForward:"정방향 루프",loopReverse:"역방향 루프",playbackFps:"재생 프레임 속도",chooseSequenceMulti:"시퀀스 프레임 선택(다중 선택)",weight:"가중치 %",unlockWeight:"비율 잠금 해제",lockWeight:"현재 비율 잠금",pivot:"텍스처 피벗",collapsePivot:"피봇 포인트 조정 축소",expandPivot:"피봇 포인트 조정 확장",pivotModal:"텍스처 회전축 포인트 대형 화면 미세 조정",pivotModalDesc:"입자의 회전/스윙 중심을 정확하게 설정하려면 아래 지도의 아무 곳이나 클릭하거나 드래그하세요.",pivotZoomHint:"100% ~ 400% 배율 지원, 끝이나 뿌리를 정확하게 조준:",confirmPivot:"피봇 포인트 결정 및 저장",noSequence:"선택한 시퀀스 프레임이 없습니다.",firstFrame:"프레임 1",firstImage:"첫 번째 사진",lastImage:"마지막 사진",pivotOn:"열림: X {x}% | 와 {y}%",pivotOff:"켜지지 않음, 기본값은 이미지 중앙 주위(50%, 50%)입니다.",pivotCustom:"피벗 포인트가 사용자 정의되었습니다: X {x}% | 와 {y}%",frameCountOne:"1 프레임 · {name}",frameCountMany:"{count} 프레임 · {first} → {last}",sequenceSelected:"{count} 프레임을 선택하여 {first}~{last} 순서대로 재생하였습니다."},O$={play:"플레이(D)",pause:"일시정지(D)",toStart:"첫 번째 프레임으로 돌아가기(S)",previous:"이전 프레임",next:"다음 프레임",toEnd:"마지막 프레임으로 이동",continuousLoop:"연속 루프 재생",abLoop:"독립 A/B 구간 루프",abLoopShort:"AB 루프",abRange:"AB 사이클 간격",playbackStart:"사용자 정의 재생 시작 프레임",playbackEnd:"사용자 정의 재생 종료 프레임",startFrame:"재생 시작 프레임",endFrame:"종료 프레임 재생",frame:"액자",emission:"이미션 중",particleLife:"파티클 존재",spineAnimation:"Spine 애니메이션",ownerAnimation:"소속 애니메이션",setOwnerAnimation:"현재 입자 시스템이 속한 애니메이션을 설정합니다.",chooseOwnerAnimation:"애니메이션을 선택하세요",animationName:"애니메이션 이름",renameAnimation:"현재 애니메이션 이름 바꾸기",rename:"이름 바꾸기",newAnimation:"+ 신규",keepOneAnimation:"하나 이상의 애니메이션을 유지해야 합니다.",spinePreview:"Spine 미리보기 애니메이션",noSpineAnimation:"사용 가능한 Spine 애니메이션이 없습니다.",none:"없음",systemName:"시스템 {index}",dragLoopDuration:"드래그 루프 세그먼트 지속 시간",dragEmissionDuration:"드래그 시간",dragSpineStart:"드래그하여 애니메이션 시작 시간 조정",noAnimationData:"현재 표시할 애니메이션 데이터가 없습니다.",animationNameEmpty:"애니메이션 이름은 비워둘 수 없습니다.",animationNameDuplicate:"애니메이션 이름은 반복할 수 없습니다.",animationRenameFailed:"애니메이션 이름을 수정할 수 없습니다",zoomIn:"크게 하다",zoomOut:"축소",zoomFit:"보통의",frameStatus:"프레임 {current} / {total}"},N$={title:"이미션 모드",reset:"전송 모드 매개변수 재설정",stream:"스트림",burst:"버스트",normalStream:"일반 스트림",loopStream:"루프 스트림",rate:"이미션 속도",duration:"이미션 시간",loopDuration:"발사 기간(f)",generateStart:"시작 루프 애니메이션 생성",generateEnd:"끝 루프 애니메이션 생성",customDuration:"기간 지정",auto:"자동 {frames}f",startLoopDuration:"루프 세그먼트 지속 시간 시작",endLoopDuration:"종료 루프 세그먼트 기간",loopWarning:"루프 지속성 모드는 뼈대 따르기 및 경로 따르기를 지원하지 않습니다. 입자 추적 설정은 들어가거나 나갈 때 기본값으로 복원됩니다.",burstCount:"1회 생성 수",delay:"지연 시간",shapeTitle:"이미터 모양",shapeReset:"이미터 모양 매개변수 재설정",shape:"모양",point:"점",circle:"원",rect:"사각형",cone:"원뿔",path:"경로",innerDiameter:"내경",outerDiameter:"외경",innerRadius:"내부 반경",outerRadius:"외부 반경",coneDirection:"테이퍼 방향",coneAngle:"테이퍼 개방 각도",innerWidth:"내부 폭",innerHeight:"높은 내부",outerWidth:"외부 폭",outerHeight:"매우 높음",selectPath:"경로 선택",noPath:"경로 없음(점 방출)",birthDistribution:"출생 분포",evenDistribution:"등간격 고정 분포",randomDistribution:"무작위 분포",emissionAngle:"발사 각도",radial:"방사형(중심 바깥쪽)",pathNormal:"경로에 수직",pathTangent:"경로 방향을 따라",fixedAngle:"고정 각도",baseAngle:"기본 각도",randomRange:"무작위 범위",showShape:"모양을 보여주다"},$$={title:"파티클 속성",reset:"입자 속성 매개변수 재설정",initialParams:"파티클 초기값",initialLife:"초기 수명주기",randomSample:"무작위 샘플링 →",initialSpeed:"초기 속도",initialScale:"초기 스케일링",uniform:"통일된",separateXY:"XY 분리",scaleX:"줌 X",scaleY:"줌 Y",initialRotation:"초기 회전",lifecycleTitle:"수명에 따른 변화",speedOverLife:"수명 주기 속도",speedMultiplier:"속도 승수",lifeTo:"수명주기 →",scaleOverLife:"수명 주기 동안 확장",scaleMultiplier:"줌 비율",multiplierX:"확대",multiplierY:"배율 Y",rotationOverLife:"수명주기 동안 회전",rotationSpeed:"회전 속도"},B$={title:"외형과 리소스",reset:"모양 및 자원 매개변수 재설정",opacity:"불투명도",curveMode:"곡선 모드",transparent:"0(투명)",opaque:"1(불투명)",renderLayer:"렌더링 레이어(Spine 슬롯)",top:"최상위 수준",spineSlot:"Spine 슬롯",selectSpine:"Spine를 선택하세요",noSpine:"사용 가능한 항목 없음",noSlot:"아직 선택한 슬롯이 없습니다.",reselect:"재선택",selectSlot:"슬롯 선택",searchSlots:"슬롯 또는 액세서리 이름을 검색하세요…",searchSlotsAria:"슬롯 검색",emptySlot:"빈 슬롯",noMatchingSlots:"일치하는 슬롯 없음",above:"이 슬롯 사진 위에",below:"이 슬롯 사진 아래",followAttachment:"슬롯 액세서리로 표시 및 숨기기",previewOnly:"표시 수준을 조정하면 편집기 미리보기에만 영향을 미치고 내보낸 데이터에는 영향을 주지 않습니다.",imageResources:"이미지 리소스",addImage:"이미지 리소스 추가",scale:"줌",color:"색상",fixedColor:"고정된 색상",randomColor:"임의의 색상",lifetime:"수명주기",normal:"일반",add:"더하기",multiply:"곱하기",screen:"스크린",fixedColorValue:"고정된 색상 값",randomColorHint:"각 입자는 생성될 때 리본에서 무작위로 색상을 선택하고 수명 주기 동안 변경되지 않습니다.",independentAlpha:"독립 불투명도",off:"끄기"},U$={slotLabelAbove:"{spine} / {slot} · 위 사진",slotLabelBelow:"{spine} / {slot} · 사진 아래",resolvedAbove:"{slot} 이미지 위와 해당 슬롯 아래에 렌더링됨",resolvedBetween:"{previous}와 {slot} 사이에서 렌더링됨",warningNoSpine:"로드된 Spine가 없으며 입자가 일시적으로 상단에 표시됩니다.",warningNoSelection:"Spine는 아직 선택되지 않았으며 입자가 일시적으로 상단에 표시됩니다.",warningMissingSpine:"대상 Spine가 존재하지 않으며 입자가 일시적으로 상단에 표시됩니다.",warningNotReady:"대상 Spine가 준비되지 않았으며 입자가 일시적으로 상단에 표시됩니다.",warningMissingSlot:"대상 슬롯이 존재하지 않으며(리소스가 교체되었을 수 있음) 파티클이 일시적으로 상단에 표시됩니다.",warningFirstSlot:"이것은 첫 번째 슬롯으로 그 아래에 표시될 수 없으며 파티클은 일시적으로 위에 표시됩니다."},V$={completed:"완전한",failed:"작업 실패"},X$={title:"장면 오브젝트",addParticle:"파티클 시스템 추가",addParticleShort:"+입자",addCollider:"충돌기 추가",addColliderShort:"+충돌",addPath:"경로 추가",addPathShort:"+ 경로",addSpine:"Spine 추가",copyTitle:"현재 선택된 장면 객체를 복사합니다.",showParticle:"입자 시스템 표시",hideParticle:"입자 시스템 숨기기",showCollider:"충돌체 표시",hideCollider:"충돌체 숨기기",showPath:"경로 표시",hidePath:"경로 숨기기",showSpine:"Spine 표시",hideSpine:"Spine 숨기기",particle:"파티클",subEmitter:"하위 이미터",collision:"충돌",path:"경로",deleteParticle:"입자 시스템 삭제",deleteCollider:"충돌체 삭제",deletePath:"경로 삭제",deleteSpine:"Spine 삭제",empty:"아직 장면에 객체가 없습니다.",name:"이름",positionX:"X 위치",positionY:"Y 위치",offsetX:"X 오프셋",offsetY:"Y 오프셋",rotation:"회전",scaleX:"X 크기",scaleY:"Y 크기",seed:"랜덤 시드",seedTitle:"입자 시스템의 모든 무작위 속성, 리소스 선택 및 수정자 무작위 샘플링을 제어합니다.",randomizeSeed:"새로운 전역 무작위 시드 생성",seedHint:"초기 무작위 매개변수, 자원 선택 및 수정자 무작위 샘플링을 제어합니다. 같은 씨앗은 같은 효과를 재현할 수 있습니다",colliderTitle:"충돌기 속성",colliderName:"충돌기 이름",type:"유형",circle:"둥근",ellipse:"타원형",rect:"구형",polygon:"다각형",custom:"사용자 정의",enabled:"~할 수 있게 하다",xPosition:"X 위치",yPosition:"Y 위치",scaleXShort:"X 크기",scaleYShort:"Y 크기",radius:"반지름",radiusX:"X 반경",radiusY:"Y 반경",width:"너비",height:"높은",sides:"면의 수",collisionResponse:"충돌 대응",physics:"물리학(바운스/마찰)",pause:"일시정지(중지)",destroy:"사라지다(즉시 파기)",elasticity:"탄력성 (0-1)",friction:"마찰(0-1)",followPath:"길을 따라가세요",targetPath:"대상 경로",notSelected:"(선택되지 않음)",moveDuration:"이동 시간(초)",followDirection:"경로를 따라 방향",moveProgressCurve:"이동 진행 곡선",moveProgressHelp:"가로축: 실시간/이동 기간; 세로축: 경로 진행(0=시작점 → 1=종료점)",pathTitle:"경로 속성",pathName:"경로 이름",closedPath:"닫힌 경로",pathColor:"경로 색상",pathHelp:"운영 지침:",pathHelpItems:"빈 공간/곡선 두 번 클릭: 새 앵커 포인트 만들기, 앵커 포인트 두 번 클릭: 노드 삭제, 두 번째로 두 번 클릭하고 드래그: 새 노드를 만들고 핸들을 당기고 앵커 포인트를 드래그하여 위치를 이동하고 핸들을 드래그하여 곡선을 조정합니다. Shift + 핸들 드래그: 양쪽에서 완전히 대칭, A lt+ 드래그 핸들: 한쪽을 독립적으로 제어, Ctrl+클릭/프레임 선택: 선택한 노드 추가, Alt+클릭/프레임 선택: 선택 항목 빼기 노드, 빈 공간에서 Alt+클릭: 모든 선택을 취소하고 여러 노드를 선택한 후 전체적으로 드래그합니다.",applyPresetShape:"사전 설정된 모양 적용",choosePreset:"사전 설정 선택...",square:"정사각형",star:"별 모양",applyPreset:"사전 설정 적용",clearAnchors:"앵커 포인트 지우기",panelHint:"오른쪽 상단에 있는 버튼을 사용하여 장면 개체를 만듭니다."},Y$={title:"모디파이어",reset:"수정자 매개변수 재설정",damping:"감쇠",enableNoise:"이동 노이즈 사용",strength:"힘",noiseRange:"변동 범위",noiseSpeed:"시간 흐름율",noiseHint:"강도 제어는 비율에 영향을 미칩니다. · 변동 범위는 최대 편차를 제어합니다. · 시간 흐름은 변화 속도를 제어합니다.",enableGravity:"중력 사용",gravityStrength:"중력 강도",strengthMin:"강도 최소",strengthMax:"최대 강도",direction:"방향",gravityOverLife:"수명주기 동안의 중력",windOverLife:"라이프 사이클 바람",axisStrength:"수직축: 강도 0~1",directionHint:"오른쪽 0° · 아래쪽 -90° · 음의 강도는 방향을 바꿉니다.",enableWind:"바람 사용",windStrength:"바람의 세기",enableForceField:"힘장 사용",centerX:"센터 X",centerY:"센터 Y",forceStrength:"역장 강도",forceRadius:"역장 반경",falloffMode:"붕괴 모드",constant:"일정(속도는 범위 내에서 변하지 않습니다)",linearFalloff:"선형 폴오프(가장자리는 0)",inverseFalloff:"거리에 반비례(중앙에서 가장 강함)",forceHint:"양수는 중앙쪽으로 끌어당기고, 음수는 바깥쪽으로 밀어내며, 역장 원은 캔버스 내에서 드래그될 수 있습니다.",showShape:"모양을 보여주다",enableVortex:"소용돌이 사용",vortexHint:"양수는 시계 반대 방향 · 음수는 시계 방향",enableAttraction:"흡인 사용",attractionX:"흡착점 X",attractionY:"흡착점 Y",attractionRadius:"흡착반경",attractionDuration:"흡착시간",delay:"지연시간",delayMode:"지연 모드",globalTime:"통일된 시간",particleLife:"단일 입자 수명",attractionPath:"흡착방식",straight:"일직선",attractionHint:"지연 후 현재 위치부터 흡착이 시작됩니다. 빨간색 범위에 도달하면 죽습니다. 흡착 원은 캔버스 내에서 드래그할 수 있습니다.",enableTrail:"트레일 사용",trailImages:"후행 독립 사진",addTrailImage:"후행 이미지 리소스 추가",trailRotation:"회전하다",trailBones:"후행 뼈 수",trailRatio:"후행비율(%)",trailLength:"후행 길이",randomRange:"무작위 범위",lengthRatio:"길이 비율(%)",lengthMin:"최소 길이(%)",lengthMax:"최대 길이(%)",trailWidth:"후행 너비",widthRatio:"폭 비율(%)",widthMin:"최소 너비(%)",widthMax:"최대 너비(%)",widthScale:"너비 스케일링",followParticle:"입자를 따라가다",lifeLengthCurve:"수명주기 길이 곡선",shapeCurve:"형상 곡선(머리 → 꼬리 폭)",colorMode:"색상 모드",blendMode:"블렌드 모드",fixedColor:"고정된 색상",alphaMode:"투명도 모드",opacity:"투명도",gridRows:"그리드 행 수",gridCols:"그리드 열 수",trailHint:"각 입자는 리소스에 비례하여 형제 후행 뼈 세트를 생성합니다. 입자가 생성될 때 임의의 길이와 너비가 결정되어 동일한 시드를 안정적으로 재현할 수 있음",enableFollow:"이미터 추적 사용",followMode:"팔로우 모드",noFollow:"없음",followPath:"길을 따라가다",selectedBone:"선택된 뼈",emitterAngleMode:"송신기 각도 모드",fixedAngle:"고정 각도",followMoveDirection:"움직이는 방향을 따라가세요",moveProgressCurve:"이동 진행 곡선(0→1)",moveDuration:"이동 기간(초)",followSpace:"공간을 따라가다",localSpace:"로컬 공간(GEN 운동)",worldSpace:"월드 공간(입자 생성점 이동)",moveDirection:"움직이는 방향",forward:"앞으로(시작점 → 끝점)",reverse:"역방향(종료점 → 시작점)",followOffset:"오프셋 시작점(0-1)",followSpaceHint:"로컬 공간은 전체 방사체를 이동합니다. 월드 공간은 새 입자의 생성 지점만 이동하고 생성된 입자는 월드 위치에 유지됩니다.",followTarget:"목표를 따르십시오:",noValidBone:"유효한 뼈가 아직 바인딩되지 않았습니다. 먼저 Spine 계층 구조 트리에서 뼈를 선택하십시오.",rebind:"리바인드",bind:"제본",selectedBoneLabel:"현재 선택된 뼈대:",boneLocalSpace:"로컬 공간(뼈와 함께 이동)",boneWorldSpace:"월드 공간(파티클이 생성된 후 위치를 유지함)",offsetX:"변위 오프셋 X",offsetY:"변위 오프셋 Y",rotationOffset:"회전 오프셋",scaleOffsetX:"스케일 오프셋 X",scaleOffsetY:"스케일 오프셋 Y",boneFollowHint:"이미터는 선택한 Spine 뼈대의 위치만 따르며 Spine의 회전이나 크기 조정은 상속하지 않습니다. 입자 변환은 입자 시스템의 자체 매개변수와 상위 오프셋을 사용합니다.",enableCollision:"충돌 사용",collisionObjects:"참여 충돌 객체",colliderDisabled:"{name}(충돌기 비활성화)",clearCollider:"충돌 객체 지우기 {name}",addCollider:"장면 충돌 개체 추가",noAvailableColliders:"추가할 충돌 개체가 없습니다.",noCollidersSelected:"충돌 개체가 선택되지 않았으며 현재 입자는 충돌하지 않습니다.",available:"사용 가능",disabled:"장애가 있는",collisionHint:"추가되고 활성화된 장면 충돌 객체만 현재 입자 시스템의 충돌에 참여합니다.",enableSubEmitter:"하위 이미터 사용",triggerTiming:"트리거 시간 선택",birth:"태어나다",death:"주사위",collision:"충돌",chooseTarget:"대상 입자 시스템 선택",noTarget:"없음(입자 시스템)",deleteSubEmitter:"이 하위 이미터 삭제",probability:"방출 확률",collisionLimit:"충돌 한계",inherit:"상속하다",colorInheritMode:"색상 상속 방법",add:"추가하다",replace:"씌우다",addSubEmitter:"+ 새로운 하위 이미 터 추가",inheritNone:"없음(기본값)",inheritAll:"모든 속성",inheritColor:"색상",inheritScale:"크기",inheritRotation:"회전하다",inheritLife:"수명주기"},z$={title:"Spine 속성",name:"Spine 이름",xPosition:"X 위치",yPosition:"Y 위치",rotation:"회전",scaleX:"X 크기",scaleY:"Y 크기",startTime:"시작 시간",resources:"Spine 리소스",chooseFolder:"폴더를 선택하고 로드하세요.",folderHint:"JSON / SKEL, Atlas 및 폴더의 모든 텍스처를 한 번에 읽습니다. 아래에서 리소스를 개별적으로 교체할 수 있습니다.",choose:"선택하다",chooseMultiple:"선택(복수 선택)",loading:"로드 중…",load:"↧ 로드",clear:"분명한",supportNote:"Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON 지원 · 해당 버전이 실행 중일 때 요청 시 로드 · 로컬 오프라인",currentResource:"현재 자원 {version}",animations:"Spine 애니메이션",noAnimations:"사용할 수 있는 애니메이션이 없습니다.",timelineAnimation:"타임라인에서 애니메이션 재생",no:"없음",hierarchy:"계층 트리",clearBoneTitle:"뼈대 선택을 지우려면 클릭하세요.",noBoneTitle:"현재 선택된 뼈가 없습니다.",clearBone:"선택한 뼈 지우기: {name}",currentBone:"현재 스켈레톤:",clearSlotTitle:"슬롯 선택을 지우려면 클릭하세요.",noSlotTitle:"현재 선택된 슬롯이 없습니다.",clearSlot:"선택한 슬롯 지우기: {name}",currentSlot:"현재 슬롯:",notSelected:"선택되지 않음",expandAll:"모두 펼치기",collapseAll:"모두 접기",bones:"해골",slots:"슬롯",notLoaded:"로드되지 않음 Spine",searchBones:"뼈 검색",searchBonesPlaceholder:"뼈 이름 검색…",clearSearch:"검색 지우기",clearBoneSearch:"뼈 검색 지우기",noMatchingBones:"일치하는 뼈가 발견되지 않았습니다.",expandChildren:"자식 뼈 확장",collapseChildren:"자식 뼈 접기",notLoadedSlots:"Spine 슬롯이 로드되지 않았습니다.",searchSlots:"슬롯 검색",searchSlotsPlaceholder:"슬롯 또는 액세서리 이름을 검색하세요…",clearSlotSearch:"슬롯 검색 지우기",noMatchingSlots:"일치하는 슬롯을 찾을 수 없습니다.",slotTitle:"{name}(스켈레톤: {bone}, 부착물: {attachment})",empty:"null",textureSummary:"{count} 장: {names}",textureImages:"질감 사진",missingFolderAssets:"선택한 폴더가 없습니다: {missing}",chooseAssets:"Spine 데이터, Atlas 및 모든 텍스처 이미지를 순서대로 선택하십시오."},j$={title:"도움말",subtitle:"입자 생성부터 저장 및 내보내기까지 빠른 시작",close:"지침 닫기",closeShort:"닫기(Esc)",quickStart:"빠른 시작",stepCreate:'객체 생성: 왼쪽의 "Scene Object"에서 +Particles / +Collision / +Path / +Spine를 사용하여 장면 객체를 추가합니다.',stepEdit:'입자 편집: 입자 시스템을 선택하고 "방출 모드 → 방사체 모양 → 입자 속성 → 모양 및 리소스 → 수정자"를 조정합니다.',stepPreview:"효과 확인: 하단 타임라인은 프레임별로 재생, 일시 중지, 드래그할 수 있습니다. 매개변수를 수정하면 자동으로 다시 계산됩니다.",stepExport:'저장 및 내보내기: 프로젝트를 유지하려면 "구성 저장"을 사용하십시오. 완성된 제품을 출력하려면 "Spine Json / 이미지 패키지 / .spine 패키지를 내보내세요."',quickNote:'각 모듈 그룹 제목 오른쪽에 있는 "재설정"은 그룹의 기본 매개변수를 복원할 수 있습니다. 시스템 설정은 현재 브라우저에 자동으로 저장됩니다.',commonOps:"자주 쓰는 작업",eye:"작은 눈",eyeDesc:"개체를 개별적으로 표시하거나 숨깁니다. 숨겨진 입자 시스템은 내보내지지 않습니다.",copyDesc:"다양한 매개변수의 비교를 용이하게 하기 위해 현재 선택된 개체를 완전히 복사합니다.",backgroundDesc:"참조 이미지를 업로드하고 캔버스 미리보기 전용 위치와 투명도를 조정하세요.",settingsDesc:"관리 인터페이스 레이아웃, 보조 디스플레이, 규모 등은 브라우저에 자동으로 저장됩니다.",undoDesc:"Ctrl+Z는 한 단계 후퇴합니다. 최대 단계 수는 시스템 설정에서 조정할 수 있습니다.",spineBoneDesc:"파티클 이미터가 따라갈 수 있는 계층 구조 트리에서 뼈대를 검색하고 선택합니다.",shortcuts:"단축키",undoShortcut:"이전 단계 실행 취소",saveShortcut:"구성 저장",panShortcut:"캔버스 드래그",translateShortcut:"변위 도구",rotateShortcut:"회전 도구",scaleShortcut:"확대/축소 도구",playShortcut:"재생/일시 정지",startShortcut:"첫 번째 프레임으로 돌아가기",shortcutNote:"Q / W / E / R은 먼저 캔버스를 클릭해야 합니다. 커서가 입력 상자에 있으면 단일 키 단축키가 실행되지 않습니다.",modules:"기능 모듈",configTitle:"구성 관리",saveConfigDesc:"모든 현재 장면 객체와 매개변수를 프로젝트 JSON 파일로 저장합니다(Ctrl+S도 지원됨).",loadConfigDesc:"전체 프로젝트를 복원하려면 로컬 구성 파일을 선택하세요.",presetDesc:"드롭다운에서 기본 빠른 적용을 선택합니다. 목록을 새로 고치려면 드롭다운을 클릭하세요.",configScope:"범위",configScopeDesc:"구성에는 개체와 매개변수가 포함됩니다. 인터페이스와 시스템 설정은 브라우저에 별도로 저장됩니다.",sceneTitle:"장면 객체",particleDesc:"핵심 개체. 위치, 오프셋, 회전, 크기 조정 및 임의 시드를 설정할 수 있습니다. 동일한 씨앗은 동일한 효과를 재현할 수 있습니다.",colliderDesc:"원/타원/직사각형/다각형/사용자 정의는 경로를 따라 물리적 바운스, 일시 중지, 파괴 및 이동을 지원합니다.",pathDesc:"앵커 포인트, 제어 핸들, 클로저, 색상 및 사전 설정 모양을 지원하는 베지어 경로입니다.",spineDesc:"Spine 데이터, Atlas 및 텍스처를 로드하고, 뼈대와 슬롯을 찾아보고, 이미터를 따라갑니다.",sceneCommonDesc:"개체는 독립적으로 표시되고 복사될 수 있습니다. 숨겨진 입자 시스템은 내보내지지 않습니다.",emissionDesc:"연속 발사, 폭발, 지연 및 시작/루프/종료 3단계 루프 지속 시간.",burstDesc:"한 번에 지정된 수의 입자를 방출합니다.",delayDesc:"방출이 시작되기 전 대기 시간으로, 입자 막대의 왼쪽 끝에 해당합니다.",loopNote:"루프 지속성은 뼈대 및 경로 추적을 지원하지 않으며 전환 시 다음 설정이 복원됩니다.",shapeDesc:"점, 원, 직사각형, 원뿔 또는 경로 생성 영역. 원/원추는 내부 및 외부 반경을 지원하고 직사각형은 내부 및 외부 너비와 높이를 지원합니다.",angleDesc:"고정, 무작위, 방사형, 법선 경로 또는 경로 접선.",initialDesc:"수명 주기, 속도, 크기 조정 및 회전 지원은 고정, 무작위, 곡선 및 회전을 지원하여 출시 방향을 따를 수 있습니다.",overLifeDesc:"속도배율, 줌배율, 회전속도는 수명곡선에 따라 조절 가능합니다.",alphaDesc:"투명도는 고정 또는 곡선을 지원합니다. 곡선 모드는 파생, 선형 또는 베지어를 따를 수 있습니다.",imageDesc:"단일 이미지 또는 시퀀스 프레임, 다중 이미지 가중치 무작위화, 피벗 포인트, 색상, 혼합 모드 및 독립적인 투명도.",sequenceDesc:"재생 방법에는 단일 시간 숨기기, 단일 시간 고정, 정방향 루프 및 역방향 루프가 포함됩니다.",noiseDesc:"지터 추적을 생성하고 강도, 범위 및 속도를 제어합니다.",gravityDesc:"중력, 바람 및 수명주기 강도 곡선.",forceDesc:"전역 역장, 소용돌이, 흡착 및 충돌.",trailDesc:"독립적인 후행 자산, 뼈 수, 길이, 너비, 모양, 색상 및 투명도 곡선.",followDesc:"이미터는 경로 또는 Spine 뼈를 따를 수 있습니다.",collisionDesc:"장면 충돌 개체와 입자 충돌 반응을 선택합니다.",exportDesc:"이미지 경로, Spine 버전, 키프레임 곡선, FPS, 정수 프레임, 뼈 풀 및 빈 애니메이션을 설정합니다.",exportButtonsDesc:"커넥터를 통해 Spine JSON, 이미지 ZIP를 내보내거나 .spine 프로젝트를 생성할 수 있습니다.",connectorTitle:"Spine 커넥터 사용 지침",connectorIntro:"커넥터는 웹 페이지에서 생성된 JSON 및 이미지를 로컬 시스템에 설치 및 활성화된 Spine에 전달하고 이를 편집 가능한 .spine 프로젝트로 변환합니다.",prerequisite:"프론트로드",prerequisiteDesc:"컴퓨터에 Spine가 설치 및 활성화되었으며 데스크탑 커넥터가 실행되었습니다.",download:"다운로드",webSide:"웹페이지",webSideDesc:'"커넥터 사용 가능 · Spine가 준비되었습니다"가 표시되면 ".spine 패키지 내보내기"를 클릭합니다.',authorization:"첫 번째 승인",authorizationDesc:"첫 번째 연결에서는 웹사이트의 소스를 확인하고 한 번만 허용해야 합니다. 이 기계는 인증 화이트리스트를 저장합니다.",pathSetup:"경로 설정",pathSetupDesc:"커넥터는 Spine를 자동으로 감지합니다. 찾을 수 없는 경우 애플리케이션 경로를 수동으로 지정할 수 있습니다.",downloadResult:"결과 다운로드",downloadResultDesc:".spine 프로젝트 및 이미지 디렉터리가 포함된 ZIP 패키지를 가져옵니다.",version:"버전",versionDesc:"커넥터는 JSON 버전에 따라 Spine 3.8~4.3을 자동으로 일치시킵니다.",security:"안전",securityDesc:"로컬 주소만 듣고 인증은 커넥터에 저장되며 변환 후 임시 파일은 정리됩니다.",differenceTitle:"구성과 내보내기의 차이점은 무엇입니까?",differenceDesc:'"구성 저장"은 편집할 수 있는 모든 개체와 매개변수를 저장합니다. "Spine Json 내보내기"는 표시된 입자 시스템만 내보내고 충돌, 추적, 추적 및 하위 방사체 결과를 독립적인 애니메이션 데이터로 굽습니다.'},H$={confirmLoopFollowEnter:"루프 연속 모드에 들어가면 입자 추적 설정이 무효화되고 기본값으로 복원됩니다. 계속하다?",confirmLoopFollowExit:"루프 지속 모드를 종료한 후 입자 추적 설정이 무효화되고 기본값으로 복원됩니다. 계속하다?",invalidJson:"구성 파일이 유효하지 않습니다. JSON",invalidConfigFormat:"SpineParticle 편집자 프로필이 아닙니다.",unsupportedConfigVersion:"아직 지원되지 않는 구성 버전: {version}",missingScene:"구성 파일에 전체 장면 데이터가 누락되었습니다.",missingEmbeddedSpine:"구성에 재사용 가능한 Spine 원본 리소스가 포함되어 있지 않습니다.",chooseJsonConfig:".json 구성 파일을 선택하세요.",settingsInvalidJson:"시스템 설정 캐시가 유효하지 않습니다. JSON",settingsFormat:"SpineParticle 편집기 시스템 설정 캐시가 아님",settingsVersion:"시스템 구성 버전은 아직 지원되지 않습니다: {version}",settingsMissing:"시스템 설정 캐시에 설정이 없습니다.",noExportableImages:"현재 표시되는 입자 시스템에 대해 내보낼 수 있는 이미지가 없습니다.",invalidZipPath:"ZIP 잘못된 파일 경로",spineFileType:"Spine 데이터는 .json 또는 .skel만 지원합니다.",atlasFileType:"Atlas 파일은 .atlas만 지원합니다.",chooseTexture:"텍스처 이미지를 하나 이상 선택하세요.",binaryParseFailed:"Spine 바이너리 구문 분석 실패(4.3: {v43}, 이전 버전: {v42})",invalidSpineJson:"Spine JSON 잘못된 파일 형식",unsupportedSpineJsonVersion:"Spine JSON 버전은 지원되지 않으며 {versions}만 지원됩니다.",unsupportedSpineDataVersion:"Spine 데이터 버전은 지원되지 않으며 {versions}만 지원됩니다.",embeddedReadFailed:"내장된 Spine 파일을 읽을 수 없습니다: {name}",missingImageWarning:'이미지 "{file}"가 누락되었거나 크기를 읽을 수 없으며 경로가 유지됩니다.',missingTrailImageWarning:'후행 이미지 "{file}"가 누락되어 경로가 보존되었습니다.',emptyCacheWarning:"'{name}'에 사용할 수 있는 프레임 버퍼가 없습니다.",readExportImageFailed:"내보낸 이미지를 읽을 수 없습니다: {name}",connectorOffline:"로컬 Spine 커넥터가 감지되지 않습니다. 먼저 커넥터를 활성화하십시오.",connectorHttpError:"Spine 커넥터가 오류를 반환합니다: HTTP {status}",invalidTrailUV:"후행 메시 '{name}'에 대한 잘못된 UV 데이터",missingTrailVertices:"후행 메시 '{name}'에 정점 데이터가 누락되었습니다.",trailIndexOutOfRange:"후행 메시 '{name}'의 삼각형 인덱스가 범위를 벗어났습니다.",invalidTrailHull:'후행 메쉬 "{name}"의 외부 윤곽 번호가 잘못되었습니다.',trailHullIndexOutOfRange:'후행 메시 "{name}"의 외부 윤곽선 가장자리 인덱스가 범위를 벗어났습니다.',invalidInfluenceCount:"후행 메시 '{name}'에 잘못된 수의 뼈 가중치가 포함되어 있습니다.",missingBoneReference:"후행 메시 '{name}'는 존재하지 않는 뼈대를 참조합니다.",invalidWeight:'후행 그리드 "{name}"에 잘못된 중량 데이터가 포함되어 있습니다.',weightSum:"후행 메시 '{name}'의 정점 가중치의 합이 1이 아닙니다.",vertexCountMismatch:"후행 메시 '{name}'의 정점 수와 UV 수가 일치하지 않습니다.",invalidInherit:"뼈대 '{name}'의 상속 값 '{inherit}'가 Spine {version} JSON 형식을 따르지 않습니다.",trailBoneParent:'후행 뼈대 "{name}"는 입자 시스템 뼈 아래에 직접 매달려야 하며 뼈대 체인을 형성할 수 없습니다.',trailSlotEmpty:'가중 테일링 슬롯 "{name}"는 빈 부착물을 사용할 수 없습니다. 해당 뼈대 스케일링은 나타나지 않거나 사망하는 단계에서 0으로 설정되어야 합니다.',spine38Version:"Spine 3.8 내보낸 버전 ID는 3.8이어야 합니다.",spine38Inherit:'Spine 3.8 뼈 "{name}"는 변환을 사용해야 하며 상속을 사용할 수 없습니다.',spine38SlotColor:"Spine 3.8 슬롯 색상 타임라인은 color / twoColor를 사용해야 합니다.",spine38AttachmentName:"Spine 3.8 첨부 타임라인의 숨겨진 프레임에는 이름을 명시적으로 작성해야 합니다: null",spine38RotationAngle:"Spine 3.8 시간축을 회전하려면 각도를 사용해야 합니다.",spine38Curve:"Spine 3.8은 4.x 배열 곡선 형식을 지원하지 않습니다.",unsupportedExportVersion:"내보낸 버전은 지원되지 않으며 Spine {versions}만 지원됩니다.",exportVersionMismatch:"일관성 없는 내보내기 버전: Spine {expected}로 설정, JSON는 Spine {actual}로 표시됨",exportMissingBones:"내보내기 결과 뼈가 누락되었습니다.",missingAtlasTexture:"Atlas에서 참조하는 텍스처가 선택되지 않았습니다: {name}"},G$={label:"언어",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},W$={app:E$,common:_$,toolbar:M$,settings:P$,config:k$,curve:I$,gradient:R$,attributeControl:F$,pivot:L$,image:D$,timeline:O$,emission:N$,attributes:$$,appearance:B$,renderLayer:U$,export:{title:"내보내기 리소스",reset:"내보내기 리소스 재설정",imagesPath:"이미지 경로(Spine 이미지 경로)",spineVersion:"Spine 버전",keyframeCurve:"키프레임 보간 곡선",linear:"선의",smoothBezier:"부드러운 베지어(부드러운 Bézier)",bezierHelp:"Smooth Bezier는 오류 허용 범위 내에서 연속 동작을 맞춥니다. 탄생, 사망, 첨부 파일 전환 및 돌연변이는 여전히 단계 키프레임을 사용합니다.",spine38Help:"Spine 3.8은 4.x의 채널별 배열 베지어를 지원하지 않으며 내보낼 때 허용 오차가 감소된 조각별 선형 키프레임으로 변환됩니다.",fps:"내보내기 FPS",omitFps:"fps를 쓰지 마세요",fpsHelp:'FPS를 수정할 때 애니메이션의 실제 시간(초)을 변경하지 않고 유지하세요. "fps를 쓰지 마십시오"는 Spine의 fps 메타데이터만 생략합니다.',integerFrames:"정수 프레임 정렬",bonePool:"뼈 개체 풀",excludeEmpty:"콘텐츠가 없는 애니메이션 제외",baking:"애니메이션이 다시 계산되고 구워지고 있습니다.",exportJsonTitle:"Spine {version} JSON 내보내기",preparing:"수출 준비 중...",exportJson:"Spine JSON 내보내기",exportImagesTitle:"현재 파티클 시스템 ZIP에서 사용하는 이미지를 별도로 다운로드합니다.",organizingImages:"사진 정렬 중...",exportImages:"이미지 ZIP 내보내기",generatingProject:"프로젝트 생성 중...",exportSpine:".spine 패키지 내보내기",authorize:"현재 웹사이트 승인",authorizeTitle:"기본 커넥터에서 현재 웹사이트 승인",refreshConnector:"커넥터를 다시 확인하세요",refresh:"새로 고치다",recalculating:"입자 애니메이션을 다시 계산하는 중...",exported:"내보낸 Spine {version}: {systems} 입자 시스템, {animations} 애니메이션, {bones} 루트 뼈대 {warning}",resourceWarning:";{count} 리소스 팁(누락된 이미지는 계속 내보내집니다.)",timeout:"애니메이션 시간 초과를 다시 계산합니다. 페이지가 아직 실행 중인지 확인한 후 다시 시도하세요.",preparingProject:"사진을 정렬하고 이 기계를 Spine라고 부르는 중…",projectExported:"{fileName}가 생성되었습니다: .spine 프로젝트 및 {images} 사진, Spine {version} 포함",collectingImages:"현재 파티클 시스템에서 사용되는 사진을 조합하는 중...",imagesExported:"{fileName}가 생성되었습니다: {folder}/에는 {images} 사진이 포함되어 있습니다.",connectorChecking:"로컬 Spine 커넥터 감지 중...",connectorOffline:"로컬 Spine 커넥터가 실행 중이 아닙니다",spineNotFound:"커넥터는 실행 중이지만 Spine을 찾을 수 없습니다",notAuthorized:"커넥터는 실행 중이지만 이 사이트는 승인되지 않았습니다",connectorReady:"커넥터 사용 가능 · Spine 준비됨",connectorBusy:"Spine 프로젝트를 다시 계산하고 생성 중",connectorGenerate:"로컬 Spine으로 Spine {version} 프로젝트 생성",unknown:"알려지지 않은",checking:"확인 중",offline:"오프라인",notFound:"Spine 없음",unauthorized:"승인되지 않음",projectTransferTitle:"Spine 패키지 내보내기",projectTransferDetail:"입자 애니메이션을 다시 계산하는 중...",projectTransferDownload:"Spine 프로젝트 패키지가 다운로드되었습니다.",generatingJson:"Spine JSON 생성 중…",preparingProjectFiles:"프로젝트 사진을 대조하는 중...",uploading:"Spine 커넥터에 데이터 업로드 중...",spineProcessing:"Spine가 프로젝트를 변환하는 중입니다. 잠시 기다려 주세요...",downloadingProject:"생성된 Spine 프로젝트 패키지를 다운로드하는 중...",handingToBrowser:"다운로드를 위해 브라우저로 넘기는 중..."},transfer:V$,scene:X$,modifiers:Y$,spine:z$,help:j$,errors:H$,language:G$},q$={resizeTimeline:"Arraste para ajustar a altura da linha do tempo",systems:"sistema",particlesBones:"Partículas (ossos)",rootBone:"osso da raiz",hudTip:"Zoom da roda · Clique com o botão esquerdo para arrastar a tela",title:"Editor de Partículas Spine - Yeomai"},K$={close:"Fechar",collapse:"Recolher",reset:"Redefinir",add:"Adicionar",remove:"Remover",delete:"Excluir",clear:"Limpar",cancel:"Cancelar",confirm:"Confirmar",none:"Nenhum",enabled:"Ativado",disabled:"Desativado",fixed:"Fixo",random:"Aleatório",curve:"Curva",followExport:"Seguir exportação",linear:"Linear",bezier:"Bézier",above:"Acima",below:"Abaixo",left:"Esquerda",right:"Direita",seconds:"s",frames:"quadros"},J$={settings:"Configurações",undo:"Desfazer (Ctrl+Z)",pan:"Mover tela (Q)",translate:"Mover (W)",rotate:"Girar (E)",scale:"Escalar (R)",zoomIn:"Ampliar",zoomOut:"Reduzir",fitView:"Ajustar à tela",toggleGrid:"Alternar grade",resetView:"Redefinir visualização",background:"Fundo",backgroundSettings:"Configurações do fundo",changeBackground:"Trocar imagem",uploadBackground:"Enviar imagem",clearBackground:"Limpar fundo",noBackground:"Nenhuma imagem",backgroundX:"Deslocamento X da imagem de fundo",backgroundY:"Deslocamento Y da imagem de fundo",backgroundOpacity:"Transparência da imagem de fundo",opacity:"Opacidade",help:"Ajuda",openHelp:"Abrir ajuda"},Z$={title:"Configurações do sistema",layout:"Layout da interface",floatingMenu:"Menu flutuante",floatingMenuParticleOnly:"Selecione primeiro um sistema de partículas",parameterPanelPosition:"Localização do painel de parâmetros",panelOnRight:"O painel de parâmetros é mostrado à direita",history:"Histórico de operação",maxUndo:"Número máximo de passos para trás",canvasGuides:"Display auxiliar de tela",emitter:"ponto de lançamento",bones:"Conexão óssea",bonePointSize:"Tamanho do desenho do ponto ósseo",boneAxisSize:"Tamanho do desenho do eixo",skinMesh:"malha esfolada",enableTicks:"Habilitar ticks",tickFontSize:"Dimensionar o tamanho do texto",tickWidth:"espessura da marca",axisColor:"cor do eixo",showAxisLabels:"Exibir valor da escala",unsavedPrompt:"Avisar sobre alterações não salvas",showProjectSize:"Mostrar espaço usado pelas configurações",cacheNote:"Todas as configurações do sistema são salvas automaticamente no navegador atual"},Q$={title:"Gerenciamento de configuração",save:"Salvar configuração",saveTitle:"Salvar configuração no cache do navegador",load:"Carregar configuração",loadTitle:"Carregar configuração do editor local",presets:"Lista predefinida",selectPreset:"Selecionar predefinição",noPresets:"Nenhuma predefinição",saved:"A configuração foi salva localmente",loading:"Carregando configuração…",loaded:"Carregado: {name}",presetLoading:"Carregando predefinições…",presetLoaded:"Predefinição carregada: {name}",presetNamingError:"{message}, verifique a nomenclatura de arquivo padrão",presetTransferTitle:"Carregar predefinição",presetDownloading:"Baixando {file}…",presetParsing:"Analisando a configuração padrão...",presetRestoring:"Analisando e restaurando recursos padrão...",presetComplete:"Carregamento predefinido concluído",presetListError:"Não é possível ler a lista predefinida",presetReadError:"Não é possível ler a predefinição: {file}",local:{listTitle:"Lista de configurações",empty:"Nenhuma configuração salva neste navegador",saveTitle:"Salvar configuração no cache do navegador",name:"Nome da configuração",namePlaceholder:"Por exemplo: Efeito de fogos",load:"Carregar",loadHint:"Clique duplo para carregar",download:"Baixar",delete:"Excluir",downloadCurrent:"Baixar configuração atual",downloadAll:"Baixar todas as configurações",loadAll:"Carregar todas as configurações",loadAllConfirm:"Importar {count} arquivos de configuração? Configurações com o mesmo nome serão substituídas.",loadAllDone:"{count} configurações carregadas dos arquivos",loadAllPartial:"{imported} configurações importadas; {failed} arquivos falharam",overwriteSave:"“{name}” já existe. Substituir?",loadOverwrite:"Carregar “{name}” substituirá a cena atual e descartará alterações não salvas. Continuar?",deleteConfirm:"Excluir “{name}”?",nameRequired:"Digite um nome de configuração",nameInvalid:'O nome não pode conter \\ / : * ? " < > |',storageUnavailable:"O armazenamento local do navegador não está disponível",saved:"Salvo no navegador: {name}",loaded:"Carregado do navegador: {name}",deleted:"Configuração excluída do navegador: {name}",downloadEmpty:"Nenhuma configuração para baixar",downloaded:"Baixado: {name}"}},eB={bezierHint:"Arraste a alça quadrada para ajustar o arco · Clique duas vezes em um espaço em branco para criar um novo · Clique duas vezes em um nó para excluí-lo",linearHint:"Clique duas vezes em um espaço em branco para criar um novo. Clique duas vezes em um nó para excluí-lo. Arraste um nó para ajustá-lo.",resetTitle:"Restaurar curva padrão"},tB={addTitle:"Clique duas vezes na faixa de opções para adicionar uma marca colorida",color:"Código de cores",colorValue:"Valor de cor da escala de cores",position:"Posição da marca colorida",addMiddle:"Adicione cor no meio",delete:"Excluir patch de cor atual",hint:"Clique duas vezes na faixa colorida para adicionar uma nova · Arraste a marca colorida para ajustar sua posição · Clique duas vezes na marca colorida para excluí-la"},nB={angleOffset:"Deslocamento de ângulo",value:"valor numérico",lower:"limite inferior",upper:"limite superior",rangeLower:"Limite inferior do intervalo",rangeUpper:"Faixa superior",curveInput:"Entrada de curva →",direction:"Direção de lançamento"},iB={title:"ponto de articulação do mapa",zoomOut:"diminuir o zoom",zoomIn:"ampliar",expand:"Zoom para operação em tela cheia",interaction:"Clique com o botão esquerdo/arraste para definir o ponto de giro · Clique com o botão direito para arrastar a tela · Roda de rolagem para ampliar",previewAlt:"Visualização do ponto dinâmico",noImage:"Nenhuma imagem selecionada",resetCenter:"Reposicionar no meio (50%, 50%)",coordinates:"Coordenadas do ponto do eixo (%)",rotationTest:"Teste de rotação do eixo",static:"ainda",spin:"rotação",swing:"balanço",rotationAlt:"Teste de rotação",topLeft:"canto superior esquerdo",top:"Bem acima",topRight:"canto superior direito",left:"Direita esquerda",center:"meio",right:"Certo",bottomLeft:"canto inferior esquerdo",bottom:"Diretamente abaixo·inferior",bottomRight:"canto inferior direito"},sB={chooseSequence:"Selecione imagens de quadros de sequência",chooseLocal:"Selecione a imagem local",subfolder:"subpasta",name:"nome",restore:"Restaurar {name}",deleteResource:"Excluir recursos de imagem",imageMode:"Modo de imagem",fixed:"Imagem única",sequence:"Sequência",playbackMode:"modo de jogo",onceHide:"Uma vez, ocultar no final",onceHold:"Uma vez, manter último quadro",loopForward:"Loop para frente",loopReverse:"Loop reverso",playbackFps:"Taxa de quadros de reprodução",chooseSequenceMulti:"Selecione quadros de sequência (múltiplas seleções)",weight:"Peso %",unlockWeight:"Desbloquear bloqueio de proporção",lockWeight:"Bloquear a proporção atual",pivot:"Pivô da textura",collapsePivot:"Recolher ajuste do ponto de articulação",expandPivot:"Expandir o ajuste do ponto de articulação",pivotModal:"Eixo de rotação de textura ponto grande refinamento de imagem",pivotModalDesc:"Clique ou arraste em qualquer lugar no mapa abaixo para definir com precisão o centro de rotação/oscilação das partículas.",pivotZoomHint:"Suporta ampliação de 100% ~ 400%, mira precisa na ponta ou raiz:",confirmPivot:"Determinar e salvar o ponto de articulação",noSequence:"Nenhum quadro de sequência selecionado",firstFrame:"Quadro 1",firstImage:"primeira foto",lastImage:"última foto",pivotOn:"Aberto: X {x}% | Y {y}%",pivotOff:"Não ativado, o padrão é próximo ao centro da imagem (50%, 50%)",pivotCustom:"O ponto de articulação foi personalizado: X {x}% | Y {y}%",frameCountOne:"1 quadro · {name}",frameCountMany:"Quadro {count} · {first} → {last}",sequenceSelected:"O quadro {count} foi selecionado e reproduzido na ordem {first}-{last}"},rB={play:"Jogar(D)",pause:"Pausa (D)",toStart:"Volte para o primeiro quadro (S)",previous:"quadro anterior",next:"próximo quadro",toEnd:"Mover para o último quadro",continuousLoop:"Reprodução em loop contínuo",abLoop:"Loop independente do intervalo A/B",abLoopShort:"Loop AB",abRange:"Intervalo do ciclo AB",playbackStart:"Quadro inicial de reprodução personalizado",playbackEnd:"Quadro final de reprodução personalizado",startFrame:"Reproduzir quadro inicial",endFrame:"Reproduzir quadro final",frame:"quadro",emission:"Emissão",particleLife:"Partículas ativas",spineAnimation:"Animação Spine",ownerAnimation:"Animação associada",setOwnerAnimation:"Defina a animação à qual pertence o sistema de partículas atual",chooseOwnerAnimation:"Selecione a animação",animationName:"Nome da animação",renameAnimation:"Renomear a animação atual",rename:"Renomear",newAnimation:"+ Novo",keepOneAnimation:"Pelo menos uma animação precisa ser mantida",spinePreview:"Animação de visualização Spine",noSpineAnimation:"Nenhuma animação Spine disponível",none:"nenhum",systemName:"Sistema {index}",dragLoopDuration:"Duração do segmento do loop de arrastar",dragEmissionDuration:"Duração do arrasto",dragSpineStart:"Arraste para ajustar o horário de início da animação",noAnimationData:"Atualmente não há dados de animação para exibir.",animationNameEmpty:"O nome da animação não pode ficar vazio",animationNameDuplicate:"Os nomes das animações não podem ser repetidos",animationRenameFailed:"Não é possível modificar o nome da animação",zoomIn:"ampliar",zoomOut:"diminuir o zoom",zoomFit:"Moderado",frameStatus:"Quadro {current} / {total}"},oB={title:"Modo de emissão",reset:"Redefinir parâmetros do modo de transmissão",stream:"Contínuo",burst:"Explosão",normalStream:"Contínuo normal",loopStream:"Loop contínuo",rate:"Taxa de emissão",duration:"Duração da emissão",loopDuration:"Duração do lançamento (f)",generateStart:"Gerar animação de loop inicial",generateEnd:"Gerar animação de loop final",customDuration:"Especifique a duração",auto:"{frames}f automático",startLoopDuration:"Duração do segmento do loop inicial",endLoopDuration:"Duração do segmento do loop final",loopWarning:"O modo de persistência de loop não suporta seguimento de osso e seguimento de caminho; as configurações a seguir das partículas serão restauradas aos valores padrão ao entrar ou sair.",burstCount:"Quantidade por explosão",delay:"Atraso",shapeTitle:"Forma do emissor",shapeReset:"Redefinir parâmetros de formato do emissor",shape:"forma",point:"Ponto",circle:"Círculo",rect:"Retângulo",cone:"Cone",path:"Caminho",innerDiameter:"diâmetro interno",outerDiameter:"diâmetro externo",innerRadius:"raio interno",outerRadius:"raio externo",coneDirection:"Orientação cônica",coneAngle:"Ângulo de abertura cônico",innerWidth:"largura interna",innerHeight:"Alto por dentro",outerWidth:"Largura externa",outerHeight:"Extra alto",selectPath:"Selecione o caminho",noPath:"Sem caminho (emissão pontual)",birthDistribution:"distribuição de nascimentos",evenDistribution:"Distribuição fixa igualmente espaçada",randomDistribution:"distribuição aleatória",emissionAngle:"ângulo de lançamento",radial:"Radial (centro para fora)",pathNormal:"perpendicular ao caminho",pathTangent:"ao longo da direção do caminho",fixedAngle:"ângulo fixo",baseAngle:"ângulo base",randomRange:"intervalo aleatório",showShape:"mostrar forma"},aB={title:"Atributos das partículas",reset:"Redefinir parâmetros de atributos de partículas",initialParams:"Valores iniciais",initialLife:"ciclo de vida inicial",randomSample:"Amostragem aleatória →",initialSpeed:"velocidade inicial",initialScale:"dimensionamento inicial",uniform:"unificado",separateXY:"Separação XY",scaleX:"Ampliar X",scaleY:"Ampliar Y",initialRotation:"rotação inicial",lifecycleTitle:"Alterações durante o tempo de vida",speedOverLife:"velocidade do ciclo de vida",speedMultiplier:"multiplicador de velocidade",lifeTo:"ciclo de vida →",scaleOverLife:"Escala durante o ciclo de vida",scaleMultiplier:"Proporção de zoom",multiplierX:"Ampliação",multiplierY:"Ampliação Y",rotationOverLife:"Girar durante o ciclo de vida",rotationSpeed:"Velocidade de rotação"},lB={title:"Aparência e recursos",reset:"Redefinir parâmetros de aparência e recursos",opacity:"Opacidade",curveMode:"Modo curva",transparent:"0 (transparente)",opaque:"1 (opaco)",renderLayer:"Camada de renderização (slot Spine)",top:"nível superior",spineSlot:"Slot Spine",selectSpine:"Selecione Spine",noSpine:"Nenhum disponível Spine",noSlot:"Nenhum slot selecionado ainda",reselect:"Selecionar novamente",selectSlot:"Selecione o slot",searchSlots:"Pesquise o nome do slot ou acessório…",searchSlotsAria:"Espaços de pesquisa",emptySlot:"Espaço vazio",noMatchingSlots:"Nenhum slot correspondente",above:"no topo desta imagem do slot",below:"abaixo desta imagem do slot",followAttachment:"Mostre e oculte com acessórios de slot",previewOnly:"O ajuste do nível de exibição afeta apenas a visualização do editor e não afeta os dados exportados.",imageResources:"Recursos de imagem",addImage:"Adicione recursos de imagem",scale:"Zoom",color:"cor",fixedColor:"cor fixa",randomColor:"cor aleatória",lifetime:"vida útil",normal:"Normal",add:"Adição",multiply:"Multiplicação",screen:"Tela",fixedColorValue:"valor de cor fixo",randomColorHint:"Cada partícula escolhe aleatoriamente uma cor da fita quando nasce e permanece inalterada durante seu ciclo de vida.",independentAlpha:"Opacidade independente",off:"Desligado"},cB={slotLabelAbove:"{spine} / {slot} · Imagem acima",slotLabelBelow:"{spine} / {slot} · Abaixo da foto",resolvedAbove:"Renderizado acima da imagem {slot} e abaixo de seu slot",resolvedBetween:"Renderizado entre {previous} e {slot}",warningNoSpine:"Não há nenhum Spine carregado e as partículas são exibidas temporariamente no topo.",warningNoSelection:"Spine ainda não foi selecionado e as partículas são exibidas temporariamente no topo.",warningMissingSpine:"O alvo Spine não existe e as partículas são exibidas temporariamente no topo.",warningNotReady:"O alvo Spine não está pronto e as partículas são temporariamente exibidas no topo.",warningMissingSlot:"O slot alvo não existe (o recurso pode ter sido substituído) e as partículas são exibidas temporariamente no topo.",warningFirstSlot:"Este é o primeiro slot e não pode ser exibido abaixo dele; as partículas são exibidas temporariamente no topo."},dB={completed:"Concluído",failed:"Falha na operação"},uB={title:"Objetos da cena",addParticle:"Adicionar sistema de partículas",addParticleShort:"+partícula",addCollider:"Adicionar colisor",addColliderShort:"+colisão",addPath:"adicionar caminho",addPathShort:"+ caminho",addSpine:"Adicionar Spine",copyTitle:"Copie o objeto de cena atualmente selecionado",showParticle:"Mostrar sistema de partículas",hideParticle:"Ocultar sistema de partículas",showCollider:"mostrar colisores",hideCollider:"Ocultar colisor",showPath:"mostrar caminho",hidePath:"Ocultar caminho",showSpine:"Exibir Spine",hideSpine:"Ocultar Spine",particle:"Partículas",subEmitter:"Subemissor",collision:"Colisão",path:"Caminho",deleteParticle:"Excluir sistema de partículas",deleteCollider:"Excluir colisores",deletePath:"excluir caminho",deleteSpine:"Excluir Spine",empty:"Ainda não há objetos na cena",name:"nome",positionX:"Posição X",positionY:"Posição Y",offsetX:"Deslocamento X",offsetY:"Deslocamento Y",rotation:"Rotação",scaleX:"Escala X",scaleY:"Escala Y",seed:"Semente aleatória",seedTitle:"Controle todos os atributos aleatórios, seleção de recursos e modificador de amostragem aleatória no sistema de partículas",randomizeSeed:"Gere uma nova semente aleatória global",seedHint:"Controlar parâmetros aleatórios iniciais, seleção de recursos e amostragem aleatória modificadora; a mesma semente pode reproduzir o mesmo efeito",colliderTitle:"Propriedades do colisor",colliderName:"Nome do colisor",type:"tipo",circle:"redondo",ellipse:"oval",rect:"retângulo",polygon:"polígono",custom:"Personalizar",enabled:"habilitar",xPosition:"Posição X",yPosition:"Posição Y",scaleXShort:"Escala X",scaleYShort:"Escala Y",radius:"raio",radiusX:"Raio X",radiusY:"Raio Y",width:"largura",height:"alto",sides:"Número de lados",collisionResponse:"Resposta a falhas",physics:"Física (salto/fricção)",pause:"Pausa (parar)",destroy:"Desaparecer (destruir imediatamente)",elasticity:"Elasticidade (0-1)",friction:"Fricção (0-1)",followPath:"Siga o caminho",targetPath:"caminho de destino",notSelected:"(não selecionado)",moveDuration:"Duração do movimento (segundos)",followDirection:"direção ao longo do caminho",moveProgressCurve:"Curva de progresso móvel",moveProgressHelp:"Eixo horizontal: tempo real/duração do movimento; eixo vertical: progresso do caminho (0=ponto inicial → 1=ponto final)",pathTitle:"atributo de caminho",pathName:"nome do caminho",closedPath:"caminho fechado",pathColor:"cor do caminho",pathHelp:"Instruções de operação:",pathHelpItems:"Clique duas vezes no espaço/curva em branco: crie um novo ponto de ancoragem, clique duas vezes no ponto de ancoragem: exclua o nó, clique duas vezes na segunda vez e arraste: crie um novo e puxe a alça, arraste o ponto de ancoragem para mover a posição, arraste a alça para ajustar a curva, Shift + alça de arrastar: completamente simétrico em ambos os lados, A lt + alça de arrastar: controlar independentemente um lado, Ctrl + clicar/seleção de quadro: adicionar nós selecionados, Alt+clique/seleção de quadro: subtrair nós selecionados, Alt+clique no espaço em branco: limpe todas as seleções, selecione vários nós e arraste-os como um todo",applyPresetShape:"Aplicar uma forma predefinida",choosePreset:"Selecione uma predefinição...",square:"Quadrado",star:"forma de estrela",applyPreset:"Aplicar predefinição",clearAnchors:"ponto de ancoragem claro",panelHint:"Use o botão no canto superior direito para criar um objeto de cena"},hB={title:"Modificadores",reset:"Redefinir parâmetros modificadores",damping:"Amortecimento",enableNoise:"Ativar ruído de movimento",strength:"força",noiseRange:"Faixa de flutuação",noiseSpeed:"Taxa de fluxo de tempo",noiseHint:"O controle de intensidade afeta a proporção · A faixa de flutuação controla o desvio máximo · O fluxo de tempo controla a velocidade de mudança",enableGravity:"Ativar gravidade",gravityStrength:"Força da gravidade",strengthMin:"Força mínima",strengthMax:"Força máxima",direction:"direção",gravityOverLife:"Gravidade durante o ciclo de vida",windOverLife:"Vento do ciclo de vida",axisStrength:"Eixo vertical: intensidade 0 ~ 1",directionHint:"0° para a direita · -90° para baixo · Intensidade negativa inverte a direção",enableWind:"Ativar vento",windStrength:"força do vento",enableForceField:"Ativar campo de força",centerX:"Centro X",centerY:"Centro Y",forceStrength:"Força do campo de força",forceRadius:"raio do campo de força",falloffMode:"modo de decaimento",constant:"Constante (a velocidade não muda dentro da faixa)",linearFalloff:"Queda linear (a borda é 0)",inverseFalloff:"Inversamente proporcional à distância (mais forte no centro)",forceHint:"Os números positivos se atraem para o centro, os números negativos se repelem para fora e o círculo do campo de força pode ser arrastado dentro da tela.",showShape:"mostrar forma",enableVortex:"Ativar vórtice",vortexHint:"Números positivos no sentido anti-horário · Números negativos no sentido horário",enableAttraction:"Ativar atração",attractionX:"Ponto de adsorção X",attractionY:"Ponto de adsorção Y",attractionRadius:"raio de adsorção",attractionDuration:"Tempo de adsorção",delay:"Tempo de atraso",delayMode:"Modo de atraso",globalTime:"tempo unificado",particleLife:"vida de partícula única",attractionPath:"Método de adsorção",straight:"linha reta",attractionHint:"Após o atraso, a adsorção começa a partir da posição atual. Quando atingir a faixa vermelha, ele morrerá. O círculo de adsorção pode ser arrastado dentro da tela.",enableTrail:"Ativar rastro",trailImages:"Trailing de fotos independentes",addTrailImage:"Adicionar recursos de imagem finais",trailRotation:"girar",trailBones:"Número de ossos à direita",trailRatio:"Proporção final (%)",trailLength:"Comprimento final",randomRange:"intervalo aleatório",lengthRatio:"Proporção de comprimento (%)",lengthMin:"Comprimento mínimo (%)",lengthMax:"Comprimento máximo (%)",trailWidth:"Largura final",widthRatio:"proporção de largura (%)",widthMin:"Largura mínima (%)",widthMax:"Largura máxima (%)",widthScale:"escala de largura",followParticle:"siga partículas",lifeLengthCurve:"curva de comprimento do ciclo de vida",shapeCurve:"Curva de forma (cabeça → largura da cauda)",colorMode:"modo de cor",blendMode:"modo de mesclagem",fixedColor:"cor fixa",alphaMode:"modo de transparência",opacity:"transparência",gridRows:"Número de linhas da grade",gridCols:"Número de colunas da grade",trailHint:"Cada partícula gera um conjunto de ossos irmãos em proporção aos recursos; o comprimento e a largura aleatórios são determinados quando a partícula nasce, e a mesma semente pode ser reproduzida de forma estável",enableFollow:"Ativar seguimento do emissor",followMode:"modo de acompanhamento",noFollow:"nenhum",followPath:"siga o caminho",selectedBone:"ossos selecionados",emitterAngleMode:"Modo de ângulo do transmissor",fixedAngle:"ângulo fixo",followMoveDirection:"Siga a direção do movimento",moveProgressCurve:"Curva de progresso do movimento (0→1)",moveDuration:"Duração(ões) do movimento",followSpace:"siga o espaço",localSpace:"Espaço local (movimento GEN)",worldSpace:"Espaço mundial (movimento do ponto de geração de partículas)",moveDirection:"direção em movimento",forward:"Avançar (ponto inicial → ponto final)",reverse:"Reverso (ponto final → ponto inicial)",followOffset:"Ponto inicial do deslocamento (0-1)",followSpaceHint:"O espaço local move todo o emissor; o espaço mundial apenas move o ponto de geração de novas partículas, e as partículas nascidas permanecem na posição mundial.",followTarget:"Siga o alvo:",noValidBone:"Nenhum osso válido foi vinculado ainda. Selecione primeiro o osso na árvore hierárquica Spine.",rebind:"religar",bind:"vinculativo",selectedBoneLabel:"Osso atualmente selecionado:",boneLocalSpace:"Espaço local (move-se com ossos)",boneWorldSpace:"Espaço mundial (as partículas mantêm a posição após serem geradas)",offsetX:"Deslocamento de deslocamento X",offsetY:"Deslocamento de deslocamento Y",rotationOffset:"Deslocamento de rotação",scaleOffsetX:"Deslocamento de escala X",scaleOffsetY:"Deslocamento de escala Y",boneFollowHint:"O emissor segue apenas a posição do osso Spine selecionado e não herda a rotação ou escala de Spine; a transformação de partículas usa os próprios parâmetros e deslocamento superior do sistema de partículas.",enableCollision:"Ativar colisão",collisionObjects:"Objetos de colisão participantes",colliderDisabled:"{name} (colisores desativados)",clearCollider:"Limpar objeto de colisão {name}",addCollider:"Adicionar objetos de colisão de cena",noAvailableColliders:"Nenhum objeto de colisão para adicionar",noCollidersSelected:"Nenhum objeto de colisão é selecionado e as partículas atuais não colidirão.",available:"Disponível",disabled:"Desabilitado",collisionHint:"Somente objetos de colisão de cena adicionados e habilitados participarão da colisão do sistema de partículas atual.",enableSubEmitter:"Ativar subemissores",triggerTiming:"Escolha o tempo de disparo",birth:"nascer",death:"morrer",collision:"colisão",chooseTarget:"Selecione o sistema de partículas alvo",noTarget:"Nenhum (sistema de partículas)",deleteSubEmitter:"Exclua este subemissor",probability:"probabilidade de emissão",collisionLimit:"Limite de colisão",inherit:"herdar",colorInheritMode:"Método de herança de cores",add:"Adicionar",replace:"cobrir",addSubEmitter:"+ Adicionado novo subemissor",inheritNone:"Nenhum (padrão)",inheritAll:"Todas as propriedades",inheritColor:"cor",inheritScale:"tamanho",inheritRotation:"girar",inheritLife:"vida útil"},fB={title:"Propriedades do Spine",name:"Nome Spine",xPosition:"Posição X",yPosition:"Posição Y",rotation:"Rotação",scaleX:"Escala X",scaleY:"Escala Y",startTime:"Tempo inicial",resources:"Recursos Spine",chooseFolder:"Selecione a pasta e carregue",folderHint:"Leia JSON/SKEL, Atlas e todas as texturas em uma pasta de uma só vez; os recursos ainda podem ser substituídos individualmente abaixo.",choose:"escolher",chooseMultiple:"Selecione (múltiplas escolhas)",loading:"carregando…",load:"↧ Carregar",clear:"Claro",supportNote:"Suporte Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · Carregar sob demanda quando a versão correspondente estiver em execução · Offline local",currentResource:"Recurso atual {version}",animations:"Animações Spine",noAnimations:"Nenhuma animação disponível",timelineAnimation:"Reproduzir animação na linha do tempo",no:"nenhum",hierarchy:"Hierarquia",clearBoneTitle:"Clique para limpar a seleção de osso",noBoneTitle:"Nenhum osso está selecionado no momento",clearBone:"Limpar ossos selecionados: {name}",currentBone:"Esqueleto atual:",clearSlotTitle:"Clique para limpar a seleção de slot",noSlotTitle:"Nenhum slot está selecionado no momento",clearSlot:"Limpar slot selecionado: {name}",currentSlot:"Slot atual:",notSelected:"Não selecionado",expandAll:"Expandir tudo",collapseAll:"Recolher tudo",bones:"esqueleto",slots:"slot",notLoaded:"Não carregado Spine",searchBones:"Procure por ossos",searchBonesPlaceholder:"Pesquisar nome do osso…",clearSearch:"Limpar pesquisa",clearBoneSearch:"Limpar pesquisa óssea",noMatchingBones:"Nenhum osso correspondente encontrado",expandChildren:"Expandir ossos infantis",collapseChildren:"Recolher ossos infantis",notLoadedSlots:"Slot Spine não carregado",searchSlots:"Espaços de pesquisa",searchSlotsPlaceholder:"Pesquise o nome do slot ou acessório…",clearSlotSearch:"Limpar pesquisa de slots",noMatchingSlots:"Nenhum slot correspondente encontrado",slotTitle:"{name} (esqueleto: {bone}, anexo: {attachment})",empty:"nulo",textureSummary:"{count} Zhang: {names}",textureImages:"Imagens de textura",missingFolderAssets:"A pasta selecionada está faltando: {missing}",chooseAssets:"Selecione os dados Spine, Atlas e todas as imagens de textura em sequência"},pB={title:"Ajuda",subtitle:"Início rápido, desde a criação de partículas até o salvamento e exportação",close:"Fechar instruções",closeShort:"Fechar (Esc)",quickStart:"início rápido",stepCreate:'Crie um objeto: Use +Particles / +Collision / +Path / +Spine em "Scene Object" à esquerda para adicionar um objeto de cena.',stepEdit:'Editar partículas: Selecione o sistema de partículas e ajuste "Modo de emissão → Forma do emissor → Propriedades da partícula → Aparência e recursos → Modificador".',stepPreview:"Confira o efeito: A linha do tempo inferior pode ser reproduzida, pausada, quadro a quadro ou arrastada; será recalculado automaticamente após a modificação dos parâmetros.",stepExport:'Salvar e exportar: Use “Salvar configuração” para reter o projeto; "Exportar Spine Json/pacote de imagens/pacote .spine" para gerar o produto acabado.',quickNote:'"Reset" no lado direito do título de cada grupo de módulos pode restaurar os parâmetros padrão do grupo; as configurações do sistema serão salvas automaticamente no navegador atual.',commonOps:"Ações comuns",eye:"olhos pequenos",eyeDesc:"Mostrar/ocultar objetos individualmente; sistemas de partículas ocultas não são exportados.",copyDesc:"Copia completamente o objeto atualmente selecionado para facilitar a comparação de diferentes parâmetros.",backgroundDesc:"Carregue a imagem de referência e ajuste a posição e a transparência apenas para visualização da tela.",settingsDesc:"Layout da interface de gerenciamento, display auxiliar, balança, etc. são salvos automaticamente no navegador.",undoDesc:"Ctrl+Z retrai um passo; o número máximo de etapas pode ser ajustado nas configurações do sistema.",spineBoneDesc:"Pesquise e selecione um osso na árvore hierárquica, que pode ser usado pelo emissor de partículas a seguir.",shortcuts:"Atalhos",undoShortcut:"Desfazer a etapa anterior",saveShortcut:"Salvar configuração",panShortcut:"Arrastar tela",translateShortcut:"Ferramenta de deslocamento",rotateShortcut:"Ferramenta rotativa",scaleShortcut:"Ferramenta Zoom",playShortcut:"reproduzir/pausar",startShortcut:"Volte para o primeiro quadro",shortcutNote:"Q/W/E/R precisa clicar primeiro na tela; quando o cursor estiver na caixa de entrada, a tecla de atalho de tecla única não será acionada.",modules:"Guia dos módulos",configTitle:"Gerenciamento de configuração",saveConfigDesc:"Salve todos os objetos e parâmetros da cena atual como arquivos de projeto JSON (Ctrl+S também é suportado).",loadConfigDesc:"Selecione o arquivo de configuração local para restaurar o projeto completo.",presetDesc:"Selecione uma aplicação rápida padrão no menu suspenso; clique no menu suspenso para atualizar a lista.",configScope:"escopo",configScopeDesc:"A configuração contém objetos e parâmetros; as configurações da interface e do sistema são armazenadas separadamente no navegador.",sceneTitle:"objeto de cena",particleDesc:"objeto central. Posição, deslocamento, rotação, escala e semente aleatória podem ser definidos; a mesma semente pode reproduzir o mesmo efeito.",colliderDesc:"Círculo/elipse/retângulo/polígono/personalizado, suporta salto físico, pausa, destruição e movimento ao longo do caminho.",pathDesc:"Caminho Bézier com suporte para pontos de ancoragem, alças de controle, fechamento, cor e formas predefinidas.",spineDesc:"Carregue dados Spine, Atlas e texturas, navegue em ossos e slots e siga os emissores.",sceneCommonDesc:"Os objetos podem ser revelados e copiados de forma independente; sistemas de partículas ocultas não são exportados.",emissionDesc:"Disparo contínuo, explosão, atraso e duração de loop de três estágios de início/loop/fim.",burstDesc:"Emite um número especificado de partículas de uma só vez.",delayDesc:"O tempo de espera antes do início da emissão, correspondente à extremidade esquerda da barra de partículas.",loopNote:"A persistência de loop não oferece suporte ao seguimento de ossos e caminhos, e as configurações a seguir serão restauradas ao alternar.",shapeDesc:"Área de geração de ponto, círculo, retângulo, cone ou caminho. Círculos/cones suportam raios internos e externos, e retângulos suportam largura e altura internas e externas.",angleDesc:"Fixo, aleatório, radial, caminho normal ou caminho tangente.",initialDesc:"Ciclo de vida, velocidade, escala e suporte de rotação fixo, aleatório, curva e rotação podem seguir a direção de lançamento.",overLifeDesc:"A ampliação da velocidade, a ampliação do zoom e a velocidade de rotação podem ser controladas pela curva do ciclo de vida.",alphaDesc:"Suportes de transparência fixos ou curvos; o modo de curva pode seguir derivado, linear ou Bezier.",imageDesc:"Imagem única ou quadro de sequência, randomização de peso de várias imagens, ponto de articulação, cor, modo de mesclagem e transparência independente.",sequenceDesc:"Os métodos de reprodução incluem ocultação única, congelamento único, loop direto e loop reverso.",noiseDesc:"Gere traços de jitter e controle a intensidade, o alcance e a velocidade.",gravityDesc:"Curvas de gravidade, vento e intensidade do ciclo de vida.",forceDesc:"Campos de força globais, vórtices, adsorção e colisões.",trailDesc:"Ativos independentes, contagem de ossos, curvas de comprimento, largura, forma, cor e transparência.",followDesc:"O emissor pode seguir um caminho ou osso Spine.",collisionDesc:"Selecione objetos de colisão de cena e respostas de colisão de partículas.",exportDesc:"Defina o caminho da imagem, versão Spine, curva de quadro-chave, FPS, quadros inteiros, conjunto de ossos e animação vazia.",exportButtonsDesc:"Você pode exportar Spine JSON, imagens ZIP ou gerar projetos .spine por meio do conector.",connectorTitle:"Instruções de uso do conector Spine",connectorIntro:"O conector entrega o JSON e as imagens geradas pela página da web ao Spine que foi instalado e ativado na máquina local e os converte em projetos .spine editáveis.",prerequisite:"carregamento antecipado",prerequisiteDesc:"O computador tem Spine instalado e ativado e o conector de desktop foi iniciado.",download:"download",webSide:"página da Internet",webSideDesc:'Depois que "Conector disponível · Spine está pronto" for exibido, clique em "Exportar pacote .spine".',authorization:"primeira autorização",authorizationDesc:"A primeira conexão precisa verificar a origem do site e permitir uma vez; esta máquina salva a lista branca de autorização.",pathSetup:"Configurações de caminho",pathSetupDesc:"O conector detectará automaticamente Spine; se não puder ser encontrado, você poderá especificar manualmente o caminho do aplicativo.",downloadResult:"Baixar resultados",downloadResultDesc:"Obtenha o pacote ZIP, que contém o projeto .spine e o diretório de imagem.",version:"Versão",versionDesc:"O conector corresponde automaticamente a Spine 3.8~4.3 de acordo com a versão JSON.",security:"Segurança",securityDesc:"Ouça apenas o endereço local, a autorização é salva no conector e os arquivos temporários são limpos após a conversão.",differenceTitle:"Qual é a diferença entre configurar e exportar?",differenceDesc:'“Salvar configuração” salva todos os objetos e parâmetros que podem ser editados; "Exportar Spine Json" exporta apenas o sistema de partículas exibido e transforma os resultados de colisão, seguimento, rastreamento e subemissor em dados de animação independentes.'},mB={confirmLoopFollowEnter:"Depois de entrar no modo de loop contínuo, as configurações seguintes de partículas serão inválidas e restauradas para o valor padrão. Continuar?",confirmLoopFollowExit:"Depois de sair do modo de persistência de loop, as configurações a seguir serão inválidas e restauradas para seus valores padrão. Continuar?",invalidJson:"O arquivo de configuração não é válido JSON",invalidConfigFormat:"Não é o perfil do editor SpineParticle",unsupportedConfigVersion:"Versão de configuração ainda não suportada: {version}",missingScene:"O arquivo de configuração não contém dados completos da cena",missingEmbeddedSpine:"A configuração não contém recursos originais Spine reutilizáveis",chooseJsonConfig:"Selecione um arquivo de configuração .json",settingsInvalidJson:"O cache de configurações do sistema não é válido JSON",settingsFormat:"Não cache de configurações do sistema do Editor SpineParticle",settingsVersion:"A versão de configuração do sistema ainda não é suportada: {version}",settingsMissing:"Faltam configurações no cache de configurações do sistema",noExportableImages:"Não há imagens exportáveis para o sistema de partículas atualmente visível",invalidZipPath:"ZIP Caminho de arquivo inválido",spineFileType:"Os dados Spine suportam apenas .json ou .skel",atlasFileType:"Arquivos Atlas suportam apenas .atlas",chooseTexture:"Selecione pelo menos uma imagem de textura",binaryParseFailed:"Falha na análise binária Spine (4.3: {v43}; versão antiga: {v42})",invalidSpineJson:"Spine JSON Formato de arquivo inválido",unsupportedSpineJsonVersion:"A versão Spine JSON não é suportada, apenas {versions} é compatível",unsupportedSpineDataVersion:"A versão de dados Spine não é suportada, apenas {versions} é compatível",embeddedReadFailed:"Não é possível ler o arquivo Spine incorporado: {name}",missingImageWarning:'A imagem "{file}" está ausente ou possui dimensões ilegíveis, caminho preservado.',missingTrailImageWarning:'A imagem final "{file}" está faltando e o caminho foi preservado.',emptyCacheWarning:"Nenhum framebuffer disponível para '{name}'.",readExportImageFailed:"Não é possível ler a imagem exportada: {name}",connectorOffline:"Conector Spine local não detectado, ative o conector primeiro",connectorHttpError:"O conector Spine retorna erro: HTTP {status}",invalidTrailUV:"Dados UV inválidos para malha final '{name}'",missingTrailVertices:"A malha final '{name}' está sem dados de vértice",trailIndexOutOfRange:"Índice triangular da malha final '{name}' fora dos limites",invalidTrailHull:'O número do contorno externo da malha final "{name}" é inválido',trailHullIndexOutOfRange:'O índice da borda do contorno externo da malha final "{name}" está fora dos limites',invalidInfluenceCount:"A malha final '{name}' contém um número inválido de pesos ósseos",missingBoneReference:"A malha final '{name}' faz referência a um osso inexistente",invalidWeight:'A grade final "{name}" contém dados de peso inválidos',weightSum:"Os pesos dos vértices da malha final '{name}' não somam 1",vertexCountMismatch:"A malha final '{name}' tem um número inconsistente de vértices e UVs",invalidInherit:"O valor herdado '{inherit}' para o osso '{name}' não está em conformidade com o formato Spine {version} JSON",trailBoneParent:'O osso final "{name}" deve ser pendurado diretamente sob o osso do sistema de partículas e não pode formar uma cadeia óssea.',trailSlotEmpty:'O slot de cauda ponderado "{name}" não pode usar anexos vazios. A escala óssea correspondente deve ser definida como 0 na fase de não aparecimento ou morte.',spine38Version:"Spine 3.8 O ID da versão exportada deve ser 3.8",spine38Inherit:'Spine 3.8 Bone "{name}" deve usar transformação e não pode usar herança',spine38SlotColor:"A linha do tempo de cores do slot Spine 3.8 deve usar color/twoColor",spine38AttachmentName:"Spine 3.8 O quadro oculto da linha do tempo do anexo deve ter um nome escrito explicitamente: null",spine38RotationAngle:"Spine 3.8 Você deve usar o ângulo para girar o eixo do tempo",spine38Curve:"Spine 3.8 não suporta formato de curva de matriz 4.x",unsupportedExportVersion:"A versão exportada não é suportada, apenas Spine {versions} é compatível",exportVersionMismatch:"Versão de exportação inconsistente: definida como Spine {expected}, JSON marcada como Spine {actual}",exportMissingBones:"O resultado da exportação está faltando ossos",missingAtlasTexture:"A textura referenciada por Atlas não está selecionada: {name}"},gB={label:"Idioma",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},vB={app:q$,common:K$,toolbar:J$,settings:Z$,config:Q$,curve:eB,gradient:tB,attributeControl:nB,pivot:iB,image:sB,timeline:rB,emission:oB,attributes:aB,appearance:lB,renderLayer:cB,export:{title:"Recursos de exportação",reset:"Redefinir recursos de exportação",imagesPath:"Caminho da imagem (caminho das imagens Spine)",spineVersion:"Versão do Spine",keyframeCurve:"Curva de interpolação de quadro-chave",linear:"Linear",smoothBezier:"Bézier Suave (Bézier Suave)",bezierHelp:"Smooth Bezier ajusta o movimento contínuo dentro da tolerância de erro; nascimento, morte, troca de apegos e mutações ainda usam quadros-chave de etapas.",spine38Help:"Spine 3.8 não oferece suporte à matriz Bezier por canal 4.x e é convertido em quadros-chave lineares por partes com tolerância reduzida na exportação.",fps:"FPS de exportação",omitFps:"Não escreva fps",fpsHelp:'Mantenha os segundos reais da animação inalterados ao modificar FPS; "Não escreva fps" omite apenas os metadados fps de Spine.',integerFrames:"Alinhamento de quadro inteiro",bonePool:"Conjunto de objetos ósseos",excludeEmpty:"Exclua animações sem conteúdo",baking:"A animação está sendo recalculada e preparada",exportJsonTitle:"Exportar Spine {version} JSON",preparing:"Preparando para exportar...",exportJson:"Exportar Spine JSON",exportImagesTitle:"Baixe separadamente a imagem usada pelo sistema de partículas atual ZIP",organizingImages:"Classificando fotos...",exportImages:"Exportar imagens ZIP",generatingProject:"Gerando projeto...",exportSpine:"Exportar pacote .spine",authorize:"Autorizar o site atual",authorizeTitle:"Autorize o site atual no conector nativo",refreshConnector:"Verifique novamente o conector",refresh:"atualizar",recalculating:"Recálculo da animação de partículas...",exported:"Spine {version} exportado: sistemas de partículas {systems}, animações {animations}, ossos de raiz {bones} {warning}",resourceWarning:";dicas de recursos {count} (as imagens ausentes ainda são exportadas)",timeout:"Recálculo do tempo limite da animação. Confirme se a página ainda está em execução e tente novamente",preparingProject:"Classificando fotos e chamando esta máquina de Spine…",projectExported:"{fileName} foi gerado: incluindo projeto .spine e imagens {images}, Spine {version}",collectingImages:"Comparando imagens atualmente usadas pelo sistema de partículas...",imagesExported:"{fileName} foi gerado: {folder}/ contém imagens {images}",connectorChecking:"Detectando conector Spine local...",connectorOffline:"O conector local do Spine não está em execução",spineNotFound:"O conector está ativo, mas o Spine não foi encontrado",notAuthorized:"O conector está ativo, mas este site não está autorizado",connectorReady:"Conector disponível · Spine pronto",connectorBusy:"Recalculando e gerando o projeto Spine",connectorGenerate:"Gerar projeto Spine {version} com o Spine local",unknown:"desconhecido",checking:"Verificando",offline:"Offline",notFound:"Spine não encontrado",unauthorized:"Não autorizado",projectTransferTitle:"Exportar pacote Spine",projectTransferDetail:"Recálculo da animação de partículas...",projectTransferDownload:"O pacote do projeto Spine foi baixado",generatingJson:"Gerando Spine JSON…",preparingProjectFiles:"Coletando fotos do projeto...",uploading:"Fazendo upload de dados para o conector Spine...",spineProcessing:"Spine está convertendo o projeto, aguarde...",downloadingProject:"Baixando o pacote do projeto Spine gerado...",handingToBrowser:"Passando para o navegador para download..."},transfer:dB,scene:uB,modifiers:hB,spine:fB,help:pB,errors:mB,language:gB},bB={title:"Spine粒子编辑器-Yeomai",resizeTimeline:"拖动调整时间轴高度",systems:"系统",particlesBones:"粒子(骨骼)",rootBone:"根骨骼",hudTip:"滚轮缩放 · 左键拖动画布"},yB={label:"语言",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},xB={close:"关闭",collapse:"收起",reset:"重置",add:"添加",remove:"移除",delete:"删除",clear:"清除",cancel:"取消",confirm:"确定",none:"无",enabled:"启用",disabled:"禁用",fixed:"固定",random:"随机",curve:"曲线",followExport:"跟随导出",linear:"线性",bezier:"贝塞尔",above:"之上",below:"之下",left:"左侧",right:"右侧",seconds:"秒",frames:"帧"},wB={settings:"系统设置",undo:"撤回上一步 (Ctrl+Z)",pan:"拖动画布 (Q)",translate:"位移 (W)",rotate:"旋转 (E)",scale:"缩放 (R)",zoomIn:"放大",zoomOut:"缩小",fitView:"适配画布",toggleGrid:"切换网格",resetView:"重置视图",background:"背景图",backgroundSettings:"背景图显示设置",changeBackground:"更换图像",uploadBackground:"上传图像",clearBackground:"清除背景",noBackground:"未上传图像",backgroundX:"背景图 X 偏移",backgroundY:"背景图 Y 偏移",backgroundOpacity:"背景图透明度",opacity:"透明度",help:"使用说明",openHelp:"查看使用说明"},SB={title:"系统设置",layout:"界面布局",floatingMenu:"悬浮菜单",floatingMenuParticleOnly:"请先选择粒子系统",parameterPanelPosition:"参数面板位置",panelOnRight:"参数面板显示在右侧",history:"操作历史",maxUndo:"最大撤回步数",canvasGuides:"画布辅助显示",emitter:"发射点",bones:"骨骼连线",bonePointSize:"骨骼点绘制大小",boneAxisSize:"坐标轴绘制大小",skinMesh:"蒙皮网格",enableTicks:"启用刻度",tickFontSize:"刻度文字大小",tickWidth:"刻度线粗细",axisColor:"坐标轴颜色",showAxisLabels:"显示刻度数值",unsavedPrompt:"未保存提示",showProjectSize:"显示配置占用空间",cacheNote:"整个系统设置会自动保存到当前浏览器"},CB={title:"配置管理",save:"保存配置",saveTitle:"保存配置到浏览器缓存",load:"加载配置",loadTitle:"加载本地编辑器配置",presets:"预设列表",selectPreset:"选择预设",noPresets:"无预设文件",saved:"配置已保存到本地",loading:"正在加载配置…",loaded:"已加载:{name}",presetLoading:"正在加载预设…",presetLoaded:"已加载预设:{name}",presetNamingError:"{message},请检查预设文件命名",presetTransferTitle:"加载预设",presetDownloading:"正在下载 {file}…",presetParsing:"正在解析预设配置…",presetRestoring:"正在解析并恢复预设资源…",presetComplete:"预设加载完成",presetListError:"无法读取预设列表",presetReadError:"无法读取预设:{file}",local:{listTitle:"配置列表",empty:"浏览器中还没有保存的配置",saveTitle:"保存配置到浏览器缓存",name:"配置名称",namePlaceholder:"例如:烟花效果",load:"加载",loadHint:"双击以加载",download:"下载",delete:"删除",downloadCurrent:"下载当前配置",downloadAll:"下载所有配置",loadAll:"加载所有配置",loadAllConfirm:"将导入 {count} 个配置文件,同名配置会被覆盖。是否继续?",loadAllDone:"已从文件加载 {count} 个配置",loadAllPartial:"已导入 {imported} 个配置,{failed} 个文件失败",overwriteSave:"“{name}”已存在,是否覆盖?",loadOverwrite:"加载“{name}”会覆盖当前场景,未保存的修改将丢失。是否继续?",deleteConfirm:"确定删除“{name}”吗?",nameRequired:"请输入配置名称",nameInvalid:'配置名称不能包含 \\ / : * ? " < > |',storageUnavailable:"浏览器本地存储不可用",saved:"已保存到浏览器:{name}",loaded:"已从浏览器加载:{name}",deleted:"已删除缓存配置:{name}",downloadEmpty:"没有可下载的配置",downloaded:"已下载:{name}"}},AB={bezierHint:"拖动方形手柄调整弧度 · 双击空白新建 · 双击节点删除",linearHint:"双击空白新建 · 双击节点删除 · 拖动节点调整",resetTitle:"恢复默认曲线"},TB={addTitle:"双击色带添加色标",color:"色标颜色",colorValue:"色标颜色值",position:"色标位置",addMiddle:"在中间新增颜色",delete:"删除当前色标",hint:"双击色带新增 · 拖动色标调整位置 · 双击色标删除"},EB={angleOffset:"角度偏移",value:"数值",lower:"下限",upper:"上限",rangeLower:"范围下限",rangeUpper:"范围上限",curveInput:"曲线输入 →",direction:"发射方向"},_B={title:"贴图轴点",zoomOut:"缩小",zoomIn:"放大",expand:"放大到全屏操作",interaction:"左键点击/拖动设置轴点 · 右键拖动画布 · 滚轮缩放",previewAlt:"轴点预览",noImage:"未选择图片",resetCenter:"复位居中 (50%, 50%)",coordinates:"轴点坐标(%)",rotationTest:"轴心旋转测试",static:"静止",spin:"自转",swing:"摆动",rotationAlt:"旋转测试",topLeft:"左上",top:"正上",topRight:"右上",left:"正左",center:"正中",right:"正右",bottomLeft:"左下",bottom:"正下·底部",bottomRight:"右下"},MB={chooseSequence:"选择序列帧图片",chooseLocal:"选择本地图片",subfolder:"子文件夹",name:"名称",restore:"恢复 {name}",deleteResource:"删除图片资源",imageMode:"图片模式",fixed:"固定",sequence:"序列帧",playbackMode:"播放模式",onceHide:"单次-尾帧消失",onceHold:"单次-尾帧固定",loopForward:"正向循环",loopReverse:"反向循环",playbackFps:"播放帧率",chooseSequenceMulti:"选择序列帧(多选)",weight:"占比%",unlockWeight:"解除占比锁定",lockWeight:"锁定当前占比",pivot:"贴图轴点",collapsePivot:"收起轴点调整",expandPivot:"展开轴点调整",pivotModal:"贴图旋转轴点大图精修",pivotModalDesc:"在下方贴图上任意点击或拖拽,精确设置粒子的旋转/摆动中心",pivotZoomHint:"支持 100% ~ 400% 放大,精确对准尖端或根部:",confirmPivot:"确定并保存轴点",noSequence:"未选择序列帧",firstFrame:"第 1 帧",firstImage:"第一张图片",lastImage:"最后一张图片",pivotOn:"已开启:X {x}% | Y {y}%",pivotOff:"未开启,默认围绕图片正中心 (50%, 50%)",pivotCustom:"轴点已自定义:X {x}% | Y {y}%",frameCountOne:"1 帧 · {name}",frameCountMany:"{count} 帧 · {first} → {last}",sequenceSelected:"已选择 {count} 帧,按 {first}-{last} 顺序播放"},PB={play:"播放 (D)",pause:"暂停 (D)",toStart:"回到第一帧 (S)",previous:"前一帧",next:"后一帧",toEnd:"移动到最后一帧",continuousLoop:"持续循环播放",abLoop:"独立 A/B 区间循环",abLoopShort:"AB 循环",abRange:"AB 循环区间",playbackStart:"自定义播放起始帧",playbackEnd:"自定义播放结束帧",startFrame:"播放起始帧",endFrame:"播放结束帧",frame:"帧",emission:"持续发射",particleLife:"粒子存在",spineAnimation:"Spine 动画",ownerAnimation:"所属动画",setOwnerAnimation:"设置当前粒子系统所属的动画",chooseOwnerAnimation:"选择所属动画",animationName:"动画名称",renameAnimation:"重命名当前动画",rename:"重命名",newAnimation:"+ 新增",keepOneAnimation:"至少需要保留一个动画",spinePreview:"Spine 预览动画",noSpineAnimation:"无可用 Spine 动画",none:"无",systemName:"系统 {index}",dragLoopDuration:"拖动循环段时长",dragEmissionDuration:"拖动持续发射时长",dragSpineStart:"拖动调整动画开始时间",noAnimationData:"暂无可显示的动画数据",animationNameEmpty:"动画名称不能为空",animationNameDuplicate:"动画名称不能重复",animationRenameFailed:"无法修改动画名称",zoomIn:"放大",zoomOut:"缩小",zoomFit:"适中",frameStatus:"帧 {current} / {total}"},kB={title:"发射模式",reset:"重置发射模式参数",stream:"持续",burst:"爆发",normalStream:"常规持续",loopStream:"循环持续",rate:"发射速率",duration:"发射时长",loopDuration:"发射时长 (f)",generateStart:"生成开始循环动画",generateEnd:"生成结束循环动画",customDuration:"指定时长",auto:"自动 {frames}f",startLoopDuration:"开始循环段时长",endLoopDuration:"结束循环段时长",loopWarning:"循环持续模式不支持骨骼跟随和路径跟随;进入或退出时会将粒子跟随设置恢复默认值。",burstCount:"单次数量",delay:"延迟时间",shapeTitle:"发射器形状",shapeReset:"重置发射器形状参数",shape:"形状",point:"点",circle:"圆形",rect:"矩形",cone:"锥形",path:"路径",innerDiameter:"内径",outerDiameter:"外径",innerRadius:"内半径",outerRadius:"外半径",coneDirection:"锥形朝向",coneAngle:"锥形开口角度",innerWidth:"内宽",innerHeight:"内高",outerWidth:"外宽",outerHeight:"外高",selectPath:"选择路径",noPath:"无路径(点发射)",birthDistribution:"出生分布",evenDistribution:"等间距固定分布",randomDistribution:"随机分布",emissionAngle:"发射角度",radial:"径向(中心向外)",pathNormal:"垂直于路径",pathTangent:"沿路径方向",fixedAngle:"固定角度",baseAngle:"基准角度",randomRange:"随机范围",showShape:"显示形状"},IB={title:"粒子属性",reset:"重置粒子属性参数",initialParams:"粒子初始参数",initialLife:"初始生命周期",randomSample:"随机采样 →",initialSpeed:"初始速度",initialScale:"初始缩放",uniform:"统一",separateXY:"XY分离",scaleX:"缩放 X",scaleY:"缩放 Y",initialRotation:"初始旋转",lifecycleTitle:"粒子生命周期变化参数",speedOverLife:"生命周期内速度",speedMultiplier:"速度倍率",lifeTo:"生命周期 →",scaleOverLife:"生命周期内缩放",scaleMultiplier:"缩放倍率",multiplierX:"倍率 X",multiplierY:"倍率 Y",rotationOverLife:"生命周期内旋转",rotationSpeed:"旋转速度"},RB={title:"外观与资源",reset:"重置外观与资源参数",opacity:"透明度",curveMode:"曲线模式",transparent:"0(透明)",opaque:"1(不透明)",renderLayer:"渲染层级(Spine 插槽)",top:"最上层",spineSlot:"Spine 插槽",selectSpine:"请选择 Spine",noSpine:"无可用 Spine",noSlot:"尚未选择插槽",reselect:"重新选择",selectSlot:"选择插槽",searchSlots:"搜索插槽或附件名称…",searchSlotsAria:"搜索插槽",emptySlot:"空插槽",noMatchingSlots:"没有匹配的插槽",above:"在此插槽图片之上",below:"在此插槽图片之下",followAttachment:"随插槽附件显隐",previewOnly:"调整显示层级只影响编辑器预览,不影响导出数据。",imageResources:"图片资源",addImage:"新增图片资源",scale:"缩放",color:"颜色",fixedColor:"固定色",randomColor:"随机颜色",lifetime:"生命周期",normal:"正常",add:"相加",multiply:"相乘",screen:"滤色",fixedColorValue:"固定颜色值",randomColorHint:"每个粒子出生时从色带随机取色,生命周期内保持不变",independentAlpha:"独立透明度",off:"关闭"},FB={slotLabelAbove:"{spine} / {slot} · 图片之上",slotLabelBelow:"{spine} / {slot} · 图片之下",resolvedAbove:"渲染在 {slot} 图片之上、其后插槽之下",resolvedBetween:"渲染在 {previous} 与 {slot} 之间",warningNoSpine:"没有已加载的 Spine,粒子临时显示在最上层。",warningNoSelection:"尚未选择 Spine,粒子临时显示在最上层。",warningMissingSpine:"目标 Spine 不存在,粒子临时显示在最上层。",warningNotReady:"目标 Spine 未就绪,粒子临时显示在最上层。",warningMissingSlot:"目标插槽不存在(资源可能已更换),粒子临时显示在最上层。",warningFirstSlot:"这是第一个插槽,无法显示在其下方,粒子临时显示在最上层。"},LB={completed:"已完成",failed:"操作失败"},DB={title:"场景对象",addParticle:"添加粒子系统",addParticleShort:"+粒子",addCollider:"添加碰撞体",addColliderShort:"+碰撞",addPath:"添加路径",addPathShort:"+路径",addSpine:"添加 Spine",copyTitle:"复制当前选中的场景对象",showParticle:"显示粒子系统",hideParticle:"隐藏粒子系统",showCollider:"显示碰撞体",hideCollider:"隐藏碰撞体",showPath:"显示路径",hidePath:"隐藏路径",showSpine:"显示 Spine",hideSpine:"隐藏 Spine",particle:"粒子",subEmitter:"子发射器",collision:"碰撞",path:"路径",deleteParticle:"删除粒子系统",deleteCollider:"删除碰撞体",deletePath:"删除路径",deleteSpine:"删除 Spine",empty:"场景中暂无对象",name:"名称",positionX:"位置X",positionY:"位置Y",offsetX:"偏移X",offsetY:"偏移Y",rotation:"旋转",scaleX:"缩放X",scaleY:"缩放Y",seed:"随机种子",seedTitle:"控制粒子系统内全部随机属性、资源选择与修改器随机采样",randomizeSeed:"生成新的全局随机种子",seedHint:"控制初始随机参数、资源选择和修改器随机采样;相同种子可复现相同效果",colliderTitle:"碰撞体属性",colliderName:"碰撞体名称",type:"类型",circle:"圆形",ellipse:"椭圆",rect:"矩形",polygon:"多边形",custom:"自定义",enabled:"启用",xPosition:"X 位置",yPosition:"Y 位置",scaleXShort:"缩放 X",scaleYShort:"缩放 Y",radius:"半径",radiusX:"X 半径",radiusY:"Y 半径",width:"宽度",height:"高度",sides:"边数",collisionResponse:"碰撞响应",physics:"物理(弹跳/摩擦)",pause:"暂停(停止不动)",destroy:"消失(立即销毁)",elasticity:"弹性 (0-1)",friction:"摩擦 (0-1)",followPath:"跟随路径移动",targetPath:"目标路径",notSelected:"(未选择)",moveDuration:"移动时长(秒)",followDirection:"方向沿路径",moveProgressCurve:"移动进度曲线",moveProgressHelp:"横轴:实时/移动时长 纵轴:路径进度(0=起点 → 1=终点)",pathTitle:"路径属性",pathName:"路径名称",closedPath:"闭合路径",pathColor:"路径颜色",pathHelp:"操作说明:",pathHelpItems:["双击空白处/曲线:新建锚点","双击锚点:删除节点","双击第二下按住拖动:新建并拉出手柄","拖动锚点移动位置,拖动手柄调整曲线","Shift+拖动手柄:两侧完全对称","Alt+拖动手柄:独立控制单侧","Ctrl+点击/框选:加选节点","Alt+点击/框选:减选节点","Alt+单击空白处:清除全部选中","选中多个节点后可整体拖动"],applyPresetShape:"应用预设形状",choosePreset:"选择预设...",square:"方形",star:"星形",applyPreset:"应用预设",clearAnchors:"清空锚点",panelHint:"使用右上角按钮创建场景对象"},OB={title:"修改器",reset:"重置修改器参数",damping:"阻尼",enableNoise:"开启移动噪声",strength:"强度",noiseRange:"波动范围",noiseSpeed:"时间流速",noiseHint:"强度控制影响比例 · 波动范围控制最大偏移 · 时间流速控制变化速度",enableGravity:"开启重力",gravityStrength:"重力强度",strengthMin:"强度 min",strengthMax:"强度 max",direction:"方向",gravityOverLife:"生命周期内重力",windOverLife:"生命周期内风力",axisStrength:"纵轴:强度 0~1",directionHint:"0° 向右 · -90° 向下 · 负强度会反转方向",enableWind:"开启风力",windStrength:"风力强度",enableForceField:"开启力场",centerX:"中心 X",centerY:"中心 Y",forceStrength:"力场强度",forceRadius:"力场半径",falloffMode:"衰减模式",constant:"恒定(范围内力度不变)",linearFalloff:"线性衰减(边缘为 0)",inverseFalloff:"距离反比(中心最强)",forceHint:"正数吸向中心 · 负数向外排斥 · 可在画布内拖动力场圆",showShape:"显示形状",enableVortex:"开启漩涡",vortexHint:"正数逆时针 · 负数顺时针",enableAttraction:"开启吸附",attractionX:"吸附点 X",attractionY:"吸附点 Y",attractionRadius:"吸附半径",attractionDuration:"吸附时长",delay:"延迟时间",delayMode:"延迟方式",globalTime:"统一时间",particleLife:"单粒子生命",attractionPath:"吸附方式",straight:"直线",attractionHint:"延迟后从当前位置开始吸附 · 到达红色范围即死亡 · 可在画布内拖动吸附圆",enableTrail:"开启拖尾",trailImages:"拖尾独立图片",addTrailImage:"增加拖尾图片资源",trailRotation:"旋转",trailBones:"拖尾骨骼数",trailRatio:"拖尾比例 (%)",trailLength:"拖尾长度",randomRange:"随机范围",lengthRatio:"长度比例 (%)",lengthMin:"长度最小 (%)",lengthMax:"长度最大 (%)",trailWidth:"拖尾宽度",widthRatio:"宽度比例 (%)",widthMin:"宽度最小 (%)",widthMax:"宽度最大 (%)",widthScale:"宽度缩放",followParticle:"跟随粒子",lifeLengthCurve:"生命周期长度曲线",shapeCurve:"形状曲线(首端 → 尾端宽度)",colorMode:"颜色模式",blendMode:"混合模式",fixedColor:"固定颜色",alphaMode:"透明度模式",opacity:"透明度",gridRows:"网格行数",gridCols:"网格列数",trailHint:"每个粒子按资源比例生成一组同级拖尾骨骼;随机长度与宽度在粒子出生时确定,相同种子可稳定复现",enableFollow:"开启发射器跟随",followMode:"跟随模式",noFollow:"无",followPath:"跟随路径",selectedBone:"选中的骨骼",emitterAngleMode:"发射器角度模式",fixedAngle:"固定角度",followMoveDirection:"跟随移动方向",moveProgressCurve:"移动进度曲线 (0→1)",moveDuration:"移动时长 (s)",followSpace:"跟随空间",localSpace:"局部空间(GEN 移动)",worldSpace:"世界空间(粒子生成点移动)",moveDirection:"移动方向",forward:"正向(起点 → 终点)",reverse:"反向(终点 → 起点)",followOffset:"偏移起始点 (0-1)",followSpaceHint:"局部空间会移动整个发射器;世界空间只移动新粒子的生成点,已出生粒子留在世界位置。",followTarget:"跟随目标:",noValidBone:"尚未绑定有效骨骼,请先在 Spine 层级树中选择骨骼。",rebind:"重新绑定",bind:"绑定",selectedBoneLabel:"当前选中骨骼:",boneLocalSpace:"本地空间(随骨骼移动)",boneWorldSpace:"世界空间(粒子生成后保持位置)",offsetX:"位移偏移 X",offsetY:"位移偏移 Y",rotationOffset:"旋转偏移",scaleOffsetX:"缩放偏移 X",scaleOffsetY:"缩放偏移 Y",boneFollowHint:"发射器只跟随所选 Spine 骨骼的位置,不继承 Spine 的旋转或缩放;粒子变换使用粒子系统自身参数和上方偏移。",enableCollision:"开启碰撞",collisionObjects:"参与的碰撞对象",colliderDisabled:"{name}(碰撞体已禁用)",clearCollider:"清除碰撞对象 {name}",addCollider:"加入场景碰撞对象",noAvailableColliders:"没有可加入的碰撞对象",noCollidersSelected:"未选择碰撞对象,当前粒子不会发生碰撞",available:"可用",disabled:"已禁用",collisionHint:"只有已加入且启用的场景碰撞对象会参与当前粒子系统的碰撞",enableSubEmitter:"开启子发射器",triggerTiming:"选择触发时机",birth:"出生",death:"死亡",collision:"碰撞",chooseTarget:"选择目标粒子系统",noTarget:"无(粒子系统)",deleteSubEmitter:"删除该子发射器",probability:"发射概率",collisionLimit:"碰撞次数限制",inherit:"继承",colorInheritMode:"颜色继承方式",add:"相加",replace:"覆盖",addSubEmitter:"+ 新增子发射器",inheritNone:"无(默认值)",inheritAll:"所有属性",inheritColor:"颜色",inheritScale:"大小",inheritRotation:"旋转",inheritLife:"生命周期"},NB={title:"Spine 属性",name:"Spine 名称",xPosition:"X 位置",yPosition:"Y 位置",rotation:"旋转",scaleX:"Scale X",scaleY:"Scale Y",startTime:"开始时间",resources:"Spine 资源",chooseFolder:"选择文件夹并加载",folderHint:"一次读取文件夹中的 JSON / SKEL、Atlas 和全部纹理;仍可在下方单独替换资源。",choose:"选择",chooseMultiple:"选择(多选)",loading:"加载中…",load:"↧ 加载",clear:"清除",supportNote:"支持 Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · 对应版本运行时按需加载 · 本地离线",currentResource:"当前资源 {version}",animations:"Spine 动画",noAnimations:"无可用动画",timelineAnimation:"时间轴播放动画",no:"无",hierarchy:"层级树",clearBoneTitle:"点击清除骨骼选择",noBoneTitle:"当前未选择骨骼",clearBone:"清除选中骨骼:{name}",currentBone:"当前骨骼:",clearSlotTitle:"点击清除插槽选择",noSlotTitle:"当前未选择插槽",clearSlot:"清除选中插槽:{name}",currentSlot:"当前插槽:",notSelected:"未选择",expandAll:"全部展开",collapseAll:"全部折叠",bones:"骨骼",slots:"插槽",notLoaded:"未加载 Spine",searchBones:"搜索骨骼",searchBonesPlaceholder:"搜索骨骼名称…",clearSearch:"清空搜索",clearBoneSearch:"清空骨骼搜索",noMatchingBones:"未找到匹配的骨骼",expandChildren:"展开子骨骼",collapseChildren:"折叠子骨骼",notLoadedSlots:"未加载 Spine 插槽",searchSlots:"搜索插槽",searchSlotsPlaceholder:"搜索插槽或附件名称…",clearSlotSearch:"清空插槽搜索",noMatchingSlots:"未找到匹配的插槽",slotTitle:"{name}(骨骼:{bone},附件:{attachment})",empty:"空",textureSummary:"{count} 张:{names}",textureImages:"纹理图片",missingFolderAssets:"所选文件夹缺少:{missing}",chooseAssets:"请依次选择 Spine 数据、Atlas 和全部纹理图片"},$B={title:"使用说明",subtitle:"从创建粒子到保存、导出的快速入门",close:"关闭使用说明",closeShort:"关闭 (Esc)",quickStart:"快速开始",stepCreate:"创建对象:在左侧“场景对象”中用 +粒子 / +碰撞 / +路径 / +Spine 添加场景对象。",stepEdit:"编辑粒子:选中粒子系统,依次调整“发射模式 → 发射器形状 → 粒子属性 → 外观与资源 → 修改器”。",stepPreview:"查看效果:底部时间轴可播放、暂停、逐帧或拖动;修改参数后会自动重新计算。",stepExport:"保存与导出:用“保存配置”保留工程;“导出 Spine Json / images 包 / .spine 包”输出成品。",quickNote:"每个模块组标题右侧的“重置”可恢复该组默认参数;系统设置会自动保存在当前浏览器。",commonOps:"常用操作",eye:"小眼睛",eyeDesc:"单独显示/隐藏对象;隐藏的粒子系统不会被导出。",copyDesc:"完整复制当前选中对象,方便对比不同参数。",backgroundDesc:"上传参考图并调整位置和透明度,只用于画布预览。",settingsDesc:"管理界面布局、辅助显示、刻度等,自动存入浏览器。",undoDesc:"Ctrl+Z 撤回一步;最大步数可在系统设置中调整。",spineBoneDesc:"在层级树搜索并选择骨骼,可用于粒子发射器跟随。",shortcuts:"快捷键",undoShortcut:"撤回上一步",saveShortcut:"保存配置",panShortcut:"拖动画布",translateShortcut:"位移工具",rotateShortcut:"旋转工具",scaleShortcut:"缩放工具",playShortcut:"播放 / 暂停",startShortcut:"回到第一帧",shortcutNote:"Q / W / E / R 需先点击画布;光标位于输入框时,单键快捷键不会触发。",modules:"功能模块详解",configTitle:"配置管理",saveConfigDesc:"把当前全部场景对象和参数保存为工程 JSON 文件(也支持 Ctrl+S)。",loadConfigDesc:"选择本地配置文件,恢复完整工程。",presetDesc:"从下拉中选择预设快速套用;点击下拉刷新列表。",configScope:"范围",configScopeDesc:"配置包含对象与参数;界面和系统设置单独存于浏览器。",sceneTitle:"场景对象",particleDesc:"核心对象。可设置位置、偏移、旋转、缩放和随机种子;相同种子可复现相同效果。",colliderDesc:"圆形/椭圆/矩形/多边形/自定义,支持物理弹跳、暂停、销毁,以及沿路径移动。",pathDesc:"贝塞尔路径,支持锚点、控制手柄、闭合、颜色和预设形状。",spineDesc:"加载 Spine 数据、Atlas 和纹理,浏览骨骼与插槽,并用于发射器跟随。",sceneCommonDesc:"对象可独立显隐和复制;隐藏的粒子系统不会导出。",emissionDesc:"持续发射、爆发、延迟,以及开始/循环/结束三段式循环持续。",burstDesc:"一次性发射指定数量的粒子。",delayDesc:"发射开始前的等待时间,对应粒子条左端。",loopNote:"循环持续不支持骨骼和路径跟随,切换时会恢复跟随设置。",shapeDesc:"点、圆形、矩形、锥形或路径出生区域。圆/锥支持内外半径,矩形支持内外宽高。",angleDesc:"固定、随机、径向、路径法线或路径切线。",initialDesc:"生命周期、速度、缩放和旋转支持固定、随机、曲线,旋转可跟随发射方向。",overLifeDesc:"速度倍率、缩放倍率、旋转速度可用生命周期曲线控制。",alphaDesc:"透明度支持固定或曲线;曲线模式可跟随导出、线性或贝塞尔。",imageDesc:"单图或序列帧、多图权重随机、轴点、颜色、混合模式和独立透明度。",sequenceDesc:"播放方式有单次隐藏、单次定格、正向循环、反向循环。",noiseDesc:"产生抖动轨迹,并控制强度、范围和速度。",gravityDesc:"重力、风力和生命周期强度曲线。",forceDesc:"全局力场、漩涡、吸附和碰撞。",trailDesc:"独立拖尾资源、骨骼数、长度、宽度、形状、颜色与透明度曲线。",followDesc:"发射器可跟随路径或 Spine 骨骼。",collisionDesc:"选择场景碰撞对象和粒子碰撞响应。",exportDesc:"设置图片路径、Spine 版本、关键帧曲线、FPS、整数帧、骨骼池和空动画。",exportButtonsDesc:"可导出 Spine JSON、images ZIP,或通过连接器生成 .spine 工程。",connectorTitle:"Spine 连接器使用说明",connectorIntro:"连接器把网页生成的 JSON 和图片交给本机已安装并激活的 Spine,转换成可编辑的 .spine 工程。",prerequisite:"前置",prerequisiteDesc:"电脑已安装并激活 Spine,并已启动桌面版连接器。",download:"下载",webSide:"网页端",webSideDesc:"显示“连接器可用 · Spine 已就绪”后,点击“导出 .spine 包”。",authorization:"首次授权",authorizationDesc:"首次连接需核对网站来源并允许一次;本机会保存授权白名单。",pathSetup:"路径设置",pathSetupDesc:"连接器会自动检测 Spine;找不到时可手动指定应用路径。",downloadResult:"下载结果",downloadResultDesc:"得到 ZIP 包,内含 .spine 工程和图片目录。",version:"版本",versionDesc:"连接器按 JSON 版本自动匹配 Spine 3.8~4.3。",security:"安全",securityDesc:"仅监听本机地址,授权保存在连接器,临时文件转换后清理。",differenceTitle:"配置与导出有什么区别?",differenceDesc:"“保存配置”保存全部可继续编辑的对象和参数;“导出 Spine Json”只导出显示中的粒子系统,并把碰撞、跟随、拖尾和子发射器结果烘焙为独立动画数据。"},BB={confirmLoopFollowEnter:"进入循环持续模式后,粒子跟随设置会失效并恢复默认值。是否继续?",confirmLoopFollowExit:"退出循环持续模式后,粒子跟随设置会失效并恢复默认值。是否继续?",invalidJson:"配置文件不是有效的 JSON",invalidConfigFormat:"不是 SpineParticle 编辑器配置文件",unsupportedConfigVersion:"暂不支持配置版本:{version}",missingScene:"配置文件缺少完整场景数据",missingEmbeddedSpine:"配置未包含可复用的 Spine 原始资源",chooseJsonConfig:"请选择 .json 配置文件",settingsInvalidJson:"系统设置缓存不是有效的 JSON",settingsFormat:"不是 SpineParticle 编辑器系统设置缓存",settingsVersion:"暂不支持系统配置版本:{version}",settingsMissing:"系统设置缓存缺少 settings",noExportableImages:"当前可见粒子系统没有可导出的图片",invalidZipPath:"ZIP 文件路径无效",spineFileType:"Spine 数据仅支持 .json 或 .skel",atlasFileType:"图集文件仅支持 .atlas",chooseTexture:"请至少选择一张纹理图片",binaryParseFailed:"Spine 二进制解析失败(4.3:{v43};旧版:{v42})",invalidSpineJson:"Spine JSON 文件格式无效",unsupportedSpineJsonVersion:"Spine JSON 版本不受支持,仅支持 {versions}",unsupportedSpineDataVersion:"Spine 数据版本不受支持,仅支持 {versions}",embeddedReadFailed:"无法读取内嵌 Spine 文件:{name}",missingImageWarning:"图片“{file}”缺失或尺寸不可读,已保留路径。",missingTrailImageWarning:"拖尾图片“{file}”缺失,已保留路径。",emptyCacheWarning:"“{name}”没有可用帧缓存。",readExportImageFailed:"无法读取导出图片:{name}",connectorOffline:"未检测到本地 Spine 连接器,请先启动连接器",connectorHttpError:"Spine 连接器返回错误:HTTP {status}",invalidTrailUV:"拖尾网格“{name}”的 UV 数据无效",missingTrailVertices:"拖尾网格“{name}”缺少顶点数据",trailIndexOutOfRange:"拖尾网格“{name}”的三角形索引越界",invalidTrailHull:"拖尾网格“{name}”的外轮廓数量无效",trailHullIndexOutOfRange:"拖尾网格“{name}”的外轮廓边索引越界",invalidInfluenceCount:"拖尾网格“{name}”包含无效骨骼权重数量",missingBoneReference:"拖尾网格“{name}”引用了不存在的骨骼",invalidWeight:"拖尾网格“{name}”包含无效权重数据",weightSum:"拖尾网格“{name}”的顶点权重之和不为 1",vertexCountMismatch:"拖尾网格“{name}”的顶点数量与 UV 不一致",invalidInherit:"骨骼“{name}”的 inherit 值“{inherit}”不符合 Spine {version} JSON 格式",trailBoneParent:"拖尾骨骼“{name}”必须直接挂在粒子系统骨骼下,不能组成骨骼链",trailSlotEmpty:"加权拖尾插槽“{name}”不能使用空附件,未出现或死亡阶段应将对应骨骼缩放设为 0",spine38Version:"Spine 3.8 导出的版本标识必须为 3.8",spine38Inherit:"Spine 3.8 骨骼“{name}”应使用 transform,不能使用 inherit",spine38SlotColor:"Spine 3.8 插槽颜色时间轴必须使用 color / twoColor",spine38AttachmentName:"Spine 3.8 附件时间轴的隐藏帧必须显式写入 name: null",spine38RotationAngle:"Spine 3.8 旋转时间轴必须使用 angle",spine38Curve:"Spine 3.8 不支持 4.x 数组曲线格式",unsupportedExportVersion:"导出版本不受支持,仅支持 Spine {versions}",exportVersionMismatch:"导出版本不一致:设置为 Spine {expected},JSON 标记为 Spine {actual}",exportMissingBones:"导出结果缺少骨骼",missingAtlasTexture:"Atlas 引用的纹理未选择:{name}"},UB={app:bB,language:yB,common:xB,toolbar:wB,settings:SB,config:CB,curve:AB,gradient:TB,attributeControl:EB,pivot:_B,image:MB,timeline:PB,emission:kB,attributes:IB,appearance:RB,renderLayer:FB,export:{title:"导出资源",reset:"重置导出资源参数",imagesPath:"图片路径 (Spine Images Path)",spineVersion:"Spine 版本",keyframeCurve:"关键帧插值曲线",linear:"线性 (Linear)",smoothBezier:"平滑贝塞尔 (Smooth Bézier)",bezierHelp:"平滑贝塞尔会在误差允许范围内拟合连续运动;出生、死亡、附件切换和突变仍使用阶跃关键帧。",spine38Help:"Spine 3.8 不支持 4.x 的逐通道数组贝塞尔,导出时会转换为经过容差精简的分段线性关键帧。",fps:"导出 FPS",omitFps:"不写 fps",fpsHelp:"修改 FPS 时保持动画实际秒数不变;“不写 fps”只省略 Spine 的 fps 元数据。",integerFrames:"整数帧对齐",bonePool:"骨骼对象池",excludeEmpty:"排除无内容动画",baking:"正在重新计算并烘焙动画",exportJsonTitle:"导出 Spine {version} JSON",preparing:"正在准备导出…",exportJson:"导出Spine Json",exportImagesTitle:"单独下载当前粒子系统使用的图片 ZIP",organizingImages:"正在整理图片…",exportImages:"导出 images 包",generatingProject:"正在生成工程…",exportSpine:"导出 .spine 包",authorize:"授权当前网站",authorizeTitle:"在本机连接器中授权当前网站",refreshConnector:"重新检测连接器",refresh:"刷新",recalculating:"正在重新计算粒子动画…",exported:"已导出 Spine {version}:{systems} 个粒子系统、{animations} 个动画、{bones} 根骨骼{warning}",resourceWarning:";{count} 条资源提示(缺图仍已导出)",timeout:"重新计算动画超时,请确认页面仍在运行后重试",preparingProject:"正在整理图片并调用本机 Spine…",projectExported:"已生成 {fileName}:包含 .spine 工程和 {images} 张图片,Spine {version}",collectingImages:"正在整理当前粒子系统使用的图片…",imagesExported:"已生成 {fileName}:{folder}/ 内包含 {images} 张图片",connectorChecking:"正在检测本地 Spine 连接器…",connectorOffline:"本地 Spine 连接器未启动",spineNotFound:"连接器已启动,但未找到 Spine",notAuthorized:"连接器已启动,当前网站尚未授权",connectorReady:"连接器可用 · Spine 已就绪",connectorBusy:"正在重新计算并生成 Spine 工程",connectorGenerate:"调用本机 Spine 自动生成 {version} 工程",unknown:"未知",checking:"检测中",offline:"未启动",notFound:"未找到 Spine",unauthorized:"未授权",projectTransferTitle:"导出 Spine 包",projectTransferDetail:"正在重新计算粒子动画…",projectTransferDownload:"Spine 工程包已开始下载",generatingJson:"正在生成 Spine JSON…",preparingProjectFiles:"正在整理工程图片…",uploading:"正在上传数据到 Spine 连接器…",spineProcessing:"Spine 正在转换工程,请稍候…",downloadingProject:"正在下载生成的 Spine 工程包…",handingToBrowser:"正在交给浏览器下载…"},transfer:LB,scene:DB,modifiers:OB,spine:NB,help:$B,errors:BB},VB={resizeTimeline:"拖曳調整時間軸高度",systems:"系統",particlesBones:"粒子(骨骼)",rootBone:"根骨骼",hudTip:"滾輪縮放 · 左鍵拖動畫布",title:"Spine粒子編輯器-Yeomai"},XB={close:"關閉",collapse:"收合",reset:"重設",add:"新增",remove:"移除",delete:"刪除",clear:"清除",cancel:"取消",confirm:"確定",none:"無",enabled:"啟用",disabled:"停用",fixed:"固定",random:"隨機",curve:"曲線",followExport:"跟隨匯出",linear:"線性",bezier:"貝茲",above:"上方",below:"下方",left:"左側",right:"右側",seconds:"秒",frames:"幀"},YB={settings:"系統設定",undo:"復原上一步 (Ctrl+Z)",pan:"拖曳畫布 (Q)",translate:"位移 (W)",rotate:"旋轉 (E)",scale:"縮放 (R)",zoomIn:"放大",zoomOut:"縮小",fitView:"適合畫布",toggleGrid:"切換網格",resetView:"重設視圖",background:"背景圖",backgroundSettings:"背景圖顯示設定",changeBackground:"更換圖像",uploadBackground:"上傳圖像",clearBackground:"清除背景",noBackground:"未上傳圖像",backgroundX:"背景圖 X 偏移",backgroundY:"背景圖 Y 偏移",backgroundOpacity:"背景圖透明度",opacity:"透明度",help:"使用說明",openHelp:"查看使用說明"},zB={title:"系統設定",layout:"介面佈局",floatingMenu:"懸浮選單",floatingMenuParticleOnly:"請先選擇粒子系統",parameterPanelPosition:"參數面板位置",panelOnRight:"參數面板顯示在右側",history:"操作歷史",maxUndo:"最大撤回步數",canvasGuides:"畫布輔助顯示",emitter:"發射點",bones:"骨骼連線",bonePointSize:"骨骼點繪製大小",boneAxisSize:"座標軸繪製大小",skinMesh:"蒙皮網格",enableTicks:"啟用刻度",tickFontSize:"刻度文字大小",tickWidth:"刻度線粗細",axisColor:"座標軸顏色",showAxisLabels:"顯示刻度數值",unsavedPrompt:"未儲存提示",showProjectSize:"顯示設定佔用空間",cacheNote:"整個系統設定會自動儲存到目前瀏覽器"},jB={title:"設定管理",save:"儲存設定",saveTitle:"儲存設定到瀏覽器快取",load:"載入設定",loadTitle:"載入本機編輯器配置",presets:"預設列表",selectPreset:"選擇預設",noPresets:"無預設檔案",saved:"配置已儲存至本機",loading:"正在加載配置…",loaded:"已載入:{name}",presetLoading:"正在載入預設…",presetLoaded:"已載入預設:{name}",presetNamingError:"{message},請檢查預設檔命名",presetTransferTitle:"載入預設",presetDownloading:"正在下載 {file}…",presetParsing:"正在解析預設配置…",presetRestoring:"正在解析並恢復預設資源…",presetComplete:"預設載入完成",presetListError:"無法讀取預設列表",presetReadError:"無法讀取預設:{file}",local:{listTitle:"設定列表",empty:"瀏覽器中尚無已儲存的設定",saveTitle:"儲存設定到瀏覽器快取",name:"設定名稱",namePlaceholder:"例如:煙花效果",load:"載入",loadHint:"按兩下以載入",download:"下載",delete:"刪除",downloadCurrent:"下載目前設定",downloadAll:"下載所有設定",loadAll:"載入所有設定",loadAllConfirm:"將匯入 {count} 個設定檔,同名設定會被覆寫。是否繼續?",loadAllDone:"已從檔案載入 {count} 個設定",loadAllPartial:"已匯入 {imported} 個設定,{failed} 個檔案失敗",overwriteSave:"「{name}」已存在,是否覆寫?",loadOverwrite:"載入「{name}」會覆寫目前場景,未儲存的修改將遺失。是否繼續?",deleteConfirm:"確定刪除「{name}」嗎?",nameRequired:"請輸入設定名稱",nameInvalid:'設定名稱不能包含 \\ / : * ? " < > |',storageUnavailable:"瀏覽器本機儲存空間無法使用",saved:"已儲存到瀏覽器:{name}",loaded:"已從瀏覽器載入:{name}",deleted:"已刪除瀏覽器設定:{name}",downloadEmpty:"沒有可下載的設定",downloaded:"已下載:{name}"}},HB={bezierHint:"拖曳方形手把調整弧度 · 雙擊空白新建 · 雙擊節點刪除",linearHint:"雙擊空白新建 · 雙擊節點刪除 · 拖曳節點調整",resetTitle:"恢復預設曲線"},GB={addTitle:"雙擊色帶添加色標",color:"色標顏色",colorValue:"色標顏色值",position:"色標位置",addMiddle:"在中間新增顏色",delete:"刪除目前色標",hint:"雙擊色帶新增 · 拖曳色標調整位置 · 雙擊色標刪除"},WB={angleOffset:"角度偏移",value:"數值",lower:"下限",upper:"上限",rangeLower:"範圍下限",rangeUpper:"範圍上限",curveInput:"曲線輸入 →",direction:"發射方向"},qB={title:"貼圖軸點",zoomOut:"縮小",zoomIn:"放大",expand:"放大到全螢幕操作",interaction:"左鍵點選/拖曳設定軸點 · 右鍵拖曳動畫布 · 滾輪縮放",previewAlt:"軸點預覽",noImage:"未選擇圖片",resetCenter:"復位中 (50%, 50%)",coordinates:"軸點座標(%)",rotationTest:"軸心旋轉測試",static:"靜止",spin:"自轉",swing:"擺動",rotationAlt:"旋轉測試",topLeft:"左上",top:"正上",topRight:"右上",left:"正左",center:"正中",right:"正右",bottomLeft:"左下",bottom:"正下·底部",bottomRight:"右下"},KB={chooseSequence:"選擇序列影格圖片",chooseLocal:"選擇本地圖片",subfolder:"子資料夾",name:"名稱",restore:"恢復 {name}",deleteResource:"刪除圖片資源",imageMode:"圖片模式",fixed:"固定",sequence:"序列幀",playbackMode:"播放模式",onceHide:"單次-尾幀消失",onceHold:"單次-尾幀固定",loopForward:"正向循環",loopReverse:"反向循環",playbackFps:"播放影格率",chooseSequenceMulti:"選擇序列幀(多選)",weight:"權重 %",unlockWeight:"解除佔比鎖定",lockWeight:"鎖定目前佔比",pivot:"貼圖軸點",collapsePivot:"收起軸點調整",expandPivot:"展開軸點調整",pivotModal:"貼圖旋轉軸點大圖精修",pivotModalDesc:"在下方貼圖上任意點擊或拖拽,精確設定粒子的旋轉/擺動中心",pivotZoomHint:"支援 100% ~ 400% 放大,精確對準尖端或根部:",confirmPivot:"確定並保存軸點",noSequence:"未選擇序列幀",firstFrame:"第 1 幀",firstImage:"第一張圖片",lastImage:"最後一張圖片",pivotOn:"已開啟:X {x}% | Y {y}%",pivotOff:"未開啟,預設圍繞圖片正中心 (50%, 50%)",pivotCustom:"軸點已自訂:X {x}% | Y {y}%",frameCountOne:"1 幀 · {name}",frameCountMany:"{count} 幀 · {first} → {last}",sequenceSelected:"已選擇 {count} 幀,按 {first}-{last} 順序播放"},JB={play:"播放 (D)",pause:"暫停 (D)",toStart:"回到第一幀 (S)",previous:"前一幀",next:"後一幀",toEnd:"移動到最後一幀",continuousLoop:"持續循環播放",abLoop:"獨立 A/B 區間循環",abLoopShort:"AB 循環",abRange:"AB 循環區間",playbackStart:"自訂播放起始幀",playbackEnd:"自訂播放結束幀",startFrame:"播放起始影格",endFrame:"播放結束影格",frame:"影格",emission:"持續發射",particleLife:"粒子存在",spineAnimation:"Spine 動畫",ownerAnimation:"所屬動畫",setOwnerAnimation:"設定目前粒子系統所屬的動畫",chooseOwnerAnimation:"選擇所屬動畫",animationName:"動畫名稱",renameAnimation:"重新命名當前動畫",rename:"重新命名",newAnimation:"+ 新增",keepOneAnimation:"至少需要保留一個動畫",spinePreview:"Spine 預覽動畫",noSpineAnimation:"無可用 Spine 動畫",none:"無",systemName:"系統 {index}",dragLoopDuration:"拖曳循環段時長",dragEmissionDuration:"拖曳持續發射時長",dragSpineStart:"拖曳調整動畫開始時間",noAnimationData:"暫無可顯示的動畫數據",animationNameEmpty:"動畫名稱不能為空",animationNameDuplicate:"動畫名稱不能重複",animationRenameFailed:"無法修改動畫名稱",zoomIn:"放大",zoomOut:"縮小",zoomFit:"適中",frameStatus:"幀 {current} / {total}"},ZB={title:"發射模式",reset:"重置發射模式參數",stream:"持續",burst:"爆發",normalStream:"一般持續",loopStream:"循環持續",rate:"發射速率",duration:"發射時長",loopDuration:"發射時長 (f)",generateStart:"生成開始循環動畫",generateEnd:"生成結束循環動畫",customDuration:"指定時長",auto:"自動 {frames}f",startLoopDuration:"開始循環段時長",endLoopDuration:"結束循環段時長",loopWarning:"循環持續模式不支援骨骼跟隨和路徑跟隨;進入或退出時會將粒子跟隨設定恢復預設值。",burstCount:"單次數量",delay:"延遲時間",shapeTitle:"發射器形狀",shapeReset:"重置發射器形狀參數",shape:"形狀",point:"點",circle:"圓形",rect:"矩形",cone:"錐形",path:"路徑",innerDiameter:"內徑",outerDiameter:"外徑",innerRadius:"內半徑",outerRadius:"外半徑",coneDirection:"錐形朝向",coneAngle:"錐形開口角度",innerWidth:"內寬",innerHeight:"內高",outerWidth:"外寬",outerHeight:"外高",selectPath:"選擇路徑",noPath:"無路徑(點發射)",birthDistribution:"出生分佈",evenDistribution:"等間距固定分佈",randomDistribution:"隨機分佈",emissionAngle:"發射角度",radial:"徑向(中心向外)",pathNormal:"垂直於路徑",pathTangent:"沿路徑方向",fixedAngle:"固定角度",baseAngle:"基準角度",randomRange:"隨機範圍",showShape:"顯示形狀"},QB={title:"粒子屬性",reset:"重置粒子屬性參數",initialParams:"粒子初始參數",initialLife:"初始生命週期",randomSample:"隨機取樣 →",initialSpeed:"初始速度",initialScale:"初始縮放",uniform:"統一",separateXY:"XY分離",scaleX:"縮放 X",scaleY:"縮放 Y",initialRotation:"初始旋轉",lifecycleTitle:"粒子生命週期變化參數",speedOverLife:"生命週期內速度",speedMultiplier:"速度倍率",lifeTo:"生命週期 →",scaleOverLife:"生命週期內縮放",scaleMultiplier:"縮放倍率",multiplierX:"倍率 X",multiplierY:"倍率 Y",rotationOverLife:"生命週期內旋轉",rotationSpeed:"旋轉速度"},e3={title:"外觀與資源",reset:"重置外觀與資源參數",opacity:"透明度",curveMode:"曲線模式",transparent:"0(透明)",opaque:"1(不透明)",renderLayer:"渲染層級(Spine 插槽)",top:"最上層",spineSlot:"Spine 插槽",selectSpine:"請選擇 Spine",noSpine:"無可用 Spine",noSlot:"尚未選擇插槽",reselect:"重新選擇",selectSlot:"選擇插槽",searchSlots:"搜尋插槽或附件名稱…",searchSlotsAria:"搜尋插槽",emptySlot:"空插槽",noMatchingSlots:"沒有符合的插槽",above:"在此插槽圖片之上",below:"在此插槽圖片之下",followAttachment:"隨插槽附件顯隱",previewOnly:"調整顯示層級只會影響編輯器預覽,不影響匯出資料。",imageResources:"圖片資源",addImage:"新增圖片資源",scale:"縮放",color:"顏色",fixedColor:"固定色",randomColor:"隨機顏色",lifetime:"生命週期",normal:"正常",add:"相加",multiply:"相乘",screen:"濾色",fixedColorValue:"固定顏色值",randomColorHint:"每個粒子出生時從色帶隨機取色,生命週期內保持不變",independentAlpha:"獨立透明度",off:"關閉"},t3={slotLabelAbove:"{spine} / {slot} · 圖片之上",slotLabelBelow:"{spine} / {slot} · 圖片之下",resolvedAbove:"渲染在 {slot} 圖片之上、其後插槽之下",resolvedBetween:"渲染在 {previous} 與 {slot} 之間",warningNoSpine:"沒有已載入的 Spine,粒子暫時顯示在最上層。",warningNoSelection:"尚未選擇 Spine,粒子暫時顯示在最上層。",warningMissingSpine:"目標 Spine 不存在,粒子暫時顯示在最上層。",warningNotReady:"目標 Spine 未就緒,粒子暫時顯示在最上層。",warningMissingSlot:"目標插槽不存在(資源可能已更換),粒子暫時顯示在最上層。",warningFirstSlot:"這是第一個插槽,無法顯示在其下方,粒子暫時顯示在最上層。"},n3={completed:"已完成",failed:"操作失敗"},i3={title:"場景物件",addParticle:"加入粒子系統",addParticleShort:"+粒子",addCollider:"添加碰撞體",addColliderShort:"+碰撞",addPath:"新增路徑",addPathShort:"+路徑",addSpine:"加入 Spine",copyTitle:"複製目前選取的場景對象",showParticle:"顯示粒子系統",hideParticle:"隱藏粒子系統",showCollider:"顯示碰撞體",hideCollider:"隱藏碰撞體",showPath:"顯示路徑",hidePath:"隱藏路徑",showSpine:"顯示 Spine",hideSpine:"隱藏 Spine",particle:"粒子",subEmitter:"子發射器",collision:"碰撞",path:"路徑",deleteParticle:"刪除粒子系統",deleteCollider:"刪除碰撞體",deletePath:"刪除路徑",deleteSpine:"刪除 Spine",empty:"場景中暫無對象",name:"名稱",positionX:"X 位置",positionY:"Y 位置",offsetX:"X 偏移",offsetY:"Y 偏移",rotation:"旋轉",scaleX:"X 縮放",scaleY:"Y 縮放",seed:"隨機種子",seedTitle:"控製粒子系統內全部隨機屬性、資源選擇與修改器隨機取樣",randomizeSeed:"產生新的全域隨機種子",seedHint:"控制初始隨機參數、資源選擇和修改器隨機取樣;相同種子可重現相同效果",colliderTitle:"碰撞體屬性",colliderName:"碰撞體名稱",type:"類型",circle:"圓形",ellipse:"橢圓",rect:"長方形",polygon:"多邊形",custom:"自訂",enabled:"啟用",xPosition:"X 位置",yPosition:"Y 位置",scaleXShort:"X 縮放",scaleYShort:"Y 縮放",radius:"半徑",radiusX:"X 半徑",radiusY:"Y 半徑",width:"寬度",height:"高度",sides:"邊數",collisionResponse:"碰撞響應",physics:"物理(彈跳/摩擦)",pause:"暫停(停止不動)",destroy:"消失(立即銷毀)",elasticity:"彈性 (0-1)",friction:"摩擦 (0-1)",followPath:"跟隨路徑移動",targetPath:"目標路徑",notSelected:"(未選擇)",moveDuration:"移動時長(秒)",followDirection:"方向沿路徑",moveProgressCurve:"移動進度曲線",moveProgressHelp:"橫軸:即時/移動時長 縱軸:路徑進度(0=起點 → 1=終點)",pathTitle:"路徑屬性",pathName:"路徑名稱",closedPath:"閉合路徑",pathColor:"路徑顏色",pathHelp:"操作說明:",pathHelpItems:"雙擊空白處/曲線:新錨點,雙擊錨點:刪除節點,雙擊第二下按住拖曳:新建並拉出手柄,拖曳錨點移動位置,拖曳手柄調整曲線,Shift+拖曳手柄:兩側完全對稱,A lt+拖曳手把:獨立控制單側,Ctrl+點選/框選:加選節點,Alt+點選/框選:減選節點,Alt+點選空白處:清除全部選取,選取多個節點後可整體拖曳",applyPresetShape:"應用預設形狀",choosePreset:"選擇預設...",square:"方形",star:"星形",applyPreset:"應用預設",clearAnchors:"清空錨點",panelHint:"使用右上角按鈕建立場景對象"},s3={title:"修改器",reset:"重置修改器參數",damping:"阻尼",enableNoise:"開啟移動雜訊",strength:"強度",noiseRange:"波動範圍",noiseSpeed:"時間流速",noiseHint:"強度控制影響比例 · 波動範圍控制最大偏移 · 時間流速控制變化速度",enableGravity:"開啟重力",gravityStrength:"重力強度",strengthMin:"強度 min",strengthMax:"強度 max",direction:"方向",gravityOverLife:"生命週期內重力",windOverLife:"生命週期內風力",axisStrength:"縱軸:強度 0~1",directionHint:"0° 向右 · -90° 向下 · 負強度會反轉方向",enableWind:"開啟風力",windStrength:"風力強度",enableForceField:"開啟力場",centerX:"中心 X",centerY:"中心 Y",forceStrength:"力場強度",forceRadius:"力場半徑",falloffMode:"衰減模式",constant:"恆定(範圍內力道不變)",linearFalloff:"線性衰減(邊緣為 0)",inverseFalloff:"距離反比(中心最強)",forceHint:"正數吸向中心 · 負數向外排斥 · 可在畫布內拖動力場圓",showShape:"顯示形狀",enableVortex:"開啟漩渦",vortexHint:"正數逆時針 · 負數順時針",enableAttraction:"開啟吸附",attractionX:"吸附點 X",attractionY:"吸附點 Y",attractionRadius:"吸附半徑",attractionDuration:"吸附時長",delay:"延遲時間",delayMode:"延遲方式",globalTime:"統一時間",particleLife:"單粒子生命",attractionPath:"吸附方式",straight:"直線",attractionHint:"延遲後從當前位置開始吸附 · 到達紅色範圍即死亡 · 可在畫布內拖動吸附圓",enableTrail:"開啟拖尾",trailImages:"拖尾獨立圖片",addTrailImage:"增加拖尾圖片資源",trailRotation:"旋轉",trailBones:"拖尾骨骼數",trailRatio:"拖尾比例 (%)",trailLength:"拖尾長度",randomRange:"隨機範圍",lengthRatio:"長度比例 (%)",lengthMin:"長度最小 (%)",lengthMax:"長度最大 (%)",trailWidth:"拖尾寬度",widthRatio:"寬度比例 (%)",widthMin:"寬度最小 (%)",widthMax:"寬度最大 (%)",widthScale:"寬度縮放",followParticle:"跟隨粒子",lifeLengthCurve:"生命週期長度曲線",shapeCurve:"形狀曲線(首端 → 尾端寬度)",colorMode:"色彩模式",blendMode:"混合模式",fixedColor:"固定顏色",alphaMode:"透明度模式",opacity:"透明度",gridRows:"網格行數",gridCols:"網格列數",trailHint:"每個粒子依資源比例產生一組同級拖尾骨骼;隨機長度與寬度在粒子出生時確定,相同種子可穩定復現",enableFollow:"開啟發射器跟隨",followMode:"跟隨模式",noFollow:"無",followPath:"跟隨路徑",selectedBone:"選取的骨骼",emitterAngleMode:"發射器角度模式",fixedAngle:"固定角度",followMoveDirection:"跟著移動方向",moveProgressCurve:"移動進度曲線 (0→1)",moveDuration:"移動時長 (s)",followSpace:"跟隨空間",localSpace:"局部空間(GEN 移動)",worldSpace:"世界空間(粒子生成點移動)",moveDirection:"移動方向",forward:"正向(起點 → 終點)",reverse:"反向(終點 → 起點)",followOffset:"偏移起始點 (0-1)",followSpaceHint:"局部空間會移動整個發射器;世界空間只移動新粒子的生成點,已出生粒子留在世界位置。",followTarget:"跟隨目標:",noValidBone:"尚未綁定有效骨骼,請先在 Spine 層級樹中選擇骨骼。",rebind:"重新綁定",bind:"綁定",selectedBoneLabel:"目前選取骨骼:",boneLocalSpace:"本地空間(隨骨骼移動)",boneWorldSpace:"世界空間(粒子生成後保持位置)",offsetX:"位移偏移 X",offsetY:"位移偏移 Y",rotationOffset:"旋轉偏移",scaleOffsetX:"縮放偏移 X",scaleOffsetY:"縮放偏移 Y",boneFollowHint:"發射器只跟隨所選 Spine 骨骼的位置,不繼承 Spine 的旋轉或縮放;粒子變換使用粒子系統本身參數和上方偏移。",enableCollision:"開啟碰撞",collisionObjects:"參與的碰撞對象",colliderDisabled:"{name}(碰撞體已停用)",clearCollider:"清除碰撞物件 {name}",addCollider:"加入場景碰撞對象",noAvailableColliders:"沒有可加入的碰撞對象",noCollidersSelected:"未選擇碰撞對象,目前粒子不會發生碰撞",available:"可用",disabled:"已停用",collisionHint:"只有已加入且啟用的場景碰撞物件會參與目前粒子系統的碰撞",enableSubEmitter:"開啟子發射器",triggerTiming:"選擇觸發時機",birth:"出生",death:"死亡",collision:"碰撞",chooseTarget:"選擇目標粒子系統",noTarget:"無(粒子系統)",deleteSubEmitter:"刪除該子發射器",probability:"發射機率",collisionLimit:"碰撞次數限制",inherit:"繼承",colorInheritMode:"顏色繼承方式",add:"相加",replace:"覆蓋",addSubEmitter:"+ 新增子發射器",inheritNone:"無(預設值)",inheritAll:"所有屬性",inheritColor:"顏色",inheritScale:"大小",inheritRotation:"旋轉",inheritLife:"生命週期"},r3={title:"Spine 屬性",name:"Spine 名稱",xPosition:"X 位置",yPosition:"Y 位置",rotation:"旋轉",scaleX:"X 縮放",scaleY:"Y 縮放",startTime:"開始時間",resources:"Spine 資源",chooseFolder:"選擇資料夾並加載",folderHint:"一次讀取資料夾中的 JSON / SKEL、Atlas 和全部紋理;仍可在下方單獨取代資源。",choose:"選擇",chooseMultiple:"選擇(多選)",loading:"載入中…",load:"↧ 加載",clear:"清除",supportNote:"支援 Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · 對應版本運行時按需載入 · 本地離線",currentResource:"目前資源 {version}",animations:"Spine 動畫",noAnimations:"無可用動畫",timelineAnimation:"時間軸播放動畫",no:"無",hierarchy:"階層樹",clearBoneTitle:"點擊清除骨骼選擇",noBoneTitle:"目前未選擇骨骼",clearBone:"清除選取骨骼:{name}",currentBone:"當前骨骼:",clearSlotTitle:"點選清除插槽選擇",noSlotTitle:"目前未選擇插槽",clearSlot:"清除選取插槽:{name}",currentSlot:"目前插槽:",notSelected:"未選擇",expandAll:"全部展開",collapseAll:"全部折疊",bones:"骨骼",slots:"插槽",notLoaded:"未載入 Spine",searchBones:"搜尋骨骼",searchBonesPlaceholder:"搜尋骨骼名稱…",clearSearch:"清空搜尋",clearBoneSearch:"清空骨骼搜索",noMatchingBones:"未找到匹配的骨骼",expandChildren:"展開子骨骼",collapseChildren:"折疊子骨骼",notLoadedSlots:"未載入 Spine 插槽",searchSlots:"搜尋插槽",searchSlotsPlaceholder:"搜尋插槽或附件名稱…",clearSlotSearch:"清空插槽搜尋",noMatchingSlots:"未找到符合的插槽",slotTitle:"{name}(骨骼:{bone},配件:{attachment})",empty:"空",textureSummary:"{count} 張:{names}",textureImages:"紋理圖片",missingFolderAssets:"所選資料夾缺少:{missing}",chooseAssets:"請依序選擇 Spine 資料、Atlas 和全部紋理圖片"},o3={title:"使用說明",subtitle:"從創建粒子到保存、導出的快速入門",close:"關閉使用說明",closeShort:"關閉 (Esc)",quickStart:"快速開始",stepCreate:"建立物件:在左側「場景物件」中以 +粒子 / +碰撞 / +路徑 / +Spine 新增場景物件。",stepEdit:"編輯粒子:選取粒子系統,依序調整「發射模式 → 發射器形狀 → 粒子屬性 → 外觀與資源 → 修改器」。",stepPreview:"查看效果:底部時間軸可播放、暫停、逐幀或拖曳;修改參數後會自動重新計算。",stepExport:"儲存與匯出:以「儲存設定」保留工程;「匯出 Spine Json / images 套件 / .spine 套件」輸出完成品。",quickNote:"每個模組組標題右側的「重設」可恢復此組預設參數;系統設定會自動儲存在目前瀏覽器。",commonOps:"常用操作",eye:"小眼睛",eyeDesc:"單獨顯示/隱藏物件;隱藏的粒子系統不會被匯出。",copyDesc:"完整複製目前選取對象,方便比較不同參數。",backgroundDesc:"上傳參考圖並調整位置和透明度,只用於畫布預覽。",settingsDesc:"管理介面佈局、輔助顯示、刻度等,自動存入瀏覽器。",undoDesc:"Ctrl+Z 撤回一步;最大步數可在系統設定中調整。",spineBoneDesc:"在層級樹搜尋並選擇骨骼,可用於粒子發射器跟隨。",shortcuts:"快速鍵",undoShortcut:"撤銷上一步",saveShortcut:"儲存配置",panShortcut:"拖曳動畫布",translateShortcut:"位移工具",rotateShortcut:"旋轉工具",scaleShortcut:"縮放工具",playShortcut:"播放 / 暫停",startShortcut:"回到第一幀",shortcutNote:"Q / W / E / R 需先點選畫布;遊標位於輸入框時,單鍵快速鍵不會觸發。",modules:"功能模組詳解",configTitle:"配置管理",saveConfigDesc:"把目前全部場景物件和參數儲存為工程 JSON 檔案(也支援 Ctrl+S)。",loadConfigDesc:"選擇本地設定文件,恢復完整工程。",presetDesc:"從下拉選擇預設快速套用;點選下拉刷新清單。",configScope:"範圍",configScopeDesc:"配置包含物件與參數;介面和系統設定單獨存於瀏覽器。",sceneTitle:"場景對象",particleDesc:"核心對象。可設定位置、偏移、旋轉、縮放和隨機種子;相同種子可重複相同效果。",colliderDesc:"圓形/橢圓/矩形/多邊形/自訂,支援實體彈跳、暫停、銷毀,以及沿路徑移動。",pathDesc:"貝塞爾路徑,支援錨點、控製手柄、閉合、顏色和預設形狀。",spineDesc:"載入 Spine 資料、Atlas 和紋理,瀏覽骨骼與插槽,並用於發射器跟隨。",sceneCommonDesc:"物件可獨立顯隱和複製;隱藏的粒子系統不會導出。",emissionDesc:"持續發射、爆發、延遲,以及開始/循環/結束三段式循環持續。",burstDesc:"一次性發射指定數量的粒子。",delayDesc:"發射開始前的等待時間,對應粒子條左端。",loopNote:"循環持續不支援骨骼和路徑跟隨,切換時會恢復跟隨設定。",shapeDesc:"點、圓形、長方形、錐形或路徑出生區域。圓/錐支持內外半徑,矩形支持內外寬高。",angleDesc:"固定、隨機、徑向、路徑法線或路徑切線。",initialDesc:"生命週期、速度、縮放和旋轉支援固定、隨機、曲線,旋轉可跟隨發射方向。",overLifeDesc:"速度倍率、縮放倍率、旋轉速度可用生命週期曲線控制。",alphaDesc:"透明度支援固定或曲線;曲線模式可跟隨導出、線性或貝塞爾。",imageDesc:"單圖或序列幀、多圖權重隨機、軸點、顏色、混合模式和獨立透明度。",sequenceDesc:"播放方式有單次隱藏、單次定格、正向循環、反向循環。",noiseDesc:"產生抖動軌跡,並控制強度、範圍和速度。",gravityDesc:"重力、風力和生命週期強度曲線。",forceDesc:"全局力場、漩渦、吸附和碰撞。",trailDesc:"獨立拖尾資源、骨骼數、長度、寬度、形狀、顏色與透明度曲線。",followDesc:"發射器可跟隨路徑或 Spine 骨骼。",collisionDesc:"選擇場景碰撞物件和粒子碰撞響應。",exportDesc:"設定圖片路徑、Spine 版本、關鍵影格曲線、FPS、整數影格、骨骼池和空白動畫。",exportButtonsDesc:"可導出 Spine JSON、images ZIP,或透過連接器產生 .spine 工程。",connectorTitle:"Spine 連接器使用說明",connectorIntro:"連接器把網頁產生的 JSON 和圖片交給本機已安裝並啟動的 Spine,轉換成可編輯的 .spine 工程。",prerequisite:"前置",prerequisiteDesc:"電腦已安裝並啟動 Spine,並已啟動桌面版連接器。",download:"下載",webSide:"網頁端",webSideDesc:"顯示「連接器可用 · Spine 已就緒」後,點選「匯出 .spine 套件」。",authorization:"首次授權",authorizationDesc:"首次連接需核對網站來源並允許一次;本機會保存授權白名單。",pathSetup:"路徑設定",pathSetupDesc:"連接器會自動偵測 Spine;找不到時可手動指定應用路徑。",downloadResult:"下載結果",downloadResultDesc:"得到 ZIP 包,內含 .spine 工程和圖片目錄。",version:"版本",versionDesc:"連接器按 JSON 版本自動匹配 Spine 3.8~4.3。",security:"安全",securityDesc:"僅監聽本機位址,授權保存在連接器,臨時檔案轉換後清理。",differenceTitle:"配置與匯出有什麼差別?",differenceDesc:"「儲存配置」儲存全部可繼續編輯的物件和參數;「匯出 Spine Json」只匯出顯示中的粒子系統,並把碰撞、跟隨、拖尾和子發射器結果烘焙為獨立動畫資料。"},a3={confirmLoopFollowEnter:"進入循環持續模式後,粒子跟隨設定會失效並恢復預設值。是否繼續?",confirmLoopFollowExit:"退出循環持續模式後,粒子跟隨設定會失效並恢復預設值。是否繼續?",invalidJson:"設定檔不是有效的 JSON",invalidConfigFormat:"不是 SpineParticle 編輯器設定檔",unsupportedConfigVersion:"暫不支援配置版本:{version}",missingScene:"設定檔缺少完整場景數據",missingEmbeddedSpine:"配置未包含可重複使用的 Spine 原始資源",chooseJsonConfig:"請選擇 .json 設定文件",settingsInvalidJson:"系統設定快取不是有效的 JSON",settingsFormat:"不是 SpineParticle 編輯器系統設定緩存",settingsVersion:"暫不支援系統配置版本:{version}",settingsMissing:"系統設定緩存缺少 settings",noExportableImages:"目前可見粒子系統沒有可匯出的圖片",invalidZipPath:"ZIP 檔案路徑無效",spineFileType:"Spine 資料僅支援 .json 或 .skel",atlasFileType:"圖集檔案僅支援 .atlas",chooseTexture:"請至少選擇一張紋理圖片",binaryParseFailed:"Spine 二進位解析失敗(4.3:{v43};舊版:{v42})",invalidSpineJson:"Spine JSON 檔案格式無效",unsupportedSpineJsonVersion:"Spine JSON 版本不受支持,僅支援 {versions}",unsupportedSpineDataVersion:"Spine 資料版本不受支持,僅支援 {versions}",embeddedReadFailed:"無法讀取內嵌 Spine 檔案:{name}",missingImageWarning:"圖片「{file}」缺失或尺寸不可讀,已保留路徑。",missingTrailImageWarning:"拖尾圖片「{file}」缺失,已保留路徑。",emptyCacheWarning:"“{name}”沒有可用幀快取。",readExportImageFailed:"無法讀取匯出圖:{name}",connectorOffline:"未偵測到本機 Spine 連接器,請先啟動連接器",connectorHttpError:"Spine 連接器回傳錯誤:HTTP {status}",invalidTrailUV:"拖尾網格「{name}」的 UV 資料無效",missingTrailVertices:"拖尾網格“{name}”缺少頂點數據",trailIndexOutOfRange:"拖尾網格「{name}」的三角形索引越界",invalidTrailHull:"拖尾網格「{name}」的外輪廓數量無效",trailHullIndexOutOfRange:"拖尾網格「{name}」的外輪廓邊索引越界",invalidInfluenceCount:"拖尾網格“{name}”包含無效骨骼權重數量",missingBoneReference:"拖尾網格“{name}”引用了不存在的骨骼",invalidWeight:"拖尾網格“{name}”包含無效權重數據",weightSum:"拖尾網格「{name}」的頂點權重總和不為 1",vertexCountMismatch:"拖尾網格「{name}」的頂點數量與 UV 不一致",invalidInherit:"骨骼「{name}」的 inherit 值「{inherit}」不符合 Spine {version} JSON 格式",trailBoneParent:"拖尾骨骼「{name}」必須直接掛在粒子系統骨骼下,無法組成骨骼鏈",trailSlotEmpty:"加權拖尾插槽「{name}」不能使用空白附件,未出現或死亡階段應將對應骨骼縮放設為 0",spine38Version:"Spine 3.8 導出的版本標識必須為 3.8",spine38Inherit:"Spine 3.8 骨骼「{name}」應使用 transform,不能使用 inherit",spine38SlotColor:"Spine 3.8 插槽顏色時間軸必須使用 color / twoColor",spine38AttachmentName:"Spine 3.8 附件時間軸的隱藏訊框必須明確寫入 name: null",spine38RotationAngle:"Spine 3.8 旋轉時間軸必須使用 angle",spine38Curve:"Spine 3.8 不支援 4.x 陣列曲線格式",unsupportedExportVersion:"匯出版本不受支持,僅支援 Spine {versions}",exportVersionMismatch:"匯出版本不一致:設定為 Spine {expected},JSON 標記為 Spine {actual}",exportMissingBones:"匯出結果缺少骨骼",missingAtlasTexture:"Atlas 引用的紋理未選擇:{name}"},l3={label:"語言",zhCN:"中文",zhTW:"繁體中文",en:"English",ja:"日本語",ko:"한국어",fr:"Français",de:"Deutsch",ptBR:"Português",es:"Español"},c3={app:VB,common:XB,toolbar:YB,settings:zB,config:jB,curve:HB,gradient:GB,attributeControl:WB,pivot:qB,image:KB,timeline:JB,emission:ZB,attributes:QB,appearance:e3,renderLayer:t3,export:{title:"匯出資源",reset:"重置匯出資源參數",imagesPath:"圖片路徑 (Spine Images Path)",spineVersion:"Spine 版本",keyframeCurve:"關鍵幀插值曲線",linear:"線性 (Linear)",smoothBezier:"平滑貝塞爾 (Smooth Bézier)",bezierHelp:"平滑貝塞爾會在誤差允許範圍內擬合連續運動;出生、死亡、附件切換和突變仍使用階躍關鍵幀。",spine38Help:"Spine 3.8 不支援 4.x 的逐通道數組貝塞爾,導出時會轉換為經過容差精簡的分段線性關鍵影格。",fps:"匯出 FPS",omitFps:"不寫 fps",fpsHelp:"修改 FPS 時保持動畫實際秒數不變;「不寫 fps」只省略 Spine 的 fps 元資料。",integerFrames:"整數幀對齊",bonePool:"骨骼物件池",excludeEmpty:"排除無內容動畫",baking:"正在重新計算並烘焙動畫",exportJsonTitle:"導出 Spine {version} JSON",preparing:"正在準備匯出…",exportJson:"匯出 Spine JSON",exportImagesTitle:"單獨下載目前粒子系統使用的圖片 ZIP",organizingImages:"正在整理圖片…",exportImages:"匯出圖片 ZIP",generatingProject:"正在生成工程…",exportSpine:"匯出 .spine 包",authorize:"授權目前網站",authorizeTitle:"在本機連接器中授權目前網站",refreshConnector:"重新偵測連接器",refresh:"重新整理",recalculating:"正在重新計算粒子動畫…",exported:"已匯出 Spine {version}:{systems} 個粒子系統、{animations} 個動畫、{bones} 根骨骼{warning}",resourceWarning:";{count} 條資源提示(缺圖仍已匯出)",timeout:"重新計算動畫超時,請確認頁面仍在運行後重試",preparingProject:"正在整理圖片並調用本機 Spine…",projectExported:"已產生 {fileName}:包含 .spine 工程和 {images} 張圖片,Spine {version}",collectingImages:"正在整理目前粒子系統使用的圖片…",imagesExported:"已產生 {fileName}:{folder}/ 內包含 {images} 張圖片",connectorChecking:"正在偵測本地 Spine 連接器…",connectorOffline:"本機 Spine 連接器未啟動",spineNotFound:"連接器已啟動,但找不到 Spine",notAuthorized:"連接器已啟動,但目前網站尚未授權",connectorReady:"連接器可用 · Spine 已就緒",connectorBusy:"正在重新計算並產生 Spine 專案",connectorGenerate:"使用本機 Spine 自動產生 {version} 專案",unknown:"未知",checking:"偵測中",offline:"未啟動",notFound:"找不到 Spine",unauthorized:"未授權",projectTransferTitle:"匯出 Spine 包",projectTransferDetail:"正在重新計算粒子動畫…",projectTransferDownload:"Spine 工程包已開始下載",generatingJson:"正在生成 Spine JSON…",preparingProjectFiles:"正在整理工程圖片…",uploading:"正在上傳資料到 Spine 連接器…",spineProcessing:"Spine 正在轉換工程,請稍候…",downloadingProject:"正在下載產生的 Spine 工程包…",handingToBrowser:"正在交給瀏覽器下載…"},transfer:n3,scene:i3,modifiers:s3,spine:r3,help:o3,errors:a3,language:l3},$C=[{code:"zh-CN",label:"中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"},{code:"fr",label:"Français"},{code:"de",label:"Deutsch"},{code:"pt-BR",label:"Português"},{code:"es",label:"Español"}],BC="spine-particle.locale";function d3(i){return $C.some(e=>e.code===i)}function u3(i,e){if(d3(i))return i;for(const t of e){const n=t.toLowerCase();if(n.startsWith("zh"))return n.includes("hant")||/-(tw|hk|mo)(-|$)/.test(n)?"zh-TW":"zh-CN";if(n.startsWith("ja"))return"ja";if(n.startsWith("ko"))return"ko";if(n.startsWith("fr"))return"fr";if(n.startsWith("de"))return"de";if(n.startsWith("pt"))return"pt-BR";if(n.startsWith("es"))return"es";if(n.startsWith("en"))return"en"}return"en"}function h3(){var t;let i=null;if(typeof window<"u")try{i=localStorage.getItem(BC)}catch{}const e=typeof navigator>"u"?[]:(t=navigator.languages)!=null&&t.length?[...navigator.languages]:[navigator.language];return u3(i,e)}const UC=h3(),pc=cO({legacy:!1,locale:UC,fallbackLocale:"en",messages:{"zh-CN":UB,"zh-TW":c3,en:dN,ja:T$,ko:W$,fr:n$,de:VO,"pt-BR":vB,es:FN}});function VC(i){if(pc.global.locale.value=i,typeof window<"u")try{localStorage.setItem(BC,i)}catch{}typeof document<"u"&&(document.documentElement.lang=i,document.title=pc.global.t("app.title"))}function ke(i,e){return e?pc.global.t(i,e):pc.global.t(i)}VC(UC);const XC="SpineParticle.SystemSettings",YC=1,bp="SpineParticle.SystemSettings.v1";function xl(i,e,t,n){const s=Number(i);return Math.min(t,Math.max(e,Number.isFinite(s)?s:n))}function f3(i){return{parameterPanelOnRight:i.parameterPanelOnRight,floatingMenuEnabled:i.floatingMenuEnabled,undoLimit:i.undoLimit,showEmitter:i.showEmitter,showBones:i.showBones,bonePointDrawSize:i.bonePointDrawSize,boneAxisDrawSize:i.boneAxisDrawSize,showSkinMesh:i.showSkinMesh,tickEnabled:i.tickEnabled,axisFontSize:i.axisFontSize,tickWidth:i.tickWidth,showAxisLabels:i.showAxisLabels,unsavedChangesPrompt:i.unsavedChangesPrompt,showProjectSize:i.showProjectSize,axisColor:i.axisColor}}function p3(i,e){const t=s=>i[s]==null?!!e[s]:i[s]===!0,n=typeof i.axisColor=="string"&&/^#[0-9a-f]{6}$/i.test(i.axisColor)?i.axisColor:e.axisColor;return{parameterPanelOnRight:t("parameterPanelOnRight"),floatingMenuEnabled:t("floatingMenuEnabled"),undoLimit:Math.round(xl(i.undoLimit,1,200,e.undoLimit)),showEmitter:t("showEmitter"),showBones:t("showBones"),bonePointDrawSize:xl(i.bonePointDrawSize,.1,10,e.bonePointDrawSize),boneAxisDrawSize:xl(i.boneAxisDrawSize,.1,10,e.boneAxisDrawSize),showSkinMesh:t("showSkinMesh"),tickEnabled:t("tickEnabled"),axisFontSize:Math.round(xl(i.axisFontSize,8,40,e.axisFontSize)),tickWidth:xl(i.tickWidth,1,5,e.tickWidth),showAxisLabels:t("showAxisLabels"),unsavedChangesPrompt:t("unsavedChangesPrompt"),showProjectSize:t("showProjectSize"),axisColor:n}}function m3(i){let e;try{e=JSON.parse(i)}catch{throw new Error(ke("errors.settingsInvalidJson"))}const t=e;if(t.format!==XC)throw new Error(ke("errors.settingsFormat"));if(t.version!==YC)throw new Error(ke("errors.settingsVersion",{version:t.version??ke("export.unknown")}));if(!t.settings||typeof t.settings!="object")throw new Error(ke("errors.settingsMissing"));return t}function g3(i,e){Object.assign(i.settings,p3(e,i.settings))}let gd=null;function v3(i){gd==null||gd();try{const e=localStorage.getItem(bp);e&&g3(i,m3(e).settings)}catch{try{localStorage.removeItem(bp)}catch{}}gd=Vt(()=>f3(i.settings),e=>{const t={format:XC,version:YC,savedAt:new Date().toISOString(),settings:e};try{localStorage.setItem(bp,JSON.stringify(t))}catch{}},{deep:!0})}const b3="/images/yeomai-watermark.png";function y3(i,e=0){if(i<=0)return 1;const t=Math.pow(10,Math.floor(Math.log10(i))),n=[1,2,5,10,20,50,100];let s=1;for(const r of n)if(r*t>=i){s=r*t;break}return Math.max(s,e)}function x3(i,e,t,n,s){if(!t)return;const r=t;r.clear();const o=i.settings;if(!o.tickEnabled){for(const S of s)S.visible=!1;return}const a=0,c=0,l=e.screen.width/i.editor.viewScale,d=e.screen.height/i.editor.viewScale,u=+("0x"+o.axisColor.replace("#",""));r.lineStyle(1.5,u,.35),r.moveTo(-l,c),r.lineTo(l,c),r.moveTo(a,-d),r.lineTo(a,d);const h=i.editor.viewScale,f=y3(50/h),p=l,m=d,g=Math.max(1,o.tickWidth);if(o.tickEnabled){for(let S=0;S<=l;S+=f){const C=Math.round(S/f)*f;C!==0&&(r.lineStyle(g,u,.25),r.moveTo(C,c-4),r.lineTo(C,c+4),r.moveTo(-C,c-4),r.lineTo(-C,c+4))}for(let S=0;S<=d;S+=f)Math.round(S/f)*f!==0&&(r.lineStyle(g,u,.25),r.moveTo(a-4,S),r.lineTo(a+4,S),r.moveTo(a-4,-S),r.lineTo(a+4,-S))}const v=e.screen.width/2+i.editor.viewX,y=e.screen.height*.5+i.editor.viewY,b=o.axisFontSize,x=+("0x"+o.axisColor.replace("#",""));for(;s.length<64;){const S=new jg("",{fontFamily:"monospace",fontSize:b,fill:x});S.anchor.set(.5,.5),n.addChild(S),s.push(S)}let T=0;const E=o.showAxisLabels&&o.tickEnabled;for(let S=0;S<=l;S+=f){const C=Math.round(S/f)*f;if(C===0||!E||C>p)continue;const M=s[T++];if(!M)break;M.style.fontSize=b,M.text=String(C),M.position.set(v+C*h,y+9),M.visible=!0;const k=s[T++];if(!k)break;k.style.fontSize=b,k.text=String(-C),k.position.set(v-C*h,y+9),k.visible=!0}for(let S=0;S<=d;S+=f){const C=Math.round(S/f)*f;if(C===0||!E||C>m)continue;const M=s[T++];if(!M)break;M.style.fontSize=b,M.text=String(C),M.position.set(v+8,y-S*h),M.visible=!0;const k=s[T++];if(!k)break;k.style.fontSize=b,k.text=String(-C),k.position.set(v+8,y+S*h),k.visible=!0}for(;T<s.length;){const S=s[T++];S&&(S.visible=!1)}}function w3(i,e,t){if(!t)return;const n=t;if(n.clear(),!!i.settings.showEmitter&&i.systems.length)for(const s of i.systems){if(s.visible===!1)continue;const r=e.get(s.id),o=(r==null?void 0:r.x)??s.config.centerX??0,a=-((r==null?void 0:r.y)??s.config.centerY??0),c=i.activeObjectType==="particle"&&s.id===i.activeId,l=c?16763955:9082040,d=c?.4:.2;n.lineStyle(1,l,d),n.drawCircle(o,a,10),n.beginFill(l,c?.8:.4),n.drawCircle(o,a,3),n.endFill(),n.lineStyle(1,l,c?.3:.15),n.moveTo(o-16,a),n.lineTo(o+16,a),n.moveTo(o,a-16),n.lineTo(o,a+16)}}function S3(i,e,t){if(!t)return;const n=t;n.clear();const s=i.systems.find(y=>y.id===i.activeId);if(!s||s.visible===!1)return;const r=s.config;if(!r.showShape)return;const o=e.get(s.id),a=(o==null?void 0:o.x)??r.centerX??0,c=-((o==null?void 0:o.y)??r.centerY??0),l=r.shape;if(l==="point"||l==="path")return;const d=r.rootScaleX??1,u=r.rootScaleY??1,h=-((o==null?void 0:o.rotation)??r.rootRotation??0)*Math.PI/180,f=Math.cos(h),p=Math.sin(h),m=r.offsetX??0,g=r.offsetY??0,v=(y,b)=>{const x=y+m,T=-b-g,E=x*d,S=T*u;return[a+E*f-S*p,c+(E*p+S*f)]};if(l==="circle"){const y=mu(r.innerRadius,r.outerRadius);n.lineStyle(2,3991658,.7);const b=48;for(const x of[y.outer,y.inner])if(!(x<=0))for(let T=0;T<=b;T++){const E=T/b*Math.PI*2,[S,C]=v(Math.cos(E)*x,Math.sin(E)*x);T===0?n.moveTo(S,C):n.lineTo(S,C)}}else if(l==="rect"){const y=qS(r);n.lineStyle(2,4885759,.7);for(const[b,x]of[[y.outerW,y.outerH],[y.innerW,y.innerH]]){if(b<=0||x<=0)continue;const T=b/2,E=x/2,S=v(-T,-E),C=v(T,-E),M=v(T,E),k=v(-T,E);n.moveTo(S[0],S[1]),n.lineTo(C[0],C[1]),n.lineTo(M[0],M[1]),n.lineTo(k[0],k[1]),n.lineTo(S[0],S[1])}}else if(l==="cone"){const y=mu(r.innerRadius,r.outerRadius),b=r.coneAngle/2*Math.PI/180,x=r.coneDirection*Math.PI/180,T=v(Math.cos(x-b)*y.inner,Math.sin(x-b)*y.inner),E=v(Math.cos(x+b)*y.inner,Math.sin(x+b)*y.inner),S=v(Math.cos(x-b)*y.outer,Math.sin(x-b)*y.outer),C=v(Math.cos(x+b)*y.outer,Math.sin(x+b)*y.outer);n.lineStyle(2,3991658,.7),n.moveTo(T[0],T[1]),n.lineTo(S[0],S[1]),n.moveTo(E[0],E[1]),n.lineTo(C[0],C[1]),n.lineStyle(1,3991658,.5);const M=24;for(const k of[y.outer,y.inner])if(!(k<=0))for(let P=0;P<=M;P++){const I=x-b+2*b*P/M,[D,$]=v(Math.cos(I)*k,Math.sin(I)*k);P===0?n.moveTo(D,$):n.lineTo(D,$)}}}function C3(i,e){if(!e)return;const t=e;t.clear();const n=i.systems.find(c=>c.id===i.activeId);if((n==null?void 0:n.visible)===!1)return;const s=n==null?void 0:n.config;if(!(s!=null&&s.forceField)||!s.showForceFieldShape||s.forceRadius<=0)return;const r=s.forceCenterX,o=-s.forceCenterY,a=s.forceStrength>=0?5818367:16739194;t.lineStyle(2,a,.85),t.beginFill(a,.08),t.drawCircle(r,o,s.forceRadius),t.endFill(),t.lineStyle(1,a,.7),t.moveTo(r-9,o),t.lineTo(r+9,o),t.moveTo(r,o-9),t.lineTo(r,o+9),t.beginFill(a,.95),t.drawCircle(r,o,4),t.endFill()}function A3(i,e){if(!e)return;const t=e;t.clear();const n=i.systems.find(u=>u.id===i.activeId);if((n==null?void 0:n.visible)===!1)return;const s=n==null?void 0:n.config;if(!(s!=null&&s.vortex)||!s.showVortexShape||s.vortexRadius<=0)return;const r=s.vortexCenterX,o=-s.vortexCenterY,a=s.vortexStrength>=0?12156159:16753228;t.lineStyle(2,a,.9),t.beginFill(a,.07),t.drawCircle(r,o,s.vortexRadius),t.endFill(),t.beginFill(a,.95),t.drawCircle(r,o,4),t.endFill();const c=r+Math.min(s.vortexRadius*.65,50),l=s.vortexStrength>=0?-1:1,d=o+l*14;t.lineStyle(2,a,.9),t.moveTo(c,o+l*-8),t.lineTo(c,d),t.moveTo(c,d),t.lineTo(c-4,d-l*5),t.moveTo(c,d),t.lineTo(c+4,d-l*5)}function T3(i,e){if(!e)return;const t=e;t.clear();const n=i.systems.find(l=>l.id===i.activeId);if((n==null?void 0:n.visible)===!1)return;const s=n==null?void 0:n.config;if(!(s!=null&&s.attraction)||!s.showAttractionShape)return;const r=s.attractionCenterX,o=-s.attractionCenterY,a=Math.max(0,s.attractionRadius),c=16731487;a>0&&(t.lineStyle(2,c,.95),t.beginFill(c,.09),t.drawCircle(r,o,a),t.endFill()),t.lineStyle(1,c,.85),t.moveTo(r-10,o),t.lineTo(r+10,o),t.moveTo(r,o-10),t.lineTo(r,o+10),t.beginFill(c,1),t.drawCircle(r,o,a>0?4:6),t.endFill()}function E3(i,e,t){const n=i.rotation*Math.PI/180,s=Math.cos(n),r=Math.sin(n),o=Math.max(1e-4,Math.abs(i.scaleX??1)),a=Math.max(1e-4,Math.abs(i.scaleY??1));return{x:i.x+s*e*o-r*t*a,y:i.y+r*e*o+s*t*a}}function da(i,e,t){const n=i.rotation*Math.PI/180,s=Math.cos(n),r=Math.sin(n),o=Math.max(1e-4,Math.abs(i.scaleX??1)),a=Math.max(1e-4,Math.abs(i.scaleY??1)),c=e-i.x,l=t-i.y;return{x:(s*c+r*l)/o,y:(-r*c+s*l)/a}}function zC(i,e,t="linear"){if(!i.length)return e;const n=[...i].sort((s,r)=>s.x-r.x);if(e<=n[0].x)return n[0].y;for(let s=1;s<n.length;s++){const r=n[s-1],o=n[s];if(e<=o.x){let a=(e-r.x)/Math.max(1e-4,o.x-r.x);if(t==="bezier"){const c=r.x+(r.outX??(o.x-r.x)/3),l=o.x+(o.inX??-(o.x-r.x)/3);let d=0,u=1;for(let h=0;h<18;h++){const f=(d+u)/2;tx(r.x,c,l,o.x,f)<e?d=f:u=f}return a=(d+u)/2,tx(r.y,r.y+(r.outY??(o.y-r.y)/3),o.y+(o.inY??-(o.y-r.y)/3),o.y,a)}return r.y+(o.y-r.y)*a}}return n[n.length-1].y}function tx(i,e,t,n,s){const r=1-s;return r*r*r*i+3*r*r*s*e+3*r*s*s*t+s*s*s*n}function _3(i,e,t){var r;if(!t)return;const n=t;(r=n.parent)==null||r.addChild(n),n.clear();const s=new Map;for(const o of i.spines)o.visible===!1||!o.selectedBone||o.status!=="ready"||s.set(`${o.id}:${o.selectedBone}`,{spineId:o.id,boneName:o.selectedBone});for(const o of i.systems){if(o.visible===!1)continue;const a=o.config;if(!a.emitterFollow||a.emitterFollowMode!=="bone"||!a.emitterFollowSpineId||!a.emitterFollowBoneName)continue;const c=i.spines.find(l=>l.id===a.emitterFollowSpineId);!c||c.visible===!1||s.set(`${a.emitterFollowSpineId}:${a.emitterFollowBoneName}`,{spineId:a.emitterFollowSpineId,boneName:a.emitterFollowBoneName})}for(const o of s.values()){const a=e==null?void 0:e.getBoneWorldTransform(o.spineId,o.boneName);if(!a)continue;const c=a.x,l=-a.y;n.lineStyle(2,12881151,.95),n.beginFill(12881151,.2),n.drawCircle(c,l,8),n.endFill(),n.beginFill(15919103,1),n.drawCircle(c,l,3.5),n.endFill()}}function M3(i,e,t){if(!t)return;const n=t;if(n.clear(),!i.value)return;const s=e();if(!s)return;const r=s.x,o=-s.y,a=s.scaleX,c=s.scaleY,l=-s.rotation*Math.PI/180,d=Math.cos(l),u=Math.sin(l),h=(m,g)=>{const v=m*a,y=-g*c;return[r+v*d-y*u,o+(v*u+y*d)]},f=(m,g,v,y)=>{const b=h(m,g),x=h(v,y);n.moveTo(b[0],b[1]),n.lineTo(x[0],x[1])},p=26;if(n.lineStyle(2,3526911,.9),n.beginFill(3526911,.25),n.drawCircle(r,o,6),n.endFill(),i.value==="translate")n.lineStyle(2,3526911,.9),f(-p,0,p,0),f(0,-p,0,p),f(p-6,-4,p,0),f(p,0,p-6,4),f(-20,-4,-p,0),f(-p,0,-20,4),f(-4,p-6,0,p),f(0,p,4,p-6),f(-4,-20,0,-p),f(0,-p,4,-20);else if(i.value==="rotate"){n.lineStyle(2,3526911,.8);const m=48;for(let y=0;y<=m;y++){const b=y/m*Math.PI*2,[x,T]=h(Math.cos(b)*p,Math.sin(b)*p);y===0?n.moveTo(x,T):n.lineTo(x,T)}const[g,v]=h(0,p);n.beginFill(3526911,.95),n.drawCircle(g,v,4),n.endFill()}else if(i.value==="scale"){n.lineStyle(2,3526911,.9);const g=[[-p,-p],[p,-p],[p,p],[-p,p]].map(([v,y])=>h(v,y));n.moveTo(g[0][0],g[0][1]),n.lineTo(g[1][0],g[1][1]),n.lineTo(g[2][0],g[2][1]),n.lineTo(g[3][0],g[3][1]),n.lineTo(g[0][0],g[0][1]),n.beginFill(3526911,.9);for(const v of g)n.drawRect(v[0]-3,v[1]-3,6,6);n.endFill()}}function P3(i,e=16777215){const t=Number.parseInt(i.replace("#",""),16);return Number.isFinite(t)?t:e}function k3(i,e,t){if(!t)return;const n=t;n.clear();for(const s of e){if(s.visible===!1)continue;const r=i.activeObjectType==="collision"&&i.activeObjectId===s.id,o=s.enabled?r?16735858:13911899:5792116,a=s.rotation*Math.PI/180,c=Math.cos(a),l=Math.sin(a),d=Math.max(1e-4,Math.abs(s.scaleX??1)),u=Math.max(1e-4,Math.abs(s.scaleY??1)),h=(m,g)=>({x:s.x+c*m*d-l*g*u,y:-(s.y+l*m*d+c*g*u)});let f=[];if(s.shape==="circle"||s.shape==="ellipse"){const m=s.shape==="circle"?s.radius:s.radiusX,g=s.shape==="circle"?s.radius:s.radiusY;f=Array.from({length:49},(v,y)=>{const b=y/48*Math.PI*2;return h(Math.cos(b)*m,Math.sin(b)*g)})}else if(s.shape==="rect"){const m=s.width*.5,g=s.height*.5;f=[h(-m,-g),h(m,-g),h(m,g),h(-m,g),h(-m,-g)]}else{const m=Math.max(3,Math.min(16,Math.round(s.sides)));f=Array.from({length:m+1},(g,v)=>{const y=Math.PI*.5+v%m/m*Math.PI*2;return h(Math.cos(y)*s.width*.5,Math.sin(y)*s.height*.5)})}if(!f.length)continue;n.lineStyle(r?2.5:1.5,o,s.enabled?.95:.45),n.beginFill(o,r?.12:.055),n.moveTo(f[0].x,f[0].y);for(let m=1;m<f.length;m++)n.lineTo(f[m].x,f[m].y);n.endFill();const p=h(0,0);n.lineStyle(1,o,.8),n.moveTo(p.x-7,p.y),n.lineTo(p.x+7,p.y),n.moveTo(p.x,p.y-7),n.lineTo(p.x,p.y+7)}}function I3(i,e,t){if(!t)return;const n=t;n.clear();const s=i.activeObjectType==="particle"?i.systems.find(o=>o.id===i.activeObjectId):null,r=(s==null?void 0:s.config.shape)==="path"&&!s.config.showShape?s.config.spawnPathId:0;for(const o of i.paths){if(o.id===r||o.visible===!1||!o.enabled||!o.points.length)continue;const a=i.activeObjectType==="path"&&i.activeObjectId===o.id,c=P3(o.color,16749374),l=(f,p)=>{const m=E3(o,f,p);return{x:m.x,y:-m.y}},d=o.points[0],u=l(d.x,d.y);n.lineStyle(a?2.5:1.8,c,a?1:.75),n.moveTo(u.x,u.y);const h=o.closed?o.points.length:o.points.length-1;for(let f=0;f<h;f++){const p=o.points[f],m=o.points[(f+1)%o.points.length],g=l(p.x+p.outX,p.y+p.outY),v=l(m.x+m.inX,m.y+m.inY),y=l(m.x,m.y);n.bezierCurveTo(g.x,g.y,v.x,v.y,y.x,y.y)}a&&o.points.forEach((f,p)=>{const m=l(f.x,f.y),g=l(f.x+f.inX,f.y+f.inY),v=l(f.x+f.outX,f.y+f.outY),y=Math.hypot(f.inX,f.inY)>.01,b=Math.hypot(f.outX,f.outY)>.01;n.lineStyle(1,11121867,.65),y&&(n.moveTo(m.x,m.y),n.lineTo(g.x,g.y)),b&&(n.moveTo(m.x,m.y),n.lineTo(v.x,v.y)),y&&(n.beginFill(14015724,.95),n.drawCircle(g.x,g.y,3),n.endFill()),b&&(n.beginFill(14015724,.95),n.drawCircle(v.x,v.y,3),n.endFill()),n.beginFill(e.has(p)?16777215:c,1),n.lineStyle(1.5,e.has(p)?6126847:16777215,.95),n.drawCircle(m.x,m.y,e.has(p)?5:4),n.endFill()})}}function R3(i,e,t,n){var o;const s=Number.isFinite(e.worldX)&&Number.isFinite(e.worldY),r=Number.isFinite(e.worldRotation);i.push({boneName:e.boneName,x:s?e.worldX:e.x,y:s?-e.worldY:e.y,rotation:r?-e.worldRotation:-e.rotation,parentX:t,parentY:n}),(o=e.trailState)!=null&&o.bones.length&&e.trailState.bones.forEach(a=>{const c=Number.isFinite(a.worldX)&&Number.isFinite(a.worldY),l=Number.isFinite(a.worldRotation);i.push({boneName:a.boneName,x:c?a.worldX:a.x,y:c?-a.worldY:a.y,rotation:l?-a.worldRotation:a.rotation,parentX:t,parentY:n,trail:!0})})}function nx(i,e,t,n,s,r,o,a){const c=r*.62,l=e+n*r,d=t+s*r,u=Math.max(2.5,r*.32),h=Math.max(1.7,r*.22),f=l-n*u,p=d-s*u,m=-s,g=n;i.lineStyle(o,a,.95),i.moveTo(e-n*c,t-s*c),i.lineTo(f,p),i.lineStyle(0),i.beginFill(a,.95),i.drawPolygon([l,d,f+m*h,p+g*h,f-m*h,p-g*h]),i.endFill()}function F3(i,e,t){if(!t)return;const n=t;if(n.clear(),!e.settings.showBones)return;const s=0,r=0,o=Math.max(.25,Math.abs(e.editor.viewScale)||1),a=Math.min(10,Math.max(.1,Number(e.settings.bonePointDrawSize)||1)),c=Math.min(10,Math.max(.1,Number(e.settings.boneAxisDrawSize)||2)),l=2.5*a/o,d=4.5*c/o,u=Math.max(.65,c*.625)/o;for(const h of i){const f=h.trail?16731533:16747610;n.lineStyle(1,f,h.trail?.65:.35),n.moveTo(h.parentX??s,h.parentY??r),n.lineTo(h.x,h.y);const p=h.rotation*Math.PI/180,m=Math.cos(p),g=Math.sin(p);nx(n,h.x,h.y,m,g,d,u,15684432),nx(n,h.x,h.y,g,-m,d,u,5622123),n.beginFill(f,.9),n.drawCircle(h.x,h.y,l),n.endFill()}}function zn(i){return i.map(e=>({...e,trailState:e.trailState?{...e.trailState,bones:e.trailState.bones.map(t=>({...t}))}:void 0}))}function L3(i){const e=new Map;for(const n of i)for(const s of n)e.has(s.boneName)||e.set(s.boneName,zn([s])[0]);const t=[...e.keys()].sort((n,s)=>{const r=Number(n.replace(/^p_/,"")),o=Number(s.replace(/^p_/,""));return Number.isFinite(r)&&Number.isFinite(o)?r-o:n.localeCompare(s)});for(let n=0;n<i.length;n++){const s=new Map(i[n].map(r=>[r.boneName,r]));i[n]=t.map(r=>{const o=s.get(r);return o||{...zn([e.get(r)])[0],alpha:0,imageVisible:!1,trailState:void 0,active:!0}})}}function D3(i){i.length<2||(i[i.length-1]=zn(i[0]))}function O3(i,e){const t=Math.max(0,i.length-1),n=[];for(let s=0;s<=e;s++){const r=Math.min(t,Math.round(s/e*t));n.push(zn(i[r]||[]))}return n}function yp(i){return`${i.boneName}:${i.spawnId??"legacy"}`}function ix(i){return{...zn([i])[0],alpha:0,imageVisible:!1,trailState:void 0,active:!0}}function N3(i,e,t,n){const s=Math.min(i.length,n+1),r=i.slice(Math.max(0,i.length-s)),o=new Map;for(const l of e){if(l.imageVisible===!1||l.alpha<=0)continue;const d=yp(l),u=new Map;let h=!1;for(let f=r.length-1;f>=0;f--){const p=r[f].find(m=>yp(m)===d);if(p)h=!0,u.set(f,p);else if(h)break}o.set(d,u)}const a=Math.max(0,r.length-1),c=[];for(let l=0;l<=t;l++){const d=Math.min(a,Math.round(l/t*a));c.push(e.map(u=>{var f;if(u.imageVisible===!1||u.alpha<=0)return zn([u])[0];const h=(f=o.get(yp(u)))==null?void 0:f.get(d);return h?zn([h])[0]:ix(u)}))}return c[0]=c[0].map(ix),c[c.length-1]=zn(e),c}function sx(i,e){const t=i.length?1:0;for(let n=t;n<e.length;n++)i.push(zn(e[n]))}function rx(i,e,t,n){var v;const s=i.config,r=1/Math.max(1,t),o=s.lifeMode==="fixed"?Math.max(0,Number(s.lifeMin)||0):Math.max(0,Number(s.lifeMin)||0,Number(s.lifeMax)||0),a=Ji(s,t),c=Math.max(1,Math.ceil(o*t)),l=Math.max(1,Math.ceil(c/a.loop)),d=Math.max(0,Math.ceil(Math.max(0,Number(s.delay)||0)*t)),u=[],h=y=>{const b=y?[[]]:[];e.reset();for(let x=0;x<l;x++){x>0&&e.restartEmissionCycle();for(let T=0;T<a.loop;T++)e.update(r,"force"),y&&b.push(e.capture())}return{seam:e.capture(),warmup:b}},f=h(s.generateLoopStartAnimation),p=zn(f.seam),m=[zn(p)];e.restartEmissionCycle();for(let y=0;y<a.loop;y++)e.update(r,"force"),m.push(e.capture());L3(m),D3(m);for(let y=0;y<d;y++)u.push([]);if(s.generateLoopStartAnimation){const y=N3(f.warmup,m[0],a.start,c);for(const b of y)u.push(zn(b))}else u.push(zn(m[0]));if(sx(u,m),s.generateLoopEndAnimation){h(!1);const y=[zn(m[0])],b=Math.max(1,c+2);for(let x=0;x<b&&e.activeCount>0;x++)e.update(r,"off"),y.push(e.capture());(v=y[y.length-1])!=null&&v.length&&y.push([]),sx(u,O3(y,a.end))}const g=zn(u[u.length-1]||[]);for(u.length>n&&(u.length=n);u.length<n;)u.push(zn(g));i.frames=u,e.apply(u[0]||[])}class $3{constructor(){A(this,"container",new Mn);A(this,"entries",new Map)}getSpine(e){var t;return((t=this.entries.get(e))==null?void 0:t.spine)||null}getDrawOrder(e){var n,s;const t=(n=this.entries.get(e))==null?void 0:n.spine;try{const r=(s=t==null?void 0:t.skeleton)==null?void 0:s.drawOrder;return Array.isArray(r)?r.map(o=>{var a;return String(((a=o==null?void 0:o.data)==null?void 0:a.name)||"")}):null}catch{return null}}getSlotLocalMatrix(e,t){var o,a,c;const n=(o=this.entries.get(e))==null?void 0:o.spine,s=(c=(a=n==null?void 0:n.skeleton)==null?void 0:a.findSlot)==null?void 0:c.call(a,t),r=s==null?void 0:s.bone;return r!=null&&r.active?new zt(r.a,r.c,-r.b,-r.d,r.worldX,r.worldY):null}getSlotParentMatrix(e,t,n){const s=this.getSlotLocalMatrix(e,t);if(!s)return null;const r=-n.rotation*Math.PI/180,o=Math.cos(r),a=Math.sin(r);return new zt(o*n.scaleX,a*n.scaleX,-a*n.scaleY,o*n.scaleY,n.x,-n.y).append(s)}attachSlotObject(e,t,n,s){var o;const r=(o=this.entries.get(e))==null?void 0:o.spine;if(!(r!=null&&r.addSlotObject))return!1;try{return r.addSlotObject(t,n,{followAttachmentTimeline:s}),!0}catch{return!1}}detachSlotObject(e,t,n){var r,o;const s=(r=this.entries.get(e))==null?void 0:r.spine;try{(o=s==null?void 0:s.removeSlotObject)==null||o.call(s,t,n)}catch{}}destroyEntry(e){var t,n;try{(n=(t=e.spine)==null?void 0:t.removeSlotObjects)==null||n.call(t)}catch{}this.container.removeChild(e.root),e.root.destroy({children:!0})}sync(e,t,n){var s;for(const[r,o]of this.entries)e.some(a=>a.id===r)||(this.destroyEntry(o),this.entries.delete(r));for(const r of e){const o=QF(r.id);let a=this.entries.get(r.id);if(a&&a.assetVersion!==r.assetVersion&&!o&&(this.destroyEntry(a),this.entries.delete(r.id),a=void 0),(!a||a.assetVersion!==r.assetVersion)&&o){a&&this.destroyEntry(a);const h=new Mn,f=new o.SpineClass({skeletonData:o.skeletonData,autoUpdate:!1,darkTint:!1});o.skeletonData.defaultSkin&&f.skeleton.setSkin(o.skeletonData.defaultSkin),o.runtimeVersion==="4.3"?f.skeleton.setupPoseSlots():f.skeleton.setSlotsToSetupPose(),h.addChild(f),this.container.addChild(h),a={root:h,spine:f,runtimeVersion:o.runtimeVersion,assetVersion:r.assetVersion,animation:""},this.entries.set(r.id,a)}if(!a)continue;const c=a.root,l=a.spine,d=r.visible!==!1&&r.enabled;c.visible=d,c.renderable=d,c.position.set(r.x,-r.y),c.rotation=-r.rotation*Math.PI/180,c.scale.set(r.scaleX,r.scaleY),a.animation!==r.selectedAnimation&&(a.animation=r.selectedAnimation,a.runtimeVersion==="4.3"?l.skeleton.setupPose():l.skeleton.setToSetupPose(),l.state.clearTracks(),a.animation&&l.state.setAnimation(0,a.animation,!1));const u=a.runtimeVersion==="4.3"?l.state.getTrack(0):l.state.getCurrent(0);if(u){const h=((s=r.animations.find(p=>p.name===r.selectedAnimation))==null?void 0:s.duration)||0,f=Math.max(0,t/Math.max(1,n)-r.timeOffset);u.trackTime=h>0?Math.min(f,h):f}l.update(0)}}getBoneWorldTransform(e,t){const n=this.entries.get(e),s=n==null?void 0:n.spine.skeleton.findBone(t);if(!n||!s||!s.active)return null;const r=n.runtimeVersion==="4.3"?s.appliedPose:s,o=n.root,a=Math.cos(o.rotation),c=Math.sin(o.rotation),l=a*o.scale.x,d=-c*o.scale.y,u=c*o.scale.x,h=a*o.scale.y,f=l*r.a+d*r.c,p=l*r.b+d*r.d,m=u*r.a+h*r.c,g=u*r.b+h*r.d,v=o.position.x+l*r.worldX+d*r.worldY,y=o.position.y+u*r.worldX+h*r.worldY;return{x:v,y:-y,rotation:-Math.atan2(m,f)*180/Math.PI,scaleX:Math.max(1e-4,Math.hypot(f,m)),scaleY:Math.max(1e-4,Math.hypot(p,g))}}destroy(){for(const e of this.entries.values())this.destroyEntry(e);this.entries.clear(),this.container.removeFromParent(),this.container.destroy({children:!0})}}let jC=class{constructor(){A(this,"entries",{});A(this,"size",0)}add(e){let t=this.entries[e];return this.entries[e]=!0,t?!1:(this.size++,!0)}addAll(e){let t=this.size;for(var n=0,s=e.length;n<s;n++)this.add(e[n]);return t!=this.size}contains(e){return this.entries[e]}clear(){this.entries={},this.size=0}};var Yn;let ut=(Yn=class{constructor(e=0,t=0,n=0,s=0){A(this,"r");A(this,"g");A(this,"b");A(this,"a");this.r=e,this.g=t,this.b=n,this.a=s}set(e,t,n,s){return this.r=e,this.g=t,this.b=n,this.a=s,this.clamp()}setFromColor(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this}setFromString(e){return e=e.charAt(0)=="#"?e.substr(1):e,this.r=parseInt(e.substr(0,2),16)/255,this.g=parseInt(e.substr(2,2),16)/255,this.b=parseInt(e.substr(4,2),16)/255,this.a=e.length!=8?1:parseInt(e.substr(6,2),16)/255,this}add(e,t,n,s){return this.r+=e,this.g+=t,this.b+=n,this.a+=s,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(e,t){e.r=((t&4278190080)>>>24)/255,e.g=((t&16711680)>>>16)/255,e.b=((t&65280)>>>8)/255,e.a=(t&255)/255}static rgb888ToColor(e,t){e.r=((t&16711680)>>>16)/255,e.g=((t&65280)>>>8)/255,e.b=(t&255)/255}toRgb888(){const e=t=>("0"+(t*255).toString(16)).slice(-2);return+("0x"+e(this.r)+e(this.g)+e(this.b))}static fromString(e,t=new Yn){return t.setFromString(e)}},A(Yn,"WHITE",new Yn(1,1,1,1)),A(Yn,"RED",new Yn(1,0,0,1)),A(Yn,"GREEN",new Yn(0,1,0,1)),A(Yn,"BLUE",new Yn(0,0,1,1)),A(Yn,"MAGENTA",new Yn(1,0,1,1)),Yn);var fn;let De=(fn=class{static clamp(e,t,n){return e<t?t:e>n?n:e}static cosDeg(e){return Math.cos(e*fn.degRad)}static sinDeg(e){return Math.sin(e*fn.degRad)}static atan2Deg(e,t){return Math.atan2(e,t)*fn.degRad}static signum(e){return e>0?1:e<0?-1:0}static toInt(e){return e>0?Math.floor(e):Math.ceil(e)}static cbrt(e){let t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t}static randomTriangular(e,t){return fn.randomTriangularWith(e,t,(e+t)*.5)}static randomTriangularWith(e,t,n){let s=Math.random(),r=t-e;return s<=(n-e)/r?e+Math.sqrt(s*r*(n-e)):t-Math.sqrt((1-s)*r*(t-n))}static isPowerOfTwo(e){return e&&(e&e-1)===0}},A(fn,"PI",3.1415927),A(fn,"PI2",fn.PI*2),A(fn,"invPI2",1/fn.PI2),A(fn,"radiansToDegrees",180/fn.PI),A(fn,"radDeg",fn.radiansToDegrees),A(fn,"degreesToRadians",fn.PI/180),A(fn,"degRad",fn.degreesToRadians),fn);var qi;let Ne=(qi=class{static arrayCopy(e,t,n,s,r){for(let o=t,a=s;o<t+r;o++,a++)n[a]=e[o]}static arrayFill(e,t,n,s){for(let r=t;r<n;r++)e[r]=s}static setArraySize(e,t,n=0){let s=e.length;if(s==t)return e;if(e.length=t,s<t)for(let r=s;r<t;r++)e[r]=n;return e}static ensureArrayCapacity(e,t,n=0){return e.length>=t?e:qi.setArraySize(e,t,n)}static newArray(e,t){let n=new Array(e);for(let s=0;s<e;s++)n[s]=t;return n}static newFloatArray(e){if(qi.SUPPORTS_TYPED_ARRAYS)return new Float32Array(e);{let t=new Array(e);for(let n=0;n<t.length;n++)t[n]=0;return t}}static newShortArray(e){if(qi.SUPPORTS_TYPED_ARRAYS)return new Int16Array(e);{let t=new Array(e);for(let n=0;n<t.length;n++)t[n]=0;return t}}static toFloatArray(e){return qi.SUPPORTS_TYPED_ARRAYS?new Float32Array(e):e}static toSinglePrecision(e){return qi.SUPPORTS_TYPED_ARRAYS?Math.fround(e):e}static webkit602BugfixHelper(e,t){}static contains(e,t,n=!0){for(var s=0;s<e.length;s++)if(e[s]==t)return!0;return!1}static enumValue(e,t){return e[t[0].toUpperCase()+t.slice(1)]}},A(qi,"SUPPORTS_TYPED_ARRAYS",typeof Float32Array<"u"),qi),wu=class{constructor(e){A(this,"items",new Array);A(this,"instantiator");this.instantiator=e}obtain(){return this.items.length>0?this.items.pop():this.instantiator()}free(e){e.reset&&e.reset(),this.items.push(e)}freeAll(e){for(let t=0;t<e.length;t++)this.free(e[t])}clear(){this.items.length=0}},Su=class{constructor(e=0,t=0){A(this,"x");A(this,"y");this.x=e,this.y=t}set(e,t){return this.x=e,this.y=t,this}length(){let e=this.x,t=this.y;return Math.sqrt(e*e+t*t)}normalize(){let e=this.length();return e!=0&&(this.x/=e,this.y/=e),this}},HC=class{constructor(e){A(this,"name");if(!e)throw new Error("name cannot be null.");this.name=e}};var Ro;let xr=(Ro=class extends HC{constructor(t){super(t);A(this,"id",Ro.nextID++);A(this,"bones",null);A(this,"vertices",[]);A(this,"worldVerticesLength",0);A(this,"timelineAttachment",this)}computeWorldVertices(t,n,s,r,o,a){s=o+(s>>1)*a;let c=t.bone.skeleton,l=t.deform,d=this.vertices,u=this.bones;if(!u){l.length>0&&(d=l);let m=t.bone,g=m.worldX,v=m.worldY,y=m.a,b=m.b,x=m.c,T=m.d;for(let E=n,S=o;S<s;E+=2,S+=a){let C=d[E],M=d[E+1];r[S]=C*y+M*b+g,r[S+1]=C*x+M*T+v}return}let h=0,f=0;for(let m=0;m<n;m+=2){let g=u[h];h+=g+1,f+=g}let p=c.bones;if(l.length==0)for(let m=o,g=f*3;m<s;m+=a){let v=0,y=0,b=u[h++];for(b+=h;h<b;h++,g+=3){let x=p[u[h]],T=d[g],E=d[g+1],S=d[g+2];v+=(T*x.a+E*x.b+x.worldX)*S,y+=(T*x.c+E*x.d+x.worldY)*S}r[m]=v,r[m+1]=y}else{let m=l;for(let g=o,v=f*3,y=f<<1;g<s;g+=a){let b=0,x=0,T=u[h++];for(T+=h;h<T;h++,v+=3,y+=2){let E=p[u[h]],S=d[v]+m[y],C=d[v+1]+m[y+1],M=d[v+2];b+=(S*E.a+C*E.b+E.worldX)*M,x+=(S*E.c+C*E.d+E.worldY)*M}r[g]=b,r[g+1]=x}}}copyTo(t){this.bones?(t.bones=new Array(this.bones.length),Ne.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,this.vertices&&(t.vertices=Ne.newFloatArray(this.vertices.length),Ne.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)),t.worldVerticesLength=this.worldVerticesLength,t.timelineAttachment=this.timelineAttachment}},A(Ro,"nextID",0),Ro);var cr;let GC=(cr=class{constructor(e){A(this,"id",cr.nextID());A(this,"regions");A(this,"start",0);A(this,"digits",0);A(this,"setupIndex",0);this.regions=new Array(e)}copy(){let e=new cr(this.regions.length);return Ne.arrayCopy(this.regions,0,e.regions,0,this.regions.length),e.start=this.start,e.digits=this.digits,e.setupIndex=this.setupIndex,e}apply(e,t){let n=e.sequenceIndex;n==-1&&(n=this.setupIndex),n>=this.regions.length&&(n=this.regions.length-1);let s=this.regions[n];t.region!=s&&(t.region=s,t.updateRegion())}getPath(e,t){let n=e,s=(this.start+t).toString();for(let r=this.digits-s.length;r>0;r--)n+="0";return n+=s,n}static nextID(){return cr._nextID++}},A(cr,"_nextID",0),cr);var On;(function(i){i[i.hold=0]="hold",i[i.once=1]="once",i[i.loop=2]="loop",i[i.pingpong=3]="pingpong",i[i.onceReverse=4]="onceReverse",i[i.loopReverse=5]="loopReverse",i[i.pingpongReverse=6]="pingpongReverse"})(On||(On={}));const WC=[On.hold,On.once,On.loop,On.pingpong,On.onceReverse,On.loopReverse,On.pingpongReverse];let nv=class{constructor(e,t,n){A(this,"name");A(this,"timelines",[]);A(this,"timelineIds",new jC);A(this,"duration");if(!e)throw new Error("name cannot be null.");this.name=e,this.setTimelines(t),this.duration=n}setTimelines(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e,this.timelineIds.clear();for(var t=0;t<e.length;t++)this.timelineIds.addAll(e[t].getPropertyIds())}hasTimeline(e){for(let t=0;t<e.length;t++)if(this.timelineIds.contains(e[t]))return!0;return!1}apply(e,t,n,s,r,o,a,c){if(!e)throw new Error("skeleton cannot be null.");s&&this.duration!=0&&(n%=this.duration,t>0&&(t%=this.duration));let l=this.timelines;for(let d=0,u=l.length;d<u;d++)l[d].apply(e,t,n,r,o,a,c)}};var Se;(function(i){i[i.setup=0]="setup",i[i.first=1]="first",i[i.replace=2]="replace",i[i.add=3]="add"})(Se||(Se={}));var Gn;(function(i){i[i.mixIn=0]="mixIn",i[i.mixOut=1]="mixOut"})(Gn||(Gn={}));const pt={rotate:0,x:1,y:2,scaleX:3,scaleY:4,shearX:5,shearY:6,inherit:7,rgb:8,alpha:9,rgb2:10,attachment:11,deform:12,event:13,drawOrder:14,ikConstraint:15,transformConstraint:16,pathConstraintPosition:17,pathConstraintSpacing:18,pathConstraintMix:19,physicsConstraintInertia:20,physicsConstraintStrength:21,physicsConstraintDamping:22,physicsConstraintMass:23,physicsConstraintWind:24,physicsConstraintGravity:25,physicsConstraintMix:26,physicsConstraintReset:27,sequence:28};let nn=class{constructor(e,t){A(this,"propertyIds");A(this,"frames");this.propertyIds=t,this.frames=Ne.newFloatArray(e*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(e,t){let n=e.length;for(let s=1;s<n;s++)if(e[s]>t)return s-1;return n-1}static search(e,t,n){let s=e.length;for(let r=n;r<s;r+=n)if(e[r]>t)return r-n;return s-n}},Bs=class extends nn{constructor(t,n,s){super(t,s);A(this,"curves");this.curves=Ne.newFloatArray(t+n*18),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let n=this.getFrameCount()+t*18;if(this.curves.length>n){let s=Ne.newFloatArray(n);Ne.arrayCopy(this.curves,0,s,0,n),this.curves=s}}setBezier(t,n,s,r,o,a,c,l,d,u,h){let f=this.curves,p=this.getFrameCount()+t*18;s==0&&(f[n]=2+p);let m=(r-a*2+l)*.03,g=(o-c*2+d)*.03,v=((a-l)*3-r+u)*.006,y=((c-d)*3-o+h)*.006,b=m*2+v,x=g*2+y,T=(a-r)*.3+m+v*.16666667,E=(c-o)*.3+g+y*.16666667,S=r+T,C=o+E;for(let M=p+18;p<M;p+=2)f[p]=S,f[p+1]=C,T+=b,E+=x,b+=v,x+=y,S+=T,C+=E}getBezierValue(t,n,s,r){let o=this.curves;if(o[r]>t){let d=this.frames[n],u=this.frames[n+s];return u+(t-d)/(o[r]-d)*(o[r+1]-u)}let a=r+18;for(r+=2;r<a;r+=2)if(o[r]>=t){let d=o[r-2],u=o[r-1];return u+(t-d)/(o[r]-d)*(o[r+1]-u)}n+=this.getFrameEntries();let c=o[a-2],l=o[a-1];return l+(t-c)/(this.frames[n]-c)*(this.frames[n+s]-l)}},os=class extends Bs{constructor(e,t,n){super(e,t,[n])}getFrameEntries(){return 2}setFrame(e,t,n){e<<=1,this.frames[e]=t,this.frames[e+1]=n}getCurveValue(e){let t=this.frames,n=t.length-2;for(let r=2;r<=n;r+=2)if(t[r]>e){n=r-2;break}let s=this.curves[n>>1];switch(s){case 0:let r=t[n],o=t[n+1];return o+(e-r)/(t[n+2]-r)*(t[n+2+1]-o);case 1:return t[n+1]}return this.getBezierValue(e,n,1,s-2)}getRelativeValue(e,t,n,s,r){if(e<this.frames[0]){switch(n){case Se.setup:return r;case Se.first:return s+(r-s)*t}return s}let o=this.getCurveValue(e);switch(n){case Se.setup:return r+o*t;case Se.first:case Se.replace:o+=r-s}return s+o*t}getAbsoluteValue(e,t,n,s,r){if(e<this.frames[0]){switch(n){case Se.setup:return r;case Se.first:return s+(r-s)*t}return s}let o=this.getCurveValue(e);return n==Se.setup?r+(o-r)*t:s+(o-s)*t}getAbsoluteValue2(e,t,n,s,r,o){if(e<this.frames[0]){switch(n){case Se.setup:return r;case Se.first:return s+(r-s)*t}return s}return n==Se.setup?r+(o-r)*t:s+(o-s)*t}getScaleValue(e,t,n,s,r,o){const a=this.frames;if(e<a[0]){switch(n){case Se.setup:return o;case Se.first:return r+(o-r)*t}return r}let c=this.getCurveValue(e)*o;if(t==1)return n==Se.add?r+c-o:c;if(s==Gn.mixOut)switch(n){case Se.setup:return o+(Math.abs(c)*De.signum(o)-o)*t;case Se.first:case Se.replace:return r+(Math.abs(c)*De.signum(r)-r)*t}else{let l=0;switch(n){case Se.setup:return l=Math.abs(o)*De.signum(c),l+(c-l)*t;case Se.first:case Se.replace:return l=Math.abs(r)*De.signum(c),l+(c-l)*t}}return r+(c-o)*t}};class iv extends Bs{constructor(e,t,n,s){super(e,t,[n,s])}getFrameEntries(){return 3}setFrame(e,t,n,s){e*=3,this.frames[e]=t,this.frames[e+1]=n,this.frames[e+2]=s}}let Cu=class extends os{constructor(t,n,s){super(t,n,pt.rotate+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];l.active&&(l.rotation=this.getRelativeValue(s,o,a,l.rotation,l.data.rotation))}},qC=class extends iv{constructor(t,n,s){super(t,n,pt.x+"|"+s,pt.y+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];if(!l.active)return;let d=this.frames;if(s<d[0]){switch(a){case Se.setup:l.x=l.data.x,l.y=l.data.y;return;case Se.first:l.x+=(l.data.x-l.x)*o,l.y+=(l.data.y-l.y)*o}return}let u=0,h=0,f=nn.search(d,s,3),p=this.curves[f/3];switch(p){case 0:let m=d[f];u=d[f+1],h=d[f+2];let g=(s-m)/(d[f+3]-m);u+=(d[f+3+1]-u)*g,h+=(d[f+3+2]-h)*g;break;case 1:u=d[f+1],h=d[f+2];break;default:u=this.getBezierValue(s,f,1,p-2),h=this.getBezierValue(s,f,2,p+18-2)}switch(a){case Se.setup:l.x=l.data.x+u*o,l.y=l.data.y+h*o;break;case Se.first:case Se.replace:l.x+=(l.data.x+u-l.x)*o,l.y+=(l.data.y+h-l.y)*o;break;case Se.add:l.x+=u*o,l.y+=h*o}}},KC=class extends os{constructor(t,n,s){super(t,n,pt.x+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];l.active&&(l.x=this.getRelativeValue(s,o,a,l.x,l.data.x))}},JC=class extends os{constructor(t,n,s){super(t,n,pt.y+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];l.active&&(l.y=this.getRelativeValue(s,o,a,l.y,l.data.y))}},ZC=class extends iv{constructor(t,n,s){super(t,n,pt.scaleX+"|"+s,pt.scaleY+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];if(!l.active)return;let d=this.frames;if(s<d[0]){switch(a){case Se.setup:l.scaleX=l.data.scaleX,l.scaleY=l.data.scaleY;return;case Se.first:l.scaleX+=(l.data.scaleX-l.scaleX)*o,l.scaleY+=(l.data.scaleY-l.scaleY)*o}return}let u,h,f=nn.search(d,s,3),p=this.curves[f/3];switch(p){case 0:let m=d[f];u=d[f+1],h=d[f+2];let g=(s-m)/(d[f+3]-m);u+=(d[f+3+1]-u)*g,h+=(d[f+3+2]-h)*g;break;case 1:u=d[f+1],h=d[f+2];break;default:u=this.getBezierValue(s,f,1,p-2),h=this.getBezierValue(s,f,2,p+18-2)}if(u*=l.data.scaleX,h*=l.data.scaleY,o==1)a==Se.add?(l.scaleX+=u-l.data.scaleX,l.scaleY+=h-l.data.scaleY):(l.scaleX=u,l.scaleY=h);else{let m=0,g=0;if(c==Gn.mixOut)switch(a){case Se.setup:m=l.data.scaleX,g=l.data.scaleY,l.scaleX=m+(Math.abs(u)*De.signum(m)-m)*o,l.scaleY=g+(Math.abs(h)*De.signum(g)-g)*o;break;case Se.first:case Se.replace:m=l.scaleX,g=l.scaleY,l.scaleX=m+(Math.abs(u)*De.signum(m)-m)*o,l.scaleY=g+(Math.abs(h)*De.signum(g)-g)*o;break;case Se.add:l.scaleX+=(u-l.data.scaleX)*o,l.scaleY+=(h-l.data.scaleY)*o}else switch(a){case Se.setup:m=Math.abs(l.data.scaleX)*De.signum(u),g=Math.abs(l.data.scaleY)*De.signum(h),l.scaleX=m+(u-m)*o,l.scaleY=g+(h-g)*o;break;case Se.first:case Se.replace:m=Math.abs(l.scaleX)*De.signum(u),g=Math.abs(l.scaleY)*De.signum(h),l.scaleX=m+(u-m)*o,l.scaleY=g+(h-g)*o;break;case Se.add:l.scaleX+=(u-l.data.scaleX)*o,l.scaleY+=(h-l.data.scaleY)*o}}}},QC=class extends os{constructor(t,n,s){super(t,n,pt.scaleX+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];l.active&&(l.scaleX=this.getScaleValue(s,o,a,c,l.scaleX,l.data.scaleX))}},eA=class extends os{constructor(t,n,s){super(t,n,pt.scaleY+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];l.active&&(l.scaleY=this.getScaleValue(s,o,a,c,l.scaleY,l.data.scaleY))}},tA=class extends iv{constructor(t,n,s){super(t,n,pt.shearX+"|"+s,pt.shearY+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];if(!l.active)return;let d=this.frames;if(s<d[0]){switch(a){case Se.setup:l.shearX=l.data.shearX,l.shearY=l.data.shearY;return;case Se.first:l.shearX+=(l.data.shearX-l.shearX)*o,l.shearY+=(l.data.shearY-l.shearY)*o}return}let u=0,h=0,f=nn.search(d,s,3),p=this.curves[f/3];switch(p){case 0:let m=d[f];u=d[f+1],h=d[f+2];let g=(s-m)/(d[f+3]-m);u+=(d[f+3+1]-u)*g,h+=(d[f+3+2]-h)*g;break;case 1:u=d[f+1],h=d[f+2];break;default:u=this.getBezierValue(s,f,1,p-2),h=this.getBezierValue(s,f,2,p+18-2)}switch(a){case Se.setup:l.shearX=l.data.shearX+u*o,l.shearY=l.data.shearY+h*o;break;case Se.first:case Se.replace:l.shearX+=(l.data.shearX+u-l.shearX)*o,l.shearY+=(l.data.shearY+h-l.shearY)*o;break;case Se.add:l.shearX+=u*o,l.shearY+=h*o}}},nA=class extends os{constructor(t,n,s){super(t,n,pt.shearX+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];l.active&&(l.shearX=this.getRelativeValue(s,o,a,l.shearX,l.data.shearX))}},iA=class extends os{constructor(t,n,s){super(t,n,pt.shearY+"|"+s);A(this,"boneIndex",0);this.boneIndex=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];l.active&&(l.shearY=this.getRelativeValue(s,o,a,l.shearY,l.data.shearY))}},sA=class extends nn{constructor(t,n){super(t,[pt.inherit+"|"+n]);A(this,"boneIndex",0);this.boneIndex=n}getFrameEntries(){return 2}setFrame(t,n,s){t*=2,this.frames[t]=n,this.frames[t+1]=s}apply(t,n,s,r,o,a,c){let l=t.bones[this.boneIndex];if(!l.active)return;if(c==Gn.mixOut){a==Se.setup&&(l.inherit=l.data.inherit);return}let d=this.frames;if(s<d[0]){(a==Se.setup||a==Se.first)&&(l.inherit=l.data.inherit);return}l.inherit=this.frames[nn.search(d,s,2)+1]}},rA=class extends Bs{constructor(t,n,s){super(t,n,[pt.rgb+"|"+s,pt.alpha+"|"+s]);A(this,"slotIndex",0);this.slotIndex=s}getFrameEntries(){return 5}setFrame(t,n,s,r,o,a){t*=5,this.frames[t]=n,this.frames[t+1]=s,this.frames[t+2]=r,this.frames[t+3]=o,this.frames[t+4]=a}apply(t,n,s,r,o,a,c){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let d=this.frames,u=l.color;if(s<d[0]){let y=l.data.color;switch(a){case Se.setup:u.setFromColor(y);return;case Se.first:u.add((y.r-u.r)*o,(y.g-u.g)*o,(y.b-u.b)*o,(y.a-u.a)*o)}return}let h=0,f=0,p=0,m=0,g=nn.search(d,s,5),v=this.curves[g/5];switch(v){case 0:let y=d[g];h=d[g+1],f=d[g+2],p=d[g+3],m=d[g+4];let b=(s-y)/(d[g+5]-y);h+=(d[g+5+1]-h)*b,f+=(d[g+5+2]-f)*b,p+=(d[g+5+3]-p)*b,m+=(d[g+5+4]-m)*b;break;case 1:h=d[g+1],f=d[g+2],p=d[g+3],m=d[g+4];break;default:h=this.getBezierValue(s,g,1,v-2),f=this.getBezierValue(s,g,2,v+18-2),p=this.getBezierValue(s,g,3,v+36-2),m=this.getBezierValue(s,g,4,v+54-2)}o==1?u.set(h,f,p,m):(a==Se.setup&&u.setFromColor(l.data.color),u.add((h-u.r)*o,(f-u.g)*o,(p-u.b)*o,(m-u.a)*o))}},oA=class extends Bs{constructor(t,n,s){super(t,n,[pt.rgb+"|"+s]);A(this,"slotIndex",0);this.slotIndex=s}getFrameEntries(){return 4}setFrame(t,n,s,r,o){t<<=2,this.frames[t]=n,this.frames[t+1]=s,this.frames[t+2]=r,this.frames[t+3]=o}apply(t,n,s,r,o,a,c){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let d=this.frames,u=l.color;if(s<d[0]){let v=l.data.color;switch(a){case Se.setup:u.r=v.r,u.g=v.g,u.b=v.b;return;case Se.first:u.r+=(v.r-u.r)*o,u.g+=(v.g-u.g)*o,u.b+=(v.b-u.b)*o}return}let h=0,f=0,p=0,m=nn.search(d,s,4),g=this.curves[m>>2];switch(g){case 0:let v=d[m];h=d[m+1],f=d[m+2],p=d[m+3];let y=(s-v)/(d[m+4]-v);h+=(d[m+4+1]-h)*y,f+=(d[m+4+2]-f)*y,p+=(d[m+4+3]-p)*y;break;case 1:h=d[m+1],f=d[m+2],p=d[m+3];break;default:h=this.getBezierValue(s,m,1,g-2),f=this.getBezierValue(s,m,2,g+18-2),p=this.getBezierValue(s,m,3,g+36-2)}if(o==1)u.r=h,u.g=f,u.b=p;else{if(a==Se.setup){let v=l.data.color;u.r=v.r,u.g=v.g,u.b=v.b}u.r+=(h-u.r)*o,u.g+=(f-u.g)*o,u.b+=(p-u.b)*o}}},aA=class extends os{constructor(t,n,s){super(t,n,pt.alpha+"|"+s);A(this,"slotIndex",0);this.slotIndex=s}apply(t,n,s,r,o,a,c){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let d=l.color;if(s<this.frames[0]){let h=l.data.color;switch(a){case Se.setup:d.a=h.a;return;case Se.first:d.a+=(h.a-d.a)*o}return}let u=this.getCurveValue(s);o==1?d.a=u:(a==Se.setup&&(d.a=l.data.color.a),d.a+=(u-d.a)*o)}},lA=class extends Bs{constructor(t,n,s){super(t,n,[pt.rgb+"|"+s,pt.alpha+"|"+s,pt.rgb2+"|"+s]);A(this,"slotIndex",0);this.slotIndex=s}getFrameEntries(){return 8}setFrame(t,n,s,r,o,a,c,l,d){t<<=3,this.frames[t]=n,this.frames[t+1]=s,this.frames[t+2]=r,this.frames[t+3]=o,this.frames[t+4]=a,this.frames[t+5]=c,this.frames[t+6]=l,this.frames[t+7]=d}apply(t,n,s,r,o,a,c){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let d=this.frames,u=l.color,h=l.darkColor;if(s<d[0]){let E=l.data.color,S=l.data.darkColor;switch(a){case Se.setup:u.setFromColor(E),h.r=S.r,h.g=S.g,h.b=S.b;return;case Se.first:u.add((E.r-u.r)*o,(E.g-u.g)*o,(E.b-u.b)*o,(E.a-u.a)*o),h.r+=(S.r-h.r)*o,h.g+=(S.g-h.g)*o,h.b+=(S.b-h.b)*o}return}let f=0,p=0,m=0,g=0,v=0,y=0,b=0,x=nn.search(d,s,8),T=this.curves[x>>3];switch(T){case 0:let E=d[x];f=d[x+1],p=d[x+2],m=d[x+3],g=d[x+4],v=d[x+5],y=d[x+6],b=d[x+7];let S=(s-E)/(d[x+8]-E);f+=(d[x+8+1]-f)*S,p+=(d[x+8+2]-p)*S,m+=(d[x+8+3]-m)*S,g+=(d[x+8+4]-g)*S,v+=(d[x+8+5]-v)*S,y+=(d[x+8+6]-y)*S,b+=(d[x+8+7]-b)*S;break;case 1:f=d[x+1],p=d[x+2],m=d[x+3],g=d[x+4],v=d[x+5],y=d[x+6],b=d[x+7];break;default:f=this.getBezierValue(s,x,1,T-2),p=this.getBezierValue(s,x,2,T+18-2),m=this.getBezierValue(s,x,3,T+36-2),g=this.getBezierValue(s,x,4,T+54-2),v=this.getBezierValue(s,x,5,T+72-2),y=this.getBezierValue(s,x,6,T+90-2),b=this.getBezierValue(s,x,7,T+108-2)}if(o==1)u.set(f,p,m,g),h.r=v,h.g=y,h.b=b;else{if(a==Se.setup){u.setFromColor(l.data.color);let E=l.data.darkColor;h.r=E.r,h.g=E.g,h.b=E.b}u.add((f-u.r)*o,(p-u.g)*o,(m-u.b)*o,(g-u.a)*o),h.r+=(v-h.r)*o,h.g+=(y-h.g)*o,h.b+=(b-h.b)*o}}},cA=class extends Bs{constructor(t,n,s){super(t,n,[pt.rgb+"|"+s,pt.rgb2+"|"+s]);A(this,"slotIndex",0);this.slotIndex=s}getFrameEntries(){return 7}setFrame(t,n,s,r,o,a,c,l){t*=7,this.frames[t]=n,this.frames[t+1]=s,this.frames[t+2]=r,this.frames[t+3]=o,this.frames[t+4]=a,this.frames[t+5]=c,this.frames[t+6]=l}apply(t,n,s,r,o,a,c){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let d=this.frames,u=l.color,h=l.darkColor;if(s<d[0]){let T=l.data.color,E=l.data.darkColor;switch(a){case Se.setup:u.r=T.r,u.g=T.g,u.b=T.b,h.r=E.r,h.g=E.g,h.b=E.b;return;case Se.first:u.r+=(T.r-u.r)*o,u.g+=(T.g-u.g)*o,u.b+=(T.b-u.b)*o,h.r+=(E.r-h.r)*o,h.g+=(E.g-h.g)*o,h.b+=(E.b-h.b)*o}return}let f=0,p=0,m=0,g=0,v=0,y=0,b=nn.search(d,s,7),x=this.curves[b/7];switch(x){case 0:let T=d[b];f=d[b+1],p=d[b+2],m=d[b+3],g=d[b+4],v=d[b+5],y=d[b+6];let E=(s-T)/(d[b+7]-T);f+=(d[b+7+1]-f)*E,p+=(d[b+7+2]-p)*E,m+=(d[b+7+3]-m)*E,g+=(d[b+7+4]-g)*E,v+=(d[b+7+5]-v)*E,y+=(d[b+7+6]-y)*E;break;case 1:f=d[b+1],p=d[b+2],m=d[b+3],g=d[b+4],v=d[b+5],y=d[b+6];break;default:f=this.getBezierValue(s,b,1,x-2),p=this.getBezierValue(s,b,2,x+18-2),m=this.getBezierValue(s,b,3,x+36-2),g=this.getBezierValue(s,b,4,x+54-2),v=this.getBezierValue(s,b,5,x+72-2),y=this.getBezierValue(s,b,6,x+90-2)}if(o==1)u.r=f,u.g=p,u.b=m,h.r=g,h.g=v,h.b=y;else{if(a==Se.setup){let T=l.data.color,E=l.data.darkColor;u.r=T.r,u.g=T.g,u.b=T.b,h.r=E.r,h.g=E.g,h.b=E.b}u.r+=(f-u.r)*o,u.g+=(p-u.g)*o,u.b+=(m-u.b)*o,h.r+=(g-h.r)*o,h.g+=(v-h.g)*o,h.b+=(y-h.b)*o}}},Ta=class extends nn{constructor(t,n){super(t,[pt.attachment+"|"+n]);A(this,"slotIndex",0);A(this,"attachmentNames");this.slotIndex=n,this.attachmentNames=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,n,s){this.frames[t]=n,this.attachmentNames[t]=s}apply(t,n,s,r,o,a,c){let l=t.slots[this.slotIndex];if(l.bone.active){if(c==Gn.mixOut){a==Se.setup&&this.setAttachment(t,l,l.data.attachmentName);return}if(s<this.frames[0]){(a==Se.setup||a==Se.first)&&this.setAttachment(t,l,l.data.attachmentName);return}this.setAttachment(t,l,this.attachmentNames[nn.search1(this.frames,s)])}}setAttachment(t,n,s){n.setAttachment(s?t.getAttachment(this.slotIndex,s):null)}},dA=class extends Bs{constructor(t,n,s,r){super(t,n,[pt.deform+"|"+s+"|"+r.id]);A(this,"slotIndex",0);A(this,"attachment");A(this,"vertices");this.slotIndex=s,this.attachment=r,this.vertices=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,n,s){this.frames[t]=n,this.vertices[t]=s}setBezier(t,n,s,r,o,a,c,l,d,u,h){let f=this.curves,p=this.getFrameCount()+t*18;s==0&&(f[n]=2+p);let m=(r-a*2+l)*.03,g=d*.03-c*.06,v=((a-l)*3-r+u)*.006,y=(c-d+.33333333)*.018,b=m*2+v,x=g*2+y,T=(a-r)*.3+m+v*.16666667,E=c*.3+g+y*.16666667,S=r+T,C=E;for(let M=p+18;p<M;p+=2)f[p]=S,f[p+1]=C,T+=b,E+=x,b+=v,x+=y,S+=T,C+=E}getCurvePercent(t,n){let s=this.curves,r=s[n];switch(r){case 0:let l=this.frames[n];return(t-l)/(this.frames[n+this.getFrameEntries()]-l);case 1:return 0}if(r-=2,s[r]>t){let l=this.frames[n];return s[r+1]*(t-l)/(s[r]-l)}let o=r+18;for(r+=2;r<o;r+=2)if(s[r]>=t){let l=s[r-2],d=s[r-1];return d+(t-l)/(s[r]-l)*(s[r+1]-d)}let a=s[o-2],c=s[o-1];return c+(1-c)*(t-a)/(this.frames[n+this.getFrameEntries()]-a)}apply(t,n,s,r,o,a,c){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let d=l.getAttachment();if(!d||!(d instanceof xr)||d.timelineAttachment!=this.attachment)return;let u=l.deform;u.length==0&&(a=Se.setup);let h=this.vertices,f=h[0].length,p=this.frames;if(s<p[0]){switch(a){case Se.setup:u.length=0;return;case Se.first:if(o==1){u.length=0;return}u.length=f;let x=d;if(x.bones){o=1-o;for(var m=0;m<f;m++)u[m]*=o}else{let T=x.vertices;for(var m=0;m<f;m++)u[m]+=(T[m]-u[m])*o}}return}if(u.length=f,s>=p[p.length-1]){let x=h[p.length-1];if(o==1)if(a==Se.add){let T=d;if(T.bones)for(let E=0;E<f;E++)u[E]+=x[E];else{let E=T.vertices;for(let S=0;S<f;S++)u[S]+=x[S]-E[S]}}else Ne.arrayCopy(x,0,u,0,f);else switch(a){case Se.setup:{let E=d;if(E.bones)for(let S=0;S<f;S++)u[S]=x[S]*o;else{let S=E.vertices;for(let C=0;C<f;C++){let M=S[C];u[C]=M+(x[C]-M)*o}}break}case Se.first:case Se.replace:for(let E=0;E<f;E++)u[E]+=(x[E]-u[E])*o;break;case Se.add:let T=d;if(T.bones)for(let E=0;E<f;E++)u[E]+=x[E]*o;else{let E=T.vertices;for(let S=0;S<f;S++)u[S]+=(x[S]-E[S])*o}}return}let g=nn.search1(p,s),v=this.getCurvePercent(s,g),y=h[g],b=h[g+1];if(o==1)if(a==Se.add){let x=d;if(x.bones)for(let T=0;T<f;T++){let E=y[T];u[T]+=E+(b[T]-E)*v}else{let T=x.vertices;for(let E=0;E<f;E++){let S=y[E];u[E]+=S+(b[E]-S)*v-T[E]}}}else for(let x=0;x<f;x++){let T=y[x];u[x]=T+(b[x]-T)*v}else switch(a){case Se.setup:{let T=d;if(T.bones)for(let E=0;E<f;E++){let S=y[E];u[E]=(S+(b[E]-S)*v)*o}else{let E=T.vertices;for(let S=0;S<f;S++){let C=y[S],M=E[S];u[S]=M+(C+(b[S]-C)*v-M)*o}}break}case Se.first:case Se.replace:for(let T=0;T<f;T++){let E=y[T];u[T]+=(E+(b[T]-E)*v-u[T])*o}break;case Se.add:let x=d;if(x.bones)for(let T=0;T<f;T++){let E=y[T];u[T]+=(E+(b[T]-E)*v)*o}else{let T=x.vertices;for(let E=0;E<f;E++){let S=y[E];u[E]+=(S+(b[E]-S)*v-T[E])*o}}}}};var Fo;let sv=(Fo=class extends nn{constructor(t){super(t,Fo.propertyIds);A(this,"events");this.events=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,n){this.frames[t]=n.time,this.events[t]=n}apply(t,n,s,r,o,a,c){if(!r)return;let l=this.frames,d=this.frames.length;if(n>s)this.apply(t,n,Number.MAX_VALUE,r,o,a,c),n=-1;else if(n>=l[d-1])return;if(s<l[0])return;let u=0;if(n<l[0])u=0;else{u=nn.search1(l,n)+1;let h=l[u];for(;u>0&&l[u-1]==h;)u--}for(;u<d&&s>=l[u];u++)r.push(this.events[u])}},A(Fo,"propertyIds",[""+pt.event]),Fo);var Lo;let Ul=(Lo=class extends nn{constructor(t){super(t,Lo.propertyIds);A(this,"drawOrders");this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,n,s){this.frames[t]=n,this.drawOrders[t]=s}apply(t,n,s,r,o,a,c){if(c==Gn.mixOut){a==Se.setup&&Ne.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);return}if(s<this.frames[0]){(a==Se.setup||a==Se.first)&&Ne.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);return}let l=nn.search1(this.frames,s),d=this.drawOrders[l];if(!d)Ne.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);else{let u=t.drawOrder,h=t.slots;for(let f=0,p=d.length;f<p;f++)u[f]=h[d[f]]}}},A(Lo,"propertyIds",[""+pt.drawOrder]),Lo),uA=class extends Bs{constructor(t,n,s){super(t,n,[pt.ikConstraint+"|"+s]);A(this,"constraintIndex",0);this.constraintIndex=s}getFrameEntries(){return 6}setFrame(t,n,s,r,o,a,c){t*=6,this.frames[t]=n,this.frames[t+1]=s,this.frames[t+2]=r,this.frames[t+3]=o,this.frames[t+4]=a?1:0,this.frames[t+5]=c?1:0}apply(t,n,s,r,o,a,c){let l=t.ikConstraints[this.constraintIndex];if(!l.active)return;let d=this.frames;if(s<d[0]){switch(a){case Se.setup:l.mix=l.data.mix,l.softness=l.data.softness,l.bendDirection=l.data.bendDirection,l.compress=l.data.compress,l.stretch=l.data.stretch;return;case Se.first:l.mix+=(l.data.mix-l.mix)*o,l.softness+=(l.data.softness-l.softness)*o,l.bendDirection=l.data.bendDirection,l.compress=l.data.compress,l.stretch=l.data.stretch}return}let u=0,h=0,f=nn.search(d,s,6),p=this.curves[f/6];switch(p){case 0:let m=d[f];u=d[f+1],h=d[f+2];let g=(s-m)/(d[f+6]-m);u+=(d[f+6+1]-u)*g,h+=(d[f+6+2]-h)*g;break;case 1:u=d[f+1],h=d[f+2];break;default:u=this.getBezierValue(s,f,1,p-2),h=this.getBezierValue(s,f,2,p+18-2)}a==Se.setup?(l.mix=l.data.mix+(u-l.data.mix)*o,l.softness=l.data.softness+(h-l.data.softness)*o,c==Gn.mixOut?(l.bendDirection=l.data.bendDirection,l.compress=l.data.compress,l.stretch=l.data.stretch):(l.bendDirection=d[f+3],l.compress=d[f+4]!=0,l.stretch=d[f+5]!=0)):(l.mix+=(u-l.mix)*o,l.softness+=(h-l.softness)*o,c==Gn.mixIn&&(l.bendDirection=d[f+3],l.compress=d[f+4]!=0,l.stretch=d[f+5]!=0))}},hA=class extends Bs{constructor(t,n,s){super(t,n,[pt.transformConstraint+"|"+s]);A(this,"constraintIndex",0);this.constraintIndex=s}getFrameEntries(){return 7}setFrame(t,n,s,r,o,a,c,l){let d=this.frames;t*=7,d[t]=n,d[t+1]=s,d[t+2]=r,d[t+3]=o,d[t+4]=a,d[t+5]=c,d[t+6]=l}apply(t,n,s,r,o,a,c){let l=t.transformConstraints[this.constraintIndex];if(!l.active)return;let d=this.frames;if(s<d[0]){let b=l.data;switch(a){case Se.setup:l.mixRotate=b.mixRotate,l.mixX=b.mixX,l.mixY=b.mixY,l.mixScaleX=b.mixScaleX,l.mixScaleY=b.mixScaleY,l.mixShearY=b.mixShearY;return;case Se.first:l.mixRotate+=(b.mixRotate-l.mixRotate)*o,l.mixX+=(b.mixX-l.mixX)*o,l.mixY+=(b.mixY-l.mixY)*o,l.mixScaleX+=(b.mixScaleX-l.mixScaleX)*o,l.mixScaleY+=(b.mixScaleY-l.mixScaleY)*o,l.mixShearY+=(b.mixShearY-l.mixShearY)*o}return}let u,h,f,p,m,g,v=nn.search(d,s,7),y=this.curves[v/7];switch(y){case 0:let b=d[v];u=d[v+1],h=d[v+2],f=d[v+3],p=d[v+4],m=d[v+5],g=d[v+6];let x=(s-b)/(d[v+7]-b);u+=(d[v+7+1]-u)*x,h+=(d[v+7+2]-h)*x,f+=(d[v+7+3]-f)*x,p+=(d[v+7+4]-p)*x,m+=(d[v+7+5]-m)*x,g+=(d[v+7+6]-g)*x;break;case 1:u=d[v+1],h=d[v+2],f=d[v+3],p=d[v+4],m=d[v+5],g=d[v+6];break;default:u=this.getBezierValue(s,v,1,y-2),h=this.getBezierValue(s,v,2,y+18-2),f=this.getBezierValue(s,v,3,y+36-2),p=this.getBezierValue(s,v,4,y+54-2),m=this.getBezierValue(s,v,5,y+72-2),g=this.getBezierValue(s,v,6,y+90-2)}if(a==Se.setup){let b=l.data;l.mixRotate=b.mixRotate+(u-b.mixRotate)*o,l.mixX=b.mixX+(h-b.mixX)*o,l.mixY=b.mixY+(f-b.mixY)*o,l.mixScaleX=b.mixScaleX+(p-b.mixScaleX)*o,l.mixScaleY=b.mixScaleY+(m-b.mixScaleY)*o,l.mixShearY=b.mixShearY+(g-b.mixShearY)*o}else l.mixRotate+=(u-l.mixRotate)*o,l.mixX+=(h-l.mixX)*o,l.mixY+=(f-l.mixY)*o,l.mixScaleX+=(p-l.mixScaleX)*o,l.mixScaleY+=(m-l.mixScaleY)*o,l.mixShearY+=(g-l.mixShearY)*o}},fA=class extends os{constructor(t,n,s){super(t,n,pt.pathConstraintPosition+"|"+s);A(this,"constraintIndex",0);this.constraintIndex=s}apply(t,n,s,r,o,a,c){let l=t.pathConstraints[this.constraintIndex];l.active&&(l.position=this.getAbsoluteValue(s,o,a,l.position,l.data.position))}},pA=class extends os{constructor(t,n,s){super(t,n,pt.pathConstraintSpacing+"|"+s);A(this,"constraintIndex",0);this.constraintIndex=s}apply(t,n,s,r,o,a,c){let l=t.pathConstraints[this.constraintIndex];l.active&&(l.spacing=this.getAbsoluteValue(s,o,a,l.spacing,l.data.spacing))}},mA=class extends Bs{constructor(t,n,s){super(t,n,[pt.pathConstraintMix+"|"+s]);A(this,"constraintIndex",0);this.constraintIndex=s}getFrameEntries(){return 4}setFrame(t,n,s,r,o){let a=this.frames;t<<=2,a[t]=n,a[t+1]=s,a[t+2]=r,a[t+3]=o}apply(t,n,s,r,o,a,c){let l=t.pathConstraints[this.constraintIndex];if(!l.active)return;let d=this.frames;if(s<d[0]){switch(a){case Se.setup:l.mixRotate=l.data.mixRotate,l.mixX=l.data.mixX,l.mixY=l.data.mixY;return;case Se.first:l.mixRotate+=(l.data.mixRotate-l.mixRotate)*o,l.mixX+=(l.data.mixX-l.mixX)*o,l.mixY+=(l.data.mixY-l.mixY)*o}return}let u,h,f,p=nn.search(d,s,4),m=this.curves[p>>2];switch(m){case 0:let g=d[p];u=d[p+1],h=d[p+2],f=d[p+3];let v=(s-g)/(d[p+4]-g);u+=(d[p+4+1]-u)*v,h+=(d[p+4+2]-h)*v,f+=(d[p+4+3]-f)*v;break;case 1:u=d[p+1],h=d[p+2],f=d[p+3];break;default:u=this.getBezierValue(s,p,1,m-2),h=this.getBezierValue(s,p,2,m+18-2),f=this.getBezierValue(s,p,3,m+36-2)}if(a==Se.setup){let g=l.data;l.mixRotate=g.mixRotate+(u-g.mixRotate)*o,l.mixX=g.mixX+(h-g.mixX)*o,l.mixY=g.mixY+(f-g.mixY)*o}else l.mixRotate+=(u-l.mixRotate)*o,l.mixX+=(h-l.mixX)*o,l.mixY+=(f-l.mixY)*o}},Qo=class extends os{constructor(t,n,s,r){super(t,n,r+"|"+s);A(this,"constraintIndex",0);this.constraintIndex=s}apply(t,n,s,r,o,a,c){let l;if(this.constraintIndex==-1){const d=s>=this.frames[0]?this.getCurveValue(s):0;for(const u of t.physicsConstraints)u.active&&this.global(u.data)&&this.set(u,this.getAbsoluteValue2(s,o,a,this.get(u),this.setup(u),d))}else l=t.physicsConstraints[this.constraintIndex],l.active&&this.set(l,this.getAbsoluteValue(s,o,a,this.get(l),this.setup(l)))}},gA=class extends Qo{constructor(e,t,n){super(e,t,n,pt.physicsConstraintInertia)}setup(e){return e.data.inertia}get(e){return e.inertia}set(e,t){e.inertia=t}global(e){return e.inertiaGlobal}},vA=class extends Qo{constructor(e,t,n){super(e,t,n,pt.physicsConstraintStrength)}setup(e){return e.data.strength}get(e){return e.strength}set(e,t){e.strength=t}global(e){return e.strengthGlobal}},bA=class extends Qo{constructor(e,t,n){super(e,t,n,pt.physicsConstraintDamping)}setup(e){return e.data.damping}get(e){return e.damping}set(e,t){e.damping=t}global(e){return e.dampingGlobal}},yA=class extends Qo{constructor(e,t,n){super(e,t,n,pt.physicsConstraintMass)}setup(e){return 1/e.data.massInverse}get(e){return 1/e.massInverse}set(e,t){e.massInverse=1/t}global(e){return e.massGlobal}},xA=class extends Qo{constructor(e,t,n){super(e,t,n,pt.physicsConstraintWind)}setup(e){return e.data.wind}get(e){return e.wind}set(e,t){e.wind=t}global(e){return e.windGlobal}},wA=class extends Qo{constructor(e,t,n){super(e,t,n,pt.physicsConstraintGravity)}setup(e){return e.data.gravity}get(e){return e.gravity}set(e,t){e.gravity=t}global(e){return e.gravityGlobal}},SA=class extends Qo{constructor(e,t,n){super(e,t,n,pt.physicsConstraintMix)}setup(e){return e.data.mix}get(e){return e.mix}set(e,t){e.mix=t}global(e){return e.mixGlobal}};var Do;let CA=(Do=class extends nn{constructor(t,n){super(t,Do.propertyIds);A(this,"constraintIndex");this.constraintIndex=n}getFrameCount(){return this.frames.length}setFrame(t,n){this.frames[t]=n}apply(t,n,s,r,o,a,c){let l;if(this.constraintIndex!=-1&&(l=t.physicsConstraints[this.constraintIndex],!l.active))return;const d=this.frames;if(n>s)this.apply(t,n,Number.MAX_VALUE,[],o,a,c),n=-1;else if(n>=d[d.length-1])return;if(!(s<d[0])&&(n<d[0]||s>=d[nn.search1(d,n)+1]))if(l!=null)l.reset();else for(const u of t.physicsConstraints)u.active&&u.reset()}},A(Do,"propertyIds",[pt.physicsConstraintReset.toString()]),Do);var ni;let AA=(ni=class extends nn{constructor(t,n,s){super(t,[pt.sequence+"|"+n+"|"+s.sequence.id]);A(this,"slotIndex");A(this,"attachment");this.slotIndex=n,this.attachment=s}getFrameEntries(){return ni.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,n,s,r,o){let a=this.frames;t*=ni.ENTRIES,a[t]=n,a[t+ni.MODE]=s|r<<4,a[t+ni.DELAY]=o}apply(t,n,s,r,o,a,c){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let d=l.attachment,u=this.attachment;if(d!=u&&(!(d instanceof xr)||d.timelineAttachment!=u))return;if(c==Gn.mixOut){a==Se.setup&&(l.sequenceIndex=-1);return}let h=this.frames;if(s<h[0]){(a==Se.setup||a==Se.first)&&(l.sequenceIndex=-1);return}let f=nn.search(h,s,ni.ENTRIES),p=h[f],m=h[f+ni.MODE],g=h[f+ni.DELAY];if(!this.attachment.sequence)return;let v=m>>4,y=this.attachment.sequence.regions.length,b=WC[m&15];if(b!=On.hold)switch(v+=(s-p)/g+1e-5|0,b){case On.once:v=Math.min(y-1,v);break;case On.loop:v%=y;break;case On.pingpong:{let x=(y<<1)-2;v=x==0?0:v%x,v>=y&&(v=x-v);break}case On.onceReverse:v=Math.max(y-1-v,0);break;case On.loopReverse:v=y-1-v%y;break;case On.pingpongReverse:{let x=(y<<1)-2;v=x==0?0:(v+y-1)%x,v>=y&&(v=x-v)}}l.sequenceIndex=v}},A(ni,"ENTRIES",3),A(ni,"MODE",1),A(ni,"DELAY",2),ni);var dr;let B3=(dr=class{constructor(e){A(this,"data");A(this,"tracks",new Array);A(this,"timeScale",1);A(this,"unkeyedState",0);A(this,"events",new Array);A(this,"listeners",new Array);A(this,"queue",new V3(this));A(this,"propertyIDs",new jC);A(this,"animationsChanged",!1);A(this,"trackEntryPool",new wu(()=>new U3));this.data=e}static emptyAnimation(){return dr._emptyAnimation}update(e){e*=this.timeScale;let t=this.tracks;for(let n=0,s=t.length;n<s;n++){let r=t[n];if(!r)continue;r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;let o=e*r.timeScale;if(r.delay>0){if(r.delay-=o,r.delay>0)continue;o=-r.delay,r.delay=0}let a=r.next;if(a){let c=r.trackLast-a.delay;if(c>=0){for(a.delay=0,a.trackTime+=r.timeScale==0?0:(c/r.timeScale+e)*a.timeScale,r.trackTime+=o,this.setCurrent(n,a,!0);a.mixingFrom;)a.mixTime+=e,a=a.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){t[n]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,e)){let c=r.mixingFrom;for(r.mixingFrom=null,c&&(c.mixingTo=null);c;)this.queue.end(c),c=c.mixingFrom}r.trackTime+=o}this.queue.drain()}updateMixingFrom(e,t){let n=e.mixingFrom;if(!n)return!0;let s=this.updateMixingFrom(n,t);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.nextTrackLast!=-1&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),s):(n.trackTime+=t*n.timeScale,e.mixTime+=t,!1)}apply(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let t=this.events,n=this.tracks,s=!1;for(let h=0,f=n.length;h<f;h++){let p=n[h];if(!p||p.delay>0)continue;s=!0;let m=h==0?Se.first:p.mixBlend,g=p.alpha;p.mixingFrom?g*=this.applyMixingFrom(p,e,m):p.trackTime>=p.trackEnd&&!p.next&&(g=0);let v=g>=p.alphaAttachmentThreshold,y=p.animationLast,b=p.getAnimationTime(),x=b,T=t;p.reverse&&(x=p.animation.duration-x,T=null);let E=p.animation.timelines,S=E.length;if(h==0&&g==1||m==Se.add){h==0&&(v=!0);for(let C=0;C<S;C++){var r=E[C];r instanceof Ta?this.applyAttachmentTimeline(r,e,x,m,v):r.apply(e,y,x,T,g,m,Gn.mixIn)}}else{let C=p.timelineMode,M=p.shortestRotation,k=!M&&p.timelinesRotation.length!=S<<1;k&&(p.timelinesRotation.length=S<<1);for(let P=0;P<S;P++){let I=E[P],D=C[P]==xp?m:Se.setup;!M&&I instanceof Cu?this.applyRotateTimeline(I,e,x,g,D,p.timelinesRotation,P<<1,k):I instanceof Ta?this.applyAttachmentTimeline(I,e,x,m,v):I.apply(e,y,x,T,g,D,Gn.mixIn)}}this.queueEvents(p,b),t.length=0,p.nextAnimationLast=b,p.nextTrackLast=p.trackTime}for(var o=this.unkeyedState+lx,a=e.slots,c=0,l=e.slots.length;c<l;c++){var d=a[c];if(d.attachmentState==o){var u=d.data.attachmentName;d.setAttachment(u?e.getAttachment(d.data.index,u):null)}}return this.unkeyedState+=2,this.queue.drain(),s}applyMixingFrom(e,t,n){let s=e.mixingFrom;s.mixingFrom&&this.applyMixingFrom(s,t,n);let r=0;e.mixDuration==0?(r=1,n==Se.first&&(n=Se.setup)):(r=e.mixTime/e.mixDuration,r>1&&(r=1),n!=Se.first&&(n=s.mixBlend));let o=r<s.mixAttachmentThreshold,a=r<s.mixDrawOrderThreshold,c=s.animation.timelines,l=c.length,d=s.alpha*e.interruptAlpha,u=d*(1-r),h=s.animationLast,f=s.getAnimationTime(),p=f,m=null;if(s.reverse?p=s.animation.duration-p:r<s.eventThreshold&&(m=this.events),n==Se.add)for(let g=0;g<l;g++)c[g].apply(t,h,p,m,u,n,Gn.mixOut);else{let g=s.timelineMode,v=s.timelineHoldMix,y=s.shortestRotation,b=!y&&s.timelinesRotation.length!=l<<1;b&&(s.timelinesRotation.length=l<<1),s.totalAlpha=0;for(let x=0;x<l;x++){let T=c[x],E=Gn.mixOut,S,C=0;switch(g[x]){case xp:if(!a&&T instanceof Ul)continue;S=n,C=u;break;case ox:S=Se.setup,C=u;break;case ax:S=n,C=d;break;case wp:S=Se.setup,C=d;break;default:S=Se.setup;let M=v[x];C=d*Math.max(0,1-M.mixTime/M.mixDuration);break}s.totalAlpha+=C,!y&&T instanceof Cu?this.applyRotateTimeline(T,t,p,C,S,s.timelinesRotation,x<<1,b):T instanceof Ta?this.applyAttachmentTimeline(T,t,p,S,o&&C>=s.alphaAttachmentThreshold):(a&&T instanceof Ul&&S==Se.setup&&(E=Gn.mixIn),T.apply(t,h,p,m,C,S,E))}}return e.mixDuration>0&&this.queueEvents(s,f),this.events.length=0,s.nextAnimationLast=f,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(e,t,n,s,r){var o=t.slots[e.slotIndex];o.bone.active&&(n<e.frames[0]?(s==Se.setup||s==Se.first)&&this.setAttachment(t,o,o.data.attachmentName,r):this.setAttachment(t,o,e.attachmentNames[nn.search1(e.frames,n)],r),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+lx))}setAttachment(e,t,n,s){t.setAttachment(n?e.getAttachment(t.data.index,n):null),s&&(t.attachmentState=this.unkeyedState+Y3)}applyRotateTimeline(e,t,n,s,r,o,a,c){if(c&&(o[a]=0),s==1){e.apply(t,0,n,null,1,r,Gn.mixIn);return}let l=t.bones[e.boneIndex];if(!l.active)return;let d=e.frames,u=0,h=0;if(n<d[0])switch(r){case Se.setup:l.rotation=l.data.rotation;default:return;case Se.first:u=l.rotation,h=l.data.rotation}else u=r==Se.setup?l.data.rotation:l.rotation,h=l.data.rotation+e.getCurveValue(n);let f=0,p=h-u;if(p-=Math.ceil(p/360-.5)*360,p==0)f=o[a];else{let m=0,g=0;c?(m=0,g=p):(m=o[a],g=o[a+1]);let v=m-m%360;f=p+v;let y=p>=0,b=m>=0;Math.abs(g)<=90&&De.signum(g)!=De.signum(p)&&(Math.abs(m-v)>180?(f+=360*De.signum(m),b=y):v!=0?f-=360*De.signum(m):b=y),b!=y&&(f+=360*De.signum(m)),o[a]=f}o[a+1]=p,l.rotation=u+f*s}queueEvents(e,t){let n=e.animationStart,s=e.animationEnd,r=s-n,o=e.trackLast%r,a=this.events,c=0,l=a.length;for(;c<l;c++){let u=a[c];if(u.time<o)break;u.time>s||this.queue.event(e,u)}let d=!1;if(e.loop)if(r==0)d=!0;else{const u=Math.floor(e.trackTime/r);d=u>0&&u>Math.floor(e.trackLast/r)}else d=t>=s&&e.animationLast<s;for(d&&this.queue.complete(e);c<l;c++){let u=a[c];u.time<n||this.queue.event(e,u)}}clearTracks(){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let t=0,n=this.tracks.length;t<n;t++)this.clearTrack(t);this.tracks.length=0,this.queue.drainDisabled=e,this.queue.drain()}clearTrack(e){if(e>=this.tracks.length)return;let t=this.tracks[e];if(!t)return;this.queue.end(t),this.clearNext(t);let n=t;for(;;){let s=n.mixingFrom;if(!s)break;this.queue.end(s),n.mixingFrom=null,n.mixingTo=null,n=s}this.tracks[t.trackIndex]=null,this.queue.drain()}setCurrent(e,t,n){let s=this.expandToIndex(e);this.tracks[e]=t,t.previous=null,s&&(n&&this.queue.interrupt(s),t.mixingFrom=s,s.mixingTo=t,t.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(t.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(t)}setAnimation(e,t,n=!1){let s=this.data.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);return this.setAnimationWith(e,s,n)}setAnimationWith(e,t,n=!1){if(!t)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(e);r&&(r.nextTrackLast==-1?(this.tracks[e]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let o=this.trackEntry(e,t,n,r);return this.setCurrent(e,o,s),this.queue.drain(),o}addAnimation(e,t,n=!1,s=0){let r=this.data.skeletonData.findAnimation(t);if(!r)throw new Error("Animation not found: "+t);return this.addAnimationWith(e,r,n,s)}addAnimationWith(e,t,n=!1,s=0){if(!t)throw new Error("animation cannot be null.");let r=this.expandToIndex(e);if(r)for(;r.next;)r=r.next;let o=this.trackEntry(e,t,n,r);return r?(r.next=o,o.previous=r,s<=0&&(s=Math.max(s+r.getTrackComplete()-o.mixDuration,0))):(this.setCurrent(e,o,!0),this.queue.drain(),s<0&&(s=0)),o.delay=s,o}setEmptyAnimation(e,t=0){let n=this.setAnimationWith(e,dr.emptyAnimation(),!1);return n.mixDuration=t,n.trackEnd=t,n}addEmptyAnimation(e,t=0,n=0){let s=this.addAnimationWith(e,dr.emptyAnimation(),!1,n);return n<=0&&(s.delay=Math.max(s.delay+s.mixDuration-t,0)),s.mixDuration=t,s.trackEnd=t,s}setEmptyAnimations(e=0){let t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let n=0,s=this.tracks.length;n<s;n++){let r=this.tracks[n];r&&this.setEmptyAnimation(r.trackIndex,e)}this.queue.drainDisabled=t,this.queue.drain()}expandToIndex(e){return e<this.tracks.length?this.tracks[e]:(Ne.ensureArrayCapacity(this.tracks,e+1,null),this.tracks.length=e+1,null)}trackEntry(e,t,n,s){let r=this.trackEntryPool.obtain();return r.reset(),r.trackIndex=e,r.animation=t,r.loop=n,r.holdPrevious=!1,r.reverse=!1,r.shortestRotation=!1,r.eventThreshold=0,r.alphaAttachmentThreshold=0,r.mixAttachmentThreshold=0,r.mixDrawOrderThreshold=0,r.animationStart=0,r.animationEnd=t.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.mixTime=0,r.mixDuration=s?this.data.getMix(s.animation,t):0,r.interruptAlpha=1,r.totalAlpha=0,r.mixBlend=Se.replace,r}clearNext(e){let t=e.next;for(;t;)this.queue.dispose(t),t=t.next;e.next=null}_animationsChanged(){this.animationsChanged=!1,this.propertyIDs.clear();let e=this.tracks;for(let t=0,n=e.length;t<n;t++){let s=e[t];if(s){for(;s.mixingFrom;)s=s.mixingFrom;do(!s.mixingTo||s.mixBlend!=Se.add)&&this.computeHold(s),s=s.mixingTo;while(s)}}}computeHold(e){let t=e.mixingTo,n=e.animation.timelines,s=e.animation.timelines.length,r=e.timelineMode;r.length=s;let o=e.timelineHoldMix;o.length=0;let a=this.propertyIDs;if(t&&t.holdPrevious){for(let c=0;c<s;c++)r[c]=a.addAll(n[c].getPropertyIds())?wp:ax;return}e:for(let c=0;c<s;c++){let l=n[c],d=l.getPropertyIds();if(!a.addAll(d))r[c]=xp;else if(!t||l instanceof Ta||l instanceof Ul||l instanceof sv||!t.animation.hasTimeline(d))r[c]=ox;else{for(let u=t.mixingTo;u;u=u.mixingTo)if(!u.animation.hasTimeline(d)){if(e.mixDuration>0){r[c]=X3,o[c]=u;continue e}break}r[c]=wp}}}getCurrent(e){return e>=this.tracks.length?null:this.tracks[e]}addListener(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)}removeListener(e){let t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},A(dr,"_emptyAnimation",new nv("<empty>",[],0)),dr),U3=class{constructor(){A(this,"animation",null);A(this,"previous",null);A(this,"next",null);A(this,"mixingFrom",null);A(this,"mixingTo",null);A(this,"listener",null);A(this,"trackIndex",0);A(this,"loop",!1);A(this,"holdPrevious",!1);A(this,"reverse",!1);A(this,"shortestRotation",!1);A(this,"eventThreshold",0);A(this,"mixAttachmentThreshold",0);A(this,"alphaAttachmentThreshold",0);A(this,"mixDrawOrderThreshold",0);A(this,"animationStart",0);A(this,"animationEnd",0);A(this,"animationLast",0);A(this,"nextAnimationLast",0);A(this,"delay",0);A(this,"trackTime",0);A(this,"trackLast",0);A(this,"nextTrackLast",0);A(this,"trackEnd",0);A(this,"timeScale",0);A(this,"alpha",0);A(this,"mixTime",0);A(this,"_mixDuration",0);A(this,"interruptAlpha",0);A(this,"totalAlpha",0);A(this,"mixBlend",Se.replace);A(this,"timelineMode",new Array);A(this,"timelineHoldMix",new Array);A(this,"timelinesRotation",new Array)}get mixDuration(){return this._mixDuration}set mixDuration(e){this._mixDuration=e}setMixDurationWithDelay(e,t){this._mixDuration=e,t<=0&&(this.previous!=null?t=Math.max(t+this.previous.getTrackComplete()-e,0):t=0),this.delay=t}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(e){this.animationLast=e,this.nextAnimationLast=e}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let e=this.animationEnd-this.animationStart;if(e!=0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime<e)return e}return this.trackTime}wasApplied(){return this.nextTrackLast!=-1}isNextReady(){return this.next!=null&&this.nextTrackLast-this.next.delay>=0}},V3=class{constructor(e){A(this,"objects",[]);A(this,"drainDisabled",!1);A(this,"animState");this.animState=e}start(e){this.objects.push(ci.start),this.objects.push(e),this.animState.animationsChanged=!0}interrupt(e){this.objects.push(ci.interrupt),this.objects.push(e)}end(e){this.objects.push(ci.end),this.objects.push(e),this.animState.animationsChanged=!0}dispose(e){this.objects.push(ci.dispose),this.objects.push(e)}complete(e){this.objects.push(ci.complete),this.objects.push(e)}event(e,t){this.objects.push(ci.event),this.objects.push(e),this.objects.push(t)}drain(){if(this.drainDisabled)return;this.drainDisabled=!0;let e=this.objects;for(let t=0;t<e.length;t+=2){let n=e[t],s=e[t+1],r=this.animState.listeners.slice();switch(n){case ci.start:s.listener&&s.listener.start&&s.listener.start(s);for(let a=0;a<r.length;a++){let c=r[a];c.start&&c.start(s)}break;case ci.interrupt:s.listener&&s.listener.interrupt&&s.listener.interrupt(s);for(let a=0;a<r.length;a++){let c=r[a];c.interrupt&&c.interrupt(s)}break;case ci.end:s.listener&&s.listener.end&&s.listener.end(s);for(let a=0;a<r.length;a++){let c=r[a];c.end&&c.end(s)}case ci.dispose:s.listener&&s.listener.dispose&&s.listener.dispose(s);for(let a=0;a<r.length;a++){let c=r[a];c.dispose&&c.dispose(s)}this.animState.trackEntryPool.free(s);break;case ci.complete:s.listener&&s.listener.complete&&s.listener.complete(s);for(let a=0;a<r.length;a++){let c=r[a];c.complete&&c.complete(s)}break;case ci.event:let o=e[t+++2];s.listener&&s.listener.event&&s.listener.event(s,o);for(let a=0;a<r.length;a++){let c=r[a];c.event&&c.event(s,o)}break}}this.clear(),this.drainDisabled=!1}clear(){this.objects.length=0}};var ci;(function(i){i[i.start=0]="start",i[i.interrupt=1]="interrupt",i[i.end=2]="end",i[i.dispose=3]="dispose",i[i.complete=4]="complete",i[i.event=5]="event"})(ci||(ci={}));const xp=0,ox=1,ax=2,wp=3,X3=4,lx=1,Y3=2;class z3{constructor(e){A(this,"skeletonData");A(this,"animationToMixTime",{});A(this,"defaultMix",0);if(!e)throw new Error("skeletonData cannot be null.");this.skeletonData=e}setMix(e,t,n){let s=this.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);let r=this.skeletonData.findAnimation(t);if(!r)throw new Error("Animation not found: "+t);this.setMixWith(s,r,n)}setMixWith(e,t,n){if(!e)throw new Error("from cannot be null.");if(!t)throw new Error("to cannot be null.");let s=e.name+"."+t.name;this.animationToMixTime[s]=n}getMix(e,t){let n=e.name+"."+t.name,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}let TA=class EA extends xr{constructor(t){super(t);A(this,"color",new ut(1,1,1,1))}copy(){let t=new EA(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Ba=class _A extends xr{constructor(t){super(t);A(this,"endSlot",null);A(this,"color",new ut(.2275,.2275,.8078,1))}copy(){let t=new _A(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},j3=class{constructor(e){A(this,"_image");this._image=e}getImage(){return this._image}};var kn;(function(i){i[i.Nearest=9728]="Nearest",i[i.Linear=9729]="Linear",i[i.MipMap=9987]="MipMap",i[i.MipMapNearestNearest=9984]="MipMapNearestNearest",i[i.MipMapLinearNearest=9985]="MipMapLinearNearest",i[i.MipMapNearestLinear=9986]="MipMapNearestLinear",i[i.MipMapLinearLinear=9987]="MipMapLinearLinear"})(kn||(kn={}));var pr;(function(i){i[i.MirroredRepeat=33648]="MirroredRepeat",i[i.ClampToEdge=33071]="ClampToEdge",i[i.Repeat=10497]="Repeat"})(pr||(pr={}));let H3=class{constructor(){A(this,"texture");A(this,"u",0);A(this,"v",0);A(this,"u2",0);A(this,"v2",0);A(this,"width",0);A(this,"height",0);A(this,"degrees",0);A(this,"offsetX",0);A(this,"offsetY",0);A(this,"originalWidth",0);A(this,"originalHeight",0)}},MA=class{constructor(e){A(this,"pages",new Array);A(this,"regions",new Array);let t=new G3(e),n=new Array(4),s={};s.size=d=>{d.width=parseInt(n[1]),d.height=parseInt(n[2])},s.format=()=>{},s.filter=d=>{d.minFilter=Ne.enumValue(kn,n[1]),d.magFilter=Ne.enumValue(kn,n[2])},s.repeat=d=>{n[1].indexOf("x")!=-1&&(d.uWrap=pr.Repeat),n[1].indexOf("y")!=-1&&(d.vWrap=pr.Repeat)},s.pma=d=>{d.pma=n[1]=="true"};var r={};r.xy=d=>{d.x=parseInt(n[1]),d.y=parseInt(n[2])},r.size=d=>{d.width=parseInt(n[1]),d.height=parseInt(n[2])},r.bounds=d=>{d.x=parseInt(n[1]),d.y=parseInt(n[2]),d.width=parseInt(n[3]),d.height=parseInt(n[4])},r.offset=d=>{d.offsetX=parseInt(n[1]),d.offsetY=parseInt(n[2])},r.orig=d=>{d.originalWidth=parseInt(n[1]),d.originalHeight=parseInt(n[2])},r.offsets=d=>{d.offsetX=parseInt(n[1]),d.offsetY=parseInt(n[2]),d.originalWidth=parseInt(n[3]),d.originalHeight=parseInt(n[4])},r.rotate=d=>{let u=n[1];u=="true"?d.degrees=90:u!="false"&&(d.degrees=parseInt(u))},r.index=d=>{d.index=parseInt(n[1])};let o=t.readLine();for(;o&&o.trim().length==0;)o=t.readLine();for(;!(!o||o.trim().length==0||t.readEntry(n,o)==0);)o=t.readLine();let a=null,c=null,l=null;for(;o!==null;)if(o.trim().length==0)a=null,o=t.readLine();else if(a){let d=new PA(a,o);for(;;){let u=t.readEntry(n,o=t.readLine());if(u==0)break;let h=r[n[0]];if(h)h(d);else{c||(c=[]),l||(l=[]),c.push(n[0]);let f=[];for(let p=0;p<u;p++)f.push(parseInt(n[p+1]));l.push(f)}}d.originalWidth==0&&d.originalHeight==0&&(d.originalWidth=d.width,d.originalHeight=d.height),c&&c.length>0&&l&&l.length>0&&(d.names=c,d.values=l,c=null,l=null),d.u=d.x/a.width,d.v=d.y/a.height,d.degrees==90?(d.u2=(d.x+d.height)/a.width,d.v2=(d.y+d.width)/a.height):(d.u2=(d.x+d.width)/a.width,d.v2=(d.y+d.height)/a.height),this.regions.push(d)}else{for(a=new W3(o.trim());t.readEntry(n,o=t.readLine())!=0;){let d=s[n[0]];d&&d(a)}this.pages.push(a)}}findRegion(e){for(let t=0;t<this.regions.length;t++)if(this.regions[t].name==e)return this.regions[t];return null}setTextures(e,t=""){for(let n of this.pages)n.setTexture(e.get(t+n.name))}dispose(){var e;for(let t=0;t<this.pages.length;t++)(e=this.pages[t].texture)==null||e.dispose()}},G3=class{constructor(e){A(this,"lines");A(this,"index",0);this.lines=e.split(/\r\n|\r|\n/)}readLine(){return this.index>=this.lines.length?null:this.lines[this.index++]}readEntry(e,t){if(!t||(t=t.trim(),t.length==0))return 0;let n=t.indexOf(":");if(n==-1)return 0;e[0]=t.substr(0,n).trim();for(let s=1,r=n+1;;s++){let o=t.indexOf(",",r);if(o==-1)return e[s]=t.substr(r).trim(),s;if(e[s]=t.substr(r,o-r).trim(),r=o+1,s==4)return 4}}},W3=class{constructor(e){A(this,"name");A(this,"minFilter",kn.Nearest);A(this,"magFilter",kn.Nearest);A(this,"uWrap",pr.ClampToEdge);A(this,"vWrap",pr.ClampToEdge);A(this,"texture",null);A(this,"width",0);A(this,"height",0);A(this,"pma",!1);A(this,"regions",new Array);this.name=e}setTexture(e){this.texture=e,e.setFilters(this.minFilter,this.magFilter),e.setWraps(this.uWrap,this.vWrap);for(let t of this.regions)t.texture=e}},PA=class extends H3{constructor(t,n){super();A(this,"page");A(this,"name");A(this,"x",0);A(this,"y",0);A(this,"offsetX",0);A(this,"offsetY",0);A(this,"originalWidth",0);A(this,"originalHeight",0);A(this,"index",0);A(this,"degrees",0);A(this,"names",null);A(this,"values",null);this.page=t,this.name=n,t.regions.push(this)}},_c=class $m extends xr{constructor(t,n){super(t);A(this,"region",null);A(this,"path");A(this,"regionUVs",[]);A(this,"uvs",[]);A(this,"triangles",[]);A(this,"color",new ut(1,1,1,1));A(this,"width",0);A(this,"height",0);A(this,"hullLength",0);A(this,"edges",[]);A(this,"parentMesh",null);A(this,"sequence",null);A(this,"tempColor",new ut(0,0,0,0));this.path=n}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;(!this.uvs||this.uvs.length!=t.length)&&(this.uvs=Ne.newFloatArray(t.length));let n=this.uvs,s=this.uvs.length,r=this.region.u,o=this.region.v,a=0,c=0;if(this.region instanceof PA){let l=this.region,d=l.page,u=d.width,h=d.height;switch(l.degrees){case 90:r-=(l.originalHeight-l.offsetY-l.height)/u,o-=(l.originalWidth-l.offsetX-l.width)/h,a=l.originalHeight/u,c=l.originalWidth/h;for(let f=0;f<s;f+=2)n[f]=r+t[f+1]*a,n[f+1]=o+(1-t[f])*c;return;case 180:r-=(l.originalWidth-l.offsetX-l.width)/u,o-=l.offsetY/h,a=l.originalWidth/u,c=l.originalHeight/h;for(let f=0;f<s;f+=2)n[f]=r+(1-t[f])*a,n[f+1]=o+(1-t[f+1])*c;return;case 270:r-=l.offsetY/u,o-=l.offsetX/h,a=l.originalHeight/u,c=l.originalWidth/h;for(let f=0;f<s;f+=2)n[f]=r+(1-t[f+1])*a,n[f+1]=o+t[f]*c;return}r-=l.offsetX/u,o-=(l.originalHeight-l.offsetY-l.height)/h,a=l.originalWidth/u,c=l.originalHeight/h}else this.region?(a=this.region.u2-r,c=this.region.v2-o):(r=o=0,a=c=1);for(let l=0;l<s;l+=2)n[l]=r+t[l]*a,n[l+1]=o+t[l+1]*c}getParentMesh(){return this.parentMesh}setParentMesh(t){this.parentMesh=t,t&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength)}copy(){if(this.parentMesh)return this.newLinkedMesh();let t=new $m(this.name,this.path);return t.region=this.region,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),Ne.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=this.uvs instanceof Float32Array?Ne.newFloatArray(this.uvs.length):new Array(this.uvs.length),Ne.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),Ne.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,t.sequence=this.sequence!=null?this.sequence.copy():null,this.edges&&(t.edges=new Array(this.edges.length),Ne.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t}computeWorldVertices(t,n,s,r,o,a){this.sequence!=null&&this.sequence.apply(t,this),super.computeWorldVertices(t,n,s,r,o,a)}newLinkedMesh(){let t=new $m(this.name,this.path);return t.region=this.region,t.color.setFromColor(this.color),t.timelineAttachment=this.timelineAttachment,t.setParentMesh(this.parentMesh?this.parentMesh:this),t.region!=null&&t.updateRegion(),t}},mc=class kA extends xr{constructor(t){super(t);A(this,"lengths",[]);A(this,"closed",!1);A(this,"constantSpeed",!1);A(this,"color",new ut(1,1,1,1))}copy(){let t=new kA(this.name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),Ne.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t}},IA=class RA extends xr{constructor(t){super(t);A(this,"x",0);A(this,"y",0);A(this,"rotation",0);A(this,"color",new ut(.38,.94,0,1))}computeWorldPosition(t,n){return n.x=this.x*t.a+this.y*t.b+t.worldX,n.y=this.x*t.c+this.y*t.d+t.worldY,n}computeWorldRotation(t){const n=this.rotation*De.degRad,s=Math.cos(n),r=Math.sin(n),o=s*t.a+r*t.b,a=s*t.c+r*t.d;return De.atan2Deg(a,o)}copy(){let t=new RA(this.name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t}};var gt;let yh=(gt=class extends HC{constructor(t,n){super(t);A(this,"x",0);A(this,"y",0);A(this,"scaleX",1);A(this,"scaleY",1);A(this,"rotation",0);A(this,"width",0);A(this,"height",0);A(this,"color",new ut(1,1,1,1));A(this,"path");A(this,"region",null);A(this,"sequence",null);A(this,"offset",Ne.newFloatArray(8));A(this,"uvs",Ne.newFloatArray(8));A(this,"tempColor",new ut(1,1,1,1));this.path=n}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.region,n=this.uvs;if(t==null){n[0]=0,n[1]=0,n[2]=0,n[3]=1,n[4]=1,n[5]=1,n[6]=1,n[7]=0;return}let s=this.width/this.region.originalWidth*this.scaleX,r=this.height/this.region.originalHeight*this.scaleY,o=-this.width/2*this.scaleX+this.region.offsetX*s,a=-this.height/2*this.scaleY+this.region.offsetY*r,c=o+this.region.width*s,l=a+this.region.height*r,d=this.rotation*De.degRad,u=Math.cos(d),h=Math.sin(d),f=this.x,p=this.y,m=o*u+f,g=o*h,v=a*u+p,y=a*h,b=c*u+f,x=c*h,T=l*u+p,E=l*h,S=this.offset;S[0]=m-y,S[1]=v+g,S[2]=m-E,S[3]=T+g,S[4]=b-E,S[5]=T+x,S[6]=b-y,S[7]=v+x,t.degrees==90?(n[0]=t.u2,n[1]=t.v2,n[2]=t.u,n[3]=t.v2,n[4]=t.u,n[5]=t.v,n[6]=t.u2,n[7]=t.v):(n[0]=t.u,n[1]=t.v2,n[2]=t.u,n[3]=t.v,n[4]=t.u2,n[5]=t.v,n[6]=t.u2,n[7]=t.v2)}computeWorldVertices(t,n,s,r){this.sequence!=null&&this.sequence.apply(t,this);let o=t.bone,a=this.offset,c=o.worldX,l=o.worldY,d=o.a,u=o.b,h=o.c,f=o.d,p=0,m=0;p=a[0],m=a[1],n[s]=p*d+m*u+c,n[s+1]=p*h+m*f+l,s+=r,p=a[2],m=a[3],n[s]=p*d+m*u+c,n[s+1]=p*h+m*f+l,s+=r,p=a[4],m=a[5],n[s]=p*d+m*u+c,n[s+1]=p*h+m*f+l,s+=r,p=a[6],m=a[7],n[s]=p*d+m*u+c,n[s+1]=p*h+m*f+l}copy(){let t=new gt(this.name,this.path);return t.region=this.region,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,Ne.arrayCopy(this.uvs,0,t.uvs,0,8),Ne.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t.sequence=this.sequence!=null?this.sequence.copy():null,t}},A(gt,"X1",0),A(gt,"Y1",1),A(gt,"C1R",2),A(gt,"C1G",3),A(gt,"C1B",4),A(gt,"C1A",5),A(gt,"U1",6),A(gt,"V1",7),A(gt,"X2",8),A(gt,"Y2",9),A(gt,"C2R",10),A(gt,"C2G",11),A(gt,"C2B",12),A(gt,"C2A",13),A(gt,"U2",14),A(gt,"V2",15),A(gt,"X3",16),A(gt,"Y3",17),A(gt,"C3R",18),A(gt,"C3G",19),A(gt,"C3B",20),A(gt,"C3A",21),A(gt,"U3",22),A(gt,"V3",23),A(gt,"X4",24),A(gt,"Y4",25),A(gt,"C4R",26),A(gt,"C4G",27),A(gt,"C4B",28),A(gt,"C4A",29),A(gt,"U4",30),A(gt,"V4",31),gt);class Bm{constructor(e){A(this,"atlas");this.atlas=e}loadSequence(e,t,n){let s=n.regions;for(let r=0,o=s.length;r<o;r++){let a=n.getPath(t,r),c=this.atlas.findRegion(a);if(c==null)throw new Error("Region not found in atlas: "+a+" (sequence: "+e+")");s[r]=c}}newRegionAttachment(e,t,n,s){let r=new yh(t,n);if(s!=null)this.loadSequence(t,n,s);else{let o=this.atlas.findRegion(n);if(!o)throw new Error("Region not found in atlas: "+n+" (region attachment: "+t+")");r.region=o}return r}newMeshAttachment(e,t,n,s){let r=new _c(t,n);if(s!=null)this.loadSequence(t,n,s);else{let o=this.atlas.findRegion(n);if(!o)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+t+")");r.region=o}return r}newBoundingBoxAttachment(e,t){return new TA(t)}newPathAttachment(e,t){return new mc(t)}newPointAttachment(e,t){return new IA(t)}newClippingAttachment(e,t){return new Ba(t)}}let FA=class{constructor(e,t,n){A(this,"index",0);A(this,"name");A(this,"parent",null);A(this,"length",0);A(this,"x",0);A(this,"y",0);A(this,"rotation",0);A(this,"scaleX",1);A(this,"scaleY",1);A(this,"shearX",0);A(this,"shearY",0);A(this,"inherit",ln.Normal);A(this,"skinRequired",!1);A(this,"color",new ut);A(this,"icon");A(this,"visible",!1);if(e<0)throw new Error("index must be >= 0.");if(!t)throw new Error("name cannot be null.");this.index=e,this.name=t,this.parent=n}};var ln;(function(i){i[i.Normal=0]="Normal",i[i.OnlyTranslation=1]="OnlyTranslation",i[i.NoRotationOrReflection=2]="NoRotationOrReflection",i[i.NoScale=3]="NoScale",i[i.NoScaleOrReflection=4]="NoScaleOrReflection"})(ln||(ln={}));let cx=class{constructor(e,t,n){A(this,"data");A(this,"skeleton");A(this,"parent",null);A(this,"children",new Array);A(this,"x",0);A(this,"y",0);A(this,"rotation",0);A(this,"scaleX",0);A(this,"scaleY",0);A(this,"shearX",0);A(this,"shearY",0);A(this,"ax",0);A(this,"ay",0);A(this,"arotation",0);A(this,"ascaleX",0);A(this,"ascaleY",0);A(this,"ashearX",0);A(this,"ashearY",0);A(this,"a",0);A(this,"b",0);A(this,"c",0);A(this,"d",0);A(this,"worldY",0);A(this,"worldX",0);A(this,"inherit",ln.Normal);A(this,"sorted",!1);A(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.skeleton=t,this.parent=n,this.setToSetupPose()}isActive(){return this.active}update(e){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(e,t,n,s,r,o,a){this.ax=e,this.ay=t,this.arotation=n,this.ascaleX=s,this.ascaleY=r,this.ashearX=o,this.ashearY=a;let c=this.parent;if(!c){let f=this.skeleton;const p=f.scaleX,m=f.scaleY,g=(n+o)*De.degRad,v=(n+90+a)*De.degRad;this.a=Math.cos(g)*s*p,this.b=Math.cos(v)*r*p,this.c=Math.sin(g)*s*m,this.d=Math.sin(v)*r*m,this.worldX=e*p+f.x,this.worldY=t*m+f.y;return}let l=c.a,d=c.b,u=c.c,h=c.d;switch(this.worldX=l*e+d*t+c.worldX,this.worldY=u*e+h*t+c.worldY,this.inherit){case ln.Normal:{const f=(n+o)*De.degRad,p=(n+90+a)*De.degRad,m=Math.cos(f)*s,g=Math.cos(p)*r,v=Math.sin(f)*s,y=Math.sin(p)*r;this.a=l*m+d*v,this.b=l*g+d*y,this.c=u*m+h*v,this.d=u*g+h*y;return}case ln.OnlyTranslation:{const f=(n+o)*De.degRad,p=(n+90+a)*De.degRad;this.a=Math.cos(f)*s,this.b=Math.cos(p)*r,this.c=Math.sin(f)*s,this.d=Math.sin(p)*r;break}case ln.NoRotationOrReflection:{let f=1/this.skeleton.scaleX,p=1/this.skeleton.scaleY;l*=f,u*=p;let m=l*l+u*u,g=0;m>1e-4?(m=Math.abs(l*h*p-d*f*u)/m,d=u*m,h=l*m,g=Math.atan2(u,l)*De.radDeg):(l=0,u=0,g=90-Math.atan2(h,d)*De.radDeg);const v=(n+o-g)*De.degRad,y=(n+a-g+90)*De.degRad,b=Math.cos(v)*s,x=Math.cos(y)*r,T=Math.sin(v)*s,E=Math.sin(y)*r;this.a=l*b-d*T,this.b=l*x-d*E,this.c=u*b+h*T,this.d=u*x+h*E;break}case ln.NoScale:case ln.NoScaleOrReflection:{n*=De.degRad;const f=Math.cos(n),p=Math.sin(n);let m=(l*f+d*p)/this.skeleton.scaleX,g=(u*f+h*p)/this.skeleton.scaleY,v=Math.sqrt(m*m+g*g);v>1e-5&&(v=1/v),m*=v,g*=v,v=Math.sqrt(m*m+g*g),this.inherit==ln.NoScale&&l*h-d*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(v=-v),n=Math.PI/2+Math.atan2(g,m);const y=Math.cos(n)*v,b=Math.sin(n)*v;o*=De.degRad,a=(90+a)*De.degRad;const x=Math.cos(o)*s,T=Math.cos(a)*r,E=Math.sin(o)*s,S=Math.sin(a)*r;this.a=m*x+y*E,this.b=m*T+y*S,this.c=g*x+b*E,this.d=g*T+b*S;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY,this.inherit=e.inherit}updateAppliedTransform(){let e=this.parent;if(!e){this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*De.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*De.radDeg;return}let t=e.a,n=e.b,s=e.c,r=e.d,o=1/(t*r-n*s),a=r*o,c=n*o,l=s*o,d=t*o,u=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=u*a-h*c,this.ay=h*d-u*l;let f,p,m,g;if(this.inherit==ln.OnlyTranslation)f=this.a,p=this.b,m=this.c,g=this.d;else{switch(this.inherit){case ln.NoRotationOrReflection:{let T=Math.abs(t*r-n*s)/(t*t+s*s);n=-s*this.skeleton.scaleX*T/this.skeleton.scaleY,r=t*this.skeleton.scaleY*T/this.skeleton.scaleX,o=1/(t*r-n*s),a=r*o,c=n*o;break}case ln.NoScale:case ln.NoScaleOrReflection:let v=De.cosDeg(this.rotation),y=De.sinDeg(this.rotation);t=(t*v+n*y)/this.skeleton.scaleX,s=(s*v+r*y)/this.skeleton.scaleY;let b=Math.sqrt(t*t+s*s);b>1e-5&&(b=1/b),t*=b,s*=b,b=Math.sqrt(t*t+s*s),this.inherit==ln.NoScale&&o<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(b=-b);let x=De.PI/2+Math.atan2(s,t);n=Math.cos(x)*b,r=Math.sin(x)*b,o=1/(t*r-n*s),a=r*o,c=n*o,l=s*o,d=t*o}f=a*this.a-c*this.c,p=a*this.b-c*this.d,m=d*this.c-l*this.a,g=d*this.d-l*this.b}if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let v=f*g-p*m;this.ascaleY=v/this.ascaleX,this.ashearY=-Math.atan2(f*p+m*g,v)*De.radDeg,this.arotation=Math.atan2(m,f)*De.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*De.radDeg}getWorldRotationX(){return Math.atan2(this.c,this.a)*De.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*De.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}worldToLocal(e){let t=1/(this.a*this.d-this.b*this.c),n=e.x-this.worldX,s=e.y-this.worldY;return e.x=n*this.d*t-s*this.b*t,e.y=s*this.a*t-n*this.c*t,e}localToWorld(e){let t=e.x,n=e.y;return e.x=t*this.a+n*this.b+this.worldX,e.y=t*this.c+n*this.d+this.worldY,e}worldToParent(e){if(e==null)throw new Error("world cannot be null.");return this.parent==null?e:this.parent.worldToLocal(e)}parentToWorld(e){if(e==null)throw new Error("world cannot be null.");return this.parent==null?e:this.parent.localToWorld(e)}worldToLocalRotation(e){let t=De.sinDeg(e),n=De.cosDeg(e);return Math.atan2(this.a*t-this.c*n,this.d*n-this.b*t)*De.radDeg+this.rotation-this.shearX}localToWorldRotation(e){e-=this.rotation-this.shearX;let t=De.sinDeg(e),n=De.cosDeg(e);return Math.atan2(n*this.c+t*this.d,n*this.a+t*this.b)*De.radDeg}rotateWorld(e){e*=De.degRad;const t=Math.sin(e),n=Math.cos(e),s=this.a,r=this.b;this.a=n*s-t*this.c,this.b=n*r-t*this.d,this.c=t*s+n*this.c,this.d=t*r+n*this.d}},xh=class{constructor(e,t,n){A(this,"name");A(this,"order");A(this,"skinRequired");this.name=e,this.order=t,this.skinRequired=n}},LA=class{constructor(e,t){A(this,"data");A(this,"intValue",0);A(this,"floatValue",0);A(this,"stringValue",null);A(this,"time",0);A(this,"volume",0);A(this,"balance",0);if(!t)throw new Error("data cannot be null.");this.time=e,this.data=t}},DA=class{constructor(e){A(this,"name");A(this,"intValue",0);A(this,"floatValue",0);A(this,"stringValue",null);A(this,"audioPath",null);A(this,"volume",0);A(this,"balance",0);this.name=e}},q3=class{constructor(e,t){A(this,"data");A(this,"bones");A(this,"target");A(this,"bendDirection",0);A(this,"compress",!1);A(this,"stretch",!1);A(this,"mix",1);A(this,"softness",0);A(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let s=0;s<e.bones.length;s++){let r=t.findBone(e.bones[s].name);if(!r)throw new Error(`Couldn't find bone ${e.bones[s].name}`);this.bones.push(r)}let n=t.findBone(e.target.name);if(!n)throw new Error(`Couldn't find bone ${e.target.name}`);this.target=n,this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch}isActive(){return this.active}setToSetupPose(){const e=this.data;this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch}update(e){if(this.mix==0)return;let t=this.target,n=this.bones;switch(n.length){case 1:this.apply1(n[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(n[0],n[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.data.uniform,this.softness,this.mix);break}}apply1(e,t,n,s,r,o,a){let c=e.parent;if(!c)throw new Error("IK bone must have parent.");let l=c.a,d=c.b,u=c.c,h=c.d,f=-e.ashearX-e.arotation,p=0,m=0;switch(e.inherit){case ln.OnlyTranslation:p=(t-e.worldX)*De.signum(e.skeleton.scaleX),m=(n-e.worldY)*De.signum(e.skeleton.scaleY);break;case ln.NoRotationOrReflection:let y=Math.abs(l*h-d*u)/Math.max(1e-4,l*l+u*u),b=l/e.skeleton.scaleX,x=u/e.skeleton.scaleY;d=-x*y*e.skeleton.scaleX,h=b*y*e.skeleton.scaleY,f+=Math.atan2(x,b)*De.radDeg;default:let T=t-c.worldX,E=n-c.worldY,S=l*h-d*u;Math.abs(S)<=1e-4?(p=0,m=0):(p=(T*h-E*d)/S-e.ax,m=(E*l-T*u)/S-e.ay)}f+=Math.atan2(m,p)*De.radDeg,e.ascaleX<0&&(f+=180),f>180?f-=360:f<-180&&(f+=360);let g=e.ascaleX,v=e.ascaleY;if(s||r){switch(e.inherit){case ln.NoScale:case ln.NoScaleOrReflection:p=t-e.worldX,m=n-e.worldY}const y=e.data.length*g;if(y>1e-4){const b=p*p+m*m;if(s&&b<y*y||r&&b>y*y){const x=(Math.sqrt(b)/y-1)*a+1;g*=x,o&&(v*=x)}}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+f*a,g,v,e.ashearX,e.ashearY)}apply2(e,t,n,s,r,o,a,c,l){if(e.inherit!=ln.Normal||t.inherit!=ln.Normal)return;let d=e.ax,u=e.ay,h=e.ascaleX,f=e.ascaleY,p=h,m=f,g=t.ascaleX,v=0,y=0,b=0;h<0?(h=-h,v=180,b=-1):(v=0,b=1),f<0&&(f=-f,b=-b),g<0?(g=-g,y=180):y=0;let x=t.ax,T=0,E=0,S=0,C=e.a,M=e.b,k=e.c,P=e.d,I=Math.abs(h-f)<=1e-4;!I||o?(T=0,E=C*x+e.worldX,S=k*x+e.worldY):(T=t.ay,E=C*x+M*T+e.worldX,S=k*x+P*T+e.worldY);let D=e.parent;if(!D)throw new Error("IK parent must itself have a parent.");C=D.a,M=D.b,k=D.c,P=D.d;let $=C*P-M*k,j=E-D.worldX,B=S-D.worldY;$=Math.abs($)<=1e-4?0:1/$;let Y=(j*P-B*M)*$-d,U=(B*C-j*k)*$-u,O=Math.sqrt(Y*Y+U*U),L=t.data.length*g,R,X;if(O<1e-4){this.apply1(e,n,s,!1,o,!1,l),t.updateWorldTransformWith(x,T,0,t.ascaleX,t.ascaleY,t.ashearX,t.ashearY);return}j=n-D.worldX,B=s-D.worldY;let z=(j*P-B*M)*$-d,K=(B*C-j*k)*$-u,Z=z*z+K*K;if(c!=0){c*=h*(g+1)*.5;let ve=Math.sqrt(Z),we=ve-O-L*h+c;if(we>0){let re=Math.min(1,we/(c*2))-1;re=(we-c*(1-re*re))/ve,z-=re*z,K-=re*K,Z=z*z+K*K}}e:if(I){L*=h;let ve=(Z-O*O-L*L)/(2*O*L);ve<-1?(ve=-1,X=Math.PI*r):ve>1?(ve=1,X=0,o&&(C=(Math.sqrt(Z)/(O+L)-1)*l+1,p*=C,a&&(m*=C))):X=Math.acos(ve)*r,C=O+L*ve,M=L*Math.sin(X),R=Math.atan2(K*C-z*M,z*C+K*M)}else{C=h*L,M=f*L;let ve=C*C,we=M*M,re=Math.atan2(K,z);k=we*O*O+ve*Z-ve*we;let Ee=-2*we*O,q=we-ve;if(P=Ee*Ee-4*q*k,P>=0){let ee=Math.sqrt(P);Ee<0&&(ee=-ee),ee=-(Ee+ee)*.5;let be=ee/q,ye=k/ee,he=Math.abs(be)<Math.abs(ye)?be:ye;if(be=Z-he*he,be>=0){B=Math.sqrt(be)*r,R=re-Math.atan2(B,he),X=Math.atan2(B/f,(he-O)/h);break e}}let J=De.PI,ie=O-C,se=ie*ie,H=0,G=0,N=O+C,V=N*N,W=0;k=-C*O/(ve-we),k>=-1&&k<=1&&(k=Math.acos(k),j=C*Math.cos(k)+O,B=M*Math.sin(k),P=j*j+B*B,P<se&&(J=k,se=P,ie=j,H=B),P>V&&(G=k,V=P,N=j,W=B)),Z<=(se+V)*.5?(R=re-Math.atan2(H*r,ie),X=J*r):(R=re-Math.atan2(W*r,N),X=G*r)}let ae=Math.atan2(T,x)*b,ce=e.arotation;R=(R-ae)*De.radDeg+v-ce,R>180?R-=360:R<-180&&(R+=360),e.updateWorldTransformWith(d,u,ce+R*l,p,m,0,0),ce=t.arotation,X=((X+ae)*De.radDeg-t.ashearX)*b+y-ce,X>180?X-=360:X<-180&&(X+=360),t.updateWorldTransformWith(x,T,ce+X*l,t.ascaleX,t.ascaleY,t.ashearX,t.ashearY)}},OA=class extends xh{constructor(t){super(t,0,!1);A(this,"bones",new Array);A(this,"_target",null);A(this,"bendDirection",0);A(this,"compress",!1);A(this,"stretch",!1);A(this,"uniform",!1);A(this,"mix",0);A(this,"softness",0)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},NA=class extends xh{constructor(t){super(t,0,!1);A(this,"bones",new Array);A(this,"_target",null);A(this,"positionMode",Ds.Fixed);A(this,"spacingMode",Tn.Fixed);A(this,"rotateMode",Xo.Chain);A(this,"offsetRotation",0);A(this,"position",0);A(this,"spacing",0);A(this,"mixRotate",0);A(this,"mixX",0);A(this,"mixY",0)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}};var Ds;(function(i){i[i.Fixed=0]="Fixed",i[i.Percent=1]="Percent"})(Ds||(Ds={}));var Tn;(function(i){i[i.Length=0]="Length",i[i.Fixed=1]="Fixed",i[i.Percent=2]="Percent",i[i.Proportional=3]="Proportional"})(Tn||(Tn={}));var Xo;(function(i){i[i.Tangent=0]="Tangent",i[i.Chain=1]="Chain",i[i.ChainScale=2]="ChainScale"})(Xo||(Xo={}));var jn;let K3=(jn=class{constructor(e,t){A(this,"data");A(this,"bones");A(this,"target");A(this,"position",0);A(this,"spacing",0);A(this,"mixRotate",0);A(this,"mixX",0);A(this,"mixY",0);A(this,"spaces",new Array);A(this,"positions",new Array);A(this,"world",new Array);A(this,"curves",new Array);A(this,"lengths",new Array);A(this,"segments",new Array);A(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let s=0,r=e.bones.length;s<r;s++){let o=t.findBone(e.bones[s].name);if(!o)throw new Error(`Couldn't find bone ${e.bones[s].name}.`);this.bones.push(o)}let n=t.findSlot(e.target.name);if(!n)throw new Error(`Couldn't find target bone ${e.target.name}`);this.target=n,this.position=e.position,this.spacing=e.spacing,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY}isActive(){return this.active}setToSetupPose(){const e=this.data;this.position=e.position,this.spacing=e.spacing,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY}update(e){let t=this.target.getAttachment();if(!(t instanceof mc))return;let n=this.mixRotate,s=this.mixX,r=this.mixY;if(n==0&&s==0&&r==0)return;let o=this.data,a=o.rotateMode==Xo.Tangent,c=o.rotateMode==Xo.ChainScale,l=this.bones,d=l.length,u=a?d:d+1,h=Ne.setArraySize(this.spaces,u),f=c?this.lengths=Ne.setArraySize(this.lengths,d):[],p=this.spacing;switch(o.spacingMode){case Tn.Percent:if(c)for(let E=0,S=u-1;E<S;E++){let C=l[E],M=C.data.length,k=M*C.a,P=M*C.c;f[E]=Math.sqrt(k*k+P*P)}Ne.arrayFill(h,1,u,p);break;case Tn.Proportional:let x=0;for(let E=0,S=u-1;E<S;){let C=l[E],M=C.data.length;if(M<jn.epsilon)c&&(f[E]=0),h[++E]=p;else{let k=M*C.a,P=M*C.c,I=Math.sqrt(k*k+P*P);c&&(f[E]=I),h[++E]=I,x+=I}}if(x>0){x=u/x*p;for(let E=1;E<u;E++)h[E]*=x}break;default:let T=o.spacingMode==Tn.Length;for(let E=0,S=u-1;E<S;){let C=l[E],M=C.data.length;if(M<jn.epsilon)c&&(f[E]=0),h[++E]=p;else{let k=M*C.a,P=M*C.c,I=Math.sqrt(k*k+P*P);c&&(f[E]=I),h[++E]=(T?M+p:p)*I/M}}}let m=this.computeWorldPositions(t,u,a),g=m[0],v=m[1],y=o.offsetRotation,b=!1;if(y==0)b=o.rotateMode==Xo.Chain;else{b=!1;let x=this.target.bone;y*=x.a*x.d-x.b*x.c>0?De.degRad:-.01745329277777778}for(let x=0,T=3;x<d;x++,T+=3){let E=l[x];E.worldX+=(g-E.worldX)*s,E.worldY+=(v-E.worldY)*r;let S=m[T],C=m[T+1],M=S-g,k=C-v;if(c){let P=f[x];if(P!=0){let I=(Math.sqrt(M*M+k*k)/P-1)*n+1;E.a*=I,E.c*=I}}if(g=S,v=C,n>0){let P=E.a,I=E.b,D=E.c,$=E.d,j=0,B=0,Y=0;if(a?j=m[T-1]:h[x+1]==0?j=m[T+2]:j=Math.atan2(k,M),j-=Math.atan2(D,P),b){B=Math.cos(j),Y=Math.sin(j);let U=E.data.length;g+=(U*(B*P-Y*D)-M)*n,v+=(U*(Y*P+B*D)-k)*n}else j+=y;j>De.PI?j-=De.PI2:j<-3.1415927&&(j+=De.PI2),j*=n,B=Math.cos(j),Y=Math.sin(j),E.a=B*P-Y*D,E.b=B*I-Y*$,E.c=Y*P+B*D,E.d=Y*I+B*$}E.updateAppliedTransform()}}computeWorldPositions(e,t,n){let s=this.target,r=this.position,o=this.spaces,a=Ne.setArraySize(this.positions,t*3+2),c=this.world,l=e.closed,d=e.worldVerticesLength,u=d/6,h=jn.NONE;if(!e.constantSpeed){let U=e.lengths;u-=l?1:2;let O=U[u];this.data.positionMode==Ds.Percent&&(r*=O);let L;switch(this.data.spacingMode){case Tn.Percent:L=O;break;case Tn.Proportional:L=O/t;break;default:L=1}c=Ne.setArraySize(this.world,8);for(let R=0,X=0,z=0;R<t;R++,X+=3){let K=o[R]*L;r+=K;let Z=r;if(l)Z%=O,Z<0&&(Z+=O),z=0;else if(Z<0){h!=jn.BEFORE&&(h=jn.BEFORE,e.computeWorldVertices(s,2,4,c,0,2)),this.addBeforePosition(Z,c,0,a,X);continue}else if(Z>O){h!=jn.AFTER&&(h=jn.AFTER,e.computeWorldVertices(s,d-6,4,c,0,2)),this.addAfterPosition(Z-O,c,0,a,X);continue}for(;;z++){let ae=U[z];if(!(Z>ae)){if(z==0)Z/=ae;else{let ce=U[z-1];Z=(Z-ce)/(ae-ce)}break}}z!=h&&(h=z,l&&z==u?(e.computeWorldVertices(s,d-4,4,c,0,2),e.computeWorldVertices(s,0,4,c,4,2)):e.computeWorldVertices(s,z*6+2,8,c,0,2)),this.addCurvePosition(Z,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],a,X,n||R>0&&K==0)}return a}l?(d+=2,c=Ne.setArraySize(this.world,d),e.computeWorldVertices(s,2,d-4,c,0,2),e.computeWorldVertices(s,0,2,c,d-4,2),c[d-2]=c[0],c[d-1]=c[1]):(u--,d-=4,c=Ne.setArraySize(this.world,d),e.computeWorldVertices(s,2,d,c,0,2));let f=Ne.setArraySize(this.curves,u),p=0,m=c[0],g=c[1],v=0,y=0,b=0,x=0,T=0,E=0,S=0,C=0,M=0,k=0,P=0,I=0,D=0,$=0;for(let U=0,O=2;U<u;U++,O+=6)v=c[O],y=c[O+1],b=c[O+2],x=c[O+3],T=c[O+4],E=c[O+5],S=(m-v*2+b)*.1875,C=(g-y*2+x)*.1875,M=((v-b)*3-m+T)*.09375,k=((y-x)*3-g+E)*.09375,P=S*2+M,I=C*2+k,D=(v-m)*.75+S+M*.16666667,$=(y-g)*.75+C+k*.16666667,p+=Math.sqrt(D*D+$*$),D+=P,$+=I,P+=M,I+=k,p+=Math.sqrt(D*D+$*$),D+=P,$+=I,p+=Math.sqrt(D*D+$*$),D+=P+M,$+=I+k,p+=Math.sqrt(D*D+$*$),f[U]=p,m=T,g=E;this.data.positionMode==Ds.Percent&&(r*=p);let j;switch(this.data.spacingMode){case Tn.Percent:j=p;break;case Tn.Proportional:j=p/t;break;default:j=1}let B=this.segments,Y=0;for(let U=0,O=0,L=0,R=0;U<t;U++,O+=3){let X=o[U]*j;r+=X;let z=r;if(l)z%=p,z<0&&(z+=p),L=0;else if(z<0){this.addBeforePosition(z,c,0,a,O);continue}else if(z>p){this.addAfterPosition(z-p,c,d-4,a,O);continue}for(;;L++){let K=f[L];if(!(z>K)){if(L==0)z/=K;else{let Z=f[L-1];z=(z-Z)/(K-Z)}break}}if(L!=h){h=L;let K=L*6;for(m=c[K],g=c[K+1],v=c[K+2],y=c[K+3],b=c[K+4],x=c[K+5],T=c[K+6],E=c[K+7],S=(m-v*2+b)*.03,C=(g-y*2+x)*.03,M=((v-b)*3-m+T)*.006,k=((y-x)*3-g+E)*.006,P=S*2+M,I=C*2+k,D=(v-m)*.3+S+M*.16666667,$=(y-g)*.3+C+k*.16666667,Y=Math.sqrt(D*D+$*$),B[0]=Y,K=1;K<8;K++)D+=P,$+=I,P+=M,I+=k,Y+=Math.sqrt(D*D+$*$),B[K]=Y;D+=P,$+=I,Y+=Math.sqrt(D*D+$*$),B[8]=Y,D+=P+M,$+=I+k,Y+=Math.sqrt(D*D+$*$),B[9]=Y,R=0}for(z*=Y;;R++){let K=B[R];if(!(z>K)){if(R==0)z/=K;else{let Z=B[R-1];z=R+(z-Z)/(K-Z)}break}}this.addCurvePosition(z*.1,m,g,v,y,b,x,T,E,a,O,n||U>0&&X==0)}return a}addBeforePosition(e,t,n,s,r){let o=t[n],a=t[n+1],c=t[n+2]-o,l=t[n+3]-a,d=Math.atan2(l,c);s[r]=o+e*Math.cos(d),s[r+1]=a+e*Math.sin(d),s[r+2]=d}addAfterPosition(e,t,n,s,r){let o=t[n+2],a=t[n+3],c=o-t[n],l=a-t[n+1],d=Math.atan2(l,c);s[r]=o+e*Math.cos(d),s[r+1]=a+e*Math.sin(d),s[r+2]=d}addCurvePosition(e,t,n,s,r,o,a,c,l,d,u,h){if(e==0||isNaN(e)){d[u]=t,d[u+1]=n,d[u+2]=Math.atan2(r-n,s-t);return}let f=e*e,p=f*e,m=1-e,g=m*m,v=g*m,y=m*e,b=y*3,x=m*b,T=b*e,E=t*v+s*x+o*T+c*p,S=n*v+r*x+a*T+l*p;d[u]=E,d[u+1]=S,h&&(e<.001?d[u+2]=Math.atan2(r-n,s-t):d[u+2]=Math.atan2(S-(n*g+r*y*2+a*f),E-(t*g+s*y*2+o*f)))}},A(jn,"NONE",-1),A(jn,"BEFORE",-2),A(jn,"AFTER",-3),A(jn,"epsilon",1e-5),jn),J3=class{constructor(e,t){A(this,"data");A(this,"_bone",null);A(this,"inertia",0);A(this,"strength",0);A(this,"damping",0);A(this,"massInverse",0);A(this,"wind",0);A(this,"gravity",0);A(this,"mix",0);A(this,"_reset",!0);A(this,"ux",0);A(this,"uy",0);A(this,"cx",0);A(this,"cy",0);A(this,"tx",0);A(this,"ty",0);A(this,"xOffset",0);A(this,"xVelocity",0);A(this,"yOffset",0);A(this,"yVelocity",0);A(this,"rotateOffset",0);A(this,"rotateVelocity",0);A(this,"scaleOffset",0);A(this,"scaleVelocity",0);A(this,"active",!1);A(this,"skeleton");A(this,"remaining",0);A(this,"lastTime",0);this.data=e,this.skeleton=t,this.bone=t.bones[e.bone.index],this.inertia=e.inertia,this.strength=e.strength,this.damping=e.damping,this.massInverse=e.massInverse,this.wind=e.wind,this.gravity=e.gravity,this.mix=e.mix}set bone(e){this._bone=e}get bone(){if(this._bone)return this._bone;throw new Error("Bone not set.")}reset(){this.remaining=0,this.lastTime=this.skeleton.time,this._reset=!0,this.xOffset=0,this.xVelocity=0,this.yOffset=0,this.yVelocity=0,this.rotateOffset=0,this.rotateVelocity=0,this.scaleOffset=0,this.scaleVelocity=0}setToSetupPose(){const e=this.data;this.inertia=e.inertia,this.strength=e.strength,this.damping=e.damping,this.massInverse=e.massInverse,this.wind=e.wind,this.gravity=e.gravity,this.mix=e.mix}isActive(){return this.active}update(e){const t=this.mix;if(t==0)return;const n=this.data.x>0,s=this.data.y>0,r=this.data.rotate>0||this.data.shearX>0,o=this.data.scaleX>0,a=this.bone,c=a.data.length;switch(e){case zr.none:return;case zr.reset:this.reset();case zr.update:const l=this.skeleton,d=Math.max(this.skeleton.time-this.lastTime,0);this.remaining+=d,this.lastTime=l.time;const u=a.worldX,h=a.worldY;if(this._reset)this._reset=!1,this.ux=u,this.uy=h;else{let f=this.remaining,p=this.inertia,m=this.data.step,g=this.skeleton.data.referenceScale,v=-1,y=this.data.limit*d,b=y*Math.abs(l.scaleY);if(y*=Math.abs(l.scaleX),n||s){if(n){const x=(this.ux-u)*p;this.xOffset+=x>y?y:x<-y?-y:x,this.ux=u}if(s){const x=(this.uy-h)*p;this.yOffset+=x>b?b:x<-b?-b:x,this.uy=h}if(f>=m){v=Math.pow(this.damping,60*m);const x=this.massInverse*m,T=this.strength,E=this.wind*g*l.scaleX,S=this.gravity*g*l.scaleY;do n&&(this.xVelocity+=(E-this.xOffset*T)*x,this.xOffset+=this.xVelocity*m,this.xVelocity*=v),s&&(this.yVelocity-=(S+this.yOffset*T)*x,this.yOffset+=this.yVelocity*m,this.yVelocity*=v),f-=m;while(f>=m)}n&&(a.worldX+=this.xOffset*t*this.data.x),s&&(a.worldY+=this.yOffset*t*this.data.y)}if(r||o){let x=Math.atan2(a.c,a.a),T=0,E=0,S=0,C=this.cx-a.worldX,M=this.cy-a.worldY;if(C>y?C=y:C<-y&&(C=-y),M>b?M=b:M<-b&&(M=-b),r){S=(this.data.rotate+this.data.shearX)*t;let k=Math.atan2(M+this.ty,C+this.tx)-x-this.rotateOffset*S;this.rotateOffset+=(k-Math.ceil(k*De.invPI2-.5)*De.PI2)*p,k=this.rotateOffset*S+x,T=Math.cos(k),E=Math.sin(k),o&&(k=c*a.getWorldScaleX(),k>0&&(this.scaleOffset+=(C*T+M*E)*p/k))}else{T=Math.cos(x),E=Math.sin(x);const k=c*a.getWorldScaleX();k>0&&(this.scaleOffset+=(C*T+M*E)*p/k)}if(f=this.remaining,f>=m){v==-1&&(v=Math.pow(this.damping,60*m));const k=this.massInverse*m,P=this.strength,I=this.wind,D=rv.yDown?-this.gravity:this.gravity,$=c/g;for(;;)if(f-=m,o&&(this.scaleVelocity+=(I*T-D*E-this.scaleOffset*P)*k,this.scaleOffset+=this.scaleVelocity*m,this.scaleVelocity*=v),r){if(this.rotateVelocity-=((I*E+D*T)*$+this.rotateOffset*P)*k,this.rotateOffset+=this.rotateVelocity*m,this.rotateVelocity*=v,f<m)break;const j=this.rotateOffset*S+x;T=Math.cos(j),E=Math.sin(j)}else if(f<m)break}}this.remaining=f}this.cx=a.worldX,this.cy=a.worldY;break;case zr.pose:n&&(a.worldX+=this.xOffset*t*this.data.x),s&&(a.worldY+=this.yOffset*t*this.data.y)}if(r){let l=this.rotateOffset*t,d=0,u=0,h=0;if(this.data.shearX>0){let f=0;this.data.rotate>0&&(f=l*this.data.rotate,d=Math.sin(f),u=Math.cos(f),h=a.b,a.b=u*h-d*a.d,a.d=d*h+u*a.d),f+=l*this.data.shearX,d=Math.sin(f),u=Math.cos(f),h=a.a,a.a=u*h-d*a.c,a.c=d*h+u*a.c}else l*=this.data.rotate,d=Math.sin(l),u=Math.cos(l),h=a.a,a.a=u*h-d*a.c,a.c=d*h+u*a.c,h=a.b,a.b=u*h-d*a.d,a.d=d*h+u*a.d}if(o){const l=1+this.scaleOffset*t*this.data.scaleX;a.a*=l,a.c*=l}e!=zr.pose&&(this.tx=c*a.a,this.ty=c*a.c),a.updateAppliedTransform()}translate(e,t){this.ux-=e,this.uy-=t,this.cx-=e,this.cy-=t}rotate(e,t,n){const s=n*De.degRad,r=Math.cos(s),o=Math.sin(s),a=this.cx-e,c=this.cy-t;this.translate(a*r-c*o-a,a*o+c*r-c)}},Z3=class{constructor(e,t){A(this,"data");A(this,"bone");A(this,"color");A(this,"darkColor",null);A(this,"attachment",null);A(this,"attachmentState",0);A(this,"sequenceIndex",-1);A(this,"deform",new Array);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("bone cannot be null.");this.data=e,this.bone=t,this.color=new ut,this.darkColor=e.darkColor?new ut:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(e){this.attachment!=e&&((!(e instanceof xr)||!(this.attachment instanceof xr)||e.timelineAttachment!=this.attachment.timelineAttachment)&&(this.deform.length=0),this.attachment=e,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Q3=class{constructor(e,t){A(this,"data");A(this,"bones");A(this,"target");A(this,"mixRotate",0);A(this,"mixX",0);A(this,"mixY",0);A(this,"mixScaleX",0);A(this,"mixScaleY",0);A(this,"mixShearY",0);A(this,"temp",new Su);A(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let s=0;s<e.bones.length;s++){let r=t.findBone(e.bones[s].name);if(!r)throw new Error(`Couldn't find bone ${e.bones[s].name}.`);this.bones.push(r)}let n=t.findBone(e.target.name);if(!n)throw new Error(`Couldn't find target bone ${e.target.name}.`);this.target=n,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY}isActive(){return this.active}setToSetupPose(){const e=this.data;this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY}update(e){this.mixRotate==0&&this.mixX==0&&this.mixY==0&&this.mixScaleX==0&&this.mixScaleY==0&&this.mixShearY==0||(this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld())}applyAbsoluteWorld(){let e=this.mixRotate,t=this.mixX,n=this.mixY,s=this.mixScaleX,r=this.mixScaleY,o=this.mixShearY,a=t!=0||n!=0,c=this.target,l=c.a,d=c.b,u=c.c,h=c.d,f=l*h-d*u>0?De.degRad:-.01745329277777778,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let v=0,y=g.length;v<y;v++){let b=g[v];if(e!=0){let x=b.a,T=b.b,E=b.c,S=b.d,C=Math.atan2(u,l)-Math.atan2(E,x)+p;C>De.PI?C-=De.PI2:C<-3.1415927&&(C+=De.PI2),C*=e;let M=Math.cos(C),k=Math.sin(C);b.a=M*x-k*E,b.b=M*T-k*S,b.c=k*x+M*E,b.d=k*T+M*S}if(a){let x=this.temp;c.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),b.worldX+=(x.x-b.worldX)*t,b.worldY+=(x.y-b.worldY)*n}if(s!=0){let x=Math.sqrt(b.a*b.a+b.c*b.c);x!=0&&(x=(x+(Math.sqrt(l*l+u*u)-x+this.data.offsetScaleX)*s)/x),b.a*=x,b.c*=x}if(r!=0){let x=Math.sqrt(b.b*b.b+b.d*b.d);x!=0&&(x=(x+(Math.sqrt(d*d+h*h)-x+this.data.offsetScaleY)*r)/x),b.b*=x,b.d*=x}if(o>0){let x=b.b,T=b.d,E=Math.atan2(T,x),S=Math.atan2(h,d)-Math.atan2(u,l)-(E-Math.atan2(b.c,b.a));S>De.PI?S-=De.PI2:S<-3.1415927&&(S+=De.PI2),S=E+(S+m)*o;let C=Math.sqrt(x*x+T*T);b.b=Math.cos(S)*C,b.d=Math.sin(S)*C}b.updateAppliedTransform()}}applyRelativeWorld(){let e=this.mixRotate,t=this.mixX,n=this.mixY,s=this.mixScaleX,r=this.mixScaleY,o=this.mixShearY,a=t!=0||n!=0,c=this.target,l=c.a,d=c.b,u=c.c,h=c.d,f=l*h-d*u>0?De.degRad:-.01745329277777778,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let v=0,y=g.length;v<y;v++){let b=g[v];if(e!=0){let x=b.a,T=b.b,E=b.c,S=b.d,C=Math.atan2(u,l)+p;C>De.PI?C-=De.PI2:C<-3.1415927&&(C+=De.PI2),C*=e;let M=Math.cos(C),k=Math.sin(C);b.a=M*x-k*E,b.b=M*T-k*S,b.c=k*x+M*E,b.d=k*T+M*S}if(a){let x=this.temp;c.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),b.worldX+=x.x*t,b.worldY+=x.y*n}if(s!=0){let x=(Math.sqrt(l*l+u*u)-1+this.data.offsetScaleX)*s+1;b.a*=x,b.c*=x}if(r!=0){let x=(Math.sqrt(d*d+h*h)-1+this.data.offsetScaleY)*r+1;b.b*=x,b.d*=x}if(o>0){let x=Math.atan2(h,d)-Math.atan2(u,l);x>De.PI?x-=De.PI2:x<-3.1415927&&(x+=De.PI2);let T=b.b,E=b.d;x=Math.atan2(E,T)+(x-De.PI/2+m)*o;let S=Math.sqrt(T*T+E*E);b.b=Math.cos(x)*S,b.d=Math.sin(x)*S}b.updateAppliedTransform()}}applyAbsoluteLocal(){let e=this.mixRotate,t=this.mixX,n=this.mixY,s=this.mixScaleX,r=this.mixScaleY,o=this.mixShearY,a=this.target,c=this.bones;for(let l=0,d=c.length;l<d;l++){let u=c[l],h=u.arotation;e!=0&&(h+=(a.arotation-h+this.data.offsetRotation)*e);let f=u.ax,p=u.ay;f+=(a.ax-f+this.data.offsetX)*t,p+=(a.ay-p+this.data.offsetY)*n;let m=u.ascaleX,g=u.ascaleY;s!=0&&m!=0&&(m=(m+(a.ascaleX-m+this.data.offsetScaleX)*s)/m),r!=0&&g!=0&&(g=(g+(a.ascaleY-g+this.data.offsetScaleY)*r)/g);let v=u.ashearY;o!=0&&(v+=(a.ashearY-v+this.data.offsetShearY)*o),u.updateWorldTransformWith(f,p,h,m,g,u.ashearX,v)}}applyRelativeLocal(){let e=this.mixRotate,t=this.mixX,n=this.mixY,s=this.mixScaleX,r=this.mixScaleY,o=this.mixShearY,a=this.target,c=this.bones;for(let l=0,d=c.length;l<d;l++){let u=c[l],h=u.arotation+(a.arotation+this.data.offsetRotation)*e,f=u.ax+(a.ax+this.data.offsetX)*t,p=u.ay+(a.ay+this.data.offsetY)*n,m=u.ascaleX*((a.ascaleX-1+this.data.offsetScaleX)*s+1),g=u.ascaleY*((a.ascaleY-1+this.data.offsetScaleY)*r+1),v=u.ashearY+(a.ashearY+this.data.offsetShearY)*o;u.updateWorldTransformWith(f,p,h,m,g,u.ashearX,v)}}};var tr;let rv=(tr=class{constructor(e){A(this,"data");A(this,"bones");A(this,"slots");A(this,"drawOrder");A(this,"ikConstraints");A(this,"transformConstraints");A(this,"pathConstraints");A(this,"physicsConstraints");A(this,"_updateCache",new Array);A(this,"skin",null);A(this,"color");A(this,"scaleX",1);A(this,"_scaleY",1);A(this,"x",0);A(this,"y",0);A(this,"time",0);if(!e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(let t=0;t<e.bones.length;t++){let n=e.bones[t],s;if(!n.parent)s=new cx(n,this,null);else{let r=this.bones[n.parent.index];s=new cx(n,this,r),r.children.push(s)}this.bones.push(s)}this.slots=new Array,this.drawOrder=new Array;for(let t=0;t<e.slots.length;t++){let n=e.slots[t],s=this.bones[n.boneData.index],r=new Z3(n,s);this.slots.push(r),this.drawOrder.push(r)}this.ikConstraints=new Array;for(let t=0;t<e.ikConstraints.length;t++){let n=e.ikConstraints[t];this.ikConstraints.push(new q3(n,this))}this.transformConstraints=new Array;for(let t=0;t<e.transformConstraints.length;t++){let n=e.transformConstraints[t];this.transformConstraints.push(new Q3(n,this))}this.pathConstraints=new Array;for(let t=0;t<e.pathConstraints.length;t++){let n=e.pathConstraints[t];this.pathConstraints.push(new K3(n,this))}this.physicsConstraints=new Array;for(let t=0;t<e.physicsConstraints.length;t++){let n=e.physicsConstraints[t];this.physicsConstraints.push(new J3(n,this))}this.color=new ut(1,1,1,1),this.updateCache()}get scaleY(){return tr.yDown?-this._scaleY:this._scaleY}set scaleY(e){this._scaleY=e}updateCache(){let e=this._updateCache;e.length=0;let t=this.bones;for(let h=0,f=t.length;h<f;h++){let p=t[h];p.sorted=p.data.skinRequired,p.active=!p.sorted}if(this.skin){let h=this.skin.bones;for(let f=0,p=this.skin.bones.length;f<p;f++){let m=this.bones[h[f].index];do m.sorted=!1,m.active=!0,m=m.parent;while(m)}}let n=this.ikConstraints,s=this.transformConstraints,r=this.pathConstraints,o=this.physicsConstraints,a=n.length,c=s.length,l=r.length,d=this.physicsConstraints.length,u=a+c+l+d;e:for(let h=0;h<u;h++){for(let f=0;f<a;f++){let p=n[f];if(p.data.order==h){this.sortIkConstraint(p);continue e}}for(let f=0;f<c;f++){let p=s[f];if(p.data.order==h){this.sortTransformConstraint(p);continue e}}for(let f=0;f<l;f++){let p=r[f];if(p.data.order==h){this.sortPathConstraint(p);continue e}}for(let f=0;f<d;f++){const p=o[f];if(p.data.order==h){this.sortPhysicsConstraint(p);continue e}}}for(let h=0,f=t.length;h<f;h++)this.sortBone(t[h])}sortIkConstraint(e){if(e.active=e.target.isActive()&&(!e.data.skinRequired||this.skin&&Ne.contains(this.skin.constraints,e.data,!0)),!e.active)return;let t=e.target;this.sortBone(t);let n=e.bones,s=n[0];if(this.sortBone(s),n.length==1)this._updateCache.push(e),this.sortReset(s.children);else{let r=n[n.length-1];this.sortBone(r),this._updateCache.push(e),this.sortReset(s.children),r.sorted=!0}}sortPathConstraint(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||this.skin&&Ne.contains(this.skin.constraints,e.data,!0)),!e.active)return;let t=e.target,n=t.data.index,s=t.bone;this.skin&&this.sortPathConstraintAttachment(this.skin,n,s),this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,s);for(let c=0,l=this.data.skins.length;c<l;c++)this.sortPathConstraintAttachment(this.data.skins[c],n,s);let r=t.getAttachment();r instanceof mc&&this.sortPathConstraintAttachmentWith(r,s);let o=e.bones,a=o.length;for(let c=0;c<a;c++)this.sortBone(o[c]);this._updateCache.push(e);for(let c=0;c<a;c++)this.sortReset(o[c].children);for(let c=0;c<a;c++)o[c].sorted=!0}sortTransformConstraint(e){if(e.active=e.target.isActive()&&(!e.data.skinRequired||this.skin&&Ne.contains(this.skin.constraints,e.data,!0)),!e.active)return;this.sortBone(e.target);let t=e.bones,n=t.length;if(e.data.local)for(let s=0;s<n;s++){let r=t[s];this.sortBone(r.parent),this.sortBone(r)}else for(let s=0;s<n;s++)this.sortBone(t[s]);this._updateCache.push(e);for(let s=0;s<n;s++)this.sortReset(t[s].children);for(let s=0;s<n;s++)t[s].sorted=!0}sortPathConstraintAttachment(e,t,n){let s=e.attachments[t];if(s)for(let r in s)this.sortPathConstraintAttachmentWith(s[r],n)}sortPathConstraintAttachmentWith(e,t){if(!(e instanceof mc))return;let n=e.bones;if(!n)this.sortBone(t);else{let s=this.bones;for(let r=0,o=n.length;r<o;){let a=n[r++];for(a+=r;r<a;)this.sortBone(s[n[r++]])}}}sortPhysicsConstraint(e){const t=e.bone;e.active=t.active&&(!e.data.skinRequired||this.skin!=null&&Ne.contains(this.skin.constraints,e.data,!0)),e.active&&(this.sortBone(t),this._updateCache.push(e),this.sortReset(t.children),t.sorted=!0)}sortBone(e){if(!e||e.sorted)return;let t=e.parent;t&&this.sortBone(t),e.sorted=!0,this._updateCache.push(e)}sortReset(e){for(let t=0,n=e.length;t<n;t++){let s=e[t];s.active&&(s.sorted&&this.sortReset(s.children),s.sorted=!1)}}updateWorldTransform(e){if(e==null)throw new Error("physics is undefined");let t=this.bones;for(let s=0,r=t.length;s<r;s++){let o=t[s];o.ax=o.x,o.ay=o.y,o.arotation=o.rotation,o.ascaleX=o.scaleX,o.ascaleY=o.scaleY,o.ashearX=o.shearX,o.ashearY=o.shearY}let n=this._updateCache;for(let s=0,r=n.length;s<r;s++)n[s].update(e)}updateWorldTransformWith(e,t){if(!t)throw new Error("parent cannot be null.");let n=this.bones;for(let g=1,v=n.length;g<v;g++){let y=n[g];y.ax=y.x,y.ay=y.y,y.arotation=y.rotation,y.ascaleX=y.scaleX,y.ascaleY=y.scaleY,y.ashearX=y.shearX,y.ashearY=y.shearY}let s=this.getRootBone();if(!s)throw new Error("Root bone must not be null.");let r=t.a,o=t.b,a=t.c,c=t.d;s.worldX=r*this.x+o*this.y+t.worldX,s.worldY=a*this.x+c*this.y+t.worldY;const l=(s.rotation+s.shearX)*De.degRad,d=(s.rotation+90+s.shearY)*De.degRad,u=Math.cos(l)*s.scaleX,h=Math.cos(d)*s.scaleY,f=Math.sin(l)*s.scaleX,p=Math.sin(d)*s.scaleY;s.a=(r*u+o*f)*this.scaleX,s.b=(r*h+o*p)*this.scaleX,s.c=(a*u+c*f)*this.scaleY,s.d=(a*h+c*p)*this.scaleY;let m=this._updateCache;for(let g=0,v=m.length;g<v;g++){let y=m[g];y!=s&&y.update(e)}}setToSetupPose(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()}setBonesToSetupPose(){for(const e of this.bones)e.setToSetupPose();for(const e of this.ikConstraints)e.setToSetupPose();for(const e of this.transformConstraints)e.setToSetupPose();for(const e of this.pathConstraints)e.setToSetupPose();for(const e of this.physicsConstraints)e.setToSetupPose()}setSlotsToSetupPose(){let e=this.slots;Ne.arrayCopy(e,0,this.drawOrder,0,e.length);for(let t=0,n=e.length;t<n;t++)e[t].setToSetupPose()}getRootBone(){return this.bones.length==0?null:this.bones[0]}findBone(e){if(!e)throw new Error("boneName cannot be null.");let t=this.bones;for(let n=0,s=t.length;n<s;n++){let r=t[n];if(r.data.name==e)return r}return null}findSlot(e){if(!e)throw new Error("slotName cannot be null.");let t=this.slots;for(let n=0,s=t.length;n<s;n++){let r=t[n];if(r.data.name==e)return r}return null}setSkinByName(e){let t=this.data.findSkin(e);if(!t)throw new Error("Skin not found: "+e);this.setSkin(t)}setSkin(e){if(e!=this.skin){if(e)if(this.skin)e.attachAll(this,this.skin);else{let t=this.slots;for(let n=0,s=t.length;n<s;n++){let r=t[n],o=r.data.attachmentName;if(o){let a=e.getAttachment(n,o);a&&r.setAttachment(a)}}}this.skin=e,this.updateCache()}}getAttachmentByName(e,t){let n=this.data.findSlot(e);if(!n)throw new Error(`Can't find slot with name ${e}`);return this.getAttachment(n.index,t)}getAttachment(e,t){if(!t)throw new Error("attachmentName cannot be null.");if(this.skin){let n=this.skin.getAttachment(e,t);if(n)return n}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(e,t):null}setAttachment(e,t){if(!e)throw new Error("slotName cannot be null.");let n=this.slots;for(let s=0,r=n.length;s<r;s++){let o=n[s];if(o.data.name==e){let a=null;if(t&&(a=this.getAttachment(s,t),!a))throw new Error("Attachment not found: "+t+", for slot: "+e);o.setAttachment(a);return}}throw new Error("Slot not found: "+e)}findIkConstraint(e){if(!e)throw new Error("constraintName cannot be null.");return this.ikConstraints.find(t=>t.data.name==e)??null}findTransformConstraint(e){if(!e)throw new Error("constraintName cannot be null.");return this.transformConstraints.find(t=>t.data.name==e)??null}findPathConstraint(e){if(!e)throw new Error("constraintName cannot be null.");return this.pathConstraints.find(t=>t.data.name==e)??null}findPhysicsConstraint(e){if(e==null)throw new Error("constraintName cannot be null.");return this.physicsConstraints.find(t=>t.data.name==e)??null}getBoundsRect(e){let t=new Su,n=new Su;return this.getBounds(t,n,void 0,e),{x:t.x,y:t.y,width:n.x,height:n.y}}getBounds(e,t,n=new Array(2),s=null){if(!e)throw new Error("offset cannot be null.");if(!t)throw new Error("size cannot be null.");let r=this.drawOrder,o=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(let d=0,u=r.length;d<u;d++){let h=r[d];if(!h.bone.active)continue;let f=0,p=null,m=null,g=h.getAttachment();if(g instanceof yh)f=8,p=Ne.setArraySize(n,f,0),g.computeWorldVertices(h,p,0,2),m=tr.quadTriangles;else if(g instanceof _c){let v=g;f=v.worldVerticesLength,p=Ne.setArraySize(n,f,0),v.computeWorldVertices(h,0,f,p,0,2),m=v.triangles}else if(g instanceof Ba&&s!=null){s.clipStart(h,g);continue}if(p&&m){s!=null&&s.isClipping()&&(s.clipTriangles(p,m,m.length),p=s.clippedVertices,f=s.clippedVertices.length);for(let v=0,y=p.length;v<y;v+=2){let b=p[v],x=p[v+1];o=Math.min(o,b),a=Math.min(a,x),c=Math.max(c,b),l=Math.max(l,x)}}s!=null&&s.clipEndWithSlot(h)}s!=null&&s.clipEnd(),e.set(o,a),t.set(c-o,l-a)}update(e){this.time+=e}physicsTranslate(e,t){const n=this.physicsConstraints;for(let s=0,r=n.length;s<r;s++)n[s].translate(e,t)}physicsRotate(e,t,n){const s=this.physicsConstraints;for(let r=0,o=s.length;r<o;r++)s[r].rotate(e,t,n)}},A(tr,"quadTriangles",[0,1,2,2,3,0]),A(tr,"yDown",!1),tr);var zr;(function(i){i[i.none=0]="none",i[i.reset=1]="reset",i[i.update=2]="update",i[i.pose=3]="pose"})(zr||(zr={}));let $A=class extends xh{constructor(t){super(t,0,!1);A(this,"_bone",null);A(this,"x",0);A(this,"y",0);A(this,"rotate",0);A(this,"scaleX",0);A(this,"shearX",0);A(this,"limit",0);A(this,"step",0);A(this,"inertia",0);A(this,"strength",0);A(this,"damping",0);A(this,"massInverse",0);A(this,"wind",0);A(this,"gravity",0);A(this,"mix",0);A(this,"inertiaGlobal",!1);A(this,"strengthGlobal",!1);A(this,"dampingGlobal",!1);A(this,"massGlobal",!1);A(this,"windGlobal",!1);A(this,"gravityGlobal",!1);A(this,"mixGlobal",!1)}set bone(t){this._bone=t}get bone(){if(this._bone)return this._bone;throw new Error("BoneData not set.")}},Au=class{constructor(){A(this,"name",null);A(this,"bones",new Array);A(this,"slots",new Array);A(this,"skins",new Array);A(this,"defaultSkin",null);A(this,"events",new Array);A(this,"animations",new Array);A(this,"ikConstraints",new Array);A(this,"transformConstraints",new Array);A(this,"pathConstraints",new Array);A(this,"physicsConstraints",new Array);A(this,"x",0);A(this,"y",0);A(this,"width",0);A(this,"height",0);A(this,"referenceScale",100);A(this,"version",null);A(this,"hash",null);A(this,"fps",0);A(this,"imagesPath",null);A(this,"audioPath",null)}findBone(e){if(!e)throw new Error("boneName cannot be null.");let t=this.bones;for(let n=0,s=t.length;n<s;n++){let r=t[n];if(r.name==e)return r}return null}findSlot(e){if(!e)throw new Error("slotName cannot be null.");let t=this.slots;for(let n=0,s=t.length;n<s;n++){let r=t[n];if(r.name==e)return r}return null}findSkin(e){if(!e)throw new Error("skinName cannot be null.");let t=this.skins;for(let n=0,s=t.length;n<s;n++){let r=t[n];if(r.name==e)return r}return null}findEvent(e){if(!e)throw new Error("eventDataName cannot be null.");let t=this.events;for(let n=0,s=t.length;n<s;n++){let r=t[n];if(r.name==e)return r}return null}findAnimation(e){if(!e)throw new Error("animationName cannot be null.");let t=this.animations;for(let n=0,s=t.length;n<s;n++){let r=t[n];if(r.name==e)return r}return null}findIkConstraint(e){if(!e)throw new Error("constraintName cannot be null.");const t=this.ikConstraints;for(let n=0,s=t.length;n<s;n++){const r=t[n];if(r.name==e)return r}return null}findTransformConstraint(e){if(!e)throw new Error("constraintName cannot be null.");const t=this.transformConstraints;for(let n=0,s=t.length;n<s;n++){const r=t[n];if(r.name==e)return r}return null}findPathConstraint(e){if(!e)throw new Error("constraintName cannot be null.");const t=this.pathConstraints;for(let n=0,s=t.length;n<s;n++){const r=t[n];if(r.name==e)return r}return null}findPhysicsConstraint(e){if(!e)throw new Error("constraintName cannot be null.");const t=this.physicsConstraints;for(let n=0,s=t.length;n<s;n++){const r=t[n];if(r.name==e)return r}return null}},dx=class{constructor(e=0,t,n){A(this,"slotIndex");A(this,"name");A(this,"attachment");this.slotIndex=e,this.name=t,this.attachment=n}},Um=class{constructor(e){A(this,"name");A(this,"attachments",new Array);A(this,"bones",Array());A(this,"constraints",new Array);A(this,"color",new ut(.99607843,.61960787,.30980393,1));if(!e)throw new Error("name cannot be null.");this.name=e}setAttachment(e,t,n){if(!n)throw new Error("attachment cannot be null.");let s=this.attachments;e>=s.length&&(s.length=e+1),s[e]||(s[e]={}),s[e][t]=n}addSkin(e){for(let s=0;s<e.bones.length;s++){let r=e.bones[s],o=!1;for(let a=0;a<this.bones.length;a++)if(this.bones[a]==r){o=!0;break}o||this.bones.push(r)}for(let s=0;s<e.constraints.length;s++){let r=e.constraints[s],o=!1;for(let a=0;a<this.constraints.length;a++)if(this.constraints[a]==r){o=!0;break}o||this.constraints.push(r)}let t=e.getAttachments();for(let s=0;s<t.length;s++){var n=t[s];this.setAttachment(n.slotIndex,n.name,n.attachment)}}copySkin(e){for(let s=0;s<e.bones.length;s++){let r=e.bones[s],o=!1;for(let a=0;a<this.bones.length;a++)if(this.bones[a]==r){o=!0;break}o||this.bones.push(r)}for(let s=0;s<e.constraints.length;s++){let r=e.constraints[s],o=!1;for(let a=0;a<this.constraints.length;a++)if(this.constraints[a]==r){o=!0;break}o||this.constraints.push(r)}let t=e.getAttachments();for(let s=0;s<t.length;s++){var n=t[s];n.attachment&&(n.attachment instanceof _c?(n.attachment=n.attachment.newLinkedMesh(),this.setAttachment(n.slotIndex,n.name,n.attachment)):(n.attachment=n.attachment.copy(),this.setAttachment(n.slotIndex,n.name,n.attachment)))}}getAttachment(e,t){let n=this.attachments[e];return n?n[t]:null}removeAttachment(e,t){let n=this.attachments[e];n&&delete n[t]}getAttachments(){let e=new Array;for(var t=0;t<this.attachments.length;t++){let n=this.attachments[t];if(n)for(let s in n){let r=n[s];r&&e.push(new dx(t,s,r))}}return e}getAttachmentsForSlot(e,t){let n=this.attachments[e];if(n)for(let s in n){let r=n[s];r&&t.push(new dx(e,s,r))}}clear(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0}attachAll(e,t){let n=0;for(let s=0;s<e.slots.length;s++){let r=e.slots[s],o=r.getAttachment();if(o&&n<t.attachments.length){let a=t.attachments[n];for(let c in a){let l=a[c];if(o==l){let d=this.getAttachment(n,c);d&&r.setAttachment(d);break}}}n++}}},BA=class{constructor(e,t,n){A(this,"index",0);A(this,"name");A(this,"boneData");A(this,"color",new ut(1,1,1,1));A(this,"darkColor",null);A(this,"attachmentName",null);A(this,"blendMode",Jr.Normal);A(this,"visible",!0);if(e<0)throw new Error("index must be >= 0.");if(!t)throw new Error("name cannot be null.");if(!n)throw new Error("boneData cannot be null.");this.index=e,this.name=t,this.boneData=n}};var Jr;(function(i){i[i.Normal=0]="Normal",i[i.Additive=1]="Additive",i[i.Multiply=2]="Multiply",i[i.Screen=3]="Screen"})(Jr||(Jr={}));let UA=class extends xh{constructor(t){super(t,0,!1);A(this,"bones",new Array);A(this,"_target",null);A(this,"mixRotate",0);A(this,"mixX",0);A(this,"mixY",0);A(this,"mixScaleX",0);A(this,"mixScaleY",0);A(this,"mixShearY",0);A(this,"offsetRotation",0);A(this,"offsetX",0);A(this,"offsetY",0);A(this,"offsetScaleX",0);A(this,"offsetScaleY",0);A(this,"offsetShearY",0);A(this,"relative",!1);A(this,"local",!1)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Vm=class{constructor(e){A(this,"scale",1);A(this,"attachmentLoader");A(this,"linkedMeshes",new Array);this.attachmentLoader=e}readSkeletonData(e){let t=this.scale,n=new Au;n.name="";let s=new e4(e),r=s.readInt32(),o=s.readInt32();n.hash=o==0&&r==0?null:o.toString(16)+r.toString(16),n.version=s.readString(),n.x=s.readFloat(),n.y=s.readFloat(),n.width=s.readFloat(),n.height=s.readFloat(),n.referenceScale=s.readFloat()*t;let a=s.readBoolean();a&&(n.fps=s.readFloat(),n.imagesPath=s.readString(),n.audioPath=s.readString());let c=0;c=s.readInt(!0);for(let d=0;d<c;d++){let u=s.readString();if(!u)throw new Error("String in string table must not be null.");s.strings.push(u)}c=s.readInt(!0);for(let d=0;d<c;d++){let u=s.readString();if(!u)throw new Error("Bone name must not be null.");let h=d==0?null:n.bones[s.readInt(!0)],f=new FA(d,u,h);f.rotation=s.readFloat(),f.x=s.readFloat()*t,f.y=s.readFloat()*t,f.scaleX=s.readFloat(),f.scaleY=s.readFloat(),f.shearX=s.readFloat(),f.shearY=s.readFloat(),f.length=s.readFloat()*t,f.inherit=s.readByte(),f.skinRequired=s.readBoolean(),a&&(ut.rgba8888ToColor(f.color,s.readInt32()),f.icon=s.readString()??void 0,f.visible=s.readBoolean()),n.bones.push(f)}c=s.readInt(!0);for(let d=0;d<c;d++){let u=s.readString();if(!u)throw new Error("Slot name must not be null.");let h=n.bones[s.readInt(!0)],f=new BA(d,u,h);ut.rgba8888ToColor(f.color,s.readInt32());let p=s.readInt32();p!=-1&&ut.rgb888ToColor(f.darkColor=new ut,p),f.attachmentName=s.readStringRef(),f.blendMode=s.readInt(!0),a&&(f.visible=s.readBoolean()),n.slots.push(f)}c=s.readInt(!0);for(let d=0,u;d<c;d++){let h=s.readString();if(!h)throw new Error("IK constraint data name must not be null.");let f=new OA(h);f.order=s.readInt(!0),u=s.readInt(!0);for(let m=0;m<u;m++)f.bones.push(n.bones[s.readInt(!0)]);f.target=n.bones[s.readInt(!0)];let p=s.readByte();f.skinRequired=(p&1)!=0,f.bendDirection=(p&2)!=0?1:-1,f.compress=(p&4)!=0,f.stretch=(p&8)!=0,f.uniform=(p&16)!=0,(p&32)!=0&&(f.mix=(p&64)!=0?s.readFloat():1),(p&128)!=0&&(f.softness=s.readFloat()*t),n.ikConstraints.push(f)}c=s.readInt(!0);for(let d=0,u;d<c;d++){let h=s.readString();if(!h)throw new Error("Transform constraint data name must not be null.");let f=new UA(h);f.order=s.readInt(!0),u=s.readInt(!0);for(let m=0;m<u;m++)f.bones.push(n.bones[s.readInt(!0)]);f.target=n.bones[s.readInt(!0)];let p=s.readByte();f.skinRequired=(p&1)!=0,f.local=(p&2)!=0,f.relative=(p&4)!=0,(p&8)!=0&&(f.offsetRotation=s.readFloat()),(p&16)!=0&&(f.offsetX=s.readFloat()*t),(p&32)!=0&&(f.offsetY=s.readFloat()*t),(p&64)!=0&&(f.offsetScaleX=s.readFloat()),(p&128)!=0&&(f.offsetScaleY=s.readFloat()),p=s.readByte(),(p&1)!=0&&(f.offsetShearY=s.readFloat()),(p&2)!=0&&(f.mixRotate=s.readFloat()),(p&4)!=0&&(f.mixX=s.readFloat()),(p&8)!=0&&(f.mixY=s.readFloat()),(p&16)!=0&&(f.mixScaleX=s.readFloat()),(p&32)!=0&&(f.mixScaleY=s.readFloat()),(p&64)!=0&&(f.mixShearY=s.readFloat()),n.transformConstraints.push(f)}c=s.readInt(!0);for(let d=0,u;d<c;d++){let h=s.readString();if(!h)throw new Error("Path constraint data name must not be null.");let f=new NA(h);f.order=s.readInt(!0),f.skinRequired=s.readBoolean(),u=s.readInt(!0);for(let m=0;m<u;m++)f.bones.push(n.bones[s.readInt(!0)]);f.target=n.slots[s.readInt(!0)];const p=s.readByte();f.positionMode=p&1,f.spacingMode=p>>1&3,f.rotateMode=p>>3&3,(p&128)!=0&&(f.offsetRotation=s.readFloat()),f.position=s.readFloat(),f.positionMode==Ds.Fixed&&(f.position*=t),f.spacing=s.readFloat(),(f.spacingMode==Tn.Length||f.spacingMode==Tn.Fixed)&&(f.spacing*=t),f.mixRotate=s.readFloat(),f.mixX=s.readFloat(),f.mixY=s.readFloat(),n.pathConstraints.push(f)}c=s.readInt(!0);for(let d=0,u;d<c;d++){const h=s.readString();if(!h)throw new Error("Physics constraint data name must not be null.");const f=new $A(h);f.order=s.readInt(!0),f.bone=n.bones[s.readInt(!0)];let p=s.readByte();f.skinRequired=(p&1)!=0,(p&2)!=0&&(f.x=s.readFloat()),(p&4)!=0&&(f.y=s.readFloat()),(p&8)!=0&&(f.rotate=s.readFloat()),(p&16)!=0&&(f.scaleX=s.readFloat()),(p&32)!=0&&(f.shearX=s.readFloat()),f.limit=((p&64)!=0?s.readFloat():5e3)*t,f.step=1/s.readUnsignedByte(),f.inertia=s.readFloat(),f.strength=s.readFloat(),f.damping=s.readFloat(),f.massInverse=(p&128)!=0?s.readFloat():1,f.wind=s.readFloat(),f.gravity=s.readFloat(),p=s.readByte(),(p&1)!=0&&(f.inertiaGlobal=!0),(p&2)!=0&&(f.strengthGlobal=!0),(p&4)!=0&&(f.dampingGlobal=!0),(p&8)!=0&&(f.massGlobal=!0),(p&16)!=0&&(f.windGlobal=!0),(p&32)!=0&&(f.gravityGlobal=!0),(p&64)!=0&&(f.mixGlobal=!0),f.mix=(p&128)!=0?s.readFloat():1,n.physicsConstraints.push(f)}let l=this.readSkin(s,n,!0,a);l&&(n.defaultSkin=l,n.skins.push(l));{let d=n.skins.length;for(Ne.setArraySize(n.skins,c=d+s.readInt(!0));d<c;d++){let u=this.readSkin(s,n,!1,a);if(!u)throw new Error("readSkin() should not have returned null.");n.skins[d]=u}}c=this.linkedMeshes.length;for(let d=0;d<c;d++){let u=this.linkedMeshes[d];const h=n.skins[u.skinIndex];if(!u.parent)throw new Error("Linked mesh parent must not be null");let f=h.getAttachment(u.slotIndex,u.parent);if(!f)throw new Error(`Parent mesh not found: ${u.parent}`);u.mesh.timelineAttachment=u.inheritTimeline?f:u.mesh,u.mesh.setParentMesh(f),u.mesh.region!=null&&u.mesh.updateRegion()}this.linkedMeshes.length=0,c=s.readInt(!0);for(let d=0;d<c;d++){let u=s.readString();if(!u)throw new Error("Event data name must not be null");let h=new DA(u);h.intValue=s.readInt(!1),h.floatValue=s.readFloat(),h.stringValue=s.readString(),h.audioPath=s.readString(),h.audioPath&&(h.volume=s.readFloat(),h.balance=s.readFloat()),n.events.push(h)}c=s.readInt(!0);for(let d=0;d<c;d++){let u=s.readString();if(!u)throw new Error("Animatio name must not be null.");n.animations.push(this.readAnimation(s,u,n))}return n}readSkin(e,t,n,s){let r=null,o=0;if(n){if(o=e.readInt(!0),o==0)return null;r=new Um("default")}else{let a=e.readString();if(!a)throw new Error("Skin name must not be null.");r=new Um(a),s&&ut.rgba8888ToColor(r.color,e.readInt32()),r.bones.length=e.readInt(!0);for(let c=0,l=r.bones.length;c<l;c++)r.bones[c]=t.bones[e.readInt(!0)];for(let c=0,l=e.readInt(!0);c<l;c++)r.constraints.push(t.ikConstraints[e.readInt(!0)]);for(let c=0,l=e.readInt(!0);c<l;c++)r.constraints.push(t.transformConstraints[e.readInt(!0)]);for(let c=0,l=e.readInt(!0);c<l;c++)r.constraints.push(t.pathConstraints[e.readInt(!0)]);for(let c=0,l=e.readInt(!0);c<l;c++)r.constraints.push(t.physicsConstraints[e.readInt(!0)]);o=e.readInt(!0)}for(let a=0;a<o;a++){let c=e.readInt(!0);for(let l=0,d=e.readInt(!0);l<d;l++){let u=e.readStringRef();if(!u)throw new Error("Attachment name must not be null");let h=this.readAttachment(e,t,r,c,u,s);h&&r.setAttachment(c,u,h)}}return r}readAttachment(e,t,n,s,r,o){let a=this.scale,c=e.readByte();const l=(c&8)!=0?e.readStringRef():r;if(!l)throw new Error("Attachment name must not be null");switch(c&7){case Ws.Region:{let d=(c&16)!=0?e.readStringRef():null;const u=(c&32)!=0?e.readInt32():4294967295,h=(c&64)!=0?this.readSequence(e):null;let f=(c&128)!=0?e.readFloat():0,p=e.readFloat(),m=e.readFloat(),g=e.readFloat(),v=e.readFloat(),y=e.readFloat(),b=e.readFloat();d||(d=l);let x=this.attachmentLoader.newRegionAttachment(n,l,d,h);return x?(x.path=d,x.x=p*a,x.y=m*a,x.scaleX=g,x.scaleY=v,x.rotation=f,x.width=y*a,x.height=b*a,ut.rgba8888ToColor(x.color,u),x.sequence=h,h==null&&x.updateRegion(),x):null}case Ws.BoundingBox:{let d=this.readVertices(e,(c&16)!=0),u=o?e.readInt32():0,h=this.attachmentLoader.newBoundingBoxAttachment(n,l);return h?(h.worldVerticesLength=d.length,h.vertices=d.vertices,h.bones=d.bones,o&&ut.rgba8888ToColor(h.color,u),h):null}case Ws.Mesh:{let d=(c&16)!=0?e.readStringRef():l;const u=(c&32)!=0?e.readInt32():4294967295,h=(c&64)!=0?this.readSequence(e):null,f=e.readInt(!0),p=this.readVertices(e,(c&128)!=0),m=this.readFloatArray(e,p.length,1),g=this.readShortArray(e,(p.length-f-2)*3);let v=[],y=0,b=0;o&&(v=this.readShortArray(e,e.readInt(!0)),y=e.readFloat(),b=e.readFloat()),d||(d=l);let x=this.attachmentLoader.newMeshAttachment(n,l,d,h);return x?(x.path=d,ut.rgba8888ToColor(x.color,u),x.bones=p.bones,x.vertices=p.vertices,x.worldVerticesLength=p.length,x.triangles=g,x.regionUVs=m,h==null&&x.updateRegion(),x.hullLength=f<<1,x.sequence=h,o&&(x.edges=v,x.width=y*a,x.height=b*a),x):null}case Ws.LinkedMesh:{const d=(c&16)!=0?e.readStringRef():l;if(d==null)throw new Error("Path of linked mesh must not be null");const u=(c&32)!=0?e.readInt32():4294967295,h=(c&64)!=0?this.readSequence(e):null,f=(c&128)!=0,p=e.readInt(!0),m=e.readStringRef();let g=0,v=0;o&&(g=e.readFloat(),v=e.readFloat());let y=this.attachmentLoader.newMeshAttachment(n,l,d,h);return y?(y.path=d,ut.rgba8888ToColor(y.color,u),y.sequence=h,o&&(y.width=g*a,y.height=v*a),this.linkedMeshes.push(new t4(y,p,s,m,f)),y):null}case Ws.Path:{const d=(c&16)!=0,u=(c&32)!=0,h=this.readVertices(e,(c&64)!=0),f=Ne.newArray(h.length/6,0);for(let g=0,v=f.length;g<v;g++)f[g]=e.readFloat()*a;const p=o?e.readInt32():0,m=this.attachmentLoader.newPathAttachment(n,l);return m?(m.closed=d,m.constantSpeed=u,m.worldVerticesLength=h.length,m.vertices=h.vertices,m.bones=h.bones,m.lengths=f,o&&ut.rgba8888ToColor(m.color,p),m):null}case Ws.Point:{const d=e.readFloat(),u=e.readFloat(),h=e.readFloat(),f=o?e.readInt32():0,p=this.attachmentLoader.newPointAttachment(n,l);return p?(p.x=u*a,p.y=h*a,p.rotation=d,o&&ut.rgba8888ToColor(p.color,f),p):null}case Ws.Clipping:{const d=e.readInt(!0),u=this.readVertices(e,(c&16)!=0);let h=o?e.readInt32():0,f=this.attachmentLoader.newClippingAttachment(n,l);return f?(f.endSlot=t.slots[d],f.worldVerticesLength=u.length,f.vertices=u.vertices,f.bones=u.bones,o&&ut.rgba8888ToColor(f.color,h),f):null}}return null}readSequence(e){let t=new GC(e.readInt(!0));return t.start=e.readInt(!0),t.digits=e.readInt(!0),t.setupIndex=e.readInt(!0),t}readVertices(e,t){const n=this.scale,s=e.readInt(!0),r=new n4;if(r.length=s<<1,!t)return r.vertices=this.readFloatArray(e,r.length,n),r;let o=new Array,a=new Array;for(let c=0;c<s;c++){let l=e.readInt(!0);a.push(l);for(let d=0;d<l;d++)a.push(e.readInt(!0)),o.push(e.readFloat()*n),o.push(e.readFloat()*n),o.push(e.readFloat())}return r.vertices=Ne.toFloatArray(o),r.bones=a,r}readFloatArray(e,t,n){let s=new Array(t);if(n==1)for(let r=0;r<t;r++)s[r]=e.readFloat();else for(let r=0;r<t;r++)s[r]=e.readFloat()*n;return s}readShortArray(e,t){let n=new Array(t);for(let s=0;s<t;s++)n[s]=e.readInt(!0);return n}readAnimation(e,t,n){e.readInt(!0);let s=new Array,r=this.scale;for(let l=0,d=e.readInt(!0);l<d;l++){let u=e.readInt(!0);for(let h=0,f=e.readInt(!0);h<f;h++){let p=e.readByte(),m=e.readInt(!0),g=m-1;switch(p){case p4:{let v=new Ta(m,u);for(let y=0;y<m;y++)v.setFrame(y,e.readFloat(),e.readStringRef());s.push(v);break}case m4:{let v=e.readInt(!0),y=new rA(m,v,u),b=e.readFloat(),x=e.readUnsignedByte()/255,T=e.readUnsignedByte()/255,E=e.readUnsignedByte()/255,S=e.readUnsignedByte()/255;for(let C=0,M=0;y.setFrame(C,b,x,T,E,S),C!=g;C++){let k=e.readFloat(),P=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,D=e.readUnsignedByte()/255,$=e.readUnsignedByte()/255;switch(e.readByte()){case bs:y.setStepped(C);break;case ys:wt(e,y,M++,C,0,b,k,x,P,1),wt(e,y,M++,C,1,b,k,T,I,1),wt(e,y,M++,C,2,b,k,E,D,1),wt(e,y,M++,C,3,b,k,S,$,1)}b=k,x=P,T=I,E=D,S=$}s.push(y);break}case g4:{let v=e.readInt(!0),y=new oA(m,v,u),b=e.readFloat(),x=e.readUnsignedByte()/255,T=e.readUnsignedByte()/255,E=e.readUnsignedByte()/255;for(let S=0,C=0;y.setFrame(S,b,x,T,E),S!=g;S++){let M=e.readFloat(),k=e.readUnsignedByte()/255,P=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255;switch(e.readByte()){case bs:y.setStepped(S);break;case ys:wt(e,y,C++,S,0,b,M,x,k,1),wt(e,y,C++,S,1,b,M,T,P,1),wt(e,y,C++,S,2,b,M,E,I,1)}b=M,x=k,T=P,E=I}s.push(y);break}case v4:{let v=e.readInt(!0),y=new lA(m,v,u),b=e.readFloat(),x=e.readUnsignedByte()/255,T=e.readUnsignedByte()/255,E=e.readUnsignedByte()/255,S=e.readUnsignedByte()/255,C=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,k=e.readUnsignedByte()/255;for(let P=0,I=0;y.setFrame(P,b,x,T,E,S,C,M,k),P!=g;P++){let D=e.readFloat(),$=e.readUnsignedByte()/255,j=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,Y=e.readUnsignedByte()/255,U=e.readUnsignedByte()/255,O=e.readUnsignedByte()/255,L=e.readUnsignedByte()/255;switch(e.readByte()){case bs:y.setStepped(P);break;case ys:wt(e,y,I++,P,0,b,D,x,$,1),wt(e,y,I++,P,1,b,D,T,j,1),wt(e,y,I++,P,2,b,D,E,B,1),wt(e,y,I++,P,3,b,D,S,Y,1),wt(e,y,I++,P,4,b,D,C,U,1),wt(e,y,I++,P,5,b,D,M,O,1),wt(e,y,I++,P,6,b,D,k,L,1)}b=D,x=$,T=j,E=B,S=Y,C=U,M=O,k=L}s.push(y);break}case b4:{let v=e.readInt(!0),y=new cA(m,v,u),b=e.readFloat(),x=e.readUnsignedByte()/255,T=e.readUnsignedByte()/255,E=e.readUnsignedByte()/255,S=e.readUnsignedByte()/255,C=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255;for(let k=0,P=0;y.setFrame(k,b,x,T,E,S,C,M),k!=g;k++){let I=e.readFloat(),D=e.readUnsignedByte()/255,$=e.readUnsignedByte()/255,j=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,Y=e.readUnsignedByte()/255,U=e.readUnsignedByte()/255;switch(e.readByte()){case bs:y.setStepped(k);break;case ys:wt(e,y,P++,k,0,b,I,x,D,1),wt(e,y,P++,k,1,b,I,T,$,1),wt(e,y,P++,k,2,b,I,E,j,1),wt(e,y,P++,k,3,b,I,S,B,1),wt(e,y,P++,k,4,b,I,C,Y,1),wt(e,y,P++,k,5,b,I,M,U,1)}b=I,x=D,T=$,E=j,S=B,C=Y,M=U}s.push(y);break}case y4:{let v=new aA(m,e.readInt(!0),u),y=e.readFloat(),b=e.readUnsignedByte()/255;for(let x=0,T=0;v.setFrame(x,y,b),x!=g;x++){let E=e.readFloat(),S=e.readUnsignedByte()/255;switch(e.readByte()){case bs:v.setStepped(x);break;case ys:wt(e,v,T++,x,0,y,E,b,S,1)}y=E,b=S}s.push(v)}}}}for(let l=0,d=e.readInt(!0);l<d;l++){let u=e.readInt(!0);for(let h=0,f=e.readInt(!0);h<f;h++){let p=e.readByte(),m=e.readInt(!0);if(p==f4){let v=new sA(m,u);for(let y=0;y<m;y++)v.setFrame(y,e.readFloat(),e.readByte());s.push(v);continue}let g=e.readInt(!0);switch(p){case i4:s.push(Vn(e,new Cu(m,g,u),1));break;case s4:s.push(Sp(e,new qC(m,g,u),r));break;case r4:s.push(Vn(e,new KC(m,g,u),r));break;case o4:s.push(Vn(e,new JC(m,g,u),r));break;case a4:s.push(Sp(e,new ZC(m,g,u),1));break;case l4:s.push(Vn(e,new QC(m,g,u),1));break;case c4:s.push(Vn(e,new eA(m,g,u),1));break;case d4:s.push(Sp(e,new tA(m,g,u),1));break;case u4:s.push(Vn(e,new nA(m,g,u),1));break;case h4:s.push(Vn(e,new iA(m,g,u),1))}}}for(let l=0,d=e.readInt(!0);l<d;l++){let u=e.readInt(!0),h=e.readInt(!0),f=h-1,p=new uA(h,e.readInt(!0),u),m=e.readByte(),g=e.readFloat(),v=(m&1)!=0?(m&2)!=0?e.readFloat():1:0,y=(m&4)!=0?e.readFloat()*r:0;for(let b=0,x=0;p.setFrame(b,g,v,y,(m&8)!=0?1:-1,(m&16)!=0,(m&32)!=0),b!=f;b++){m=e.readByte();const T=e.readFloat(),E=(m&1)!=0?(m&2)!=0?e.readFloat():1:0,S=(m&4)!=0?e.readFloat()*r:0;(m&64)!=0?p.setStepped(b):(m&128)!=0&&(wt(e,p,x++,b,0,g,T,v,E,1),wt(e,p,x++,b,1,g,T,y,S,r)),g=T,v=E,y=S}s.push(p)}for(let l=0,d=e.readInt(!0);l<d;l++){let u=e.readInt(!0),h=e.readInt(!0),f=h-1,p=new hA(h,e.readInt(!0),u),m=e.readFloat(),g=e.readFloat(),v=e.readFloat(),y=e.readFloat(),b=e.readFloat(),x=e.readFloat(),T=e.readFloat();for(let E=0,S=0;p.setFrame(E,m,g,v,y,b,x,T),E!=f;E++){let C=e.readFloat(),M=e.readFloat(),k=e.readFloat(),P=e.readFloat(),I=e.readFloat(),D=e.readFloat(),$=e.readFloat();switch(e.readByte()){case bs:p.setStepped(E);break;case ys:wt(e,p,S++,E,0,m,C,g,M,1),wt(e,p,S++,E,1,m,C,v,k,1),wt(e,p,S++,E,2,m,C,y,P,1),wt(e,p,S++,E,3,m,C,b,I,1),wt(e,p,S++,E,4,m,C,x,D,1),wt(e,p,S++,E,5,m,C,T,$,1)}m=C,g=M,v=k,y=P,b=I,x=D,T=$}s.push(p)}for(let l=0,d=e.readInt(!0);l<d;l++){let u=e.readInt(!0),h=n.pathConstraints[u];for(let f=0,p=e.readInt(!0);f<p;f++){const m=e.readByte(),g=e.readInt(!0),v=e.readInt(!0);switch(m){case S4:s.push(Vn(e,new fA(g,v,u),h.positionMode==Ds.Fixed?r:1));break;case C4:s.push(Vn(e,new pA(g,v,u),h.spacingMode==Tn.Length||h.spacingMode==Tn.Fixed?r:1));break;case A4:let y=new mA(g,v,u),b=e.readFloat(),x=e.readFloat(),T=e.readFloat(),E=e.readFloat();for(let S=0,C=0,M=y.getFrameCount()-1;y.setFrame(S,b,x,T,E),S!=M;S++){let k=e.readFloat(),P=e.readFloat(),I=e.readFloat(),D=e.readFloat();switch(e.readByte()){case bs:y.setStepped(S);break;case ys:wt(e,y,C++,S,0,b,k,x,P,1),wt(e,y,C++,S,1,b,k,T,I,1),wt(e,y,C++,S,2,b,k,E,D,1)}b=k,x=P,T=I,E=D}s.push(y)}}}for(let l=0,d=e.readInt(!0);l<d;l++){const u=e.readInt(!0)-1;for(let h=0,f=e.readInt(!0);h<f;h++){const p=e.readByte(),m=e.readInt(!0);if(p==R4){const v=new CA(m,u);for(let y=0;y<m;y++)v.setFrame(y,e.readFloat());s.push(v);continue}const g=e.readInt(!0);switch(p){case T4:s.push(Vn(e,new gA(m,g,u),1));break;case E4:s.push(Vn(e,new vA(m,g,u),1));break;case _4:s.push(Vn(e,new bA(m,g,u),1));break;case M4:s.push(Vn(e,new yA(m,g,u),1));break;case P4:s.push(Vn(e,new xA(m,g,u),1));break;case k4:s.push(Vn(e,new wA(m,g,u),1));break;case I4:s.push(Vn(e,new SA(m,g,u),1))}}}for(let l=0,d=e.readInt(!0);l<d;l++){let u=n.skins[e.readInt(!0)];for(let h=0,f=e.readInt(!0);h<f;h++){let p=e.readInt(!0);for(let m=0,g=e.readInt(!0);m<g;m++){let v=e.readStringRef();if(!v)throw new Error("attachmentName must not be null.");let y=u.getAttachment(p,v),b=e.readByte(),x=e.readInt(!0),T=x-1;switch(b){case x4:{let E=y,S=E.bones,C=E.vertices,M=S?C.length/3*2:C.length,k=e.readInt(!0),P=new dA(x,k,p,E),I=e.readFloat();for(let D=0,$=0;;D++){let j,B=e.readInt(!0);if(B==0)j=S?Ne.newFloatArray(M):C;else{j=Ne.newFloatArray(M);let U=e.readInt(!0);if(B+=U,r==1)for(let O=U;O<B;O++)j[O]=e.readFloat();else for(let O=U;O<B;O++)j[O]=e.readFloat()*r;if(!S)for(let O=0,L=j.length;O<L;O++)j[O]+=C[O]}if(P.setFrame(D,I,j),D==T)break;let Y=e.readFloat();switch(e.readByte()){case bs:P.setStepped(D);break;case ys:wt(e,P,$++,D,0,I,Y,0,1,1)}I=Y}s.push(P);break}case w4:{let E=new AA(x,p,y);for(let S=0;S<x;S++){let C=e.readFloat(),M=e.readInt32();E.setFrame(S,C,WC[M&15],M>>4,e.readFloat())}s.push(E);break}}}}}let o=e.readInt(!0);if(o>0){let l=new Ul(o),d=n.slots.length;for(let u=0;u<o;u++){let h=e.readFloat(),f=e.readInt(!0),p=Ne.newArray(d,0);for(let y=d-1;y>=0;y--)p[y]=-1;let m=Ne.newArray(d-f,0),g=0,v=0;for(let y=0;y<f;y++){let b=e.readInt(!0);for(;g!=b;)m[v++]=g++;p[g+e.readInt(!0)]=g++}for(;g<d;)m[v++]=g++;for(let y=d-1;y>=0;y--)p[y]==-1&&(p[y]=m[--v]);l.setFrame(u,h,p)}s.push(l)}let a=e.readInt(!0);if(a>0){let l=new sv(a);for(let d=0;d<a;d++){let u=e.readFloat(),h=n.events[e.readInt(!0)],f=new LA(u,h);f.intValue=e.readInt(!1),f.floatValue=e.readFloat(),f.stringValue=e.readString(),f.stringValue==null&&(f.stringValue=h.stringValue),f.data.audioPath&&(f.volume=e.readFloat(),f.balance=e.readFloat()),l.setFrame(d,f)}s.push(l)}let c=0;for(let l=0,d=s.length;l<d;l++)c=Math.max(c,s[l].getDuration());return new nv(t,s,c)}},e4=class{constructor(e,t=new Array,n=0,s=new DataView(e instanceof ArrayBuffer?e:e.buffer)){A(this,"strings");A(this,"index");A(this,"buffer");this.strings=t,this.index=n,this.buffer=s}readByte(){return this.buffer.getInt8(this.index++)}readUnsignedByte(){return this.buffer.getUint8(this.index++)}readShort(){let e=this.buffer.getInt16(this.index);return this.index+=2,e}readInt32(){let e=this.buffer.getInt32(this.index);return this.index+=4,e}readInt(e){let t=this.readByte(),n=t&127;return(t&128)!=0&&(t=this.readByte(),n|=(t&127)<<7,(t&128)!=0&&(t=this.readByte(),n|=(t&127)<<14,(t&128)!=0&&(t=this.readByte(),n|=(t&127)<<21,(t&128)!=0&&(t=this.readByte(),n|=(t&127)<<28)))),e?n:n>>>1^-(n&1)}readStringRef(){let e=this.readInt(!0);return e==0?null:this.strings[e-1]}readString(){let e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;let t="";for(let n=0;n<e;){let s=this.readUnsignedByte();switch(s>>4){case 12:case 13:t+=String.fromCharCode((s&31)<<6|this.readByte()&63),n+=2;break;case 14:t+=String.fromCharCode((s&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),n+=3;break;default:t+=String.fromCharCode(s),n++}}return t}readFloat(){let e=this.buffer.getFloat32(this.index);return this.index+=4,e}readBoolean(){return this.readByte()!=0}},t4=class{constructor(e,t,n,s,r){A(this,"parent");A(this,"skinIndex");A(this,"slotIndex");A(this,"mesh");A(this,"inheritTimeline");this.mesh=e,this.skinIndex=t,this.slotIndex=n,this.parent=s,this.inheritTimeline=r}},n4=class{constructor(e=null,t=null,n=0){A(this,"bones");A(this,"vertices");A(this,"length");this.bones=e,this.vertices=t,this.length=n}};var Ws;(function(i){i[i.Region=0]="Region",i[i.BoundingBox=1]="BoundingBox",i[i.Mesh=2]="Mesh",i[i.LinkedMesh=3]="LinkedMesh",i[i.Path=4]="Path",i[i.Point=5]="Point",i[i.Clipping=6]="Clipping"})(Ws||(Ws={}));function Vn(i,e,t){let n=i.readFloat(),s=i.readFloat()*t;for(let r=0,o=0,a=e.getFrameCount()-1;e.setFrame(r,n,s),r!=a;r++){let c=i.readFloat(),l=i.readFloat()*t;switch(i.readByte()){case bs:e.setStepped(r);break;case ys:wt(i,e,o++,r,0,n,c,s,l,t)}n=c,s=l}return e}function Sp(i,e,t){let n=i.readFloat(),s=i.readFloat()*t,r=i.readFloat()*t;for(let o=0,a=0,c=e.getFrameCount()-1;e.setFrame(o,n,s,r),o!=c;o++){let l=i.readFloat(),d=i.readFloat()*t,u=i.readFloat()*t;switch(i.readByte()){case bs:e.setStepped(o);break;case ys:wt(i,e,a++,o,0,n,l,s,d,t),wt(i,e,a++,o,1,n,l,r,u,t)}n=l,s=d,r=u}return e}function wt(i,e,t,n,s,r,o,a,c,l){e.setBezier(t,n,s,r,a,i.readFloat(),i.readFloat()*l,i.readFloat(),i.readFloat()*l,o,c)}const i4=0,s4=1,r4=2,o4=3,a4=4,l4=5,c4=6,d4=7,u4=8,h4=9,f4=10,p4=0,m4=1,g4=2,v4=3,b4=4,y4=5,x4=0,w4=1,S4=0,C4=1,A4=2,T4=0,E4=1,_4=2,M4=4,P4=5,k4=6,I4=7,R4=8,bs=1,ys=2;class di{constructor(){A(this,"convexPolygons",new Array);A(this,"convexPolygonsIndices",new Array);A(this,"indicesArray",new Array);A(this,"isConcaveArray",new Array);A(this,"triangles",new Array);A(this,"polygonPool",new wu(()=>new Array));A(this,"polygonIndicesPool",new wu(()=>new Array))}triangulate(e){let t=e,n=e.length>>1,s=this.indicesArray;s.length=0;for(let a=0;a<n;a++)s[a]=a;let r=this.isConcaveArray;r.length=0;for(let a=0,c=n;a<c;++a)r[a]=di.isConcave(a,n,t,s);let o=this.triangles;for(o.length=0;n>3;){let a=n-1,c=0,l=1;for(;;){e:if(!r[c]){let h=s[a]<<1,f=s[c]<<1,p=s[l]<<1,m=t[h],g=t[h+1],v=t[f],y=t[f+1],b=t[p],x=t[p+1];for(let T=(l+1)%n;T!=a;T=(T+1)%n){if(!r[T])continue;let E=s[T]<<1,S=t[E],C=t[E+1];if(di.positiveArea(b,x,m,g,S,C)&&di.positiveArea(m,g,v,y,S,C)&&di.positiveArea(v,y,b,x,S,C))break e}break}if(l==0){do{if(!r[c])break;c--}while(c>0);break}a=c,c=l,l=(l+1)%n}o.push(s[(n+c-1)%n]),o.push(s[c]),o.push(s[(c+1)%n]),s.splice(c,1),r.splice(c,1),n--;let d=(n+c-1)%n,u=c==n?0:c;r[d]=di.isConcave(d,n,t,s),r[u]=di.isConcave(u,n,t,s)}return n==3&&(o.push(s[2]),o.push(s[0]),o.push(s[1])),o}decompose(e,t){let n=e,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let o=this.polygonIndicesPool.obtain();o.length=0;let a=this.polygonPool.obtain();a.length=0;let c=-1,l=0;for(let d=0,u=t.length;d<u;d+=3){let h=t[d]<<1,f=t[d+1]<<1,p=t[d+2]<<1,m=n[h],g=n[h+1],v=n[f],y=n[f+1],b=n[p],x=n[p+1],T=!1;if(c==h){let E=a.length-4,S=di.winding(a[E],a[E+1],a[E+2],a[E+3],b,x),C=di.winding(b,x,a[0],a[1],a[2],a[3]);S==l&&C==l&&(a.push(b),a.push(x),o.push(p),T=!0)}T||(a.length>0?(s.push(a),r.push(o)):(this.polygonPool.free(a),this.polygonIndicesPool.free(o)),a=this.polygonPool.obtain(),a.length=0,a.push(m),a.push(g),a.push(v),a.push(y),a.push(b),a.push(x),o=this.polygonIndicesPool.obtain(),o.length=0,o.push(h),o.push(f),o.push(p),l=di.winding(m,g,v,y,b,x),c=h)}a.length>0&&(s.push(a),r.push(o));for(let d=0,u=s.length;d<u;d++){if(o=r[d],o.length==0)continue;let h=o[0],f=o[o.length-1];a=s[d];let p=a.length-4,m=a[p],g=a[p+1],v=a[p+2],y=a[p+3],b=a[0],x=a[1],T=a[2],E=a[3],S=di.winding(m,g,v,y,b,x);for(let C=0;C<u;C++){if(C==d)continue;let M=r[C];if(M.length!=3)continue;let k=M[0],P=M[1],I=M[2],D=s[C],$=D[D.length-2],j=D[D.length-1];if(k!=h||P!=f)continue;let B=di.winding(m,g,v,y,$,j),Y=di.winding($,j,b,x,T,E);B==S&&Y==S&&(D.length=0,M.length=0,a.push($),a.push(j),o.push(I),m=v,g=y,v=$,y=j,C=0)}}for(let d=s.length-1;d>=0;d--)a=s[d],a.length==0&&(s.splice(d,1),this.polygonPool.free(a),o=r[d],r.splice(d,1),this.polygonIndicesPool.free(o));return s}static isConcave(e,t,n,s){let r=s[(t+e-1)%t]<<1,o=s[e]<<1,a=s[(e+1)%t]<<1;return!this.positiveArea(n[r],n[r+1],n[o],n[o+1],n[a],n[a+1])}static positiveArea(e,t,n,s,r,o){return e*(o-s)+n*(t-o)+r*(s-t)>=0}static winding(e,t,n,s,r,o){let a=n-e,c=s-t;return r*c-o*a+a*t-e*c>=0?1:-1}}class Tu{constructor(){A(this,"triangulator",new di);A(this,"clippingPolygon",new Array);A(this,"clipOutput",new Array);A(this,"clippedVertices",new Array);A(this,"clippedUVs",new Array);A(this,"clippedTriangles",new Array);A(this,"scratch",new Array);A(this,"clipAttachment",null);A(this,"clippingPolygons",null)}clipStart(e,t){if(this.clipAttachment)return 0;this.clipAttachment=t;let n=t.worldVerticesLength,s=Ne.setArraySize(this.clippingPolygon,n);t.computeWorldVertices(e,0,n,s,0,2);let r=this.clippingPolygon;Tu.makeClockwise(r);let o=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let a=0,c=o.length;a<c;a++){let l=o[a];Tu.makeClockwise(l),l.push(l[0]),l.push(l[1])}return o.length}clipEndWithSlot(e){this.clipAttachment&&this.clipAttachment.endSlot==e.data&&this.clipEnd()}clipEnd(){this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)}isClipping(){return this.clipAttachment!=null}clipTriangles(e,t,n,s,r,o,a,c){let l,d,u,h,f,p;typeof t=="number"?(l=n,d=s,u=r,h=o,f=a,p=c):(l=t,d=n,u=s,h=r,f=o,p=a),u&&h&&f&&typeof p=="boolean"?this.clipTrianglesRender(e,l,d,u,h,f,p):this.clipTrianglesNoRender(e,l,d)}clipTrianglesNoRender(e,t,n){let s=this.clipOutput,r=this.clippedVertices,o=this.clippedTriangles,a=this.clippingPolygons,c=a.length,l=0;r.length=0,o.length=0;for(let d=0;d<n;d+=3){let u=t[d]<<1,h=e[u],f=e[u+1];u=t[d+1]<<1;let p=e[u],m=e[u+1];u=t[d+2]<<1;let g=e[u],v=e[u+1];for(let y=0;y<c;y++){let b=r.length;if(this.clip(h,f,p,m,g,v,a[y],s)){let x=s.length;if(x==0)continue;let T=x>>1,E=this.clipOutput,S=Ne.setArraySize(r,b+T*2);for(let M=0;M<x;M+=2,b+=2){let k=E[M],P=E[M+1];S[b]=k,S[b+1]=P}b=o.length;let C=Ne.setArraySize(o,b+3*(T-2));T--;for(let M=1;M<T;M++,b+=3)C[b]=l,C[b+1]=l+M,C[b+2]=l+M+1;l+=T+1}else{let x=Ne.setArraySize(r,b+6);x[b]=h,x[b+1]=f,x[b+2]=p,x[b+3]=m,x[b+4]=g,x[b+5]=v,b=o.length;let T=Ne.setArraySize(o,b+3);T[b]=l,T[b+1]=l+1,T[b+2]=l+2,l+=3;break}}}}clipTrianglesRender(e,t,n,s,r,o,a){let c=this.clipOutput,l=this.clippedVertices,d=this.clippedTriangles,u=this.clippingPolygons,h=u.length,f=a?12:8,p=0;l.length=0,d.length=0;for(let m=0;m<n;m+=3){let g=t[m]<<1,v=e[g],y=e[g+1],b=s[g],x=s[g+1];g=t[m+1]<<1;let T=e[g],E=e[g+1],S=s[g],C=s[g+1];g=t[m+2]<<1;let M=e[g],k=e[g+1],P=s[g],I=s[g+1];for(let D=0;D<h;D++){let $=l.length;if(this.clip(v,y,T,E,M,k,u[D],c)){let j=c.length;if(j==0)continue;let B=E-k,Y=M-T,U=v-M,O=k-y,L=1/(B*U+Y*(y-k)),R=j>>1,X=this.clipOutput,z=Ne.setArraySize(l,$+R*f);for(let Z=0;Z<j;Z+=2,$+=f){let ae=X[Z],ce=X[Z+1];z[$]=ae,z[$+1]=ce,z[$+2]=r.r,z[$+3]=r.g,z[$+4]=r.b,z[$+5]=r.a;let ve=ae-M,we=ce-k,re=(B*ve+Y*we)*L,Ee=(O*ve+U*we)*L,q=1-re-Ee;z[$+6]=b*re+S*Ee+P*q,z[$+7]=x*re+C*Ee+I*q,a&&(z[$+8]=o.r,z[$+9]=o.g,z[$+10]=o.b,z[$+11]=o.a)}$=d.length;let K=Ne.setArraySize(d,$+3*(R-2));R--;for(let Z=1;Z<R;Z++,$+=3)K[$]=p,K[$+1]=p+Z,K[$+2]=p+Z+1;p+=R+1}else{let j=Ne.setArraySize(l,$+3*f);j[$]=v,j[$+1]=y,j[$+2]=r.r,j[$+3]=r.g,j[$+4]=r.b,j[$+5]=r.a,a?(j[$+6]=b,j[$+7]=x,j[$+8]=o.r,j[$+9]=o.g,j[$+10]=o.b,j[$+11]=o.a,j[$+12]=T,j[$+13]=E,j[$+14]=r.r,j[$+15]=r.g,j[$+16]=r.b,j[$+17]=r.a,j[$+18]=S,j[$+19]=C,j[$+20]=o.r,j[$+21]=o.g,j[$+22]=o.b,j[$+23]=o.a,j[$+24]=M,j[$+25]=k,j[$+26]=r.r,j[$+27]=r.g,j[$+28]=r.b,j[$+29]=r.a,j[$+30]=P,j[$+31]=I,j[$+32]=o.r,j[$+33]=o.g,j[$+34]=o.b,j[$+35]=o.a):(j[$+6]=b,j[$+7]=x,j[$+8]=T,j[$+9]=E,j[$+10]=r.r,j[$+11]=r.g,j[$+12]=r.b,j[$+13]=r.a,j[$+14]=S,j[$+15]=C,j[$+16]=M,j[$+17]=k,j[$+18]=r.r,j[$+19]=r.g,j[$+20]=r.b,j[$+21]=r.a,j[$+22]=P,j[$+23]=I),$=d.length;let B=Ne.setArraySize(d,$+3);B[$]=p,B[$+1]=p+1,B[$+2]=p+2,p+=3;break}}}}clipTrianglesUnpacked(e,t,n,s){let r=this.clipOutput,o=this.clippedVertices,a=this.clippedUVs,c=this.clippedTriangles,l=this.clippingPolygons,d=l.length,u=0;o.length=0,a.length=0,c.length=0;for(let h=0;h<n;h+=3){let f=t[h]<<1,p=e[f],m=e[f+1],g=s[f],v=s[f+1];f=t[h+1]<<1;let y=e[f],b=e[f+1],x=s[f],T=s[f+1];f=t[h+2]<<1;let E=e[f],S=e[f+1],C=s[f],M=s[f+1];for(let k=0;k<d;k++){let P=o.length;if(this.clip(p,m,y,b,E,S,l[k],r)){let I=r.length;if(I==0)continue;let D=b-S,$=E-y,j=p-E,B=S-m,Y=1/(D*j+$*(m-S)),U=I>>1,O=this.clipOutput,L=Ne.setArraySize(o,P+U*2),R=Ne.setArraySize(a,P+U*2);for(let z=0;z<I;z+=2,P+=2){let K=O[z],Z=O[z+1];L[P]=K,L[P+1]=Z;let ae=K-E,ce=Z-S,ve=(D*ae+$*ce)*Y,we=(B*ae+j*ce)*Y,re=1-ve-we;R[P]=g*ve+x*we+C*re,R[P+1]=v*ve+T*we+M*re}P=c.length;let X=Ne.setArraySize(c,P+3*(U-2));U--;for(let z=1;z<U;z++,P+=3)X[P]=u,X[P+1]=u+z,X[P+2]=u+z+1;u+=U+1}else{let I=Ne.setArraySize(o,P+6);I[P]=p,I[P+1]=m,I[P+2]=y,I[P+3]=b,I[P+4]=E,I[P+5]=S;let D=Ne.setArraySize(a,P+6);D[P]=g,D[P+1]=v,D[P+2]=x,D[P+3]=T,D[P+4]=C,D[P+5]=M,P=c.length;let $=Ne.setArraySize(c,P+3);$[P]=u,$[P+1]=u+1,$[P+2]=u+2,u+=3;break}}}}clip(e,t,n,s,r,o,a,c){let l=c,d=!1,u;a.length%4>=2?(u=c,c=this.scratch):u=this.scratch,u.length=0,u.push(e),u.push(t),u.push(n),u.push(s),u.push(r),u.push(o),u.push(e),u.push(t),c.length=0;let h=a.length-4,f=a;for(let p=0;;p+=2){let m=f[p],g=f[p+1],v=m-f[p+2],y=g-f[p+3],b=c.length,x=u;for(let E=0,S=u.length-2;E<S;){let C=x[E],M=x[E+1];E+=2;let k=x[E],P=x[E+1],I=y*(m-k)>v*(g-P),D=y*(m-C)-v*(g-M);if(D>0){if(I){c.push(k),c.push(P);continue}let $=k-C,j=P-M,B=D/($*y-j*v);if(B>=0&&B<=1)c.push(C+$*B),c.push(M+j*B);else{c.push(k),c.push(P);continue}}else if(I){let $=k-C,j=P-M,B=D/($*y-j*v);if(B>=0&&B<=1)c.push(C+$*B),c.push(M+j*B),c.push(k),c.push(P);else{c.push(k),c.push(P);continue}}d=!0}if(b==c.length)return l.length=0,!0;if(c.push(c[0]),c.push(c[1]),p==h)break;let T=c;c=u,c.length=0,u=T}if(l!=c){l.length=0;for(let p=0,m=c.length-2;p<m;p++)l[p]=c[p]}else l.length=l.length-2;return d}static makeClockwise(e){let t=e,n=e.length,s=t[n-2]*t[1]-t[0]*t[n-1],r=0,o=0,a=0,c=0;for(let l=0,d=n-3;l<d;l+=2)r=t[l],o=t[l+1],a=t[l+2],c=t[l+3],s+=r*c-a*o;if(!(s<0))for(let l=0,d=n-2,u=n>>1;l<u;l+=2){let h=t[l],f=t[l+1],p=d-l;t[l]=t[p],t[l+1]=t[p+1],t[p]=h,t[p+1]=f}}}let Eu=class{constructor(e){A(this,"attachmentLoader");A(this,"scale",1);A(this,"linkedMeshes",new Array);this.attachmentLoader=e}readSkeletonData(e){let t=this.scale,n=new Au,s=typeof e=="string"?JSON.parse(e):e,r=s.skeleton;if(r&&(n.hash=r.hash,n.version=r.spine,n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height,n.referenceScale=le(r,"referenceScale",100)*t,n.fps=r.fps,n.imagesPath=r.images??null,n.audioPath=r.audio??null),s.bones)for(let o=0;o<s.bones.length;o++){let a=s.bones[o],c=null,l=le(a,"parent",null);l&&(c=n.findBone(l));let d=new FA(n.bones.length,a.name,c);d.length=le(a,"length",0)*t,d.x=le(a,"x",0)*t,d.y=le(a,"y",0)*t,d.rotation=le(a,"rotation",0),d.scaleX=le(a,"scaleX",1),d.scaleY=le(a,"scaleY",1),d.shearX=le(a,"shearX",0),d.shearY=le(a,"shearY",0),d.inherit=Ne.enumValue(ln,le(a,"inherit","Normal")),d.skinRequired=le(a,"skin",!1);let u=le(a,"color",null);u&&d.color.setFromString(u),n.bones.push(d)}if(s.slots)for(let o=0;o<s.slots.length;o++){let a=s.slots[o],c=a.name,l=n.findBone(a.bone);if(!l)throw new Error(`Couldn't find bone ${a.bone} for slot ${c}`);let d=new BA(n.slots.length,c,l),u=le(a,"color",null);u&&d.color.setFromString(u);let h=le(a,"dark",null);h&&(d.darkColor=ut.fromString(h)),d.attachmentName=le(a,"attachment",null),d.blendMode=Ne.enumValue(Jr,le(a,"blend","normal")),d.visible=le(a,"visible",!0),n.slots.push(d)}if(s.ik)for(let o=0;o<s.ik.length;o++){let a=s.ik[o],c=new OA(a.name);c.order=le(a,"order",0),c.skinRequired=le(a,"skin",!1);for(let d=0;d<a.bones.length;d++){let u=n.findBone(a.bones[d]);if(!u)throw new Error(`Couldn't find bone ${a.bones[d]} for IK constraint ${a.name}.`);c.bones.push(u)}let l=n.findBone(a.target);if(!l)throw new Error(`Couldn't find target bone ${a.target} for IK constraint ${a.name}.`);c.target=l,c.mix=le(a,"mix",1),c.softness=le(a,"softness",0)*t,c.bendDirection=le(a,"bendPositive",!0)?1:-1,c.compress=le(a,"compress",!1),c.stretch=le(a,"stretch",!1),c.uniform=le(a,"uniform",!1),n.ikConstraints.push(c)}if(s.transform)for(let o=0;o<s.transform.length;o++){let a=s.transform[o],c=new UA(a.name);c.order=le(a,"order",0),c.skinRequired=le(a,"skin",!1);for(let u=0;u<a.bones.length;u++){let h=a.bones[u],f=n.findBone(h);if(!f)throw new Error(`Couldn't find bone ${h} for transform constraint ${a.name}.`);c.bones.push(f)}let l=a.target,d=n.findBone(l);if(!d)throw new Error(`Couldn't find target bone ${l} for transform constraint ${a.name}.`);c.target=d,c.local=le(a,"local",!1),c.relative=le(a,"relative",!1),c.offsetRotation=le(a,"rotation",0),c.offsetX=le(a,"x",0)*t,c.offsetY=le(a,"y",0)*t,c.offsetScaleX=le(a,"scaleX",0),c.offsetScaleY=le(a,"scaleY",0),c.offsetShearY=le(a,"shearY",0),c.mixRotate=le(a,"mixRotate",1),c.mixX=le(a,"mixX",1),c.mixY=le(a,"mixY",c.mixX),c.mixScaleX=le(a,"mixScaleX",1),c.mixScaleY=le(a,"mixScaleY",c.mixScaleX),c.mixShearY=le(a,"mixShearY",1),n.transformConstraints.push(c)}if(s.path)for(let o=0;o<s.path.length;o++){let a=s.path[o],c=new NA(a.name);c.order=le(a,"order",0),c.skinRequired=le(a,"skin",!1);for(let u=0;u<a.bones.length;u++){let h=a.bones[u],f=n.findBone(h);if(!f)throw new Error(`Couldn't find bone ${h} for path constraint ${a.name}.`);c.bones.push(f)}let l=a.target,d=n.findSlot(l);if(!d)throw new Error(`Couldn't find target slot ${l} for path constraint ${a.name}.`);c.target=d,c.positionMode=Ne.enumValue(Ds,le(a,"positionMode","Percent")),c.spacingMode=Ne.enumValue(Tn,le(a,"spacingMode","Length")),c.rotateMode=Ne.enumValue(Xo,le(a,"rotateMode","Tangent")),c.offsetRotation=le(a,"rotation",0),c.position=le(a,"position",0),c.positionMode==Ds.Fixed&&(c.position*=t),c.spacing=le(a,"spacing",0),(c.spacingMode==Tn.Length||c.spacingMode==Tn.Fixed)&&(c.spacing*=t),c.mixRotate=le(a,"mixRotate",1),c.mixX=le(a,"mixX",1),c.mixY=le(a,"mixY",c.mixX),n.pathConstraints.push(c)}if(s.physics)for(let o=0;o<s.physics.length;o++){const a=s.physics[o],c=new $A(a.name);c.order=le(a,"order",0),c.skinRequired=le(a,"skin",!1);const l=a.bone,d=n.findBone(l);if(d==null)throw new Error("Physics bone not found: "+l);c.bone=d,c.x=le(a,"x",0),c.y=le(a,"y",0),c.rotate=le(a,"rotate",0),c.scaleX=le(a,"scaleX",0),c.shearX=le(a,"shearX",0),c.limit=le(a,"limit",5e3)*t,c.step=1/le(a,"fps",60),c.inertia=le(a,"inertia",1),c.strength=le(a,"strength",100),c.damping=le(a,"damping",1),c.massInverse=1/le(a,"mass",1),c.wind=le(a,"wind",0),c.gravity=le(a,"gravity",0),c.mix=le(a,"mix",1),c.inertiaGlobal=le(a,"inertiaGlobal",!1),c.strengthGlobal=le(a,"strengthGlobal",!1),c.dampingGlobal=le(a,"dampingGlobal",!1),c.massGlobal=le(a,"massGlobal",!1),c.windGlobal=le(a,"windGlobal",!1),c.gravityGlobal=le(a,"gravityGlobal",!1),c.mixGlobal=le(a,"mixGlobal",!1),n.physicsConstraints.push(c)}if(s.skins)for(let o=0;o<s.skins.length;o++){let a=s.skins[o],c=new Um(a.name);if(a.bones)for(let l=0;l<a.bones.length;l++){let d=a.bones[l],u=n.findBone(d);if(!u)throw new Error(`Couldn't find bone ${d} for skin ${a.name}.`);c.bones.push(u)}if(a.ik)for(let l=0;l<a.ik.length;l++){let d=a.ik[l],u=n.findIkConstraint(d);if(!u)throw new Error(`Couldn't find IK constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}if(a.transform)for(let l=0;l<a.transform.length;l++){let d=a.transform[l],u=n.findTransformConstraint(d);if(!u)throw new Error(`Couldn't find transform constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}if(a.path)for(let l=0;l<a.path.length;l++){let d=a.path[l],u=n.findPathConstraint(d);if(!u)throw new Error(`Couldn't find path constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}if(a.physics)for(let l=0;l<a.physics.length;l++){let d=a.physics[l],u=n.findPhysicsConstraint(d);if(!u)throw new Error(`Couldn't find physics constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}for(let l in a.attachments){let d=n.findSlot(l);if(!d)throw new Error(`Couldn't find slot ${l} for skin ${a.name}.`);let u=a.attachments[l];for(let h in u){let f=this.readAttachment(u[h],c,d.index,h,n);f&&c.setAttachment(d.index,h,f)}}n.skins.push(c),c.name=="default"&&(n.defaultSkin=c)}for(let o=0,a=this.linkedMeshes.length;o<a;o++){let c=this.linkedMeshes[o],l=c.skin?n.findSkin(c.skin):n.defaultSkin;if(!l)throw new Error(`Skin not found: ${c.skin}`);let d=l.getAttachment(c.slotIndex,c.parent);if(!d)throw new Error(`Parent mesh not found: ${c.parent}`);c.mesh.timelineAttachment=c.inheritTimeline?d:c.mesh,c.mesh.setParentMesh(d),c.mesh.region!=null&&c.mesh.updateRegion()}if(this.linkedMeshes.length=0,s.events)for(let o in s.events){let a=s.events[o],c=new DA(o);c.intValue=le(a,"int",0),c.floatValue=le(a,"float",0),c.stringValue=le(a,"string",""),c.audioPath=le(a,"audio",null),c.audioPath&&(c.volume=le(a,"volume",1),c.balance=le(a,"balance",0)),n.events.push(c)}if(s.animations)for(let o in s.animations){let a=s.animations[o];this.readAnimation(a,o,n)}return n}readAttachment(e,t,n,s,r){let o=this.scale;switch(s=le(e,"name",s),le(e,"type","region")){case"region":{let a=le(e,"path",s),c=this.readSequence(le(e,"sequence",null)),l=this.attachmentLoader.newRegionAttachment(t,s,a,c);if(!l)return null;l.path=a,l.x=le(e,"x",0)*o,l.y=le(e,"y",0)*o,l.scaleX=le(e,"scaleX",1),l.scaleY=le(e,"scaleY",1),l.rotation=le(e,"rotation",0),l.width=e.width*o,l.height=e.height*o,l.sequence=c;let d=le(e,"color",null);return d&&l.color.setFromString(d),l.region!=null&&l.updateRegion(),l}case"boundingbox":{let a=this.attachmentLoader.newBoundingBoxAttachment(t,s);if(!a)return null;this.readVertices(e,a,e.vertexCount<<1);let c=le(e,"color",null);return c&&a.color.setFromString(c),a}case"mesh":case"linkedmesh":{let a=le(e,"path",s),c=this.readSequence(le(e,"sequence",null)),l=this.attachmentLoader.newMeshAttachment(t,s,a,c);if(!l)return null;l.path=a;let d=le(e,"color",null);d&&l.color.setFromString(d),l.width=le(e,"width",0)*o,l.height=le(e,"height",0)*o,l.sequence=c;let u=le(e,"parent",null);if(u)return this.linkedMeshes.push(new F4(l,le(e,"skin",null),n,u,le(e,"timelines",!0))),l;let h=e.uvs;return this.readVertices(e,l,h.length),l.triangles=e.triangles,l.regionUVs=h,l.region!=null&&l.updateRegion(),l.edges=le(e,"edges",null),l.hullLength=le(e,"hull",0)*2,l}case"path":{let a=this.attachmentLoader.newPathAttachment(t,s);if(!a)return null;a.closed=le(e,"closed",!1),a.constantSpeed=le(e,"constantSpeed",!0);let c=e.vertexCount;this.readVertices(e,a,c<<1);let l=Ne.newArray(c/3,0);for(let u=0;u<e.lengths.length;u++)l[u]=e.lengths[u]*o;a.lengths=l;let d=le(e,"color",null);return d&&a.color.setFromString(d),a}case"point":{let a=this.attachmentLoader.newPointAttachment(t,s);if(!a)return null;a.x=le(e,"x",0)*o,a.y=le(e,"y",0)*o,a.rotation=le(e,"rotation",0);let c=le(e,"color",null);return c&&a.color.setFromString(c),a}case"clipping":{let a=this.attachmentLoader.newClippingAttachment(t,s);if(!a)return null;let c=le(e,"end",null);c&&(a.endSlot=r.findSlot(c));let l=e.vertexCount;this.readVertices(e,a,l<<1);let d=le(e,"color",null);return d&&a.color.setFromString(d),a}}return null}readSequence(e){if(e==null)return null;let t=new GC(le(e,"count",0));return t.start=le(e,"start",1),t.digits=le(e,"digits",0),t.setupIndex=le(e,"setup",0),t}readVertices(e,t,n){let s=this.scale;t.worldVerticesLength=n;let r=e.vertices;if(n==r.length){let c=Ne.toFloatArray(r);if(s!=1)for(let l=0,d=r.length;l<d;l++)c[l]*=s;t.vertices=c;return}let o=new Array,a=new Array;for(let c=0,l=r.length;c<l;){let d=r[c++];a.push(d);for(let u=c+d*4;c<u;c+=4)a.push(r[c]),o.push(r[c+1]*s),o.push(r[c+2]*s),o.push(r[c+3])}t.bones=a,t.vertices=Ne.toFloatArray(o)}readAnimation(e,t,n){let s=this.scale,r=new Array;if(e.slots)for(let a in e.slots){let c=e.slots[a],l=n.findSlot(a);if(!l)throw new Error("Slot not found: "+a);let d=l.index;for(let u in c){let h=c[u];if(!h)continue;let f=h.length;if(u=="attachment"){let p=new Ta(f,d);for(let m=0;m<f;m++){let g=h[m];p.setFrame(m,le(g,"time",0),le(g,"name",null))}r.push(p)}else if(u=="rgba"){let p=new rA(f,f<<2,d),m=h[0],g=le(m,"time",0),v=ut.fromString(m.color);for(let y=0,b=0;;y++){p.setFrame(y,g,v.r,v.g,v.b,v.a);let x=h[y+1];if(!x){p.shrink(b);break}let T=le(x,"time",0),E=ut.fromString(x.color),S=m.curve;S&&(b=Tt(S,p,b,y,0,g,T,v.r,E.r,1),b=Tt(S,p,b,y,1,g,T,v.g,E.g,1),b=Tt(S,p,b,y,2,g,T,v.b,E.b,1),b=Tt(S,p,b,y,3,g,T,v.a,E.a,1)),g=T,v=E,m=x}r.push(p)}else if(u=="rgb"){let p=new oA(f,f*3,d),m=h[0],g=le(m,"time",0),v=ut.fromString(m.color);for(let y=0,b=0;;y++){p.setFrame(y,g,v.r,v.g,v.b);let x=h[y+1];if(!x){p.shrink(b);break}let T=le(x,"time",0),E=ut.fromString(x.color),S=m.curve;S&&(b=Tt(S,p,b,y,0,g,T,v.r,E.r,1),b=Tt(S,p,b,y,1,g,T,v.g,E.g,1),b=Tt(S,p,b,y,2,g,T,v.b,E.b,1)),g=T,v=E,m=x}r.push(p)}else if(u=="alpha")r.push(zi(h,new aA(f,f,d),0,1));else if(u=="rgba2"){let p=new lA(f,f*7,d),m=h[0],g=le(m,"time",0),v=ut.fromString(m.light),y=ut.fromString(m.dark);for(let b=0,x=0;;b++){p.setFrame(b,g,v.r,v.g,v.b,v.a,y.r,y.g,y.b);let T=h[b+1];if(!T){p.shrink(x);break}let E=le(T,"time",0),S=ut.fromString(T.light),C=ut.fromString(T.dark),M=m.curve;M&&(x=Tt(M,p,x,b,0,g,E,v.r,S.r,1),x=Tt(M,p,x,b,1,g,E,v.g,S.g,1),x=Tt(M,p,x,b,2,g,E,v.b,S.b,1),x=Tt(M,p,x,b,3,g,E,v.a,S.a,1),x=Tt(M,p,x,b,4,g,E,y.r,C.r,1),x=Tt(M,p,x,b,5,g,E,y.g,C.g,1),x=Tt(M,p,x,b,6,g,E,y.b,C.b,1)),g=E,v=S,y=C,m=T}r.push(p)}else if(u=="rgb2"){let p=new cA(f,f*6,d),m=h[0],g=le(m,"time",0),v=ut.fromString(m.light),y=ut.fromString(m.dark);for(let b=0,x=0;;b++){p.setFrame(b,g,v.r,v.g,v.b,y.r,y.g,y.b);let T=h[b+1];if(!T){p.shrink(x);break}let E=le(T,"time",0),S=ut.fromString(T.light),C=ut.fromString(T.dark),M=m.curve;M&&(x=Tt(M,p,x,b,0,g,E,v.r,S.r,1),x=Tt(M,p,x,b,1,g,E,v.g,S.g,1),x=Tt(M,p,x,b,2,g,E,v.b,S.b,1),x=Tt(M,p,x,b,3,g,E,y.r,C.r,1),x=Tt(M,p,x,b,4,g,E,y.g,C.g,1),x=Tt(M,p,x,b,5,g,E,y.b,C.b,1)),g=E,v=S,y=C,m=T}r.push(p)}}}if(e.bones)for(let a in e.bones){let c=e.bones[a],l=n.findBone(a);if(!l)throw new Error("Bone not found: "+a);let d=l.index;for(let u in c){let h=c[u],f=h.length;if(f!=0){if(u==="rotate")r.push(zi(h,new Cu(f,f,d),0,1));else if(u==="translate"){let p=new qC(f,f<<1,d);r.push(Cp(h,p,"x","y",0,s))}else if(u==="translatex"){let p=new KC(f,f,d);r.push(zi(h,p,0,s))}else if(u==="translatey"){let p=new JC(f,f,d);r.push(zi(h,p,0,s))}else if(u==="scale"){let p=new ZC(f,f<<1,d);r.push(Cp(h,p,"x","y",1,1))}else if(u==="scalex"){let p=new QC(f,f,d);r.push(zi(h,p,1,1))}else if(u==="scaley"){let p=new eA(f,f,d);r.push(zi(h,p,1,1))}else if(u==="shear"){let p=new tA(f,f<<1,d);r.push(Cp(h,p,"x","y",0,1))}else if(u==="shearx"){let p=new nA(f,f,d);r.push(zi(h,p,0,1))}else if(u==="sheary"){let p=new iA(f,f,d);r.push(zi(h,p,0,1))}else if(u==="inherit"){let p=new sA(f,l.index);for(let m=0;m<h.length;m++){let g=h[m];p.setFrame(m,le(g,"time",0),Ne.enumValue(ln,le(g,"inherit","Normal")))}r.push(p)}}}}if(e.ik)for(let a in e.ik){let c=e.ik[a],l=c[0];if(!l)continue;let d=n.findIkConstraint(a);if(!d)throw new Error("IK Constraint not found: "+a);let u=n.ikConstraints.indexOf(d),h=new uA(c.length,c.length<<1,u),f=le(l,"time",0),p=le(l,"mix",1),m=le(l,"softness",0)*s;for(let g=0,v=0;;g++){h.setFrame(g,f,p,m,le(l,"bendPositive",!0)?1:-1,le(l,"compress",!1),le(l,"stretch",!1));let y=c[g+1];if(!y){h.shrink(v);break}let b=le(y,"time",0),x=le(y,"mix",1),T=le(y,"softness",0)*s,E=l.curve;E&&(v=Tt(E,h,v,g,0,f,b,p,x,1),v=Tt(E,h,v,g,1,f,b,m,T,s)),f=b,p=x,m=T,l=y}r.push(h)}if(e.transform)for(let a in e.transform){let c=e.transform[a],l=c[0];if(!l)continue;let d=n.findTransformConstraint(a);if(!d)throw new Error("Transform constraint not found: "+a);let u=n.transformConstraints.indexOf(d),h=new hA(c.length,c.length*6,u),f=le(l,"time",0),p=le(l,"mixRotate",1),m=le(l,"mixX",1),g=le(l,"mixY",m),v=le(l,"mixScaleX",1),y=le(l,"mixScaleY",v),b=le(l,"mixShearY",1);for(let x=0,T=0;;x++){h.setFrame(x,f,p,m,g,v,y,b);let E=c[x+1];if(!E){h.shrink(T);break}let S=le(E,"time",0),C=le(E,"mixRotate",1),M=le(E,"mixX",1),k=le(E,"mixY",M),P=le(E,"mixScaleX",1),I=le(E,"mixScaleY",P),D=le(E,"mixShearY",1),$=l.curve;$&&(T=Tt($,h,T,x,0,f,S,p,C,1),T=Tt($,h,T,x,1,f,S,m,M,1),T=Tt($,h,T,x,2,f,S,g,k,1),T=Tt($,h,T,x,3,f,S,v,P,1),T=Tt($,h,T,x,4,f,S,y,I,1),T=Tt($,h,T,x,5,f,S,b,D,1)),f=S,p=C,m=M,g=k,v=P,y=I,v=P,l=E}r.push(h)}if(e.path)for(let a in e.path){let c=e.path[a],l=n.findPathConstraint(a);if(!l)throw new Error("Path constraint not found: "+a);let d=n.pathConstraints.indexOf(l);for(let u in c){let h=c[u],f=h[0];if(!f)continue;let p=h.length;if(u==="position"){let m=new fA(p,p,d);r.push(zi(h,m,0,l.positionMode==Ds.Fixed?s:1))}else if(u==="spacing"){let m=new pA(p,p,d);r.push(zi(h,m,0,l.spacingMode==Tn.Length||l.spacingMode==Tn.Fixed?s:1))}else if(u==="mix"){let m=new mA(p,p*3,d),g=le(f,"time",0),v=le(f,"mixRotate",1),y=le(f,"mixX",1),b=le(f,"mixY",y);for(let x=0,T=0;;x++){m.setFrame(x,g,v,y,b);let E=h[x+1];if(!E){m.shrink(T);break}let S=le(E,"time",0),C=le(E,"mixRotate",1),M=le(E,"mixX",1),k=le(E,"mixY",M),P=f.curve;P&&(T=Tt(P,m,T,x,0,g,S,v,C,1),T=Tt(P,m,T,x,1,g,S,y,M,1),T=Tt(P,m,T,x,2,g,S,b,k,1)),g=S,v=C,y=M,b=k,f=E}r.push(m)}}}if(e.physics)for(let a in e.physics){let c=e.physics[a],l=-1;if(a.length>0){let d=n.findPhysicsConstraint(a);if(!d)throw new Error("Physics constraint not found: "+a);l=n.physicsConstraints.indexOf(d)}for(let d in c){let u=c[d],h=u[0];if(!h)continue;let f=u.length;if(d=="reset"){const m=new CA(f,l);for(let g=0;h!=null;h=u[g+1],g++)m.setFrame(g,le(h,"time",0));r.push(m);continue}let p;if(d=="inertia")p=new gA(f,f,l);else if(d=="strength")p=new vA(f,f,l);else if(d=="damping")p=new bA(f,f,l);else if(d=="mass")p=new yA(f,f,l);else if(d=="wind")p=new xA(f,f,l);else if(d=="gravity")p=new wA(f,f,l);else if(d=="mix")p=new SA(f,f,l);else continue;r.push(zi(u,p,0,1))}}if(e.attachments)for(let a in e.attachments){let c=e.attachments[a],l=n.findSkin(a);if(!l)throw new Error("Skin not found: "+a);for(let d in c){let u=c[d],h=n.findSlot(d);if(!h)throw new Error("Slot not found: "+d);let f=h.index;for(let p in u){let m=u[p],g=l.getAttachment(f,p);for(let v in m){let y=m[v],b=y[0];if(b){if(v=="deform"){let x=g.bones,T=g.vertices,E=x?T.length/3*2:T.length,S=new dA(y.length,y.length,f,g),C=le(b,"time",0);for(let M=0,k=0;;M++){let P,I=le(b,"vertices",null);if(!I)P=x?Ne.newFloatArray(E):T;else{P=Ne.newFloatArray(E);let B=le(b,"offset",0);if(Ne.arrayCopy(I,0,P,B,I.length),s!=1)for(let Y=B,U=Y+I.length;Y<U;Y++)P[Y]*=s;if(!x)for(let Y=0;Y<E;Y++)P[Y]+=T[Y]}S.setFrame(M,C,P);let D=y[M+1];if(!D){S.shrink(k);break}let $=le(D,"time",0),j=b.curve;j&&(k=Tt(j,S,k,M,0,C,$,0,1,1)),C=$,b=D}r.push(S)}else if(v=="sequence"){let x=new AA(y.length,f,g),T=0;for(let E=0;E<y.length;E++){let S=le(b,"delay",T),C=le(b,"time",0),M=On[le(b,"mode","hold")],k=le(b,"index",0);x.setFrame(E,C,M,k,S),T=S,b=y[E+1]}r.push(x)}}}}}}if(e.drawOrder){let a=new Ul(e.drawOrder.length),c=n.slots.length,l=0;for(let d=0;d<e.drawOrder.length;d++,l++){let u=e.drawOrder[d],h=null,f=le(u,"offsets",null);if(f){h=Ne.newArray(c,-1);let p=Ne.newArray(c-f.length,0),m=0,g=0;for(let v=0;v<f.length;v++){let y=f[v],b=n.findSlot(y.slot);if(!b)throw new Error("Slot not found: "+b);let x=b.index;for(;m!=x;)p[g++]=m++;h[m+y.offset]=m++}for(;m<c;)p[g++]=m++;for(let v=c-1;v>=0;v--)h[v]==-1&&(h[v]=p[--g])}a.setFrame(l,le(u,"time",0),h)}r.push(a)}if(e.events){let a=new sv(e.events.length),c=0;for(let l=0;l<e.events.length;l++,c++){let d=e.events[l],u=n.findEvent(d.name);if(!u)throw new Error("Event not found: "+d.name);let h=new LA(Ne.toSinglePrecision(le(d,"time",0)),u);h.intValue=le(d,"int",u.intValue),h.floatValue=le(d,"float",u.floatValue),h.stringValue=le(d,"string",u.stringValue),h.data.audioPath&&(h.volume=le(d,"volume",1),h.balance=le(d,"balance",0)),a.setFrame(c,h)}r.push(a)}let o=0;for(let a=0,c=r.length;a<c;a++)o=Math.max(o,r[a].getDuration());n.animations.push(new nv(t,r,o))}},F4=class{constructor(e,t,n,s,r){A(this,"parent");A(this,"skin");A(this,"slotIndex");A(this,"mesh");A(this,"inheritTimeline");this.mesh=e,this.skin=t,this.slotIndex=n,this.parent=s,this.inheritTimeline=r}};function zi(i,e,t,n){let s=i[0],r=le(s,"time",0),o=le(s,"value",t)*n,a=0;for(let c=0;;c++){e.setFrame(c,r,o);let l=i[c+1];if(!l)return e.shrink(a),e;let d=le(l,"time",0),u=le(l,"value",t)*n;s.curve&&(a=Tt(s.curve,e,a,c,0,r,d,o,u,n)),r=d,o=u,s=l}}function Cp(i,e,t,n,s,r){let o=i[0],a=le(o,"time",0),c=le(o,t,s)*r,l=le(o,n,s)*r,d=0;for(let u=0;;u++){e.setFrame(u,a,c,l);let h=i[u+1];if(!h)return e.shrink(d),e;let f=le(h,"time",0),p=le(h,t,s)*r,m=le(h,n,s)*r,g=o.curve;g&&(d=Tt(g,e,d,u,0,a,f,c,p,r),d=Tt(g,e,d,u,1,a,f,l,m,r)),a=f,c=p,l=m,o=h}}function Tt(i,e,t,n,s,r,o,a,c,l){if(i=="stepped")return e.setStepped(n),t;let d=s<<2,u=i[d],h=i[d+1]*l,f=i[d+2],p=i[d+3]*l;return e.setBezier(t,n,s,r,a,u,h,f,p,o,c),t+1}function le(i,e,t){return i[e]!==void 0?i[e]:t}typeof Math.fround>"u"&&(Math.fround=(function(i){return function(e){return i[0]=e,i[0]}})(new Float32Array(1)));if(typeof window<"u"&&window.PIXI){let i=window.require;window.require=e=>{if(i)return i(e);if(e.startsWith("@pixi/"))return window.PIXI}}const Ks=class Ks extends j3{constructor(t){super(t.resource.source);A(this,"texture");this.texture=tt.from(t)}static from(t){return Ks.textureMap.has(t)?Ks.textureMap.get(t):new Ks(t)}setFilters(t,n){this.texture.baseTexture.scaleMode=Ks.toPixiTextureFilter(t),this.texture.baseTexture.mipmap=Ks.toPixiMipMap(t)}setWraps(t,n){this.texture.baseTexture.wrapMode=Ks.toPixiTextureWrap(t)}dispose(){this.texture.destroy()}static toPixiTextureFilter(t){switch(t){case kn.Nearest:case kn.MipMapNearestLinear:case kn.MipMapNearestNearest:return Ki.NEAREST;case kn.Linear:case kn.MipMapLinearLinear:case kn.MipMapLinearNearest:return Ki.LINEAR;default:throw new Error(`Unknown texture filter: ${String(t)}`)}}static toPixiMipMap(t){switch(t){case kn.Nearest:case kn.Linear:return Bi.OFF;case kn.MipMapNearestLinear:case kn.MipMapNearestNearest:case kn.MipMapLinearLinear:case kn.MipMapLinearNearest:return Bi.ON;default:throw new Error(`Unknown texture filter: ${String(t)}`)}}static toPixiTextureWrap(t){switch(t){case pr.ClampToEdge:return ts.CLAMP;case pr.MirroredRepeat:return ts.MIRRORED_REPEAT;case pr.Repeat:return ts.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(t)}`)}}static toPixiBlending(t){switch(t){case Jr.Normal:return Qe.NORMAL;case Jr.Additive:return Qe.ADD;case Jr.Multiply:return Qe.MULTIPLY;case Jr.Screen:return Qe.SCREEN;default:throw new Error(`Unknown blendMode: ${String(t)}`)}}};A(Ks,"textureMap",new Map);let Wo=Ks;const Js=class Js extends ac{constructor(){const t=new zg;t.getBuffer("aVertexPosition").static=!1,t.getBuffer("aTextureCoord").static=!1;const n=new fu(tt.EMPTY);super(t,n);A(this,"name","");A(this,"warnedTwoTint",!1)}updateFromSpineData(t,n,s,r,o,a,c,l){var v,y;this.texture=t.texture;const d=o/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((v=u.data)==null?void 0:v.length)!==d&&(u.data=new Float32Array(d));const h=this.geometry.getBuffer("aVertexPosition");((y=h.data)==null?void 0:y.length)!==d&&(h.data=new Float32Array(d));let f=0,p=u.data,m=h.data;for(let b=0;b<o;b+=l?12:8){let x=b;m[f]=r[x++],m[f+1]=r[x++],x+=4,p[f]=r[x++],p[f+1]=r[x++],f+=2}l&&!this.warnedTwoTint&&(console.warn("DarkTint is not enabled by default. To enable use a DarkSlotMesh factory while creating the Spine object."),this.warnedTwoTint=!0),Js.auxColor[0]=r[2],Js.auxColor[1]=r[3],Js.auxColor[2]=r[4],Js.auxColor[3]=r[5],this.tint=Js.auxColor,this.alpha=Js.auxColor[3],this.blendMode=Wo.toPixiBlending(n);const g=this.geometry.indexBuffer;if(g.data.length!==a.length)g.data=new Uint32Array(a);else{const b=g.data;for(let x=0;x<c;x++)b[x]=a[x]}this.name=s,u.update(),h.update(),g.update()}};A(Js,"auxColor",[0,0,0,0]);let Xm=Js;class L4 extends Ns{constructor(e=!1){super();const t=new Kt(void 0),n=new Kt(void 0,!0),s=new Kt(void 0,!0,!0);this.addAttribute("aVertexPosition",t,2,!1,je.FLOAT),this.addAttribute("aTextureCoord",n,2,!1,je.FLOAT),this.addIndex(s)}}const D4=`
|
||
attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
uniform mat3 translationMatrix;
|
||
uniform mat3 uTextureMatrix;
|
||
|
||
varying vec2 vTextureCoord;
|
||
|
||
void main(void)
|
||
{
|
||
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
||
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
|
||
}
|
||
`,O4=`
|
||
varying vec2 vTextureCoord;
|
||
uniform vec4 uColor;
|
||
uniform vec4 uDarkColor;
|
||
|
||
uniform sampler2D uSampler;
|
||
|
||
void main(void)
|
||
{
|
||
vec4 texColor = texture2D(uSampler, vTextureCoord);
|
||
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 N4 extends ss{constructor(t){const n={uSampler:t??tt.EMPTY,alpha:1,uTextureMatrix:zt.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},s={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(ks.from(D4,O4),n);A(this,"uvMatrix");A(this,"batchable");A(this,"pluginName");A(this,"_tintRGB");A(this,"_darkTintRGB");A(this,"_colorDirty");A(this,"_alpha");A(this,"_tintColor");A(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new $g(n.uSampler),this.batchable=!0,this.pluginName=s.pluginName,this._tintColor=new Ot(s.tint),this._darkTintColor=new Ot(s.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=s.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,Ot.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),Ot.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 $4 extends ac{constructor(t){super(new L4,new N4(t),void 0,void 0);A(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 n=this.geometry,s=this.shader;s.uvMatrix&&(s.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=n.indexBuffer.data,this._tintRGB=s._tintRGB,this._darkTintRGB=s._darkTintRGB,this._texture=s.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const Sn=class Sn extends $4{constructor(){super();A(this,"name","")}updateFromSpineData(t,n,s,r,o,a,c,l){var v,y;this.texture=t.texture;const d=o/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((v=u.data)==null?void 0:v.length)!==d&&(u.data=new Float32Array(d));const h=this.geometry.getBuffer("aVertexPosition");((y=h.data)==null?void 0:y.length)!==d&&(h.data=new Float32Array(d));let f=0,p=u.data,m=h.data;for(let b=0;b<o;b+=l?12:8){let x=b;m[f]=r[x++],m[f+1]=r[x++],x+=4,p[f]=r[x++],p[f+1]=r[x++],f+=2}l?(Sn.auxColor[0]=r[8],Sn.auxColor[1]=r[9],Sn.auxColor[2]=r[10],Sn.auxColor[3]=r[11],this.darkTint=Sn.auxColor,Sn.auxColor[0]=r[2],Sn.auxColor[1]=r[3],Sn.auxColor[2]=r[4],Sn.auxColor[3]=r[5],this.tint=Sn.auxColor):(Sn.auxColor[0]=r[2],Sn.auxColor[1]=r[3],Sn.auxColor[2]=r[4],Sn.auxColor[3]=r[5],this.tint=Sn.auxColor),this.blendMode=Wo.toPixiBlending(n),this.alpha=Sn.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==a.length)g.data=new Uint32Array(a);else{const b=g.data;for(let x=0;x<c;x++)b[x]=a[x]}this.name=s,u.update(),h.update(),g.update()}};A(Sn,"auxColor",[0,0,0,0]);let Vl=Sn;const Rt=class Rt extends Mn{constructor(t,n){if(t instanceof Au)t={...n,skeletonData:t};else if(n)throw new Error("You cannot use options and oldOptions together.");super();A(this,"skeleton");A(this,"state");A(this,"darkTint",!1);A(this,"hasNeverUpdated",!0);A(this,"_debug");A(this,"slotMeshFactory",()=>new Xm);A(this,"beforeUpdateWorldTransforms",()=>{});A(this,"afterUpdateWorldTransforms",()=>{});A(this,"_autoUpdate",!1);A(this,"_ticker",ai.shared);A(this,"meshesCache",new Map);A(this,"lightColor",new ut);A(this,"darkColor",new ut);A(this,"_boundsProvider");A(this,"_boundsPoint",new Pt);A(this,"_boundsSpineID",-1);A(this,"_boundsSpineDirty",!0);A(this,"slotsObject",new Map);A(this,"verticesCache",Ne.newFloatArray(1024));A(this,"clippingSlotToPixiMasks",{});A(this,"currentClippingSlot");const s=t instanceof Au?t:t.skeletonData;this.skeleton=new rv(s);const r=new z3(s);this.state=new B3(r),(t==null?void 0:t.darkTint)!==void 0||(n==null?void 0:n.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 Vl)):this.initializeMeshFactory(n==null?void 0:n.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvider}get debug(){return this._debug}set debug(t){this._debug&&this._debug.unregisterSpine(this),t&&t.registerSpine(this),this._debug=t}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t&&!this._autoUpdate?this._ticker.add(this.internalUpdate,this):!t&&this._autoUpdate&&this._ticker.remove(this.internalUpdate,this),this._autoUpdate=t}get ticker(){return this._ticker}set ticker(t){t=t??ai.shared,this._ticker!==t&&(this._autoUpdate&&(this._ticker.remove(this.internalUpdate,this),t.add(this.internalUpdate,this)),this._ticker=t)}get boundsProvider(){return this._boundsProvider}set boundsProvider(t){this._boundsProvider=t,t?(this._boundsSpineID=-1,this._boundsSpineDirty=!0,this.interactiveChildren=!1):(this.interactiveChildren=!0,this.hitArea=null),this.hasNeverUpdated||this.calculateBounds()}initializeMeshFactory(t){if(t){this.slotMeshFactory=t;const n=this.slotMeshFactory();n instanceof Vl&&(this.darkTint=!0),n.destroy()}else for(let n=0;n<this.skeleton.slots.length;n++)if(this.skeleton.slots[n].data.darkColor){this.slotMeshFactory=()=>new Vl,this.darkTint=!0;break}}update(t){this.internalUpdate(0,t)}internalUpdate(t,n){this.hasNeverUpdated=!1;const s=n??this._ticker.deltaMS/1e3;this.state.update(s),this.state.apply(this.skeleton),this.beforeUpdateWorldTransforms(this),this.skeleton.update(s),this.skeleton.updateWorldTransform(zr.update),this.afterUpdateWorldTransforms(this)}updateTransform(){var t;this.renderMeshes(),this.sortChildren(),(t=this.debug)==null||t.renderDebug(this),super.updateTransform()}destroy(t){var n;this.autoUpdate&&(this.autoUpdate=!1),this._ticker=null;for(const[,s]of this.meshesCache)s==null||s.destroy();this.state.clearListeners(),this.debug=void 0,this.meshesCache.clear(),this.slotsObject.clear();for(let s in this.clippingSlotToPixiMasks)(n=this.clippingSlotToPixiMasks[s].mask)==null||n.destroy(),delete this.clippingSlotToPixiMasks[s];super.destroy(t)}resetMeshes(){for(const[,t]of this.meshesCache)t.zIndex=-1,t.visible=!1}_calculateBounds(){this.hasNeverUpdated&&(this.internalUpdate(0,0),this.renderMeshes())}hasMeshForSlot(t){return this.meshesCache.has(t)}getMeshForSlot(t){if(this.hasMeshForSlot(t)){let n=this.meshesCache.get(t);return n.visible=!0,n}else{let n=this.slotMeshFactory();return this.addChild(n),this.meshesCache.set(t,n),n}}getSlotFromRef(t){let n;if(typeof t=="number"?n=this.skeleton.slots[t]:typeof t=="string"?n=this.skeleton.findSlot(t):n=t,!n)throw new Error(`No slot found with the given slot reference: ${t}`);return n}addSlotObject(t,n,s){var a;let r=this.getSlotFromRef(t);const o=(a=this.slotsObject.get(r))==null?void 0:a.container;if(!(o&&o===n)){for(const[c,{container:l}]of this.slotsObject)if(c!==r&&l===n){this.removeSlotObject(c,n);break}o&&this.removeChild(o),this.slotsObject.set(r,{container:n,followAttachmentTimeline:(s==null?void 0:s.followAttachmentTimeline)||!1,followSlotColor:(s==null?void 0:s.followSlotColor)||!1}),this.addChild(n)}}getSlotObject(t){const n=this.slotsObject.get(this.getSlotFromRef(t));return n?n.container:void 0}removeSlotObject(t,n){var o;let s=this.getSlotFromRef(t),r=(o=this.slotsObject.get(s))==null?void 0:o.container;r&&(n&&n!==r||(this.removeChild(r),this.slotsObject.delete(s)))}removeSlotObjects(){for(const[,t]of this.slotsObject)t.container.removeFromParent();this.slotsObject.clear()}updateSlotObject(t,n,s){const{container:r,followAttachmentTimeline:o}=t,a=o?!!n.attachment:!0;if(r.visible=this.skeleton.drawOrder.includes(n)&&a,r.visible){let c=n.bone;const l=r.localTransform;l.a=c.a,l.b=c.c,l.c=-c.b,l.d=-c.d,l.tx=c.worldX,l.ty=c.worldY,r.transform.setFromMatrix(l),r.zIndex=s,r.alpha=this.skeleton.color.a*n.color.a,t.followSlotColor&&this.setSlotObjectTint(r,255*this.skeleton.color.r*n.color.r<<16|255*this.skeleton.color.g*n.color.g<<8|255*this.skeleton.color.b*n.color.b)}}setSlotObjectTint(t,n){const s=t;"tint"in s&&(s.tint=n);for(const r of s.children??[])this.setSlotObjectTint(r,n)}updateAndSetPixiMask(t,n){var a,c;const s=t.attachment;if(s&&s instanceof Ba){const l=(a=this.clippingSlotToPixiMasks)[c=t.data.name]||(a[c]={slot:t,vertices:new Array});l.maskComputed=!1,this.currentClippingSlot=l;return}let r=this.currentClippingSlot;const o=this.slotsObject.get(t);if(r&&o){let l=r.mask;if(l||(l=ux.obtain(),r.mask=l,this.addChild(l)),!r.maskComputed){let d=r.slot,u=d.attachment;r.maskComputed=!0;const h=u.worldVerticesLength,f=r.vertices;u.computeWorldVertices(d,0,h,f,0,2),l.clear().lineStyle(0).beginFill(0).drawPolygon(f).endFill()}o.container.mask=l}else o!=null&&o.container.mask&&(o.container.mask=null);if(r&&r.slot.attachment.endSlot==t.data&&(this.currentClippingSlot=void 0),n){for(const l in this.clippingSlotToPixiMasks){const d=this.clippingSlotToPixiMasks[l];(!(d.slot.attachment instanceof Ba)||!d.maskComputed)&&d.mask&&(this.removeChild(d.mask),ux.free(d.mask),d.mask=void 0)}this.currentClippingSlot=void 0}}renderMeshes(){var r,o;this.resetMeshes();let t=null,n=null;const s=this.skeleton.drawOrder;for(let a=0,c=s.length,l=0;a<c;a++){const d=s[a];let u=this.slotsObject.get(d),h=a+l;u&&(this.updateSlotObject(u,d,h+1),l++),this.updateAndSetPixiMask(d,a===s.length-1);const f=d.darkColor!=null,p=Rt.clipper.isClipping()?2:f?Rt.DARK_VERTEX_SIZE:Rt.VERTEX_SIZE;if(!d.bone.active){Rt.clipper.clipEndWithSlot(d);continue}const m=d.getAttachment();let g,v,y=0;if(m instanceof yh){const b=m;g=b.color,y=p*4,b.computeWorldVertices(d,this.verticesCache,0,p),t=Rt.QUAD_TRIANGLES,n=b.uvs,v=(r=b.region)==null?void 0:r.texture}else if(m instanceof _c){const b=m;g=b.color,y=(b.worldVerticesLength>>1)*p,y>this.verticesCache.length&&(this.verticesCache=Ne.newFloatArray(y)),b.computeWorldVertices(d,0,b.worldVerticesLength,this.verticesCache,0,p),t=b.triangles,n=b.uvs,v=(o=b.region)==null?void 0:o.texture}else if(m instanceof Ba){Rt.clipper.clipStart(d,m);continue}else{this.hasMeshForSlot(d)&&(this.getMeshForSlot(d).visible=!1),Rt.clipper.clipEndWithSlot(d);continue}if(v!=null){const x=d.bone.skeleton.color,T=d.color,E=x.a*T.a*g.a;this.lightColor.set(x.r*T.r*g.r,x.g*T.g*g.g,x.b*T.b*g.b,E),d.darkColor!=null?this.darkColor.set(d.darkColor.r,d.darkColor.g,d.darkColor.b,1):this.darkColor.set(0,0,0,1);let S,C,M,k;if(Rt.clipper.isClipping())Rt.clipper.clipTriangles(this.verticesCache,t,t.length,n,this.lightColor,this.darkColor,f),S=Rt.clipper.clippedVertices,C=S.length,M=Rt.clipper.clippedTriangles,k=M.length;else{const I=this.verticesCache;for(let D=2,$=0,j=y;D<j;D+=p,$+=2){let B=D;I[B++]=this.lightColor.r,I[B++]=this.lightColor.g,I[B++]=this.lightColor.b,I[B++]=this.lightColor.a,I[B++]=n[$],I[B++]=n[$+1],f&&(I[B++]=this.darkColor.r,I[B++]=this.darkColor.g,I[B++]=this.darkColor.b,I[B++]=this.darkColor.a)}S=this.verticesCache,C=y,M=t,k=t.length}if(C==0||k==0){Rt.clipper.clipEndWithSlot(d);continue}const P=this.getMeshForSlot(d);P.renderable=!0,P.zIndex=h,P.updateFromSpineData(v,d.data.blendMode,d.data.name,S,C,M,k,f)}Rt.clipper.clipEndWithSlot(d)}Rt.clipper.clipEnd()}calculateBounds(){if(!this._boundsProvider){super.calculateBounds();return}const t=this.transform;if(this._boundsSpineID===t._worldID)return;this.updateBounds();const n=this._localBounds,s=this._boundsPoint;s.set(n.minX,n.minY),t.worldTransform.apply(s,s),this._bounds.minX=s.x,this._bounds.minY=s.y,s.set(n.maxX,n.maxY),t.worldTransform.apply(s,s),this._bounds.maxX=s.x,this._bounds.maxY=s.y}updateBounds(){if(!this._boundsProvider||!this._boundsSpineDirty)return;this._boundsSpineDirty=!1,this._localBounds||(this._localBounds=new oc);const t=this._boundsProvider.calculateBounds(this),n=this._localBounds;n.clear(),n.minX=t.x,n.minY=t.y,n.maxX=t.x+t.width,n.maxY=t.y+t.height,this.hitArea=this._localBounds.getRectangle()}setBonePosition(t,n){const s=t;if(typeof t=="string"&&(t=this.skeleton.findBone(t)),!t)throw Error(`Cannot set bone position, bone ${String(s)} not found`);if(Rt.vectorAux.set(n.x,n.y),t.parent){const r=t.parent.worldToLocal(Rt.vectorAux);t.x=r.x,t.y=r.y}else t.x=Rt.vectorAux.x,t.y=Rt.vectorAux.y}getBonePosition(t,n){const s=t;return typeof t=="string"&&(t=this.skeleton.findBone(t)),t?(n||(n={x:0,y:0}),n.x=t.worldX,n.y=t.worldY,n):(console.error(`Cannot get bone position! Bone ${String(s)} not found`),n)}skeletonToPixiWorldCoordinates(t){this.worldTransform.apply(t,t)}pixiWorldCoordinatesToSkeleton(t){this.worldTransform.applyInverse(t,t)}pixiWorldCoordinatesToBone(t,n){this.pixiWorldCoordinatesToSkeleton(t),n.parent?n.parent.worldToLocal(t):n.worldToLocal(t)}static from(t,n,s){if(typeof t=="string")return Rt.oldFrom(t,n,s);const{skeleton:r,atlas:o,scale:a=1,darkTint:c,autoUpdate:l,boundsProvider:d,ticker:u}=t,h=`${r}-${o}-${a}`;let f=Rt.skeletonCache[h];if(!f){const p=Is.get(r),m=Is.get(o),g=new Bm(m);let v=p instanceof Uint8Array?new Vm(g):new Eu(g);v.scale=a,f=v.readSkeletonData(p),Rt.skeletonCache[h]=f}return new Rt({skeletonData:f,darkTint:c,autoUpdate:l,boundsProvider:d,ticker:u})}static oldFrom(t,n,s){const r=`${t}-${n}-${(s==null?void 0:s.scale)??1}`;let o=Rt.skeletonCache[r];if(o)return new Rt(o,s);const a=Is.get(t),c=Is.get(n),l=new Bm(c);let d=a instanceof Uint8Array?new Vm(l):new Eu(l);return d.scale=(s==null?void 0:s.scale)??1,o=d.readSkeletonData(a),Rt.skeletonCache[r]=o,new this(o,s)}get tint(){return this.skeleton.color.toRgb888()}set tint(t){ut.rgb888ToColor(this.skeleton.color,t)}};A(Rt,"vectorAux",new Su),A(Rt,"clipper",new Tu),A(Rt,"QUAD_TRIANGLES",[0,1,2,2,3,0]),A(Rt,"VERTEX_SIZE",8),A(Rt,"DARK_VERTEX_SIZE",12),A(Rt,"skeletonCache",Object.create(null));let _u=Rt;const ux=new wu(()=>new ti);rv.yDown=!0;const vd="spineTextureAtlasLoader",B4={extension:$e.Asset,resolver:{test:i=>fi(i,".atlas"),parse:i=>{var t,n;const e=i.split(".");return{resolution:parseFloat(((n=(t=Xe.RETINA_PREFIX)==null?void 0:t.exec(i))==null?void 0:n[1])??"1"),format:e[e.length-2],src:i}}},loader:{name:vd,extension:{type:$e.LoadParser,priority:Ei.Normal,name:vd},test(i){return fi(i,".atlas")},async load(i){const e=await Xe.ADAPTER.fetch(i);if(!e.ok)throw new Error(`[${vd}] Failed to fetch ${i}: ${e.status} ${e.statusText}`);return await e.text()},testParse(i,e){const t=fi(e.src,".atlas"),n=typeof i=="string",s=e.loadParser===vd;return Promise.resolve((t||s)&&n)},unload(i){i.dispose()},async parse(i,e,t){var c;const n=e.data||{};let s=pn.dirname(e.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const r=new MA(i);if(n.images instanceof st||typeof n.images=="string"){const l=n.images;n.images={},n.images[r.pages[0].name]=l}const o=[];let a=!0;for(const l of t.parsers)if(l.name=="loadTextures"){a=(c=l.config)==null?void 0:c.preferCreateImageBitmap;break}Is.setPreferences({preferCreateImageBitmap:!1});for(const l of r.pages){const d=l.name,u=n!=null&&n.images?n.images[d]:void 0;if(u instanceof st)l.setTexture(Wo.from(u));else{const h=u??pn.normalize([...s.split(pn.sep),d].join(pn.sep)),f={src:lu(h,e.src),data:{...n.imageMetadata,alphaMode:l.pma?Fn.PMA:Fn.UNPACK}},p=t.load(f).then(m=>{l.setTexture(Wo.from(m.baseTexture))});o.push(p)}}return await Promise.all(o),Is.setPreferences({preferCreateImageBitmap:a}),r}}};He.add(B4);const bd="spineSkeletonLoader";function U4(i){return i.hasOwnProperty("bones")}function V4(i){return i instanceof Uint8Array}const X4={extension:$e.Asset,loader:{name:bd,extension:{type:$e.LoadParser,priority:Ei.Normal,name:bd},test(i){return fi(i,".skel")},async load(i){const e=await Xe.ADAPTER.fetch(i);if(!e.ok)throw new Error(`[${bd}] Failed to fetch ${i}: ${e.status} ${e.statusText}`);return new Uint8Array(await e.arrayBuffer())},testParse(i,e){const t=fi(e.src,".json")&&U4(i),n=fi(e.src,".skel")&&V4(i),s=e.loadParser===bd;return Promise.resolve(t||n||s)}}};He.add(X4);class Y4 extends Ns{constructor(t=!1){super();A(this,"_buffer");A(this,"_indexBuffer");this._buffer=new Kt(void 0,t,!1),this._indexBuffer=new Kt(void 0,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,je.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,je.FLOAT).addAttribute("aColor",this._buffer,4,!0,je.UNSIGNED_BYTE).addAttribute("aDarkColor",this._buffer,4,!0,je.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,je.FLOAT).addIndex(this._indexBuffer)}}const z4=`
|
||
precision highp float;
|
||
attribute vec2 aVertexPosition;
|
||
attribute vec2 aTextureCoord;
|
||
attribute vec4 aColor;
|
||
attribute vec4 aDarkColor;
|
||
attribute float aTextureId;
|
||
|
||
uniform mat3 projectionMatrix;
|
||
uniform mat3 translationMatrix;
|
||
uniform vec4 tint;
|
||
|
||
varying vec2 vTextureCoord;
|
||
varying vec4 vColor;
|
||
varying vec4 vDarkColor;
|
||
varying float vTextureId;
|
||
|
||
void main(void){
|
||
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||
|
||
vTextureCoord = aTextureCoord;
|
||
vTextureId = aTextureId;
|
||
vColor = aColor * tint;
|
||
vDarkColor = aDarkColor * tint;
|
||
|
||
}
|
||
`,j4=`
|
||
varying vec2 vTextureCoord;
|
||
varying vec4 vColor;
|
||
varying vec4 vDarkColor;
|
||
varying float vTextureId;
|
||
uniform sampler2D uSamplers[%count%];
|
||
|
||
void main(void){
|
||
vec4 color;
|
||
%forloop%
|
||
|
||
|
||
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 VA extends Nr{constructor(e){super(e),this.shaderGenerator=new zw(z4,j4),this.geometryClass=Y4,this.vertexSize=7}packInterleavedGeometry(e,t,n,s,r){const{uint32View:o,float32View:a}=t,c=s/this.vertexSize,l=e.uvs,d=e.indices,u=e.vertexData,h=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),p=Ot.shared.setValue(e._tintRGB).toPremultiplied(f,!0),m=Ot.shared.setValue(e._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)a[s++]=u[g],a[s++]=u[g+1],a[s++]=l[g],a[s++]=l[g+1],o[s++]=p,o[s++]=m,a[s++]=h;for(let g=0;g<d.length;g++)n[r++]=c+d[g]}}A(VA,"extension",{name:"darkTintBatch",type:$e.RendererPlugin});He.add(VA);function H4(i){return i.replace(/\\/g,"/").split("/").pop()||i}function ov(i,e,t){for(const n of i.pages){const s=e.get(H4(n.name).toLowerCase());if(!s)throw new Error(ke("errors.missingAtlasTexture",{name:n.name}));s.baseTexture.alphaMode=n.pma?Fn.PMA:Fn.UNPACK,n.setTexture(t.from(s.baseTexture))}}function XA(i,e){const t=new MA(i);return ov(t,e,Wo),new Bm(t)}function G4(i,e,t){return{skeletonData:new Eu(XA(e,t)).readSkeletonData(i),SpineClass:_u}}function W4(i,e,t){return{skeletonData:new Vm(XA(e,t)).readSkeletonData(i),SpineClass:_u}}const q4="modulepreload",K4=function(i){return"/"+i},hx={},fx=function(e,t,n){let s=Promise.resolve();if(t&&t.length>0){let o=function(l){return Promise.all(l.map(d=>Promise.resolve(d).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"));s=o(t.map(l=>{if(l=K4(l),l in hx)return;hx[l]=!0;const d=l.endsWith(".css"),u=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":q4,d||(h.as="script"),h.crossOrigin="",h.href=l,c&&h.setAttribute("nonce",c),document.head.appendChild(h),d)return new Promise((f,p)=>{h.addEventListener("load",f),h.addEventListener("error",()=>p(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 s.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})};async function YA(){const[i,e]=await Promise.all([fx(()=>import("./index-Cq95D0sH.js"),[]),fx(()=>import("./index-Czc7CHAB.js"),__vite__mapDeps([0,1]))]);return{core:i,pixi:e}}async function J4(i,e,t){const{core:n,pixi:s}=await YA(),r=new n.TextureAtlas(e);return ov(r,t,s.SpineTexture),{skeletonData:new n.SkeletonJson(new n.AtlasAttachmentLoader(r)).readSkeletonData(i),SpineClass:s.Spine}}async function Z4(i,e,t){const{core:n,pixi:s}=await YA(),r=new n.TextureAtlas(e);return ov(r,t,s.SpineTexture),{skeletonData:new n.SkeletonBinary(new n.AtlasAttachmentLoader(r)).readSkeletonData(i),SpineClass:s.Spine}}function jr(i,e,t){const n=Number(i[e]);return Number.isFinite(n)?n:t}function hi(i,e,t,n){i[e]==null&&(i[e]=jr(i,t,n))}function av(i,e,t){if(typeof i.curve!="number")return;const n=jr(i,"time",0),r=jr(e,"time",0)-n,o=i.curve,a=jr(i,"c2",0),c=jr(i,"c3",1),l=jr(i,"c4",1);i.curve=t.flatMap(([d,u])=>[n+r*o,d+(u-d)*a,n+r*c,d+(u-d)*l]),delete i.c2,delete i.c3,delete i.c4}function Zr(i,e){if(Array.isArray(i))for(let t=0;t<i.length-1;t++){const n=i[t],s=i[t+1];av(n,s,e.map(({key:r,fallback:o})=>[jr(n,r,o),jr(s,r,o)]))}}function Q4(i){if(Array.isArray(i))for(let e=0;e<i.length-1;e++)av(i[e],i[e+1],[[0,1]])}function ua(i,e){const t=typeof i=="string"?i.replace(/^#/,""):"",n=t.length===6?`${t}ff`:t.padEnd(8,"f").slice(0,8),s=[0,2,4,6].map(r=>Number.parseInt(n.slice(r,r+2),16)/255);return e?s:s.slice(0,3)}function px(i,e){if(Array.isArray(i))for(let t=0;t<i.length-1;t++){const n=i[t],s=i[t+1],r=e?[...ua(n.light,!0),...ua(n.dark,!1)]:ua(n.color,!0),o=e?[...ua(s.light,!0),...ua(s.dark,!1)]:ua(s.color,!0);av(n,s,r.map((a,c)=>[a,o[c]]))}}function eU(i){for(const e of i.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of i.transform||[])hi(e,"mixRotate","rotateMix",1),hi(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),hi(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),hi(e,"mixShearY","shearMix",1);for(const e of i.path||[])hi(e,"mixRotate","rotateMix",1),hi(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function tU(i){for(const e of i.skins||[])for(const t of Object.values(e.attachments||{}))for(const n of Object.values(t||{}))n.parent!=null&&n.timelines==null&&n.deform!=null&&(n.timelines=n.deform)}function nU(i){for(const e of Object.values(i.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),px(e.rgba,!1),px(e.rgba2,!0)}function iU(i){for(const e of Object.values(i.bones||{})){for(const t of e.rotate||[])hi(t,"value","angle",0);Zr(e.rotate,[{key:"value",fallback:0}]),Zr(e.translate,[{key:"x",fallback:0},{key:"y",fallback:0}]),Zr(e.scale,[{key:"x",fallback:1},{key:"y",fallback:1}]),Zr(e.shear,[{key:"x",fallback:0},{key:"y",fallback:0}])}}function sU(i){for(const e of Object.values(i.ik||{}))Zr(e,[{key:"mix",fallback:1},{key:"softness",fallback:0}])}function rU(i){for(const e of Object.values(i.transform||{})){for(const t of e)hi(t,"mixRotate","rotateMix",1),hi(t,"mixX","translateMix",1),t.mixY==null&&(t.mixY=t.mixX),hi(t,"mixScaleX","scaleMix",1),t.mixScaleY==null&&(t.mixScaleY=t.mixScaleX),hi(t,"mixShearY","shearMix",1);Zr(e,[{key:"mixRotate",fallback:1},{key:"mixX",fallback:1},{key:"mixY",fallback:1},{key:"mixScaleX",fallback:1},{key:"mixScaleY",fallback:1},{key:"mixShearY",fallback:1}])}}function oU(i){for(const e of Object.values(i.path||{})){for(const n of["position","spacing"]){const s=e[n];for(const r of s||[])hi(r,"value",n,0);Zr(s,[{key:"value",fallback:0}])}const t=e.mix;for(const n of t||[])hi(n,"mixRotate","rotateMix",1),hi(n,"mixX","translateMix",1),n.mixY==null&&(n.mixY=n.mixX);Zr(t,[{key:"mixRotate",fallback:1},{key:"mixX",fallback:1},{key:"mixY",fallback:1}])}}function aU(i){if(!i.deform)return;const e=i.attachments||(i.attachments={});for(const[t,n]of Object.entries(i.deform)){const s=e[t]||(e[t]={});for(const[r,o]of Object.entries(n)){const a=s[r]||(s[r]={});for(const[c,l]of Object.entries(o)){const d=a[c]||(a[c]={});d.deform=l,Q4(l)}}}delete i.deform}function zA(i){eU(i),tU(i);for(const e of Object.values(i.animations||{}))nU(e),iU(e),sU(e),rU(e),oU(e),aU(e),!e.drawOrder&&e.draworder&&(e.drawOrder=e.draworder);return i}function lU(i){return i.replace(/\\/g,"/").split("/").pop()||i}async function cU(i){const e=await Promise.all(i.map(async t=>{const n=URL.createObjectURL(t);try{return[lU(t.name).toLowerCase(),await tt.fromURL(n)]}finally{URL.revokeObjectURL(n)}}));return new Map(e)}function dU(i){const e=new Map;return i.bones.map(t=>{var r;const n=((r=t.parent)==null?void 0:r.name)||null,s=n?(e.get(n)||0)+1:0;return e.set(t.name,s),{name:t.name,parent:n,depth:s}})}function uU(i){return i.slots.map(e=>{var t;return{name:e.name,order:Number(e.index)||0,bone:((t=e.boneData)==null?void 0:t.name)||"",attachment:e.attachmentName||""}})}async function jA(i,e,t){var o;if(!/\.(json|skel)$/i.test(i.name))throw new Error(ke("errors.spineFileType"));if(!/\.atlas$/i.test(e.name))throw new Error(ke("errors.atlasFileType"));if(!t.length)throw new Error(ke("errors.chooseTexture"));const n=await e.text(),s=await cU(t),r=[...s.values()];try{let a,c,l=null,d;if(/\.skel$/i.test(i.name)){const u=await i.arrayBuffer();try{({skeletonData:a,SpineClass:c}=await Z4(u,n,s)),d="4.3"}catch(h){try{({skeletonData:a,SpineClass:c}=W4(u,n,s)),d="4.2"}catch(f){const p=h instanceof Error?h.message:String(h),m=f instanceof Error?f.message:String(f);throw new Error(ke("errors.binaryParseFailed",{v43:p,v42:m}))}}l=gu(a.version)}else{let u;try{u=JSON.parse(await i.text())}catch{throw new Error(ke("errors.invalidSpineJson"))}if(l=gu((o=u==null?void 0:u.skeleton)==null?void 0:o.spine),!l)throw new Error(ke("errors.unsupportedSpineJsonVersion",{versions:_m()}));d=nL(l),l==="3.8"&&zA(u);const h=d==="4.3"?await J4(u,n,s):G4(u,n,s);a=h.skeletonData,c=h.SpineClass}if(!l)throw new Error(ke("errors.unsupportedSpineDataVersion",{versions:_m()}));return{skeletonData:a,textures:r,runtimeVersion:d,SpineClass:c,dataVersion:l,animations:a.animations.map(u=>({name:u.name,duration:u.duration})),bones:dU(a),slots:uU(a)}}catch(a){for(const c of r)c.destroy(!0);throw a}}function $d(i){return new Promise((e,t)=>{const n=new FileReader;n.onload=()=>e(String(n.result||"")),n.onerror=()=>t(n.error),n.readAsDataURL(i)})}async function hU(i,e,t){return{skeleton:{name:i.name,dataUrl:await $d(i)},atlas:{name:e.name,dataUrl:await $d(e)},textures:await Promise.all(t.map(async n=>({name:n.name,dataUrl:await $d(n)})))}}async function Ap(i){const e=await fetch(i.dataUrl);if(!e.ok)throw new Error(ke("errors.embeddedReadFailed",{name:i.name}));return new File([await e.blob()],i.name)}async function fU(i){return{skeleton:await Ap(i.skeleton),atlas:await Ap(i.atlas),textures:await Promise.all(i.textures.map(Ap))}}const HA="SpineParticle.EditorConfig",GA=1;function WA(i){return{backgroundX:i.backgroundX,backgroundY:i.backgroundY,backgroundOpacity:i.backgroundOpacity,backgroundImageName:i.backgroundImageName,backgroundImageData:i.backgroundImageData,showGrid:i.showGrid,exportSettings:tn(i.exportSettings)}}function pU(i){return JSON.parse(JSON.stringify(i,(e,t)=>{if(!(e==="texture"||e==="trailTexture"||e==="frames"))return t}))}function qA(i){const e=tn(i);return delete e.tags,delete e.selectedTag,e}function mx(i){const e=WA(i.settings),t=i.timeline.playbackEnd>=Math.max(1,i.timeline.totalFrames-1);return pU({format:HA,version:GA,savedAt:new Date().toISOString(),editor:tn(i.editor),settings:e,timeline:{fps:i.timeline.fps,loop:i.timeline.loop,playbackStart:i.timeline.playbackStart,playbackEnd:i.timeline.playbackEnd,playbackEndAuto:t,abLoop:i.timeline.abLoop,animations:[...i.timeline.animations]},selection:{type:i.activeObjectType,id:i.activeObjectId},scene:{systems:i.systems.map(n=>({...tn(n),frames:void 0})),colliders:i.colliders.map(qA),paths:tn(i.paths),spines:tn(i.spines)}})}function mU(i,e,t,n){const s=Math.max(1,n);let r=0;for(const o of i){const a=o.config,c=Math.max(0,Number(a.lifeMin)||0),l=Math.max(0,Number(a.lifeMax)||0),d=a.lifeMode==="fixed"?c:Math.max(c,l),u=a.mode==="stream"?a.streamBehavior==="loop"?Ji(a,s).total/s:Math.max(1/s,Number(a.duration)||0):0;let h=Math.max(0,Number(a.delay)||0)+u+d;a.mode==="stream"&&a.streamBehavior==="loop"&&(h=Math.max(0,Number(a.delay)||0)+Ji(a,s).total/s),r=Math.max(r,h)}for(const o of t){const a=o.animations.find(c=>c.name===o.selectedAnimation);a&&(r=Math.max(r,Math.max(0,Number(o.timeOffset)||0)+Math.max(0,a.duration||0)))}for(const o of e)o.followPath&&o.followPathId&&(r=Math.max(r,Math.max(0,o.followDuration)||0));return iC(r,s)}function lv(i){let e;try{e=JSON.parse(i)}catch{throw new Error(ke("errors.invalidJson"))}const t=e;if(t.format!==HA)throw new Error(ke("errors.invalidConfigFormat"));if(t.version!==GA)throw new Error(ke("errors.unsupportedConfigVersion",{version:t.version??ke("export.unknown")}));if(!t.scene||!Array.isArray(t.scene.systems)||!Array.isArray(t.scene.colliders)||!Array.isArray(t.scene.paths)||!Array.isArray(t.scene.spines))throw new Error(ke("errors.missingScene"));return t}async function gU(i){const e=new Map,t=s=>{const r=s==="/particles/star.png"?"/images/star.png":s==="/trails/trail.png"?"/images/trail.png":s||"/images/star.png";let o=e.get(r);return o||(o=tt.fromURL(r).then(a=>Hr(a)),e.set(r,o)),o},n=await t("/images/star.png");await Promise.all(i.map(async s=>{var o;const r=fr(s.config);r.texture=n,await Promise.all(r.imageResources.map(async a=>{a.texture=await t(a.previewUrl||"/images/star.png"),await Promise.all(a.sequenceFrames.map(async c=>{c.texture=await t(c.previewUrl||a.previewUrl||"/images/star.png")}))})),await Promise.all(r.trailResources.map(async a=>{a.texture=await t(a.previewUrl||"/images/trail.png")})),r.trailTexture=((o=r.trailResources[0])==null?void 0:o.texture)||null,s.frames=[]}))}async function vU(i){const e=new Map;try{for(const t of i){if(!t.sourceBundle)continue;const n=await fU(t.sourceBundle);e.set(t.id,await jA(n.skeleton,n.atlas,n.textures))}return e}catch(t){for(const n of e.values())for(const s of n.textures)s.destroy(!0);throw t}}function bU(i,e){const t=(e==null?void 0:e.type)||"particle",n=Number(e==null?void 0:e.id)||0;(t==="particle"?i.systems.some(r=>r.id===n):t==="collision"?i.colliders.some(r=>r.id===n):t==="path"?i.paths.some(r=>r.id===n):i.spines.some(r=>r.id===n))?i.selectSceneObject(t,n):i.systems[0]?i.selectSceneObject("particle",i.systems[0].id):i.colliders[0]?i.selectSceneObject("collision",i.colliders[0].id):i.paths[0]?i.selectSceneObject("path",i.paths[0].id):i.spines[0]?i.selectSceneObject("spine",i.spines[0].id):(i.activeObjectType="particle",i.activeObjectId=0,i.activeId=0)}async function yU(i,e){var h,f,p,m,g,v,y,b,x;const t=lv(JSON.stringify(e)),n=tn(t.scene.systems),s=t.scene.colliders.map(qA),r=tn(t.scene.paths),o=tn(t.scene.spines);for(const T of o)T.sourceBundle==null&&(T.sourceBundle=null),T.dataVersion==null&&(T.dataVersion=""),Array.isArray(T.slots)||(T.slots=[]),typeof T.selectedBone!="string"&&(T.selectedBone=""),typeof T.selectedSlot!="string"&&(T.selectedSlot="");await gU(n);const a=await vU(o),c=new Map(i.spines.map(T=>[T.id,T.assetVersion]));for(const T of i.spines)Ec(T.id);i.systems=n,i.colliders=s,i.paths=r,i.spines=o,Object.assign(i.editor,tn(t.editor||{}));const l=t.settings;if(l)for(const T of["backgroundX","backgroundY","backgroundOpacity","backgroundImageName","backgroundImageData","showGrid"])Object.prototype.hasOwnProperty.call(l,T)&&(i.settings[T]=l[T]);i.settings.exportSettings=QS((h=t.settings)==null?void 0:h.exportSettings),i.settings.undoLimit=Math.min(200,Math.max(1,Math.round(Number(i.settings.undoLimit)||20))),i.timeline.fps=Math.max(1,Math.round(Number((f=t.timeline)==null?void 0:f.fps)||30));const d=Math.max(1,Math.floor(Number((p=t.timeline)==null?void 0:p.playbackEnd)||Number.MAX_SAFE_INTEGER)),u=((m=t.timeline)==null?void 0:m.playbackEndAuto)??d>=mU(n,s,o,i.timeline.fps);i.timeline.abLoop=((g=t.timeline)==null?void 0:g.abLoop)===!0,i.timeline.loop=((v=t.timeline)==null?void 0:v.loop)!==!1,i.timeline.animations=Array.isArray((y=t.timeline)==null?void 0:y.animations)&&t.timeline.animations.length?[...new Set(t.timeline.animations.filter(T=>typeof T=="string"&&T.trim()).map(T=>T.trim()))]:["animation"];for(const T of i.spines){const E=a.get(T.id);if(T.assetVersion=Math.max(Number(T.assetVersion)||0,c.get(T.id)||0)+1,!E){T.status="empty",T.error=T.skeletonFileName?ke("errors.missingEmbeddedSpine"):"",T.animations=[],T.bones=[],T.slots=[],T.selectedAnimation="";continue}gh(T.id,E),T.dataVersion=E.dataVersion,T.animations=E.animations,T.bones=E.bones,T.slots=E.slots,E.animations.some(S=>S.name===T.selectedAnimation)||(T.selectedAnimation=((b=E.animations[0])==null?void 0:b.name)||""),T.status="ready",T.error=""}i.syncSceneSequences(),bU(i,t.selection),i.timeline.playbackStart=Math.max(0,Math.floor(Number((x=t.timeline)==null?void 0:x.playbackStart)||0)),i.timeline.playbackEnd=d,i.timeline.frame=0,i.timeline.recorded=!1,i.timeline.playing=!0;for(const T of i.systems)i.timeline.animations.includes(T.animation)||(T.animation=i.timeline.animations[0]);return i.recalcTotalFrames(),u&&(i.timeline.playbackEnd=i.timeline.totalFrames-1),i.timeline.frame=i.timeline.playbackStart,t}async function Ym(i,e){return yU(i,lv(e))}async function xU(i,e){if(!/\.json$/i.test(e.name))throw new Error(ke("errors.chooseJsonConfig"));return Ym(i,await e.text())}const wr=qo({undoCount:0,dirty:!1});let gc=null,Rs=null,Qr=[],wl=null,ar=null,Mu=!1,wh="";function Sh(i){return{systems:i.systems.map(t=>{const n=tn(t);return n.frames=void 0,n}),colliders:tn(i.colliders),paths:tn(i.paths),spines:tn(i.spines),animations:[...i.timeline.animations],settings:WA(i.settings)}}function Ch(i){return JSON.stringify(i,(e,t)=>e==="texture"||e==="trailTexture"?null:typeof t=="string"&&t.startsWith("data:")&&t.length>256?`${t.length}:${t.slice(0,96)}:${t.slice(-48)}`:t)}function KA(i,e=Sh(i),t=Ch(e)){const n=new Map;for(const s of e.spines){const r=eL(s.id);r&&n.set(s.id,r)}return{data:e,signature:t,spineAssets:n}}function Pu(i){if(i){for(const e of i.spineAssets.values())ZF(e);i.spineAssets.clear()}}function JA(i){for(;Qr.length>i;)Pu(Qr.shift()||null);wr.undoCount=Qr.length}function ZA(){const i=gc;if(!i||!Rs||Mu)return;const e=Sh(i),t=Ch(e);t!==Rs.signature&&(Qr.push(Rs),Rs=KA(i,e,t),JA(i.settings.undoLimit))}function wU(i){Mu||(wr.dirty=i!==wh,ar&&clearTimeout(ar),ar=setTimeout(()=>{ar=null,ZA()},250))}function SU(i){const e=i.activeObjectId;return i.activeObjectType==="particle"?i.systems.some(t=>t.id===e):i.activeObjectType==="collision"?i.colliders.some(t=>t.id===e):i.activeObjectType==="path"?i.paths.some(t=>t.id===e):i.spines.some(t=>t.id===e)}function CU(i){var t,n;if(!SU(i)){const s=i.systems[0],r=i.colliders[0],o=i.paths[0],a=i.spines[0];s?(i.activeObjectType="particle",i.activeObjectId=s.id):r?(i.activeObjectType="collision",i.activeObjectId=r.id):o?(i.activeObjectType="path",i.activeObjectId=o.id):(i.activeObjectType="spine",i.activeObjectId=(a==null?void 0:a.id)||0)}const e=i.activeObjectType==="particle"?i.systems.find(s=>s.id===i.activeObjectId):i.systems.find(s=>s.id===i.activeId);i.activeId=(e==null?void 0:e.id)||((t=i.systems[0])==null?void 0:t.id)||0,i.timeline.animation=(e==null?void 0:e.animation)||((n=i.systems[0])==null?void 0:n.animation)||i.timeline.animations[0]||"animation"}function AU(i,e){const t=Rs;Mu=!0;try{for(const n of i.spines)Ec(n.id);i.systems=tn(e.data.systems),i.colliders=tn(e.data.colliders),i.paths=tn(e.data.paths),i.spines=tn(e.data.spines),i.timeline.animations=[...e.data.animations],Object.assign(i.settings,tn(e.data.settings));for(const[n,s]of e.spineAssets)gh(n,s);for(const n of i.systems)n.frames=[];i.timeline.recorded=!1,i.timeline.playing=!1,CU(i),i.recalcTotalFrames(),Rs=e,wr.dirty=e.signature!==wh}finally{Mu=!1,Pu(t)}}function TU(i){if(!(gc===i&&wl)){wl==null||wl(),ar&&clearTimeout(ar),Pu(Rs);for(const e of Qr)Pu(e);Qr=[],gc=i,Rs=KA(i),wh=Rs.signature,wr.undoCount=0,wr.dirty=!1,wl=Vt(()=>Ch(Sh(i)),wU,{flush:"post"})}}function Sl(i){gc===i&&(wh=Ch(Sh(i)),wr.dirty=!1)}function EU(i,e){const t=Math.min(200,Math.max(1,Math.round(Number(e)||20)));i.settings.undoLimit=t,JA(t)}function QA(){const i=gc;if(!i||!Rs)return!1;ar&&(clearTimeout(ar),ar=null),ZA();const e=Qr.pop();return e?(AU(i,e),wr.undoCount=Qr.length,!0):!1}function _U(i){const e=i instanceof HTMLElement?i:null;return!!(e!=null&&e.closest('input, textarea, select, [contenteditable="true"]'))}function MU(i){function e(n){var r;const s=n.target instanceof Node?n.target:null;i.canvasFocused.value=!!s&&!!((r=i.canvasElement.value)!=null&&r.contains(s))}function t(n){const s=n.key.toLowerCase();if((n.ctrlKey||n.metaKey)&&!n.altKey&&s==="s"){n.preventDefault(),n.stopPropagation(),i.save();return}if((n.ctrlKey||n.metaKey)&&!n.altKey&&s==="z"){n.preventDefault(),n.stopPropagation(),i.undo();return}if(n.ctrlKey||n.metaKey||n.altKey||_U(n.target))return;if(s==="d"){n.preventDefault(),i.togglePlay();return}if(s==="s"){n.preventDefault(),i.toStart();return}if(!i.canvasFocused.value)return;const r={q:"",w:"translate",e:"rotate",r:"scale"};s in r&&(n.preventDefault(),i.setTool(r[s]))}Ti(()=>{document.addEventListener("pointerdown",e,!0),window.addEventListener("keydown",t,!0)}),nl(()=>{document.removeEventListener("pointerdown",e,!0),window.removeEventListener("keydown",t,!0)})}const PU=Array.from({length:256},(i,e)=>{let t=e;for(let n=0;n<8;n++)t=t&1?3988292384^t>>>1:t>>>1;return t>>>0});function kU(i){let e=4294967295;for(const t of i)e=PU[(e^t)&255]^e>>>8;return(e^4294967295)>>>0}function IU(i){const e=String(i||"").replace(/\\/g,"/").split("/").filter(t=>t&&t!==".");if(!e.length||e.some(t=>t===".."))throw new Error(ke("errors.invalidZipPath"));return e.join("/")}function RU(i=new Date){const e=Math.max(1980,i.getFullYear());return{time:i.getHours()<<11|i.getMinutes()<<5|Math.floor(i.getSeconds()/2),date:e-1980<<9|i.getMonth()+1<<5|i.getDate()}}function Tp(i){const e=new Uint8Array(i);return{bytes:e,view:new DataView(e.buffer)}}function gx(i){const e=new Uint8Array(i.reduce((n,s)=>n+s.length,0));let t=0;for(const n of i)e.set(n,t),t+=n.length;return e}function eT(i){const e=new TextEncoder,t=[],n=[],s=RU();let r=0;for(const c of i){const l=e.encode(IU(c.name)),d=kU(c.data),u=Tp(30);u.view.setUint32(0,67324752,!0),u.view.setUint16(4,20,!0),u.view.setUint16(6,2048,!0),u.view.setUint16(10,s.time,!0),u.view.setUint16(12,s.date,!0),u.view.setUint32(14,d,!0),u.view.setUint32(18,c.data.length,!0),u.view.setUint32(22,c.data.length,!0),u.view.setUint16(26,l.length,!0),t.push(u.bytes,l,c.data);const h=Tp(46);h.view.setUint32(0,33639248,!0),h.view.setUint16(4,20,!0),h.view.setUint16(6,20,!0),h.view.setUint16(8,2048,!0),h.view.setUint16(12,s.time,!0),h.view.setUint16(14,s.date,!0),h.view.setUint32(16,d,!0),h.view.setUint32(20,c.data.length,!0),h.view.setUint32(24,c.data.length,!0),h.view.setUint16(28,l.length,!0),h.view.setUint32(42,r,!0),n.push(h.bytes,l),r+=u.bytes.length+l.length+c.data.length}const o=gx(n),a=Tp(22);return a.view.setUint32(0,101010256,!0),a.view.setUint16(8,i.length,!0),a.view.setUint16(10,i.length,!0),a.view.setUint32(12,o.length,!0),a.view.setUint32(16,r,!0),new Blob([gx([...t,o,a.bytes])],{type:"application/zip"})}const FU="SpineParticle.ProjectLibrary",io="projects",LU=1,zm="spine-particle:request-save";let yd=null;function cv(){return"indexedDB"in globalThis?yd||(yd=new Promise((i,e)=>{const t=indexedDB.open(FU,LU);t.onupgradeneeded=()=>{const n=t.result;n.objectStoreNames.contains(io)||n.createObjectStore(io,{keyPath:"name"})},t.onsuccess=()=>i(t.result),t.onerror=()=>e(t.error||new Error(ke("config.storageUnavailable")))}),yd):Promise.reject(new Error(ke("config.storageUnavailable")))}function DU(i){return new Promise((e,t)=>{i.onsuccess=()=>e(i.result),i.onerror=()=>t(i.error||new Error(ke("config.storageUnavailable")))})}function tT(i){return new Promise((e,t)=>{i.oncomplete=()=>e(),i.onerror=()=>t(i.error||new Error(ke("config.storageUnavailable"))),i.onabort=()=>t(i.error||new Error(ke("config.storageUnavailable")))})}function jm(i){const e=i.trim().replace(/\.json$/i,"").trim();if(!e)throw new Error(ke("config.local.nameRequired"));if(/[\\/:*?"<>|\u0000-\u001f]/.test(e))throw new Error(ke("config.local.nameInvalid"));return e}function nT(i){return`${i}.json`}async function vx(){const e=(await cv()).transaction(io,"readonly");return(await DU(e.objectStore(io).getAll())).sort((n,s)=>s.savedAt.localeCompare(n.savedAt))}async function bx(i,e){const n={name:jm(i),text:e,savedAt:new Date().toISOString(),size:new Blob([e]).size},r=(await cv()).transaction(io,"readwrite");return r.objectStore(io).put(n),await tT(r),n}async function OU(i){const t=(await cv()).transaction(io,"readwrite");t.objectStore(io).delete(i),await tT(t)}function yx(i,e){const t=new Blob([i],{type:"application/json;charset=utf-8"}),n=URL.createObjectURL(t),s=document.createElement("a");s.href=n,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(n),0)}function NU(i,e){const t=new TextEncoder,n=eT(i.map(o=>({name:nT(o.name),data:t.encode(o.text)}))),s=URL.createObjectURL(n),r=document.createElement("a");r.href=s,r.download=e,r.style.display="none",document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(s),0)}const $U={class:"help-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"help-title"},BU={class:"help-head"},UU={id:"help-title"},VU=["aria-label","title"],XU={class:"help-body"},YU={class:"help-section help-start"},zU={class:"help-note"},jU={class:"help-grid"},HU={class:"help-section"},GU={class:"help-list"},WU={class:"help-section"},qU={class:"shortcut-list"},KU={class:"help-note"},JU={class:"help-doc-title"},ZU=["aria-expanded"],QU={class:"mtitle"},e5={class:"caret"},t5={class:"help-module-body"},n5={class:"help-list"},i5=["aria-expanded"],s5={class:"mtitle"},r5={class:"caret"},o5={class:"help-module-body"},a5={class:"help-list"},l5=["aria-expanded"],c5={class:"mtitle"},d5={class:"caret"},u5={class:"help-module-body"},h5={class:"help-list"},f5=["aria-expanded"],p5={class:"mtitle"},m5={class:"caret"},g5={class:"help-module-body"},v5={class:"help-list"},b5=["aria-expanded"],y5={class:"mtitle"},x5={class:"caret"},w5={class:"help-module-body"},S5={class:"help-list"},C5=["aria-expanded"],A5={class:"mtitle"},T5={class:"caret"},E5={class:"help-module-body"},_5={class:"help-list"},M5=["aria-expanded"],P5={class:"mtitle"},k5={class:"caret"},I5={class:"help-module-body"},R5={class:"help-list"},F5=["aria-expanded"],L5={class:"mtitle"},D5={class:"caret"},O5={class:"help-module-body"},N5={class:"help-list"},$5=["aria-expanded"],B5={class:"mtitle"},U5={class:"caret"},V5={class:"help-module-body"},X5={class:"connector-intro"},Y5={class:"help-list"},z5={class:"help-section help-export"},j5=Zt({__name:"HelpDialog",props:{show:{type:Boolean}},emits:["close"],setup(i,{emit:e}){const t=e,n=Re(Array.from({length:9},()=>!1));function s(){t("close")}function r(o){o.key==="Escape"&&s()}return Ti(()=>window.addEventListener("keydown",r)),Ar(()=>window.removeEventListener("keydown",r)),(o,a)=>i.show?(Q(),te("div",{key:0,class:"help-overlay",role:"presentation",onClick:We(s,["self"])},[w("section",$U,[w("header",BU,[w("div",null,[w("h2",UU,F(o.$t("help.title")),1),w("p",null,F(o.$t("help.subtitle")),1)]),w("button",{class:"help-close","aria-label":o.$t("help.close"),title:o.$t("help.closeShort"),onClick:s},"✕",8,VU)]),w("div",XU,[w("section",YU,[w("h3",null,F(o.$t("help.quickStart")),1),w("ol",null,[w("li",null,F(o.$t("help.stepCreate")),1),w("li",null,F(o.$t("help.stepEdit")),1),w("li",null,F(o.$t("help.stepPreview")),1),w("li",null,F(o.$t("help.stepExport")),1)]),w("p",zU,F(o.$t("help.quickNote")),1)]),w("div",jU,[w("section",HU,[w("h3",null,F(o.$t("help.commonOps")),1),w("dl",GU,[w("div",null,[w("dt",null,F(o.$t("help.eye")),1),w("dd",null,F(o.$t("help.eyeDesc")),1)]),w("div",null,[a[9]||(a[9]=w("dt",null,"+Copy",-1)),w("dd",null,F(o.$t("help.copyDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("toolbar.background")),1),w("dd",null,F(o.$t("help.backgroundDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("toolbar.settings")),1),w("dd",null,F(o.$t("help.settingsDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.undoShortcut")),1),w("dd",null,F(o.$t("help.undoDesc")),1)]),w("div",null,[a[10]||(a[10]=w("dt",null,"Spine Bone",-1)),w("dd",null,F(o.$t("help.spineBoneDesc")),1)])])]),w("section",WU,[w("h3",null,F(o.$t("help.shortcuts")),1),w("div",qU,[w("div",null,[a[11]||(a[11]=w("kbd",null,"Ctrl/⌘",-1)),a[12]||(a[12]=w("span",null,"+",-1)),a[13]||(a[13]=w("kbd",null,"Z",-1)),w("em",null,F(o.$t("help.undoShortcut")),1)]),w("div",null,[a[14]||(a[14]=w("kbd",null,"Ctrl/⌘",-1)),a[15]||(a[15]=w("span",null,"+",-1)),a[16]||(a[16]=w("kbd",null,"S",-1)),w("em",null,F(o.$t("help.saveShortcut")),1)]),w("div",null,[a[17]||(a[17]=w("kbd",null,"Q",-1)),w("em",null,F(o.$t("help.panShortcut")),1)]),w("div",null,[a[18]||(a[18]=w("kbd",null,"W",-1)),w("em",null,F(o.$t("help.translateShortcut")),1)]),w("div",null,[a[19]||(a[19]=w("kbd",null,"E",-1)),w("em",null,F(o.$t("help.rotateShortcut")),1)]),w("div",null,[a[20]||(a[20]=w("kbd",null,"R",-1)),w("em",null,F(o.$t("help.scaleShortcut")),1)]),w("div",null,[a[21]||(a[21]=w("kbd",null,"D",-1)),w("em",null,F(o.$t("help.playShortcut")),1)]),w("div",null,[a[22]||(a[22]=w("kbd",null,"S",-1)),w("em",null,F(o.$t("help.startShortcut")),1)])]),w("p",KU,F(o.$t("help.shortcutNote")),1)])]),w("div",JU,F(o.$t("help.modules")),1),w("section",{class:Me(["help-section help-module",{open:n.value[0]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[0]?"true":"false",onClick:a[0]||(a[0]=c=>n.value[0]=!n.value[0])},[a[23]||(a[23]=w("span",{class:"mnum"},"1",-1)),w("span",QU,F(o.$t("help.configTitle")),1),w("span",e5,F(n.value[0]?"▾":"▸"),1)],8,ZU),pe(w("div",t5,[w("dl",n5,[w("div",null,[w("dt",null,F(o.$t("config.save")),1),w("dd",null,F(o.$t("help.saveConfigDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("config.load")),1),w("dd",null,F(o.$t("help.loadConfigDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("config.selectPreset")),1),w("dd",null,F(o.$t("help.presetDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.configScope")),1),w("dd",null,F(o.$t("help.configScopeDesc")),1)])])],512),[[Bt,n.value[0]]])],2),w("section",{class:Me(["help-section help-module",{open:n.value[1]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[1]?"true":"false",onClick:a[1]||(a[1]=c=>n.value[1]=!n.value[1])},[a[24]||(a[24]=w("span",{class:"mnum"},"2",-1)),w("span",s5,F(o.$t("help.sceneTitle")),1),w("span",r5,F(n.value[1]?"▾":"▸"),1)],8,i5),pe(w("div",o5,[w("dl",a5,[w("div",null,[w("dt",null,F(o.$t("scene.particle")),1),w("dd",null,F(o.$t("help.particleDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("scene.collision")),1),w("dd",null,F(o.$t("help.colliderDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("scene.path")),1),w("dd",null,F(o.$t("help.pathDesc")),1)]),w("div",null,[a[25]||(a[25]=w("dt",null,"Spine",-1)),w("dd",null,F(o.$t("help.spineDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.commonOps")),1),w("dd",null,F(o.$t("help.sceneCommonDesc")),1)])])],512),[[Bt,n.value[1]]])],2),w("section",{class:Me(["help-section help-module",{open:n.value[2]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[2]?"true":"false",onClick:a[2]||(a[2]=c=>n.value[2]=!n.value[2])},[a[26]||(a[26]=w("span",{class:"mnum"},"3",-1)),w("span",c5,F(o.$t("emission.title")),1),w("span",d5,F(n.value[2]?"▾":"▸"),1)],8,l5),pe(w("div",u5,[w("dl",h5,[w("div",null,[w("dt",null,F(o.$t("emission.stream")),1),w("dd",null,F(o.$t("help.emissionDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("emission.burst")),1),w("dd",null,F(o.$t("help.burstDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("emission.delay")),1),w("dd",null,F(o.$t("help.delayDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("modifiers.showShape")),1),w("dd",null,F(o.$t("help.loopNote")),1)])])],512),[[Bt,n.value[2]]])],2),w("section",{class:Me(["help-section help-module",{open:n.value[3]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[3]?"true":"false",onClick:a[3]||(a[3]=c=>n.value[3]=!n.value[3])},[a[27]||(a[27]=w("span",{class:"mnum"},"4",-1)),w("span",p5,F(o.$t("emission.shapeTitle")),1),w("span",m5,F(n.value[3]?"▾":"▸"),1)],8,f5),pe(w("div",g5,[w("dl",v5,[w("div",null,[w("dt",null,F(o.$t("emission.shape")),1),w("dd",null,F(o.$t("help.shapeDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("emission.emissionAngle")),1),w("dd",null,F(o.$t("help.angleDesc")),1)])])],512),[[Bt,n.value[3]]])],2),w("section",{class:Me(["help-section help-module",{open:n.value[4]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[4]?"true":"false",onClick:a[4]||(a[4]=c=>n.value[4]=!n.value[4])},[a[28]||(a[28]=w("span",{class:"mnum"},"5",-1)),w("span",y5,F(o.$t("attributes.title")),1),w("span",x5,F(n.value[4]?"▾":"▸"),1)],8,b5),pe(w("div",w5,[w("dl",S5,[w("div",null,[w("dt",null,F(o.$t("attributes.initialParams")),1),w("dd",null,F(o.$t("help.initialDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("attributes.lifecycleTitle")),1),w("dd",null,F(o.$t("help.overLifeDesc")),1)])])],512),[[Bt,n.value[4]]])],2),w("section",{class:Me(["help-section help-module",{open:n.value[5]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[5]?"true":"false",onClick:a[5]||(a[5]=c=>n.value[5]=!n.value[5])},[a[29]||(a[29]=w("span",{class:"mnum"},"6",-1)),w("span",A5,F(o.$t("appearance.title")),1),w("span",T5,F(n.value[5]?"▾":"▸"),1)],8,C5),pe(w("div",E5,[w("dl",_5,[w("div",null,[w("dt",null,F(o.$t("appearance.opacity")),1),w("dd",null,F(o.$t("help.alphaDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("appearance.imageResources")),1),w("dd",null,F(o.$t("help.imageDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("image.sequence")),1),w("dd",null,F(o.$t("help.sequenceDesc")),1)])])],512),[[Bt,n.value[5]]])],2),w("section",{class:Me(["help-section help-module",{open:n.value[6]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[6]?"true":"false",onClick:a[6]||(a[6]=c=>n.value[6]=!n.value[6])},[a[30]||(a[30]=w("span",{class:"mnum"},"7",-1)),w("span",P5,F(o.$t("modifiers.title")),1),w("span",k5,F(n.value[6]?"▾":"▸"),1)],8,M5),pe(w("div",I5,[w("dl",R5,[w("div",null,[w("dt",null,F(o.$t("modifiers.enableNoise")),1),w("dd",null,F(o.$t("help.noiseDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("modifiers.enableGravity"))+" / "+F(o.$t("modifiers.enableWind")),1),w("dd",null,F(o.$t("help.gravityDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("modifiers.enableForceField"))+" / "+F(o.$t("modifiers.enableVortex"))+" / "+F(o.$t("modifiers.enableAttraction")),1),w("dd",null,F(o.$t("help.forceDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("modifiers.enableTrail")),1),w("dd",null,F(o.$t("help.trailDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("modifiers.enableFollow")),1),w("dd",null,F(o.$t("help.followDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("modifiers.enableCollision"))+" / "+F(o.$t("modifiers.damping")),1),w("dd",null,F(o.$t("help.collisionDesc")),1)])])],512),[[Bt,n.value[6]]])],2),w("section",{class:Me(["help-section help-module",{open:n.value[7]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[7]?"true":"false",onClick:a[7]||(a[7]=c=>n.value[7]=!n.value[7])},[a[31]||(a[31]=w("span",{class:"mnum"},"8",-1)),w("span",L5,F(o.$t("export.title")),1),w("span",D5,F(n.value[7]?"▾":"▸"),1)],8,F5),pe(w("div",O5,[w("dl",N5,[w("div",null,[w("dt",null,F(o.$t("export.imagesPath")),1),w("dd",null,F(o.$t("help.exportDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("export.spineVersion")),1),a[32]||(a[32]=w("dd",null,"3.8 / 4.0 / 4.1 / 4.2 / 4.3",-1))]),w("div",null,[w("dt",null,F(o.$t("export.keyframeCurve")),1),w("dd",null,F(o.$t("export.bezierHelp")),1)]),w("div",null,[w("dt",null,F(o.$t("export.fps")),1),w("dd",null,F(o.$t("export.fpsHelp")),1)]),w("div",null,[w("dt",null,F(o.$t("export.title")),1),w("dd",null,F(o.$t("help.exportButtonsDesc")),1)])])],512),[[Bt,n.value[7]]])],2),w("section",{class:Me(["help-section help-module help-connector",{open:n.value[8]}])},[w("button",{type:"button",class:"help-module-head","aria-expanded":n.value[8]?"true":"false",onClick:a[8]||(a[8]=c=>n.value[8]=!n.value[8])},[a[33]||(a[33]=w("span",{class:"mnum"},"9",-1)),w("span",B5,F(o.$t("help.connectorTitle")),1),w("span",U5,F(n.value[8]?"▾":"▸"),1)],8,$5),pe(w("div",V5,[w("p",X5,F(o.$t("help.connectorIntro")),1),w("dl",Y5,[w("div",null,[w("dt",null,F(o.$t("help.prerequisite")),1),w("dd",null,F(o.$t("help.prerequisiteDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.download")),1),a[34]||(a[34]=w("dd",null,[w("a",{class:"dl-link",href:"/downloads/connector/SpineParticleConnector-windows-x64.exe",download:""},[Ct("Windows"),w("br"),w("small",null,"SpineParticleConnector-windows-x64.exe")]),w("a",{class:"dl-link",href:"/downloads/connector/SpineParticleConnector-macos-universal.zip",download:""},[Ct("macOS (Universal)"),w("br"),w("small",null,"SpineParticleConnector-macos-universal.zip")])],-1))]),w("div",null,[w("dt",null,F(o.$t("help.webSide")),1),w("dd",null,F(o.$t("help.webSideDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.authorization")),1),w("dd",null,F(o.$t("help.authorizationDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.pathSetup")),1),w("dd",null,F(o.$t("help.pathSetupDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.downloadResult")),1),w("dd",null,F(o.$t("help.downloadResultDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.version")),1),w("dd",null,F(o.$t("help.versionDesc")),1)]),w("div",null,[w("dt",null,F(o.$t("help.security")),1),w("dd",null,F(o.$t("help.securityDesc")),1)])])],512),[[Bt,n.value[8]]])],2),w("section",z5,[w("h3",null,F(o.$t("help.differenceTitle")),1),w("p",null,F(o.$t("help.differenceDesc")),1)])])])])):xe("",!0)}}),dn=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},H5=dn(j5,[["__scopeId","data-v-4bb9bc76"]]);function Ua(i){const e=()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",e),window.removeEventListener("pointercancel",e)};window.addEventListener("pointermove",i),window.addEventListener("pointerup",e),window.addEventListener("pointercancel",e)}function Fi(i,e,t){const n=i.holder.value,s=i.app(),r=n.getBoundingClientRect(),o=Math.max(1e-4,i.store.editor.viewScale),a=e-r.left,c=t-r.top;return{x:(a-s.screen.width/2-i.store.editor.viewX)/o,y:-(c-s.screen.height*.5-i.store.editor.viewY)/o}}function G5(i,e){const t=i.holder.value,n=i.app(),s=i.store,r=t.getBoundingClientRect(),o=e.clientX-r.left,a=e.clientY-r.top,c=e.deltaY<0?1.12:1/1.12,l=s.editor.viewScale,d=Math.max(.01,l*c),u=n.screen.width/2,h=n.screen.height*.5,f=s.editor.viewX,p=s.editor.viewY,m=(o-u-f)/l,g=(a-h-p)/l;s.editor.viewX=o-u-m*d,s.editor.viewY=a-h-g*d,s.editor.viewScale=d}function W5(i,e,t){const n=i.store,s=n.editor.viewX,r=n.editor.viewY;Ua(o=>{n.editor.viewX=s+(o.clientX-e),n.editor.viewY=r+(o.clientY-t)})}function iT(i,e){const t=Math.max(.01,i.store.editor.viewScale*e);i.store.editor.viewScale=t}function q5(i){iT(i,1.2)}function K5(i){iT(i,1/1.2)}function J5(i){i.store.editor.viewScale=1,i.store.editor.viewX=0,i.store.editor.viewY=0}function Z5(i){i.store.editor.viewScale=1,i.store.editor.viewX=0,i.store.editor.viewY=0}function Q5(i){i.store.settings.showGrid=!i.store.settings.showGrid}const e8={class:"top-operation-stack"},t8={class:"topbar"},n8=["title"],i8=["disabled","title"],s8={class:"tool-group"},r8=["title"],o8=["title"],a8=["title"],l8=["title"],c8={class:"tool-group"},d8=["title"],u8=["title"],h8=["title"],f8=["title"],p8=["title"],m8=["title"],g8={key:0,class:"background-panel"},v8=["disabled"],b8=["title"],y8={class:"background-position-row"},x8=["aria-label"],w8=["aria-label"],S8={class:"background-opacity-row"},C8=["aria-label"],A8={class:"language-picker"},T8=["value","aria-label"],E8=["value"],_8=["title"],M8={class:"zoom-pct"},P8={class:"timeline-controls-row"},k8={key:0,class:"stage-hud"},I8={class:"hud-number hud-system-count"},R8={class:"hud-number hud-particle-count"},F8={class:"hud-tip"},L8=Zt({__name:"StageToolbar",props:{ctx:{},activeTool:{},hud:{},showSettings:{type:Boolean},showHelp:{type:Boolean}},emits:["update:activeTool","update:showSettings","update:showHelp","clear-background","background-file"],setup(i,{emit:e}){const t=i,n=e,s=Zo(),{t:r,locale:o}=mi(),a=Re(!1),c=Re(null),l=Fe(()=>s.settings.backgroundImageName);function d(y){n("update:activeTool",t.activeTool===y?"":y)}function u(){a.value=!a.value,a.value&&n("update:showSettings",!1)}function h(){const y=!t.showSettings;n("update:showSettings",y),y&&(a.value=!1)}function f(){n("update:showHelp",!0),a.value=!1,n("update:showSettings",!1)}function p(y){n("background-file",y)}function m(y=!0){c.value&&(c.value.value=""),n("clear-background",y)}function g(){QA()}function v(y){const b=y.target.value;VC(b)}return(y,b)=>(Q(),te("div",e8,[w("div",t8,[w("button",{class:"settings-btn",onClick:h,title:_(r)("toolbar.settings")},F(_(r)("toolbar.settings")),9,n8),w("button",{class:"undo-btn",disabled:_(wr).undoCount===0,onClick:g,title:_(r)("toolbar.undo")},"↶",8,i8),w("div",s8,[w("button",{class:Me(["tool-btn",{on:i.activeTool===""}]),onClick:b[0]||(b[0]=x=>d("")),title:_(r)("toolbar.pan")},"✋",10,r8),w("button",{class:Me(["tool-btn",{on:i.activeTool==="translate"}]),onClick:b[1]||(b[1]=x=>d("translate")),title:_(r)("toolbar.translate")},"✥",10,o8),w("button",{class:Me(["tool-btn",{on:i.activeTool==="rotate"}]),onClick:b[2]||(b[2]=x=>d("rotate")),title:_(r)("toolbar.rotate")},"⟳",10,a8),w("button",{class:Me(["tool-btn",{on:i.activeTool==="scale"}]),onClick:b[3]||(b[3]=x=>d("scale")),title:_(r)("toolbar.scale")},"⤢",10,l8)]),w("div",c8,[w("button",{class:"tool-btn",onClick:b[4]||(b[4]=x=>_(q5)(i.ctx)),title:_(r)("toolbar.zoomIn")},"+",8,d8),w("button",{class:"tool-btn",onClick:b[5]||(b[5]=x=>_(K5)(i.ctx)),title:_(r)("toolbar.zoomOut")},"-",8,u8),w("button",{class:"tool-btn",onClick:b[6]||(b[6]=x=>_(J5)(i.ctx)),title:_(r)("toolbar.fitView")},"⤢",8,h8),w("button",{class:Me(["tool-btn",{on:_(s).settings.showGrid}]),onClick:b[7]||(b[7]=x=>_(Q5)(i.ctx)),title:_(r)("toolbar.toggleGrid")},"▦",10,f8),w("button",{class:"tool-btn",onClick:b[8]||(b[8]=x=>_(Z5)(i.ctx)),title:_(r)("toolbar.resetView")},"⟳",8,p8)]),w("div",{class:"background-menu",onClick:b[14]||(b[14]=We(()=>{},["stop"]))},[w("button",{class:Me(["background-btn",{on:a.value}]),title:_(r)("toolbar.backgroundSettings"),onClick:u},F(_(r)("toolbar.background")),11,m8),a.value?(Q(),te("div",g8,[w("button",{class:"background-upload",onClick:b[9]||(b[9]=x=>{var T;return(T=c.value)==null?void 0:T.click()})},F(l.value?_(r)("toolbar.changeBackground"):_(r)("toolbar.uploadBackground")),1),w("button",{class:"background-clear",disabled:!l.value,onClick:b[10]||(b[10]=x=>m())},F(_(r)("toolbar.clearBackground")),9,v8),w("input",{ref_key:"backgroundFileInput",ref:c,class:"background-file-input",type:"file",accept:"image/png,image/jpeg,image/webp",onChange:p},null,544),w("div",{class:"background-file-name",title:l.value},F(l.value||_(r)("toolbar.noBackground")),9,b8),w("div",y8,[w("label",null,[b[15]||(b[15]=w("span",null,"X",-1)),pe(w("input",{"onUpdate:modelValue":b[11]||(b[11]=x=>_(s).settings.backgroundX=x),type:"number",step:"1","aria-label":_(r)("toolbar.backgroundX")},null,8,x8),[[Je,_(s).settings.backgroundX,void 0,{number:!0}]])]),w("label",null,[b[16]||(b[16]=w("span",null,"Y",-1)),pe(w("input",{"onUpdate:modelValue":b[12]||(b[12]=x=>_(s).settings.backgroundY=x),type:"number",step:"1","aria-label":_(r)("toolbar.backgroundY")},null,8,w8),[[Je,_(s).settings.backgroundY,void 0,{number:!0}]])])]),w("label",S8,[w("span",null,F(_(r)("toolbar.opacity")),1),pe(w("input",{"onUpdate:modelValue":b[13]||(b[13]=x=>_(s).settings.backgroundOpacity=x),type:"range",min:"0",max:"1",step:"0.01","aria-label":_(r)("toolbar.backgroundOpacity")},null,8,C8),[[Je,_(s).settings.backgroundOpacity,void 0,{number:!0}]]),w("b",null,F(Math.round(_(s).settings.backgroundOpacity*100))+"%",1)])])):xe("",!0)]),w("label",A8,[w("span",null,F(_(r)("language.label")),1),w("select",{value:_(o),"aria-label":_(r)("language.label"),onChange:v},[(Q(!0),te(_e,null,Mt(_($C),x=>(Q(),te("option",{key:x.code,value:x.code},F(x.label),9,E8))),128))],40,T8)]),w("button",{class:Me(["help-btn",{on:i.showHelp}]),title:_(r)("toolbar.openHelp"),onClick:f},F(_(r)("toolbar.help")),11,_8),w("span",M8,F(Math.round(_(s).editor.viewScale*100))+"%",1)]),w("div",P8,[b[18]||(b[18]=w("div",{id:"timeline-controls-host",class:"timeline-controls-host"},null,-1)),i.hud?(Q(),te("div",k8,[Ct(F(_(r)("app.systems"))+": ",1),w("b",I8,F(i.hud.systems),1),Ct(" · "+F(_(r)("app.particlesBones"))+": ",1),w("b",R8,F(i.hud.particles),1),Ct(" · "+F(_(r)("app.rootBone"))+": ",1),b[17]||(b[17]=w("b",null,"root",-1)),w("span",F8,F(_(r)("app.hudTip")),1)])):xe("",!0)])]))}}),D8=dn(L8,[["__scopeId","data-v-2aafb245"]]),O8={class:"sp-head"},N8={class:"sp-section-title"},$8={class:"sp-switch-row"},B8={class:"sp-switch-control"},U8=["aria-label"],V8={class:"sp-switch-row"},X8={class:"sp-switch-control"},Y8=["aria-label"],z8={class:"sp-section-title"},j8={class:"sp-row"},H8=["aria-label"],G8={class:"sp-section-title"},W8={class:"sp-chk"},q8={class:"sp-chk"},K8={class:"sp-row"},J8=["aria-label"],Z8={class:"sp-row"},Q8=["aria-label"],eV={class:"sp-chk"},tV={class:"sp-chk"},nV={class:"sp-row"},iV={class:"sp-row"},sV={class:"sp-row"},rV={class:"sp-hex"},oV={class:"sp-chk"},aV={class:"sp-switch-row"},lV={class:"sp-switch-control"},cV=["aria-label"],dV={class:"sp-switch-row"},uV={class:"sp-switch-control"},hV=["aria-label"],fV={class:"sp-cache-note"},pV=Zt({__name:"StageSettingsPanel",props:{show:{type:Boolean}},emits:["close"],setup(i,{emit:e}){const t=i,n=e,s=Zo(),{t:r}=mi(),o=Re(null);Vt(()=>t.show,async d=>{var u;d&&(await tl(),(u=o.value)==null||u.focus())});function a(d){var h;const u=d.relatedTarget;u&&((h=o.value)!=null&&h.contains(u))||requestAnimationFrame(()=>{var f;t.show&&!((f=o.value)!=null&&f.contains(document.activeElement))&&n("close")})}function c(d){EU(s,Number(d.target.value))}function l(){s.settings.bonePointDrawSize=Math.min(10,Math.max(.1,Number(s.settings.bonePointDrawSize)||1)),s.settings.boneAxisDrawSize=Math.min(10,Math.max(.1,Number(s.settings.boneAxisDrawSize)||2))}return(d,u)=>i.show?(Q(),te("div",{key:0,ref_key:"panelRef",ref:o,class:"settings-panel",tabindex:"-1",onFocusout:a},[w("div",O8,[Ct(F(_(r)("settings.title"))+" ",1),w("button",{class:"sp-close",onClick:u[0]||(u[0]=h=>n("close"))},"✕")]),w("div",N8,F(_(r)("settings.layout")),1),w("label",$8,[w("span",null,F(_(r)("settings.parameterPanelPosition")),1),w("span",B8,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[1]||(u[1]=h=>_(s).settings.parameterPanelOnRight=h),"aria-label":_(r)("settings.panelOnRight")},null,8,U8),[[vt,_(s).settings.parameterPanelOnRight]]),u[18]||(u[18]=w("span",{class:"sp-switch-ui","aria-hidden":"true"},null,-1)),w("b",null,F(_(s).settings.parameterPanelOnRight?_(r)("common.right"):_(r)("common.left")),1)])]),w("label",V8,[w("span",null,F(_(r)("settings.floatingMenu")),1),w("span",X8,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[2]||(u[2]=h=>_(s).settings.floatingMenuEnabled=h),"aria-label":_(r)("settings.floatingMenu")},null,8,Y8),[[vt,_(s).settings.floatingMenuEnabled]]),u[19]||(u[19]=w("span",{class:"sp-switch-ui","aria-hidden":"true"},null,-1)),w("b",null,F(_(s).settings.floatingMenuEnabled?_(r)("common.enabled"):_(r)("common.disabled")),1)])]),u[22]||(u[22]=w("div",{class:"sp-divider"},null,-1)),w("div",z8,F(_(r)("settings.history")),1),w("label",j8,[w("span",null,F(_(r)("settings.maxUndo")),1),pe(w("input",{class:"sp-num sp-undo-limit",type:"number",min:"1",max:"200","onUpdate:modelValue":u[3]||(u[3]=h=>_(s).settings.undoLimit=h),"aria-label":_(r)("settings.maxUndo"),onChange:c},null,40,H8),[[Je,_(s).settings.undoLimit,void 0,{number:!0}]])]),u[23]||(u[23]=w("div",{class:"sp-divider"},null,-1)),w("div",G8,F(_(r)("settings.canvasGuides")),1),w("label",W8,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[4]||(u[4]=h=>_(s).settings.showEmitter=h)},null,512),[[vt,_(s).settings.showEmitter]]),Ct(F(_(r)("settings.emitter")),1)]),w("label",q8,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[5]||(u[5]=h=>_(s).settings.showBones=h)},null,512),[[vt,_(s).settings.showBones]]),Ct(F(_(r)("settings.bones")),1)]),_(s).settings.showBones?(Q(),te(_e,{key:0},[w("label",K8,[w("span",null,F(_(r)("settings.bonePointSize")),1),pe(w("input",{class:"sp-num",type:"number",min:"0.1",max:"10",step:"0.1","onUpdate:modelValue":u[6]||(u[6]=h=>_(s).settings.bonePointDrawSize=h),"aria-label":_(r)("settings.bonePointSize"),onChange:l},null,40,J8),[[Je,_(s).settings.bonePointDrawSize,void 0,{number:!0}]])]),w("label",Z8,[w("span",null,F(_(r)("settings.boneAxisSize")),1),pe(w("input",{class:"sp-num",type:"number",min:"0.1",max:"10",step:"0.1","onUpdate:modelValue":u[7]||(u[7]=h=>_(s).settings.boneAxisDrawSize=h),"aria-label":_(r)("settings.boneAxisSize"),onChange:l},null,40,Q8),[[Je,_(s).settings.boneAxisDrawSize,void 0,{number:!0}]])])],64)):xe("",!0),w("label",eV,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[8]||(u[8]=h=>_(s).settings.showSkinMesh=h)},null,512),[[vt,_(s).settings.showSkinMesh]]),Ct(F(_(r)("settings.skinMesh")),1)]),u[24]||(u[24]=w("div",{class:"sp-divider"},null,-1)),w("label",tV,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[9]||(u[9]=h=>_(s).settings.tickEnabled=h)},null,512),[[vt,_(s).settings.tickEnabled]]),Ct(F(_(r)("settings.enableTicks")),1)]),_(s).settings.tickEnabled?(Q(),te(_e,{key:1},[w("label",nV,[w("span",null,F(_(r)("settings.tickFontSize")),1),pe(w("input",{type:"range",min:"8",max:"40",step:"1","onUpdate:modelValue":u[10]||(u[10]=h=>_(s).settings.axisFontSize=h)},null,512),[[Je,_(s).settings.axisFontSize,void 0,{number:!0}]]),pe(w("input",{type:"number",min:"8",max:"40","onUpdate:modelValue":u[11]||(u[11]=h=>_(s).settings.axisFontSize=h),class:"sp-num"},null,512),[[Je,_(s).settings.axisFontSize,void 0,{number:!0}]])]),w("label",iV,[w("span",null,F(_(r)("settings.tickWidth")),1),pe(w("input",{type:"range",min:"1",max:"5",step:"0.5","onUpdate:modelValue":u[12]||(u[12]=h=>_(s).settings.tickWidth=h)},null,512),[[Je,_(s).settings.tickWidth,void 0,{number:!0}]]),pe(w("input",{type:"number",min:"1",max:"5","onUpdate:modelValue":u[13]||(u[13]=h=>_(s).settings.tickWidth=h),class:"sp-num"},null,512),[[Je,_(s).settings.tickWidth,void 0,{number:!0}]])]),w("label",sV,[w("span",null,F(_(r)("settings.axisColor")),1),pe(w("input",{type:"color","onUpdate:modelValue":u[14]||(u[14]=h=>_(s).settings.axisColor=h),class:"sp-colr"},null,512),[[Je,_(s).settings.axisColor]]),w("span",rV,F(_(s).settings.axisColor),1)]),w("label",oV,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[15]||(u[15]=h=>_(s).settings.showAxisLabels=h)},null,512),[[vt,_(s).settings.showAxisLabels]]),Ct(F(_(r)("settings.showAxisLabels")),1)])],64)):xe("",!0),u[25]||(u[25]=w("div",{class:"sp-divider"},null,-1)),w("label",aV,[w("span",null,F(_(r)("settings.unsavedPrompt")),1),w("span",lV,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[16]||(u[16]=h=>_(s).settings.unsavedChangesPrompt=h),"aria-label":_(r)("settings.unsavedPrompt")},null,8,cV),[[vt,_(s).settings.unsavedChangesPrompt]]),u[20]||(u[20]=w("span",{class:"sp-switch-ui","aria-hidden":"true"},null,-1)),w("b",null,F(_(s).settings.unsavedChangesPrompt?_(r)("common.enabled"):_(r)("common.disabled")),1)])]),w("label",dV,[w("span",null,F(_(r)("settings.showProjectSize")),1),w("span",uV,[pe(w("input",{type:"checkbox","onUpdate:modelValue":u[17]||(u[17]=h=>_(s).settings.showProjectSize=h),"aria-label":_(r)("settings.showProjectSize")},null,8,hV),[[vt,_(s).settings.showProjectSize]]),u[21]||(u[21]=w("span",{class:"sp-switch-ui","aria-hidden":"true"},null,-1)),w("b",null,F(_(s).settings.showProjectSize?_(r)("common.enabled"):_(r)("common.disabled")),1)])]),w("div",fV,F(_(r)("settings.cacheNote")),1)],544)):xe("",!0)}}),mV=dn(pV,[["__scopeId","data-v-22b4df39"]]);class Ep{constructor(){A(this,"sprite",null);A(this,"texture",null);A(this,"loadVersion",0)}createSprite(e){const t=new oo(tt.EMPTY);return t.anchor.set(.5),t.visible=!1,e.addChild(t),this.sprite=t,t}applyTransform(e,t,n){this.sprite&&(this.sprite.position.set(Number(e)||0,-(Number(t)||0)),this.sprite.alpha=Math.min(1,Math.max(0,Number(n)||0)))}async syncTexture(e){const t=++this.loadVersion;if(!e){this.sprite&&(this.sprite.texture=tt.EMPTY,this.sprite.visible=!1),this.texture&&this.texture.destroy(!0),this.texture=null;return}try{const n=await tt.fromURL(e);if(t!==this.loadVersion||!this.sprite){n.destroy(!0);return}const s=this.texture;this.texture=n,this.sprite.texture=n,this.sprite.visible=!0,s&&s.destroy(!0)}catch(n){console.error("背景图恢复失败",n)}}static clearStoreBackground(e,t){e.settings.backgroundImageData="",e.settings.backgroundImageName="",t&&(e.settings.backgroundX=0,e.settings.backgroundY=0,e.settings.backgroundOpacity=1)}static async handleFileChange(e,t){var r;const n=t.target,s=(r=n.files)==null?void 0:r[0];if(s)try{e.settings.backgroundImageData=await $d(s),e.settings.backgroundImageName=s.name}catch(o){console.error("背景图加载失败",o)}finally{n.value=""}}destroy(){this.loadVersion++,this.texture&&this.texture.destroy(!0),this.texture=null,this.sprite=null}}class gV{constructor(e){A(this,"selectedNodes",new Set);A(this,"suppressNextDoubleClick",!1);this.ctx=e}resetSelection(){this.selectedNodes.clear()}activePath(){const e=this.ctx.store;if(e.activeObjectType!=="path")return null;const t=e.paths.find(n=>n.id===e.activeObjectId)||null;return(t==null?void 0:t.visible)===!1?null:t}pathInsertIndex(e,t,n){if(e.points.length<2)return e.points.length;const s=e.closed?e.points.length:e.points.length-1;let r=e.points.length,o=1/0;for(let a=0;a<s;a++){const c=e.points[a],l=e.points[(a+1)%e.points.length],d=l.x-c.x,u=l.y-c.y,h=Math.max(1e-4,d*d+u*u),f=Math.min(1,Math.max(0,((t-c.x)*d+(n-c.y)*u)/h)),p=c.x+d*f,m=c.y+u*f,g=Math.hypot(t-p,n-m);g<o&&(o=g,r=a+1)}return r}onStageDoubleClick(e){const t=this.activePath();if(!t||!t.enabled)return;if(this.suppressNextDoubleClick){this.suppressNextDoubleClick=!1;return}const n=Fi(this.ctx,e.clientX,e.clientY),s=da(t,n.x,n.y),r=9/Math.max(.01,this.ctx.store.editor.viewScale),o=t.points.findIndex(c=>Math.hypot(c.x-s.x,c.y-s.y)<=r);if(o>=0){t.points.splice(o,1),this.selectedNodes.clear();return}const a=this.pathInsertIndex(t,s.x,s.y);t.points.splice(a,0,{x:s.x,y:s.y,inX:0,inY:0,outX:0,outY:0}),this.selectedNodes.clear(),this.selectedNodes.add(a)}onPointerDown(e){const t=this.activePath();if(!t||!t.enabled)return!1;const n=Fi(this.ctx,e.clientX,e.clientY),s=da(t,n.x,n.y),r=9/Math.max(.01,this.ctx.store.editor.viewScale);if(e.detail>=2){if(t.points.findIndex(u=>Math.hypot(u.x-s.x,u.y-s.y)<=r)>=0)return!0;const l={x:s.x,y:s.y,inX:0,inY:0,outX:0,outY:0},d=this.pathInsertIndex(t,s.x,s.y);return t.points.splice(d,0,l),this.selectedNodes.clear(),this.selectedNodes.add(d),this.suppressNextDoubleClick=!0,Ua(u=>{const h=Fi(this.ctx,u.clientX,u.clientY),f=da(t,h.x,h.y);l.outX=f.x-l.x,l.outY=f.y-l.y,l.inX=-l.outX,l.inY=-l.outY}),!0}let o=null;for(const c of this.selectedNodes){const l=t.points[c];l&&(Math.hypot(l.x+l.inX-s.x,l.y+l.inY-s.y)<=r&&(o={index:c,side:"in"}),Math.hypot(l.x+l.outX-s.x,l.y+l.outY-s.y)<=r&&(o={index:c,side:"out"}))}if(o){const c=t.points[o.index],l=o.side==="in"?Math.hypot(c.outX,c.outY):Math.hypot(c.inX,c.inY);return Ua(u=>{const h=Fi(this.ctx,u.clientX,u.clientY),f=da(t,h.x,h.y),p=f.x-c.x,m=f.y-c.y;if(o.side==="in"?(c.inX=p,c.inY=m):(c.outX=p,c.outY=m),!u.altKey){const g=Math.max(1e-4,Math.hypot(p,m)),v=u.shiftKey?g:l;o.side==="in"?(c.outX=-p/g*v,c.outY=-m/g*v):(c.inX=-p/g*v,c.inY=-m/g*v)}}),!0}const a=t.points.findIndex(c=>Math.hypot(c.x-s.x,c.y-s.y)<=r);if(a>=0){if(e.altKey)return this.selectedNodes.delete(a),!0;e.ctrlKey||e.metaKey?this.selectedNodes.add(a):this.selectedNodes.has(a)||(this.selectedNodes.clear(),this.selectedNodes.add(a));const c=s,l=[...this.selectedNodes].map(u=>({index:u,x:t.points[u].x,y:t.points[u].y}));return Ua(u=>{const h=Fi(this.ctx,u.clientX,u.clientY),f=da(t,h.x,h.y);for(const p of l)t.points[p.index].x=p.x+f.x-c.x,t.points[p.index].y=p.y+f.y-c.y}),!0}if(e.altKey&&!e.ctrlKey&&!e.metaKey)return this.selectedNodes.clear(),!0;if(e.ctrlKey||e.metaKey||e.altKey){const c=s,l=e.altKey,d=u=>{const h=Fi(this.ctx,u.clientX,u.clientY),f=da(t,h.x,h.y),p=Math.min(c.x,f.x),m=Math.max(c.x,f.x),g=Math.min(c.y,f.y),v=Math.max(c.y,f.y);t.points.forEach((y,b)=>{y.x>=p&&y.x<=m&&y.y>=g&&y.y<=v&&(l?this.selectedNodes.delete(b):this.selectedNodes.add(b))}),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d)};return window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),!0}return!1}}class vV{constructor(e,t){this.ctx=e,this.getTool=t}onColliderPointerDown(e){const t=this.ctx.store;if(t.activeObjectType!=="collision")return!1;const n=t.colliders.find(y=>y.id===t.activeObjectId);if(!(n!=null&&n.enabled)||n.visible===!1)return!1;const s=Fi(this.ctx,e.clientX,e.clientY),r=n.rotation*Math.PI/180,o=Math.cos(r),a=Math.sin(r),c=Math.max(1e-4,Math.abs(n.scaleX??1)),l=Math.max(1e-4,Math.abs(n.scaleY??1)),d=s.x-n.x,u=s.y-n.y,h=(o*d+a*u)/c,f=(-a*d+o*u)/l;if(!(n.shape==="circle"?Math.hypot(h,f)<=n.radius:n.shape==="ellipse"?Math.hypot(h/Math.max(1,n.radiusX),f/Math.max(1,n.radiusY))<=1:Math.abs(h)<=n.width*.5&&Math.abs(f)<=n.height*.5))return!1;const m=n.x,g=n.y,v=s;return Ua(y=>{const b=Fi(this.ctx,y.clientX,y.clientY);n.x=m+b.x-v.x,n.y=g+b.y-v.y}),!0}onForceFieldDown(e){const t=this.ctx.store.systems.find(d=>d.id===this.ctx.store.activeId);if((t==null?void 0:t.visible)===!1)return!1;const n=t==null?void 0:t.config;if(!(n!=null&&n.forceField)||!n.showForceFieldShape||n.forceRadius<=0)return!1;const s=Fi(this.ctx,e.clientX,e.clientY);if(Math.hypot(s.x-n.forceCenterX,s.y-n.forceCenterY)>n.forceRadius)return!1;const o=n.forceCenterX,a=n.forceCenterY;this.ctx.holder.value&&(this.ctx.holder.value.style.cursor="grabbing");const c=d=>{const u=Fi(this.ctx,d.clientX,d.clientY);n.forceCenterX=o+u.x-s.x,n.forceCenterY=a+u.y-s.y},l=()=>{this.ctx.holder.value&&(this.ctx.holder.value.style.cursor=""),window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l)};return window.addEventListener("pointermove",c),window.addEventListener("pointerup",l),window.addEventListener("pointercancel",l),e.preventDefault(),!0}onAttractionDown(e){const t=this.ctx.store.systems.find(u=>u.id===this.ctx.store.activeId);if((t==null?void 0:t.visible)===!1)return!1;const n=t==null?void 0:t.config;if(!(n!=null&&n.attraction)||!n.showAttractionShape)return!1;const s=Fi(this.ctx,e.clientX,e.clientY),r=Math.max(n.attractionRadius,12/Math.max(1e-4,this.ctx.store.editor.viewScale));if(Math.hypot(s.x-n.attractionCenterX,s.y-n.attractionCenterY)>r)return!1;const a=n.attractionCenterX,c=n.attractionCenterY;this.ctx.holder.value&&(this.ctx.holder.value.style.cursor="grabbing");const l=u=>{const h=Fi(this.ctx,u.clientX,u.clientY);n.attractionCenterX=a+h.x-s.x,n.attractionCenterY=c+h.y-s.y},d=()=>{this.ctx.holder.value&&(this.ctx.holder.value.style.cursor=""),window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d)};return window.addEventListener("pointermove",l),window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),e.preventDefault(),!0}selectedTransformTarget(){const e=this.ctx.store,t=e.activeObjectId;if(e.activeObjectType==="particle"){const r=e.systems.find(a=>a.id===t);if(!r||r.visible===!1)return null;const o=r.config;return{x:o.centerX,y:o.centerY,rotation:o.rootRotation,scaleX:o.rootScaleX??1,scaleY:o.rootScaleY??1,setPosition:(a,c)=>{o.centerX=a,o.centerY=c},setRotation:a=>{o.rootRotation=a},setScale:(a,c)=>{o.rootScaleX=a,o.rootScaleY=c}}}const s=(e.activeObjectType==="collision"?e.colliders:e.activeObjectType==="path"?e.paths:e.spines).find(r=>r.id===t);return!s||s.visible===!1?null:{x:Number(s.x)||0,y:Number(s.y)||0,rotation:Number(s.rotation)||0,scaleX:Math.max(.05,Number(s.scaleX)||1),scaleY:Math.max(.05,Number(s.scaleY)||1),setPosition:(r,o)=>{s.x=r,s.y=o},setRotation:r=>{s.rotation=r},setScale:(r,o)=>{s.scaleX=r,s.scaleY=o}}}onGizmoDown(e){const t=this.selectedTransformTarget();if(!t)return;const n=this.ctx.app(),s=this.ctx.store,r=s.editor.viewScale,o=this.ctx.holder.value.getBoundingClientRect(),a=o.left+n.screen.width/2+s.editor.viewX+t.x*r,c=o.top+n.screen.height*.5+s.editor.viewY+-t.y*r,l=e.clientX,d=e.clientY,u=this.getTool(),h=t.x,f=t.y,p=t.rotation,m=t.scaleX,g=t.scaleY,v=Math.hypot(l-a,d-c)||1,y=Math.atan2(d-c,l-a);Ua(x=>{const T=(x.clientX-l)/r,E=(x.clientY-d)/r;if(u==="translate")t.setPosition(h+T,f-E);else if(u==="rotate"){const S=Math.atan2(x.clientY-c,x.clientX-a);t.setRotation(p-(S-y)*180/Math.PI)}else if(u==="scale"){const C=Math.hypot(x.clientX-a,x.clientY-c)/v;t.setScale(Math.max(.05,m*C),Math.max(.05,g*C))}})}}function xx(i,e,t,n,s){const r=1-s;return r*r*r*i+3*r*r*s*e+3*r*s*s*t+s*s*s*n}function wx(i,e,t){const n=i.rotation*Math.PI/180,s=Math.cos(n),r=Math.sin(n),o=Math.max(1e-4,Math.abs(i.scaleX??1)),a=Math.max(1e-4,Math.abs(i.scaleY??1));return{x:i.x+s*e*o-r*t*a,y:i.y+r*e*o+s*t*a}}function dv(i,e){if(!i.points.length)return null;if(i.points.length===1)return{...wx(i,i.points[0].x,i.points[0].y),angle:i.rotation};const t=i.closed?i.points.length:i.points.length-1,n=[];let s=0;for(let p=0;p<t;p++){const m=i.points[p],g=i.points[(p+1)%i.points.length];for(let v=0;v<=20;v++){if(p>0&&v===0)continue;const y=v/20,b=xx(m.x,m.x+m.outX,g.x+g.inX,g.x,y),x=xx(m.y,m.y+m.outY,g.y+g.inY,g.y,y),T=wx(i,b,x),E=n[n.length-1];E&&(s+=Math.hypot(T.x-E.x,T.y-E.y)),n.push({...T,distance:s})}}const r=Math.min(1,Math.max(0,e))*s;let o=n.findIndex(p=>p.distance>=r);o<0&&(o=n.length-1);const a=n[o],c=n[Math.max(0,o-1)],l=n[Math.min(n.length-1,o+1)],d=c.distance,u=o>0?(r-d)/Math.max(1e-4,a.distance-d):0,h=c.x+(a.x-c.x)*Math.min(1,Math.max(0,u)),f=c.y+(a.y-c.y)*Math.min(1,Math.max(0,u));return{x:h,y:f,angle:Math.atan2(l.y-c.y,l.x-c.x)*180/Math.PI}}function bV(i,e,t){if(e.renderLayerMode!=="slot")return null;const n=i.find(o=>o.id===e.renderLayerSpineId&&o.enabled&&o.visible!==!1&&o.status==="ready");if(!n)return null;const s=n.slots||[],r=s.find(o=>o.name===e.renderLayerSlotName);if(!r)return null;if(e.renderLayerSlotPosition==="below"){let o="";if(t!=null&&t.length){const a=t.indexOf(r.name);if(a===0)return null;a>0&&(o=t[a-1])}if(!o){const a=s.filter(c=>c.order<r.order).sort((c,l)=>l.order-c.order)[0];if(!a)return null;o=a.name}return{spineId:n.id,slotName:o,targetSlotName:r.name,followAttachment:!1}}return{spineId:n.id,slotName:r.name,targetSlotName:r.name,followAttachment:e.renderLayerFollowAttachment}}function ku(i,e,t,n=Math.max(1e-4,Math.abs(i.rootScaleX)),s=Math.max(1e-4,Math.abs(i.rootScaleY))){const r=-i.rootRotation*Math.PI/180,o=Math.cos(r),a=Math.sin(r),c=e-i.centerX,l=-t+i.centerY;return{x:(o*c+a*l)/n,y:(-a*c+o*l)/s}}function yV(i,e,t){const n=dv(e,t);if(!n)return null;const s=ku(i,n.x,n.y),r=n.angle*Math.PI/180,o=ku(i,n.x+Math.cos(r),n.y+Math.sin(r)),a=Math.atan2(o.y-s.y,o.x-s.x)*180/Math.PI;return{...s,angle:a}}function xV(i,e){return i.colliders.map(t=>{if(!t.followPath||!t.followPathId)return t;const n=i.paths.find(d=>d.id===t.followPathId&&d.enabled);if(!(n!=null&&n.points.length))return t;const s=Math.max(.05,Number(t.followDuration)||2),r=Math.min(1,Math.max(0,e/s)),o=Array.isArray(t.followCurve)?t.followCurve:[{x:0,y:0},{x:1,y:1}],a=t.followCurveMode==="跟随导出"?i.settings.exportSettings.keyframeCurve==="bezier"?"bezier":"linear":t.followCurveMode==="贝塞尔"?"bezier":"linear",c=Math.min(1,Math.max(0,zC(o,r,a))),l=dv(n,c);return l?{...t,x:l.x,y:l.y,rotation:t.rotation+(t.followPathRotation?l.angle:0)}:t})}class wV{constructor(){A(this,"emitters",new Map);A(this,"configs",new Map);A(this,"store",null);A(this,"eventsSuspended",!1);A(this,"subEmitterState",new Map);A(this,"slotGroups",new Map)}sync(e,t,n,s,r=null){this.store=e;for(const[c,l]of this.emitters){const d=e.systems.find(u=>u.id===c);(!d||this.configs.get(c)!==d.config)&&(l.removeFromParent(),l.destroy({children:!0}),this.emitters.delete(c),this.configs.delete(c))}for(const c of e.systems){n&&!c.config.texture&&(c.config.texture=n);const l=fr(c.config);if(s)for(const u of l.trailResources)!u.texture&&(u.previewUrl==="/images/trail.png"||u.previewUrl==="/trails/trail.png")&&(u.texture=s);if(n)for(const u of l.imageResources)!u.texture&&u.textureName==="star"&&(u.texture=n);if(this.emitters.has(c.id))continue;const d=new xy(c.config);d.onParticleEvent=u=>this.handleParticleEvent(c.id,u),t.addChild(d),this.emitters.set(c.id,d),this.configs.set(c.id,c.config)}const o=ja(e.systems);for(const c of e.systems){const l=this.emitters.get(c.id);if(!l)continue;l.onParticleEvent||(l.onParticleEvent=u=>this.handleParticleEvent(c.id,u));const d=o.has(c.id);this.subEmitterState.get(c.id)!==d&&(d&&l.clear(),this.subEmitterState.set(c.id,d)),l.setAutoEmission(!d)}const a=new Set;for(const c of e.systems){const l=this.emitters.get(c.id);if(!l)continue;const d=r&&c.config.renderLayerMode==="slot"?r.getDrawOrder(c.config.renderLayerSpineId):null,u=bV(e.spines,c.config,d),h=u&&r?this.ensureSlotGroup(u,r,c.config):null;h?(a.add(h.key),l.parent!==h.compensator&&h.compensator.addChild(l)):l.parent!==t&&t.addChild(l)}for(const[c,l]of[...this.slotGroups])if(!a.has(c)){for(const d of[...l.compensator.children])d instanceof xy&&d.parent===l.compensator&&t.addChild(d);r==null||r.detachSlotObject(l.spineId,l.slotName,l.wrapper),l.wrapper.removeFromParent(),l.wrapper.removeChild(l.compensator),l.compensator.destroy(),l.wrapper.destroy(),this.slotGroups.delete(c)}}ensureSlotGroup(e,t,n){const s=`${e.spineId}:${e.targetSlotName}:${n.renderLayerSlotPosition}`;let r=this.slotGroups.get(s);if(!r){const o=new Mn,a=new Mn;o.addChild(a),r={key:s,spineId:e.spineId,slotName:e.slotName,wrapper:o,compensator:a,followAttachment:n.renderLayerFollowAttachment,attached:!1},this.slotGroups.set(s,r)}return(!r.attached||!r.wrapper.parent||r.slotName!==e.slotName)&&(r.wrapper.parent&&t.detachSlotObject(r.spineId,r.slotName,r.wrapper),r.slotName=e.slotName,r.attached=t.attachSlotObject(r.spineId,r.slotName,r.wrapper,e.followAttachment)),r.attached?r:null}updateRenderCompensation(e,t){if(t)for(const n of this.slotGroups.values()){if(!n.attached||!n.wrapper.parent)continue;const s=e.spines.find(o=>o.id===n.spineId);if(!s)continue;const r=t.getSlotParentMatrix(n.spineId,n.slotName,s);r&&(r.invert(),n.compensator.transform.setFromMatrix(r))}}suspendEvents(e){this.eventsSuspended=e}handleParticleEvent(e,t){if(this.eventsSuspended)return;const n=this.store;if(!n)return;const s=n.systems.find(o=>o.id===e),r=s==null?void 0:s.config;if(!(!(r!=null&&r.eventEnabled)||!Array.isArray(r.events)||!r.events.length)&&!(t.depth>=2))for(const o of r.events){if(o.event!==t.kind||o.event==="collision"&&t.collisionCount>o.collisionLimit||o.targetSystemId<=0||o.targetSystemId===e)continue;const a=Math.min(1,Math.max(0,Number(o.probability)||0));if(a<=0)continue;const c=(Math.imul(o.id+1,2654435761)^Math.imul(t.depth+1,2246822507))>>>0;if(Dr(r.seed>>>0,t.spawnId+1,c)>=a)continue;const d=this.emitters.get(o.targetSystemId);if(!d)continue;const u=Array.isArray(o.inherit)?o.inherit:[],h=u.length?{attributes:u,colorMode:o.colorInheritMode==="replace"?"replace":"add",data:{colorHex:t.colorHex,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,life:t.maxLife}}:void 0;d.spawnEventParticle(t.worldX,t.worldY,t.depth+1,h)}}destroy(e){for(const t of this.slotGroups.values()){for(const n of[...t.compensator.children])t.compensator.removeChild(n);t.wrapper.removeFromParent(),t.compensator.destroy(),t.wrapper.destroy()}this.slotGroups.clear();for(const[t,n]of this.emitters)n.removeFromParent(),n.destroy({children:!0}),this.emitters.delete(t),this.configs.delete(t)}}async function SV(){const[i,e]=await Promise.all([tt.fromURL("/images/star.png"),tt.fromURL("/images/trail.png")]);return{dotTex:i,trailTex:e}}function CV(i,e,t){for(const n of i.systems){n.config.texture=e;const s=fr(n.config);if(t)for(const r of s.trailResources)!r.texture&&(r.previewUrl==="/images/trail.png"||r.previewUrl==="/trails/trail.png")&&(r.texture=t);for(const r of s.imageResources)!r.texture&&r.textureName==="star"&&(r.texture=e)}}const AV={class:"stage-wrap"},TV=Zt({__name:"Stage",setup(i){const e=Zo(),t=Re(null),n=Re(null),s=Re(!1),r=Re(!1),o=Re(""),a=Re(!1);e.settings.undoLimit>0||(e.settings.undoLimit=20),e.settings.parameterPanelOnRight==null&&(e.settings.parameterPanelOnRight=!0),Number.isFinite(e.settings.backgroundX)||(e.settings.backgroundX=0),Number.isFinite(e.settings.backgroundY)||(e.settings.backgroundY=0),Number.isFinite(e.settings.backgroundOpacity)||(e.settings.backgroundOpacity=1),e.settings.backgroundImageName==null&&(e.settings.backgroundImageName=""),e.settings.backgroundImageData==null&&(e.settings.backgroundImageData=""),e.settings.showEmitter==null&&(e.settings.showEmitter=!0),e.settings.showBones==null&&(e.settings.showBones=!1),e.settings.bonePointDrawSize>0||(e.settings.bonePointDrawSize=1),e.settings.boneAxisDrawSize>0||(e.settings.boneAxisDrawSize=2),e.settings.showSkinMesh==null&&(e.settings.showSkinMesh=!1),e.settings.showGrid==null&&(e.settings.showGrid=!0);let c=null,l=null,d=null,u=null,h=null,f=null,p=null,m=null,g=null,v=null,y=null,b=null,x=null,T=null,E=null,S=null,C=[],M=0,k=0,P=0,I=0,D=null,$=null;const j=new Ep,B=new wV,Y={store:e,holder:t,app:()=>c},U=new gV(Y),O=new vV(Y,()=>o.value);let L=[];const R=new Map;function X(){d=new Mn,c.stage.addChild(d),E=new Mn,c.stage.addChild(E),j.createSprite(d),T=new ti,d.addChild(T),S=new $3,d.addChild(S.container),h=new ti,d.addChild(h),u=new ti,d.addChild(u),p=new ti,d.addChild(p),m=new ti,d.addChild(m),g=new ti,d.addChild(g),v=new ti,d.addChild(v),y=new ti,d.addChild(y),b=new ti,d.addChild(b),x=new ti,d.addChild(x),f=new ti,d.addChild(f)}function z(J){if(J.button===0){if(o.value&&O.selectedTransformTarget()){O.onGizmoDown(J);return}U.onPointerDown(J)||O.onColliderPointerDown(J)||O.onAttractionDown(J)||O.onForceFieldDown(J)||W5(Y,J.clientX,J.clientY)}}function K(J){U.onStageDoubleClick(J)}function Z(J){!e.settings.unsavedChangesPrompt||!wr.dirty||(J.preventDefault(),J.returnValue="")}function ae(J){G5(Y,J)}function ce(J=!0){Ep.clearStoreBackground(e,J)}async function ve(J){await Ep.handleFileChange(e,J)}MU({canvasElement:t,canvasFocused:a,undo:QA,save:()=>window.dispatchEvent(new Event(zm)),togglePlay:()=>e.togglePlay(),toStart:()=>e.toStart(),setTool:J=>{o.value=J}});function we(){d&&B.sync(e,d,D,$,S)}function re(J,ie,se,H){const G=Math.max(2,Math.floor(H)||2);if(J.config.mode==="stream"&&J.config.streamBehavior==="loop"){rx(J,ie,se,G);return}ie.reset();const N=1/Math.max(1,se),V=[];for(let W=0;W<G;W++)W===0?(ie.apply([]),V.push([])):V.push(ie.update(N));J.frames=V}function Ee(J){var H;const ie=Math.max(2,Math.floor(e.timeline.totalFrames)||2),se=ja(e.systems);B.suspendEvents(!0);try{for(const G of e.systems){if(se.has(G.id)||(((H=G.frames)==null?void 0:H.length)||0)>=ie)continue;const N=B.emitters.get(G.id);N&&re(G,N,J,ie)}}finally{B.suspendEvents(!1)}e.systems.every(G=>{var N;return(((N=G.frames)==null?void 0:N.length)||0)>=ie})&&(e.timeline.recorded=!0)}function q(){var se,H,G,N;I=requestAnimationFrame(q);const J=performance.now()/1e3;let ie=J-M;if(M=J,ie>.1&&(ie=.1),c&&d){d.scale.set(e.editor.viewScale),d.position.set(c.screen.width/2+e.editor.viewX,c.screen.height*.5+e.editor.viewY),j.applyTransform(e.settings.backgroundX,e.settings.backgroundY,e.settings.backgroundOpacity),x3(e,c,T,E,C);const V=Math.max(1,e.timeline.fps),W=e.timeline.frame,ee=W/V;S==null||S.sync(e.spines,W,V),we(),B.updateRenderCompensation(e,S),L=xV(e,ee);for(const ft of e.systems){const Oe=B.emitters.get(ft.id);if(!Oe)continue;Oe.setFollowExportCurveMode(e.settings.exportSettings.keyframeCurve==="bezier"?"贝塞尔":"线性");const ot=ft.visible!==!1;Oe.visible=ot,Oe.renderable=ot;const Te=ft.config;Oe.scale.set(Te.rootScaleX,Te.rootScaleY);const ue=new Set(Te.collisionColliderIds);Oe.setColliders(Te.collision?L.filter(xt=>ue.has(xt.id)):[]),Oe.setEmitterFollowSpawn(0,0,0);let fe={x:Te.centerX,y:Te.centerY,rotation:Te.rootRotation};const nt=Te.emitterFollow&&Te.emitterFollowMode==="bone"?e.spines.find(xt=>xt.id===Te.emitterFollowSpineId&&xt.enabled&&xt.status==="ready"):null,mt=nt&&(S==null?void 0:S.getBoneWorldTransform(nt.id,Te.emitterFollowBoneName))||null,lt=Te.emitterFollow&&Te.emitterFollowMode==="path"?e.paths.find(xt=>xt.id===Te.emitterFollowPathId&&xt.enabled):null,ct=Math.max(.05,Te.emitterFollowDuration),Kn=Math.min(1,Math.max(0,ee/ct)),_i=Math.min(1,Math.max(0,zC(Te.emitterFollowCurve,Kn))),wn=Math.min(1,Math.max(0,Te.emitterFollowOffset)),gi=Te.emitterFollowDirection==="reverse"?(1-wn)*(1-_i):wn+(1-wn)*_i,Bn=lt?dv(lt,gi):null;if(mt){const xt=Te.emitterFollowBoneOffsetX,vi=Te.emitterFollowBoneOffsetY,Jn=mt.x+xt,Ui=mt.y+vi,Un=Te.rootRotation+Te.emitterFollowBoneRotation,Vi=Math.max(1e-4,Math.abs(Te.rootScaleX*Te.emitterFollowBoneScaleX)),Zn=Math.max(1e-4,Math.abs(Te.rootScaleY*Te.emitterFollowBoneScaleY));if(fe={x:Jn,y:Ui,rotation:Un},Te.emitterFollowSpace==="local")Oe.position.set(Jn,-Ui),Oe.rotation=-Un*Math.PI/180,Oe.scale.set(Vi,Zn),Oe.setSimulationTransform(Jn,Ui,Un,Vi,Zn);else{Oe.position.set(Te.centerX,-Te.centerY),Oe.rotation=-Te.rootRotation*Math.PI/180,Oe.scale.set(Vi,Zn),Oe.setSimulationTransform(Te.centerX,Te.centerY,Te.rootRotation,Vi,Zn);const as=ku(Te,Jn,Ui,Vi,Zn),ho=-(Un-Te.rootRotation);Oe.setEmitterFollowSpawn(as.x,as.y,ho)}}else if(Bn){const xt=Bn.angle+(Te.emitterFollowDirection==="reverse"?180:0),vi=Te.emitterAngleMode==="direction"?xt:Te.rootRotation;if(fe={x:Bn.x,y:Bn.y,rotation:vi},Te.emitterFollowSpace==="local")Oe.position.set(Bn.x,-Bn.y),Oe.rotation=-vi*Math.PI/180,Oe.setSimulationTransform(Bn.x,Bn.y,vi);else{Oe.position.set(Te.centerX,-Te.centerY),Oe.rotation=-Te.rootRotation*Math.PI/180,Oe.setSimulationTransform(Te.centerX,Te.centerY,Te.rootRotation);const Jn=ku(Te,Bn.x,Bn.y),Ui=Te.emitterAngleMode==="direction"?-(xt-Te.rootRotation):0;Oe.setEmitterFollowSpawn(Jn.x,Jn.y,Ui)}}else Oe.position.set(Te.centerX,-Te.centerY),Oe.rotation=-Te.rootRotation*Math.PI/180,Oe.setSimulationTransform(Te.centerX,Te.centerY,Te.rootRotation);const Pn=Te.shape==="path"&&Te.spawnPathId>0&&e.paths.find(xt=>xt.id===Te.spawnPathId&&xt.enabled&&xt.points.length>0)||null;Oe.setSpawnPathSampler(Pn?xt=>yV(Te,Pn,xt):null,(Pn==null?void 0:Pn.closed)===!0),R.set(ft.id,fe)}let be=0;const ye=[],he=e.settings.showBones&&e.activeObjectType==="particle"?e.activeObjectId:0,Be=(ft,Oe,ot)=>{!ft||ft.id!==he||ft.visible===!1||R3(ye,ot,Oe.position.x,Oe.position.y)},Ae=e.timeline,de=e.playbackRange,ge=Ae.fps,Ve=1/Math.max(1,ge);let qe=P,bt=0;if(Ae.playing?(k+=ie,bt=Math.floor(k/Ve),bt>0&&(k-=bt*Ve)):(k=0,Ee(ge)),Ae.playing&&bt>0)for(let ft=0;ft<bt;ft++)if(qe=Ae.frame,ye.length=0,be=0,Ae.recorded){for(const fe of e.systems){const nt=B.emitters.get(fe.id),mt=(G=fe.frames)==null?void 0:G[Ae.frame];if(nt&&mt){nt.apply(mt);for(const lt of mt)lt.active&&(Be(fe,nt,lt),be++)}}Ae.frame++;const Oe=e.systems.find(fe=>fe.id===e.activeId),ot=(Oe==null?void 0:Oe.config.mode)==="stream"&&Oe.config.streamBehavior==="loop"?tC(Oe.config,ge):null,ue=Ae.loop&&Ae.abLoop&&(ot==null?void 0:ot.start)===de.start&&ot.end===de.end?de.end-1:de.end;if(Ae.frame>ue)if(Ae.loop)Ae.frame=de.start;else{Ae.frame=de.end,Ae.playing=!1;break}}else{B.suspendEvents(!0);try{const Oe=ja(e.systems);for(const ot of e.systems){const Te=B.emitters.get(ot.id);if(!Te)continue;!Oe.has(ot.id)&&ot.config.mode==="stream"&&ot.config.streamBehavior==="loop"?(se=ot.frames)!=null&&se.length||rx(ot,Te,ge,Ae.totalFrames):Ae.frame===0&&Te.reset()}}finally{B.suspendEvents(!1)}for(const[Oe,ot]of B.emitters){const Te=e.systems.find(lt=>lt.id===Oe),ue=(Te==null?void 0:Te.config.mode)==="stream"&&Te.config.streamBehavior==="loop",fe=ue?(H=Te.frames)==null?void 0:H[Ae.frame]:void 0,nt=Ae.frame===0&&!ue,mt=nt?[]:fe||ot.update(Ve);if(nt?ot.apply([]):fe&&ot.apply(fe),(Te==null?void 0:Te.visible)!==!1)for(const lt of mt)lt.active&&Be(Te,ot,lt);be+=mt.length}for(const Oe of e.systems){if(!Oe.config.texture)continue;Oe.frames=Oe.frames||[];const ot=B.emitters.get(Oe.id);ot&&!(Oe.config.mode==="stream"&&Oe.config.streamBehavior==="loop")&&(Oe.frames[Ae.frame]=ot.capture())}Ae.frame++,Ae.frame>=Ae.totalFrames&&(Ae.frame=de.start,Ae.recorded=!0)}else{Ae.playing||(qe=Ae.frame);for(const ft of e.systems){const Oe=B.emitters.get(ft.id),ot=Ae.playing?P:Ae.frame,Te=(N=ft.frames)==null?void 0:N[ot],ue=ft.config.mode==="stream"&&ft.config.streamBehavior==="loop"&&!!Te;if((Ae.recorded||ue)&&Oe&&Te){Oe.apply(Te);for(const fe of Te)fe.active&&(Be(ft,Oe,fe),be++)}else if(Oe){const fe=Ae.frame===0?[]:Oe.update(0);if(Ae.frame===0&&Oe.apply([]),ft.visible!==!1)for(const nt of fe)nt.active&&Be(ft,Oe,nt);be+=Oe.activeCount}}}P=qe,S==null||S.sync(e.spines,qe,ge);for(const[,ft]of B.emitters)ft.drawTrailMeshDebug(e.settings.showSkinMesh);k3(e,L,y),I3(e,U.selectedNodes,b),_3(e,S,h),w3(e,R,u),S3(e,R,p),C3(e,m),A3(e,g),T3(e,v),M3(o,O.selectedTransformTarget.bind(O),x),F3(ye,e,f),n.value&&(n.value.systems=e.systems.length,n.value.particles=be)}}return Ti(async()=>{const J=t.value;c=new ES({width:J.clientWidth||800,height:J.clientHeight||600,backgroundAlpha:0,antialias:!0}),J.appendChild(c.view),l=new ResizeObserver(()=>{if(!c)return;const se=c.screen.height,H=Math.max(1,J.clientHeight);Math.abs(H-se)>.5&&(e.editor.viewY-=(H-se)/2),c.renderer.resize(Math.max(1,J.clientWidth),H)}),l.observe(J),X(),Vt(()=>e.settings.backgroundImageData,se=>j.syncTexture(se),{immediate:!0});const ie=await SV();D=ie.dotTex,$=ie.trailTex,CV(e,D,$),n.value={systems:e.systems.length,particles:0},e.timeline.recorded=!1,e.timeline.frame=0,k=0,P=0,e.timeline.playing=!0,e.timeline.loop=!0;for(const se of e.systems)se.frames=[];e.recalcTotalFrames(),M=performance.now()/1e3,q(),Vt(()=>e.systems.map(se=>JSON.stringify(se.config,(H,G)=>H==="texture"||H==="trailTexture"||H==="previewUrl"?void 0:G)).join("|")+`|colliders:${JSON.stringify(e.colliders)}|paths:${JSON.stringify(e.paths)}`,()=>{e.recalcTotalFrames(),e.timeline.recorded=!1,e.timeline.frame=0;for(const se of e.systems)se.frames=[];e.timeline.playing=!0,e.timeline.loop=!0}),TU(e),window.addEventListener("beforeunload",Z)}),nl(()=>{window.removeEventListener("beforeunload",Z),cancelAnimationFrame(I),l==null||l.disconnect(),l=null,S==null||S.destroy(),S=null,j.destroy(),d&&c&&B.destroy(d),c&&(c.destroy(!0,{children:!0}),c=null)}),Vt(()=>[e.activeObjectType,e.activeObjectId],()=>U.resetSelection()),(J,ie)=>(Q(),te("div",AV,[w("div",{ref_key:"holder",ref:t,class:Me(["stage-holder",{grid:_(e).settings.showGrid}]),tabindex:"0",onWheel:We(ae,["prevent"]),onPointerdown:z,onDblclick:We(K,["prevent"])},null,34),w("img",{class:Me(["stage-watermark",{"watermark-left-panel":!_(e).settings.parameterPanelOnRight}]),src:b3,alt:"","aria-hidden":"true"},null,2),Ce(D8,{ctx:Y,"active-tool":o.value,hud:n.value,"show-settings":s.value,"show-help":r.value,"onUpdate:activeTool":ie[0]||(ie[0]=se=>o.value=se),"onUpdate:showSettings":ie[1]||(ie[1]=se=>s.value=se),"onUpdate:showHelp":ie[2]||(ie[2]=se=>r.value=se),onClearBackground:ce,onBackgroundFile:ve},null,8,["active-tool","hud","show-settings","show-help"]),Ce(mV,{show:s.value,onClose:ie[3]||(ie[3]=se=>s.value=!1)},null,8,["show"]),Ce(H5,{show:r.value,onClose:ie[4]||(ie[4]=se=>r.value=!1)},null,8,["show"])]))}}),EV=dn(TV,[["__scopeId","data-v-2d5af569"]]),_V=[{x:0,y:0},{x:1,y:1}],Hm=[{x:0,y:1},{x:1,y:1}],MV=[{x:0,y:0},{x:.2,y:1},{x:.8,y:1},{x:1,y:0}],Gm=[{x:0,y:0},{x:.1,y:1},{x:.9,y:1},{x:1,y:0}],Wm=[{x:0,y:1},{x:1,y:1}],qm=[{x:0,y:1},{x:1,y:1}],hn=qo({visible:!1,title:"",detail:"",progress:0,indeterminate:!1,failed:!1});let xd=0;function PV(i){return new Promise(e=>window.setTimeout(e,i))}function sT(i,e){const t=++xd,n=performance.now();Object.assign(hn,{visible:!0,title:i,detail:e,progress:0,indeterminate:!1,failed:!1});const s=(o,a)=>{t===xd&&(hn.indeterminate=o==null,o!=null&&(hn.progress=Math.min(100,Math.max(0,o))),a&&(hn.detail=a))},r=async(o,a)=>{if(t!==xd)return;hn.failed=o,hn.indeterminate=!1,hn.progress=o?hn.progress:100,hn.detail=a,await PV(Math.max(180,(o?850:450)-(performance.now()-n))),t===xd&&(hn.visible=!1)};return{update:s,paint:()=>new Promise(o=>requestAnimationFrame(()=>o())),finish:(o=ke("transfer.completed"))=>r(!1,o),fail:(o=ke("transfer.failed"))=>r(!0,o)}}async function kV(i,e){if(!i.body)return e(null),i.text();const t=Number(i.headers.get("content-length")),n=Number.isFinite(t)&&t>0,s=i.body.getReader(),r=new TextDecoder;let o=0,a="";for(e(n?0:null);;){const{done:c,value:l}=await s.read();if(c)break;o+=l.byteLength,a+=r.decode(l,{stream:!0}),e(n?Math.min(1,o/t):null)}return a+=r.decode(),n&&e(1),a}const IV="3.8";function Li(i,e,t){i[e]==null&&i[t]!=null&&(i[e]=i[t]),delete i[t]}function Km(i){if(!i||typeof i!="object")return;if(Array.isArray(i)){for(const t of i)Km(t);return}const e=i;Array.isArray(e.curve)&&delete e.curve;for(const t of Object.values(e))Km(t)}function RV(i){for(const e of i.bones)Li(e,"transform","inherit");for(const e of i.transform||[])Li(e,"rotateMix","mixRotate"),e.translateMix==null&&(e.translateMix=e.mixX??e.mixY),e.scaleMix==null&&(e.scaleMix=e.mixScaleX??e.mixScaleY),Li(e,"shearMix","mixShearY"),delete e.mixX,delete e.mixY,delete e.mixScaleX,delete e.mixScaleY;for(const e of i.path||[])Li(e,"rotateMix","mixRotate"),e.translateMix==null&&(e.translateMix=e.mixX??e.mixY),delete e.mixX,delete e.mixY;for(const e of i.skins)for(const t of Object.values(e.attachments||{}))for(const n of Object.values(t||{}))n.parent!=null&&Li(n,"deform","timelines")}function FV(i){for(const e of Object.values(i.slots||{}))Li(e,"color","rgba"),Li(e,"twoColor","rgba2")}function LV(i){for(const e of Object.values(i.bones||{}))for(const t of e.rotate||[])Li(t,"angle","value")}function DV(i){for(const e of Object.values(i.transform||{}))for(const t of e)Li(t,"rotateMix","mixRotate"),t.translateMix==null&&(t.translateMix=t.mixX??t.mixY),t.scaleMix==null&&(t.scaleMix=t.mixScaleX??t.mixScaleY),Li(t,"shearMix","mixShearY"),delete t.mixX,delete t.mixY,delete t.mixScaleX,delete t.mixScaleY}function OV(i){for(const e of Object.values(i.path||{})){for(const t of["position","spacing"])for(const n of e[t]||[])Li(n,t,"value");for(const t of e.mix||[])Li(t,"rotateMix","mixRotate"),t.translateMix==null&&(t.translateMix=t.mixX??t.mixY),delete t.mixX,delete t.mixY}}function NV(i){if(!i.attachments)return;const e=i.deform||(i.deform={});for(const[t,n]of Object.entries(i.attachments)){const s=e[t]||(e[t]={});for(const[r,o]of Object.entries(n)){const a=s[r]||(s[r]={});for(const[c,l]of Object.entries(o))l.deform&&(a[c]=l.deform)}}delete i.attachments}function $V(i){i.skeleton.spine=IV,RV(i);for(const e of Object.values(i.animations))FV(e),LV(e),DV(e),OV(e),NV(e);return Km(i.animations),i}function BV(i,e,t,n,s=!1){if(s){let c=0;for(let l=0;l<i.values.length;l++)c=Math.max(c,Math.abs(i.values[l]-e.values[l])/Math.max(1e-9,n[l]??n[0]??.001));return c}const r=t.frame-e.frame,o=r<=0?0:(i.frame-e.frame)/r;let a=0;for(let c=0;c<i.values.length;c++){const l=e.values[c]+(t.values[c]-e.values[c])*o;a=Math.max(a,Math.abs(i.values[c]-l)/Math.max(1e-9,n[c]??n[0]??.001))}return a}function rT(i,e,t=new Set,n=new Set){if(i.length<=2)return i.slice();const s=new Set([0,i.length-1]);for(let a=1;a<i.length-1;a++)t.has(i[a].frame)&&s.add(a);for(let a=0;a<i.length;a++)n.has(i[a].frame)&&s.add(a);const r=()=>[...s].sort((a,c)=>a-c);let o=!0;for(;o;){o=!1;const a=r();for(let c=0;c<a.length-1;c++){const l=a[c],d=a[c+1],u=n.has(i[l].frame);let h=-1,f=1;for(let p=l+1;p<d;p++){const m=BV(i[p],i[l],i[d],e,u);m>f&&(f=m,h=p)}h>=0&&(s.add(h),o=!0)}}return r().map(a=>i[a])}function Sx(i,e,t,n,s){const r=t-e+1;if(r<2)return 0;const o=s?e:t,a=s?e+1:t-1,c=s?e+2:t-2,l=Math.abs(i[a].frame-i[o].frame);if(r>=3&&l>0&&Math.abs(Math.abs(i[c].frame-i[a].frame)-l)<1e-6){const u=i[o].values[n],h=i[a].values[n],f=i[c].values[n];return s?(-3*u+4*h-f)/(2*l):(3*u-4*h+f)/(2*l)}const d=i[a].frame-i[o].frame;return d?(i[a].values[n]-i[o].values[n])/d:0}function Cx(i,e,t){const n=i[t].frame-i[e].frame,s=[];for(let r=0;r<i[e].values.length;r++){const o=i[e].values[r],a=i[t].values[r],c=Math.min(...i.slice(e,t+1).map(h=>h.values[r])),l=Math.max(...i.slice(e,t+1).map(h=>h.values[r])),d=o+Sx(i,e,t,r,!0)*n/3,u=a-Sx(i,e,t,r,!1)*n/3;s.push([Math.max(c,Math.min(l,d)),Math.max(c,Math.min(l,u))])}return{values:s}}function UV(i,e,t,n,s){const r=1-s;return r*r*r*i+3*r*r*s*e+3*r*s*s*t+s*s*s*n}function VV(i,e,t,n,s,r=!1){if(r){let l=0;for(let d=0;d<i.values.length;d++)l=Math.max(l,Math.abs(i.values[d]-e.values[d])/Math.max(1e-9,s[d]??s[0]??.001));return l}const o=t.frame-e.frame,a=o<=0?0:(i.frame-e.frame)/o;let c=0;for(let l=0;l<i.values.length;l++){const d=n.values[l],u=UV(e.values[l],d[0],d[1],t.values[l],a);c=Math.max(c,Math.abs(i.values[l]-u)/Math.max(1e-9,s[l]??s[0]??.001))}return c}function oT(i,e,t=new Set,n=new Set){if(i.length<=1)return{samples:i.slice(),controls:[]};const s=new Set([0,i.length-1]);for(let c=1;c<i.length-1;c++)t.has(i[c].frame)&&s.add(c);for(let c=0;c<i.length;c++)n.has(i[c].frame)&&s.add(c);const r=()=>[...s].sort((c,l)=>c-l);let o=!0;for(;o;){o=!1;const c=r();for(let l=0;l<c.length-1;l++){const d=c[l],u=c[l+1];if(u-d<=1)continue;const h=n.has(i[d].frame),f=Cx(i,d,u);let p=-1,m=1;for(let g=d+1;g<u;g++){const v=VV(i[g],i[d],i[u],f,e,h);v>m&&(m=v,p=g)}p>=0&&(s.add(p),o=!0)}}const a=r();return{samples:a.map(c=>i[c]),controls:a.slice(0,-1).map((c,l)=>Cx(i,c,a[l+1]))}}function XV(i){if(!i.length)return[];const e=[i[0]];for(let t=1;t<i.length;t++){let n=i[t];for(;n-e[t-1]>180;)n-=360;for(;n-e[t-1]<-180;)n+=360;e.push(n)}return e}function gn(i){if(!Number.isFinite(i))return 0;const e=Math.round(i*1e5)/1e5;return Object.is(e,-0)?0:e}function YV(i,e,t,n){const s=Math.max(2,Math.min(16,Math.round(Number(i.trailGridRows)||2))),r=Math.max(2,Math.min(32,Math.round(Number(i.trailGridCols)||2))),o=Math.max(2,t.length),a=e.lengthMode==="random"?Math.max(1,Number(e.lengthMin)||0,Number(e.lengthMax)||0):Math.max(.001,Number(e.length)||100),c=e.widthSizeMode==="random"?Math.max(1,Number(e.widthMin)||0,Number(e.widthMax)||0):Math.max(.001,Number(e.width)||100),l=(Number(e.rotation)||0)*Math.PI/180,d=Math.cos(l),u=Math.sin(l),h=[],f=[],p=[],m=[],g=[];for(let b=0;b<r;b++)g.push({col:b,row:0});for(let b=1;b<s;b++)g.push({col:r-1,row:b});for(let b=r-2;b>=0;b--)g.push({col:b,row:s-1});for(let b=s-2;b>=1;b--)g.push({col:0,row:b});const v=g.length;for(let b=1;b<r-1;b++)for(let x=1;x<s-1;x++)g.push({col:b,row:x});const y=new Map;for(let b=0;b<g.length;b++){const{col:x,row:T}=g[b];y.set(`${x}:${T}`,b);const E=x/(r-1),S=E*(o-1),C=Math.min(o-1,Math.floor(S)),M=Math.min(o-1,C+1),k=S-C,P=T/(s-1),I=.5+d*(E-.5)-u*(P-.5),D=.5+u*(E-.5)+d*(P-.5);h.push(gn(I),gn(D));const $=(.5-P)*c;C===M||k<1e-6?p.push(1,t[C],0,gn($),1):p.push(2,t[C],0,gn($),gn(1-k),t[M],0,gn($),gn(k))}for(let b=0;b<r-1;b++)for(let x=0;x<s-1;x++){const T=y.get(`${b}:${x}`),E=y.get(`${b+1}:${x}`),S=y.get(`${b}:${x+1}`),C=y.get(`${b+1}:${x+1}`);f.push(T,E,S,E,C,S)}for(let b=0;b<v;b++)m.push(b*2,(b+1)%v*2);return{type:"mesh",path:n,uvs:h,triangles:f,vertices:p,hull:v,edges:m,width:a,height:c}}const Ax={normal:"normal",add:"additive",multiply:"multiply",screen:"screen"},Tx=.1,Ex=.1,_x=.01,wd=.01;function zV(i,e){return String(i||"").trim().replace(/[\\/:*?"<>|\s]+/g,"_").replace(/^_+|_+$/g,"")||e}function aT(i,e){let t=i,n=2;for(;e.has(t);)t=`${i}_${n++}`;return e.add(t),t}function jV(i){return i.replace(/\.[^./\\]+$/,"")}function lT(i,e){return jV([i,e].filter(Boolean).join("/").replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/^\.\//,""))}function HV(i){var n,s;const e=Number(((n=i==null?void 0:i.orig)==null?void 0:n.width)??(i==null?void 0:i.width))||0,t=Number(((s=i==null?void 0:i.orig)==null?void 0:s.height)??(i==null?void 0:i.height))||0;return{width:e,height:t}}function Sd(i){return Math.round(Math.max(0,Math.min(1,i))*255).toString(16).padStart(2,"0")}function Mx(i,e){return[(i>>16&255)/255,(i>>8&255)/255,(i&255)/255,Math.max(0,Math.min(1,e))]}function Xl(i,e){return gn(i/e)}function GV(i,e){const t=i.config,n=t.lifeMode==="fixed"?Math.max(0,Number(t.lifeMin)||0):Math.max(0,Number(t.lifeMin)||0,Number(t.lifeMax)||0),s=Math.max(0,Number(t.delay)||0);let r;return t.mode!=="stream"?r=s+n:t.streamBehavior!=="loop"?r=s+Math.max(1/e,Number(t.duration)||0)+n:r=s+Ji(t,e).total/e,Math.max(1,Math.ceil(r*e)+1)}function WV(i,e,t){const n=i.config;if(n.mode!=="stream"||n.streamBehavior!=="loop")return new Set;const s=tC(n,e),r=Math.max(1,t)/Math.max(1,e);return new Set([Math.round(s.start*r),Math.round(s.end*r)])}function Iu(i,e){return e?i.boneName:`${i.spawnId??"legacy"}_${i.boneName}`}function qV(i,e,t,n){const s=new Set;for(const r of i)for(const o of r)s.add(Iu(o,e));return[...s].sort().map((r,o)=>({key:r,name:aT(`${n}_${o}`,t),states:i.map(a=>a.find(c=>Iu(c,e)===r)||null)}))}function Px(i,e){const t=new Set(e.states.map(n=>n==null?void 0:n.resourceId).filter(n=>typeof n=="number"));return i.config.imageResources.filter(n=>t.has(n.id))}function KV(i,e,t,n){const s=e*t/n,r=Math.min(i.states.length-1,Math.max(0,Math.floor(s))),o=Math.min(i.states.length-1,r+1),a=i.states[r],c=i.states[o];if(!a||!c||Iu(a,!0)!==Iu(c,!0)||a.spawnId!==c.spawnId)return a;const l=s-r;if(l<=1e-6)return a;const d=(h,f)=>(h??0)+((f??h??0)-(h??0))*l,u=a.trailState&&c.trailState&&a.trailState.resourceId===c.trailState.resourceId?{...a.trailState,width:d(a.trailState.width,c.trailState.width),alpha:d(a.trailState.alpha,c.trailState.alpha),bones:a.trailState.bones.map((h,f)=>{const p=c.trailState.bones[f]||h;return{...h,worldX:d(h.worldX??h.x,p.worldX??p.x),worldY:d(h.worldY??h.y,p.worldY??p.y),worldRotation:d(h.worldRotation??-h.rotation,p.worldRotation??-p.rotation)}})}:a.trailState;return{...a,worldX:d(a.worldX,c.worldX),worldY:d(a.worldY,c.worldY),worldRotation:d(a.worldRotation,c.worldRotation),worldScaleX:d(a.worldScaleX,c.worldScaleX),worldScaleY:d(a.worldScaleY,c.worldScaleY),alpha:d(a.alpha,c.alpha),trailState:u}}function kx(i,e){return!i||i==="跟随导出"?e.keyframeCurve:i==="贝塞尔"?"bezier":"linear"}function ha(i,e,t,n,s,r=new Set,o=new Set,a=s.keyframeCurve){if(!i.length)return[];const c=new Set(r);for(const u of o)c.add(u);const l=a==="bezier"&&s.spineVersion!=="3.8"?oT(i,n,c,o):{samples:rT(i,n,c,o),controls:[]},d=l.samples.map(u=>{const h={time:Xl(u.frame,e)};return t.forEach((f,p)=>{h[f]=gn(u.values[p])}),o.has(u.frame)&&(h.curve="stepped"),h});for(let u=0;u<l.controls.length;u++){if(d[u].curve==="stepped")continue;const h=Number(d[u].time)||0,f=Number(d[u+1].time)||0,p=[];for(let m=0;m<t.length;m++){const g=l.controls[u].values[m];p.push(gn(h+(f-h)/3),gn(g[0]),gn(h+(f-h)*2/3),gn(g[1]))}d[u].curve=p}return d}function JV(i){const e=new Set;for(let t=0;t<i.length;t++){const n=i[t],s=t?i[t-1]:null,r=!!n&&!!s&&n.spawnId!==s.spawnId;(!!n!=!!s||r)&&(t>0&&s&&e.add(t-1),n&&e.add(t))}return e}function ZV(i){const e=new Set;for(let t=0;t<i.length;t++){const n=i[t];if(!(n!=null&&n.active))continue;const s=i[t+1];(!(s!=null&&s.active)||s.spawnId!==n.spawnId)&&e.add(t)}return e}function QV(i){const e=new Set;for(let t=0;t<i.length;t++)i[t]&&(i[t+1]||e.add(t));return e}function eX(i){const e=new Set;for(let t=0;t<i.length;t++){const n=i[t],s=t?i[t-1]:void 0;!!n!=!!s&&(t>0&&s&&e.add(t-1),n&&e.add(t))}return e}function tX(i,e){var n;if(!i.shapeEnabled||!((n=i.shapeCurve)!=null&&n.length))return 1;const t=[...i.shapeCurve].sort((s,r)=>s.x-r.x);if(e<=t[0].x)return Math.max(0,t[0].y);for(let s=1;s<t.length;s++){const r=t[s-1],o=t[s];if(e<=o.x){const a=(e-r.x)/Math.max(1e-6,o.x-r.x);return Math.max(0,r.y+(o.y-r.y)*a)}}return Math.max(0,t[t.length-1].y)}function nX(i,e,t,n=new Set){const s=[];let r=Symbol();return i.forEach((o,a)=>{(o!==r||n.has(a))&&(s.push(t(o,a)),r=o)}),s}function iX(i,e,t){const n=i.imageMode==="sequence"?i.sequenceFrames[e]:void 0,s=(n==null?void 0:n.name)||i.textureName||`image_${i.id}`,r=(n==null?void 0:n.texture)||i.texture,o=HV(r);(!o.width||!o.height)&&t.push({code:"missing-image",message:ke("errors.missingImageWarning",{file:s})});const a=o.width||1,c=o.height||1;return{path:lT(i.textureFolder,s),x:gn((.5-i.anchorX)*a),y:gn((i.anchorY-.5)*c),width:gn(a),height:gn(c)}}function Ix(i,e){const t=[];for(const s of e){const r=s.imageMode==="sequence"?Math.max(1,s.sequenceFrames.length):1;for(let o=0;o<r;o++)t.push(`${s.id}_${o}`)}const n=t.length>1;return new Map(t.map((s,r)=>[s,n?`${i}_${r}`:i]))}function sX(i,e,t,n,s=n.keyframeCurve,r=new Set,o=new Set){if(!i.length)return[];const a=new Set;for(let h=1;h<e.length;h++){const f=e[h],p=e[h-1],m=(f==null?void 0:f.replace(/_\d+$/,""))??null,g=(p==null?void 0:p.replace(/_\d+$/,""))??null;m!==g&&(a.add(h),a.add(h-1))}for(const h of r)a.add(h);for(const h of o)a.add(h);const c=i.map((h,f)=>({frame:f,values:h})),l=1/255,d=s==="bezier"&&n.spineVersion!=="3.8"?oT(c,[l,l,l,.01],a,r):{samples:rT(c,[l,l,l,.01],a,r),controls:[]},u=d.samples.map(h=>{const f={time:Xl(h.frame,t),color:`${Sd(h.values[0])}${Sd(h.values[1])}${Sd(h.values[2])}${Sd(h.values[3])}`};return r.has(h.frame)&&(f.curve="stepped"),f});if(d.controls.length)for(let h=0;h<d.controls.length;h++){if(u[h].curve==="stepped")continue;const f=Xl(d.samples[h].frame,t),p=Xl(d.samples[h+1].frame,t),m=[];for(let g=0;g<4;g++){const v=d.controls[h].values[g];m.push(gn(f+(p-f)/3),gn(v[0]),gn(f+(p-f)*2/3),gn(v[1]))}u[h].curve=m}return u}function Rx(i,e,t,n,s,r,o=r.keyframeCurve,a=new Set,c=new Set){var h;const l=(h=i.slots)[e]||(h[e]={}),d=nX(t,s,(f,p)=>({time:Xl(p,s),name:f??null}),c);d.length&&(l.attachment=d);const u=sX(n,t,s,r,o,a,c);u.length&&(l.rgba=u)}function Fx(i){var m;const e=i.settings,t=Math.max(1,Number(i.timeline.fps)||30),n=Math.max(1,Math.round(e.fps||30)),s=e.integerFrameAlignment?n:t,r=[],o=i.systems.filter(g=>g.visible!==!1),a=ja(i.systems),c={skeleton:{hash:"",spine:e.spineVersion,x:0,y:0,width:0,height:0,images:e.imagesPath||"./images/"},bones:[{name:"root"}],slots:[],skins:[{name:"default",attachments:{}}],animations:{}};e.omitFps||(c.skeleton.fps=n);const l=c.skins[0].attachments,d=new Set(["root"]),u=[...new Set([...i.timeline.animations.length?i.timeline.animations:["animation"],...o.map(g=>g.animation||"animation")])],h=new Map;for(const g of o){const v=((m=g.frames)==null?void 0:m.length)||0,y=a.has(g.id)?v:Math.min(v,GV(g,t)),b=(g.frames||[]).slice(0,y);b.length||r.push({code:"empty-cache",message:ke("errors.emptyCacheWarning",{name:g.config.name})});const x=aT(zV(g.config.name,`system_${g.id}`),d);c.bones.push({name:x,parent:"root"});const T=qV(b,e.bonePool,d,x),E=Math.max(0,(y-1)/t),S=Math.max(1,Math.ceil(E*s)+1),C=WV(g,t,s),M=h.get(g.animation)||[];M.push({system:g,tracks:T,targetFrames:S,boundaryFrames:C,attachmentPrefix:x}),h.set(g.animation,M);for(const k of T){c.bones.push({name:k.name,parent:x});const P=Px(g,k),I=new Set(P.map(Y=>Y.blend)),D=[],$=[];for(const Y of I){const U=`${k.name}_${Y}`;D.push(U),c.slots.push({name:U,bone:k.name,color:"ffffff00",blend:Ax[Y]});const O=l[U]||(l[U]={}),L=P.filter(X=>X.blend===Y),R=Ix(x,L);for(const X of L){const z=X.imageMode==="sequence"?Math.max(1,X.sequenceFrames.length):1;for(let K=0;K<z;K++){const Z=R.get(`${X.id}_${K}`);Z&&(O[Z]=iX(X,K,r))}}}if(g.config.trail)for(const Y of g.config.trailResources){if(!k.states.some(z=>{var K;return((K=z==null?void 0:z.trailState)==null?void 0:K.resourceId)===Y.id}))continue;const U=Math.max(2,Math.min(16,Math.round(Y.boneCount||3))),O=[];for(let z=0;z<U;z++){const K=`${k.name}_trail_${Y.id}_${z}`;O.push(K),c.bones.push({name:K,parent:x})}const L=`${k.name}_trail_${Y.id}`;$.push(L),c.slots.push({name:L,bone:O[0],color:"ffffff00",blend:Ax[Y.blend]});const R=O.map(z=>c.bones.findIndex(K=>K.name===z)),X=lT("",Y.textureName||`trail_${Y.id}`);(l[L]||(l[L]={}))[`trail_${Y.id}`]=YV(g.config,Y,R,X),Y.texture||r.push({code:"missing-image",message:ke("errors.missingTrailImageWarning",{file:Y.textureName||Y.id})})}const j=new Set([...D,...$]),B=c.slots.filter(Y=>j.has(String(Y.name)));B.length&&(c.slots=c.slots.filter(Y=>!B.includes(Y)),c.slots.push(...B.filter(Y=>$.includes(String(Y.name))),...B.filter(Y=>D.includes(String(Y.name)))))}}for(const g of u){const v=h.get(g)||[],y={bones:{},slots:{}};let b=!1;for(const{system:x,tracks:T,targetFrames:E,boundaryFrames:S,attachmentPrefix:C}of v)for(const M of T){const k=Array.from({length:E},(Z,ae)=>KV(M,ae,t,s)),P=k.map(Z=>!!(Z!=null&&Z.active)),I=[],D=[],$=[];k.forEach((Z,ae)=>{Z!=null&&Z.active&&(I.push({frame:ae,values:[Z.worldX??Z.x,Z.worldY??Z.y]}),D.push(Z.worldRotation??Z.rotation),$.push({frame:ae,values:[Z.worldScaleX??Z.scaleX,Z.worldScaleY??Z.scaleY]}))});const j=XV(D),B=I.map((Z,ae)=>({frame:Z.frame,values:[j[ae]??0]})),Y=JV(k);for(const Z of S)Y.add(Z);const U=ZV(k),O={},L=ha(I,s,["x","y"],[Tx,Tx],e,Y,U),R=ha(B,s,["value"],[_x],e,Y,U),X=ha($,s,["x","y"],[wd,wd],e,Y,U);L.length&&(O.translate=L),R.length&&(O.rotate=R),X.length&&(O.scale=X),Object.keys(O).length&&(y.bones[M.name]=O,b=!0);const z=Px(x,M),K=new Set(z.map(Z=>Z.blend));for(const Z of K){const ae=z.filter(J=>J.blend===Z),ce=Ix(C,ae),ve=[],we=[];let re=16777215;for(let J=0;J<E;J++){const ie=k[J],se=ie?x.config.imageResources.find(N=>N.id===ie.resourceId):void 0,H=!!ie&&P[J]&&ie.imageVisible!==!1&&(se==null?void 0:se.blend)===Z;ie&&(se==null?void 0:se.blend)===Z&&(re=ie.colorHex);const G=H?ce.get(`${se.id}_${ie.imageFrameIndex??0}`):void 0;ve.push(G??null),we.push(Mx(re,H?ie.alpha:0))}const Ee=ae.filter(J=>J.independentAlpha==="curve").map(J=>kx(J.alphaCurveMode,e)),q=Ee.length?Ee.includes("bezier")?"bezier":"linear":kx(x.config.alphaMode==="curve"?x.config.curveMode:void 0,e);Rx(y,`${M.name}_${Z}`,ve,we,s,e,q,U,S),ve.some(Boolean)&&(b=!0)}if(x.config.trail)for(const Z of x.config.trailResources){const ae=Math.max(2,Math.min(16,Math.round(Z.boneCount||3))),ce=k.map(G=>{var N;return((N=G==null?void 0:G.trailState)==null?void 0:N.resourceId)===Z.id?G.trailState:void 0}),ve=ce.find(G=>!!G);if(!ve)continue;const we=eX(ce),re=QV(ce),Ee=Z.widthSizeMode==="random"?Math.max(1,Number(Z.widthMin)||0,Number(Z.widthMax)||0):Math.max(.001,Number(Z.width)||100);let q=ve;const J=ce.map(G=>(G&&(q=G),q));for(let G=0;G<ae;G++){const N=[],V=[],W=[],ee=new Set(we);for(const ge of S)ee.add(ge);const be=tX(Z,G/Math.max(1,ae-1));J.forEach((ge,Ve)=>{const qe=ge==null?void 0:ge.bones[Math.min(ge.bones.length-1,G)];if(!qe)return;const bt={x:qe.worldX??qe.x,y:qe.worldY??qe.y,rotation:qe.worldRotation??-qe.rotation};N.push({frame:Ve,values:[bt.x,bt.y]}),V.push({frame:Ve,values:[bt.rotation]}),W.push({frame:Ve,values:[1,Math.max(0,ge.width/Ee)*be]})});const ye=`${M.name}_trail_${Z.id}_${G}`,he={},Be=ha(N,s,["x","y"],[Ex,Ex],e,ee,re),Ae=ha(V,s,["value"],[_x],e,ee,re),de=ha(W,s,["x","y"],[wd,wd],e,ee,re);Be.length&&(he.translate=Be),Ae.length&&(he.rotate=Ae),de.length&&(he.scale=de),Object.keys(he).length&&(y.bones[ye]=he)}const ie=ce.map(()=>`trail_${Z.id}`);let se=ve.colorHex;const H=ce.map(G=>(G&&(se=G.colorHex),Mx(se,G?G.alpha:0)));Rx(y,`${M.name}_trail_${Z.id}`,ie,H,s,e,e.keyframeCurve,re,S),b=!0}}(b||!e.excludeEmptyAnimations)&&(c.animations[g]=y)}!Object.keys(c.animations).length&&!e.excludeEmptyAnimations&&(c.animations.animation={bones:{},slots:{}});const f=e.spineVersion==="3.8"?$V(c):c,p=JSON.stringify(f,null,2);return{json:f,text:p,warnings:r,particleSystemCount:o.length,animationCount:Object.keys(f.animations).length,boneCount:f.bones.length}}function rX(i,e){const t=new Blob([i.text],{type:"application/json;charset=utf-8"}),n=URL.createObjectURL(t),s=document.createElement("a");s.href=n,s.download=/\.json$/i.test(e)?e:`${e||"SpineParticle"}.json`,s.style.display="none",document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}class ote{constructor(){A(this,"array",[])}add(e){const t=this.contains(e);return this.array[e|0]=e|0,!t}contains(e){return this.array[e|0]!==void 0}remove(e){this.array[e|0]=void 0}clear(){this.array.length=0}}class oX{constructor(){A(this,"entries",{});A(this,"size",0)}add(e){const t=this.entries[e];return this.entries[e]=!0,t?!1:(this.size++,!0)}addAll(e){const t=this.size;for(let n=0,s=e.length;n<s;n++)this.add(e[n]);return t!==this.size}contains(e){return this.entries[e]}clear(){this.entries={},this.size=0}}const wi=class wi{constructor(e=0,t=0,n=0,s=0){A(this,"r");A(this,"g");A(this,"b");A(this,"a");this.r=e,this.g=t,this.b=n,this.a=s}set(e,t,n,s){return this.r=e,this.g=t,this.b=n,this.a=s,this.clamp()}setFromColor(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this}setFromString(e){return e=e.charAt(0)==="#"?e.substr(1):e,this.r=parseInt(e.substr(0,2),16)/255,this.g=parseInt(e.substr(2,2),16)/255,this.b=parseInt(e.substr(4,2),16)/255,this.a=e.length!==8?1:parseInt(e.substr(6,2),16)/255,this}add(e,t,n,s){return this.r+=e,this.g+=t,this.b+=n,this.a+=s,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(e,t){e.r=((t&4278190080)>>>24)/255,e.g=((t&16711680)>>>16)/255,e.b=((t&65280)>>>8)/255,e.a=(t&255)/255}static rgb888ToColor(e,t){e.r=((t&16711680)>>>16)/255,e.g=((t&65280)>>>8)/255,e.b=(t&255)/255}toRgb888(){const e=t=>`0${(t*255).toString(16)}`.slice(-2);return+`0x${e(this.r)}${e(this.g)}${e(this.b)}`}static fromString(e,t=new wi){return t.setFromString(e)}};A(wi,"WHITE",new wi(1,1,1,1)),A(wi,"RED",new wi(1,0,0,1)),A(wi,"GREEN",new wi(0,1,0,1)),A(wi,"BLUE",new wi(0,0,1,1)),A(wi,"MAGENTA",new wi(1,0,1,1));let at=wi;const rn=class rn{static clamp(e,t,n){return e<t?t:e>n?n:e}static cosDeg(e){return Math.cos(e*rn.degRad)}static sinDeg(e){return Math.sin(e*rn.degRad)}static atan2Deg(e,t){return Math.atan2(e,t)*rn.radDeg}static signum(e){return e>0?1:e<0?-1:0}static toInt(e){return e>0?Math.floor(e):Math.ceil(e)}static cbrt(e){const t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t}static randomTriangular(e,t){return rn.randomTriangularWith(e,t,(e+t)*.5)}static randomTriangularWith(e,t,n){const s=Math.random(),r=t-e;return s<=(n-e)/r?e+Math.sqrt(s*r*(n-e)):t-Math.sqrt((1-s)*r*(t-n))}static isPowerOfTwo(e){return e&&(e&e-1)===0}};A(rn,"epsilon",1e-5),A(rn,"epsilon2",rn.epsilon*rn.epsilon),A(rn,"PI",3.1415927),A(rn,"PI2",rn.PI*2),A(rn,"invPI2",1/rn.PI2),A(rn,"radiansToDegrees",180/rn.PI),A(rn,"radDeg",rn.radiansToDegrees),A(rn,"degreesToRadians",rn.PI/180),A(rn,"degRad",rn.degreesToRadians);let Le=rn;const Pi=class Pi{apply(e,t,n){return t===void 0||n===void 0?this.applyInternal(e):e+(t-e)*this.applyInternal(n)}};A(Pi,"linear",new class extends Pi{applyInternal(e){return e}}),A(Pi,"smooth",new class extends Pi{applyInternal(e){return e*e*(3-2*e)}}),A(Pi,"slowFast",new class extends Pi{applyInternal(e){return e*e}}),A(Pi,"fastSlow",new class extends Pi{applyInternal(e){return(e-1)*(e-1)*-1+1}}),A(Pi,"circle",new class extends Pi{applyInternal(e){return e<=.5?(e*=2,(1-Math.sqrt(1-e*e))/2):(e--,e*=2,(Math.sqrt(1-e*e)+1)/2)}});let Va=Pi;class aX extends Va{constructor(t){super();A(this,"power",2);this.power=t}applyInternal(t){return t<=.5?Math.pow(t*2,this.power)/2:Math.pow((t-1)*2,this.power)/(this.power%2===0?-2:2)+1}}class ate extends aX{constructor(e){super(e)}applyInternal(e){return Math.pow(e-1,this.power)*(this.power%2===0?-1:1)+1}}const Vr=class Vr{static arrayCopy(e,t,n,s,r){for(let o=t,a=s;o<t+r;o++,a++)n[a]=e[o]}static arrayFill(e,t,n,s){for(let r=t;r<n;r++)e[r]=s}static setArraySize(e,t,n=0){const s=e.length;if(s===t)return e;if(e.length=t,s<t)for(let r=s;r<t;r++)e[r]=n;return e}static ensureArrayCapacity(e,t,n=0){return e.length>=t?e:Vr.setArraySize(e,t,n)}static newArray(e,t){const n=[];for(let s=0;s<e;s++)n[s]=t;return n}static newFloatArray(e){if(Vr.SUPPORTS_TYPED_ARRAYS)return new Float32Array(e);{const t=[];for(let n=0;n<t.length;n++)t[n]=0;return t}}static newShortArray(e){if(Vr.SUPPORTS_TYPED_ARRAYS)return new Int16Array(e);{const t=[];for(let n=0;n<t.length;n++)t[n]=0;return t}}static toFloatArray(e){return Vr.SUPPORTS_TYPED_ARRAYS?new Float32Array(e):e}static toSinglePrecision(e){return Vr.SUPPORTS_TYPED_ARRAYS?Math.fround(e):e}static webkit602BugfixHelper(e){}static contains(e,t,n=!0){for(let s=0;s<e.length;s++)if(e[s]===t)return!0;return!1}static enumValue(e,t){return e[t[0].toUpperCase()+t.slice(1)]}};A(Vr,"SUPPORTS_TYPED_ARRAYS",typeof Float32Array<"u");let Ze=Vr;class lte{static logBones(e){for(let t=0;t<e.bones.length;t++){const n=e.bones[t].appliedPose;console.log(`${n.bone.data.name}, ${n.a}, ${n.b}, ${n.c}, ${n.d}, ${n.worldX}, ${n.worldY}`)}}}class lX{constructor(e){A(this,"items",[]);A(this,"instantiator");this.instantiator=e}obtain(){return this.items.length>0?this.items.pop():this.instantiator()}free(e){var t;(t=e.reset)==null||t.call(e),this.items.push(e)}freeAll(e){for(let t=0;t<e.length;t++)this.free(e[t])}clear(){this.items.length=0}}class Lx{constructor(e=0,t=0){A(this,"x");A(this,"y");this.x=e,this.y=t}set(e,t){return this.x=e,this.y=t,this}length(){const e=this.x,t=this.y;return Math.sqrt(e*e+t*t)}normalize(){const e=this.length();return e!==0&&(this.x/=e,this.y/=e),this}}class cte{constructor(){A(this,"maxDelta",.064);A(this,"framesPerSecond",0);A(this,"delta",0);A(this,"totalTime",0);A(this,"lastTime",Date.now()/1e3);A(this,"frameCount",0);A(this,"frameTime",0)}update(){const e=Date.now()/1e3;this.delta=e-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=e,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}}class dte{constructor(e=32){A(this,"values");A(this,"addedValues",0);A(this,"lastValue",0);A(this,"mean",0);A(this,"dirty",!0);this.values=new Array(e)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(e){this.addedValues<this.values.length&&this.addedValues++,this.values[this.lastValue++]=e,this.lastValue>this.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let e=0;for(let t=0;t<this.values.length;t++)e+=this.values[t];this.mean=e/this.values.length,this.dirty=!1}return this.mean}return 0}}class cX{constructor(e){A(this,"_image");this._image=e}getImage(){return this._image}}var Wa;(function(i){i[i.Nearest=9728]="Nearest",i[i.Linear=9729]="Linear",i[i.MipMap=9987]="MipMap",i[i.MipMapNearestNearest=9984]="MipMapNearestNearest",i[i.MipMapLinearNearest=9985]="MipMapLinearNearest",i[i.MipMapNearestLinear=9986]="MipMapNearestLinear",i[i.MipMapLinearLinear=9987]="MipMapLinearLinear"})(Wa||(Wa={}));var qa;(function(i){i[i.MirroredRepeat=33648]="MirroredRepeat",i[i.ClampToEdge=33071]="ClampToEdge",i[i.Repeat=10497]="Repeat"})(qa||(qa={}));class cT{constructor(){A(this,"texture");A(this,"u",0);A(this,"v",0);A(this,"u2",0);A(this,"v2",0);A(this,"width",0);A(this,"height",0);A(this,"degrees",0);A(this,"offsetX",0);A(this,"offsetY",0);A(this,"originalWidth",0);A(this,"originalHeight",0)}}class ute extends cX{setFilters(e,t){}setWraps(e,t){}dispose(){}}class hte{constructor(e){A(this,"pages",[]);A(this,"regions",[]);const t=new dX(e),n=new Array(4),s={};s.size=d=>{d.width=parseInt(n[1]),d.height=parseInt(n[2])},s.format=()=>{},s.filter=d=>{d.minFilter=Ze.enumValue(Wa,n[1]),d.magFilter=Ze.enumValue(Wa,n[2])},s.repeat=d=>{n[1].indexOf("x")!==-1&&(d.uWrap=qa.Repeat),n[1].indexOf("y")!==-1&&(d.vWrap=qa.Repeat)},s.pma=d=>{d.pma=n[1]==="true"};var r={};r.xy=d=>{d.x=parseInt(n[1]),d.y=parseInt(n[2])},r.size=d=>{d.width=parseInt(n[1]),d.height=parseInt(n[2])},r.bounds=d=>{d.x=parseInt(n[1]),d.y=parseInt(n[2]),d.width=parseInt(n[3]),d.height=parseInt(n[4])},r.offset=d=>{d.offsetX=parseInt(n[1]),d.offsetY=parseInt(n[2])},r.orig=d=>{d.originalWidth=parseInt(n[1]),d.originalHeight=parseInt(n[2])},r.offsets=d=>{d.offsetX=parseInt(n[1]),d.offsetY=parseInt(n[2]),d.originalWidth=parseInt(n[3]),d.originalHeight=parseInt(n[4])},r.rotate=d=>{const u=n[1];u==="true"?d.degrees=90:u!=="false"&&(d.degrees=parseInt(u))},r.index=d=>{d.index=parseInt(n[1])};let o=t.readLine();for(;o&&o.trim().length===0;)o=t.readLine();for(;!(!o||o.trim().length===0||t.readEntry(n,o)===0);)o=t.readLine();let a=null,c=null,l=null;for(;o!==null;)if(o.trim().length===0)a=null,o=t.readLine();else if(a){const d=new dT(a,o);for(;;){const u=t.readEntry(n,o=t.readLine());if(u===0)break;const h=r[n[0]];if(h)h(d);else{c||(c=[]),l||(l=[]),c.push(n[0]);const f=[];for(let p=0;p<u;p++)f.push(parseInt(n[p+1]));l.push(f)}}d.originalWidth===0&&d.originalHeight===0&&(d.originalWidth=d.width,d.originalHeight=d.height),c&&c.length>0&&l&&l.length>0&&(d.names=c,d.values=l,c=null,l=null),d.u=d.x/a.width,d.v=d.y/a.height,d.degrees===90?(d.u2=(d.x+d.height)/a.width,d.v2=(d.y+d.width)/a.height):(d.u2=(d.x+d.width)/a.width,d.v2=(d.y+d.height)/a.height),this.regions.push(d)}else{for(a=new uX(o.trim());t.readEntry(n,o=t.readLine())!==0;){const d=s[n[0]];d&&d(a)}this.pages.push(a)}}findRegion(e){for(let t=0;t<this.regions.length;t++)if(this.regions[t].name===e)return this.regions[t];return null}setTextures(e,t=""){for(const n of this.pages)n.setTexture(e.get(t+n.name))}dispose(){var e;for(let t=0;t<this.pages.length;t++)(e=this.pages[t].texture)==null||e.dispose()}}class dX{constructor(e){A(this,"lines");A(this,"index",0);this.lines=e.split(/\r\n|\r|\n/)}readLine(){return this.index>=this.lines.length?null:this.lines[this.index++]}readEntry(e,t){if(!t||(t=t.trim(),t.length===0))return 0;const n=t.indexOf(":");if(n===-1)return 0;e[0]=t.substr(0,n).trim();for(let s=1,r=n+1;;s++){const o=t.indexOf(",",r);if(o===-1)return e[s]=t.substr(r).trim(),s;if(e[s]=t.substr(r,o-r).trim(),r=o+1,s===4)return 4}}}class uX{constructor(e){A(this,"name");A(this,"minFilter",Wa.Nearest);A(this,"magFilter",Wa.Nearest);A(this,"uWrap",qa.ClampToEdge);A(this,"vWrap",qa.ClampToEdge);A(this,"texture",null);A(this,"width",0);A(this,"height",0);A(this,"pma",!1);A(this,"regions",[]);this.name=e}setTexture(e){this.texture=e,e.setFilters(this.minFilter,this.magFilter),e.setWraps(this.uWrap,this.vWrap);for(const t of this.regions)t.texture=e}}class dT extends cT{constructor(t,n){super();A(this,"page");A(this,"name");A(this,"x",0);A(this,"y",0);A(this,"offsetX",0);A(this,"offsetY",0);A(this,"originalWidth",0);A(this,"originalHeight",0);A(this,"index",0);A(this,"degrees",0);A(this,"names",null);A(this,"values",null);this.page=t,this.name=n,t.regions.push(this)}}const $u=class $u{constructor(e){A(this,"name");A(this,"timelineAttachment");A(this,"timelineSlots",$u.empty);if(!e)throw new Error("name cannot be null.");this.name=e,this.timelineAttachment=this}isTimelineActive(e,t,n){let s=e[t];if(s.bone.isActive()){const r=(n?s.getAppliedPose():s.getPose()).getAttachment();if(r!=null&&r.timelineAttachment===this)return!0}for(let r=0,o=this.timelineSlots.length;r<o;r++){if(s=e[this.timelineSlots[r]],!s.bone.isActive())continue;const a=(n?s.getAppliedPose():s.getPose()).getAttachment();if(a!=null&&a.timelineAttachment===this)return!0}return!1}};A($u,"empty",[]);let Ru=$u;const Bu=class Bu extends Ru{constructor(t){super(t);A(this,"id",Bu.nextID++);A(this,"bones",null);A(this,"vertices",[]);A(this,"worldVerticesLength",0)}computeWorldVertices(t,n,s,r,o,a,c){r=a+(r>>1)*c;const l=n.appliedPose.deform;let d=this.vertices;const u=this.bones;if(!u){l.length>0&&(d=l);const m=n.bone.appliedPose,g=m.worldX,v=m.worldY,y=m.a,b=m.b,x=m.c,T=m.d;for(let E=s,S=a;S<r;E+=2,S+=c){const C=d[E],M=d[E+1];o[S]=C*y+M*b+g,o[S+1]=C*x+M*T+v}return}let h=0,f=0;for(let m=0;m<s;m+=2){const g=u[h];h+=g+1,f+=g}const p=t.bones;if(l.length===0)for(let m=a,g=f*3;m<r;m+=c){let v=0,y=0,b=u[h++];for(b+=h;h<b;h++,g+=3){const x=p[u[h]].appliedPose,T=d[g],E=d[g+1],S=d[g+2];v+=(T*x.a+E*x.b+x.worldX)*S,y+=(T*x.c+E*x.d+x.worldY)*S}o[m]=v,o[m+1]=y}else{const m=l;for(let g=a,v=f*3,y=f<<1;g<r;g+=c){let b=0,x=0,T=u[h++];for(T+=h;h<T;h++,v+=3,y+=2){const E=p[u[h]].appliedPose,S=d[v]+m[y],C=d[v+1]+m[y+1],M=d[v+2];b+=(S*E.a+C*E.b+E.worldX)*M,x+=(S*E.c+C*E.d+E.worldY)*M}o[g]=b,o[g+1]=x}}}copyTo(t){this.bones?(t.bones=[],Ze.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,this.vertices&&(t.vertices=Ze.newFloatArray(this.vertices.length),Ze.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)),t.worldVerticesLength=this.worldVerticesLength,t.timelineAttachment=this.timelineAttachment,t.timelineSlots=this.timelineSlots}};A(Bu,"nextID",0);let Sr=Bu;class so extends Sr{constructor(t,n){super(t);A(this,"sequence");A(this,"regionUVs",[]);A(this,"triangles",[]);A(this,"hullLength",0);A(this,"path");A(this,"color",new at(1,1,1,1));A(this,"sourceMesh",null);A(this,"edges",[]);A(this,"width",0);A(this,"height",0);A(this,"tempColor",new at(0,0,0,0));this.sequence=n}copy(){if(this.sourceMesh)return this.newLinkedMesh();const t=new so(this.name,this.sequence.copy());return t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=[],Ze.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.triangles=[],Ze.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,this.edges&&(t.edges=[],Ze.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t}updateSequence(){this.sequence.update(this)}getSourceMesh(){return this.sourceMesh}setSourceMesh(t){this.sourceMesh=t,t&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength,this.edges=t.edges,this.width=t.width,this.height=t.height)}newLinkedMesh(){const t=new so(this.name,this.sequence.copy());return t.timelineAttachment=this.timelineAttachment,t.path=this.path,t.color.setFromColor(this.color),t.setSourceMesh(this.sourceMesh?this.sourceMesh:this),t.updateSequence(),t}static computeUVs(t,n,s){if(!t)throw new Error("Region not set.");const r=s.length;let o=t.u,a=t.v,c=0,l=0;if(t instanceof dT){const d=t.page,u=d.width,h=d.height;switch(t.degrees){case 90:o-=(t.originalHeight-t.offsetY-t.height)/u,a-=(t.originalWidth-t.offsetX-t.width)/h,c=t.originalHeight/u,l=t.originalWidth/h;for(let f=0;f<r;f+=2)s[f]=o+n[f+1]*c,s[f+1]=a+(1-n[f])*l;return;case 180:o-=(t.originalWidth-t.offsetX-t.width)/u,a-=t.offsetY/h,c=t.originalWidth/u,l=t.originalHeight/h;for(let f=0;f<r;f+=2)s[f]=o+(1-n[f])*c,s[f+1]=a+(1-n[f+1])*l;return;case 270:o-=t.offsetY/u,a-=t.offsetX/h,c=t.originalHeight/u,l=t.originalWidth/h;for(let f=0;f<r;f+=2)s[f]=o+(1-n[f+1])*c,s[f+1]=a+n[f]*l;return;default:o-=t.offsetX/u,a-=(t.originalHeight-t.offsetY-t.height)/h,c=t.originalWidth/u,l=t.originalHeight/h}}else t?(c=t.u2-o,l=t.v2-a):(o=a=0,c=l=1);for(let d=0;d<r;d+=2)s[d]=o+n[d]*c,s[d+1]=a+n[d+1]*l}}const At=class At extends Ru{constructor(t,n){super(t);A(this,"sequence");A(this,"x",0);A(this,"y",0);A(this,"scaleX",1);A(this,"scaleY",1);A(this,"rotation",0);A(this,"width",0);A(this,"height",0);A(this,"path");A(this,"color",new at(1,1,1,1));A(this,"tempColor",new at(1,1,1,1));this.sequence=n}copy(){const t=new At(this.name,this.sequence.copy());return t.path=this.path,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,t.color.setFromColor(this.color),t}computeWorldVertices(t,n,s,r,o){const a=t.bone.appliedPose,c=a.worldX,l=a.worldY,d=a.a,u=a.b,h=a.c,f=a.d;let p=n[0],m=n[1];s[r]=p*d+m*u+c,s[r+1]=p*h+m*f+l,r+=o,p=n[2],m=n[3],s[r]=p*d+m*u+c,s[r+1]=p*h+m*f+l,r+=o,p=n[4],m=n[5],s[r]=p*d+m*u+c,s[r+1]=p*h+m*f+l,r+=o,p=n[6],m=n[7],s[r]=p*d+m*u+c,s[r+1]=p*h+m*f+l}getOffsets(t){return this.sequence.offsets[this.sequence.resolveIndex(t)]}updateSequence(){this.sequence.update(this)}static computeUVs(t,n,s,r,o,a,c,l,d,u){if(!t)throw new Error("Region not set.");const h=c/t.originalWidth*r,f=l/t.originalHeight*o,p=-c/2*r+t.offsetX*h,m=-l/2*o+t.offsetY*f,g=p+t.width*h,v=m+t.height*f,y=a*Le.degRad,b=Math.cos(y),x=Math.sin(y),T=p*b+n,E=p*x,S=m*b+s,C=m*x,M=g*b+n,k=g*x,P=v*b+s,I=v*x;d[0]=T-C,d[1]=S+E,d[2]=T-I,d[3]=P+E,d[4]=M-I,d[5]=P+k,d[6]=M-C,d[7]=S+k,t==null?(u[0]=0,u[1]=0,u[2]=0,u[3]=1,u[4]=1,u[5]=1,u[6]=1,u[7]=0):(u[1]=t.v2,u[2]=t.u,u[5]=t.v,u[6]=t.u2,t.degrees===90?(u[0]=t.u2,u[3]=t.v2,u[4]=t.u,u[7]=t.v):(u[0]=t.u,u[3]=t.v,u[4]=t.u2,u[7]=t.v2))}};A(At,"X1",0),A(At,"Y1",1),A(At,"C1R",2),A(At,"C1G",3),A(At,"C1B",4),A(At,"C1A",5),A(At,"U1",6),A(At,"V1",7),A(At,"X2",8),A(At,"Y2",9),A(At,"C2R",10),A(At,"C2G",11),A(At,"C2B",12),A(At,"C2A",13),A(At,"U2",14),A(At,"V2",15),A(At,"X3",16),A(At,"Y3",17),A(At,"C3R",18),A(At,"C3G",19),A(At,"C3B",20),A(At,"C3A",21),A(At,"U3",22),A(At,"V3",23),A(At,"X4",24),A(At,"Y4",25),A(At,"C4R",26),A(At,"C4G",27),A(At,"C4B",28),A(At,"C4A",29),A(At,"U4",30),A(At,"V4",31);let Ka=At;const Ea=class Ea{constructor(e,t){A(this,"id",Ea.nextID());A(this,"regions");A(this,"pathSuffix");A(this,"uvs");A(this,"offsets");A(this,"start",0);A(this,"digits",0);A(this,"setupIndex",0);this.regions=new Array(e),this.pathSuffix=t}copy(){const e=this.regions.length,t=new Ea(e,this.pathSuffix);if(Ze.arrayCopy(this.regions,0,t.regions,0,e),t.start=this.start,t.digits=this.digits,t.setupIndex=this.setupIndex,this.uvs!=null){const n=this.uvs[0].length;t.uvs=[];for(let s=0;s<e;s++)t.uvs[s]=Ze.newFloatArray(n),Ze.arrayCopy(this.uvs[s],0,t.uvs[s],0,n)}if(this.offsets!=null){t.offsets=[];for(let n=0;n<e;n++)t.offsets[n]=[],Ze.arrayCopy(this.offsets[n],0,t.offsets[n],0,8)}return t}update(e){const t=this.regions.length;if(e instanceof Ka){this.uvs=[],this.offsets=[];for(let n=0;n<t;n++)this.uvs[n]=Ze.newFloatArray(8),this.offsets[n]=[],Ka.computeUVs(this.regions[n],e.x,e.y,e.scaleX,e.scaleY,e.rotation,e.width,e.height,this.offsets[n],this.uvs[n])}else if(e instanceof so){const n=e.regionUVs;this.uvs=[],this.offsets=void 0;for(let s=0;s<t;s++)this.uvs[s]=Ze.newFloatArray(n.length),so.computeUVs(this.regions[s],n,this.uvs[s])}}resolveIndex(e){let t=e.sequenceIndex;return t===-1&&(t=this.setupIndex),t>=this.regions.length&&(t=this.regions.length-1),t}getUVs(e){return this.uvs[e]}hasPathSuffix(){return this.pathSuffix}getPath(e,t){if(!this.pathSuffix)return e;let n=e;const s=(this.start+t).toString();for(let r=this.digits-s.length;r>0;r--)n+="0";return n+=s,n}static nextID(){return Ea._nextID++}};A(Ea,"_nextID",0);let Ja=Ea;var Nn;(function(i){i[i.hold=0]="hold",i[i.once=1]="once",i[i.loop=2]="loop",i[i.pingpong=3]="pingpong",i[i.onceReverse=4]="onceReverse",i[i.loopReverse=5]="loopReverse",i[i.pingpongReverse=6]="pingpongReverse"})(Nn||(Nn={}));const uT=[Nn.hold,Nn.once,Nn.loop,Nn.pingpong,Nn.onceReverse,Nn.loopReverse,Nn.pingpongReverse];class uv{constructor(e,t,n){A(this,"name");A(this,"timelines",[]);A(this,"timelineIds");A(this,"bones");A(this,"color",new at(1,1,1,1));A(this,"duration");if(!e)throw new Error("name cannot be null.");this.name=e,this.duration=n,this.timelineIds=new oX,this.bones=[],this.setTimelines(t)}setTimelines(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e;const t=e.length;this.timelineIds.clear(),this.bones.length=0;const n=new Set,s=e;for(let r=0;r<t;r++){const o=s[r];this.timelineIds.addAll(o.propertyIds),fX(o)&&n.add(o.boneIndex)&&this.bones.push(o.boneIndex)}}hasTimeline(e){for(let t=0;t<e.length;t++)if(this.timelineIds.contains(e[t]))return!0;return!1}apply(e,t,n,s,r,o,a,c,l,d){if(!e)throw new Error("skeleton cannot be null.");s&&this.duration!==0&&(n%=this.duration,t>0&&(t%=this.duration));const u=this.timelines;for(let h=0,f=u.length;h<f;h++)u[h].apply(e,t,n,r,o,a,c,l,d)}}var Ge;(function(i){i[i.current=0]="current",i[i.setup=1]="setup",i[i.first=2]="first"})(Ge||(Ge={}));var rt;(function(i){i[i.rotate=0]="rotate",i[i.x=1]="x",i[i.y=2]="y",i[i.scaleX=3]="scaleX",i[i.scaleY=4]="scaleY",i[i.shearX=5]="shearX",i[i.shearY=6]="shearY",i[i.inherit=7]="inherit",i[i.rgb=8]="rgb",i[i.alpha=9]="alpha",i[i.rgb2=10]="rgb2",i[i.attachment=11]="attachment",i[i.deform=12]="deform",i[i.event=13]="event",i[i.drawOrder=14]="drawOrder",i[i.drawOrderFolder=15]="drawOrderFolder",i[i.ikConstraint=16]="ikConstraint",i[i.transformConstraint=17]="transformConstraint",i[i.pathConstraintPosition=18]="pathConstraintPosition",i[i.pathConstraintSpacing=19]="pathConstraintSpacing",i[i.pathConstraintMix=20]="pathConstraintMix",i[i.physicsConstraintInertia=21]="physicsConstraintInertia",i[i.physicsConstraintStrength=22]="physicsConstraintStrength",i[i.physicsConstraintDamping=23]="physicsConstraintDamping",i[i.physicsConstraintMass=24]="physicsConstraintMass",i[i.physicsConstraintWind=25]="physicsConstraintWind",i[i.physicsConstraintGravity=26]="physicsConstraintGravity",i[i.physicsConstraintMix=27]="physicsConstraintMix",i[i.physicsConstraintReset=28]="physicsConstraintReset",i[i.sequence=29]="sequence",i[i.sliderTime=30]="sliderTime",i[i.sliderMix=31]="sliderMix"})(rt||(rt={}));let Gt=class{constructor(e,...t){A(this,"propertyIds");A(this,"frames");A(this,"additive",!1);A(this,"instant",!1);this.propertyIds=t,this.frames=Ze.newFloatArray(e*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search(e,t,n=1){const s=e.length;for(let r=n;r<s;r+=n)if(e[r]>t)return r-n;return s-n}};function hX(i){return typeof i=="object"&&i!==null&&typeof i.slotIndex=="number"}class ea extends Gt{constructor(t,n,...s){super(t,...s);A(this,"curves");this.curves=Ze.newFloatArray(t+n*18),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){const n=this.getFrameCount()+t*18;if(this.curves.length>n){const s=Ze.newFloatArray(n);Ze.arrayCopy(this.curves,0,s,0,n),this.curves=s}}setBezier(t,n,s,r,o,a,c,l,d,u,h){const f=this.curves;let p=this.getFrameCount()+t*18;s===0&&(f[n]=2+p);const m=(r-a*2+l)*.03,g=(o-c*2+d)*.03,v=((a-l)*3-r+u)*.006,y=((c-d)*3-o+h)*.006;let b=m*2+v,x=g*2+y,T=(a-r)*.3+m+v*.16666667,E=(c-o)*.3+g+y*.16666667,S=r+T,C=o+E;for(let M=p+18;p<M;p+=2)f[p]=S,f[p+1]=C,T+=b,E+=x,b+=v,x+=y,S+=T,C+=E}getBezierValue(t,n,s,r){const o=this.curves;if(o[r]>t){const d=this.frames[n],u=this.frames[n+s];return u+(t-d)/(o[r]-d)*(o[r+1]-u)}const a=r+18;for(r+=2;r<a;r+=2)if(o[r]>=t){const d=o[r-2],u=o[r-1];return u+(t-d)/(o[r]-d)*(o[r+1]-u)}n+=this.getFrameEntries();const c=o[a-2],l=o[a-1];return l+(t-c)/(this.frames[n]-c)*(this.frames[n+s]-l)}}class lr extends ea{constructor(e,t,n){super(e,t,n)}getFrameEntries(){return 2}setFrame(e,t,n){e<<=1,this.frames[e]=t,this.frames[e+1]=n}getCurveValue(e){const t=this.frames;let n=t.length-2;for(let r=2;r<=n;r+=2)if(t[r]>e){n=r-2;break}const s=this.curves[n>>1];switch(s){case 0:{const r=t[n],o=t[n+1];return o+(e-r)/(t[n+2]-r)*(t[n+2+1]-o)}case 1:return t[n+1]}return this.getBezierValue(e,n,1,s-2)}getRelativeValue(e,t,n,s,r,o){if(e<this.frames[0])return lr.beforeFirstKey(n,t,r,o);const a=this.getCurveValue(e);return n===Ge.setup?o+a*t:r+(s?a:a+o-r)*t}getAbsoluteValue(e,t,n,s,r,o,a){return a===void 0?this.getAbsoluteValue1(e,t,n,s,r,o):this.getAbsoluteValue2(e,t,n,s,r,o,a)}getAbsoluteValue1(e,t,n,s,r,o){if(e<this.frames[0])return lr.beforeFirstKey(n,t,r,o);const a=this.getCurveValue(e);return n===Ge.setup?o+(s?a:a-o)*t:r+(s?a:a-r)*t}getAbsoluteValue2(e,t,n,s,r,o,a){return e<this.frames[0]?lr.beforeFirstKey(n,t,r,o):n===Ge.setup?o+(s?a:a-o)*t:r+(s?a:a-r)*t}getScaleValue(e,t,n,s,r,o,a){if(e<this.frames[0])return lr.beforeFirstKey(n,t,o,a);const c=this.getCurveValue(e)*a;if(t===1&&!s)return c;let l=n===Ge.setup?a:o;return s?l+(c-a)*t:r?l+(Math.abs(c)*Math.sign(l)-l)*t:(l=Math.abs(l)*Math.sign(c),l+(c-l)*t)}static beforeFirstKey(e,t,n,s){switch(e){case Ge.setup:return s;case Ge.first:return n+(s-n)*t;case Ge.current:return n}}}function fX(i){return typeof i=="object"&&i!==null&&typeof i.boneIndex=="number"}class ta extends lr{constructor(t,n,s,r){super(t,n,`${r}|${s}`);A(this,"boneIndex");this.boneIndex=s,this.additive=!0}apply(t,n,s,r,o,a,c,l,d){const u=t.bones[this.boneIndex];u.active&&this.apply1(d?u.appliedPose:u.pose,u.data.setupPose,s,o,a,c,l)}}class hv extends ea{constructor(t,n,s,r,o){super(t,n,`${r}|${s}`,`${o}|${s}`);A(this,"boneIndex");this.boneIndex=s,this.additive=!0}getFrameEntries(){return 3}setFrame(t,n,s,r){t*=3,this.frames[t]=n,this.frames[t+1]=s,this.frames[t+2]=r}apply(t,n,s,r,o,a,c,l,d){const u=t.bones[this.boneIndex];u.active&&this.apply1(d?u.appliedPose:u.pose,u.data.setupPose,s,o,a,c,l)}}class Fu extends ta{constructor(e,t,n){super(e,t,n,rt.rotate)}apply1(e,t,n,s,r,o,a){e.rotation=this.getRelativeValue(n,s,r,o,e.rotation,t.rotation)}}class hT extends hv{constructor(e,t,n){super(e,t,n,rt.x,rt.y)}apply1(e,t,n,s,r,o,a){const c=this.frames;if(n<c[0]){switch(r){case Ge.setup:e.x=t.x,e.y=t.y;break;case Ge.first:e.x+=(t.x-e.x)*s,e.y+=(t.y-e.y)*s;break}return}let l=0,d=0;const u=Gt.search(c,n,3),h=this.curves[u/3];switch(h){case 0:{const f=c[u];l=c[u+1],d=c[u+2];const p=(n-f)/(c[u+3]-f);l+=(c[u+3+1]-l)*p,d+=(c[u+3+2]-d)*p;break}case 1:l=c[u+1],d=c[u+2];break;default:l=this.getBezierValue(n,u,1,h-2),d=this.getBezierValue(n,u,2,h+18-2)}r===Ge.setup?(e.x=t.x+l*s,e.y=t.y+d*s):o?(e.x+=l*s,e.y+=d*s):(e.x+=(t.x+l-e.x)*s,e.y+=(t.y+d-e.y)*s)}}class fT extends ta{constructor(e,t,n){super(e,t,n,rt.x)}apply1(e,t,n,s,r,o,a){e.x=this.getRelativeValue(n,s,r,o,e.x,t.x)}}class pT extends ta{constructor(e,t,n){super(e,t,n,rt.y)}apply1(e,t,n,s,r,o,a){e.y=this.getRelativeValue(n,s,r,o,e.y,t.y)}}class mT extends hv{constructor(e,t,n){super(e,t,n,rt.scaleX,rt.scaleY)}apply1(e,t,n,s,r,o,a){const c=this.frames;if(n<c[0]){switch(r){case Ge.setup:e.scaleX=t.scaleX,e.scaleY=t.scaleY;break;case Ge.first:e.scaleX+=(t.scaleX-e.scaleX)*s,e.scaleY+=(t.scaleY-e.scaleY)*s;break}return}let l,d;const u=Gt.search(c,n,3),h=this.curves[u/3];switch(h){case 0:{const f=c[u];l=c[u+1],d=c[u+2];const p=(n-f)/(c[u+3]-f);l+=(c[u+3+1]-l)*p,d+=(c[u+3+2]-d)*p;break}case 1:l=c[u+1],d=c[u+2];break;default:l=this.getBezierValue(n,u,1,h-2),d=this.getBezierValue(n,u,2,h+18-2)}if(l*=t.scaleX,d*=t.scaleY,s===1&&!o)e.scaleX=l,e.scaleY=d;else{let f=0,p=0;r===Ge.setup?(f=t.scaleX,p=t.scaleY):(f=e.scaleX,p=e.scaleY),o?(e.scaleX=f+(l-t.scaleX)*s,e.scaleY=p+(d-t.scaleY)*s):a?(e.scaleX=f+(Math.abs(l)*Math.sign(f)-f)*s,e.scaleY=p+(Math.abs(d)*Math.sign(p)-p)*s):(f=Math.abs(f)*Math.sign(l),p=Math.abs(p)*Math.sign(d),e.scaleX=f+(l-f)*s,e.scaleY=p+(d-p)*s)}}}class gT extends ta{constructor(e,t,n){super(e,t,n,rt.scaleX)}apply1(e,t,n,s,r,o,a){e.scaleX=this.getScaleValue(n,s,r,o,a,e.scaleX,t.scaleX)}}class vT extends ta{constructor(e,t,n){super(e,t,n,rt.scaleY)}apply1(e,t,n,s,r,o,a){e.scaleY=this.getScaleValue(n,s,r,o,a,e.scaleY,t.scaleY)}}class bT extends hv{constructor(e,t,n){super(e,t,n,rt.shearX,rt.shearY)}apply1(e,t,n,s,r,o,a){const c=this.frames;if(n<c[0]){switch(r){case Ge.setup:e.shearX=t.shearX,e.shearY=t.shearY;break;case Ge.first:e.shearX+=(t.shearX-e.shearX)*s,e.shearY+=(t.shearY-e.shearY)*s;break}return}let l=0,d=0;const u=Gt.search(c,n,3),h=this.curves[u/3];switch(h){case 0:{const f=c[u];l=c[u+1],d=c[u+2];const p=(n-f)/(c[u+3]-f);l+=(c[u+3+1]-l)*p,d+=(c[u+3+2]-d)*p;break}case 1:l=c[u+1],d=c[u+2];break;default:l=this.getBezierValue(n,u,1,h-2),d=this.getBezierValue(n,u,2,h+18-2)}r===Ge.setup?(e.shearX=t.shearX+l*s,e.shearY=t.shearY+d*s):o?(e.shearX+=l*s,e.shearY+=d*s):(e.shearX+=(t.shearX+l-e.shearX)*s,e.shearY+=(t.shearY+d-e.shearY)*s)}}class yT extends ta{constructor(e,t,n){super(e,t,n,rt.shearX)}apply1(e,t,n,s,r,o,a){e.shearX=this.getRelativeValue(n,s,r,o,e.shearX,t.shearX)}}class xT extends ta{constructor(e,t,n){super(e,t,n,rt.shearY)}apply1(e,t,n,s,r,o,a){e.shearY=this.getRelativeValue(n,s,r,o,e.shearY,t.shearY)}}class wT extends Gt{constructor(t,n){super(t,`${rt.inherit}|${n}`);A(this,"boneIndex");this.boneIndex=n,this.instant=!0}getFrameEntries(){return 2}setFrame(t,n,s){t*=2,this.frames[t]=n,this.frames[t+1]=s}apply(t,n,s,r,o,a,c,l,d){const u=t.bones[this.boneIndex];if(!u.active)return;const h=d?u.appliedPose:u.pose;if(l)a!==Ge.current&&(h.inherit=u.data.setupPose.inherit);else{const f=this.frames;s<f[0]?a!==Ge.current&&(h.inherit=u.data.setupPose.inherit):h.inherit=this.frames[Gt.search(f,s,2)+1]}}}class Ah extends ea{constructor(t,n,s,...r){super(t,n,...r);A(this,"slotIndex");this.slotIndex=s}apply(t,n,s,r,o,a,c,l,d){const u=t.slots[this.slotIndex];u.bone.active&&this.apply1(u,d?u.appliedPose:u.pose,s,o,a,c)}}class ST extends Ah{constructor(e,t,n){super(e,t,n,`${rt.rgb}|${n}`,`${rt.alpha}|${n}`)}getFrameEntries(){return 5}setFrame(e,t,n,s,r,o){e*=5,this.frames[e]=t,this.frames[e+1]=n,this.frames[e+2]=s,this.frames[e+3]=r,this.frames[e+4]=o}apply1(e,t,n,s,r,o){const a=t.color,c=this.frames;if(n<c[0]){const m=e.data.setupPose.color;switch(r){case Ge.setup:a.setFromColor(m);break;case Ge.first:a.add((m.r-a.r)*s,(m.g-a.g)*s,(m.b-a.b)*s,(m.a-a.a)*s);break}return}let l=0,d=0,u=0,h=0;const f=Gt.search(c,n,5),p=this.curves[f/5];switch(p){case 0:{const m=c[f];l=c[f+1],d=c[f+2],u=c[f+3],h=c[f+4];const g=(n-m)/(c[f+5]-m);l+=(c[f+5+1]-l)*g,d+=(c[f+5+2]-d)*g,u+=(c[f+5+3]-u)*g,h+=(c[f+5+4]-h)*g;break}case 1:l=c[f+1],d=c[f+2],u=c[f+3],h=c[f+4];break;default:l=this.getBezierValue(n,f,1,p-2),d=this.getBezierValue(n,f,2,p+18-2),u=this.getBezierValue(n,f,3,p+36-2),h=this.getBezierValue(n,f,4,p+54-2)}if(s===1)a.set(l,d,u,h);else if(r===Ge.setup){const m=e.data.setupPose.color;a.set(m.r+(l-m.r)*s,m.g+(d-m.g)*s,m.b+(u-m.b)*s,m.a+(h-m.a)*s)}else a.add((l-a.r)*s,(d-a.g)*s,(u-a.b)*s,(h-a.a)*s)}}class CT extends Ah{constructor(e,t,n){super(e,t,n,`${rt.rgb}|${n}`)}getFrameEntries(){return 4}setFrame(e,t,n,s,r){e<<=2,this.frames[e]=t,this.frames[e+1]=n,this.frames[e+2]=s,this.frames[e+3]=r}apply1(e,t,n,s,r,o){const a=t.color;let c=0,l=0,d=0;const u=this.frames;if(n<u[0]){const p=e.data.setupPose.color;switch(r){case Ge.setup:{a.r=p.r,a.g=p.g,a.b=p.b;break}case Ge.first:{a.r+=(p.r-a.r)*s,a.g+=(p.g-a.g)*s,a.b+=(p.b-a.b)*s;break}}return}const h=Gt.search(u,n,4),f=this.curves[h>>2];switch(f){case 0:{const p=u[h];c=u[h+1],l=u[h+2],d=u[h+3];const m=(n-p)/(u[h+4]-p);c+=(u[h+4+1]-c)*m,l+=(u[h+4+2]-l)*m,d+=(u[h+4+3]-d)*m;break}case 1:c=u[h+1],l=u[h+2],d=u[h+3];break;default:c=this.getBezierValue(n,h,1,f-2),l=this.getBezierValue(n,h,2,f+18-2),d=this.getBezierValue(n,h,3,f+36-2)}if(s!==1)if(r===Ge.setup){const p=e.data.setupPose.color;c=p.r+(c-p.r)*s,l=p.g+(l-p.g)*s,d=p.b+(d-p.b)*s}else c=a.r+(c-a.r)*s,l=a.g+(l-a.g)*s,d=a.b+(d-a.b)*s;a.r=c<0?0:c>1?1:c,a.g=l<0?0:l>1?1:l,a.b=d<0?0:d>1?1:d}}class AT extends lr{constructor(t,n,s){super(t,n,`${rt.alpha}|${s}`);A(this,"slotIndex",0);this.slotIndex=s}apply(t,n,s,r,o,a,c,l,d){const u=t.slots[this.slotIndex];if(!u.bone.active)return;const h=(d?u.appliedPose:u.pose).color;let f=0;const p=this.frames;if(s<p[0]){const m=u.data.setupPose.color.a;switch(a){case Ge.setup:h.a=m;break;case Ge.first:h.a+=(m-h.a)*o;break}return}if(f=this.getCurveValue(s),o!==1)if(a===Ge.setup){const m=u.data.setupPose.color;f=m.a+(f-m.a)*o}else f=h.a+(f-h.a)*o;h.a=f<0?0:f>1?1:f}}class TT extends Ah{constructor(e,t,n){super(e,t,n,`${rt.rgb}|${n}`,`${rt.alpha}|${n}`,`${rt.rgb2}|${n}`)}getFrameEntries(){return 8}setFrame(e,t,n,s,r,o,a,c,l){e<<=3,this.frames[e]=t,this.frames[e+1]=n,this.frames[e+2]=s,this.frames[e+3]=r,this.frames[e+4]=o,this.frames[e+5]=a,this.frames[e+6]=c,this.frames[e+7]=l}apply1(e,t,n,s,r,o){const a=t.color,c=t.darkColor;let l=0,d=0,u=0;const h=this.frames;if(n<h[0]){const b=e.data.setupPose,x=b.color,T=b.darkColor;switch(r){case Ge.setup:{a.setFromColor(x),c.r=T.r,c.g=T.g,c.b=T.b;break}case Ge.first:{a.add((x.r-a.r)*s,(x.g-a.g)*s,(x.b-a.b)*s,(x.a-a.a)*s),c.r+=(T.r-c.r)*s,c.g+=(T.g-c.g)*s,c.b+=(T.b-c.b)*s;break}}return}let f=0,p=0,m=0,g=0;const v=Gt.search(h,n,8),y=this.curves[v>>3];switch(y){case 0:{const b=h[v];f=h[v+1],p=h[v+2],m=h[v+3],g=h[v+4],l=h[v+5],d=h[v+6],u=h[v+7];const x=(n-b)/(h[v+8]-b);f+=(h[v+8+1]-f)*x,p+=(h[v+8+2]-p)*x,m+=(h[v+8+3]-m)*x,g+=(h[v+8+4]-g)*x,l+=(h[v+8+5]-l)*x,d+=(h[v+8+6]-d)*x,u+=(h[v+8+7]-u)*x;break}case 1:f=h[v+1],p=h[v+2],m=h[v+3],g=h[v+4],l=h[v+5],d=h[v+6],u=h[v+7];break;default:f=this.getBezierValue(n,v,1,y-2),p=this.getBezierValue(n,v,2,y+18-2),m=this.getBezierValue(n,v,3,y+36-2),g=this.getBezierValue(n,v,4,y+54-2),l=this.getBezierValue(n,v,5,y+72-2),d=this.getBezierValue(n,v,6,y+90-2),u=this.getBezierValue(n,v,7,y+108-2)}if(s===1)a.set(f,p,m,g);else if(r===Ge.setup){const b=e.data.setupPose;let x=b.color;a.set(x.r+(f-x.r)*s,x.g+(p-x.g)*s,x.b+(m-x.b)*s,x.a+(g-x.a)*s),x=b.darkColor,l=x.r+(l-x.r)*s,d=x.g+(d-x.g)*s,u=x.b+(u-x.b)*s}else a.add((f-a.r)*s,(p-a.g)*s,(m-a.b)*s,(g-a.a)*s),l=c.r+(l-c.r)*s,d=c.g+(d-c.g)*s,u=c.b+(u-c.b)*s;c.r=l<0?0:l>1?1:l,c.g=d<0?0:d>1?1:d,c.b=u<0?0:u>1?1:u}}class ET extends Ah{constructor(e,t,n){super(e,t,n,`${rt.rgb}|${n}`,`${rt.rgb2}|${n}`)}getFrameEntries(){return 7}setFrame(e,t,n,s,r,o,a,c){e*=7,this.frames[e]=t,this.frames[e+1]=n,this.frames[e+2]=s,this.frames[e+3]=r,this.frames[e+4]=o,this.frames[e+5]=a,this.frames[e+6]=c}apply1(e,t,n,s,r,o){const a=t.color,c=t.darkColor;let l=0,d=0,u=0,h=0,f=0,p=0;const m=this.frames;if(n<m[0]){const y=e.data.setupPose,b=y.color,x=y.darkColor;switch(r){case Ge.setup:a.r=b.r,a.g=b.g,a.b=b.b,c.r=x.r,c.g=x.g,c.b=x.b;break;case Ge.first:a.r+=(b.r-a.r)*s,a.g+=(b.g-a.g)*s,a.b+=(b.b-a.b)*s,c.r+=(x.r-c.r)*s,c.g+=(x.g-c.g)*s,c.b+=(x.b-c.b)*s;break}return}const g=Gt.search(m,n,7),v=this.curves[g/7];switch(v){case 0:{const y=m[g];l=m[g+1],d=m[g+2],u=m[g+3],h=m[g+4],f=m[g+5],p=m[g+6];const b=(n-y)/(m[g+7]-y);l+=(m[g+7+1]-l)*b,d+=(m[g+7+2]-d)*b,u+=(m[g+7+3]-u)*b,h+=(m[g+7+4]-h)*b,f+=(m[g+7+5]-f)*b,p+=(m[g+7+6]-p)*b;break}case 1:l=m[g+1],d=m[g+2],u=m[g+3],h=m[g+4],f=m[g+5],p=m[g+6];break;default:l=this.getBezierValue(n,g,1,v-2),d=this.getBezierValue(n,g,2,v+18-2),u=this.getBezierValue(n,g,3,v+36-2),h=this.getBezierValue(n,g,4,v+54-2),f=this.getBezierValue(n,g,5,v+72-2),p=this.getBezierValue(n,g,6,v+90-2)}if(s!==1)if(r===Ge.setup){const y=e.data.setupPose;let b=y.color;l=b.r+(l-b.r)*s,d=b.g+(d-b.g)*s,u=b.b+(u-b.b)*s,b=y.darkColor,h=b.r+(h-b.r)*s,f=b.g+(f-b.g)*s,p=b.b+(p-b.b)*s}else l=a.r+(l-a.r)*s,d=a.g+(d-a.g)*s,u=a.b+(u-a.b)*s,h=c.r+(h-c.r)*s,f=c.g+(f-c.g)*s,p=c.b+(p-c.b)*s;a.r=l<0?0:l>1?1:l,a.g=d<0?0:d>1?1:d,a.b=u<0?0:u>1?1:u,c.r=h<0?0:h>1?1:h,c.g=f<0?0:f>1?1:f,c.b=p<0?0:p>1?1:p}}class Yl extends Gt{constructor(t,n){super(t,`${rt.attachment}|${n}`);A(this,"slotIndex",0);A(this,"attachmentNames");this.slotIndex=n,this.attachmentNames=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,n,s){this.frames[t]=n,this.attachmentNames[t]=s}apply(t,n,s,r,o,a,c,l,d){const u=t.slots[this.slotIndex];if(!u.bone.active)return;const h=d?u.appliedPose:u.pose;l||s<this.frames[0]?a!==Ge.current&&this.setAttachment(t,h,u.data.attachmentName):this.setAttachment(t,h,this.attachmentNames[Gt.search(this.frames,s)])}setAttachment(t,n,s){n.setAttachment(s?t.getAttachment(this.slotIndex,s):null)}}class _T extends ea{constructor(t,n,s,r){super(t,n,`${rt.deform}|${s}|${r.id}`);A(this,"slotIndex");A(this,"attachment");A(this,"vertices");this.slotIndex=s,this.attachment=r,this.vertices=new Array(t),this.additive=!0}getFrameCount(){return this.frames.length}setFrame(t,n,s){this.frames[t]=n,this.vertices[t]=s}setBezier(t,n,s,r,o,a,c,l,d,u,h){const f=this.curves;let p=this.getFrameCount()+t*18;s===0&&(f[n]=2+p);const m=(r-a*2+l)*.03,g=d*.03-c*.06,v=((a-l)*3-r+u)*.006,y=(c-d+.33333333)*.018;let b=m*2+v,x=g*2+y,T=(a-r)*.3+m+v*.16666667,E=c*.3+g+y*.16666667,S=r+T,C=E;for(let M=p+18;p<M;p+=2)f[p]=S,f[p+1]=C,T+=b,E+=x,b+=v,x+=y,S+=T,C+=E}getCurvePercent(t,n){const s=this.curves;let r=s[n];switch(r){case 0:{const l=this.frames[n];return(t-l)/(this.frames[n+this.getFrameEntries()]-l)}case 1:return 0}if(r-=2,s[r]>t){const l=this.frames[n];return s[r+1]*(t-l)/(s[r]-l)}const o=r+18;for(r+=2;r<o;r+=2)if(s[r]>=t){const l=s[r-2],d=s[r-1];return d+(t-l)/(s[r]-l)*(s[r+1]-d)}const a=s[o-2],c=s[o-1];return c+(1-c)*(t-a)/(this.frames[n+this.getFrameEntries()]-a)}apply(t,n,s,r,o,a,c,l,d){const u=t.slots;if(!this.attachment.isTimelineActive(u,this.slotIndex,d))return;const h=this.attachment.timelineSlots,f=this.frames;if(s<f[0]){this.applyBeforeFirst(u[this.slotIndex],d,o,a);for(const y of h)this.applyBeforeFirst(u[y],d,o,a);return}let p,m,g;if(s>=f[f.length-1])g=0,p=this.vertices[f.length-1],m=null;else{const y=Gt.search(f,s);g=this.getCurvePercent(s,y),p=this.vertices[y],m=this.vertices[y+1]}const v=this.vertices[0].length;this.applyToSlot(u[this.slotIndex],d,p,m,g,v,o,a,c);for(const y of h)this.applyToSlot(u[y],d,p,m,g,v,o,a,c)}applyBeforeFirst(t,n,s,r){if(!t.bone.active)return;const o=n?t.appliedPose:t.pose;if(o.attachment==null||o.attachment.timelineAttachment!==this.attachment)return;const a=o.deform;switch(a.length===0&&(r=Ge.setup),r){case Ge.setup:a.length=0;break;case Ge.first:{if(s===1){a.length=0;return}const c=this.vertices[0].length;a.length=c;const l=a,d=o.attachment;if(d.bones===null){const u=d.vertices;for(let h=0;h<c;h++)l[h]+=(u[h]-l[h])*s}else{s=1-s;for(let u=0;u<c;u++)l[u]*=s}}}}applyToSlot(t,n,s,r,o,a,c,l,d){if(!t.bone.active)return;const u=n?t.appliedPose:t.pose;if(u.attachment===null||u.attachment.timelineAttachment!==this.attachment)return;const h=u.attachment,f=u.deform;f.length===0&&(l=Ge.setup);const p=l===Ge.setup;if(f.length=a,r===null)if(c===1)if(d&&!p)if(h.bones)for(let m=0;m<a;m++)f[m]+=s[m];else{const m=h.vertices;for(let g=0;g<a;g++)f[g]+=s[g]-m[g]}else Ze.arrayCopy(s,0,f,0,a);else if(p)if(h.bones)for(let m=0;m<a;m++)f[m]=s[m]*c;else{const m=h.vertices;for(let g=0;g<a;g++){const v=m[g];f[g]=v+(s[g]-v)*c}}else if(d)if(h.bones)for(let m=0;m<a;m++)f[m]+=s[m]*c;else{const m=h.vertices;for(let g=0;g<a;g++)f[g]+=(s[g]-m[g])*c}else for(let m=0;m<a;m++)f[m]+=(s[m]-f[m])*c;else if(c===1)if(d&&!p)if(h.bones)for(let m=0;m<a;m++){const g=s[m];f[m]+=g+(r[m]-g)*o}else{const m=h.vertices;for(let g=0;g<a;g++){const v=s[g];f[g]+=v+(r[g]-v)*o-m[g]}}else if(o===0)Ze.arrayCopy(s,0,f,0,a);else for(let m=0;m<a;m++){const g=s[m];f[m]=g+(r[m]-g)*o}else if(p)if(h.bones)for(let m=0;m<a;m++){const g=s[m];f[m]=(g+(r[m]-g)*o)*c}else{const m=h.vertices;for(let g=0;g<a;g++){const v=s[g],y=m[g];f[g]=y+(v+(r[g]-v)*o-y)*c}}else if(d)if(h.bones)for(let m=0;m<a;m++){const g=s[m];f[m]+=(g+(r[m]-g)*o)*c}else{const m=h.vertices;for(let g=0;g<a;g++){const v=s[g];f[g]+=(v+(r[g]-v)*o-m[g])*c}}else for(let m=0;m<a;m++){const g=s[m];f[m]+=(g+(r[m]-g)*o-f[m])*c}}}const ki=class ki extends Gt{constructor(t,n,s){super(t,`${rt.sequence}|${n}|${s.sequence.id}`);A(this,"slotIndex");A(this,"attachment");this.slotIndex=n,this.attachment=s,this.instant=!0}getFrameEntries(){return ki.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,n,s,r,o){const a=this.frames;t*=ki.ENTRIES,a[t]=n,a[t+ki.MODE]=s|r<<4,a[t+ki.DELAY]=o}apply(t,n,s,r,o,a,c,l,d){const u=t.slots;if(!this.attachment.isTimelineActive(u,this.slotIndex,d))return;const h=this.attachment.timelineSlots,f=this.frames;if(l||s<f[0]){if(a!==Ge.current){this.setupPose(u[this.slotIndex],d);for(const y of h)this.setupPose(u[y],d)}return}const p=Gt.search(f,s,ki.ENTRIES),m=f[p],g=f[p+ki.MODE],v=f[p+ki.DELAY];this.applyToSlot(u[this.slotIndex],d,s,m,g,v);for(const y of h)this.applyToSlot(u[y],d,s,m,g,v)}setupPose(t,n){if(!t.bone.active)return;const s=n?t.appliedPose:t.pose;s.attachment===null||s.attachment.timelineAttachment!==this.attachment||(s.sequenceIndex=-1)}applyToSlot(t,n,s,r,o,a){if(!t.bone.active)return;const c=n?t.appliedPose:t.pose;if(c.attachment===null||c.attachment.timelineAttachment!==this.attachment)return;let l=o>>4,d=c.attachment.sequence.regions.length;const u=uT[o&15];if(u!==Nn.hold)switch(l+=(s-r)/a+1e-5|0,u){case Nn.once:l=Math.min(d-1,l);break;case Nn.loop:l%=d;break;case Nn.pingpong:{const h=(d<<1)-2;l=h===0?0:l%h,l>=d&&(l=h-l);break}case Nn.onceReverse:l=Math.max(d-1-l,0);break;case Nn.loopReverse:l=d-1-l%d;break;case Nn.pingpongReverse:{const h=(d<<1)-2;l=h===0?0:(l+d-1)%h,l>=d&&(l=h-l)}}c.sequenceIndex=l}};A(ki,"ENTRIES",3),A(ki,"MODE",1),A(ki,"DELAY",2);let Lu=ki;const Uu=class Uu extends Gt{constructor(t){super(t,...Uu.propertyIds);A(this,"events");this.events=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,n){this.frames[t]=n.time,this.events[t]=n}apply(t,n,s,r,o,a,c,l,d){if(!r)return;const u=this.frames,h=this.frames.length;if(n>s)this.apply(null,n,Number.MAX_VALUE,r,0,a,!1,!1,!1),n=-1;else if(n>=u[h-1])return;if(s<u[0])return;let f=0;if(n<u[0])f=0;else{f=Gt.search(u,n)+1;const p=u[f];for(;f>0&&u[f-1]===p;)f--}for(;f<h&&s>=u[f];f++)r.push(this.events[f])}};A(Uu,"propertyIds",[`${rt.event}`]);let vc=Uu;const _a=class _a extends Gt{constructor(t){super(t,..._a.propertyIds);A(this,"drawOrders");this.drawOrders=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,n,s){this.frames[t]=n,this.drawOrders[t]=s}apply(t,n,s,r,o,a,c,l,d){const u=d?t.drawOrder.appliedPose:t.drawOrder.pose,h=t.slots;if(l||s<this.frames[0]){a!==Ge.current&&Ze.arrayCopy(h,0,u,0,t.slots.length);return}const f=this.drawOrders[Gt.search(this.frames,s)];if(!f)Ze.arrayCopy(h,0,u,0,t.slots.length);else for(let p=0,m=f.length;p<m;p++)u[p]=h[f[p]]}};A(_a,"propertyID",`${rt.drawOrder}`),A(_a,"propertyIds",[_a.propertyID]);let eo=_a;const jl=class jl extends Gt{constructor(t,n,s){super(t,...jl.propertyIds(n));A(this,"slots");A(this,"inFolder");A(this,"drawOrders");this.slots=n,this.drawOrders=new Array(t),this.inFolder=new Array(s);for(const r of n)this.inFolder[r]=!0;this.instant=!0}static propertyIds(t){const n=t.length,s=new Array(n);for(let r=0;r<n;r++)s[r]=`${jl.propertyID}|${t[r]}`;return s}getFrameCount(){return this.frames.length}getSlots(){return this.slots}getDrawOrders(){return this.drawOrders}setFrame(t,n,s){this.frames[t]=n,this.drawOrders[t]=s}apply(t,n,s,r,o,a,c,l,d){const u=d?t.drawOrder.appliedPose:t.drawOrder.pose,h=t.slots;if(l||s<this.frames[0])a!==Ge.current&&this.setup(u,h);else{const f=this.drawOrders[Gt.search(this.frames,s)];if(!f)this.setup(u,h);else{const p=this.inFolder,m=this.slots;for(let g=0,v=0,y=m.length;!(p[u[g].data.index]&&(u[g]=h[m[f[v]]],++v===y));g++);}}}setup(t,n){const{inFolder:s,slots:r}=this;for(let o=0,a=0,c=r.length;!(s[t[o].data.index]&&(t[o]=n[r[a]],++a===c));o++);}};A(jl,"propertyID",`${rt.drawOrderFolder}`);let Za=jl;function pX(i){return typeof i=="object"&&i!==null&&typeof i.constraintIndex=="number"}class MT extends ea{constructor(t,n,s){super(t,n,`${rt.ikConstraint}|${s}`);A(this,"constraintIndex",0);this.constraintIndex=s}getFrameEntries(){return 6}setFrame(t,n,s,r,o,a,c){t*=6,this.frames[t]=n,this.frames[t+1]=s,this.frames[t+2]=r,this.frames[t+3]=o,this.frames[t+4]=a?1:0,this.frames[t+5]=c?1:0}apply(t,n,s,r,o,a,c,l,d){const u=t.constraints[this.constraintIndex];if(!u.active)return;const h=d?u.appliedPose:u.pose,f=this.frames;if(s<f[0]){const b=u.data.setupPose;switch(a){case Ge.setup:{h.mix=b.mix,h.softness=b.softness,h.bendDirection=b.bendDirection,h.compress=b.compress,h.stretch=b.stretch;break}case Ge.first:{h.mix+=(b.mix-h.mix)*o,h.softness+=(b.softness-h.softness)*o,h.bendDirection=b.bendDirection,h.compress=b.compress,h.stretch=b.stretch;break}}return}let p=0,m=0;const g=Gt.search(f,s,6),v=this.curves[g/6];switch(v){case 0:{const b=f[g];p=f[g+1],m=f[g+2];const x=(s-b)/(f[g+6]-b);p+=(f[g+6+1]-p)*x,m+=(f[g+6+2]-m)*x;break}case 1:p=f[g+1],m=f[g+2];break;default:p=this.getBezierValue(s,g,1,v-2),m=this.getBezierValue(s,g,2,v+18-2)}const y=a===Ge.setup?u.data.setupPose:h;h.mix=y.mix+(p-y.mix)*o,h.softness=y.softness+(m-y.softness)*o,l?a===Ge.setup&&(h.bendDirection=y.bendDirection,h.compress=y.compress,h.stretch=y.stretch):(h.bendDirection=f[g+3],h.compress=f[g+4]!==0,h.stretch=f[g+5]!==0)}}class PT extends ea{constructor(t,n,s){super(t,n,`${rt.transformConstraint}|${s}`);A(this,"constraintIndex",0);this.constraintIndex=s,this.additive=!0}getFrameEntries(){return 7}setFrame(t,n,s,r,o,a,c,l){const d=this.frames;t*=7,d[t]=n,d[t+1]=s,d[t+2]=r,d[t+3]=o,d[t+4]=a,d[t+5]=c,d[t+6]=l}apply(t,n,s,r,o,a,c,l,d){const u=t.constraints[this.constraintIndex];if(!u.active)return;const h=d?u.appliedPose:u.pose,f=this.frames;if(s<f[0]){const S=u.data.setupPose;switch(a){case Ge.setup:{h.mixRotate=S.mixRotate,h.mixX=S.mixX,h.mixY=S.mixY,h.mixScaleX=S.mixScaleX,h.mixScaleY=S.mixScaleY,h.mixShearY=S.mixShearY;break}case Ge.first:{h.mixRotate+=(S.mixRotate-h.mixRotate)*o,h.mixX+=(S.mixX-h.mixX)*o,h.mixY+=(S.mixY-h.mixY)*o,h.mixScaleX+=(S.mixScaleX-h.mixScaleX)*o,h.mixScaleY+=(S.mixScaleY-h.mixScaleY)*o,h.mixShearY+=(S.mixShearY-h.mixShearY)*o;break}}return}let p,m,g,v,y,b;const x=Gt.search(f,s,7),T=this.curves[x/7];switch(T){case 0:{const S=f[x];p=f[x+1],m=f[x+2],g=f[x+3],v=f[x+4],y=f[x+5],b=f[x+6];const C=(s-S)/(f[x+7]-S);p+=(f[x+7+1]-p)*C,m+=(f[x+7+2]-m)*C,g+=(f[x+7+3]-g)*C,v+=(f[x+7+4]-v)*C,y+=(f[x+7+5]-y)*C,b+=(f[x+7+6]-b)*C;break}case 1:p=f[x+1],m=f[x+2],g=f[x+3],v=f[x+4],y=f[x+5],b=f[x+6];break;default:p=this.getBezierValue(s,x,1,T-2),m=this.getBezierValue(s,x,2,T+18-2),g=this.getBezierValue(s,x,3,T+36-2),v=this.getBezierValue(s,x,4,T+54-2),y=this.getBezierValue(s,x,5,T+72-2),b=this.getBezierValue(s,x,6,T+90-2)}const E=a===Ge.setup?u.data.setupPose:h;c?(h.mixRotate=E.mixRotate+p*o,h.mixX=E.mixX+m*o,h.mixY=E.mixY+g*o,h.mixScaleX=E.mixScaleX+v*o,h.mixScaleY=E.mixScaleY+y*o,h.mixShearY=E.mixShearY+b*o):(h.mixRotate=E.mixRotate+(p-E.mixRotate)*o,h.mixX=E.mixX+(m-E.mixX)*o,h.mixY=E.mixY+(g-E.mixY)*o,h.mixScaleX=E.mixScaleX+(v-E.mixScaleX)*o,h.mixScaleY=E.mixScaleY+(y-E.mixScaleY)*o,h.mixShearY=E.mixShearY+(b-E.mixShearY)*o)}}class Mc extends lr{constructor(t,n,s,r){super(t,n,`${r}|${s}`);A(this,"constraintIndex");this.constraintIndex=s}}class kT extends Mc{constructor(e,t,n){super(e,t,n,rt.pathConstraintPosition),this.additive=!0}apply(e,t,n,s,r,o,a,c,l){const d=e.constraints[this.constraintIndex];if(d.active){const u=l?d.appliedPose:d.pose;u.position=this.getAbsoluteValue(n,r,o,a,u.position,d.data.setupPose.position)}}}class IT extends Mc{constructor(e,t,n){super(e,t,n,rt.pathConstraintSpacing)}apply(e,t,n,s,r,o,a,c,l){const d=e.constraints[this.constraintIndex];if(d.active){const u=l?d.appliedPose:d.pose;u.spacing=this.getAbsoluteValue(n,r,o,!1,u.spacing,d.data.setupPose.spacing)}}}class RT extends ea{constructor(t,n,s){super(t,n,`${rt.pathConstraintMix}|${s}`);A(this,"constraintIndex");this.constraintIndex=s}getFrameEntries(){return 4}setFrame(t,n,s,r,o){const a=this.frames;t<<=2,a[t]=n,a[t+1]=s,a[t+2]=r,a[t+3]=o}apply(t,n,s,r,o,a,c,l,d){const u=t.constraints[this.constraintIndex];if(!u.active)return;const h=d?u.appliedPose:u.pose,f=this.frames;if(s<f[0]){const x=u.data.setupPose;switch(a){case Ge.setup:{h.mixRotate=x.mixRotate,h.mixX=x.mixX,h.mixY=x.mixY;break}case Ge.first:{h.mixRotate+=(x.mixRotate-h.mixRotate)*o,h.mixX+=(x.mixX-h.mixX)*o,h.mixY+=(x.mixY-h.mixY)*o;break}}return}let p,m,g;const v=Gt.search(f,s,4),y=this.curves[v>>2];switch(y){case 0:{const x=f[v];p=f[v+1],m=f[v+2],g=f[v+3];const T=(s-x)/(f[v+4]-x);p+=(f[v+4+1]-p)*T,m+=(f[v+4+2]-m)*T,g+=(f[v+4+3]-g)*T;break}case 1:p=f[v+1],m=f[v+2],g=f[v+3];break;default:p=this.getBezierValue(s,v,1,y-2),m=this.getBezierValue(s,v,2,y+18-2),g=this.getBezierValue(s,v,3,y+36-2)}const b=a===Ge.setup?u.data.setupPose:h;c?(h.mixRotate=b.mixRotate+p*o,h.mixX=b.mixX+m*o,h.mixY=b.mixY+g*o):(h.mixRotate=b.mixRotate+(p-b.mixRotate)*o,h.mixX=b.mixX+(m-b.mixX)*o,h.mixY=b.mixY+(g-b.mixY)*o)}}class uo extends Mc{constructor(e,t,n,s){super(e,t,n,s)}apply(e,t,n,s,r,o,a,c,l){if(a&&!this.additive&&(a=!1),this.constraintIndex===-1){const d=n>=this.frames[0]?this.getCurveValue(n):0,u=e.physics;for(const h of u)if(h.active&&this.global(h.data)){const f=l?h.appliedPose:h.pose;this.set(f,this.getAbsoluteValue(n,r,o,a,this.get(f),this.get(h.data.setupPose),d))}}else{const d=e.constraints[this.constraintIndex];if(d.active){const u=l?d.appliedPose:d.pose;this.set(u,this.getAbsoluteValue(n,r,o,a,this.get(u),this.get(d.data.setupPose)))}}}}class FT extends uo{constructor(e,t,n){super(e,t,n,rt.physicsConstraintInertia)}get(e){return e.inertia}set(e,t){e.inertia=t}global(e){return e.inertiaGlobal}}class LT extends uo{constructor(e,t,n){super(e,t,n,rt.physicsConstraintStrength)}get(e){return e.strength}set(e,t){e.strength=t}global(e){return e.strengthGlobal}}class DT extends uo{constructor(e,t,n){super(e,t,n,rt.physicsConstraintDamping)}get(e){return e.damping}set(e,t){e.damping=t}global(e){return e.dampingGlobal}}class OT extends uo{constructor(e,t,n){super(e,t,n,rt.physicsConstraintMass)}get(e){return 1/e.massInverse}set(e,t){e.massInverse=1/t}global(e){return e.massGlobal}}class NT extends uo{constructor(e,t,n){super(e,t,n,rt.physicsConstraintWind),this.additive=!0}get(e){return e.wind}set(e,t){e.wind=t}global(e){return e.windGlobal}}class $T extends uo{constructor(e,t,n){super(e,t,n,rt.physicsConstraintGravity),this.additive=!0}get(e){return e.gravity}set(e,t){e.gravity=t}global(e){return e.gravityGlobal}}class BT extends uo{constructor(e,t,n){super(e,t,n,rt.physicsConstraintMix)}get(e){return e.mix}set(e,t){e.mix=t}global(e){return e.mixGlobal}}const Vu=class Vu extends Gt{constructor(t,n){super(t,...Vu.propertyIds);A(this,"constraintIndex");this.constraintIndex=n,this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,n){this.frames[t]=n}apply(t,n,s,r,o,a,c,l,d){let u;if(this.constraintIndex!==-1&&(u=t.constraints[this.constraintIndex],!u.active))return;const h=this.frames;if(n>s)this.apply(t,n,Number.MAX_VALUE,[],o,a,!1,!1,!1),n=-1;else if(n>=h[h.length-1])return;if(!(s<h[0])&&(n<h[0]||s>=h[Gt.search(h,n)+1]))if(u!=null)u.reset(t);else for(const f of t.physics)f.active&&f.reset(t)}};A(Vu,"propertyIds",[rt.physicsConstraintReset.toString()]);let Du=Vu;class UT extends Mc{constructor(e,t,n){super(e,t,n,rt.sliderTime)}apply(e,t,n,s,r,o,a,c,l){const d=e.constraints[this.constraintIndex];if(d.active){const u=l?d.appliedPose:d.pose;u.time=this.getAbsoluteValue(n,r,o,a,u.time,d.data.setupPose.time)}}}class VT extends Mc{constructor(e,t,n){super(e,t,n,rt.sliderMix),this.additive=!0}apply(e,t,n,s,r,o,a,c,l){const d=e.constraints[this.constraintIndex];if(d.active){const u=l?d.appliedPose:d.pose;u.mix=this.getAbsoluteValue(n,r,o,a,u.mix,d.data.setupPose.mix)}}}const Hl=class Hl{constructor(e){A(this,"data");A(this,"tracks",[]);A(this,"timeScale",1);A(this,"unkeyedState",0);A(this,"events",[]);A(this,"listeners",[]);A(this,"queue",new gX(this));A(this,"propertyIds",new Map);A(this,"animationsChanged",!1);A(this,"trackEntryPool",new lX(()=>new mX));this.data=e}update(e){e*=this.timeScale;const t=this.tracks;for(let n=0,s=t.length;n<s;n++){const r=t[n];if(!r)continue;r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;let o=e*r.timeScale;if(r.delay>0){if(r.delay-=o,r.delay>0)continue;o=-r.delay,r.delay=0}let a=r.next;if(a){const c=r.trackLast-a.delay;if(c>=0){for(a.delay=0,a.trackTime+=r.timeScale===0?0:(c/r.timeScale+e)*a.timeScale,r.trackTime+=o,this.setTrack(n,a,!0);a.mixingFrom;)a.mixTime+=e,a=a.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){t[n]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,e)){let c=r.mixingFrom;for(r.mixingFrom=null,c&&(c.mixingTo=null);c;)this.queue.end(c),c=c.mixingFrom}r.trackTime+=o}this.queue.drain()}updateMixingFrom(e,t){const n=e.mixingFrom;if(!n)return!0;const s=this.updateMixingFrom(n,t);if(n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.nextTrackLast!==-1&&e.mixTime>=e.mixDuration){if(n.totalAlpha===0||e.mixDuration===0){if(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),n.totalAlpha===0)for(let r=e;r.mixingTo!=null;r=r.mixingTo)r.keepHold=!0;this.queue.end(n)}return s}return n.trackTime+=t*n.timeScale,e.mixTime+=t,!1}apply(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const t=this.events,n=this.tracks;let s=!1;for(let a=0,c=n.length;a<c;a++){const l=n[a];if(!l||l.delay>0)continue;s=!0;let d=l.alpha;l.mixingFrom?d*=this.applyMixingFrom(l,e):l.trackTime>=l.trackEnd&&!l.next&&(d=0);let u=l.animationLast,h=l.getAnimationTime(),f=h,p=t;l.reverse&&(f=l.animation.duration-f,p=null);const m=l.animation.timelines,g=m.length;if(a===0&&d===1)for(let v=0;v<g;v++){Ze.webkit602BugfixHelper(d);const y=m[v];y instanceof Yl?this.applyAttachmentTimeline(y,e,f,Ge.setup,!0):y.apply(e,u,f,p,d,Ge.setup,!1,!1,!1)}else{const v=l.timelineMode,y=d>=l.alphaAttachmentThreshold,b=l.additive,x=b||l.shortestRotation,T=!x&&l.timelinesRotation.length!==g<<1;T&&(l.timelinesRotation.length=g<<1);for(let E=0;E<g;E++){const S=m[E],C=v[E]&$x;!x&&S instanceof Fu?this.applyRotateTimeline(S,e,f,d,C,l.timelinesRotation,E<<1,T):S instanceof Yl?this.applyAttachmentTimeline(S,e,f,C,y):(Ze.webkit602BugfixHelper(d),S.apply(e,u,f,p,d,C,b,!1,!1))}}l.reverse&&this.eventsReverse(l,u,h),this.queueEvents(l,h),t.length=0,l.nextAnimationLast=h,l.nextTrackLast=l.trackTime}const r=this.unkeyedState+Bx,o=e.slots;for(let a=0,c=e.slots.length;a<c;a++){const l=o[a];if(l.attachmentState===r){const d=l.data.attachmentName;l.pose.setAttachment(d?e.getAttachment(l.data.index,d):null)}}return this.unkeyedState+=2,this.queue.drain(),s}applyMixingFrom(e,t){const n=e.mixingFrom,s=n.mixingFrom!==null?this.applyMixingFrom(n,t):1,r=e.mix(),o=n.alpha*s,a=1-r*e.alpha,c=o*(1-r),l=a>0?c/a:o,d=n.animation.timelines,u=d.length,h=n.timelineMode,f=n.timelineHoldMix,p=r<n.mixAttachmentThreshold,m=r<n.mixDrawOrderThreshold,g=n.additive,v=g||n.shortestRotation,y=!v&&n.timelinesRotation.length!==u<<1;y&&(n.timelinesRotation.length=u<<1);const b=n.timelinesRotation;let x=n.animationLast,T=n.getAnimationTime(),E=T,S=null;n.reverse?E=n.animation.duration-E:r<n.eventThreshold&&(S=this.events),n.totalAlpha=0;for(let C=0;C<u;C++){const M=d[C],k=h[C],P=k&$x;let I=0;if((k&Cd)!==0){const D=f[C];I=D==null?l:l*(1-D.mix())}else{if(!m&&M instanceof eo&&P===Ge.current)continue;I=c}if(n.totalAlpha+=I,!v&&M instanceof Fu)this.applyRotateTimeline(M,t,E,I,P,b,C<<1,y);else if(M instanceof Yl)this.applyAttachmentTimeline(M,t,E,P,p&&I>=n.alphaAttachmentThreshold);else{const D=!m||!(M instanceof eo)||P===Ge.current;M.apply(t,x,E,S,I,P,g,D,!1)}}return n.reverse&&r<n.eventThreshold&&this.eventsReverse(n,x,T),e.mixDuration>0&&this.queueEvents(n,T),this.events.length=0,n.nextAnimationLast=T,n.nextTrackLast=n.trackTime,r}applyAttachmentTimeline(e,t,n,s,r){const o=t.slots[e.slotIndex];if(!o.bone.active||!r&&o.attachmentState===this.unkeyedState+Ux)return;let a=n<e.frames[0],c=null;if(a||(c=e.attachmentNames[Gt.search(e.frames,n)],a=!r&&c==null),a){if(s===Ge.current)return;c=o.data.attachmentName}o.pose.setAttachment(c==null?null:t.getAttachment(o.data.index,c)),r?o.attachmentState=this.unkeyedState+Ux:a||(o.attachmentState=this.unkeyedState+Bx)}applyRotateTimeline(e,t,n,s,r,o,a,c){if(c&&(o[a]=0),s===1){e.apply(t,0,n,null,1,r,!1,!1,!1);return}const l=t.bones[e.boneIndex];if(!l.active)return;const d=l.pose,u=l.data.setupPose,h=e.frames;let f,p;if(n<h[0]){switch(r){case Ge.setup:{d.rotation=u.rotation;return}case Ge.current:return}f=d.rotation,p=u.rotation}else f=r===Ge.setup?u.rotation:d.rotation,p=u.rotation+e.getCurveValue(n);let m=0,g=p-f;if(g-=Math.ceil(g/360-.5)*360,g===0)m=o[a];else{let v=0,y=0;c?(v=0,y=g):(v=o[a],y=o[a+1]);const b=v-v%360;m=g+b;let x=g>=0,T=v>=0;Math.abs(y)<=90&&Le.signum(y)!==Le.signum(g)&&(Math.abs(v-b)>180?(m+=360*Le.signum(v),T=x):b!==0?m-=360*Le.signum(v):T=x),T!==x&&(m+=360*Le.signum(v)),o[a]=m}o[a+1]=g,d.rotation=f+m*s}queueEvents(e,t){const n=e.animationStart,s=e.animationEnd,r=s-n,o=e.reverse;let a=e.trackLast%r;o&&(a=r-a);const c=this.events;let l=0,d=c.length;for(;l<d;l++){const h=c[l];if(h.time<a!==o)break;h.time>=n&&h.time<=s&&this.queue.event(e,h)}let u=!1;if(e.loop)if(r===0)u=!0;else{const h=Math.floor(e.trackTime/r);u=h>0&&h>Math.floor(e.trackLast/r)}else u=t>=s&&e.animationLast<s;for(u&&this.queue.complete(e);l<d;l++){const h=c[l];h.time>=n&&h.time<=s&&this.queue.event(e,h)}}eventsReverse(e,t,n){const s=e.animation.duration,r=s-t,o=s-n,a=e.animation.timelines;for(let c=0,l=e.animation.timelines.length;c<l;c++){const d=a[c];if(!(d instanceof vc))continue;const u=d.events,h=d.frames,f=h.length;if(r>=o){for(let p=0;p<f;p++)if(!(h[p]<o)){if(h[p]>=r)break;this.events.push(u[p])}}else{for(let m=0;m<f&&!(h[m]>=r);m++)this.events.push(u[m]);let p=0;for(;p<f&&!(h[p]>=o);p++);for(;p<f;p++)this.events.push(u[p])}}}clearTracks(){const e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let t=0,n=this.tracks.length;t<n;t++)this.clearTrack(t);this.tracks.length=0,this.queue.drainDisabled=e,this.queue.drain()}clearTrack(e){if(e<0)throw new Error("trackIndex must be >= 0.");if(e>=this.tracks.length)return;const t=this.tracks[e];if(!t)return;this.queue.end(t),this.clearNext(t);let n=t;for(;;){const s=n.mixingFrom;if(!s)break;this.queue.end(s),n.mixingFrom=null,n.mixingTo=null,n=s}this.tracks[t.trackIndex]=null,this.queue.drain()}setTrack(e,t,n){const s=this.expandToIndex(e);this.tracks[e]=t,t.previous=null,s&&(s.next=null,n&&this.queue.interrupt(s),t.mixingFrom=s,s.mixingTo=t,t.mixTime=0,s.timelinesRotation.length=0),this.queue.start(t)}setAnimation(e,t,n=!1){return typeof t=="string"?this.setAnimation1(e,t,n):this.setAnimation2(e,t,n)}setAnimation1(e,t,n=!1){const s=this.data.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);return this.setAnimation2(e,s,n)}setAnimation2(e,t,n=!1){if(e<0)throw new Error("trackIndex must be >= 0.");if(!t)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(e);r&&(r.nextTrackLast===-1&&r.animation===t?(this.tracks[e]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));const o=this.trackEntry(e,t,n,r);return this.setTrack(e,o,s),this.queue.drain(),o}addAnimation(e,t,n=!1,s=0){return typeof t=="string"?this.addAnimation1(e,t,n,s):this.addAnimation2(e,t,n,s)}addAnimation1(e,t,n=!1,s=0){const r=this.data.skeletonData.findAnimation(t);if(!r)throw new Error(`Animation not found: ${t}`);return this.addAnimation2(e,r,n,s)}addAnimation2(e,t,n=!1,s=0){if(e<0)throw new Error("trackIndex must be >= 0.");if(!t)throw new Error("animation cannot be null.");let r=this.expandToIndex(e);if(r)for(;r.next;)r=r.next;const o=this.trackEntry(e,t,n,r);return r?(r.next=o,o.previous=r,s<=0&&(s=Math.max(s+r.getTrackComplete()-o.mixDuration,0))):(this.setTrack(e,o,!0),this.queue.drain(),s<0&&(s=0)),o.delay=s,o}setEmptyAnimation(e,t=0){const n=this.setAnimation(e,Hl.emptyAnimation,!1);return n.mixDuration=t,n.trackEnd=t,n}addEmptyAnimation(e,t=0,n=0){const s=this.addAnimation(e,Hl.emptyAnimation,!1,n);return n<=0&&(s.delay=Math.max(s.delay+s.mixDuration-t,0)),s.mixDuration=t,s.trackEnd=t,s}setEmptyAnimations(e=0){const t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let n=0,s=this.tracks.length;n<s;n++){const r=this.tracks[n];r&&this.setEmptyAnimation(r.trackIndex,e)}this.queue.drainDisabled=t,this.queue.drain()}expandToIndex(e){return e<this.tracks.length?this.tracks[e]:(Ze.ensureArrayCapacity(this.tracks,e+1,null),this.tracks.length=e+1,null)}trackEntry(e,t,n,s){const r=this.trackEntryPool.obtain();return r.reset(),r.trackIndex=e,r.animation=t,r.loop=n,r.additive=!1,r.reverse=!1,r.shortestRotation=!1,r.eventThreshold=0,r.alphaAttachmentThreshold=0,r.mixAttachmentThreshold=0,r.mixDrawOrderThreshold=0,r.animationStart=0,r.animationEnd=t.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.mixTime=0,r.mixDuration=s?this.data.getMix(s.animation,t):0,r.totalAlpha=0,r.keepHold=!1,r}clearNext(e){let t=e.next;for(;t;)this.queue.dispose(t),t=t.next;e.next=null}_animationsChanged(){this.animationsChanged=!1;const e=this.tracks;for(let t=0,n=e.length;t<n;t++){const s=e[t];if(!s)continue;let r=s;for(;r.mixingFrom;)r=r.mixingFrom;do this.computeHold(r,s),r=r.mixingTo;while(r)}this.propertyIds.clear()}computeHold(e,t){var d,u;const n=e.animation.timelines,s=e.animation.timelines.length,r=e.timelineMode;r.length=s;const o=e.timelineHoldMix;o.length=0;const a=e.additive,c=e.keepHold,l=e.mixingTo;for(let h=0;h<s;h++){const f=n[h],p=f.propertyIds,m=this.from(t,f,p);if(a&&f.additive){r[h]=m;continue}let g;if(l===null||f.instant||l.additive&&f.additive||!((d=l.animation)!=null&&d.hasTimeline(p)))g=m;else{g=m|Cd;for(let v=l.mixingTo;v!=null;v=v.mixingTo)if(v.additive&&f.additive||!((u=v.animation)!=null&&u.hasTimeline(p))){v.mixDuration>0&&(o[h]=v);break}}c&&(g=g&~Cd|r[h]&Cd),r[h]=g}}from(e,t,n){const s=this.propertyIds;let r=vX;for(let o=0,a=n.length;o<a;o++){const c=s.get(n[o]);if(c===void 0)s.set(n[o],e);else{if(c!==e){for(;++o<a;)s.has(n[o])||s.set(n[o],e);return Ox}r=Nx}}if(t instanceof Za){const o=s.get(eo.propertyID);if(o!=null)return o!==e?Ox:Nx}return r}getTrack(e){if(e<0)throw new Error("trackIndex must be >= 0.");return e>=this.tracks.length?null:this.tracks[e]}addListener(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)}removeListener(e){const t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}};A(Hl,"emptyAnimation",new uv("<empty>",[],0));let Dx=Hl;class mX{constructor(){A(this,"animation",null);A(this,"previous",null);A(this,"next",null);A(this,"mixingFrom",null);A(this,"mixingTo",null);A(this,"listener",null);A(this,"trackIndex",0);A(this,"loop",!1);A(this,"additive",!1);A(this,"reverse",!1);A(this,"shortestRotation",!1);A(this,"keepHold",!1);A(this,"eventThreshold",0);A(this,"mixAttachmentThreshold",0);A(this,"alphaAttachmentThreshold",0);A(this,"mixDrawOrderThreshold",0);A(this,"animationStart",0);A(this,"animationEnd",0);A(this,"animationLast",0);A(this,"nextAnimationLast",0);A(this,"delay",0);A(this,"trackTime",0);A(this,"trackLast",0);A(this,"nextTrackLast",0);A(this,"trackEnd",0);A(this,"timeScale",0);A(this,"alpha",0);A(this,"mixTime",0);A(this,"mixDuration",0);A(this,"totalAlpha",0);A(this,"mixInterpolation",Va.linear);A(this,"timelineMode",[]);A(this,"timelineHoldMix",[]);A(this,"timelinesRotation",[])}setMixDuration(e,t){this.mixDuration=e,t!==void 0&&(t<=0&&(t=this.previous==null?0:Math.max(t+this.previous.getTrackComplete()-e,0)),this.delay=t)}setMixInterpolation(e){if(!e)throw new Error("mixInterpolation cannot be null.");this.mixInterpolation=e}mix(){if(this.mixDuration===0)return 1;let e=this.mixTime/this.mixDuration;return e>=1?1:this.mixInterpolation===Va.linear?e:(e=this.mixInterpolation.apply(e),e<0?0:e>1?1:e)}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.mixInterpolation=Va.linear,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(!this.loop)return Math.min(this.trackTime+this.animationStart,this.animationEnd);const e=this.animationEnd-this.animationStart;return e===0?this.animationStart:this.trackTime%e+this.animationStart}setAnimationLast(e){this.animationLast=e,this.nextAnimationLast=e}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){const e=this.animationEnd-this.animationStart;if(e!==0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime<e)return e}return this.trackTime}wasApplied(){return this.nextTrackLast!==-1}isNextReady(){return this.next!=null&&this.nextTrackLast-this.next.delay>=0}}class gX{constructor(e){A(this,"objects",[]);A(this,"drainDisabled",!1);A(this,"animState");this.animState=e}start(e){this.objects.push(ui.start),this.objects.push(e),this.animState.animationsChanged=!0}interrupt(e){this.objects.push(ui.interrupt),this.objects.push(e)}end(e){this.objects.push(ui.end),this.objects.push(e),this.animState.animationsChanged=!0}dispose(e){this.objects.push(ui.dispose),this.objects.push(e)}complete(e){this.objects.push(ui.complete),this.objects.push(e)}event(e,t){this.objects.push(ui.event),this.objects.push(e),this.objects.push(t)}drain(){var e,t,n,s,r,o;if(!this.drainDisabled){this.drainDisabled=!0;for(let a=0;a<this.objects.length;a+=2){const c=this.objects,l=c[a],d=c[a+1],u=this.animState.listeners.slice();switch(l){case ui.start:(e=d.listener)!=null&&e.start&&d.listener.start(d);for(let h=0;h<u.length;h++){const f=u[h];f.start&&f.start(d)}break;case ui.interrupt:(t=d.listener)!=null&&t.interrupt&&d.listener.interrupt(d);for(let h=0;h<u.length;h++){const f=u[h];f.interrupt&&f.interrupt(d)}break;case ui.end:(n=d.listener)!=null&&n.end&&d.listener.end(d);for(let h=0;h<u.length;h++){const f=u[h];f.end&&f.end(d)}case ui.dispose:(s=d.listener)!=null&&s.dispose&&d.listener.dispose(d);for(let h=0;h<u.length;h++){const f=u[h];f.dispose&&f.dispose(d)}this.animState.trackEntryPool.free(d);break;case ui.complete:(r=d.listener)!=null&&r.complete&&d.listener.complete(d);for(let h=0;h<u.length;h++){const f=u[h];f.complete&&f.complete(d)}break;case ui.event:{const h=c[a+++2];(o=d.listener)!=null&&o.event&&d.listener.event(d,h);for(let f=0;f<u.length;f++){const p=u[f];p.event&&p.event(d,h)}break}}}this.clear(),this.drainDisabled=!1}}clear(){this.objects.length=0}}var ui;(function(i){i[i.start=0]="start",i[i.interrupt=1]="interrupt",i[i.end=2]="end",i[i.dispose=3]="dispose",i[i.complete=4]="complete",i[i.event=5]="event"})(ui||(ui={}));class pte{start(e){}interrupt(e){}end(e){}dispose(e){}complete(e){}event(e,t){}}const Ox=0,vX=1,Nx=2,$x=3,Cd=4,Bx=1,Ux=2;class fv extends Sr{constructor(t){super(t);A(this,"color",new at(1,1,1,1))}copy(){const t=new fv(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}}class Th extends Sr{constructor(t){super(t);A(this,"endSlot",null);A(this,"convex",!1);A(this,"inverse",!1);A(this,"color",new at(.2275,.2275,.8078,1))}copy(){const t=new Th(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.convex=this.convex,t.inverse=this.inverse,t.color.setFromColor(this.color),t}}class bc extends Sr{constructor(t){super(t);A(this,"lengths",[]);A(this,"closed",!1);A(this,"constantSpeed",!1);A(this,"color",new at(1,1,1,1))}copy(){const t=new bc(this.name);return this.copyTo(t),t.lengths=[],Ze.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=this.closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t}}class pv extends Sr{constructor(t){super(t);A(this,"x",0);A(this,"y",0);A(this,"rotation",0);A(this,"color",new at(.38,.94,0,1))}computeWorldPosition(t,n){return n.x=this.x*t.a+this.y*t.b+t.worldX,n.y=this.x*t.c+this.y*t.d+t.worldY,n}computeWorldRotation(t){const n=this.rotation*Le.degRad,s=Math.cos(n),r=Math.sin(n),o=s*t.a+r*t.b,a=s*t.c+r*t.d;return Le.atan2Deg(a,o)}copy(){const t=new pv(this.name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t}}class mv{constructor(e,t){A(this,"name");A(this,"setupPose");A(this,"skinRequired",!1);if(e==null)throw new Error("name cannot be null.");this.name=e,this.setupPose=t}}class Eh extends mv{constructor(t,n,s){super(n,new Jm);A(this,"index",0);A(this,"parent",null);A(this,"length",0);A(this,"color",new at);A(this,"icon");A(this,"iconSize",1);A(this,"iconRotation",0);A(this,"visible",!1);if(t<0)throw new Error("index must be >= 0.");if(!n)throw new Error("name cannot be null.");this.index=t,this.parent=s}copy(t){const n=new Eh(this.index,this.name,t);return n.length=this.length,n.setupPose.set(this.setupPose),n}}var an;(function(i){i[i.Normal=0]="Normal",i[i.OnlyTranslation=1]="OnlyTranslation",i[i.NoRotationOrReflection=2]="NoRotationOrReflection",i[i.NoScale=3]="NoScale",i[i.NoScaleOrReflection=4]="NoScaleOrReflection"})(an||(an={}));class Jm{constructor(){A(this,"bone");A(this,"x",0);A(this,"y",0);A(this,"rotation",0);A(this,"scaleX",0);A(this,"scaleY",0);A(this,"shearX",0);A(this,"shearY",0);A(this,"inherit",an.Normal);A(this,"a",0);A(this,"b",0);A(this,"c",0);A(this,"d",0);A(this,"worldY",0);A(this,"worldX",0);A(this,"world",0);A(this,"local",0)}set(e){if(e==null)throw new Error("pose cannot be null.");this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY,this.inherit=e.inherit}setPosition(e,t){this.x=e,this.y=t}setScale(e,t){this.scaleX=e,this.scaleY=t===void 0?e:t}getInherit(){return this.inherit}setInherit(e){if(e==null)throw new Error("inherit cannot be null.");this.inherit=e}update(e,t){this.world!==e._update&&this.updateWorldTransform(e)}updateWorldTransform(e){this.local===e._update?this.updateLocalTransform(e):this.world=e._update;const t=this.rotation,n=this.scaleX,s=this.scaleY,r=this.shearX,o=this.shearY;if(!this.bone.parent){const h=e.scaleX,f=e.scaleY,p=(t+r)*Le.degRad,m=(t+90+o)*Le.degRad;this.a=Math.cos(p)*n*h,this.b=Math.cos(m)*s*h,this.c=Math.sin(p)*n*f,this.d=Math.sin(m)*s*f,this.worldX=this.x*h+e.x,this.worldY=this.y*f+e.y;return}const a=this.bone.parent.appliedPose;let c=a.a,l=a.b,d=a.c,u=a.d;switch(this.worldX=c*this.x+l*this.y+a.worldX,this.worldY=d*this.x+u*this.y+a.worldY,this.inherit){case an.Normal:{const h=(t+r)*Le.degRad,f=(t+90+o)*Le.degRad,p=Math.cos(h)*n,m=Math.cos(f)*s,g=Math.sin(h)*n,v=Math.sin(f)*s;this.a=c*p+l*g,this.b=c*m+l*v,this.c=d*p+u*g,this.d=d*m+u*v;return}case an.OnlyTranslation:{const h=e.scaleX,f=e.scaleY,p=(t+r)*Le.degRad,m=(t+90+o)*Le.degRad;this.a=Math.cos(p)*n*h,this.b=Math.cos(m)*s*h,this.c=Math.sin(p)*n*f,this.d=Math.sin(m)*s*f;break}case an.NoRotationOrReflection:{const h=e.scaleX,f=e.scaleY,p=1/h,m=1/f;c*=p,d*=m;let g=c*c+d*d,v=0;g>Le.epsilon2?(g=Math.abs(c*u*m-l*p*d)/g,l=d*g,u=c*g,v=t-Le.atan2Deg(d,c)):(c=0,d=0,v=t-90+Le.atan2Deg(u,l));const y=(v+r)*Le.degRad,b=(v+o+90)*Le.degRad,x=Math.cos(y)*n,T=Math.cos(b)*s,E=Math.sin(y)*n,S=Math.sin(b)*s;this.a=(c*x-l*E)*h,this.b=(c*T-l*S)*h,this.c=(d*x+u*E)*f,this.d=(d*T+u*S)*f;break}case an.NoScale:case an.NoScaleOrReflection:{const h=e.scaleX,f=e.scaleY,p=1/h,m=1/f,g=t*Le.degRad,v=Math.cos(g),y=Math.sin(g);let b=(c*v+l*y)*p,x=(d*v+u*y)*m;const T=1/Math.sqrt(b*b+x*x);b*=T,x*=T;let E=-x,S=b;this.inherit===an.NoScale&&c*u-l*d<0!=(h<0!=f<0)&&(E=-E,S=-S);const C=r*Le.degRad,M=(90+o)*Le.degRad,k=Math.cos(C)*n,P=Math.cos(M)*s,I=Math.sin(C)*n,D=Math.sin(M)*s;this.a=(b*k+E*I)*h,this.b=(b*P+E*D)*h,this.c=(x*k+S*I)*f,this.d=(x*P+S*D)*f;break}}}updateLocalTransform(e){this.local=0,this.world=e._update;const t=e.scaleX,n=e.scaleY;if(!this.bone.parent){const v=1/t,y=1/n;this.x=(this.worldX-e.x)*v,this.y=(this.worldY-e.y)*y,this.set5(this.a*v,this.b*v,this.c*y,this.d*y,0);return}const s=this.bone.parent.appliedPose;let r=s.a,o=s.b,a=s.c,c=s.d;const l=r*c-o*a,d=1/(r*c-o*a),u=c*d,h=o*d,f=a*d,p=r*d,m=this.worldX-s.worldX,g=this.worldY-s.worldY;switch(this.x=m*u-g*h,this.y=g*p-m*f,this.inherit){case an.Normal:this.set5(u*this.a-h*this.c,u*this.b-h*this.d,p*this.c-f*this.a,p*this.d-f*this.b,0);break;case an.OnlyTranslation:{const v=1/t,y=1/n;this.set5(this.a*v,this.b*v,this.c*y,this.d*y,0);break}case an.NoRotationOrReflection:{const v=1/t,y=1/n;r*=v,a*=y;const b=this.a*v,x=this.b*v,T=this.c*y,E=this.d*y,S=1/(r*r+a*a),C=1/Math.abs(l*v*y);this.set5((r*b+a*T)*S,(r*x+a*E)*S,(r*T-a*b)*C,(r*E-a*x)*C,Le.atan2Deg(a,r));break}case an.NoScale:case an.NoScaleOrReflection:{const v=1/t,y=1/n,b=this.a*v,x=this.b*v,T=this.c*y,E=this.d*y;let S=c*this.a-o*this.c,C=r*this.c-a*this.a;l<0&&(S=-S,C=-C);let M=Le.atan2Deg(C,S);this.rotation=M,M*=Le.degRad;const k=Math.cos(M),P=Math.sin(M);let I=(r*k+o*P)*v,D=(a*k+c*P)*y;const $=1/Math.sqrt(I*I+D*D);I*=$,D*=$;const j=this.inherit===an.NoScale&&l<0!=(t<0!=n<0)?-1:1;this.set4(I*b+D*T,I*x+D*E,(I*T-D*b)*j,(I*E-D*x)*j)}}}set4(e,t,n,s){const r=e*e+n*n,o=t*t+s*s;r>Le.epsilon2?(this.shearX=Le.atan2Deg(n,e),this.scaleX=Math.sqrt(r)):(this.shearX=0,this.scaleX=0),this.scaleY=Math.sqrt(o),o>Le.epsilon2?(this.shearY=Le.atan2Deg(s,t),e*s-t*n<0?(this.scaleY=-this.scaleY,this.shearY+=90):this.shearY-=90,this.shearY>180?this.shearY-=360:this.shearY<=-180&&(this.shearY+=360)):this.shearY=0}set5(e,t,n,s,r){this.shearX=0;const o=e*e+n*n,a=t*t+s*s;if(o>Le.epsilon2){const c=Le.atan2Deg(n,e);this.rotation=c+r,this.scaleX=Math.sqrt(o),this.scaleY=Math.sqrt(a),a>Le.epsilon2?(this.shearY=Le.atan2Deg(s,t),e*s-t*n<0?(this.scaleY=-this.scaleY,this.shearY+=90-c):this.shearY-=90+c,this.shearY>180?this.shearY-=360:this.shearY<=-180&&(this.shearY+=360)):this.shearY=0}else this.scaleX=0,this.scaleY=Math.sqrt(a),this.shearY=0,this.rotation=a>Le.epsilon2?Le.atan2Deg(s,t)-90+r:r}validateLocalTransform(e){this.local===e._update&&this.updateLocalTransform(e)}modifyLocal(e){this.local===e._update&&this.updateLocalTransform(e),this.world=0,this.resetWorld(e,e._update)}modifyWorld(e){const t=e._update;this.local=t,this.world=t,this.resetWorld(e,t)}resetWorld(e,t){const n=this.bone.children;for(let s=0,r=n.length;s<r;s++){const o=n[s].appliedPose;o.world===t&&(o.local===t&&o.updateLocalTransform(e),o.world=0,o.resetWorld(e,t))}}getWorldRotationX(){return Le.atan2Deg(this.c,this.a)}getWorldRotationY(){return Le.atan2Deg(this.d,this.b)}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}worldToLocal(e){if(e==null)throw new Error("world cannot be null.");const t=this.a*this.d-this.b*this.c,n=e.x-this.worldX,s=e.y-this.worldY;return e.x=(n*this.d-s*this.b)/t,e.y=(s*this.a-n*this.c)/t,e}localToWorld(e){if(e==null)throw new Error("local cannot be null.");const t=e.x,n=e.y;return e.x=t*this.a+n*this.b+this.worldX,e.y=t*this.c+n*this.d+this.worldY,e}worldToParent(e){if(e==null)throw new Error("world cannot be null.");return this.bone.parent==null?e:this.bone.parent.appliedPose.worldToLocal(e)}parentToWorld(e){if(e==null)throw new Error("world cannot be null.");return this.bone.parent==null?e:this.bone.parent.appliedPose.localToWorld(e)}worldToLocalRotation(e){e*=Le.degRad;const t=Math.sin(e),n=Math.cos(e);return Le.atan2Deg(this.a*t-this.c*n,this.d*n-this.b*t)+this.rotation-this.shearX}localToWorldRotation(e){e=(e-this.rotation-this.shearX)*Le.degRad;const t=Math.sin(e),n=Math.cos(e);return Le.atan2Deg(n*this.c+t*this.d,n*this.a+t*this.b)}rotateWorld(e){e*=Le.degRad;const t=Math.sin(e),n=Math.cos(e),s=this.a,r=this.b;this.a=n*s-t*this.c,this.b=n*r-t*this.d,this.c=t*s+n*this.c,this.d=t*r+n*this.d}}class XT{constructor(e,t,n){A(this,"data");A(this,"pose");A(this,"constrainedPose");A(this,"appliedPose");if(e==null)throw new Error("data cannot be null.");this.data=e,this.pose=t,this.constrainedPose=n,this.appliedPose=t}setupPose(){this.pose.set(this.data.setupPose)}getData(){return this.data}getPose(){return this.pose}getAppliedPose(){return this.appliedPose}unconstrained(){this.appliedPose=this.pose}constrained(){this.appliedPose=this.constrainedPose}resetConstrained(){this.constrainedPose.set(this.pose)}}class YT extends XT{constructor(t,n,s){super(t,n,s);A(this,"active",!1);this.setupPose()}isActive(){return this.active}}class zl extends YT{constructor(t,n){super(t,new Jm,new Jm);A(this,"parent",null);A(this,"children",[]);A(this,"sorted",!1);this.parent=n,this.appliedPose.bone=this,this.constrainedPose.bone=this}copy(t){const n=new zl(this.data,t);return n.pose.set(this.pose),n}}class Pc extends YT{constructor(e,t,n){super(e,t,n)}isSourceActive(){return!0}}class bX{constructor(e){A(this,"_setupPose");A(this,"pose");A(this,"constrainedPose");A(this,"appliedPose");this._setupPose=e,this.pose=[...e],this.constrainedPose=[],this.appliedPose=this.pose}setupPose(){this.pose.length=this._setupPose.length,Ze.arrayCopy(this._setupPose,0,this.pose,0,this._setupPose.length)}unconstrained(){this.appliedPose=this.pose}constrained(){this.appliedPose=this.constrainedPose}resetConstrained(){this.constrainedPose.length=this.pose.length,Ze.arrayCopy(this.pose,0,this.constrainedPose,0,this.pose.length)}}class kc extends mv{constructor(e,t){super(e,t)}}var ri;(function(i){i[i.None=0]="None",i[i.Uniform=1]="Uniform",i[i.Volume=2]="Volume"})(ri||(ri={}));let gv=class{constructor(e,t){A(this,"time",0);A(this,"data");A(this,"intValue",0);A(this,"floatValue",0);A(this,"stringValue",null);A(this,"volume",0);A(this,"balance",0);if(!t)throw new Error("data cannot be null.");this.time=e,this.data=t}};class zT{constructor(e){A(this,"name");A(this,"_audioPath",null);A(this,"setupPose",new gv(-1,this));this.name=e}get audioPath(){return this._audioPath}set audioPath(e){if(e==null)throw new Error("audioPath cannot be null.");this._audioPath=e}}class Zm{constructor(){A(this,"bendDirection",0);A(this,"compress",!1);A(this,"stretch",!1);A(this,"mix",0);A(this,"softness",0)}set(e){this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch}}class Ur extends Pc{constructor(t,n){super(t,new Zm,new Zm);A(this,"bones");A(this,"target");if(!n)throw new Error("skeleton cannot be null.");this.bones=[];for(const s of t.bones)this.bones.push(n.bones[s.index].constrainedPose);this.target=n.bones[t.target.index]}copy(t){var n=new Ur(this.data,t);return n.pose.set(this.pose),n}update(t,n){const s=this.appliedPose;if(s.mix===0)return;const r=this.target.appliedPose,o=this.bones;switch(o.length){case 1:Ur.apply(t,o[0],r.worldX,r.worldY,s.compress,s.stretch,this.data.scaleYMode,s.mix);break;case 2:Ur.apply(t,o[0],o[1],r.worldX,r.worldY,s.bendDirection,s.stretch,this.data.scaleYMode,s.softness,s.mix);break}}sort(t){t.sortBone(this.target);const n=this.bones[0].bone;t.sortBone(n),t._updateCache.push(this),n.sorted=!1,t.sortReset(n.children),t.constrained(n),this.bones.length>1&&t.constrained(this.bones[1].bone)}isSourceActive(){return this.target.active}static apply(t,n,s,r,o,a,c,l,d,u){typeof s=="number"?Ur.apply1(t,n,s,r,o,a,c,l):Ur.apply2(t,n,s,r,o,a,c,l,d,u)}static apply1(t,n,s,r,o,a,c,l){n.modifyLocal(t);const d=n.bone.parent.appliedPose;let u=d.a,h=d.b,f=d.c,p=d.d,m=-n.shearX-n.rotation,g=0,v=0;switch(n.inherit){case an.OnlyTranslation:g=(s-n.worldX)*Le.signum(t.scaleX),v=(r-n.worldY)*Le.signum(t.scaleY);break;case an.NoRotationOrReflection:{const y=Math.abs(u*p-h*f)/Math.max(Le.epsilon,u*u+f*f),b=u/t.scaleX,x=f/t.scaleY;h=-x*y*t.scaleX,p=b*y*t.scaleY,m+=Le.atan2Deg(x,b)}default:{const y=s-d.worldX,b=r-d.worldY,x=u*p-h*f;Math.abs(x)<=Le.epsilon?(g=0,v=0):(g=(y*p-b*h)/x-n.x,v=(b*u-y*f)/x-n.y)}}if(m+=Le.atan2Deg(v,g),n.scaleX<0&&(m+=180),m>180?m-=360:m<=-180&&(m+=360),n.rotation+=m*l,o||a){switch(n.inherit){case an.NoScale:case an.NoScaleOrReflection:g=s-n.worldX,v=r-n.worldY}const y=n.bone.data.length*n.scaleX;if(y>Le.epsilon){const b=g*g+v*v;if(o&&b<y*y||a&&b>y*y){const x=(Math.sqrt(b)/y-1)*l+1;switch(n.scaleX*=x,c){case ri.Uniform:n.scaleY*=x;break;case ri.Volume:n.scaleY/=x<.7?.25+.642857*x:x}}}}}static apply2(t,n,s,r,o,a,c,l,d,u){if(n.inherit!==an.Normal||s.inherit!==an.Normal)return;n.modifyLocal(t),s.modifyLocal(t);let h=n.x,f=n.y,p=n.scaleX,m=n.scaleY,g=s.scaleX,v=0,y=0,b=0;p<0?(p=-p,v=180,b=-1):(v=0,b=1),m<0&&(m=-m,b=-b),g<0?(g=-g,y=180):y=0;let x=0,T=0,E=n.a,S=n.b,C=n.c,M=n.d;const k=Math.abs(p-m)<=Le.epsilon;!k||c?(s.y=0,x=E*s.x+n.worldX,T=C*s.x+n.worldY):(x=E*s.x+S*s.y+n.worldX,T=C*s.x+M*s.y+n.worldY);const P=n.bone.parent.appliedPose;E=P.a,S=P.b,C=P.c,M=P.d;let I=E*M-S*C,D=x-P.worldX,$=T-P.worldY;I=Math.abs(I)<=Le.epsilon?0:1/I;const j=(D*M-$*S)*I-h,B=($*E-D*C)*I-f;let Y=Math.sqrt(j*j+B*B),U=s.bone.data.length*g,O,L;if(Y<Le.epsilon){Ur.apply(t,n,r,o,!1,c,ri.None,u),s.rotation=0;return}D=r-P.worldX,$=o-P.worldY;let R=(D*M-$*S)*I-h,X=($*E-D*C)*I-f,z=R*R+X*X;if(d!==0){d*=p*(g+1)*.5;const Z=Math.sqrt(z),ae=Z-Y-U*p+d;if(ae>0){let ce=Math.min(1,ae/(d*2))-1;ce=(ae-d*(1-ce*ce))/Z,R-=ce*R,X-=ce*X,z=R*R+X*X}}e:if(k){U*=p;let Z=(z-Y*Y-U*U)/(2*Y*U);if(Z<-1)Z=-1,L=Math.PI*a;else if(Z>1){if(Z=1,L=0,c)switch(E=(Math.sqrt(z)/(Y+U)-1)*u+1,n.scaleX*=E,l){case ri.Uniform:n.scaleY*=E;break;case ri.Volume:n.scaleY/=E<.7?.25+.642857*E:E}}else L=Math.acos(Z)*a;E=Y+U*Z,S=U*Math.sin(L),O=Math.atan2(X*E-R*S,R*E+X*S)}else{E=p*U,S=m*U;const Z=E*E,ae=S*S,ce=Math.atan2(X,R);C=ae*Y*Y+Z*z-Z*ae;const ve=-2*ae*Y,we=ae-Z;if(M=ve*ve-4*we*C,M>=0){let N=Math.sqrt(M);ve<0&&(N=-N),N=-(ve+N)*.5;let V=N/we,W=C/N;const ee=Math.abs(V)<Math.abs(W)?V:W;if(V=z-ee*ee,V>=0){$=Math.sqrt(V)*a,O=ce-Math.atan2($,ee),L=Math.atan2($/m,(ee-Y)/p);break e}}let re=Le.PI,Ee=Y-E,q=Ee*Ee,J=0,ie=0,se=Y+E,H=se*se,G=0;C=-E*Y/(Z-ae),C>=-1&&C<=1&&(C=Math.acos(C),D=E*Math.cos(C)+Y,$=S*Math.sin(C),M=D*D+$*$,M<q&&(re=C,q=M,Ee=D,J=$),M>H&&(ie=C,H=M,se=D,G=$)),z<=(q+H)*.5?(O=ce-Math.atan2(J*a,Ee),L=re*a):(O=ce-Math.atan2(G*a,se),L=ie*a)}const K=Math.atan2(s.y,s.x)*b;O=(O-K)*Le.radDeg+v-n.rotation,O>180?O-=360:O<=-180&&(O+=360),n.rotation+=O*u,L=((L+K)*Le.radDeg-s.shearX)*b+y-s.rotation,L>180?L-=360:L<=-180&&(L+=360),s.rotation+=L*u}}class Bd extends kc{constructor(t){super(t,new Zm);A(this,"bones",[]);A(this,"_target",null);A(this,"_scaleYMode",ri.None)}set target(t){this._target=t}get target(){if(!this._target)throw new Error("target cannot be null.");return this._target}set scaleYMode(t){this._scaleYMode=t}get scaleYMode(){if(this._scaleYMode==null)throw new Error("scaleYMode cannot be null.");return this._scaleYMode}create(t){return new Ur(this,t)}}class Qm{constructor(){A(this,"position",0);A(this,"spacing",0);A(this,"mixRotate",0);A(this,"mixX",0);A(this,"mixY",0)}set(e){this.position=e.position,this.spacing=e.spacing,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY}}class Ud extends kc{constructor(t){super(t,new Qm);A(this,"bones",[]);A(this,"_slot",null);A(this,"positionMode",Os.Fixed);A(this,"spacingMode",En.Fixed);A(this,"rotateMode",Yo.Chain);A(this,"offsetRotation",0)}set slot(t){this._slot=t}get slot(){if(this._slot)return this._slot;throw new Error("SlotData not set.")}create(t){return new eg(this,t)}}var Os;(function(i){i[i.Fixed=0]="Fixed",i[i.Percent=1]="Percent"})(Os||(Os={}));var En;(function(i){i[i.Length=0]="Length",i[i.Fixed=1]="Fixed",i[i.Percent=2]="Percent",i[i.Proportional=3]="Proportional"})(En||(En={}));var Yo;(function(i){i[i.Tangent=0]="Tangent",i[i.Chain=1]="Chain",i[i.ChainScale=2]="ChainScale"})(Yo||(Yo={}));const Gi=class Gi extends Pc{constructor(t,n){super(t,new Qm,new Qm);A(this,"data");A(this,"bones");A(this,"slot");A(this,"spaces",[]);A(this,"positions",[]);A(this,"world",[]);A(this,"curves",[]);A(this,"lengths",[]);A(this,"segments",[]);if(!n)throw new Error("skeleton cannot be null.");this.data=t,this.bones=[];for(const s of this.data.bones)this.bones.push(n.bones[s.index].constrainedPose);this.slot=n.slots[t.slot.index]}copy(t){var n=new Gi(this.data,t);return n.pose.set(this.pose),n}update(t,n){const s=this.slot.appliedPose.attachment;if(!(s instanceof bc))return;const r=this.appliedPose,o=r.mixRotate,a=r.mixX,c=r.mixY;if(o===0&&a===0&&c===0)return;const l=this.data,d=l.rotateMode===Yo.Tangent,u=l.rotateMode===Yo.ChainScale,h=this.bones,f=h.length,p=d?f:f+1,m=Ze.setArraySize(this.spaces,p),g=u?this.lengths=Ze.setArraySize(this.lengths,f):[],v=r.spacing;switch(l.spacingMode){case En.Percent:if(u)for(let S=0,C=p-1;S<C;S++){const M=h[S],k=M.bone.data.length,P=k*M.a,I=k*M.c;g[S]=Math.sqrt(P*P+I*I)}Ze.arrayFill(m,1,p,v);break;case En.Proportional:{let S=0;for(let C=0,M=p-1;C<M;){const k=h[C],P=k.bone.data.length;if(P<Le.epsilon)u&&(g[C]=0),m[++C]=v;else{const I=P*k.a,D=P*k.c,$=Math.sqrt(I*I+D*D);u&&(g[C]=$),m[++C]=$,S+=$}}if(S>0){S=p/S*v;for(let C=1;C<p;C++)m[C]*=S}break}default:{const S=l.spacingMode===En.Length;for(let C=0,M=p-1;C<M;){const k=h[C],P=k.bone.data.length;if(P<Le.epsilon)u&&(g[C]=0),m[++C]=v;else{const I=P*k.a,D=P*k.c,$=Math.sqrt(I*I+D*D);u&&(g[C]=$),m[++C]=(S?Math.max(0,P+v):v)*$/P}}}}const y=this.computeWorldPositions(t,s,p,d);let b=y[0],x=y[1],T=l.offsetRotation,E=!1;if(T===0)E=l.rotateMode===Yo.Chain;else{E=!1;const S=this.slot.bone.appliedPose;T*=S.a*S.d-S.b*S.c>0?Le.degRad:-Le.degRad}for(let S=0,C=3;S<f;S++,C+=3){const M=h[S];M.modifyWorld(t),M.worldX+=(b-M.worldX)*a,M.worldY+=(x-M.worldY)*c;const k=y[C],P=y[C+1],I=k-b,D=P-x;if(u){const $=g[S];if($!==0){const j=(Math.sqrt(I*I+D*D)/$-1)*o+1;M.a*=j,M.c*=j}}if(b=k,x=P,o>0){let $=M.a,j=M.b,B=M.c,Y=M.d,U=0,O=0,L=0;if(d?U=y[C-1]:m[S+1]===0?U=y[C+2]:U=Math.atan2(D,I),U-=Math.atan2(B,$),E){O=Math.cos(U),L=Math.sin(U);const R=M.bone.data.length;b+=(R*(O*$-L*B)-I)*o,x+=(R*(L*$+O*B)-D)*o}else U+=T;U>Le.PI?U-=Le.PI2:U<-Le.PI&&(U+=Le.PI2),U*=o,O=Math.cos(U),L=Math.sin(U),M.a=O*$-L*B,M.b=O*j-L*Y,M.c=L*$+O*B,M.d=L*j+O*Y}}}computeWorldPositions(t,n,s,r){const o=this.slot;let a=this.appliedPose.position,c=this.spaces,l=Ze.setArraySize(this.positions,s*3+2),d=this.world;const u=n.closed;let h=n.worldVerticesLength,f=h/6,p=Gi.NONE;if(!n.constantSpeed){const L=n.lengths;f-=u?1:2;const R=L[f];this.data.positionMode===Os.Percent&&(a*=R);let X;switch(this.data.spacingMode){case En.Percent:X=R;break;case En.Proportional:X=R/s;break;default:X=1}d=Ze.setArraySize(this.world,8);for(let z=0,K=0,Z=0;z<s;z++,K+=3){const ae=c[z]*X;a+=ae;let ce=a;if(u)ce%=R,ce<0&&(ce+=R),Z=0;else if(ce<0){p!==Gi.BEFORE&&(p=Gi.BEFORE,n.computeWorldVertices(t,o,2,4,d,0,2)),this.addBeforePosition(ce,d,0,l,K);continue}else if(ce>R){p!==Gi.AFTER&&(p=Gi.AFTER,n.computeWorldVertices(t,o,h-6,4,d,0,2)),this.addAfterPosition(ce-R,d,0,l,K);continue}for(;;Z++){const ve=L[Z];if(!(ce>ve)){if(Z===0)ce/=ve;else{const we=L[Z-1];ce=(ce-we)/(ve-we)}break}}Z!==p&&(p=Z,u&&Z===f?(n.computeWorldVertices(t,o,h-4,4,d,0,2),n.computeWorldVertices(t,o,0,4,d,4,2)):n.computeWorldVertices(t,o,Z*6+2,8,d,0,2)),this.addCurvePosition(ce,d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],l,K,r||z>0&&ae===0)}return l}u?(h+=2,d=Ze.setArraySize(this.world,h),n.computeWorldVertices(t,o,2,h-4,d,0,2),n.computeWorldVertices(t,o,0,2,d,h-4,2),d[h-2]=d[0],d[h-1]=d[1]):(f--,h-=4,d=Ze.setArraySize(this.world,h),n.computeWorldVertices(t,o,2,h,d,0,2));const m=Ze.setArraySize(this.curves,f);let g=0,v=d[0],y=d[1],b=0,x=0,T=0,E=0,S=0,C=0,M=0,k=0,P=0,I=0,D=0,$=0,j=0,B=0;for(let L=0,R=2;L<f;L++,R+=6)b=d[R],x=d[R+1],T=d[R+2],E=d[R+3],S=d[R+4],C=d[R+5],M=(v-b*2+T)*.1875,k=(y-x*2+E)*.1875,P=((b-T)*3-v+S)*.09375,I=((x-E)*3-y+C)*.09375,D=M*2+P,$=k*2+I,j=(b-v)*.75+M+P*.16666667,B=(x-y)*.75+k+I*.16666667,g+=Math.sqrt(j*j+B*B),j+=D,B+=$,D+=P,$+=I,g+=Math.sqrt(j*j+B*B),j+=D,B+=$,g+=Math.sqrt(j*j+B*B),j+=D+P,B+=$+I,g+=Math.sqrt(j*j+B*B),m[L]=g,v=S,y=C;this.data.positionMode===Os.Percent&&(a*=g);let Y;switch(this.data.spacingMode){case En.Percent:Y=g;break;case En.Proportional:Y=g/s;break;default:Y=1}const U=this.segments;let O=0;for(let L=0,R=0,X=0,z=0;L<s;L++,R+=3){const K=c[L]*Y;a+=K;let Z=a;if(u)Z%=g,Z<0&&(Z+=g),X=0,z=0;else if(Z<0){this.addBeforePosition(Z,d,0,l,R);continue}else if(Z>g){this.addAfterPosition(Z-g,d,h-4,l,R);continue}for(;;X++){const ae=m[X];if(!(Z>ae)){if(X===0)Z/=ae;else{const ce=m[X-1];Z=(Z-ce)/(ae-ce)}break}}if(X!==p){p=X;let ae=X*6;for(v=d[ae],y=d[ae+1],b=d[ae+2],x=d[ae+3],T=d[ae+4],E=d[ae+5],S=d[ae+6],C=d[ae+7],M=(v-b*2+T)*.03,k=(y-x*2+E)*.03,P=((b-T)*3-v+S)*.006,I=((x-E)*3-y+C)*.006,D=M*2+P,$=k*2+I,j=(b-v)*.3+M+P*.16666667,B=(x-y)*.3+k+I*.16666667,O=Math.sqrt(j*j+B*B),U[0]=O,ae=1;ae<8;ae++)j+=D,B+=$,D+=P,$+=I,O+=Math.sqrt(j*j+B*B),U[ae]=O;j+=D,B+=$,O+=Math.sqrt(j*j+B*B),U[8]=O,j+=D+P,B+=$+I,O+=Math.sqrt(j*j+B*B),U[9]=O,z=0}for(Z*=O;;z++){const ae=U[z];if(!(Z>ae)){if(z===0)Z/=ae;else{const ce=U[z-1];Z=z+(Z-ce)/(ae-ce)}break}}this.addCurvePosition(Z*.1,v,y,b,x,T,E,S,C,l,R,r||L>0&&K===0)}return l}addBeforePosition(t,n,s,r,o){const a=n[s],c=n[s+1],l=n[s+2]-a,d=n[s+3]-c,u=Math.atan2(d,l);r[o]=a+t*Math.cos(u),r[o+1]=c+t*Math.sin(u),r[o+2]=u}addAfterPosition(t,n,s,r,o){const a=n[s+2],c=n[s+3],l=a-n[s],d=c-n[s+1],u=Math.atan2(d,l);r[o]=a+t*Math.cos(u),r[o+1]=c+t*Math.sin(u),r[o+2]=u}addCurvePosition(t,n,s,r,o,a,c,l,d,u,h,f){if(t===0||Number.isNaN(t)){u[h]=n,u[h+1]=s,u[h+2]=Math.atan2(o-s,r-n);return}const p=t*t,m=p*t,g=1-t,v=g*g,y=v*g,b=g*t,x=b*3,T=g*x,E=x*t,S=n*y+r*T+a*E+l*m,C=s*y+o*T+c*E+d*m;u[h]=S,u[h+1]=C,f&&(t<.001?u[h+2]=Math.atan2(o-s,r-n):u[h+2]=Math.atan2(C-(s*v+o*b*2+c*p),S-(n*v+r*b*2+a*p)))}sort(t){const n=this.slot.data.index,s=this.slot.bone;t.skin!=null&&this.sortPathSlot(t,t.skin,n,s),t.data.defaultSkin!=null&&t.data.defaultSkin!==t.skin&&this.sortPathSlot(t,t.data.defaultSkin,n,s),this.sortPath(t,this.slot.pose.attachment,s);const r=this.bones,o=this.bones.length;for(let a=0;a<o;a++){const c=r[a].bone;t.sortBone(c),t.constrained(c)}t._updateCache.push(this);for(let a=0;a<o;a++)t.sortReset(r[a].bone.children);for(let a=0;a<o;a++)r[a].bone.sorted=!0}sortPathSlot(t,n,s,r){const o=n.getAttachments();for(let a=0,c=o.length;a<c;a++){const l=o[a];l.slotIndex===s&&this.sortPath(t,l.attachment,r)}}sortPath(t,n,s){if(!(n instanceof bc))return;const r=n.bones;if(r==null)t.sortBone(s);else{const o=t.bones;for(let a=0,c=r.length;a<c;){let l=r[a++];for(l+=a;a<l;)t.sortBone(o[r[a++]])}}}isSourceActive(){return this.slot.bone.active}};A(Gi,"NONE",-1),A(Gi,"BEFORE",-2),A(Gi,"AFTER",-3);let eg=Gi;var Po;(function(i){i[i.none=0]="none",i[i.reset=1]="reset",i[i.update=2]="update",i[i.pose=3]="pose"})(Po||(Po={}));class tg{constructor(){A(this,"inertia",0);A(this,"strength",0);A(this,"damping",0);A(this,"massInverse",0);A(this,"wind",0);A(this,"gravity",0);A(this,"mix",0)}set(e){this.inertia=e.inertia,this.strength=e.strength,this.damping=e.damping,this.massInverse=e.massInverse,this.wind=e.wind,this.gravity=e.gravity,this.mix=e.mix}}class ng{constructor(){A(this,"color",new at(1,1,1,1));A(this,"darkColor",null);A(this,"attachment",null);A(this,"sequenceIndex",0);A(this,"deform",[])}SlotPose(){}set(e){if(e==null)throw new Error("pose cannot be null.");this.color.setFromColor(e.color),this.darkColor!=null&&e.darkColor!=null&&this.darkColor.setFromColor(e.darkColor),this.attachment=e.attachment,this.sequenceIndex=e.sequenceIndex,this.deform.length=0,this.deform.push(...e.deform)}getAttachment(){return this.attachment}setAttachment(e){this.attachment!==e&&((!(e instanceof Sr)||!(this.attachment instanceof Sr)||e.timelineAttachment!==this.attachment.timelineAttachment)&&(this.deform.length=0),this.attachment=e,this.sequenceIndex=-1)}}class vv extends XT{constructor(t,n){super(t,new ng,new ng);A(this,"skeleton");A(this,"bone");A(this,"attachmentState",0);if(!n)throw new Error("skeleton cannot be null.");this.skeleton=n,this.bone=n.bones[t.boneData.index],t.setupPose.darkColor!=null&&(this.pose.darkColor=new at,this.constrainedPose.darkColor=new at),this.setupPose()}copy(t,n,s){const r=new vv(t.data,this.skeleton);return this.data.setupPose.darkColor!=null&&(r.pose.darkColor=new at,r.constrainedPose.darkColor=new at),r.pose.set(t.pose),r}setupPose(){this.pose.color.setFromColor(this.data.setupPose.color),this.pose.darkColor&&this.pose.darkColor.setFromColor(this.data.setupPose.darkColor),this.pose.sequenceIndex=this.data.setupPose.sequenceIndex,this.data.attachmentName?(this.pose.attachment=null,this.pose.setAttachment(this.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.pose.setAttachment(null)}}const ko=class ko{constructor(e){A(this,"data");A(this,"bones");A(this,"slots");A(this,"drawOrder");A(this,"constraints");A(this,"physics");A(this,"_updateCache",[]);A(this,"resetCache",[]);A(this,"skin",null);A(this,"color");A(this,"scaleX",1);A(this,"_scaleY",1);A(this,"x",0);A(this,"y",0);A(this,"time",0);A(this,"windX",1);A(this,"windY",0);A(this,"gravityX",0);A(this,"gravityY",1);A(this,"_update",0);if(!e)throw new Error("data cannot be null.");this.data=e,this.bones=[];for(let t=0;t<e.bones.length;t++){const n=e.bones[t];let s;if(!n.parent)s=new zl(n,null);else{const r=this.bones[n.parent.index];s=new zl(n,r),r.children.push(s)}this.bones.push(s)}this.slots=[];for(const t of this.data.slots)this.slots.push(new vv(t,this));this.drawOrder=new bX(this.slots),this.physics=[],this.constraints=[];for(const t of this.data.constraints){const n=t.create(this);n instanceof _h&&this.physics.push(n),this.constraints.push(n)}this.color=new at(1,1,1,1),this.updateCache()}static get yDir(){return ko.yDown?-1:1}get scaleY(){return this._scaleY*ko.yDir}set scaleY(e){this._scaleY=e}updateCache(){this._updateCache.length=0,this.resetCache.length=0,this.drawOrder.unconstrained();const e=this.slots;for(let o=0,a=e.length;o<a;o++)e[o].unconstrained();const t=this.bones,n=t.length;for(let o=0,a=n;o<a;o++){const c=t[o];c.sorted=c.data.skinRequired,c.active=!c.sorted,c.unconstrained()}if(this.skin){const o=this.skin.bones;for(let a=0,c=this.skin.bones.length;a<c;a++){let l=this.bones[o[a].index];do l.sorted=!1,l.active=!0,l=l.parent;while(l)}}const s=this.constraints;let r=this.constraints.length;for(let o=0;o<r;o++)s[o].unconstrained();for(let o=0;o<r;o++){const a=s[o];a.active=a.isSourceActive()&&(!a.data.skinRequired||this.skin!=null&&this.skin.constraints.includes(a.data)),a.active&&a.sort(this)}for(let o=0;o<n;o++)this.sortBone(t[o]);r=this._updateCache.length;for(let o=0;o<r;o++){const a=this._updateCache[o];a instanceof zl&&(this._updateCache[o]=a.appliedPose)}}constrained(e){e.pose===e.appliedPose&&(e.constrained(),this.resetCache.push(e))}sortBone(e){if(e.sorted||!e.active)return;const t=e.parent;t&&this.sortBone(t),e.sorted=!0,this._updateCache.push(e)}sortReset(e){for(let t=0,n=e.length;t<n;t++){const s=e[t];s.active&&(s.sorted&&this.sortReset(s.children),s.sorted=!1)}}updateWorldTransform(e){this._update++,this.drawOrder.appliedPose===this.drawOrder.constrainedPose&&this.drawOrder.resetConstrained();const t=this.resetCache;for(let s=0,r=this.resetCache.length;s<r;s++)t[s].resetConstrained();const n=this._updateCache;for(let s=0,r=this._updateCache.length;s<r;s++)n[s].update(this,e)}setupPose(){this.setupPoseBones(),this.setupPoseSlots()}setupPoseBones(){const e=this.bones;for(let n=0,s=e.length;n<s;n++)e[n].setupPose();const t=this.constraints;for(let n=0,s=t.length;n<s;n++)t[n].setupPose()}setupPoseSlots(){this.drawOrder.setupPose();const e=this.slots;for(let t=0,n=e.length;t<n;t++)e[t].setupPose()}getRootBone(){return this.bones.length===0?null:this.bones[0]}findBone(e){if(!e)throw new Error("boneName cannot be null.");const t=this.bones;for(let n=0,s=t.length;n<s;n++)if(t[n].data.name===e)return t[n];return null}findSlot(e){if(!e)throw new Error("slotName cannot be null.");const t=this.slots;for(let n=0,s=t.length;n<s;n++)if(t[n].data.name===e)return t[n];return null}setSkin(e){typeof e=="string"?this.setSkinByName(e):this.setSkinBySkin(e)}setSkinByName(e){const t=this.data.findSkin(e);if(!t)throw new Error(`Skin not found: ${e}`);this.setSkin(t)}setSkinBySkin(e){if(e!==this.skin){if(e)if(this.skin)e.attachAll(this,this.skin);else{const t=this.slots;for(let n=0,s=t.length;n<s;n++){const r=t[n],o=r.data.attachmentName;if(o){const a=e.getAttachment(n,o);a&&r.pose.setAttachment(a)}}}this.skin=e,this.updateCache()}}getAttachment(e,t){return typeof e=="string"?this.getAttachmentByName(e,t):this.getAttachmentByIndex(e,t)}getAttachmentByName(e,t){const n=this.data.findSlot(e);if(!n)throw new Error(`Can't find slot with name ${e}`);return this.getAttachment(n.index,t)}getAttachmentByIndex(e,t){if(!t)throw new Error("placeholder cannot be null.");if(this.skin){const n=this.skin.getAttachment(e,t);if(n)return n}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(e,t):null}setAttachment(e,t){if(!e)throw new Error("slotName cannot be null.");const n=this.findSlot(e);if(!n)throw new Error(`Slot not found: ${e}`);let s=null;if(t&&(s=this.getAttachment(n.data.index,t),!s))throw new Error(`Attachment not found: ${t}, for slot: ${e}`);n.pose.setAttachment(s)}findConstraint(e,t){if(e==null)throw new Error("constraintName cannot be null.");if(t==null)throw new Error("type cannot be null.");const n=this.constraints;for(let s=0,r=n.length;s<r;s++){const o=n[s];if(o instanceof t&&o.data.name===e)return o}return null}getBoundsRect(e){const t=new Lx,n=new Lx;return this.getBounds(t,n,void 0,e),{x:t.x,y:t.y,width:n.x,height:n.y}}getBounds(e,t,n=new Array(2),s=null){if(!e)throw new Error("offset cannot be null.");if(!t)throw new Error("size cannot be null.");const r=this.drawOrder.appliedPose,o=r;let a=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,d=Number.NEGATIVE_INFINITY;for(let u=0,h=r.length;u<h;u++){const f=o[u];if(!f.bone.active)continue;let p=0,m=null,g=null;const v=f.appliedPose.attachment;if(v){if(v instanceof Ka)p=8,m=Ze.setArraySize(n,p,0),v.computeWorldVertices(f,v.getOffsets(f.appliedPose),m,0,2),g=ko.quadTriangles;else if(v instanceof so)p=v.worldVerticesLength,m=Ze.setArraySize(n,p,0),v.computeWorldVertices(this,f,0,p,m,0,2),g=v.triangles;else if(v instanceof Th&&s){s.clipEnd(f),s.clipStart(this,f,v);continue}if(m&&g){s!=null&&s.isClipping()&&s.clipTriangles(m,g,g.length)&&(m=s.clippedVertices,p=s.clippedVertices.length);for(let y=0,b=m.length;y<b;y+=2){const x=m[y],T=m[y+1];a=Math.min(a,x),c=Math.min(c,T),l=Math.max(l,x),d=Math.max(d,T)}}}s&&s.clipEnd(f)}s&&s.clipEnd(),e.set(a,c),t.set(l-a,d-c)}setScale(e,t){this.scaleX=e,this.scaleY=t}setPosition(e,t){this.x=e,this.y=t}update(e){this.time+=e}physicsTranslate(e,t){const n=this.physics;for(let s=0,r=n.length;s<r;s++)n[s].translate(e,t)}physicsRotate(e,t,n){const s=this.physics;for(let r=0,o=s.length;r<o;r++)s[r].rotate(e,t,n)}};A(ko,"quadTriangles",[0,1,2,2,3,0]),A(ko,"yDown",!1);let ig=ko;class _h extends Pc{constructor(t,n){super(t,new tg,new tg);A(this,"bone");A(this,"_reset",!0);A(this,"ux",0);A(this,"uy",0);A(this,"cx",0);A(this,"cy",0);A(this,"tx",0);A(this,"ty",0);A(this,"xOffset",0);A(this,"xLag",0);A(this,"xVelocity",0);A(this,"yOffset",0);A(this,"yLag",0);A(this,"yVelocity",0);A(this,"rotateOffset",0);A(this,"rotateLag",0);A(this,"rotateVelocity",0);A(this,"scaleOffset",0);A(this,"scaleLag",0);A(this,"scaleVelocity",0);A(this,"remaining",0);A(this,"lastTime",0);if(n==null)throw new Error("skeleton cannot be null.");this.bone=n.bones[t.bone.index].constrainedPose}copy(t){var n=new _h(this.data,t);return n.pose.set(this.pose),n}reset(t){this.remaining=0,this.lastTime=t.time,this._reset=!0,this.xOffset=0,this.xLag=0,this.xVelocity=0,this.yOffset=0,this.yLag=0,this.yVelocity=0,this.rotateOffset=0,this.rotateLag=0,this.rotateVelocity=0,this.scaleOffset=0,this.scaleLag=0,this.scaleVelocity=0}translate(t,n){this.ux-=t,this.uy-=n,this.cx-=t,this.cy-=n}rotate(t,n,s){const r=s*Le.degRad,o=Math.cos(r),a=Math.sin(r),c=this.cx-t,l=this.cy-n;this.translate(c*o-l*a-c,c*a+l*o-l)}update(t,n){const s=this.appliedPose,r=s.mix;if(r===0)return;const o=this.data.x>0,a=this.data.y>0,c=this.data.rotate>0||this.data.shearX>0,l=this.data.scaleX>0,d=this.bone;let u=d.bone.data.length,h=this.data.step,f=0;if(n!==Po.none){switch(d.modifyWorld(t),n){case Po.reset:this.reset(t);case Po.update:{const p=Math.max(t.time-this.lastTime,0),m=this.remaining;this.remaining+=p,this.lastTime=t.time;const g=d.worldX,v=d.worldY;if(this._reset)this._reset=!1,this.ux=g,this.uy=v;else{let y=this.remaining,b=s.inertia,x=t.data.referenceScale,T=-1,E=0,S=0,C=this.data.limit*p,M=C*Math.abs(t.scaleY);if(C*=Math.abs(t.scaleX),o||a){if(o){const k=(this.ux-g)*b;this.xOffset+=k>C?C:k<-C?-C:k,this.ux=g}if(a){const k=(this.uy-v)*b;this.yOffset+=k>M?M:k<-M?-M:k,this.uy=v}if(y>=h){const k=this.xOffset,P=this.yOffset;T=s.damping**(60*h),E=h*s.massInverse,S=s.strength;const I=x*s.wind,D=x*s.gravity,$=(I*t.windX+D*t.gravityX)*t.scaleX,j=(I*t.windY+D*t.gravityY)*t.scaleY;do o&&(this.xVelocity+=($-this.xOffset*S)*E,this.xOffset+=this.xVelocity*h,this.xVelocity*=T),a&&(this.yVelocity-=(j+this.yOffset*S)*E,this.yOffset+=this.yVelocity*h,this.yVelocity*=T),y-=h;while(y>=h);this.xLag=this.xOffset-k,this.yLag=this.yOffset-P}f=Math.max(0,1-y/h),o&&(d.worldX+=(this.xOffset-this.xLag*f)*r*this.data.x),a&&(d.worldY+=(this.yOffset-this.yLag*f)*r*this.data.y)}if(c||l){let k=Math.atan2(d.c,d.a),P=0,I=0,D=0,$=this.cx-d.worldX,j=this.cy-d.worldY;if($>C?$=C:$<-C&&($=-C),j>M?j=M:j<-M&&(j=-M),y=this.remaining,c){D=(this.data.rotate+this.data.shearX)*r,f=this.rotateLag*Math.max(0,1-m/h);let B=Math.atan2(j+this.ty,$+this.tx)-k-(this.rotateOffset-f)*D;this.rotateOffset+=(B-Math.ceil(B*Le.invPI2-.5)*Le.PI2)*b,B=(this.rotateOffset-f)*D+k,P=Math.cos(B),I=Math.sin(B),l&&(B=u*d.getWorldScaleX(),B>0&&(this.scaleOffset+=($*P+j*I)*b/B))}else{P=Math.cos(k),I=Math.sin(k);const B=u*d.getWorldScaleX()-this.scaleLag*Math.max(0,1-m/h);B>0&&(this.scaleOffset+=($*P+j*I)*b/B)}if(y>=h){T===-1&&(T=s.damping**(60*h),E=h*s.massInverse,S=s.strength);const B=s.wind*t.windX+s.gravity*t.gravityX,Y=(s.wind*t.windY+s.gravity*t.gravityY)*ig.yDir,U=this.rotateOffset,O=this.scaleOffset,L=u/x;for(;;)if(y-=h,l&&(this.scaleVelocity+=(B*P-Y*I-this.scaleOffset*S)*E,this.scaleOffset+=this.scaleVelocity*h,this.scaleVelocity*=T),c){if(this.rotateVelocity-=((B*I+Y*P)*L+this.rotateOffset*S)*E,this.rotateOffset+=this.rotateVelocity*h,this.rotateVelocity*=T,y<h)break;const R=this.rotateOffset*D+k;P=Math.cos(R),I=Math.sin(R)}else if(y<h)break;this.rotateLag=this.rotateOffset-U,this.scaleLag=this.scaleOffset-O}f=Math.max(0,1-y/h)}this.remaining=y}this.cx=d.worldX,this.cy=d.worldY;break}case Po.pose:f=Math.max(0,1-this.remaining/h),o&&(d.worldX+=(this.xOffset-this.xLag*f)*r*this.data.x),a&&(d.worldY+=(this.yOffset-this.yLag*f)*r*this.data.y)}if(c){let p=(this.rotateOffset-this.rotateLag*f)*r,m=0,g=0,v=0;if(this.data.shearX>0){let y=0;this.data.rotate>0&&(y=p*this.data.rotate,m=Math.sin(y),g=Math.cos(y),v=d.b,d.b=g*v-m*d.d,d.d=m*v+g*d.d),y+=p*this.data.shearX,m=Math.sin(y),g=Math.cos(y),v=d.a,d.a=g*v-m*d.c,d.c=m*v+g*d.c}else p*=this.data.rotate,m=Math.sin(p),g=Math.cos(p),v=d.a,d.a=g*v-m*d.c,d.c=m*v+g*d.c,v=d.b,d.b=g*v-m*d.d,d.d=m*v+g*d.d}if(l){let p=1+(this.scaleOffset-this.scaleLag*f)*r*this.data.scaleX;switch(d.a*=p,d.c*=p,this.data.scaleYMode){case ri.Uniform:d.b*=p,d.d*=p;break;case ri.Volume:p=Math.abs(p),p=p>=.7?1/p:4-3.67347*p,d.b*=p,d.d*=p}}n!==Po.pose&&(this.tx=u*d.a,this.ty=u*d.c)}}sort(t){const n=this.bone.bone;t.sortBone(n),t._updateCache.push(this),t.sortReset(n.children),t.constrained(n)}isSourceActive(){return this.bone.bone.active}}class Vd extends kc{constructor(t){super(t,new tg);A(this,"_bone",null);A(this,"x",0);A(this,"y",0);A(this,"rotate",0);A(this,"scaleX",0);A(this,"shearX",0);A(this,"limit",0);A(this,"step",0);A(this,"inertiaGlobal",!1);A(this,"strengthGlobal",!1);A(this,"dampingGlobal",!1);A(this,"massGlobal",!1);A(this,"windGlobal",!1);A(this,"gravityGlobal",!1);A(this,"mixGlobal",!1);A(this,"_scaleYMode",ri.None)}set bone(t){this._bone=t}get bone(){if(this._bone)return this._bone;throw new Error("BoneData not set.")}get scaleYMode(){return this._scaleYMode}set scaleYMode(t){if(t==null)throw new Error("scaleYMode cannot be null.");this._scaleYMode=t}create(t){return new _h(this,t)}}typeof Math.fround>"u"&&(Math.fround=(i=>e=>(i[0]=e,i[0]))(new Float32Array(1)));class sg{constructor(){A(this,"time",0);A(this,"mix",0)}set(e){this.time=e.time,this.mix=e.mix}}const Gl=class Gl extends Pc{constructor(t,n){super(t,new sg,new sg);A(this,"bone",null);if(!n)throw new Error("skeleton cannot be null.");t.bone!=null&&(this.bone=n.bones[t.bone.index])}copy(t){var n=new Gl(this.data,t);return n.pose.set(this.pose),n}update(t,n){const s=this.appliedPose;if(s.mix===0)return;const r=this.data,o=r.animation,a=this.bone;if(a!==null){if(!a.active)return;r.local&&a.appliedPose.validateLocalTransform(t),s.time=r.offset+(r.property.value(t,a.appliedPose,r.local,Gl.offsets)-r.property.offset)*r.scale,r.loop?s.time=o.duration+s.time%o.duration:s.time=Math.max(0,s.time)}const c=t.bones,l=o.bones;for(let d=0,u=o.bones.length;d<u;d++)c[l[d]].appliedPose.modifyLocal(t);o.apply(t,s.time,s.time,r.loop,null,s.mix,Ge.current,r.additive,!1,!0)}sort(t){const n=this.bone,s=this.data;n&&!s.local&&t.sortBone(n),t._updateCache.push(this);const r=t.bones,o=s.animation.bones;for(let h=0,f=s.animation.bones.length;h<f;h++){const p=r[o[h]];p.sorted=!1,t.sortReset(p.children),t.constrained(p)}const a=s.animation.timelines,c=t.slots,l=t.constraints,d=t.physics,u=t.physics.length;for(let h=0,f=s.animation.timelines.length;h<f;h++){const p=a[h];if(hX(p))t.constrained(c[p.slotIndex]);else if(p instanceof eo||p instanceof Za)t.drawOrder.constrained();else if(p instanceof uo)if(p.constraintIndex===-1)for(let m=0;m<u;m++)t.constrained(d[m]);else t.constrained(l[p.constraintIndex]);else if(pX(p)){const m=p.constraintIndex;m!==-1&&t.constrained(l[m])}}}};A(Gl,"offsets",[0,0,0,0,0,0]);let rg=Gl;class Io extends kc{constructor(t){super(t,new sg);A(this,"animation");A(this,"additive",!1);A(this,"loop",!1);A(this,"bone",null);A(this,"property");A(this,"scale",0);A(this,"offset",0);A(this,"local",!1);A(this,"max",0)}create(t){return new rg(this,t)}}class jT{constructor(){A(this,"name",null);A(this,"bones",[]);A(this,"slots",[]);A(this,"skins",[]);A(this,"defaultSkin",null);A(this,"events",[]);A(this,"animations",[]);A(this,"constraints",[]);A(this,"x",0);A(this,"y",0);A(this,"width",0);A(this,"height",0);A(this,"referenceScale",100);A(this,"version",null);A(this,"hash",null);A(this,"fps",30);A(this,"imagesPath",null);A(this,"audioPath",null)}findBone(e){if(!e)throw new Error("boneName cannot be null.");const t=this.bones;for(let n=0,s=t.length;n<s;n++)if(t[n].name===e)return t[n];return null}findSlot(e){if(!e)throw new Error("slotName cannot be null.");const t=this.slots;for(let n=0,s=t.length;n<s;n++)if(t[n].name===e)return t[n];return null}findSkin(e){if(!e)throw new Error("skinName cannot be null.");const t=this.skins;for(let n=0,s=t.length;n<s;n++)if(t[n].name===e)return t[n];return null}findEvent(e){if(!e)throw new Error("eventDataName cannot be null.");const t=this.events;for(let n=0,s=t.length;n<s;n++)if(t[n].name===e)return t[n];return null}findSliderAnimations(e){const t=this.constraints;for(let n=0,s=this.constraints.length;n<s;n++){const r=t[n];r instanceof Io&&r.animation!=null&&e.push(r.animation)}return e}findAnimation(e){if(!e)throw new Error("animationName cannot be null.");const t=this.animations;for(let n=0,s=t.length;n<s;n++)if(t[n].name===e)return t[n];return null}findConstraint(e,t){if(!e)throw new Error("constraintName cannot be null.");if(t==null)throw new Error("type cannot be null.");const n=this.constraints;for(let s=0,r=this.constraints.length;s<r;s++){const o=n[s];if(o instanceof t&&o.name===e)return o}return null}}class Vx{constructor(e=0,t,n){A(this,"slotIndex",0);A(this,"placeholder");A(this,"attachment");this.slotIndex=e,this.placeholder=t,this.attachment=n}}class og{constructor(e){A(this,"name");A(this,"attachments",[]);A(this,"bones",[]);A(this,"constraints",[]);A(this,"color",new at(.99607843,.61960787,.30980393,1));if(!e)throw new Error("name cannot be null.");this.name=e}setAttachment(e,t,n){if(!n)throw new Error("attachment cannot be null.");const s=this.attachments;e>=s.length&&(s.length=e+1),s[e]||(s[e]={}),s[e][t]=n}addSkin(e){for(let n=0;n<e.bones.length;n++){const s=e.bones[n];let r=!1;for(let o=0;o<this.bones.length;o++)if(this.bones[o]===s){r=!0;break}r||this.bones.push(s)}for(let n=0;n<e.constraints.length;n++){const s=e.constraints[n];let r=!1;for(let o=0;o<this.constraints.length;o++)if(this.constraints[o]===s){r=!0;break}r||this.constraints.push(s)}const t=e.getAttachments();for(let n=0;n<t.length;n++){const s=t[n];this.setAttachment(s.slotIndex,s.placeholder,s.attachment)}}copySkin(e){for(let n=0;n<e.bones.length;n++){const s=e.bones[n];let r=!1;for(let o=0;o<this.bones.length;o++)if(this.bones[o]===s){r=!0;break}r||this.bones.push(s)}for(let n=0;n<e.constraints.length;n++){const s=e.constraints[n];let r=!1;for(let o=0;o<this.constraints.length;o++)if(this.constraints[o]===s){r=!0;break}r||this.constraints.push(s)}const t=e.getAttachments();for(let n=0;n<t.length;n++){const s=t[n];s.attachment&&(s.attachment instanceof so?(s.attachment=s.attachment.newLinkedMesh(),this.setAttachment(s.slotIndex,s.placeholder,s.attachment)):(s.attachment=s.attachment.copy(),this.setAttachment(s.slotIndex,s.placeholder,s.attachment)))}}getAttachment(e,t){const n=this.attachments[e];return n?n[t]:null}removeAttachment(e,t){const n=this.attachments[e];n&&delete n[t]}getAttachments(){const e=[];for(let t=0;t<this.attachments.length;t++){const n=this.attachments[t];if(n)for(const s in n){const r=n[s];r&&e.push(new Vx(t,s,r))}}return e}getAttachmentsForSlot(e,t){const n=this.attachments[e];if(n)for(const s in n){const r=n[s];r&&t.push(new Vx(e,s,r))}}clear(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0}attachAll(e,t){let n=0;for(let s=0;s<e.slots.length;s++){const r=e.slots[s],o=r.pose.getAttachment();if(o&&n<t.attachments.length){const a=t.attachments[n];for(const c in a){const l=a[c];if(o===l){const d=this.getAttachment(n,c);d&&r.pose.setAttachment(d);break}}}n++}}}class HT extends mv{constructor(t,n,s){super(n,new ng);A(this,"index",0);A(this,"boneData");A(this,"attachmentName",null);A(this,"blendMode",Ou.Normal);A(this,"visible",!0);if(t<0)throw new Error("index must be >= 0.");if(!s)throw new Error("boneData cannot be null.");this.index=t,this.boneData=s}}var Ou;(function(i){i[i.Normal=0]="Normal",i[i.Additive=1]="Additive",i[i.Multiply=2]="Multiply",i[i.Screen=3]="Screen"})(Ou||(Ou={}));class ag{constructor(){A(this,"mixRotate",0);A(this,"mixX",0);A(this,"mixY",0);A(this,"mixScaleX",0);A(this,"mixScaleY",0);A(this,"mixShearY",0)}set(e){this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY}}class bv extends Pc{constructor(t,n){super(t,new ag,new ag);A(this,"bones");A(this,"source");if(!n)throw new Error("skeleton cannot be null.");this.bones=[];for(const r of t.bones)this.bones.push(n.bones[r.index].constrainedPose);const s=n.bones[t.source.index];if(s==null)throw new Error("source cannot be null.");this.source=s}copy(t){var n=new bv(this.data,t);return n.pose.set(this.pose),n}update(t,n){const s=this.appliedPose;if(s.mixRotate===0&&s.mixX===0&&s.mixY===0&&s.mixScaleX===0&&s.mixScaleY===0&&s.mixShearY===0)return;const r=this.data,o=r.localSource,a=r.localTarget,c=r.additive,l=r.clamp,d=r.offsets,u=this.source.appliedPose;o&&u.validateLocalTransform(t);const h=r.properties,f=r.properties.length,p=this.bones;for(let m=0,g=this.bones.length;m<g;m++){const v=p[m];a?v.modifyLocal(t):v.modifyWorld(t);for(let y=0;y<f;y++){const b=h[y],x=b.value(t,u,o,d)-b.offset,T=b.to;for(let E=0,S=b.to.length;E<S;E++){const C=T[E];if(C.mix(s)!==0){let M=C.offset+x*C.scale;l&&(C.offset<C.max?M=Le.clamp(M,C.offset,C.max):M=Le.clamp(M,C.max,C.offset)),C.apply(t,s,v,M,a,c)}}}}}sort(t){this.data.localSource||t.sortBone(this.source);const n=this.bones,s=this.bones.length,r=!this.data.localTarget;if(r)for(let o=0;o<s;o++)t.sortBone(n[o].bone);t._updateCache.push(this);for(let o=0;o<s;o++){const a=n[o].bone;t.sortReset(a.children),t.constrained(a)}for(let o=0;o<s;o++)n[o].bone.sorted=r}isSourceActive(){return this.source.active}}const bn=class bn extends kc{constructor(t){super(t,new ag);A(this,"bones",[]);A(this,"_source",null);A(this,"offsets",[0,0,0,0,0,0]);A(this,"offsetX",0);A(this,"offsetY",0);A(this,"localSource",!1);A(this,"localTarget",!1);A(this,"additive",!1);A(this,"clamp",!1);A(this,"properties",[])}set source(t){this._source=t}get source(){if(this._source)return this._source;throw new Error("BoneData not set.")}create(t){return new bv(this,t)}getOffsetRotation(){return this.offsets[bn.ROTATION]}setOffsetRotation(t){this.offsets[bn.ROTATION]=t}getOffsetX(){return this.offsets[bn.X]}setOffsetX(t){this.offsets[bn.X]=t}getOffsetY(){return this.offsets[bn.Y]}setOffsetY(t){this.offsets[bn.Y]=t}getOffsetScaleX(){return this.offsets[bn.SCALEX]}setOffsetScaleX(t){this.offsets[bn.SCALEX]=t}getOffsetScaleY(){return this.offsets[bn.SCALEY]}setOffsetScaleY(t){this.offsets[bn.SCALEY]=t}getOffsetShearY(){return this.offsets[bn.SHEARY]}setOffsetShearY(t){this.offsets[bn.SHEARY]=t}};A(bn,"ROTATION",0),A(bn,"X",1),A(bn,"Y",2),A(bn,"SCALEX",3),A(bn,"SCALEY",4),A(bn,"SHEARY",5);let Lt=bn;class rl{constructor(){A(this,"offset",0);A(this,"to",[])}}class ol{constructor(){A(this,"offset",0);A(this,"max",0);A(this,"scale",0)}}class lg extends rl{value(e,t,n,s){if(n)return t.rotation+s[Lt.ROTATION];const r=e.scaleX,o=e.scaleY;let a=Math.atan2(t.c/o,t.a/r)*Le.radDeg+((t.a*t.d-t.b*t.c)*r*o>0?s[Lt.ROTATION]:-s[Lt.ROTATION]);return a<0&&(a+=360),a}}class GT extends ol{mix(e){return e.mixRotate}apply(e,t,n,s,r,o){if(r)n.rotation+=(o?s:s-n.rotation)*t.mixRotate;else{const a=e.scaleX,c=e.scaleY,l=1/a,d=1/c,u=n.a*l,h=n.b*l,f=n.c*d,p=n.d*d;s*=Le.degRad,o||(s-=Math.atan2(f,u)),s>Le.PI?s-=Le.PI2:s<-Le.PI&&(s+=Le.PI2),s*=t.mixRotate;const m=Math.cos(s),g=Math.sin(s);n.a=(m*u-g*f)*a,n.b=(m*h-g*p)*a,n.c=(g*u+m*f)*c,n.d=(g*h+m*p)*c}}}class cg extends rl{value(e,t,n,s){return n?t.x+s[Lt.X]:(s[Lt.X]*t.a+s[Lt.Y]*t.b+t.worldX)/e.scaleX}}class WT extends ol{mix(e){return e.mixX}apply(e,t,n,s,r,o){r?n.x+=(o?s:s-n.x)*t.mixX:(o||(s-=n.worldX/e.scaleX),n.worldX+=s*t.mixX*e.scaleX)}}class dg extends rl{value(e,t,n,s){return n?t.y+s[Lt.Y]:(s[Lt.X]*t.c+s[Lt.Y]*t.d+t.worldY)/e.scaleY}}class qT extends ol{mix(e){return e.mixY}apply(e,t,n,s,r,o){r?n.y+=(o?s:s-n.y)*t.mixY:(o||(s-=n.worldY/e.scaleY),n.worldY+=s*t.mixY*e.scaleY)}}class ug extends rl{value(e,t,n,s){if(n)return t.scaleX+s[Lt.SCALEX];const r=t.a/e.scaleX,o=t.c/e.scaleY;return Math.sqrt(r*r+o*o)+s[Lt.SCALEX]}}class KT extends ol{mix(e){return e.mixScaleX}apply(e,t,n,s,r,o){if(r)o?n.scaleX*=1+(s-1)*t.mixScaleX:n.scaleX!==0&&(n.scaleX+=(s-n.scaleX)*t.mixScaleX);else if(o){const a=1+(s-1)*t.mixScaleX;n.a*=a,n.c*=a}else{let a=n.a/e.scaleX,c=n.c/e.scaleY,l=Math.sqrt(a*a+c*c);l!==0&&(l=1+(s-l)*t.mixScaleX/l,n.a*=l,n.c*=l)}}}class hg extends rl{value(e,t,n,s){if(n)return t.scaleY+s[Lt.SCALEY];const r=t.b/e.scaleX,o=t.d/e.scaleY;return Math.sqrt(r*r+o*o)+s[Lt.SCALEY]}}class JT extends ol{mix(e){return e.mixScaleY}apply(e,t,n,s,r,o){if(r)o?n.scaleY*=1+(s-1)*t.mixScaleY:n.scaleY!==0&&(n.scaleY+=(s-n.scaleY)*t.mixScaleY);else if(o){const a=1+(s-1)*t.mixScaleY;n.b*=a,n.d*=a}else{let a=n.b/e.scaleX,c=n.d/e.scaleY,l=Math.sqrt(a*a+c*c);l!==0&&(l=1+(s-l)*t.mixScaleY/l,n.b*=l,n.d*=l)}}}class fg extends rl{value(e,t,n,s){if(n)return t.shearY+s[Lt.SHEARY];const r=1/e.scaleX,o=1/e.scaleY;return(Math.atan2(t.d*o,t.b*r)-Math.atan2(t.c*o,t.a*r))*Le.radDeg-90+s[Lt.SHEARY]}}class ZT extends ol{mix(e){return e.mixShearY}apply(e,t,n,s,r,o){if(r)o||(s-=n.shearY),n.shearY+=s*t.mixShearY;else{const a=e.scaleX,c=e.scaleY,l=n.b/a,d=n.d/c,u=Math.atan2(d,l);s=(s+90)*Le.degRad,o?s-=Le.PI/2:(s-=u-Math.atan2(n.c/c,n.a/a),s>Le.PI?s-=Le.PI2:s<-Le.PI&&(s+=Le.PI2)),s=u+s*t.mixShearY;const h=Math.sqrt(l*l+d*d);n.b=Math.cos(s)*h*a,n.d=Math.sin(s)*h*c}}}class gte{constructor(e){A(this,"scale",1);A(this,"attachmentLoader");A(this,"linkedMeshes",[]);this.attachmentLoader=e}readSkeletonData(e){const t=this.scale,n=new jT;n.name="";const s=new yX(e),r=s.readInt32(),o=s.readInt32();n.hash=o===0&&r===0?null:o.toString(16)+r.toString(16),n.version=s.readString(),n.x=s.readFloat(),n.y=s.readFloat(),n.width=s.readFloat(),n.height=s.readFloat(),n.referenceScale=s.readFloat()*t;const a=s.readBoolean();a&&(n.fps=s.readFloat(),n.imagesPath=s.readString(),n.audioPath=s.readString());let c=0;c=s.readInt(!0);for(let p=0;p<c;p++){const m=s.readString();if(!m)throw new Error("String in string table must not be null.");s.strings.push(m)}const l=n.bones;c=s.readInt(!0);for(let p=0;p<c;p++){const m=s.readString();if(!m)throw new Error("Bone name must not be null.");const g=p===0?null:l[s.readInt(!0)],v=new Eh(p,m,g),y=v.setupPose;y.rotation=s.readFloat(),y.x=s.readFloat()*t,y.y=s.readFloat()*t,y.scaleX=s.readFloat(),y.scaleY=s.readFloat(),y.shearX=s.readFloat(),y.shearY=s.readFloat(),y.inherit=s.readByte(),v.length=s.readFloat()*t,v.skinRequired=s.readBoolean(),a&&(at.rgba8888ToColor(v.color,s.readInt32()),v.icon=s.readString()??void 0,v.iconSize=s.readFloat(),v.iconRotation=s.readFloat(),v.visible=s.readBoolean()),l.push(v)}c=s.readInt(!0);for(let p=0;p<c;p++){const m=s.readString();if(!m)throw new Error("Slot name must not be null.");const g=l[s.readInt(!0)],v=new HT(p,m,g);at.rgba8888ToColor(v.setupPose.color,s.readInt32());const y=s.readInt32();y!==-1&&at.rgb888ToColor(v.setupPose.darkColor=new at,y),v.attachmentName=s.readStringRef(),v.blendMode=s.readInt(!0),a&&(v.visible=s.readBoolean()),n.slots.push(v)}const d=n.constraints,u=s.readInt(!0);for(let p=0;p<u;p++){const m=s.readString();if(!m)throw new Error("Constraint data name must not be null.");let g;switch(s.readByte()){case UX:{const v=new Bd(m);g=s.readInt(!0);for(let x=0;x<g;x++)v.bones.push(l[s.readInt(!0)]);v.target=l[s.readInt(!0)];const y=s.readByte();v.skinRequired=(y&1)!==0,(y&2)!==0&&(v.scaleYMode=s.readUnsignedByte());const b=v.setupPose;b.bendDirection=(y&4)!==0?-1:1,b.compress=(y&8)!==0,b.stretch=(y&16)!==0,(y&32)!==0&&(b.mix=(y&64)!==0?s.readFloat():1),(y&128)!==0&&(b.softness=s.readFloat()*t),d.push(v);break}case XX:{const v=new Lt(m);g=s.readInt(!0);for(let x=0;x<g;x++)v.bones.push(l[s.readInt(!0)]);v.source=l[s.readInt(!0)];let y=s.readUnsignedByte();v.skinRequired=(y&1)!==0,v.localSource=(y&2)!==0,v.localTarget=(y&4)!==0,v.additive=(y&8)!==0,v.clamp=(y&16)!==0,g=y>>5;for(let x=0,T;x<g;x++){let E=1,S;switch(s.readByte()){case 0:S=new lg;break;case 1:{E=t,S=new cg;break}case 2:{E=t,S=new dg;break}case 3:S=new ug;break;case 4:S=new hg;break;case 5:S=new fg;break;default:S=null}if(S){S.offset=s.readFloat()*E,T=s.readByte();for(let C=0;C<T;C++){let M=1,k;switch(s.readByte()){case 0:k=new GT;break;case 1:{M=t,k=new WT;break}case 2:{M=t,k=new qT;break}case 3:k=new KT;break;case 4:k=new JT;break;case 5:k=new ZT;break;default:k=null}k&&(k.offset=s.readFloat()*M,k.max=s.readFloat()*M,k.scale=s.readFloat()*M/E,S.to[C]=k)}v.properties[x]=S}}y=s.readByte(),(y&1)!==0&&(v.offsets[Lt.ROTATION]=s.readFloat()),(y&2)!==0&&(v.offsets[Lt.X]=s.readFloat()*t),(y&4)!==0&&(v.offsets[Lt.Y]=s.readFloat()*t),(y&8)!==0&&(v.offsets[Lt.SCALEX]=s.readFloat()),(y&16)!==0&&(v.offsets[Lt.SCALEY]=s.readFloat()),(y&32)!==0&&(v.offsets[Lt.SHEARY]=s.readFloat()),y=s.readByte();const b=v.setupPose;(y&1)!==0&&(b.mixRotate=s.readFloat()),(y&2)!==0&&(b.mixX=s.readFloat()),(y&4)!==0&&(b.mixY=s.readFloat()),(y&8)!==0&&(b.mixScaleX=s.readFloat()),(y&16)!==0&&(b.mixScaleY=s.readFloat()),(y&32)!==0&&(b.mixShearY=s.readFloat()),d.push(v);break}case VX:{const v=new Ud(m);g=s.readInt(!0);for(let x=0;x<g;x++)v.bones.push(l[s.readInt(!0)]);v.slot=n.slots[s.readInt(!0)];const y=s.readByte();v.skinRequired=(y&1)!==0,v.positionMode=y>>1&1,v.spacingMode=y>>2&3,v.rotateMode=y>>4&3,(y&128)!==0&&(v.offsetRotation=s.readFloat());const b=v.setupPose;b.position=s.readFloat(),v.positionMode===Os.Fixed&&(b.position*=t),b.spacing=s.readFloat(),(v.spacingMode===En.Length||v.spacingMode===En.Fixed)&&(b.spacing*=t),b.mixRotate=s.readFloat(),b.mixX=s.readFloat(),b.mixY=s.readFloat(),d.push(v);break}case YX:{const v=new Vd(m);v.bone=l[s.readInt(!0)];let y=s.readByte();if(v.skinRequired=(y&1)!==0,(y&2)!==0&&(v.x=s.readFloat()),(y&4)!==0&&(v.y=s.readFloat()),(y&8)!==0&&(v.rotate=s.readFloat()),(y&16)!==0){let x=s.readFloat();x<-2?(v.scaleYMode=ri.Volume,x=-2-x):x<0&&(v.scaleYMode=ri.Uniform,x=-1-x),v.scaleX=x}(y&32)!==0&&(v.shearX=s.readFloat()),v.limit=((y&64)!==0?s.readFloat():5e3)*t,v.step=1/s.readUnsignedByte();const b=v.setupPose;b.inertia=s.readFloat(),b.strength=s.readFloat(),b.damping=s.readFloat(),b.massInverse=(y&128)!==0?s.readFloat():1,b.wind=s.readFloat(),b.gravity=s.readFloat(),y=s.readByte(),(y&1)!==0&&(v.inertiaGlobal=!0),(y&2)!==0&&(v.strengthGlobal=!0),(y&4)!==0&&(v.dampingGlobal=!0),(y&8)!==0&&(v.massGlobal=!0),(y&16)!==0&&(v.windGlobal=!0),(y&32)!==0&&(v.gravityGlobal=!0),(y&64)!==0&&(v.mixGlobal=!0),b.mix=(y&128)!==0?s.readFloat():1,d.push(v);break}case zX:{const v=new Io(m),y=s.readByte();if(v.skinRequired=(y&1)!==0,v.loop=(y&2)!==0,v.additive=(y&4)!==0,(y&8)!==0){const b=s.readFloat();a&&(y&64)!==0?v.max=b:v.setupPose.time=b}if((y&16)!==0&&(v.setupPose.mix=(y&32)!==0?s.readFloat():1),(y&64)!==0){v.local=(y&128)!==0,v.bone=l[s.readInt(!0)];const b=s.readFloat();let x=1;switch(s.readByte()){case 0:v.property=new lg;break;case 1:{x=t,v.property=new cg;break}case 2:{x=t,v.property=new dg;break}case 3:v.property=new ug;break;case 4:v.property=new hg;break;case 5:v.property=new fg;break;default:continue}v.property.offset=b*x,v.offset=s.readFloat(),v.scale=s.readFloat()/x}d.push(v);break}}}const h=this.readSkin(s,n,!0,a);h&&(n.defaultSkin=h,n.skins.push(h));{let p=n.skins.length;for(Ze.setArraySize(n.skins,c=p+s.readInt(!0));p<c;p++){const m=this.readSkin(s,n,!1,a);if(!m)throw new Error("readSkin() should not have returned null.");n.skins[p]=m}}c=this.linkedMeshes.length;for(let p=0;p<c;p++){const m=this.linkedMeshes[p],g=n.skins[m.skinIndex];if(!m.source)throw new Error("Linked mesh parent must not be null");const v=g.getAttachment(m.sourceIndex,m.source);if(!v)throw new Error(`Source mesh not found: ${m.source}`);m.mesh.timelineAttachment=m.inheritTimelines?v:m.mesh,m.mesh.setSourceMesh(v),m.mesh.updateSequence()}this.linkedMeshes.length=0,c=s.readInt(!0);for(let p=0;p<c;p++){const m=s.readString();if(!m)throw new Error("Event data name must not be null");const g=new zT(m),v=g.setupPose;v.intValue=s.readInt(!1),v.floatValue=s.readFloat(),v.stringValue=s.readString(),g._audioPath=s.readString(),g.audioPath&&(v.volume=s.readFloat(),v.balance=s.readFloat()),n.events.push(g)}const f=n.animations;c=s.readInt(!0);for(let p=0;p<c;p++){const m=s.readString();if(!m)throw new Error("Animation name must not be null.");f.push(this.readAnimation(s,m,n,a))}for(let p=0;p<u;p++){const m=d[p];m instanceof Io&&(m.animation=f[s.readInt(!0)])}return n}readSkin(e,t,n,s){let r=null,o=0;if(n){if(o=e.readInt(!0),o===0)return null;r=new og("default")}else{const a=e.readString();if(!a)throw new Error("Skin name must not be null.");r=new og(a),s&&at.rgba8888ToColor(r.color,e.readInt32());let c=e.readInt(!0),l=t.bones,d=r.bones;for(let u=0;u<c;u++)d[u]=l[e.readInt(!0)];c=e.readInt(!0),l=t.constraints,d=r.constraints;for(let u=0;u<c;u++)d[u]=l[e.readInt(!0)];o=e.readInt(!0)}for(let a=0;a<o;a++){const c=e.readInt(!0);for(let l=0,d=e.readInt(!0);l<d;l++){const u=e.readStringRef();if(!u)throw new Error("Attachment name must not be null");const h=this.readAttachment(e,t,r,c,u,s);h&&r.setAttachment(c,u,h)}}return r}readAttachment(e,t,n,s,r,o){const a=this.scale,c=e.readByte(),l=(c&8)!==0?e.readStringRef():r;if(!l)throw new Error("Attachment name must not be null");switch(c&7){case qs.Region:{let d=(c&16)!==0?e.readStringRef():null;const u=(c&32)!==0?e.readInt32():4294967295,h=this.readSequence(e,(c&64)!==0),f=(c&128)!==0?e.readFloat():0,p=e.readFloat(),m=e.readFloat(),g=e.readFloat(),v=e.readFloat(),y=e.readFloat(),b=e.readFloat();d||(d=l);const x=this.attachmentLoader.newRegionAttachment(n,r,l,d,h);return x?(x.path=d,x.x=p*a,x.y=m*a,x.scaleX=g,x.scaleY=v,x.rotation=f,x.width=y*a,x.height=b*a,at.rgba8888ToColor(x.color,u),x.updateSequence(),x):null}case qs.BoundingBox:{const d=this.readVertices(e,(c&16)!==0),u=o?e.readInt32():0,h=this.attachmentLoader.newBoundingBoxAttachment(n,r,l);return h?(h.worldVerticesLength=d.length,h.vertices=d.vertices,h.bones=d.bones,o&&at.rgba8888ToColor(h.color,u),h):null}case qs.Mesh:{let d=(c&16)!==0?e.readStringRef():l;const u=(c&32)!==0?e.readInt32():4294967295,h=this.readSequence(e,(c&64)!==0),f=e.readInt(!0),p=this.readVertices(e,(c&128)!==0),m=this.readFloatArray(e,p.length,1),g=this.readShortArray(e,(p.length-f-2)*3),v=e.readInt(!0);let y=null;if(v>0){y=[];for(let S=0;S<v;S++)y[S]=e.readInt(!0)}let b=[],x=0,T=0;o&&(b=this.readShortArray(e,e.readInt(!0)),x=e.readFloat(),T=e.readFloat()),d||(d=l);const E=this.attachmentLoader.newMeshAttachment(n,r,l,d,h);return E?(E.path=d,at.rgba8888ToColor(E.color,u),E.hullLength=f<<1,E.bones=p.bones,E.vertices=p.vertices,E.worldVerticesLength=p.length,E.regionUVs=m,E.triangles=g,y&&(E.timelineSlots=y),o&&(E.edges=b,E.width=x*a,E.height=T*a),E.updateSequence(),E):null}case qs.LinkedMesh:{const d=(c&16)!==0?e.readStringRef():l;if(d==null)throw new Error("Path of linked mesh must not be null");const u=(c&32)!==0?e.readInt32():4294967295,h=this.readSequence(e,(c&64)!==0),f=(c&128)!==0,p=e.readInt(!0),m=e.readInt(!0),g=e.readStringRef();let v=0,y=0;o&&(v=e.readFloat(),y=e.readFloat());const b=this.attachmentLoader.newMeshAttachment(n,r,l,d,h);return b?(b.path=d,at.rgba8888ToColor(b.color,u),o&&(b.width=v*a,b.height=y*a),this.linkedMeshes.push(new xX(b,m,s,p,g,f)),b):null}case qs.Path:{const d=(c&16)!==0,u=(c&32)!==0,h=this.readVertices(e,(c&64)!==0),f=this.readFloatArray(e,h.length/6,a),p=o?e.readInt32():0,m=this.attachmentLoader.newPathAttachment(n,r,l);return m?(m.closed=d,m.constantSpeed=u,m.worldVerticesLength=h.length,m.vertices=h.vertices,m.bones=h.bones,m.lengths=f,o&&at.rgba8888ToColor(m.color,p),m):null}case qs.Point:{const d=e.readFloat(),u=e.readFloat(),h=e.readFloat(),f=o?e.readInt32():0,p=this.attachmentLoader.newPointAttachment(n,r,l);return p?(p.x=u*a,p.y=h*a,p.rotation=d,o&&at.rgba8888ToColor(p.color,f),p):null}case qs.Clipping:{const d=e.readInt(!0),u=this.readVertices(e,(c&16)!==0),h=o?e.readInt32():0,f=this.attachmentLoader.newClippingAttachment(n,r,l);return f?(f.endSlot=t.slots[d],f.convex=(c&32)!==0,f.inverse=(c&64)!==0,f.worldVerticesLength=u.length,f.vertices=u.vertices,f.bones=u.bones,o&&at.rgba8888ToColor(f.color,h),f):null}}}readSequence(e,t){if(!t)return new Ja(1,!1);const n=new Ja(e.readInt(!0),!0);return n.start=e.readInt(!0),n.digits=e.readInt(!0),n.setupIndex=e.readInt(!0),n}readVertices(e,t){const n=this.scale,r=e.readInt(!0)<<1;if(!t)return new Xx(null,this.readFloatArray(e,r,n),r);const o=e.readInt(!0),a=[],c=[];for(let l=0,d=0;l<o;){const u=e.readInt(!0);a[l++]=u;for(let h=0;h<u;h++,d+=3)a[l++]=e.readInt(!0),c[d]=e.readFloat()*n,c[d+1]=e.readFloat()*n,c[d+2]=e.readFloat()}return new Xx(a,Ze.toFloatArray(c),r)}readFloatArray(e,t,n){const s=[];if(n===1)for(let r=0;r<t;r++)s[r]=e.readFloat();else for(let r=0;r<t;r++)s[r]=e.readFloat()*n;return s}readShortArray(e,t){const n=[];for(let s=0;s<t;s++)n[s]=e.readInt(!0);return n}readAnimation(e,t,n,s){e.readInt(!0);const r=[],o=this.scale;for(let f=0,p=e.readInt(!0);f<p;f++){const m=e.readInt(!0);for(let g=0,v=e.readInt(!0);g<v;g++){const y=e.readByte(),b=e.readInt(!0),x=b-1;switch(y){case LX:{const T=new Yl(b,m);for(let E=0;E<b;E++)T.setFrame(E,e.readFloat(),e.readStringRef());r.push(T);break}case DX:{const T=e.readInt(!0),E=new ST(b,T,m);let S=e.readFloat(),C=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,k=e.readUnsignedByte()/255,P=e.readUnsignedByte()/255;for(let I=0,D=0;E.setFrame(I,S,C,M,k,P),I!==x;I++){const $=e.readFloat(),j=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,Y=e.readUnsignedByte()/255,U=e.readUnsignedByte()/255;switch(e.readByte()){case xs:E.setStepped(I);break;case ws:St(e,E,D++,I,0,S,$,C,j,1),St(e,E,D++,I,1,S,$,M,B,1),St(e,E,D++,I,2,S,$,k,Y,1),St(e,E,D++,I,3,S,$,P,U,1)}S=$,C=j,M=B,k=Y,P=U}r.push(E);break}case OX:{const T=e.readInt(!0),E=new CT(b,T,m);let S=e.readFloat(),C=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,k=e.readUnsignedByte()/255;for(let P=0,I=0;E.setFrame(P,S,C,M,k),P!==x;P++){const D=e.readFloat(),$=e.readUnsignedByte()/255,j=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255;switch(e.readByte()){case xs:E.setStepped(P);break;case ws:St(e,E,I++,P,0,S,D,C,$,1),St(e,E,I++,P,1,S,D,M,j,1),St(e,E,I++,P,2,S,D,k,B,1)}S=D,C=$,M=j,k=B}r.push(E);break}case NX:{const T=e.readInt(!0),E=new TT(b,T,m);let S=e.readFloat(),C=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,k=e.readUnsignedByte()/255,P=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,D=e.readUnsignedByte()/255,$=e.readUnsignedByte()/255;for(let j=0,B=0;E.setFrame(j,S,C,M,k,P,I,D,$),j!==x;j++){const Y=e.readFloat(),U=e.readUnsignedByte()/255,O=e.readUnsignedByte()/255,L=e.readUnsignedByte()/255,R=e.readUnsignedByte()/255,X=e.readUnsignedByte()/255,z=e.readUnsignedByte()/255,K=e.readUnsignedByte()/255;switch(e.readByte()){case xs:E.setStepped(j);break;case ws:St(e,E,B++,j,0,S,Y,C,U,1),St(e,E,B++,j,1,S,Y,M,O,1),St(e,E,B++,j,2,S,Y,k,L,1),St(e,E,B++,j,3,S,Y,P,R,1),St(e,E,B++,j,4,S,Y,I,X,1),St(e,E,B++,j,5,S,Y,D,z,1),St(e,E,B++,j,6,S,Y,$,K,1)}S=Y,C=U,M=O,k=L,P=R,I=X,D=z,$=K}r.push(E);break}case $X:{const T=e.readInt(!0),E=new ET(b,T,m);let S=e.readFloat(),C=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,k=e.readUnsignedByte()/255,P=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,D=e.readUnsignedByte()/255;for(let $=0,j=0;E.setFrame($,S,C,M,k,P,I,D),$!==x;$++){const B=e.readFloat(),Y=e.readUnsignedByte()/255,U=e.readUnsignedByte()/255,O=e.readUnsignedByte()/255,L=e.readUnsignedByte()/255,R=e.readUnsignedByte()/255,X=e.readUnsignedByte()/255;switch(e.readByte()){case xs:E.setStepped($);break;case ws:St(e,E,j++,$,0,S,B,C,Y,1),St(e,E,j++,$,1,S,B,M,U,1),St(e,E,j++,$,2,S,B,k,O,1),St(e,E,j++,$,3,S,B,P,L,1),St(e,E,j++,$,4,S,B,I,R,1),St(e,E,j++,$,5,S,B,D,X,1)}S=B,C=Y,M=U,k=O,P=L,I=R,D=X}r.push(E);break}case BX:{const T=new AT(b,e.readInt(!0),m);let E=e.readFloat(),S=e.readUnsignedByte()/255;for(let C=0,M=0;T.setFrame(C,E,S),C!==x;C++){const k=e.readFloat(),P=e.readUnsignedByte()/255;switch(e.readByte()){case xs:T.setStepped(C);break;case ws:St(e,T,M++,C,0,E,k,S,P,1)}E=k,S=P}r.push(T)}}}}for(let f=0,p=e.readInt(!0);f<p;f++){const m=e.readInt(!0);for(let g=0,v=e.readInt(!0);g<v;g++){const y=e.readByte(),b=e.readInt(!0);if(y===FX){const T=new wT(b,m);for(let E=0;E<b;E++)T.setFrame(E,e.readFloat(),e.readByte());r.push(T);continue}const x=e.readInt(!0);switch(y){case CX:mn(e,r,new Fu(b,x,m),1);break;case AX:mn(e,r,new hT(b,x,m),o);break;case TX:mn(e,r,new fT(b,x,m),o);break;case EX:mn(e,r,new pT(b,x,m),o);break;case _X:mn(e,r,new mT(b,x,m),1);break;case MX:mn(e,r,new gT(b,x,m),1);break;case PX:mn(e,r,new vT(b,x,m),1);break;case kX:mn(e,r,new bT(b,x,m),1);break;case IX:mn(e,r,new yT(b,x,m),1);break;case RX:mn(e,r,new xT(b,x,m),1);break}}}for(let f=0,p=e.readInt(!0);f<p;f++){const m=e.readInt(!0),g=e.readInt(!0),v=g-1,y=new MT(g,e.readInt(!0),m);let b=e.readByte(),x=e.readFloat(),T=(b&1)!==0?(b&2)!==0?e.readFloat():1:0,E=(b&4)!==0?e.readFloat()*o:0;for(let S=0,C=0;y.setFrame(S,x,T,E,(b&8)!==0?1:-1,(b&16)!==0,(b&32)!==0),S!==v;S++){b=e.readByte();const M=e.readFloat(),k=(b&1)!==0?(b&2)!==0?e.readFloat():1:0,P=(b&4)!==0?e.readFloat()*o:0;(b&64)!==0?y.setStepped(S):(b&128)!==0&&(St(e,y,C++,S,0,x,M,T,k,1),St(e,y,C++,S,1,x,M,E,P,o)),x=M,T=k,E=P}r.push(y)}for(let f=0,p=e.readInt(!0);f<p;f++){const m=e.readInt(!0),g=e.readInt(!0),v=g-1,y=new PT(g,e.readInt(!0),m);let b=e.readFloat(),x=e.readFloat(),T=e.readFloat(),E=e.readFloat(),S=e.readFloat(),C=e.readFloat(),M=e.readFloat();for(let k=0,P=0;y.setFrame(k,b,x,T,E,S,C,M),k!==v;k++){const I=e.readFloat(),D=e.readFloat(),$=e.readFloat(),j=e.readFloat(),B=e.readFloat(),Y=e.readFloat(),U=e.readFloat();switch(e.readByte()){case xs:y.setStepped(k);break;case ws:St(e,y,P++,k,0,b,I,x,D,1),St(e,y,P++,k,1,b,I,T,$,1),St(e,y,P++,k,2,b,I,E,j,1),St(e,y,P++,k,3,b,I,S,B,1),St(e,y,P++,k,4,b,I,C,Y,1),St(e,y,P++,k,5,b,I,M,U,1)}b=I,x=D,T=$,E=j,S=B,C=Y,M=U}r.push(y)}for(let f=0,p=e.readInt(!0);f<p;f++){const m=e.readInt(!0),g=n.constraints[m];for(let v=0,y=e.readInt(!0);v<y;v++){const b=e.readByte(),x=e.readInt(!0),T=e.readInt(!0);switch(b){case GX:mn(e,r,new kT(x,T,m),g.positionMode===Os.Fixed?o:1);break;case WX:mn(e,r,new IT(x,T,m),g.spacingMode===En.Length||g.spacingMode===En.Fixed?o:1);break;case qX:{const E=new RT(x,T,m);let S=e.readFloat(),C=e.readFloat(),M=e.readFloat(),k=e.readFloat();for(let P=0,I=0,D=E.getFrameCount()-1;E.setFrame(P,S,C,M,k),P!==D;P++){const $=e.readFloat(),j=e.readFloat(),B=e.readFloat(),Y=e.readFloat();switch(e.readByte()){case xs:E.setStepped(P);break;case ws:St(e,E,I++,P,0,S,$,C,j,1),St(e,E,I++,P,1,S,$,M,B,1),St(e,E,I++,P,2,S,$,k,Y,1)}S=$,C=j,M=B,k=Y}r.push(E)}}}}for(let f=0,p=e.readInt(!0);f<p;f++){const m=e.readInt(!0)-1;for(let g=0,v=e.readInt(!0);g<v;g++){const y=e.readByte(),b=e.readInt(!0);if(y===iY){const T=new Du(b,m);for(let E=0;E<b;E++)T.setFrame(E,e.readFloat());r.push(T);continue}const x=e.readInt(!0);switch(y){case KX:mn(e,r,new FT(b,x,m),1);break;case JX:mn(e,r,new LT(b,x,m),1);break;case ZX:mn(e,r,new DT(b,x,m),1);break;case QX:mn(e,r,new OT(b,x,m),1);break;case eY:mn(e,r,new NT(b,x,m),1);break;case tY:mn(e,r,new $T(b,x,m),1);break;case nY:mn(e,r,new BT(b,x,m),1);break;default:throw new Error("Unknown physics timeline type.")}}}for(let f=0,p=e.readInt(!0);f<p;f++){const m=e.readInt(!0);for(let g=0,v=e.readInt(!0);g<v;g++){const y=e.readByte(),b=e.readInt(!0),x=e.readInt(!0);switch(y){case sY:mn(e,r,new UT(b,x,m),1);break;case rY:mn(e,r,new VT(b,x,m),1);break;default:throw new Error(`Uknown slider type: ${y}`)}}}for(let f=0,p=e.readInt(!0);f<p;f++){const m=n.skins[e.readInt(!0)];for(let g=0,v=e.readInt(!0);g<v;g++){const y=e.readInt(!0);for(let b=0,x=e.readInt(!0);b<x;b++){const T=e.readStringRef();if(!T)throw new Error("attachmentName must not be null.");const E=m.getAttachment(y,T),S=e.readByte(),C=e.readInt(!0),M=C-1;switch(S){case jX:{const k=E,P=k.bones,I=k.vertices,D=P?I.length/3*2:I.length,$=e.readInt(!0),j=new _T(C,$,y,k);let B=e.readFloat();for(let Y=0,U=0;;Y++){let O,L=e.readInt(!0);if(L===0)O=P?Ze.newFloatArray(D):I;else{O=Ze.newFloatArray(D);const X=e.readInt(!0);if(L+=X,o===1)for(let z=X;z<L;z++)O[z]=e.readFloat();else for(let z=X;z<L;z++)O[z]=e.readFloat()*o;if(!P)for(let z=0,K=O.length;z<K;z++)O[z]+=I[z]}if(j.setFrame(Y,B,O),Y===M)break;const R=e.readFloat();switch(e.readByte()){case xs:j.setStepped(Y);break;case ws:St(e,j,U++,Y,0,B,R,0,1,1)}B=R}r.push(j);break}case HX:{const k=new Lu(C,y,E);for(let P=0;P<C;P++){const I=e.readFloat(),D=e.readInt32();k.setFrame(P,I,uT[D&15],D>>4,e.readFloat())}r.push(k);break}}}}}const a=n.slots.length,c=e.readInt(!0);if(c>0){const f=new eo(c);for(let p=0;p<c;p++)f.setFrame(p,e.readFloat(),Yx(e,a));r.push(f)}const l=e.readInt(!0);for(let f=0;f<l;f++){const p=e.readInt(!0),m=new Array(p);for(let y=0;y<p;y++)m[y]=e.readInt(!0);const g=e.readInt(!0),v=new Za(g,m,a);for(let y=0;y<g;y++)v.setFrame(y,e.readFloat(),Yx(e,p));r.push(v)}const d=e.readInt(!0);if(d>0){const f=new vc(d);for(let p=0;p<d;p++){const m=e.readFloat(),g=n.events[e.readInt(!0)],v=new gv(m,g);v.intValue=e.readInt(!1),v.floatValue=e.readFloat(),v.stringValue=e.readString(),v.stringValue==null&&(v.stringValue=g.setupPose.stringValue),v.data.audioPath&&(v.volume=e.readFloat(),v.balance=e.readFloat()),f.setFrame(p,v)}r.push(f)}let u=0;for(let f=0,p=r.length;f<p;f++)u=Math.max(u,r[f].getDuration());const h=new uv(t,r,u);return s&&at.rgba8888ToColor(h.color,e.readInt32()),h}}class yX{constructor(e,t=[],n=0,s=new DataView(e instanceof ArrayBuffer?e:e.buffer)){A(this,"strings");A(this,"index");A(this,"buffer");this.strings=t,this.index=n,this.buffer=s}readByte(){return this.buffer.getInt8(this.index++)}readUnsignedByte(){return this.buffer.getUint8(this.index++)}readShort(){const e=this.buffer.getInt16(this.index);return this.index+=2,e}readInt32(){const e=this.buffer.getInt32(this.index);return this.index+=4,e}readInt(e){let t=this.readByte(),n=t&127;return(t&128)!==0&&(t=this.readByte(),n|=(t&127)<<7,(t&128)!==0&&(t=this.readByte(),n|=(t&127)<<14,(t&128)!==0&&(t=this.readByte(),n|=(t&127)<<21,(t&128)!==0&&(t=this.readByte(),n|=(t&127)<<28)))),e?n:n>>>1^-(n&1)}readStringRef(){const e=this.readInt(!0);return e===0?null:this.strings[e-1]}readString(){let e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;let t="";for(let n=0;n<e;){const s=this.readUnsignedByte();switch(s>>4){case 12:case 13:t+=String.fromCharCode((s&31)<<6|this.readByte()&63),n+=2;break;case 14:t+=String.fromCharCode((s&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),n+=3;break;default:t+=String.fromCharCode(s),n++}}return t}readFloat(){const e=this.buffer.getFloat32(this.index);return this.index+=4,e}readBoolean(){return this.readByte()!==0}}let xX=class{constructor(e,t,n,s,r,o){A(this,"source");A(this,"skinIndex");A(this,"slotIndex");A(this,"sourceIndex");A(this,"mesh");A(this,"inheritTimelines");this.mesh=e,this.skinIndex=t,this.slotIndex=n,this.sourceIndex=s,this.source=r,this.inheritTimelines=o}};class Xx{constructor(e=null,t,n=0){A(this,"bones");A(this,"vertices");A(this,"length");this.bones=e,this.vertices=t,this.length=n}}var qs;(function(i){i[i.Region=0]="Region",i[i.BoundingBox=1]="BoundingBox",i[i.Mesh=2]="Mesh",i[i.LinkedMesh=3]="LinkedMesh",i[i.Path=4]="Path",i[i.Point=5]="Point",i[i.Clipping=6]="Clipping"})(qs||(qs={}));function mn(i,e,t,n){t instanceof lr?wX(i,e,t,n):SX(i,e,t,n)}function wX(i,e,t,n){let s=i.readFloat(),r=i.readFloat()*n;for(let o=0,a=0,c=t.getFrameCount()-1;t.setFrame(o,s,r),o!==c;o++){const l=i.readFloat(),d=i.readFloat()*n;switch(i.readByte()){case xs:t.setStepped(o);break;case ws:St(i,t,a++,o,0,s,l,r,d,n)}s=l,r=d}e.push(t)}function SX(i,e,t,n){let s=i.readFloat(),r=i.readFloat()*n,o=i.readFloat()*n;for(let a=0,c=0,l=t.getFrameCount()-1;t.setFrame(a,s,r,o),a!==l;a++){const d=i.readFloat(),u=i.readFloat()*n,h=i.readFloat()*n;switch(i.readByte()){case xs:t.setStepped(a);break;case ws:St(i,t,c++,a,0,s,d,r,u,n),St(i,t,c++,a,1,s,d,o,h,n)}s=d,r=u,o=h}e.push(t)}function Yx(i,e){const t=i.readInt(!0);if(t===0)return null;const n=new Array(e).fill(-1),s=new Array(e-t);let r=0,o=0;for(let a=0;a<t;a++){const c=i.readInt(!0);for(;r!==c;)s[o++]=r++;n[r+i.readInt(!0)]=r++}for(;r<e;)s[o++]=r++;for(let a=e-1;a>=0;a--)n[a]===-1&&(n[a]=s[--o]);return n}function St(i,e,t,n,s,r,o,a,c,l){e.setBezier(t,n,s,r,a,i.readFloat(),i.readFloat()*l,i.readFloat(),i.readFloat()*l,o,c)}const CX=0,AX=1,TX=2,EX=3,_X=4,MX=5,PX=6,kX=7,IX=8,RX=9,FX=10,LX=0,DX=1,OX=2,NX=3,$X=4,BX=5,UX=0,VX=1,XX=2,YX=3,zX=4,jX=0,HX=1,GX=0,WX=1,qX=2,KX=0,JX=1,ZX=2,QX=4,eY=5,tY=6,nY=7,iY=8,sY=0,rY=1,xs=1,ws=2;class oY{constructor(e){A(this,"attachmentLoader");A(this,"scale",1);A(this,"linkedMeshes",[]);this.attachmentLoader=e}readSkeletonData(e){const t=this.scale,n=new jT,s=typeof e=="string"?JSON.parse(e):e,r=s.skeleton;if(r&&(n.hash=r.hash,n.version=r.spine,n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height,n.referenceScale=oe(r,"referenceScale",100)*t,n.fps=r.fps,n.imagesPath=r.images??null,n.audioPath=r.audio??null),s.bones)for(let o=0;o<s.bones.length;o++){const a=s.bones[o];let c=null;const l=oe(a,"parent",null);l&&(c=n.findBone(l));const d=new Eh(n.bones.length,a.name,c);d.length=oe(a,"length",0)*t;const u=d.setupPose;u.x=oe(a,"x",0)*t,u.y=oe(a,"y",0)*t,u.rotation=oe(a,"rotation",0),u.scaleX=oe(a,"scaleX",1),u.scaleY=oe(a,"scaleY",1),u.shearX=oe(a,"shearX",0),u.shearY=oe(a,"shearY",0),u.inherit=Ze.enumValue(an,oe(a,"inherit","Normal")),d.skinRequired=oe(a,"skin",!1);const h=oe(a,"color",null);h&&d.color.setFromString(h),d.icon=oe(a,"icon",void 0),d.iconSize=oe(a,"iconSize",1),d.iconRotation=oe(a,"iconRotation",0),n.bones.push(d)}if(s.slots)for(let o=0;o<s.slots.length;o++){const a=s.slots[o],c=a.name,l=n.findBone(a.bone);if(!l)throw new Error(`Couldn't find bone ${a.bone} for slot ${c}`);const d=new HT(n.slots.length,c,l),u=oe(a,"color",null);u&&d.setupPose.color.setFromString(u);const h=oe(a,"dark",null);h&&(d.setupPose.darkColor=at.fromString(h)),d.attachmentName=oe(a,"attachment",null),d.blendMode=Ze.enumValue(Ou,oe(a,"blend","normal")),d.visible=oe(a,"visible",!0),n.slots.push(d)}if(s.constraints)for(const o of s.constraints){const a=o.name,c=oe(o,"skin",!1);switch(oe(o,"type",!1)){case"ik":{const l=new Bd(a);l.skinRequired=c;for(let p=0;p<o.bones.length;p++){const m=n.findBone(o.bones[p]);if(!m)throw new Error(`Couldn't find bone ${o.bones[p]} for IK constraint ${a}.`);l.bones.push(m)}const d=o.target,u=n.findBone(d);if(!u)throw new Error(`Couldn't find target bone ${d} for IK constraint ${a}.`);l.target=u;const h=oe(o,"scaleY",null);h!=null&&(l.scaleYMode=Ze.enumValue(ri,h));const f=l.setupPose;f.mix=oe(o,"mix",1),f.softness=oe(o,"softness",0)*t,f.bendDirection=oe(o,"bendPositive",!0)?1:-1,f.compress=oe(o,"compress",!1),f.stretch=oe(o,"stretch",!1),n.constraints.push(l);break}case"transform":{const l=new Lt(a);l.skinRequired=c;for(let x=0;x<o.bones.length;x++){const T=o.bones[x],E=n.findBone(T);if(!E)throw new Error(`Couldn't find bone ${T} for transform constraint ${o.name}.`);l.bones.push(E)}const d=o.source,u=n.findBone(d);if(!u)throw new Error(`Couldn't find source bone ${d} for transform constraint ${o.name}.`);l.source=u,l.localSource=oe(o,"localSource",!1),l.localTarget=oe(o,"localTarget",!1),l.additive=oe(o,"additive",!1),l.clamp=oe(o,"clamp",!1);let h=!1,f=!1,p=!1,m=!1,g=!1,v=!1;const y=Object.entries(oe(o,"properties",{}));for(const[x,T]of y){const E=this.fromProperty(x),S=this.propertyScale(x,t);E.offset=oe(T,"offset",0)*S;const C=Object.entries(oe(T,"to",{}));for(const[M,k]of C){let P=1,I;switch(M){case"rotate":{h=!0,I=new GT;break}case"x":{f=!0,I=new WT,P=t;break}case"y":{p=!0,I=new qT,P=t;break}case"scaleX":{m=!0,I=new KT;break}case"scaleY":{g=!0,I=new JT;break}case"shearY":{v=!0,I=new ZT;break}default:throw new Error(`Invalid transform constraint to property: ${M}`)}I.offset=oe(k,"offset",0)*P,I.max=oe(k,"max",1)*P,I.scale=oe(k,"scale",1)*P/S,E.to.push(I)}E.to.length>0&&l.properties.push(E)}l.offsets[Lt.ROTATION]=oe(o,"rotation",0),l.offsets[Lt.X]=oe(o,"x",0)*t,l.offsets[Lt.Y]=oe(o,"y",0)*t,l.offsets[Lt.SCALEX]=oe(o,"scaleX",0),l.offsets[Lt.SCALEY]=oe(o,"scaleY",0),l.offsets[Lt.SHEARY]=oe(o,"shearY",0);const b=l.setupPose;h&&(b.mixRotate=oe(o,"mixRotate",1)),f&&(b.mixX=oe(o,"mixX",1)),p&&(b.mixY=oe(o,"mixY",b.mixX)),m&&(b.mixScaleX=oe(o,"mixScaleX",1)),g&&(b.mixScaleY=oe(o,"mixScaleY",b.mixScaleX)),v&&(b.mixShearY=oe(o,"mixShearY",1)),n.constraints.push(l);break}case"path":{const l=new Ud(a);l.skinRequired=c;for(let f=0;f<o.bones.length;f++){const p=o.bones[f],m=n.findBone(p);if(!m)throw new Error(`Couldn't find bone ${p} for path constraint ${o.name}.`);l.bones.push(m)}const d=o.slot,u=n.findSlot(d);if(!u)throw new Error(`Couldn't find slot ${d} for path constraint ${o.name}.`);l.slot=u,l.positionMode=Ze.enumValue(Os,oe(o,"positionMode","Percent")),l.spacingMode=Ze.enumValue(En,oe(o,"spacingMode","Length")),l.rotateMode=Ze.enumValue(Yo,oe(o,"rotateMode","Tangent")),l.offsetRotation=oe(o,"rotation",0);const h=l.setupPose;h.position=oe(o,"position",0),l.positionMode===Os.Fixed&&(h.position*=t),h.spacing=oe(o,"spacing",0),(l.spacingMode===En.Length||l.spacingMode===En.Fixed)&&(h.spacing*=t),h.mixRotate=oe(o,"mixRotate",1),h.mixX=oe(o,"mixX",1),h.mixY=oe(o,"mixY",h.mixX),n.constraints.push(l);break}case"physics":{const l=new Vd(a);l.skinRequired=c;const d=o.bone,u=n.findBone(d);if(u==null)throw new Error(`Physics bone not found: ${d}`);l.bone=u,l.x=oe(o,"x",0),l.y=oe(o,"y",0),l.rotate=oe(o,"rotate",0),l.scaleX=oe(o,"scaleX",0);const h=oe(o,"scaleY",null);h!=null&&(l.scaleYMode=Ze.enumValue(ri,h)),l.shearX=oe(o,"shearX",0),l.limit=oe(o,"limit",5e3)*t,l.step=1/oe(o,"fps",60);const f=l.setupPose;f.inertia=oe(o,"inertia",.5),f.strength=oe(o,"strength",100),f.damping=oe(o,"damping",.85),f.massInverse=1/oe(o,"mass",1),f.wind=oe(o,"wind",0),f.gravity=oe(o,"gravity",0),f.mix=oe(o,"mix",1),l.inertiaGlobal=oe(o,"inertiaGlobal",!1),l.strengthGlobal=oe(o,"strengthGlobal",!1),l.dampingGlobal=oe(o,"dampingGlobal",!1),l.massGlobal=oe(o,"massGlobal",!1),l.windGlobal=oe(o,"windGlobal",!1),l.gravityGlobal=oe(o,"gravityGlobal",!1),l.mixGlobal=oe(o,"mixGlobal",!1),n.constraints.push(l);break}case"slider":{const l=new Io(a);l.skinRequired=c,l.additive=oe(o,"additive",!1),l.loop=oe(o,"loop",!1),l.setupPose.mix=oe(o,"mix",1);const d=o.bone;if(d){if(l.bone=n.findBone(d),!l.bone)throw new Error(`Slider bone not found: ${d}`);const u=o.property;l.property=this.fromProperty(u);const h=this.propertyScale(u,t);l.property.offset=oe(o,"from",0)*h,l.offset=oe(o,"to",0),l.scale=oe(o,"scale",1)/h,l.max=oe(o,"max",0),l.local=oe(o,"local",!1)}else l.setupPose.time=oe(o,"time",0);n.constraints.push(l);break}}}if(s.skins)for(let o=0;o<s.skins.length;o++){const a=s.skins[o],c=new og(a.name);if(a.bones)for(let l=0;l<a.bones.length;l++){const d=a.bones[l],u=n.findBone(d);if(!u)throw new Error(`Couldn't find bone ${d} for skin ${a.name}.`);c.bones.push(u)}if(a.ik)for(let l=0;l<a.ik.length;l++){const d=a.ik[l],u=n.findConstraint(d,Bd);if(!u)throw new Error(`Couldn't find IK constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}if(a.transform)for(let l=0;l<a.transform.length;l++){const d=a.transform[l],u=n.findConstraint(d,Lt);if(!u)throw new Error(`Couldn't find transform constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}if(a.path)for(let l=0;l<a.path.length;l++){const d=a.path[l],u=n.findConstraint(d,Ud);if(!u)throw new Error(`Couldn't find path constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}if(a.physics)for(let l=0;l<a.physics.length;l++){const d=a.physics[l],u=n.findConstraint(d,Vd);if(!u)throw new Error(`Couldn't find physics constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}if(a.slider)for(let l=0;l<a.slider.length;l++){const d=a.slider[l],u=n.findConstraint(d,Io);if(!u)throw new Error(`Couldn't find slider constraint ${d} for skin ${a.name}.`);c.constraints.push(u)}for(const l in a.attachments){const d=n.findSlot(l);if(!d)throw new Error(`Couldn't find skin slot ${l} for skin ${a.name}.`);const u=a.attachments[l];for(const h in u){const f=this.readAttachment(u[h],c,d.index,h,n);f&&c.setAttachment(d.index,h,f)}}n.skins.push(c),c.name==="default"&&(n.defaultSkin=c)}for(let o=0,a=this.linkedMeshes.length;o<a;o++){const c=this.linkedMeshes[o],l=c.skin?n.findSkin(c.skin):n.defaultSkin;if(!l)throw new Error(`Skin not found: ${c.skin}`);const d=l.getAttachment(c.sourceIndex,c.source);if(!d)throw new Error(`Source mesh not found: ${c.source}`);c.mesh.timelineAttachment=c.inheritTimelines?d:c.mesh,c.mesh.setSourceMesh(d),c.mesh.updateSequence();e:if(c.inheritTimelines&&c.slotIndex!==c.sourceIndex){const u=d.timelineSlots;for(const f of u)if(f===c.slotIndex)break e;const h=[...u];h[u.length]=c.slotIndex,d.timelineSlots=h}}if(this.linkedMeshes.length=0,s.events)for(const o in s.events){const a=s.events[o],c=new zT(o),l=c.setupPose;l.intValue=oe(a,"int",0),l.floatValue=oe(a,"float",0),l.stringValue=oe(a,"string",""),c._audioPath=oe(a,"audio",null),c.audioPath&&(l.volume=oe(a,"volume",l.volume),l.balance=oe(a,"balance",l.balance)),n.events.push(c)}if(s.animations)for(const o in s.animations){const a=s.animations[o];this.readAnimation(a,o,n)}if(s.constraints)for(const o in s.constraints){const a=s.constraints[o];if(a.type==="slider"){const c=n.findConstraint(a.name,Io),l=a.animation,d=n.findAnimation(l);if(!d)throw new Error(`Slider animation not found: ${l}`);c.animation=d}}return n}fromProperty(e){let t;switch(e){case"rotate":t=new lg;break;case"x":t=new cg;break;case"y":t=new dg;break;case"scaleX":t=new ug;break;case"scaleY":t=new hg;break;case"shearY":t=new fg;break;default:throw new Error(`Invalid transform constraint from property: ${e}`)}return t}propertyScale(e,t){switch(e){case"x":case"y":return t;default:return 1}}readAttachment(e,t,n,s,r){const o=this.scale,a=oe(e,"name",s);switch(oe(e,"type","region")){case"region":{const c=oe(e,"path",a),l=this.readSequence(oe(e,"sequence",null)),d=this.attachmentLoader.newRegionAttachment(t,s,a,c,l);if(!d)return null;d.path=c,d.x=oe(e,"x",0)*o,d.y=oe(e,"y",0)*o,d.scaleX=oe(e,"scaleX",1),d.scaleY=oe(e,"scaleY",1),d.rotation=oe(e,"rotation",0),d.width=e.width*o,d.height=e.height*o;const u=oe(e,"color",null);return u&&d.color.setFromString(u),d.updateSequence(),d}case"boundingbox":{const c=this.attachmentLoader.newBoundingBoxAttachment(t,s,a);if(!c)return null;this.readVertices(e,c,e.vertexCount<<1);const l=oe(e,"color",null);return l&&c.color.setFromString(l),c}case"mesh":case"linkedmesh":{const c=oe(e,"path",a),l=this.readSequence(oe(e,"sequence",null)),d=this.attachmentLoader.newMeshAttachment(t,s,a,c,l);if(!d)return null;d.path=c;const u=oe(e,"color",null);u&&d.color.setFromString(u),d.width=oe(e,"width",0)*o,d.height=oe(e,"height",0)*o;const h=oe(e,"source",null);if(h){let p=n;const m=oe(e,"slot",null);if(m){const g=r.findSlot(m);if(!g)throw new Error(`Source mesh slot not found: ${m}`);p=g.index}return this.linkedMeshes.push(new aY(d,oe(e,"skin",null),n,p,h,oe(e,"timelines",!0))),d}const f=e.uvs;return this.readVertices(e,d,f.length),d.triangles=e.triangles,d.regionUVs=f,d.edges=oe(e,"edges",null),d.hullLength=oe(e,"hull",0)*2,d.updateSequence(),d}case"path":{const c=this.attachmentLoader.newPathAttachment(t,s,a);if(!c)return null;c.closed=oe(e,"closed",!1),c.constantSpeed=oe(e,"constantSpeed",!0);const l=e.vertexCount;this.readVertices(e,c,l<<1);const d=Ze.newArray(l/3,0);for(let h=0;h<e.lengths.length;h++)d[h]=e.lengths[h]*o;c.lengths=d;const u=oe(e,"color",null);return u&&c.color.setFromString(u),c}case"point":{const c=this.attachmentLoader.newPointAttachment(t,s,a);if(!c)return null;c.x=oe(e,"x",0)*o,c.y=oe(e,"y",0)*o,c.rotation=oe(e,"rotation",0);const l=oe(e,"color",null);return l&&c.color.setFromString(l),c}case"clipping":{const c=this.attachmentLoader.newClippingAttachment(t,s,a);if(!c)return null;const l=oe(e,"end",null);l&&(c.endSlot=r.findSlot(l)),c.convex=oe(e,"convex",!1),c.inverse=oe(e,"inverse",!1);const d=e.vertexCount;this.readVertices(e,c,d<<1);const u=oe(e,"color",null);return u&&c.color.setFromString(u),c}}return null}readSequence(e){if(e==null)return new Ja(1,!1);const t=new Ja(oe(e,"count",0),!0);return t.start=oe(e,"start",1),t.digits=oe(e,"digits",0),t.setupIndex=oe(e,"setup",0),t}readVertices(e,t,n){const s=this.scale;t.worldVerticesLength=n;const r=e.vertices;if(n===r.length){const c=Ze.toFloatArray(r);if(s!==1)for(let l=0,d=r.length;l<d;l++)c[l]*=s;t.vertices=c;return}const o=[],a=[];for(let c=0,l=r.length;c<l;){const d=r[c++];a.push(d);for(let u=c+d*4;c<u;c+=4)a.push(r[c]),o.push(r[c+1]*s),o.push(r[c+2]*s),o.push(r[c+3])}t.bones=a,t.vertices=Ze.toFloatArray(o)}readAnimation(e,t,n){const s=this.scale,r=[];if(e.slots)for(const l in e.slots){const d=e.slots[l],u=n.findSlot(l);if(!u)throw new Error(`Slot not found: ${l}`);const h=u.index;for(const f in d){const p=d[f];if(!p)continue;const m=p.length;switch(f){case"attachment":{const g=new Yl(m,h);for(let v=0;v<m;v++){const y=p[v];g.setFrame(v,oe(y,"time",0),oe(y,"name",null))}r.push(g);break}case"rgba":{const g=new ST(m,m<<2,h);let v=p[0],y=oe(v,"time",0),b=at.fromString(v.color);for(let x=0,T=0;;x++){g.setFrame(x,y,b.r,b.g,b.b,b.a);const E=p[x+1];if(!E){g.shrink(T);break}const S=oe(E,"time",0),C=at.fromString(E.color),M=v.curve;M&&(T=Et(M,g,T,x,0,y,S,b.r,C.r,1),T=Et(M,g,T,x,1,y,S,b.g,C.g,1),T=Et(M,g,T,x,2,y,S,b.b,C.b,1),T=Et(M,g,T,x,3,y,S,b.a,C.a,1)),y=S,b=C,v=E}r.push(g);break}case"rgb":{const g=new CT(m,m*3,h);let v=p[0],y=oe(v,"time",0),b=at.fromString(v.color);for(let x=0,T=0;;x++){g.setFrame(x,y,b.r,b.g,b.b);const E=p[x+1];if(!E){g.shrink(T);break}const S=oe(E,"time",0),C=at.fromString(E.color),M=v.curve;M&&(T=Et(M,g,T,x,0,y,S,b.r,C.r,1),T=Et(M,g,T,x,1,y,S,b.g,C.g,1),T=Et(M,g,T,x,2,y,S,b.b,C.b,1)),y=S,b=C,v=E}r.push(g);break}case"alpha":{yi(r,p,new AT(m,m,h),0,1);break}case"rgba2":{const g=new TT(m,m*7,h);let v=p[0],y=oe(v,"time",0),b=at.fromString(v.light),x=at.fromString(v.dark);for(let T=0,E=0;;T++){g.setFrame(T,y,b.r,b.g,b.b,b.a,x.r,x.g,x.b);const S=p[T+1];if(!S){g.shrink(E);break}const C=oe(S,"time",0),M=at.fromString(S.light),k=at.fromString(S.dark),P=v.curve;P&&(E=Et(P,g,E,T,0,y,C,b.r,M.r,1),E=Et(P,g,E,T,1,y,C,b.g,M.g,1),E=Et(P,g,E,T,2,y,C,b.b,M.b,1),E=Et(P,g,E,T,3,y,C,b.a,M.a,1),E=Et(P,g,E,T,4,y,C,x.r,k.r,1),E=Et(P,g,E,T,5,y,C,x.g,k.g,1),E=Et(P,g,E,T,6,y,C,x.b,k.b,1)),y=C,b=M,x=k,v=S}r.push(g);break}case"rgb2":{const g=new ET(m,m*6,h);let v=p[0],y=oe(v,"time",0),b=at.fromString(v.light),x=at.fromString(v.dark);for(let T=0,E=0;;T++){g.setFrame(T,y,b.r,b.g,b.b,x.r,x.g,x.b);const S=p[T+1];if(!S){g.shrink(E);break}const C=oe(S,"time",0),M=at.fromString(S.light),k=at.fromString(S.dark),P=v.curve;P&&(E=Et(P,g,E,T,0,y,C,b.r,M.r,1),E=Et(P,g,E,T,1,y,C,b.g,M.g,1),E=Et(P,g,E,T,2,y,C,b.b,M.b,1),E=Et(P,g,E,T,3,y,C,x.r,k.r,1),E=Et(P,g,E,T,4,y,C,x.g,k.g,1),E=Et(P,g,E,T,5,y,C,x.b,k.b,1)),y=C,b=M,x=k,v=S}r.push(g);break}default:throw new Error(`Invalid timeline type for a slot: ${p.name} (${d.name})`)}}}if(e.bones)for(const l in e.bones){const d=e.bones[l],u=n.findBone(l);if(!u)throw new Error(`Bone not found: ${l}`);const h=u.index;for(const f in d){const p=d[f],m=p.length;if(m!==0)switch(f){case"rotate":yi(r,p,new Fu(m,m,h),0,1);break;case"translate":_p(r,p,new hT(m,m<<1,h),"x","y",0,s);break;case"translatex":yi(r,p,new fT(m,m,h),0,s);break;case"translatey":yi(r,p,new pT(m,m,h),0,s);break;case"scale":_p(r,p,new mT(m,m<<1,h),"x","y",1,1);break;case"scalex":yi(r,p,new gT(m,m,h),1,1);break;case"scaley":yi(r,p,new vT(m,m,h),1,1);break;case"shear":_p(r,p,new bT(m,m<<1,h),"x","y",0,1);break;case"shearx":yi(r,p,new yT(m,m,h),0,1);break;case"sheary":yi(r,p,new xT(m,m,h),0,1);break;case"inherit":{const g=new wT(m,u.index);for(let v=0;v<p.length;v++){const y=p[v];g.setFrame(v,oe(y,"time",0),Ze.enumValue(an,oe(y,"inherit","Normal")))}r.push(g);break}default:throw new Error(`Invalid timeline type for a bone: ${p.name} (${d.name})`)}}}if(e.ik)for(const l in e.ik){const d=e.ik[l];let u=d[0];if(!u)continue;const h=n.findConstraint(l,Bd);if(!h)throw new Error(`IK Constraint not found: ${l}`);const f=new MT(d.length,d.length<<1,n.constraints.indexOf(h));let p=oe(u,"time",0),m=oe(u,"mix",1),g=oe(u,"softness",0)*s;for(let v=0,y=0;;v++){f.setFrame(v,p,m,g,oe(u,"bendPositive",!0)?1:-1,oe(u,"compress",!1),oe(u,"stretch",!1));const b=d[v+1];if(!b){f.shrink(y);break}const x=oe(b,"time",0),T=oe(b,"mix",1),E=oe(b,"softness",0)*s,S=u.curve;S&&(y=Et(S,f,y,v,0,p,x,m,T,1),y=Et(S,f,y,v,1,p,x,g,E,s)),p=x,m=T,g=E,u=b}r.push(f)}if(e.transform)for(const l in e.transform){const d=e.transform[l];let u=d[0];if(!u)continue;const h=n.findConstraint(l,Lt);if(!h)throw new Error(`Transform constraint not found: ${l}`);const f=new PT(d.length,d.length*6,n.constraints.indexOf(h));let p=oe(u,"time",0),m=oe(u,"mixRotate",1),g=oe(u,"mixX",1),v=oe(u,"mixY",g),y=oe(u,"mixScaleX",1),b=oe(u,"mixScaleY",1),x=oe(u,"mixShearY",1);for(let T=0,E=0;;T++){f.setFrame(T,p,m,g,v,y,b,x);const S=d[T+1];if(!S){f.shrink(E);break}const C=oe(S,"time",0),M=oe(S,"mixRotate",1),k=oe(S,"mixX",1),P=oe(S,"mixY",k),I=oe(S,"mixScaleX",1),D=oe(S,"mixScaleY",1),$=oe(S,"mixShearY",1),j=u.curve;j&&(E=Et(j,f,E,T,0,p,C,m,M,1),E=Et(j,f,E,T,1,p,C,g,k,1),E=Et(j,f,E,T,2,p,C,v,P,1),E=Et(j,f,E,T,3,p,C,y,I,1),E=Et(j,f,E,T,4,p,C,b,D,1),E=Et(j,f,E,T,5,p,C,x,$,1)),p=C,m=M,g=k,v=P,y=I,b=D,x=$,u=S}r.push(f)}if(e.path)for(const l in e.path){const d=e.path[l],u=n.findConstraint(l,Ud);if(!u)throw new Error(`Path constraint not found: ${l}`);const h=n.constraints.indexOf(u);for(const f in d){const p=d[f];let m=p[0];if(!m)continue;const g=p.length;switch(f){case"position":{const v=new kT(g,g,h);yi(r,p,v,0,u.positionMode===Os.Fixed?s:1);break}case"spacing":{const v=new IT(g,g,h);yi(r,p,v,0,u.spacingMode===En.Length||u.spacingMode===En.Fixed?s:1);break}case"mix":{const v=new RT(g,g*3,h);let y=oe(m,"time",0),b=oe(m,"mixRotate",1),x=oe(m,"mixX",1),T=oe(m,"mixY",x);for(let E=0,S=0;;E++){v.setFrame(E,y,b,x,T);const C=p[E+1];if(!C){v.shrink(S);break}const M=oe(C,"time",0),k=oe(C,"mixRotate",1),P=oe(C,"mixX",1),I=oe(C,"mixY",P),D=m.curve;D&&(S=Et(D,v,S,E,0,y,M,b,k,1),S=Et(D,v,S,E,1,y,M,x,P,1),S=Et(D,v,S,E,2,y,M,T,I,1)),y=M,b=k,x=P,T=I,m=C}r.push(v);break}}}}if(e.physics)for(const l in e.physics){const d=e.physics[l];let u=-1;if(l.length>0){const h=n.findConstraint(l,Vd);if(!h)throw new Error(`Physics constraint not found: ${l}`);u=n.constraints.indexOf(h)}for(const h in d){const f=d[h];let p=f[0];if(!p)continue;const m=f.length;let g,v=0;if(h==="reset"){const y=new Du(m,u);for(let b=0;p!=null;p=f[b+1],b++)y.setFrame(b,oe(p,"time",0));r.push(y);continue}switch(h){case"inertia":g=new FT(m,m,u);break;case"strength":g=new LT(m,m,u);break;case"damping":g=new DT(m,m,u);break;case"mass":g=new OT(m,m,u);break;case"wind":g=new NT(m,m,u);break;case"gravity":g=new $T(m,m,u);break;case"mix":{v=1,g=new BT(m,m,u);break}default:continue}yi(r,f,g,v,1)}}if(e.slider)for(const l in e.slider){const d=e.slider[l],u=n.findConstraint(l,Io);if(!u)throw new Error(`Slider not found: ${l}`);const h=n.constraints.indexOf(u);for(const f in d){const p=d[f];if(!p[0])continue;const g=p.length;switch(f){case"time":yi(r,p,new UT(g,g,h),1,1);break;case"mix":yi(r,p,new VT(g,g,h),1,1);break}}}if(e.attachments)for(const l in e.attachments){const d=e.attachments[l],u=n.findSkin(l);if(!u)throw new Error(`Skin not found: ${l}`);for(const h in d){const f=d[h],p=n.findSlot(h);if(!p)throw new Error(`Attachment slot not found: ${h}`);const m=p.index;for(const g in f){const v=f[g],y=u.getAttachment(m,g);if(!y)throw new Error(`Timeline attachment not found: ${g}`);for(const b in v){const x=v[b];let T=x[0];if(T){if(b==="deform"){const E=y.bones,S=y.vertices,C=E?S.length/3*2:S.length,M=new _T(x.length,x.length,m,y);let k=oe(T,"time",0);for(let P=0,I=0;;P++){let D;const $=oe(T,"vertices",null);if(!$)D=E?Ze.newFloatArray(C):S;else{D=Ze.newFloatArray(C);const U=oe(T,"offset",0);if(Ze.arrayCopy($,0,D,U,$.length),s!==1)for(let O=U,L=O+$.length;O<L;O++)D[O]*=s;if(!E)for(let O=0;O<C;O++)D[O]+=S[O]}M.setFrame(P,k,D);const j=x[P+1];if(!j){M.shrink(I);break}const B=oe(j,"time",0),Y=T.curve;Y&&(I=Et(Y,M,I,P,0,k,B,0,1,1)),k=B,T=j}r.push(M)}else if(b==="sequence"){const E=new Lu(x.length,m,y);let S=0;for(let C=0;C<x.length;C++){const M=oe(T,"delay",S),k=oe(T,"time",0),P=Nn[oe(T,"mode","hold")],I=oe(T,"index",0);E.setFrame(C,k,P,I,M),S=M,T=x[C+1]}r.push(E)}}}}}}if(e.drawOrder){const l=new eo(e.drawOrder.length),d=n.slots.length;let u=0;for(const h of e.drawOrder)l.setFrame(u++,oe(h,"time",0),zx(n,h,d,null));r.push(l)}if(e.drawOrderFolder)for(const l of e.drawOrderFolder){const d=oe(l,"slots",[]),u=new Array(d.length);let h=0;for(const g of d){const v=n.findSlot(g);if(!v)throw new Error(`Draw order folder slot not found: ${g}`);u[h++]=v.index}const f=oe(l,"keys",[]),p=new Za(f.length,u,n.slots.length);let m=0;for(const g of f)p.setFrame(m++,oe(g,"time",0),zx(n,g,u.length,u));r.push(p)}if(e.events){const l=new vc(e.events.length);let d=0;for(let u=0;u<e.events.length;u++,d++){const h=e.events[u],f=n.findEvent(h.name);if(!f)throw new Error(`Event not found: ${h.name}`);const p=f.setupPose,m=new gv(Ze.toSinglePrecision(oe(h,"time",0)),f);m.intValue=oe(h,"int",p.intValue),m.floatValue=oe(h,"float",p.floatValue),m.stringValue=oe(h,"string",p.stringValue),m.data.audioPath&&(m.volume=oe(h,"volume",p.volume),m.balance=oe(h,"balance",p.volume)),l.setFrame(d,m)}r.push(l)}let o=0;for(let l=0,d=r.length;l<d;l++)o=Math.max(o,r[l].getDuration());const a=new uv(t,r,o),c=oe(e,"color",null);c!==null&&a.color.setFromString(c),n.animations.push(a)}}class aY{constructor(e,t,n,s,r,o){A(this,"source");A(this,"skin");A(this,"slotIndex");A(this,"sourceIndex");A(this,"mesh");A(this,"inheritTimelines");this.mesh=e,this.skin=t,this.slotIndex=n,this.sourceIndex=s,this.source=r,this.inheritTimelines=o}}function yi(i,e,t,n,s){let r=e[0],o=r.time??0,a=(r.value??n)*s,c=0;for(let l=0;;l++){t.setFrame(l,o,a);const d=e[l+1];if(!d){t.shrink(c),i.push(t);return}const u=d.time??0,h=(d.value??n)*s;r.curve&&(c=Et(r.curve,t,c,l,0,o,u,a,h,s)),o=u,a=h,r=d}}function _p(i,e,t,n,s,r,o){let a=e[0],c=a.time??0,l=(a[n]??r)*o,d=(a[s]??r)*o,u=0;for(let h=0;;h++){t.setFrame(h,c,l,d);const f=e[h+1];if(!f){t.shrink(u),i.push(t);return}const p=f.time??0,m=(f[n]??r)*o,g=(f[s]??r)*o,v=a.curve;v&&(u=Et(v,t,u,h,0,c,p,l,m,o),u=Et(v,t,u,h,1,c,p,d,g,o)),c=p,l=m,d=g,a=f}}function zx(i,e,t,n){const s=e.offsets;if(!s)return null;const r=new Array(t).fill(-1),o=new Array(t-s.length);let a=0,c=0;for(const l of s){const d=i.findSlot(l.slot);if(d==null)throw new Error(`Draw order slot not found: ${l.slot}`);let u=0;if(!n)u=d.index;else{u=-1;for(let h=0;h<t;h++)if(n[h]===d.index){u=h;break}if(u===-1)throw new Error(`Slot not in folder: ${l.slot}`)}for(;a!==u;)o[c++]=a++;r[a+l.offset]=a++}for(;a<t;)o[c++]=a++;for(let l=t-1;l>=0;l--)r[l]===-1&&(r[l]=o[--c]);return r}function Et(i,e,t,n,s,r,o,a,c,l){if(i==="stepped")return e.setStepped(n),t;const d=s<<2,u=i[d],h=i[d+1]*l,f=i[d+2],p=i[d+3]*l;return e.setBezier(t,n,s,r,a,u,h,f,p,o,c),t+1}function oe(i,e,t){return i[e]!==void 0?i[e]:t}class lY{newRegionAttachment(e,t,n,s){return new yh(t,n)}newMeshAttachment(e,t,n,s){return new _c(t,n)}newBoundingBoxAttachment(e,t){return new TA(t)}newPathAttachment(e,t){return new mc(t)}newPointAttachment(e,t){return new IA(t)}newClippingAttachment(e,t){return new Ba(t)}}class cY{sequence(e){for(let t=0;t<e.regions.length;t++){if(e.regions[t])continue;const n=new cT;n.u=0,n.v=0,n.u2=1,n.v2=1,n.width=1,n.height=1,n.originalWidth=1,n.originalHeight=1,n.offsetX=0,n.offsetY=0,n.degrees=0,e.regions[t]=n}return e}newRegionAttachment(e,t,n,s,r){return new Ka(n,this.sequence(r))}newMeshAttachment(e,t,n,s,r){return new so(n,this.sequence(r))}newBoundingBoxAttachment(e,t,n){return new fv(n)}newPathAttachment(e,t,n){return new bc(n)}newPointAttachment(e,t,n){return new pv(n)}newClippingAttachment(e,t,n){return new Th(n)}}const dY=new Set(["normal","onlyTranslation","noRotationOrReflection","noScale","noScaleOrReflection"]);function uY(i,e,t){const n=i.uvs,s=i.vertices,r=i.triangles;if(!Array.isArray(n)||!n.length||n.length%2)throw new Error(ke("errors.invalidTrailUV",{name:e}));if(!Array.isArray(s)||!s.length)throw new Error(ke("errors.missingTrailVertices",{name:e}));const o=n.length/2;if(!Array.isArray(r)||r.some(d=>!Number.isInteger(d)||d<0||d>=o))throw new Error(ke("errors.trailIndexOutOfRange",{name:e}));const a=Number(i.hull)||0;if(!Number.isInteger(a)||a<0||a>o)throw new Error(ke("errors.invalidTrailHull",{name:e}));if(Array.isArray(i.edges)&&i.edges.some(d=>!Number.isInteger(d)||d<0||d>=o*2||d%2))throw new Error(ke("errors.trailHullIndexOutOfRange",{name:e}));if(s.length===n.length)return;let c=0,l=0;for(;c<s.length;){const d=s[c++];if(!Number.isInteger(d)||d<1)throw new Error(ke("errors.invalidInfluenceCount",{name:e}));let u=0;for(let h=0;h<d;h++){const f=s[c++],p=s[c++],m=s[c++],g=s[c++];if(!Number.isInteger(f)||f<0||f>=t)throw new Error(ke("errors.missingBoneReference",{name:e}));if(![p,m,g].every(Number.isFinite)||g<0)throw new Error(ke("errors.invalidWeight",{name:e}));u+=g}if(Math.abs(u-1)>.001)throw new Error(ke("errors.weightSum",{name:e}));l++}if(c!==s.length||l!==o)throw new Error(ke("errors.vertexCountMismatch",{name:e}))}function hY(i,e){var r,o,a,c;const t=Array.isArray(i.bones)?i.bones:[],n=new Map(t.map(l=>[String(l.name||""),l])),s=new Set;for(const l of t){if(l.inherit!=null&&!dY.has(l.inherit))throw new Error(ke("errors.invalidInherit",{name:l.name||"",inherit:l.inherit,version:e}));if(/_trail_\d+_\d+$/.test(String(l.name||""))){const d=n.get(String(l.parent||""));if(!d||/_trail_\d+_\d+$/.test(String(d.name||"")))throw new Error(ke("errors.trailBoneParent",{name:l.name||""}))}}for(const l of Array.isArray(i.skins)?i.skins:[]){const d=(l==null?void 0:l.attachments)||{};for(const u of Object.keys(d))for(const h of Object.keys(d[u]||{})){const f=d[u][h];(f==null?void 0:f.type)==="mesh"&&(uY(f,h,t.length),((r=f.vertices)==null?void 0:r.length)!==((o=f.uvs)==null?void 0:o.length)&&s.add(u))}}for(const l of Object.values(i.animations||{}))for(const d of s){const u=(c=(a=l==null?void 0:l.slots)==null?void 0:a[d])==null?void 0:c.attachment;if(Array.isArray(u)&&u.some(h=>!(h!=null&&h.name)))throw new Error(ke("errors.trailSlotEmpty",{name:d}))}}function fY(i){var e;if(String(((e=i==null?void 0:i.skeleton)==null?void 0:e.spine)||"")!=="3.8")throw new Error(ke("errors.spine38Version"));for(const t of i.bones||[])if(t.inherit!=null)throw new Error(ke("errors.spine38Inherit",{name:t.name||""}));for(const t of Object.values(i.animations||{})){for(const s of Object.values(t.slots||{})){if(s.rgba||s.rgba2)throw new Error(ke("errors.spine38SlotColor"));for(const r of s.attachment||[])if(!Object.prototype.hasOwnProperty.call(r,"name"))throw new Error(ke("errors.spine38AttachmentName"))}for(const s of Object.values(t.bones||{}))for(const r of s.rotate||[])if(r.value!=null||r.angle==null)throw new Error(ke("errors.spine38RotationAngle"));const n=[t];for(;n.length;){const s=n.pop();if(!(!s||typeof s!="object")){if(!Array.isArray(s)&&Array.isArray(s.curve))throw new Error(ke("errors.spine38Curve"));n.push(...Object.values(s))}}}}function jx(i,e){var o;const t=JSON.parse(i),n=gu((o=t==null?void 0:t.skeleton)==null?void 0:o.spine);if(!n)throw new Error(ke("errors.unsupportedExportVersion",{versions:_m()}));if(e&&n!==e)throw new Error(ke("errors.exportVersionMismatch",{expected:e,actual:n}));hY(t,n),n==="3.8"&&fY(t);const s=n==="3.8"?zA(JSON.parse(JSON.stringify(t))):t,r=n==="4.3"?new oY(new cY).readSkeletonData(s):new Eu(new lY).readSkeletonData(s);if(!r.bones.length)throw new Error(ke("errors.exportMissingBones"));return{version:n,bones:r.bones.length,slots:r.slots.length,animations:r.animations.length}}const QT="http://127.0.0.1:27843";class Nu extends Error{constructor(t,n="CONNECTOR_ERROR",s){super(t);A(this,"code");A(this,"pairUrl");this.name="SpineConnectorError",this.code=n,this.pairUrl=s}}function pg(i,e){return String(i||"").trim().replace(/[\\/:*?"<>|]+/g,"_").replace(/^\.+/,"")||e}function pY(i,e){const t=/\.([a-z0-9]{2,5})$/i.exec(i);return t?`.${t[1].toLowerCase()}`:e.includes("jpeg")?".jpg":e.includes("webp")?".webp":e.includes("gif")?".gif":".png"}function mY(i,e,t){const n=String(i||"").replace(/\\/g,"/").split("/").filter(Boolean).map(r=>pg(r,"images")),s=pg(e.replace(/\.[^./\\]+$/,""),"image");return[...n,`${s}${pY(e,t)}`].join("/")}async function Mp(i,e,t){if(!i)return null;const n=await fetch(i);if(!n.ok)throw new Error(ke("errors.readExportImageFailed",{name:t}));const s=await n.blob(),r=new Uint8Array(await s.arrayBuffer());let o="";const a=32768;for(let c=0;c<r.length;c+=a)o+=String.fromCharCode(...r.subarray(c,c+a));return{path:mY(e,t,s.type),dataBase64:btoa(o)}}async function eE(i,e){const t=[];let n=0;const s=o=>o.finally(()=>{n++,e==null||e(n,t.length)});for(const o of i.filter(a=>a.visible!==!1)){for(const a of o.config.imageResources)if(a.imageMode==="sequence"&&a.sequenceFrames.length)for(const c of a.sequenceFrames)t.push(s(Mp(c.previewUrl,a.textureFolder,c.name||a.textureName)));else t.push(s(Mp(a.previewUrl,a.textureFolder,a.textureName)));if(o.config.trail)for(const a of o.config.trailResources)t.push(s(Mp(a.previewUrl,"",a.textureName)))}const r=new Map;for(const o of await Promise.all(t))o&&!r.has(o.path)&&r.set(o.path,o);return[...r.values()]}async function gY(){try{const i=await fetch(`${QT}/v1/health`,{cache:"no-store"});if(!i.ok)throw new Error(`HTTP ${i.status}`);return{available:!0,...await i.json()}}catch(i){return{available:!1,authorized:!1,error:i instanceof Error?i.message:String(i)}}}async function vY(i,e){const t=await eE(i.systems,(s,r)=>{e==null||e({phase:"images",progress:r?s/r:1})}),n=JSON.stringify({schemaVersion:1,projectName:i.projectName,spineVersion:i.spineVersion,skeletonJson:i.skeletonJson,images:t});return new Promise((s,r)=>{const o=new XMLHttpRequest;o.open("POST",`${QT}/v1/convert`),o.responseType="blob",o.setRequestHeader("Content-Type","application/json"),o.upload.onprogress=a=>{e==null||e({phase:"upload",progress:a.lengthComputable&&a.total>0?a.loaded/a.total:null})},o.upload.onloadend=()=>e==null?void 0:e({phase:"processing",progress:null}),o.onprogress=a=>{e==null||e({phase:"download",progress:a.lengthComputable&&a.total>0?a.loaded/a.total:null})},o.onerror=()=>r(new Nu(ke("errors.connectorOffline"),"CONNECTOR_OFFLINE")),o.onload=async()=>{const a=o.response;if(o.status<200||o.status>=300){let d={};try{d=JSON.parse(await a.text())}catch{}r(new Nu(ke("errors.connectorHttpError",{status:o.status}),d.code,d.pairUrl));return}const c=o.getResponseHeader("X-Spine-File-Name");let l=`${pg(i.projectName,"SpineParticle")}.zip`;if(c)try{l=decodeURIComponent(c)}catch{}s({blob:a,fileName:l,spineEditorVersion:o.getResponseHeader("X-Spine-Editor-Version")||i.spineVersion,imageCount:t.length})},o.send(n)})}function bY(i,e){const t=URL.createObjectURL(i),n=document.createElement("a");n.href=t,n.download=/\.zip$/i.test(e)?e:`${e}.zip`,n.style.display="none",document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(t),1e3)}function yY(i){const e=atob(i),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function xY(i){const t=String(i||"./images/").replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+|\/+$/g,"").split("/").filter(Boolean);return!t.length||t.some(n=>n===".."||/^[a-z]+:/i.test(n))?"images":t.join("/")}function wY(i){return String(i||"SpineParticle").replace(/\.json$/i,"").replace(/[\\/:*?"<>|]+/g,"_").replace(/^\.+/,"")||"SpineParticle"}async function SY(i){const e=await eE(i.systems);if(!e.length)throw new Error(ke("errors.noExportableImages"));const t=xY(i.imagesPath);return{blob:eT(e.map(s=>({name:`${t}/${s.path}`,data:yY(s.dataBase64)}))),imageCount:e.length,folder:t}}function CY(i,e){const t=`${wY(e)}-images.zip`,n=URL.createObjectURL(i),s=document.createElement("a");return s.href=n,s.download=t,s.style.display="none",document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3),t}function AY(i){const{t:e}=mi();i.settings.exportSettings=QS(i.settings.exportSettings);const t=Fe(()=>i.settings.exportSettings),n=Re(!1),s=Re(null),r=Re(""),o=Re(!1),a=Re(null),c=Re(""),l=Re(""),d=Fe(()=>{const C=a.value;return C?C.available?C.spineFound?C.authorized?e("export.connectorReady"):e("export.notAuthorized"):e("export.spineNotFound"):e("export.connectorOffline"):e("export.connectorChecking")}),u=Fe(()=>{var C,M,k,P,I,D;return{ready:!!((C=a.value)!=null&&C.available)&&!!((M=a.value)!=null&&M.spineFound)&&!!((k=a.value)!=null&&k.authorized),warning:!!((P=a.value)!=null&&P.available)&&(!((I=a.value)!=null&&I.spineFound)||!((D=a.value)!=null&&D.authorized))}}),h=Fe(()=>{var C,M,k;return!!((C=a.value)!=null&&C.available)&&!!((M=a.value)!=null&&M.spineFound)&&!!((k=a.value)!=null&&k.authorized)}),f=Fe(()=>{const C=a.value;return!(C!=null&&C.available)||!C.spineFound||C.authorized||typeof window>"u"?"":`http://127.0.0.1:27843/pair?origin=${encodeURIComponent(window.location.origin)}`}),p=Fe(()=>{const C=a.value;return C?C.available?C.spineFound?C.authorized?"":e("export.unauthorized"):e("export.notFound"):e("export.offline"):e("export.checking")}),m=Fe(()=>n.value?e("export.connectorBusy"):p.value?`${e("common.disabled")}: ${p.value}`:e("export.connectorGenerate",{version:t.value.spineVersion}));Ti(()=>{y(),g=window.setInterval(y,3e3)});let g,v=0;Ar(()=>{g!==void 0&&window.clearInterval(g)});async function y(){const C=++v,M=await gY();if(C!==v)return;a.value=M;const k=l.value;(k==="CONNECTOR_OFFLINE"?M.available:k==="SPINE_NOT_FOUND"?M.available&&M.spineFound:k==="ORIGIN_NOT_ALLOWED"?M.available&&M.spineFound&&M.authorized:!!k&&M.available&&M.spineFound&&M.authorized)&&(l.value="",c.value="",o.value&&(o.value=!1,r.value=""))}function b(){return new Promise(C=>requestAnimationFrame(()=>C()))}async function x(C){i.timeline.playing=!1,i.timeline.frame=0,i.timeline.recorded=!1;for(const P of i.systems)P.frames=void 0;i.recalcTotalFrames(),await b(),i.timeline.playing=!0;const M=i.timeline.totalFrames/Math.max(1,i.timeline.fps)*1e3,k=performance.now()+Math.max(8e3,M*2.5+3e3);for(;!i.timeline.recorded;){if(performance.now()>k)throw new Error(e("export.timeout"));C==null||C(Math.min(.98,i.timeline.frame/Math.max(1,i.timeline.totalFrames-1))),await new Promise(P=>setTimeout(P,50))}C==null||C(1)}async function T(){if(!n.value){n.value=!0,s.value="json",o.value=!1,l.value="",c.value="",r.value=e("export.recalculating");try{await x();const C=Fx({systems:i.systems,timeline:i.timeline,settings:t.value});jx(C.text,t.value.spineVersion),rX(C,t.value.fileName);const M=C.warnings.length?e("export.resourceWarning",{count:C.warnings.length}):"";r.value=e("export.exported",{version:t.value.spineVersion,systems:C.particleSystemCount,animations:C.animationCount,bones:C.boneCount,warning:M})}catch(C){o.value=!0,r.value=C instanceof Error?C.message:String(C)}finally{n.value=!1,s.value=null}}}async function E(){if(n.value)return;n.value=!0,s.value="spine",o.value=!1,l.value="",c.value="",r.value=e("export.recalculating");const C=sT(e("export.projectTransferTitle"),e("export.projectTransferDetail"));try{await C.paint(),await x(I=>C.update(I*18,e("export.recalculating"))),C.update(20,e("export.generatingJson"));const M=Fx({systems:i.systems,timeline:i.timeline,settings:t.value});jx(M.text,t.value.spineVersion),r.value=e("export.preparingProject");const k=t.value.fileName.replace(/\.json$/i,"")||"SpineParticle",P=await vY({projectName:k,spineVersion:t.value.spineVersion,skeletonJson:M.text,systems:i.systems},({phase:I,progress:D})=>{I==="images"?C.update(D==null?null:22+D*18,e("export.preparingProjectFiles")):I==="upload"?C.update(D==null?null:40+D*30,e("export.uploading")):I==="processing"?C.update(null,e("export.spineProcessing")):C.update(D==null?null:82+D*16,e("export.downloadingProject"))});C.update(99,e("export.handingToBrowser")),bY(P.blob,P.fileName),r.value=e("export.projectExported",{fileName:P.fileName,images:P.imageCount,version:P.spineEditorVersion}),await y(),await C.finish(e("export.projectTransferDownload"))}catch(M){const k=M instanceof Error?M.message:String(M);o.value=!0,l.value=M instanceof Nu?M.code:"",M instanceof Nu&&M.pairUrl&&(c.value=M.pairUrl),r.value=k,await y(),await C.fail(k)}finally{n.value=!1,s.value=null}}async function S(){if(!n.value){n.value=!0,s.value="images",o.value=!1,l.value="",c.value="",r.value=e("export.collectingImages");try{const C=await SY({systems:i.systems,imagesPath:t.value.imagesPath}),M=CY(C.blob,t.value.fileName);r.value=e("export.imagesExported",{fileName:M,folder:C.folder,images:C.imageCount})}catch(C){o.value=!0,r.value=C instanceof Error?C.message:String(C)}finally{n.value=!1,s.value=null}}}return{exportSettings:t,exportBusy:n,exportTarget:s,exportMessage:r,exportError:o,connectorHealth:a,connectorPairUrl:c,connectorExportErrorCode:l,connectorStatusText:d,connectorStatusClass:u,connectorReady:h,connectorAuthorizationUrl:f,connectorDisabledReason:p,connectorButtonTitle:m,connectorHealthTimer:g,connectorHealthRequestId:v,refreshConnectorHealth:y,nextPaint:b,prepareExportFrames:x,exportSpineJson:T,exportSpineProject:E,exportSpineImages:S}}function TY(i){if(typeof i=="string")return i.trim()||void 0;if(!i||typeof i!="object"||Array.isArray(i))return;const e=Object.entries(i).filter(t=>typeof t[1]=="string"&&!!t[1].trim());return e.length?Object.fromEntries(e):void 0}function EY(i){if(!Array.isArray(i))return[];const e=[];for(const t of i){if(typeof t=="string"&&t.trim()){e.push({file:t});continue}if(!t||typeof t!="object"||Array.isArray(t))continue;const n=typeof t.file=="string"?t.file.trim():"";n&&e.push({file:n,name:TY(t.name)})}return e}function _Y(i,e){return typeof i.name=="string"?i.name:i.name&&typeof i.name=="object"?i.name[e]||i.name.en||i.name["zh-CN"]||i.file.replace(/^.*[\\/]/,"").replace(/\.json$/i,""):i.file.replace(/^.*[\\/]/,"").replace(/\.json$/i,"")}function MY(i){const e=Re(null),t=Re(""),n=Re([]),s=Re(!1),r=Re(""),o=Re(!1),a=Re([]),c=Re(!1),l=Re(""),d=Re(""),u=Re(!1),h=Re(null),f=Re("");function p(){return`SpineParticle-${new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"").replace("T","-")}`}function m(){o.value=!1,d.value="",l.value=p(),c.value=!0}function g(){u.value||(c.value=!1,d.value="")}async function v(){try{a.value=await vx(),a.value.some(D=>D.name===f.value)||(f.value="")}catch(D){a.value=[],o.value=!0,r.value=D instanceof Error?D.message:ke("config.local.storageUnavailable")}}async function y(){if(!u.value){d.value="",u.value=!0;try{const D=jm(l.value);if(a.value.some(j=>j.name===D)&&!window.confirm(ke("config.local.overwriteSave",{name:D})))return;const $=JSON.stringify(mx(i),null,2);await bx(D,$),Sl(i),f.value=D,await v(),o.value=!1,r.value=ke("config.local.saved",{name:D}),c.value=!1}catch(D){d.value=D instanceof Error?D.message:ke("config.local.storageUnavailable")}finally{u.value=!1}}}function b(D){f.value=D.name}async function x(D){if(window.confirm(ke("config.local.loadOverwrite",{name:D.name}))){o.value=!1,r.value=ke("config.loading");try{await Ym(i,D.text),Sl(i),r.value=ke("config.local.loaded",{name:D.name})}catch($){o.value=!0,r.value=$ instanceof Error?$.message:String($)}}}function T(D){const $=nT(D.name);yx(D.text,$),o.value=!1,r.value=ke("config.local.downloaded",{name:$})}function E(){const $=`SpineParticle-${new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"").replace("T","-")}.json`;yx(JSON.stringify(mx(i),null,2),$),Sl(i),o.value=!1,r.value=ke("config.local.downloaded",{name:$})}async function S(D){if(window.confirm(ke("config.local.deleteConfirm",{name:D.name})))try{await OU(D.name),f.value===D.name&&(f.value=""),await v(),o.value=!1,r.value=ke("config.local.deleted",{name:D.name})}catch($){o.value=!0,r.value=$ instanceof Error?$.message:ke("config.local.storageUnavailable")}}async function C(){try{const D=await vx();if(!D.length){o.value=!0,r.value=ke("config.local.downloadEmpty");return}const j=`SpineParticle-configs-${new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"").replace("T","-")}.zip`;NU(D,j),o.value=!1,r.value=ke("config.local.downloaded",{name:j})}catch(D){o.value=!0,r.value=D instanceof Error?D.message:ke("config.local.storageUnavailable")}}async function M(D){const $=D.target,j=Array.from($.files||[]);if($.value="",!j.length||u.value||!window.confirm(ke("config.local.loadAllConfirm",{count:j.length})))return;u.value=!0;let B=0,Y=0;try{for(const U of j)try{if(!/\.json$/i.test(U.name))throw new Error(ke("errors.chooseJsonConfig"));const O=await U.text();lv(O);const L=jm(U.name);await bx(L,O),B++}catch{Y++}await v(),o.value=Y>0,r.value=Y?ke("config.local.loadAllPartial",{imported:B,failed:Y}):ke("config.local.loadAllDone",{count:B})}finally{u.value=!1}}async function k(D){var B;const $=D.target,j=(B=$.files)==null?void 0:B[0];if(j){r.value=ke("config.loading"),o.value=!1;try{await xU(i,j),Sl(i),r.value=ke("config.loaded",{name:j.name})}catch(Y){o.value=!0,r.value=Y instanceof Error?Y.message:String(Y)}finally{$.value=""}}}async function P(){try{const D=await fetch(`/Preset/index.json?t=${Date.now()}`,{cache:"no-store"});if(!D.ok)throw new Error(ke("config.presetListError"));const $=await D.json();n.value=EY($)}catch{n.value=[]}}async function I(){const D=t.value;if(!D)return;s.value=!0,o.value=!1,r.value=ke("config.presetLoading");const $=sT(ke("config.presetTransferTitle"),ke("config.presetDownloading",{file:D}));try{await $.paint();const j=await fetch(`/Preset/${encodeURIComponent(D)}`,{cache:"no-store"});if(!j.ok)throw new Error(ke("config.presetReadError",{file:D}));const B=await kV(j,Y=>{$.update(Y==null?null:Y*55,ke("config.presetDownloading",{file:D}))});$.update(58,ke("config.presetParsing")),$.update(70,ke("config.presetRestoring")),await Ym(i,B),Sl(i),r.value=ke("config.presetLoaded",{name:D.replace(/\.json$/i,"")}),await $.finish(ke("config.presetComplete"))}catch(j){o.value=!0;const B=j instanceof Error?j.message:String(j);r.value=ke("config.presetNamingError",{message:B}),await $.fail(B)}finally{s.value=!1,t.value=""}}return Ti(()=>{P(),v(),window.addEventListener(zm,m)}),Ar(()=>window.removeEventListener(zm,m)),{configFileInput:e,selectedPreset:t,presetOptions:n,presetLoading:s,configMessage:r,configError:o,localProjects:a,selectedLocalProjectName:f,projectSaveOpen:c,projectNameDraft:l,projectSaveError:d,projectStorageBusy:u,saveConfig:m,closeProjectSaveDialog:g,confirmSaveConfig:y,loadLocalProject:x,downloadLocalProject:T,downloadCurrentProject:E,removeLocalProject:S,downloadAllLocalProjects:C,projectFilesInput:h,loadAllProjectFiles:M,selectLocalProject:b,onConfigFileChange:k,refreshPresets:P,loadSelectedPreset:I}}function PY(i){const e=Re(null),t=Re(null),n=Re(null),s=Re(null),r=Re(null);function o(){var R;const O=(R=i.value)==null?void 0:R.config;if(!O)return;const L=Math.max(0,...O.trailResources.map(X=>X.id))+1;O.trailResources.push({id:L,texture:null,textureName:"trail",previewUrl:"/images/trail.png",weight:100,locked:!1,rotation:0,colorMode:"particle",color:"#ffffff",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],blend:"normal",alphaMode:"particle",alpha:1,alphaCurve:Wm.map(X=>({...X})),boneCount:3,trailRatio:100,lengthMode:"fixed",length:100,lengthMin:100,lengthMax:100,widthSizeMode:"fixed",width:100,widthMin:100,widthMax:100,widthMode:"particle",lifeLengthEnabled:!1,lifeLengthCurve:Hm.map(X=>({...X})),shapeEnabled:!1,shapeCurve:qm.map(X=>({...X}))}),p()}function a(O){var L;r.value=O,(L=s.value)==null||L.click()}function c(O,L){var z;const R=(z=i.value)==null?void 0:z.config;if(!R)return;const X=O==="trailGridCols"?32:16;R[O]=Math.min(X,Math.max(2,Math.round(Number(L)||2)))}function l(O,L){var X;const R=(X=i.value)==null?void 0:X.config.trailResources.find(z=>z.id===O);R&&(R.boneCount=Math.min(16,Math.max(2,Math.round(Number(L)||2))))}function d(O,L){var X;const R=(X=i.value)==null?void 0:X.config.trailResources.find(z=>z.id===O);R&&(R.rotation=Math.max(-360,Math.min(360,Number(L)||0)))}async function u(O){var Z,ae;const L=O.target,R=(Z=L.files)==null?void 0:Z[0],X=(ae=i.value)==null?void 0:ae.config,z=X==null?void 0:X.trailResources.find(ce=>ce.id===r.value);if(!R||!z){L.value="";return}const K=await C(R);z.texture=Hr(await tt.fromURL(K)),z.previewUrl=K,z.textureName=R.name.replace(/\.[^.]+$/,"")||"trail",L.value="",r.value=null}async function h(O){var X;const L=(X=i.value)==null?void 0:X.config,R=L==null?void 0:L.trailResources.find(z=>z.id===O);R&&(R.texture=Hr(await tt.fromURL("/images/trail.png")),R.previewUrl="/images/trail.png",R.textureName="trail",R.weight=100,R.locked=!1,R.rotation=0,R.boneCount=3,R.trailRatio=100,R.lengthMode="fixed",R.length=100,R.lengthMin=100,R.lengthMax=100,R.widthSizeMode="fixed",R.width=100,R.widthMin=100,R.widthMax=100,R.widthMode="particle",R.lifeLengthEnabled=!1,R.lifeLengthCurve=Hm.map(z=>({...z})),R.shapeEnabled=!1,R.shapeCurve=qm.map(z=>({...z})),R.colorMode="particle",R.color="#ffffff",R.colorGradient=[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],R.blend="normal",R.alphaMode="particle",R.alpha=1,R.alphaCurve=Wm.map(z=>({...z})),p())}function f(O){var X;const L=(X=i.value)==null?void 0:X.config.trailResources;if(!L||L.length<=1)return;const R=L.findIndex(z=>z.id===O);R>=0&&L.splice(R,1),p()}function p(){var z;const O=(z=i.value)==null?void 0:z.config.trailResources;if(!(O!=null&&O.length))return;if(O.length===1){O[0].weight=100,O[0].locked=!1;return}const L=O.filter(K=>K.locked),R=O.filter(K=>!K.locked);let X=L.reduce((K,Z)=>K+Math.max(0,Number(Z.weight)||0),0);X>100&&(j(L,100,!0),X=100),j(R,100-X)}function m(O,L){var ae;const R=(ae=i.value)==null?void 0:ae.config.trailResources;if(!(R!=null&&R.length))return;if(R.length===1){R[0].weight=100,R[0].locked=!1;return}const X=R.find(ce=>ce.id===O);if(!X||X.locked)return;const z=R.filter(ce=>ce.id!==O&&ce.locked).reduce((ce,ve)=>ce+Math.max(0,Number(ve.weight)||0),0),K=Math.max(0,100-z),Z=R.filter(ce=>ce.id!==O&&!ce.locked);X.weight=$(Math.min(K,Math.max(0,Number(L)||0))),Z.length?j(Z,K-X.weight,!0):X.weight=$(K)}function g(O){var X;const L=(X=i.value)==null?void 0:X.config.trailResources;if(!L||L.length===1)return;const R=L.find(z=>z.id===O);R&&(R.locked=!R.locked)}function v(O,L){const R=L.target;O.color=k(R.value,O.color),R.value=O.color}function y(O,L){v(O,L),L.target.blur()}function b(){var R;const O=(R=i.value)==null?void 0:R.config;if(!O)return;const L=Math.max(0,...O.imageResources.map(X=>X.id))+1;O.imageResources.push({id:L,texture:O.texture,textureName:"star",textureFolder:"",previewUrl:"/images/star.png",imageMode:"fixed",sequencePlayback:"loop-forward",sequenceFps:30,sequenceFrames:[],weight:100,locked:!1,scale:1,anchorX:.5,anchorY:.5,colorMode:"fixed",colorStart:"#ffffff",colorEnd:"#ff4d4d",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],blend:"normal",independentAlpha:"off",alpha:1,alphaCurveMode:"跟随导出",alphaCurve:Gm.map(X=>({...X}))}),B()}function x(O){var L;n.value=O,(L=e.value)==null||L.click()}function T(O){var L;n.value=O,(L=t.value)==null||L.click()}async function E(O){var ae,ce;const L=O.target,R=(ae=L.files)==null?void 0:ae[0],X=(ce=i.value)==null?void 0:ce.config,z=X==null?void 0:X.imageResources.find(ve=>ve.id===n.value);if(!R||!z){L.value="";return}const K=await C(R),Z=Hr(await tt.fromURL(K));z.texture=Z,z.previewUrl=K,z.textureFolder="",z.textureName=R.name.replace(/\.[^.]+$/,"")||"particle",L.value="",n.value=null}async function S(O){var K;const L=O.target,R=Array.from(L.files||[]).sort((Z,ae)=>Z.name.localeCompare(ae.name,void 0,{numeric:!0,sensitivity:"base"})),X=(K=i.value)==null?void 0:K.config,z=X==null?void 0:X.imageResources.find(Z=>Z.id===n.value);if(!R.length||!z){L.value="";return}z.sequenceFrames=await Promise.all(R.map(async Z=>{const ae=await C(Z);return{name:Z.name,previewUrl:ae,texture:Hr(await tt.fromURL(ae))}})),z.imageMode="sequence",L.value="",n.value=null}function C(O){return new Promise((L,R)=>{const X=new FileReader;X.onload=()=>L(String(X.result||"")),X.onerror=()=>R(X.error),X.readAsDataURL(O)})}function M(O){var X;const L=(X=i.value)==null?void 0:X.config,R=L==null?void 0:L.imageResources.find(z=>z.id===O);!L||!R||(R.texture=L.texture,R.textureName="star",R.textureFolder="",R.previewUrl="/images/star.png",R.imageMode="fixed",R.sequencePlayback="loop-forward",R.sequenceFps=30,R.sequenceFrames=[],R.scale=1,R.anchorX=.5,R.anchorY=.5,R.colorMode="fixed",R.colorStart="#ffffff",R.colorEnd="#ff4d4d",R.colorGradient=[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],R.blend="normal",R.independentAlpha="off",R.alpha=1,R.alphaCurveMode="跟随导出",R.alphaCurve=Gm.map(z=>({...z})),R.locked=!1,B())}function k(O,L){let R=O.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(R)&&(R=R.split("").map(X=>X+X).join("")),/^[0-9a-f]{6}$/i.test(R)?`#${R.toLowerCase()}`:L}function P(O,L){const R=L.target;O.colorStart=k(R.value,O.colorStart),R.value=O.colorStart}function I(O,L){P(O,L),L.target.blur()}function D(O){var X;const L=(X=i.value)==null?void 0:X.config.imageResources;if(!L||L.length<=1)return;const R=L.findIndex(z=>z.id===O);R>=0&&L.splice(R,1),B()}function $(O){return Math.round(O)}function j(O,L,R=!1){if(!O.length)return;const X=Math.max(0,$(L)),z=R?O.reduce((Z,ae)=>Z+Math.max(0,Number(ae.weight)||0),0):0;let K=0;O.forEach((Z,ae)=>{const ce=ae===O.length-1,ve=$(ce?X-K:z>0?X*Math.max(0,Number(Z.weight)||0)/z:X/O.length);Z.weight=ve,K+=ve})}function B(){var z;const O=(z=i.value)==null?void 0:z.config.imageResources;if(!(O!=null&&O.length))return;if(O.length===1){O[0].weight=100,O[0].locked=!1;return}const L=O.filter(K=>K.locked),R=O.filter(K=>!K.locked);let X=L.reduce((K,Z)=>K+Math.max(0,Number(Z.weight)||0),0);X>100&&(j(L,100,!0),X=100),j(R,100-X)}function Y(O,L){var ae;const R=(ae=i.value)==null?void 0:ae.config.imageResources;if(!(R!=null&&R.length))return;if(R.length===1){R[0].weight=100,R[0].locked=!1;return}const X=R.find(ce=>ce.id===O);if(!X||X.locked)return;const z=R.filter(ce=>ce.id!==O&&ce.locked).reduce((ce,ve)=>ce+Math.max(0,Number(ve.weight)||0),0),K=Math.max(0,100-z),Z=R.filter(ce=>ce.id!==O&&!ce.locked);if(X.weight=$(Math.min(K,Math.max(0,Number(L)||0))),!Z.length){X.weight=$(K);return}j(Z,K-X.weight,!0)}function U(O){var X;const L=(X=i.value)==null?void 0:X.config.imageResources;if(!L||L.length===1)return;const R=L.find(z=>z.id===O);R&&(R.locked=!R.locked)}return{textureFileInput:e,sequenceFileInput:t,pendingResourceId:n,trailTextureFileInput:s,pendingTrailResourceId:r,addTrailResource:o,openTrailTexturePicker:a,onTrailRigChange:c,onTrailResourceBoneCountChange:l,onTrailResourceRotationChange:d,onTrailTextureFile:u,resetTrailTexture:h,removeTrailResource:f,rebalanceTrailWeights:p,setTrailResourceWeight:m,toggleTrailResourceLock:g,setTrailColor:v,commitTrailColor:y,addImageResource:b,openTexturePicker:x,openSequencePicker:T,onTextureFile:E,onSequenceFiles:S,readFileAsDataUrl:C,resetTexture:M,normalizeHex:k,setResourceFixedColor:P,commitResourceFixedColor:I,removeImageResource:D,roundWeight:$,distributeImageWeights:j,rebalanceImageWeights:B,setResourceWeight:Y,toggleResourceLock:U}}const tE=[{key:"config",titleKey:"config.title",requiresParticle:!1},{key:"scene",titleKey:"scene.title",requiresParticle:!1},{key:"emitMode",titleKey:"emission.title",requiresParticle:!0},{key:"shape",titleKey:"emission.shapeTitle",requiresParticle:!0},{key:"attr",titleKey:"attributes.title",requiresParticle:!0},{key:"look",titleKey:"appearance.title",requiresParticle:!0},{key:"mods",titleKey:"modifiers.title",requiresParticle:!0},{key:"export",titleKey:"export.title",requiresParticle:!0}];function kY(){const i=Zo(),{t:e}=mi(),{exportSettings:t,exportBusy:n,exportTarget:s,exportMessage:r,exportError:o,connectorPairUrl:a,connectorStatusText:c,connectorStatusClass:l,connectorReady:d,connectorAuthorizationUrl:u,connectorDisabledReason:h,connectorButtonTitle:f,refreshConnectorHealth:p,exportSpineJson:m,exportSpineProject:g,exportSpineImages:v}=AY(i),{configFileInput:y,selectedPreset:b,presetOptions:x,presetLoading:T,configMessage:E,configError:S,localProjects:C,projectSaveOpen:M,projectNameDraft:k,projectSaveError:P,projectStorageBusy:I,saveConfig:D,closeProjectSaveDialog:$,confirmSaveConfig:j,loadLocalProject:B,downloadLocalProject:Y,downloadCurrentProject:U,removeLocalProject:O,downloadAllLocalProjects:L,projectFilesInput:R,loadAllProjectFiles:X,selectedLocalProjectName:z,selectLocalProject:K,onConfigFileChange:Z,refreshPresets:ae,loadSelectedPreset:ce}=MY(i);function ve(ne){return ne==="跟随导出"?t.value.keyframeCurve==="bezier"?"bezier":"linear":ne==="贝塞尔"?"bezier":"linear"}i.systems.length||i.addSystem();const we=Fe(()=>{const ne=i.systems.findIndex(me=>me.id===i.activeId);return ne>=0?ne:0}),re=Fe(()=>i.systems[we.value]||null),{textureFileInput:Ee,sequenceFileInput:q,trailTextureFileInput:J,addTrailResource:ie,openTrailTexturePicker:se,onTrailRigChange:H,onTrailResourceBoneCountChange:G,onTrailResourceRotationChange:N,onTrailTextureFile:V,resetTrailTexture:W,removeTrailResource:ee,setTrailResourceWeight:be,toggleTrailResourceLock:ye,setTrailColor:he,commitTrailColor:Be,addImageResource:Ae,openTexturePicker:de,openSequencePicker:ge,onTextureFile:Ve,onSequenceFiles:qe,resetTexture:bt,setResourceFixedColor:ft,commitResourceFixedColor:Oe,removeImageResource:ot,setResourceWeight:Te,toggleResourceLock:ue}=PY(re),fe=Fe(()=>re.value?eC(re.value.config,i.timeline.fps):30),nt=Fe(()=>{var me;const ne=(me=re.value)==null?void 0:me.config;return ne?Math.max(1,Math.ceil(Number(ne.loopDurationFrames)||1)):1}),mt=Fe(()=>i.activeObjectType),lt=Re(null),ct=Fe(()=>i.activeObjectType==="collision"&&i.colliders.find(ne=>ne.id===i.activeObjectId)||null),Kn=Fe(()=>i.activeObjectType==="path"&&i.paths.find(ne=>ne.id===i.activeObjectId)||null),_i=Fe(()=>i.activeObjectType==="spine"&&i.spines.find(ne=>ne.id===i.activeObjectId)||null),wn=Fe(()=>i.activeObjectType==="particle"?i.systems.some(ne=>ne.id===i.activeObjectId):i.activeObjectType==="collision"?i.colliders.some(ne=>ne.id===i.activeObjectId):i.activeObjectType==="path"?i.paths.some(ne=>ne.id===i.activeObjectId):i.spines.some(ne=>ne.id===i.activeObjectId)),gi=Fe(()=>{const ne=i.spines.find(me=>me.selectedBone&&me.bones.some(Pe=>Pe.name===me.selectedBone));return ne?{spine:ne,boneName:ne.selectedBone}:null}),Bn=Fe(()=>{var Pe;const ne=(Pe=re.value)==null?void 0:Pe.config;if(!ne||ne.emitterFollowMode!=="bone")return null;const me=i.spines.find(it=>it.id===ne.emitterFollowSpineId);return!me||!me.bones.some(it=>it.name===ne.emitterFollowBoneName)?null:{spine:me,boneName:ne.emitterFollowBoneName}}),Pn=Re(!1),xt=Re(""),vi=Fe(()=>i.spines.filter(ne=>ne.enabled&&ne.visible!==!1&&ne.status==="ready")),Jn=Fe(()=>i.spines.find(ne=>{var me;return ne.id===((me=re.value)==null?void 0:me.config.renderLayerSpineId)})||null),Ui=Fe(()=>{const ne=Jn.value;return!!ne&&ne.enabled&&ne.visible!==!1&&ne.status==="ready"}),Un=Fe(()=>{var ne;return[...((ne=Jn.value)==null?void 0:ne.slots)||[]].sort((me,Pe)=>me.order-Pe.order)}),Vi=Fe(()=>{const ne=xt.value.trim().toLocaleLowerCase();return ne?Un.value.filter(me=>me.name.toLocaleLowerCase().includes(ne)||me.attachment.toLocaleLowerCase().includes(ne)):Un.value}),Zn=Fe(()=>Un.value.find(ne=>{var me;return ne.name===((me=re.value)==null?void 0:me.config.renderLayerSlotName)})||null),as=Fe(()=>{const ne=Zn.value;return ne&&Un.value.filter(me=>me.order<ne.order).sort((me,Pe)=>Pe.order-me.order)[0]||null}),ho=Fe(()=>{var it;const ne=(it=re.value)==null?void 0:it.config,me=Jn.value,Pe=Zn.value;return!ne||!me||!Pe?"":e(ne.renderLayerSlotPosition==="below"?"renderLayer.slotLabelBelow":"renderLayer.slotLabelAbove",{spine:me.name,slot:Pe.name})}),Ic=Fe(()=>{var Pe;const ne=(Pe=re.value)==null?void 0:Pe.config,me=Zn.value;return!ne||!me?"":ne.renderLayerSlotPosition==="above"?e("renderLayer.resolvedAbove",{slot:me.name}):as.value?e("renderLayer.resolvedBetween",{previous:as.value.name,slot:me.name}):""}),Rc=Fe(()=>{var Pe;const ne=(Pe=re.value)==null?void 0:Pe.config;if(!ne||ne.renderLayerMode!=="slot")return"";if(!vi.value.length)return e("renderLayer.warningNoSpine");if(!ne.renderLayerSpineId)return e("renderLayer.warningNoSelection");const me=Jn.value;return me?!me.enabled||me.status!=="ready"?e("renderLayer.warningNotReady"):ne.renderLayerSlotName?Zn.value?ne.renderLayerSlotPosition==="below"&&!as.value?e("renderLayer.warningFirstSlot"):"":e("renderLayer.warningMissingSlot"):"":e("renderLayer.warningMissingSpine")});function al(){var me;const ne=(me=re.value)==null?void 0:me.config;ne&&(ne.renderLayerMode="slot",!ne.renderLayerSpineId&&vi.value.length&&(ne.renderLayerSpineId=vi.value[0].id),Pn.value=!ne.renderLayerSlotName)}function Fc(ne){var Pe;const me=(Pe=re.value)==null?void 0:Pe.config;me&&(me.renderLayerSpineId=Math.max(0,Math.round(Number(ne.target.value)||0)),me.renderLayerSlotName="",Pn.value=!0)}function ll(ne){var Pe;const me=(Pe=re.value)==null?void 0:Pe.config;me&&(me.renderLayerSlotName=ne.name,Pn.value=!1,xt.value="")}function Lc(){var me;const ne=(me=re.value)==null?void 0:me.config;ne&&(ne.renderLayerSlotName="",ne.renderLayerSlotPosition="above")}const cl=Re(!1),dl=Fe(()=>{var me;const ne=new Set(((me=re.value)==null?void 0:me.config.collisionColliderIds)||[]);return i.colliders.filter(Pe=>ne.has(Pe.id))}),Er=Fe(()=>{var me;const ne=new Set(((me=re.value)==null?void 0:me.config.collisionColliderIds)||[]);return i.colliders.filter(Pe=>!ne.has(Pe.id))});Vt(()=>{var ne,me;return[(ne=re.value)==null?void 0:ne.id,(me=re.value)==null?void 0:me.config.collision]},()=>{cl.value=!1}),Vt(()=>{var ne;return(ne=re.value)==null?void 0:ne.id},()=>{Pn.value=!1,xt.value=""});function na(ne){var Pe;const me=(Pe=re.value)==null?void 0:Pe.config;!me||me.collisionColliderIds.includes(ne)||(me.collisionColliderIds.push(ne),cl.value=!1)}function Mh(ne){var Pe;const me=(Pe=re.value)==null?void 0:Pe.config;me&&(me.collisionColliderIds=me.collisionColliderIds.filter(it=>it!==ne))}ma(()=>{for(const ne of i.systems)ne.visible==null&&(ne.visible=!0);for(const ne of i.colliders)ne.visible==null&&(ne.visible=!0);for(const ne of i.paths)ne.visible==null&&(ne.visible=!0);for(const ne of i.spines)ne.visible==null&&(ne.visible=!0)}),ma(()=>{if(!re.value)return;const ne=fr(re.value.config);ne.lifeMode==="curve"&&(ne.lifeMode="random"),ne.speedMode==="curve"&&(ne.speedMode="random"),ne.scaleMode==="curve"&&(ne.scaleMode="random"),ne.initialRotationMode==="curve"&&(ne.initialRotationMode="random"),ne.mode==="stream"&&!(ne.duration>0)&&(ne.duration=1),ne.streamBehavior==="loop"&&(ne.emitterFollow||ne.emitterFollowMode!=="none")&&xv(ne)}),ma(()=>{const ne=new Set(i.colliders.map(Pe=>Pe.id)),me=new Set(i.systems.map(Pe=>Pe.id));for(const Pe of i.systems){const it=fr(Pe.config),un=it.collisionColliderIds.filter(bi=>ne.has(bi));un.length!==it.collisionColliderIds.length&&(it.collisionColliderIds=un),it.spawnPathId>0&&!i.paths.some(bi=>bi.id===it.spawnPathId)&&(it.spawnPathId=0,(it.emissionAngleMode==="path-normal"||it.emissionAngleMode==="path-tangent")&&(it.emissionAngleMode="fixed"));const ia=nC(i.systems,Pe.id);for(const bi of it.events||[])bi.targetSystemId>0&&(bi.targetSystemId===Pe.id||ia.has(bi.targetSystemId)||!me.has(bi.targetSystemId))&&(bi.targetSystemId=0);if(it.emitterFollowMode!=="bone")continue;const Ph=i.spines.find(bi=>bi.id===it.emitterFollowSpineId);!!(Ph!=null&&Ph.bones.some(bi=>bi.name===it.emitterFollowBoneName))||(it.emitterFollowMode="none",it.emitterFollowSpineId=0,it.emitterFollowBoneName="")}}),ma(()=>{for(const ne of i.systems){const me=fr(ne.config);me.renderLayerMode!=="slot"||!me.renderLayerSpineId||i.spines.some(Pe=>Pe.id===me.renderLayerSpineId)||(me.renderLayerSpineId=0,me.renderLayerSlotName="")}}),ma(()=>{for(const ne of i.colliders)ne.followPathId==null&&(ne.followPathId=0),ne.followDuration>0||(ne.followDuration=2),ne.followPathRotation==null&&(ne.followPathRotation=!1),["跟随导出","线性","贝塞尔"].includes(ne.followCurveMode)||(ne.followCurveMode="跟随导出"),(!Array.isArray(ne.followCurve)||ne.followCurve.length<2)&&(ne.followCurve=[{x:0,y:0},{x:1,y:1}])});const ls=qo({config:!0,scene:!i.settings.floatingMenuEnabled,emitMode:!0,shape:!0,attr:!0,look:!0,mods:!0,export:!1});function yv(ne){const me=tE.find(Pe=>Pe.key===ne);return!!me&&(!me.requiresParticle||mt.value==="particle"&&!!re.value)}function rE(ne){yv(ne)&&(lt.value=ne)}function oE(ne){return!i.settings.floatingMenuEnabled||lt.value===ne}function aE(ne){return i.settings.floatingMenuEnabled?lt.value===ne:!ls[ne]}function lE(ne){i.settings.floatingMenuEnabled||(ls[ne]=!ls[ne])}Vt(()=>i.settings.floatingMenuEnabled,ne=>{ne&&(lt.value=null,ls.scene=!0)},{immediate:!0}),Vt(()=>[i.activeObjectType,i.activeObjectId],([ne])=>{i.settings.floatingMenuEnabled&&ne!=="particle"&&(ls.scene=!1,lt.value="scene")});function cE(ne){var Pe;const me=(Pe=re.value)==null?void 0:Pe.config;me&&(me.mode=ne,ne==="stream"&&!(me.duration>0)&&(me.duration=1))}function dE(ne){var it;const me=(it=re.value)==null?void 0:it.config;if(!me)return;const Pe=Math.min(1800,Math.max(1,Math.ceil(Number(ne)||1)));me.loopDurationFrames=Pe}function xv(ne){const me=lc();ne.emitterFollow=!1,ne.emitterFollowMode="none",ne.emitterFollowPathId=me.emitterFollowPathId,ne.emitterFollowSpineId=me.emitterFollowSpineId,ne.emitterFollowBoneName=me.emitterFollowBoneName,ne.emitterFollowBoneOffsetX=me.emitterFollowBoneOffsetX,ne.emitterFollowBoneOffsetY=me.emitterFollowBoneOffsetY,ne.emitterFollowBoneRotation=me.emitterFollowBoneRotation,ne.emitterFollowBoneScaleX=me.emitterFollowBoneScaleX,ne.emitterFollowBoneScaleY=me.emitterFollowBoneScaleY,ne.emitterAngleMode=me.emitterAngleMode,ne.emitterFollowCurve=me.emitterFollowCurve.map(Pe=>({...Pe})),ne.emitterFollowDuration=me.emitterFollowDuration,ne.emitterFollowSpace=me.emitterFollowSpace,ne.emitterFollowDirection=me.emitterFollowDirection,ne.emitterFollowOffset=me.emitterFollowOffset}function uE(ne){var un;const me=(un=re.value)==null?void 0:un.config;if(!me||me.streamBehavior===ne)return;const Pe=ne==="loop",it=e(Pe?"errors.confirmLoopFollowEnter":"errors.confirmLoopFollowExit");window.confirm(it)&&(xv(me),me.streamBehavior=ne,Pe||(me.generateLoopStartAnimation=!1,me.generateLoopEndAnimation=!1))}function hE(ne,me){var un;const Pe=(un=re.value)==null?void 0:un.config;if(!Pe)return;const it=me.target.checked;ne==="start"?Pe.generateLoopStartAnimation=it:Pe.generateLoopEndAnimation=it}function fE(ne,me){var un;const Pe=(un=re.value)==null?void 0:un.config;if(!Pe)return;const it=Math.min(1800,Math.max(1,Math.ceil(Number(me.target.value)||30)));ne==="start"?Pe.loopStartDurationFrames=it:Pe.loopEndDurationFrames=it}function pE(ne,me){var un;const Pe=(un=re.value)==null?void 0:un.config;if(!Pe)return;const it=me.target.checked;ne==="start"?Pe.loopStartUseCustomDuration=it:Pe.loopEndUseCustomDuration=it}function mE(ne,me){const Pe=ne.target.value;if(me.emitterFollowMode=Pe,Pe!=="bone"){me.emitterFollowSpineId=0,me.emitterFollowBoneName="";return}wv(me)}function wv(ne){const me=gi.value;if(!me){ne.emitterFollowMode="none",ne.emitterFollowSpineId=0,ne.emitterFollowBoneName="";return}ne.emitterFollowMode="bone",ne.emitterFollowSpineId=me.spine.id,ne.emitterFollowBoneName=me.boneName}const gE={emitMode:["mode","rate","streamBehavior","loopDurationFrames","generateLoopStartAnimation","loopStartUseCustomDuration","loopStartDurationFrames","generateLoopEndAnimation","loopEndUseCustomDuration","loopEndDurationFrames","burstCount","burstLoop","delay","duration"],shape:["shape","showShape","shapeRangeVersion","innerRadius","outerRadius","innerRectW","innerRectH","outerRectW","outerRectH","spawnPathId","spawnPathDistribution","radius","rectW","rectH","emissionAngleMode","direction","spread","coneDirection","coneAngle"],attr:["lifeMin","lifeMax","lifeMode","lifeCurve","speedMin","speedMax","speedMode","speedCurve","scaleMin","scaleMax","scaleMode","scaleAxisMode","scaleYMin","scaleYMax","scaleCurve","scaleYCurve","scaleEndRatio","initialRotationMode","initialRotationMin","initialRotationMax","initialRotationCurve","rotationSpeedMin","rotationSpeedMax","speedOverLifeEnabled","speedOverLifeMode","speedOverLifeMin","speedOverLifeMax","speedOverLifeCurve","scaleOverLifeEnabled","scaleOverLifeMode","scaleOverLifeAxisMode","scaleOverLifeMin","scaleOverLifeMax","scaleYOverLifeMin","scaleYOverLifeMax","scaleOverLifeCurve","scaleYOverLifeCurve","rotationOverLifeEnabled","rotationOverLifeMode","rotationOverLifeCurve"],look:["texture","imageResources","imageWeightVersion","alpha","alphaEnd","colorStart","colorEnd","colorOverLife","blend","alphaMode","curveMode","alphaCurve","textureName","textureFolder","alphaScale","anchorX","anchorY","independentAlpha","renderLayerMode","renderLayerSpineId","renderLayerSlotName","renderLayerSlotPosition","renderLayerFollowAttachment"],mods:["noise","noiseAmt","noiseRange","noiseSpeed","useGravity","gravity","gravityMode","gravityMin","gravityMax","gravityDirection","gravityCurve","wind","windX","windY","windMode","windMin","windMax","windDirection","windCurve","forceField","forceStrength","forceRadius","forceCenterX","forceCenterY","forceFalloff","showForceFieldShape","vortex","vortexStrength","vortexRadius","vortexCenterX","vortexCenterY","vortexFalloff","showVortexShape","attraction","attractionCenterX","attractionCenterY","attractionRadius","attractionDuration","attractionDelay","attractionDelayMode","attractionPath","showAttractionShape","trail","trailConfigVersion","trailResources","trailResourceVersion","trailTexture","trailTextureName","trailPreviewUrl","trailColorMode","trailColor","trailColorGradient","trailAlphaMode","trailAlpha","trailAlphaCurve","trailBoneCount","trailLength","trailWidth","trailWidthMode","trailLifeLengthEnabled","trailLifeLengthCurve","trailShapeEnabled","trailShapeCurve","trailGridRows","trailGridCols","collision","collisionColliderIds","pathFollow","eventEnabled","events","emitterFollow","emitterFollowMode","emitterFollowPathId","emitterFollowSpineId","emitterFollowBoneName","emitterFollowBoneOffsetX","emitterFollowBoneOffsetY","emitterFollowBoneRotation","emitterFollowBoneScaleX","emitterFollowBoneScaleY","emitterAngleMode","emitterFollowCurve","emitterFollowDuration","emitterFollowSpace","emitterFollowDirection","emitterFollowOffset","damping"]};function vE(ne){var it;const me=(it=re.value)==null?void 0:it.config;if(ne==="export"){i.settings.exportSettings=Hg();return}if(!me)return;const Pe=lc();for(const un of gE[ne])me[un]=Pe[un]}function bE(){t.value.fps=Math.min(240,Math.max(1,Math.round(Number(t.value.fps)||30)))}function yE(ne){var me;i.selectSystem(((me=i.systems[ne])==null?void 0:me.id)??0)}function ul(){i.settings.floatingMenuEnabled&&(ls.scene=!1,lt.value="scene")}function xE(){ul(),i.addSystem()}function wE(){ul(),i.addCollider()}function SE(){ul(),i.addPath()}function CE(){ul(),i.addSpine()}function AE(){ul(),i.duplicateSelectedObject()}function Us(ne,me,Pe=0,it=0,un=0,ia=0){return{x:ne,y:me,inX:Pe,inY:it,outX:un,outY:ia}}function TE(){const ne=Kn.value;if(!(!ne||!ne.preset))if(ne.preset==="circle"){const Pe=60.751328;ne.points=[Us(110,0,0,-Pe,0,Pe),Us(0,110,Pe,0,-Pe,0),Us(-110,0,0,Pe,0,-Pe),Us(0,-110,-Pe,0,Pe,0)],ne.closed=!0}else if(ne.preset==="square")ne.points=[Us(-100,-100),Us(100,-100),Us(100,100),Us(-100,100)],ne.closed=!0;else{const me=ne.preset==="star"?10:6;ne.points=Array.from({length:me},(Pe,it)=>{const un=ne.preset==="star"&&it%2?50:110,ia=-Math.PI*.5+it/me*Math.PI*2;return Us(Math.cos(ia)*un,Math.sin(ia)*un)}),ne.closed=!0}}function EE(){Kn.value&&(Kn.value.points=[])}function _E(){re.value&&(re.value.config.seed=Math.floor(Math.random()*999999)+1)}function ME(ne){var Pe;const me=(Pe=re.value)==null?void 0:Pe.config;!me||ne==="direction"||(me.speedOverLifeMode=ne,ne==="curve"&&me.speedOverLifeMin===me.speedOverLifeMax&&(me.speedOverLifeMin=0,me.speedOverLifeMax=1))}function Sv(){var me;const ne=(me=re.value)==null?void 0:me.config;!ne||ne.scaleOverLifeMode!=="curve"||(ne.scaleOverLifeMin===ne.scaleOverLifeMax&&(ne.scaleOverLifeMin=0,ne.scaleOverLifeMax=1),ne.scaleYOverLifeMin===ne.scaleYOverLifeMax&&(ne.scaleYOverLifeMin=0,ne.scaleYOverLifeMax=1))}function PE(ne){var Pe;const me=(Pe=re.value)==null?void 0:Pe.config;!me||ne==="direction"||(me.scaleOverLifeMode=ne,Sv())}const kE={point:{emissionAngleMode:"random",direction:0,spread:360},circle:{innerRadius:0,outerRadius:100,emissionAngleMode:"fixed",direction:-90,spread:0},rect:{innerRectW:0,innerRectH:0,outerRectW:200,outerRectH:100,emissionAngleMode:"fixed",direction:-90,spread:0},cone:{innerRadius:0,outerRadius:100,coneAngle:90,coneDirection:90,emissionAngleMode:"random",direction:90,spread:90},path:{spawnPathId:0,spawnPathDistribution:"fixed",emissionAngleMode:"fixed",direction:0,spread:0}};function IE(){var Pe;const ne=(Pe=re.value)==null?void 0:Pe.config;if(!ne)return;const me=kE[ne.shape];me&&Object.assign(ne,me)}function RE(){var me;const ne=(me=re.value)==null?void 0:me.config;!ne||ne.spawnPathId>0||(ne.emissionAngleMode==="path-normal"||ne.emissionAngleMode==="path-tangent")&&(ne.emissionAngleMode="fixed")}return{store:i,exportSettings:t,exportBusy:n,exportTarget:s,exportMessage:r,exportError:o,connectorPairUrl:a,connectorStatusText:c,connectorStatusClass:l,connectorReady:d,connectorAuthorizationUrl:u,connectorDisabledReason:h,connectorButtonTitle:f,refreshConnectorHealth:p,exportSpineJson:m,exportSpineProject:g,exportSpineImages:v,configFileInput:y,selectedPreset:b,presetOptions:x,presetLoading:T,configMessage:E,configError:S,localProjects:C,selectedLocalProjectName:z,selectLocalProject:K,projectSaveOpen:M,projectNameDraft:k,projectSaveError:P,projectStorageBusy:I,projectFilesInput:R,saveConfig:D,closeProjectSaveDialog:$,confirmSaveConfig:j,loadLocalProject:B,downloadLocalProject:Y,downloadCurrentProject:U,removeLocalProject:O,downloadAllLocalProjects:L,loadAllProjectFiles:X,onConfigFileChange:Z,refreshPresets:ae,loadSelectedPreset:ce,resolvedCurveEditorMode:ve,sys:re,textureFileInput:Ee,sequenceFileInput:q,trailTextureFileInput:J,addTrailResource:ie,openTrailTexturePicker:se,onTrailRigChange:H,onTrailResourceBoneCountChange:G,onTrailResourceRotationChange:N,onTrailTextureFile:V,resetTrailTexture:W,removeTrailResource:ee,setTrailResourceWeight:be,toggleTrailResourceLock:ye,setTrailColor:he,commitTrailColor:Be,addImageResource:Ae,openTexturePicker:de,openSequencePicker:ge,onTextureFile:Ve,onSequenceFiles:qe,resetTexture:bt,setResourceFixedColor:ft,commitResourceFixedColor:Oe,removeImageResource:ot,setResourceWeight:Te,toggleResourceLock:ue,automaticLoopDuration:fe,loopDurationFrames:nt,activeObjectType:mt,activeSection:lt,canUseSection:yv,activateSection:rE,sectionVisible:oE,sectionOpen:aE,activeCollider:ct,activePath:Kn,activeSpine:_i,canCopyObject:wn,selectedSpineBone:gi,boundSpineBone:Bn,renderLayerSlotPickerOpen:Pn,renderLayerSlotSearch:xt,renderLayerReadySpines:vi,renderLayerSpineReady:Ui,renderLayerSlots:Un,renderLayerFilteredSlots:Vi,renderLayerSlotLabel:ho,renderLayerResolvedLabel:Ic,renderLayerWarning:Rc,setRenderLayerSlotMode:al,selectRenderLayerSpine:Fc,pickRenderLayerSlot:ll,clearRenderLayerSlot:Lc,collisionPickerOpen:cl,selectedCollisionBodies:dl,availableCollisionBodies:Er,addCollisionBody:na,removeCollisionBody:Mh,collapsed:ls,toggle:lE,setEmitMode:cE,setLoopDurationFrames:dE,setStreamBehavior:uE,setLoopSection:hE,setLoopSectionDuration:fE,setLoopCustomDuration:pE,onEmitterFollowModeChange:mE,bindSelectedBone:wv,resetModule:vE,normalizeExportFps:bE,select:yE,addSys:xE,addCollider:wE,addPath:SE,addSpine:CE,copySelectedObject:AE,applyPathPreset:TE,clearPathAnchors:EE,randomizeSeed:_E,setSpeedOverLifeMode:ME,prepareScaleOverLifeCurve:Sv,setScaleOverLifeMode:PE,onShapeChange:IE,onSpawnPathChange:RE,LINEAR_CURVE:_V,FLAT_CURVE:Hm,ALPHA_CURVE:MV,RESOURCE_ALPHA_CURVE:Gm,TRAIL_ALPHA_CURVE:Wm,TRAIL_SHAPE_CURVE:qm}}const nE=Symbol("particle-panel");function IY(){const i=kY();return L1(nE,i),i}function Tr(){const i=No(nE);if(!i)throw new Error("Particle panel sections require a ParticlePanel parent");return i}const RY={class:"group config-management"},FY={class:"caret"},LY={class:"group-body config-management-body"},DY={class:"config-toolbar"},OY=["title"],NY=["title"],$Y=["aria-label","disabled"],BY={value:""},UY=["value"],VY={class:"project-library"},XY={class:"project-library-title"},YY={key:0,class:"project-list",role:"listbox"},zY=["title","aria-selected","onClick","onDblclick","onKeydown"],jY={class:"project-name"},HY={key:0,class:"project-size"},GY=["onClick"],WY=["onClick"],qY={key:1,class:"project-empty"},KY={class:"project-bulk-actions"},JY=["disabled"],ZY=["disabled"],QY={class:"project-save-head"},ez=["disabled"],tz=["placeholder"],nz={key:0,class:"project-save-error"},iz={class:"project-save-actions"},sz=["disabled"],rz=["disabled"],oz=Zt({__name:"ProjectConfigSection",setup(i){const{store:e,configFileInput:t,selectedPreset:n,presetOptions:s,presetLoading:r,configMessage:o,configError:a,localProjects:c,projectSaveOpen:l,projectNameDraft:d,projectSaveError:u,projectStorageBusy:h,saveConfig:f,closeProjectSaveDialog:p,confirmSaveConfig:m,loadLocalProject:g,downloadLocalProject:v,downloadCurrentProject:y,removeLocalProject:b,downloadAllLocalProjects:x,projectFilesInput:T,loadAllProjectFiles:E,selectedLocalProjectName:S,selectLocalProject:C,onConfigFileChange:M,refreshPresets:k,loadSelectedPreset:P,collapsed:I,toggle:D,sectionOpen:$,select:j}=Tr(),{locale:B}=mi();function Y(O){const L=Math.max(1,O/1024);if(L<1024)return`${L<10?L.toFixed(1):Math.round(L)} KB`;const R=L/1024;return`${R<10?R.toFixed(1):Math.round(R)} MB`}function U(O){return _Y(O,B.value)}return(O,L)=>(Q(),te(_e,null,[w("div",RY,[w("div",{class:"group-head",onClick:L[1]||(L[1]=R=>_(D)("config"))},[w("span",FY,F(_(I).config?"▸":"▾"),1),w("span",null,F(O.$t("config.title")),1),w("button",{type:"button",class:"group-download",onClick:L[0]||(L[0]=We((...R)=>_(y)&&_(y)(...R),["stop"]))},F(O.$t("config.local.downloadCurrent")),1)]),pe(w("div",LY,[w("div",DY,[w("button",{title:O.$t("config.saveTitle"),onClick:L[2]||(L[2]=(...R)=>_(f)&&_(f)(...R))},F(O.$t("config.save")),9,OY),w("button",{title:O.$t("config.loadTitle"),onClick:L[3]||(L[3]=R=>{var X;return(X=_(t))==null?void 0:X.click()})},F(O.$t("config.load")),9,NY),pe(w("select",{"onUpdate:modelValue":L[4]||(L[4]=R=>Jt(n)?n.value=R:null),"aria-label":O.$t("config.presets"),disabled:!_(s).length||_(r),onPointerdown:L[5]||(L[5]=(...R)=>_(k)&&_(k)(...R)),onFocus:L[6]||(L[6]=(...R)=>_(k)&&_(k)(...R)),onChange:L[7]||(L[7]=(...R)=>_(P)&&_(P)(...R))},[w("option",BY,F(_(s).length?O.$t("config.selectPreset"):O.$t("config.noPresets")),1),(Q(!0),te(_e,null,Mt(_(s),R=>(Q(),te("option",{key:R.file,value:R.file},F(U(R)),9,UY))),128))],40,$Y),[[_t,_(n)]]),w("input",{ref_key:"configFileInput",ref:t,hidden:"",type:"file",accept:".json,application/json",onChange:L[8]||(L[8]=(...R)=>_(M)&&_(M)(...R))},null,544)]),_(o)?(Q(),te("div",{key:0,class:Me(["config-message",{error:_(a)}])},F(_(o)),3)):xe("",!0),w("div",VY,[w("div",XY,F(O.$t("config.local.listTitle")),1),_(c).length?(Q(),te("div",YY,[(Q(!0),te(_e,null,Mt(_(c),R=>(Q(),te("div",{key:R.name,class:Me(["project-row",{selected:_(S)===R.name}]),title:O.$t("config.local.loadHint"),role:"option",tabindex:"0","aria-selected":_(S)===R.name,onClick:X=>_(C)(R),onDblclick:X=>_(g)(R),onKeydown:[es(We(X=>_(g)(R),["prevent"]),["enter"]),es(We(X=>_(C)(R),["prevent"]),["space"])]},[w("span",jY,F(R.name),1),_(e).settings.showProjectSize?(Q(),te("span",HY,F(Y(R.size)),1)):xe("",!0),w("div",{class:"project-actions",onDblclick:L[9]||(L[9]=We(()=>{},["stop"]))},[w("button",{type:"button",onClick:We(X=>_(b)(R),["stop"])},F(O.$t("config.local.delete")),9,GY),w("button",{type:"button",onClick:We(X=>_(v)(R),["stop"])},F(O.$t("config.local.download")),9,WY)],32)],42,zY))),128))])):(Q(),te("div",qY,F(O.$t("config.local.empty")),1))]),w("div",KY,[w("button",{type:"button",disabled:_(h),onClick:L[10]||(L[10]=(...R)=>_(x)&&_(x)(...R))},F(O.$t("config.local.downloadAll")),9,JY),w("button",{type:"button",disabled:_(h),onClick:L[11]||(L[11]=R=>{var X;return(X=_(T))==null?void 0:X.click()})},F(O.$t("config.local.loadAll")),9,ZY),w("input",{ref_key:"projectFilesInput",ref:T,hidden:"",type:"file",multiple:"",accept:".json,application/json",onChange:L[12]||(L[12]=(...R)=>_(E)&&_(E)(...R))},null,544)])],512),[[Bt,_($)("config")]])]),(Q(),kt(Qu,{to:"body"},[_(l)?(Q(),te("div",{key:0,class:"project-save-backdrop",onPointerdown:L[18]||(L[18]=We((...R)=>_(p)&&_(p)(...R),["self"]))},[w("form",{class:"project-save-dialog",onSubmit:L[16]||(L[16]=We((...R)=>_(m)&&_(m)(...R),["prevent"])),onKeydown:L[17]||(L[17]=es(We((...R)=>_(p)&&_(p)(...R),["prevent"]),["esc"]))},[w("div",QY,[w("span",null,F(O.$t("config.local.saveTitle")),1),w("button",{type:"button",disabled:_(h),onClick:L[13]||(L[13]=(...R)=>_(p)&&_(p)(...R))},"✕",8,ez)]),w("label",null,[w("span",null,F(O.$t("config.local.name")),1),pe(w("input",{"onUpdate:modelValue":L[14]||(L[14]=R=>Jt(d)?d.value=R:null),class:"inp",placeholder:O.$t("config.local.namePlaceholder"),autofocus:""},null,8,tz),[[Je,_(d)]])]),_(u)?(Q(),te("div",nz,F(_(u)),1)):xe("",!0),w("div",iz,[w("button",{type:"button",disabled:_(h),onClick:L[15]||(L[15]=(...R)=>_(p)&&_(p)(...R))},F(O.$t("common.cancel")),9,sz),w("button",{type:"submit",class:"primary",disabled:_(h)},F(O.$t("config.save")),9,rz)])],32)],32)):xe("",!0)]))],64))}}),Hx=dn(oz,[["__scopeId","data-v-2e5d6a49"]]),az={class:"ns-label"},lz=["min","max","step","value","disabled"],cz=["min","max","step","value","disabled"],dz=Zt({__name:"NumSlider",props:{label:{},modelValue:{},min:{},max:{},step:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=e,s=Re(String(t.modelValue));Vt(()=>t.modelValue,c=>{s.value=String(c)});function r(c){const l=parseFloat(c.target.value);Number.isNaN(l)||n("update:modelValue",l)}function o(c){s.value=c.target.value;const l=parseFloat(s.value);Number.isNaN(l)||n("update:modelValue",l)}function a(){const c=parseFloat(s.value);Number.isNaN(c)&&(s.value=String(t.modelValue))}return(c,l)=>(Q(),te("div",{class:Me(["ns",{disabled:i.disabled}])},[w("span",az,F(i.label),1),w("input",{type:"range",class:"ns-range",min:i.min,max:i.max,step:i.step,value:i.modelValue,disabled:i.disabled,onInput:r},null,40,lz),w("input",{type:"number",class:"ns-num",min:i.min,max:i.max,step:i.step,value:s.value,disabled:i.disabled,onInput:o,onBlur:a},null,40,cz)],2))}}),Ue=dn(dz,[["__scopeId","data-v-7c2fbed0"]]),uz={class:"ce"},hz={class:"ce-editor"},fz={class:"ce-grid"},pz=["x1","x2","y2"],mz=["y1","x2","y2"],gz=["x","y","width","height"],vz=["d"],bz={key:0,class:"ce-handles"},yz=["x1","y1","x2","y2"],xz=["cx","cy","onPointerdown"],wz=["x1","y1","x2","y2"],Sz=["cx","cy","onPointerdown"],Cz=["cx","cy"],Az=["cx","cy","onPointerdown","onDblclick"],Tz={class:"ce-nav"},Ez={class:"ce-tip"},_z=["title"],kr=8,Mz=Zt({__name:"CurveEditor",props:{modelValue:{},defaultValue:{default:()=>[{x:0,y:0},{x:1,y:1}]},mode:{default:"linear"}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=e,s=Re(null),r=Re(300),o=Re(110);let a=null;function c(){if(!s.value)return;const P=s.value.getBoundingClientRect();r.value=P.width,o.value=P.height}function l(P){return kr+P*(r.value-kr*2)}function d(P){return kr+(1-P)*(o.value-kr*2)}function u(){return[...t.modelValue].sort((P,I)=>P.x-I.x)}function h(P){n("update:modelValue",[...P].sort((I,D)=>I.x-D.x))}function f(){h(t.defaultValue.map(P=>({...P})))}const p=Fe(()=>u());function m(P){const I=p.value[P],D=p.value[Math.max(0,P-1)];return{x:I.x-(I.x-D.x)/3,y:I.y-(I.y-D.y)/3}}function g(P){const I=p.value[P],D=p.value[Math.min(p.value.length-1,P+1)];return{x:I.x+(D.x-I.x)/3,y:I.y+(D.y-I.y)/3}}function v(P){const I=p.value[P],D=m(P);return{x:I.x+(I.inX??D.x-I.x),y:I.y+(I.inY??D.y-I.y)}}function y(P){const I=p.value[P],D=g(P);return{x:I.x+(I.outX??D.x-I.x),y:I.y+(I.outY??D.y-I.y)}}const b=Fe(()=>{if(!p.value.length)return"";let P=`M ${l(p.value[0].x)} ${d(p.value[0].y)}`;for(let I=1;I<p.value.length;I++){const D=p.value[I];if(t.mode==="bezier"){const $=y(I-1),j=v(I);P+=` C ${l($.x)} ${d($.y)} ${l(j.x)} ${d(j.y)} ${l(D.x)} ${d(D.y)}`}else P+=` L ${l(D.x)} ${d(D.y)}`}return P});function x(P,I){const D=s.value.getBoundingClientRect(),$=(P-D.left-kr)/(r.value-kr*2),j=(I-D.top-kr)/(o.value-kr*2);return{x:Math.min(1,Math.max(0,Math.round($*100)/100)),y:Math.min(1,Math.max(0,Math.round((1-j)*100)/100))}}let T=0;function E(P){if(P.target.classList.contains("ce-hit")||Date.now()-T<400)return;const{x:I,y:D}=x(P.clientX,P.clientY),$=u().filter(j=>Math.abs(j.x-I)>.02);$.push({x:I,y:D}),h($)}let S={t:0,i:-1,x:0,y:0};function C(P,I){P.stopPropagation();const D=u().findIndex(Y=>Math.abs(Y.x-p.value[I].x)<1e-6&&Math.abs(Y.y-p.value[I].y)<1e-6);if(D<0)return;const $=Date.now();if($-S.t<300&&S.i===I&&Math.abs(P.clientX-S.x)<8&&Math.abs(P.clientY-S.y)<8){S={t:0,i:-1,x:0,y:0},k(I);return}S={t:$,i:I,x:P.clientX,y:P.clientY};const j=Y=>{(Math.abs(Y.clientX-P.clientX)>8||Math.abs(Y.clientY-P.clientY)>8)&&(S={t:0,i:-1,x:0,y:0});const{x:U,y:O}=x(Y.clientX,Y.clientY),L=u();L[D]={x:U,y:O},h(L)},B=()=>{window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",B)};window.addEventListener("pointermove",j),window.addEventListener("pointerup",B)}function M(P,I,D){P.stopPropagation();const $=B=>{const Y=x(B.clientX,B.clientY),U=u(),O=U[I],L=D==="in"?U[Math.max(0,I-1)].x:O.x,R=D==="in"?O.x:U[Math.min(U.length-1,I+1)].x,X=Math.min(R,Math.max(L,Y.x)),z=Math.round((X-O.x)*100)/100,K=Math.round((Y.y-O.y)*100)/100;U[I]=D==="in"?{...O,inX:z,inY:K}:{...O,outX:z,outY:K},h(U)},j=()=>{window.removeEventListener("pointermove",$),window.removeEventListener("pointerup",j)};window.addEventListener("pointermove",$),window.addEventListener("pointerup",j)}function k(P,I){I==null||I.stopPropagation();const D=u();D.length<=2||(T=Date.now(),h(D.filter(($,j)=>j!==P)))}return Ti(()=>{c(),a=new ResizeObserver(c),s.value&&a.observe(s.value)}),nl(()=>{a==null||a.disconnect()}),(P,I)=>(Q(),te("div",uz,[w("div",hz,[(Q(),te("svg",{ref_key:"svg",ref:s,class:"ce-svg",onDblclick:E},[w("g",fz,[(Q(),te(_e,null,Mt([.25,.5,.75],D=>w("line",{key:"v"+D,x1:l(D),y1:"0",x2:l(D),y2:d(0)},null,8,pz)),64)),(Q(),te(_e,null,Mt([.25,.5,.75],D=>w("line",{key:"h"+D,x1:"0",y1:d(D),x2:l(1),y2:d(D)},null,8,mz)),64))]),w("rect",{x:l(0),y:d(1),width:l(1)-l(0),height:d(0)-d(1),class:"ce-frame",fill:"none"},null,8,gz),w("path",{d:b.value,class:"ce-line",fill:"none"},null,8,vz),i.mode==="bezier"?(Q(),te("g",bz,[(Q(!0),te(_e,null,Mt(p.value,(D,$)=>(Q(),te(_e,{key:"handles-"+$},[$>0?(Q(),te("line",{key:0,x1:l(D.x),y1:d(D.y),x2:l(v($).x),y2:d(v($).y)},null,8,yz)):xe("",!0),$>0?(Q(),te("circle",{key:1,cx:l(v($).x),cy:d(v($).y),r:"4",onPointerdown:j=>M(j,$,"in")},null,40,xz)):xe("",!0),$<p.value.length-1?(Q(),te("line",{key:2,x1:l(D.x),y1:d(D.y),x2:l(y($).x),y2:d(y($).y)},null,8,wz)):xe("",!0),$<p.value.length-1?(Q(),te("circle",{key:3,cx:l(y($).x),cy:d(y($).y),r:"4",onPointerdown:j=>M(j,$,"out")},null,40,Sz)):xe("",!0)],64))),128))])):xe("",!0),(Q(!0),te(_e,null,Mt(p.value,(D,$)=>(Q(),te("g",{key:$},[w("circle",{cx:l(D.x),cy:d(D.y),r:"5",class:"ce-node"},null,8,Cz),w("circle",{cx:l(D.x),cy:d(D.y),r:"9",class:"ce-hit",onPointerdown:j=>C(j,$),onDblclick:j=>k($,j)},null,40,Az)]))),128))],544)),w("div",Tz,[w("span",Ez,F(i.mode==="bezier"?P.$t("curve.bezierHint"):P.$t("curve.linearHint")),1)])]),w("button",{class:"ce-reset",type:"button",title:P.$t("curve.resetTitle"),onClick:f},F(P.$t("common.reset")),9,_z)]))}}),Ts=dn(Mz,[["__scopeId","data-v-8f475293"]]),Pz={class:"spine-editor"},kz={class:"editor-title"},Iz={class:"field wide"},Rz={class:"grid three"},Fz={class:"field"},Lz={class:"field"},Dz={class:"field"},Oz={class:"grid three"},Nz={class:"field"},$z={class:"field"},Bz={class:"field"},Uz={class:"section-title"},Vz=["disabled"],Xz={class:"folder-hint"},Yz={class:"asset-row"},zz=["title"],jz={class:"asset-row"},Hz=["title"],Gz={class:"asset-row"},Wz=["title"],qz={class:"asset-actions"},Kz=["disabled"],Jz={class:"runtime-note"},Zz={key:0},Qz={key:0,class:"error"},e6={class:"section-box"},t6={class:"section-title"},n6={key:0,class:"empty"},i6={key:1,class:"field wide"},s6={value:""},r6=["value"],o6={class:"section-box"},a6={class:"tree-title-row"},l6={class:"section-title"},c6=["disabled","title"],d6=["disabled","title"],u6={class:"tree-tabs"},h6={key:0,class:"empty"},f6={key:1,class:"bone-search"},p6=["aria-label","placeholder"],m6=["title","aria-label"],g6={key:2,class:"empty"},v6={key:3,class:"bone-tree"},b6=["onClick","onKeydown"],y6=["title","onClick"],x6={key:1,class:"bone-leaf"},w6={class:"bone-name"},S6={key:0,class:"empty"},C6={key:1,class:"bone-search"},A6=["aria-label","placeholder"],T6=["title","aria-label"],E6={key:2,class:"empty"},_6={key:3,class:"bone-tree slot-tree"},M6=["title","onClick","onKeydown"],P6={class:"slot-order"},k6={class:"bone-name"},I6={class:"slot-attachment"},R6=Zt({__name:"SpineObjectPanel",props:{spineObject:{}},setup(i){const e=i,{t}=mi(),n=Zo(),s=Re(null),r=Re(null),o=Re(null),a=Re(null),c=Re(new Set),l=Re(""),d=Re("bone"),u=Re(""),h=Re(null),f=Re(null),p=Re([]);e.spineObject.selectedBone==null&&(e.spineObject.selectedBone=""),e.spineObject.selectedSlot==null&&(e.spineObject.selectedSlot=""),Array.isArray(e.spineObject.slots)||(e.spineObject.slots=[]),e.spineObject.sourceBundle==null&&(e.spineObject.sourceBundle=null),e.spineObject.dataVersion==null&&(e.spineObject.dataVersion="");const m=Fe(()=>{var X;return((X=h.value)==null?void 0:X.name)||e.spineObject.skeletonFileName}),g=Fe(()=>{var X;return((X=f.value)==null?void 0:X.name)||e.spineObject.atlasFileName}),v=Fe(()=>p.value.length?p.value.map(X=>X.name):e.spineObject.textureFileNames),y=Fe(()=>v.value.length?t("spine.textureSummary",{count:v.value.length,names:v.value.join(", ")}):"PNG / JPEG / WebP..."),b=Fe(()=>new Set(e.spineObject.bones.map(X=>X.parent).filter(X=>!!X))),x=Fe(()=>new Map(e.spineObject.bones.map(X=>[X.name,X]))),T=Fe(()=>e.spineObject.bones.filter(X=>{var Z;const z=l.value.trim().toLocaleLowerCase();if(z)return X.name.toLocaleLowerCase().includes(z);let K=X.parent;for(;K;){if(c.value.has(K))return!1;K=((Z=x.value.get(K))==null?void 0:Z.parent)||null}return!0})),E=Fe(()=>b.value.size>0&&[...b.value].every(X=>c.value.has(X))),S=Fe(()=>{const X=u.value.trim().toLocaleLowerCase(),z=[...e.spineObject.slots].sort((K,Z)=>K.order-Z.order);return X?z.filter(K=>K.name.toLocaleLowerCase().includes(X)||K.attachment.toLocaleLowerCase().includes(X)):z});function C(X){const z=e.spineObject.selectedBone===X;for(const K of n.spines)K.selectedBone="";z||(e.spineObject.selectedBone=X)}function M(X){const z=e.spineObject.selectedSlot===X;for(const K of n.spines)K.selectedSlot="";z||(e.spineObject.selectedSlot=X)}function k(X){c.value.has(X)?c.value.delete(X):c.value.add(X)}function P(){c.value=E.value?new Set:new Set(b.value)}function I(X){var z;return((z=X.target.files)==null?void 0:z[0])||null}function D(X){h.value=I(X)}function $(X){f.value=I(X)}function j(X){p.value=Array.from(X.target.files||[])}function B(X){return X.name.replace(/\.[^.]+$/,"").toLocaleLowerCase()}async function Y(X){const z=Array.from(X.target.files||[]);if(!z.length)return;const K=z.filter(re=>/\.(json|skel)$/i.test(re.name)),Z=z.filter(re=>/\.atlas$/i.test(re.name)),ae=z.filter(re=>/\.(png|jpe?g|webp|wepb)$/i.test(re.name)),ce=Z.map(re=>({atlas:re,skeleton:K.find(Ee=>B(Ee)===B(re))})).find(re=>re.skeleton),ve=(ce==null?void 0:ce.skeleton)||K[0]||null,we=(ce==null?void 0:ce.atlas)||Z[0]||null;if(h.value=ve,f.value=we,p.value=ae,!ve||!we||!ae.length){const re=[!ve&&"JSON / SKEL",!we&&"Atlas",!ae.length&&t("spine.textureImages")].filter(Boolean).join(", ");e.spineObject.status="error",e.spineObject.error=t("spine.missingFolderAssets",{missing:re});return}await L()}function U(){n.recalcTotalFrames()}function O(){U(),n.timeline.frame=0}async function L(){var K;const X=h.value,z=f.value;if(!X||!z||!p.value.length){e.spineObject.status="error",e.spineObject.error=t("spine.chooseAssets");return}e.spineObject.status="loading",e.spineObject.error="";try{const Z=await jA(X,z,p.value);gh(e.spineObject.id,Z),e.spineObject.skeletonFileName=X.name,e.spineObject.atlasFileName=z.name,e.spineObject.textureFileNames=p.value.map(ae=>ae.name),e.spineObject.dataVersion=Z.dataVersion,e.spineObject.animations=Z.animations,e.spineObject.bones=Z.bones,e.spineObject.slots=Z.slots,e.spineObject.selectedBone="",e.spineObject.selectedSlot="",l.value="",u.value="",c.value=new Set,e.spineObject.selectedAnimation=((K=Z.animations[0])==null?void 0:K.name)||"",e.spineObject.assetVersion++,e.spineObject.status="ready",U(),n.timeline.frame=0;try{e.spineObject.sourceBundle=await hU(X,z,p.value)}catch(ae){e.spineObject.sourceBundle=null,console.warn("Spine 配置资源嵌入失败",ae)}}catch(Z){e.spineObject.status="error",e.spineObject.error=Z instanceof Error?Z.message:String(Z)}}function R(){Ec(e.spineObject.id),h.value=null,f.value=null,p.value=[],s.value&&(s.value.value=""),r.value&&(r.value.value=""),o.value&&(o.value.value=""),a.value&&(a.value.value=""),e.spineObject.skeletonFileName="",e.spineObject.atlasFileName="",e.spineObject.textureFileNames=[],e.spineObject.dataVersion="",e.spineObject.sourceBundle=null,e.spineObject.animations=[],e.spineObject.bones=[],e.spineObject.slots=[],e.spineObject.selectedBone="",e.spineObject.selectedSlot="",l.value="",u.value="",c.value=new Set,e.spineObject.selectedAnimation="",e.spineObject.assetVersion++,e.spineObject.status="empty",e.spineObject.error="",U()}return(X,z)=>(Q(),te("div",Pz,[w("div",kz,F(X.$t("spine.title")),1),w("label",Iz,[w("span",null,F(X.$t("spine.name")),1),pe(w("input",{"onUpdate:modelValue":z[0]||(z[0]=K=>i.spineObject.name=K)},null,512),[[Je,i.spineObject.name]])]),w("div",Rz,[w("label",Fz,[w("span",null,F(X.$t("spine.xPosition")),1),pe(w("input",{"onUpdate:modelValue":z[1]||(z[1]=K=>i.spineObject.x=K),type:"number"},null,512),[[Je,i.spineObject.x,void 0,{number:!0}]])]),w("label",Lz,[w("span",null,F(X.$t("spine.yPosition")),1),pe(w("input",{"onUpdate:modelValue":z[2]||(z[2]=K=>i.spineObject.y=K),type:"number"},null,512),[[Je,i.spineObject.y,void 0,{number:!0}]])]),w("label",Dz,[w("span",null,F(X.$t("spine.rotation")),1),pe(w("input",{"onUpdate:modelValue":z[3]||(z[3]=K=>i.spineObject.rotation=K),type:"number"},null,512),[[Je,i.spineObject.rotation,void 0,{number:!0}]])])]),w("div",Oz,[w("label",Nz,[z[20]||(z[20]=w("span",null,"Scale X",-1)),pe(w("input",{"onUpdate:modelValue":z[4]||(z[4]=K=>i.spineObject.scaleX=K),type:"number",step:"0.05"},null,512),[[Je,i.spineObject.scaleX,void 0,{number:!0}]])]),w("label",$z,[z[21]||(z[21]=w("span",null,"Scale Y",-1)),pe(w("input",{"onUpdate:modelValue":z[5]||(z[5]=K=>i.spineObject.scaleY=K),type:"number",step:"0.05"},null,512),[[Je,i.spineObject.scaleY,void 0,{number:!0}]])]),w("label",Bz,[w("span",null,F(X.$t("spine.startTime")),1),pe(w("input",{"onUpdate:modelValue":z[6]||(z[6]=K=>i.spineObject.timeOffset=K),type:"number",min:"0",step:"0.033333",onChange:U},null,544),[[Je,i.spineObject.timeOffset,void 0,{number:!0}]])])]),z[22]||(z[22]=w("div",{class:"divider"},null,-1)),w("div",Uz,F(X.$t("spine.resources")),1),w("input",{ref_key:"skeletonInput",ref:s,hidden:"",type:"file",accept:".json,.skel,application/json,application/octet-stream",onChange:D},null,544),w("input",{ref_key:"atlasInput",ref:r,hidden:"",type:"file",accept:".atlas,text/plain",onChange:$},null,544),w("input",{ref_key:"textureInput",ref:o,hidden:"",type:"file",multiple:"",accept:".png,.jpg,.jpeg,.webp,.wepb,image/png,image/jpeg,image/webp",onChange:j},null,544),w("input",{ref_key:"folderInput",ref:a,hidden:"",type:"file",multiple:"",webkitdirectory:"",directory:"",onChange:Y},null,544),w("button",{class:"folder-select",disabled:i.spineObject.status==="loading",onClick:z[7]||(z[7]=K=>{var Z;return(Z=a.value)==null?void 0:Z.click()})},F(X.$t("spine.chooseFolder")),9,Vz),w("div",Xz,F(X.$t("spine.folderHint")),1),w("div",Yz,[w("div",{class:"asset-name",title:m.value},F(m.value||"JSON / SKEL..."),9,zz),w("button",{onClick:z[8]||(z[8]=K=>{var Z;return(Z=s.value)==null?void 0:Z.click()})},F(X.$t("spine.choose")),1)]),w("div",jz,[w("div",{class:"asset-name",title:g.value},F(g.value||"Atlas..."),9,Hz),w("button",{onClick:z[9]||(z[9]=K=>{var Z;return(Z=r.value)==null?void 0:Z.click()})},F(X.$t("spine.choose")),1)]),w("div",Gz,[w("div",{class:"asset-name",title:v.value.join(", ")},F(y.value),9,Wz),w("button",{onClick:z[10]||(z[10]=K=>{var Z;return(Z=o.value)==null?void 0:Z.click()})},F(X.$t("spine.chooseMultiple")),1)]),w("div",qz,[w("button",{class:"load",disabled:i.spineObject.status==="loading",onClick:L},F(i.spineObject.status==="loading"?X.$t("spine.loading"):X.$t("spine.load")),9,Kz),w("button",{class:"clear",onClick:R},F(X.$t("spine.clear")),1)]),w("div",Jz,[Ct(F(X.$t("spine.supportNote"))+" ",1),i.spineObject.dataVersion?(Q(),te("span",Zz," · "+F(X.$t("spine.currentResource",{version:i.spineObject.dataVersion})),1)):xe("",!0)]),i.spineObject.error?(Q(),te("div",Qz,F(i.spineObject.error),1)):xe("",!0),w("div",e6,[w("div",t6,F(X.$t("spine.animations")),1),i.spineObject.animations.length?(Q(),te("label",i6,[w("span",null,F(X.$t("spine.timelineAnimation")),1),pe(w("select",{"onUpdate:modelValue":z[11]||(z[11]=K=>i.spineObject.selectedAnimation=K),onChange:O},[w("option",s6,F(X.$t("spine.no")),1),(Q(!0),te(_e,null,Mt(i.spineObject.animations,K=>(Q(),te("option",{key:K.name,value:K.name},F(K.name)+"("+F(K.duration.toFixed(2))+"s) ",9,r6))),128))],544),[[_t,i.spineObject.selectedAnimation]])])):(Q(),te("div",n6,F(X.$t("spine.noAnimations")),1))]),w("div",o6,[w("div",a6,[w("div",l6,F(X.$t("spine.hierarchy")),1),d.value==="bone"?(Q(),te("button",{key:0,class:Me(["selected-bone",{active:i.spineObject.selectedBone}]),disabled:!i.spineObject.selectedBone,title:i.spineObject.selectedBone?X.$t("spine.clearBoneTitle"):X.$t("spine.noBoneTitle"),onClick:z[12]||(z[12]=K=>i.spineObject.selectedBone="")},[i.spineObject.selectedBone?(Q(),te(_e,{key:0},[Ct(F(X.$t("spine.clearBone",{name:""})),1),w("strong",null,F(i.spineObject.selectedBone),1)],64)):(Q(),te(_e,{key:1},[Ct(F(X.$t("spine.currentBone")),1),w("strong",null,F(X.$t("spine.notSelected")),1)],64))],10,c6)):(Q(),te("button",{key:1,class:Me(["selected-bone",{active:i.spineObject.selectedSlot}]),disabled:!i.spineObject.selectedSlot,title:i.spineObject.selectedSlot?X.$t("spine.clearSlotTitle"):X.$t("spine.noSlotTitle"),onClick:z[13]||(z[13]=K=>i.spineObject.selectedSlot="")},[i.spineObject.selectedSlot?(Q(),te(_e,{key:0},[Ct(F(X.$t("spine.clearSlot",{name:""})),1),w("strong",null,F(i.spineObject.selectedSlot),1)],64)):(Q(),te(_e,{key:1},[Ct(F(X.$t("spine.currentSlot")),1),w("strong",null,F(X.$t("spine.notSelected")),1)],64))],10,d6)),d.value==="bone"&&i.spineObject.bones.length?(Q(),te("button",{key:2,class:"tree-action",onClick:P},F(E.value?X.$t("spine.expandAll"):X.$t("spine.collapseAll")),1)):xe("",!0)]),w("div",u6,[w("button",{class:Me({on:d.value==="bone"}),onClick:z[14]||(z[14]=K=>d.value="bone")},F(X.$t("spine.bones")),3),w("button",{class:Me({on:d.value==="slot"}),onClick:z[15]||(z[15]=K=>d.value="slot")},F(X.$t("spine.slots")),3)]),d.value==="bone"?(Q(),te(_e,{key:0},[i.spineObject.bones.length?(Q(),te("div",f6,[pe(w("input",{"onUpdate:modelValue":z[16]||(z[16]=K=>l.value=K),type:"search","aria-label":X.$t("spine.searchBones"),placeholder:X.$t("spine.searchBonesPlaceholder")},null,8,p6),[[Je,l.value,void 0,{trim:!0}]]),l.value?(Q(),te("button",{key:0,title:X.$t("spine.clearSearch"),"aria-label":X.$t("spine.clearBoneSearch"),onClick:z[17]||(z[17]=K=>l.value="")},"✕",8,m6)):xe("",!0)])):(Q(),te("div",h6,F(X.$t("spine.notLoaded")),1)),i.spineObject.bones.length&&!T.value.length?(Q(),te("div",g6,F(X.$t("spine.noMatchingBones")),1)):i.spineObject.bones.length?(Q(),te("div",v6,[(Q(!0),te(_e,null,Mt(T.value,K=>(Q(),te("div",{key:K.name,class:Me(["bone",{selected:i.spineObject.selectedBone===K.name}]),style:Yt({paddingLeft:`${6+K.depth*16}px`}),role:"button",tabindex:"0",onClick:Z=>C(K.name),onKeydown:es(We(Z=>C(K.name),["prevent"]),["enter"])},[b.value.has(K.name)?(Q(),te("button",{key:0,class:"bone-toggle",title:c.value.has(K.name)?X.$t("spine.expandChildren"):X.$t("spine.collapseChildren"),onClick:We(Z=>k(K.name),["stop"])},F(c.value.has(K.name)?"▸":"▾"),9,y6)):(Q(),te("span",x6,"•")),w("span",w6,F(K.name),1)],46,b6))),128))])):xe("",!0)],64)):(Q(),te(_e,{key:1},[i.spineObject.slots.length?(Q(),te("div",C6,[pe(w("input",{"onUpdate:modelValue":z[18]||(z[18]=K=>u.value=K),type:"search","aria-label":X.$t("spine.searchSlots"),placeholder:X.$t("spine.searchSlotsPlaceholder")},null,8,A6),[[Je,u.value,void 0,{trim:!0}]]),u.value?(Q(),te("button",{key:0,title:X.$t("spine.clearSearch"),"aria-label":X.$t("spine.clearSlotSearch"),onClick:z[19]||(z[19]=K=>u.value="")},"✕",8,T6)):xe("",!0)])):(Q(),te("div",S6,F(X.$t("spine.notLoadedSlots")),1)),i.spineObject.slots.length&&!S.value.length?(Q(),te("div",E6,F(X.$t("spine.noMatchingSlots")),1)):i.spineObject.slots.length?(Q(),te("div",_6,[(Q(!0),te(_e,null,Mt(S.value,K=>(Q(),te("div",{key:K.name,class:Me(["bone slot-row",{selected:i.spineObject.selectedSlot===K.name}]),role:"button",tabindex:"0",title:X.$t("spine.slotTitle",{name:K.name,bone:K.bone||"-",attachment:K.attachment||X.$t("spine.empty")}),onClick:Z=>M(K.name),onKeydown:es(We(Z=>M(K.name),["prevent"]),["enter"])},[w("span",P6,F(K.order+1),1),w("span",k6,F(K.name),1),w("span",I6,F(K.attachment||X.$t("spine.empty")),1)],42,M6))),128))])):xe("",!0)],64))])]))}}),F6=dn(R6,[["__scopeId","data-v-35137928"]]),L6={class:"group"},D6={class:"caret"},O6={class:"scene-actions"},N6=["title"],$6=["title"],B6=["title"],U6=["title"],V6=["disabled","title"],X6={class:"group-body"},Y6={class:"tree scene-tree"},z6=["onClick"],j6={key:0,class:"sub-branch"},H6={key:1,class:"tdot"},G6={class:"tlabel"},W6=["title","aria-label","onClick"],q6={viewBox:"0 0 24 24","aria-hidden":"true"},K6={key:0,class:"eye-slash",d:"M4 4l16 16"},J6=["title","onClick"],Z6=["onClick"],Q6={class:"tlabel"},ej=["title","aria-label","onClick"],tj={viewBox:"0 0 24 24","aria-hidden":"true"},nj={key:0,class:"eye-slash",d:"M4 4l16 16"},ij={class:"scene-object-kind"},sj=["title","onClick"],rj=["onClick"],oj={class:"tlabel"},aj=["title","aria-label","onClick"],lj={viewBox:"0 0 24 24","aria-hidden":"true"},cj={key:0,class:"eye-slash",d:"M4 4l16 16"},dj={class:"scene-object-kind"},uj=["title","onClick"],hj=["onClick"],fj={class:"tlabel"},pj=["title","aria-label","onClick"],mj={viewBox:"0 0 24 24","aria-hidden":"true"},gj={key:0,class:"eye-slash",d:"M4 4l16 16"},vj=["title","onClick"],bj={key:0,class:"empty"},yj={class:"row"},xj={class:"seed-row scene-seed"},wj={for:"system-seed"},Sj=["title"],Cj=["title"],Aj={class:"seed-hint"},Tj={class:"object-editor-title"},Ej={class:"field-block"},_j={class:"field-grid"},Mj={class:"field-block"},Pj={value:"circle"},kj={value:"ellipse"},Ij={value:"rect"},Rj={value:"polygon"},Fj={value:"custom"},Lj={class:"field-block check-field"},Dj={class:"field-grid"},Oj={class:"compact-field"},Nj={class:"compact-field"},$j={class:"field-grid"},Bj={class:"compact-field"},Uj={class:"compact-field"},Vj={key:1,class:"field-grid"},Xj={class:"compact-field"},Yj={class:"compact-field"},zj={key:2,class:"field-grid"},jj={class:"compact-field"},Hj={class:"compact-field"},Gj={class:"field-block"},Wj={value:"physics"},qj={value:"pause"},Kj={value:"destroy"},Jj={key:4,class:"field-grid"},Zj={class:"compact-field"},Qj={class:"compact-field"},eH={class:"collider-follow-section"},tH={class:"follow-path"},nH={class:"field-block"},iH={value:0},sH=["value"],rH={class:"field-grid"},oH={class:"compact-field"},aH={class:"compact-field"},lH={value:"跟随导出"},cH={value:"线性"},dH={value:"贝塞尔"},uH={class:"follow-path"},hH={class:"collider-curve-title"},fH={class:"object-editor-title"},pH={class:"field-block"},mH={class:"field-grid"},gH={class:"compact-field"},vH={class:"compact-field"},bH={class:"field-grid"},yH={class:"compact-field"},xH={class:"compact-field"},wH={class:"setting-line"},SH={class:"setting-line"},CH={class:"path-help"},AH={class:"field-block"},TH={value:""},EH={value:"circle"},_H={value:"square"},MH={value:"polygon"},PH={value:"star"},kH={key:4,class:"panel-hint"},IH=Zt({__name:"SceneObjectsSection",setup(i){const{store:e,resolvedCurveEditorMode:t,sys:n,activeObjectType:s,activeCollider:r,activePath:o,activeSpine:a,canCopyObject:c,collapsed:l,toggle:d,sectionOpen:u,addSys:h,addCollider:f,addPath:p,addSpine:m,copySelectedObject:g,applyPathPreset:v,clearPathAnchors:y,randomizeSeed:b,LINEAR_CURVE:x}=Tr(),T=Fe(()=>{const E=new Map(e.systems.map(I=>[I.id,I])),S=new Map;for(const I of e.systems)if(I.config.eventEnabled!==!1)for(const D of I.config.events||[])D.targetSystemId<=0||D.targetSystemId===I.id||!E.has(D.targetSystemId)||S.has(D.targetSystemId)||S.set(D.targetSystemId,I.id);const C=new Map;for(const[I,D]of S){const $=C.get(D);$?$.push(I):C.set(D,[I])}const M=[],k=new Set,P=(I,D)=>{if(!k.has(I.id)){k.add(I.id),M.push({system:I,depth:D});for(const $ of C.get(I.id)||[]){const j=E.get($);j&&P(j,D+1)}}};for(const I of e.systems)S.has(I.id)||P(I,0);for(const I of e.systems)k.has(I.id)||P(I,0);return M});return(E,S)=>(Q(),te("div",L6,[w("div",{class:"group-head scene-head",onClick:S[5]||(S[5]=C=>_(d)("scene"))},[w("span",D6,F(_(l).scene?"▸":"▾"),1),w("span",null,F(E.$t("scene.title")),1),w("div",O6,[w("button",{class:"scene-add",title:E.$t("scene.addParticle"),onClick:S[0]||(S[0]=We((...C)=>_(h)&&_(h)(...C),["stop"]))},F(E.$t("scene.addParticleShort")),9,N6),w("button",{class:"scene-add",title:E.$t("scene.addCollider"),onClick:S[1]||(S[1]=We((...C)=>_(f)&&_(f)(...C),["stop"]))},F(E.$t("scene.addColliderShort")),9,$6),w("button",{class:"scene-add",title:E.$t("scene.addPath"),onClick:S[2]||(S[2]=We((...C)=>_(p)&&_(p)(...C),["stop"]))},F(E.$t("scene.addPathShort")),9,B6),w("button",{class:"scene-add",title:E.$t("scene.addSpine"),onClick:S[3]||(S[3]=We((...C)=>_(m)&&_(m)(...C),["stop"]))},"+Spine",8,U6),w("button",{class:"scene-add",disabled:!_(c),title:E.$t("scene.copyTitle"),onClick:S[4]||(S[4]=We((...C)=>_(g)&&_(g)(...C),["stop"]))},"+Copy",8,V6)])]),pe(w("div",X6,[w("div",Y6,[(Q(!0),te(_e,null,Mt(T.value,C=>(Q(),te("div",{key:`particle-${C.system.id}`,class:Me(["tree-item scene-object-item",{on:_(s)==="particle"&&C.system.id===_(e).activeObjectId,"scene-object-child":C.depth>0}]),style:Yt(C.depth>0?{paddingLeft:`${C.depth*18}px`}:void 0),onClick:M=>_(e).selectSystem(C.system.id)},[C.depth>0?(Q(),te("span",j6,"└")):(Q(),te("span",H6,"●")),w("span",G6,F(C.system.config.name||"ParticleSystem"),1),w("button",{class:Me(["scene-object-eye",{off:C.system.visible===!1}]),title:C.system.visible===!1?E.$t("scene.showParticle"):E.$t("scene.hideParticle"),"aria-label":C.system.visible===!1?E.$t("scene.showParticle"):E.$t("scene.hideParticle"),onClick:We(M=>C.system.visible=C.system.visible===!1,["stop"])},[(Q(),te("svg",q6,[S[50]||(S[50]=w("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[51]||(S[51]=w("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.system.visible===!1?(Q(),te("path",K6)):xe("",!0)]))],10,W6),w("span",{class:Me(["scene-object-kind",{"sub-emitter-kind":C.depth>0}])},F(C.depth>0?E.$t("scene.subEmitter"):E.$t("scene.particle")),3),w("button",{class:"scene-object-delete",title:E.$t("scene.deleteParticle"),onClick:We(M=>_(e).removeSystem(C.system.id),["stop"])},"✕",8,J6)],14,z6))),128)),(Q(!0),te(_e,null,Mt(_(e).colliders,C=>(Q(),te("div",{key:`collision-${C.id}`,class:Me(["tree-item scene-object-item",{on:_(s)==="collision"&&C.id===_(e).activeObjectId}]),onClick:M=>_(e).selectSceneObject("collision",C.id)},[S[54]||(S[54]=w("span",{class:"tdot collision-dot"},"■",-1)),w("span",Q6,F(C.name),1),w("button",{class:Me(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?E.$t("scene.showCollider"):E.$t("scene.hideCollider"),"aria-label":C.visible===!1?E.$t("scene.showCollider"):E.$t("scene.hideCollider"),onClick:We(M=>C.visible=C.visible===!1,["stop"])},[(Q(),te("svg",tj,[S[52]||(S[52]=w("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[53]||(S[53]=w("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(Q(),te("path",nj)):xe("",!0)]))],10,ej),w("span",ij,F(E.$t("scene.collision")),1),w("button",{class:"scene-object-delete",title:E.$t("scene.deleteCollider"),onClick:We(M=>_(e).removeCollider(C.id),["stop"])},"✕",8,sj)],10,Z6))),128)),(Q(!0),te(_e,null,Mt(_(e).paths,C=>(Q(),te("div",{key:`path-${C.id}`,class:Me(["tree-item scene-object-item",{on:_(s)==="path"&&C.id===_(e).activeObjectId}]),onClick:M=>_(e).selectSceneObject("path",C.id)},[S[57]||(S[57]=w("span",{class:"tdot path-dot"},"◇",-1)),w("span",oj,F(C.name),1),w("button",{class:Me(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?E.$t("scene.showPath"):E.$t("scene.hidePath"),"aria-label":C.visible===!1?E.$t("scene.showPath"):E.$t("scene.hidePath"),onClick:We(M=>C.visible=C.visible===!1,["stop"])},[(Q(),te("svg",lj,[S[55]||(S[55]=w("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[56]||(S[56]=w("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(Q(),te("path",cj)):xe("",!0)]))],10,aj),w("span",dj,F(E.$t("scene.path")),1),w("button",{class:"scene-object-delete",title:E.$t("scene.deletePath"),onClick:We(M=>_(e).removePath(C.id),["stop"])},"✕",8,uj)],10,rj))),128)),(Q(!0),te(_e,null,Mt(_(e).spines,C=>(Q(),te("div",{key:`spine-${C.id}`,class:Me(["tree-item scene-object-item",{on:_(s)==="spine"&&C.id===_(e).activeObjectId}]),onClick:M=>_(e).selectSceneObject("spine",C.id)},[S[60]||(S[60]=w("span",{class:"tdot spine-dot"},"◆",-1)),w("span",fj,F(C.name),1),w("button",{class:Me(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?E.$t("scene.showSpine"):E.$t("scene.hideSpine"),"aria-label":C.visible===!1?E.$t("scene.showSpine"):E.$t("scene.hideSpine"),onClick:We(M=>C.visible=C.visible===!1,["stop"])},[(Q(),te("svg",mj,[S[58]||(S[58]=w("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[59]||(S[59]=w("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(Q(),te("path",gj)):xe("",!0)]))],10,pj),S[61]||(S[61]=w("span",{class:"scene-object-kind"},"Spine",-1)),w("button",{class:"scene-object-delete",title:E.$t("scene.deleteSpine"),onClick:We(M=>_(e).removeSpine(C.id),["stop"])},"✕",8,vj)],10,hj))),128)),!_(e).systems.length&&!_(e).colliders.length&&!_(e).paths.length&&!_(e).spines.length?(Q(),te("div",bj,F(E.$t("scene.empty")),1)):xe("",!0)]),_(s)==="particle"&&_(n)?(Q(),te(_e,{key:0},[w("label",yj,[w("span",null,F(E.$t("scene.name")),1),pe(w("input",{"onUpdate:modelValue":S[6]||(S[6]=C=>_(n).config.name=C),class:"inp"},null,512),[[Je,_(n).config.name]])]),Ce(Ue,{label:E.$t("scene.positionX"),min:-2e3,max:2e3,step:1,modelValue:_(n).config.centerX,"onUpdate:modelValue":S[7]||(S[7]=C=>_(n).config.centerX=C)},null,8,["label","modelValue"]),Ce(Ue,{label:E.$t("scene.positionY"),min:-2e3,max:2e3,step:1,modelValue:_(n).config.centerY,"onUpdate:modelValue":S[8]||(S[8]=C=>_(n).config.centerY=C)},null,8,["label","modelValue"]),Ce(Ue,{label:E.$t("scene.offsetX"),min:-2e3,max:2e3,step:1,modelValue:_(n).config.offsetX,"onUpdate:modelValue":S[9]||(S[9]=C=>_(n).config.offsetX=C)},null,8,["label","modelValue"]),Ce(Ue,{label:E.$t("scene.offsetY"),min:-2e3,max:2e3,step:1,modelValue:_(n).config.offsetY,"onUpdate:modelValue":S[10]||(S[10]=C=>_(n).config.offsetY=C)},null,8,["label","modelValue"]),Ce(Ue,{label:E.$t("scene.rotation"),min:-360,max:360,step:1,modelValue:_(n).config.rootRotation,"onUpdate:modelValue":S[11]||(S[11]=C=>_(n).config.rootRotation=C)},null,8,["label","modelValue"]),Ce(Ue,{label:E.$t("scene.scaleX"),min:.05,max:10,step:.05,modelValue:_(n).config.rootScaleX,"onUpdate:modelValue":S[12]||(S[12]=C=>_(n).config.rootScaleX=C)},null,8,["label","modelValue"]),Ce(Ue,{label:E.$t("scene.scaleY"),min:.05,max:10,step:.05,modelValue:_(n).config.rootScaleY,"onUpdate:modelValue":S[13]||(S[13]=C=>_(n).config.rootScaleY=C)},null,8,["label","modelValue"]),w("div",xj,[w("label",wj,F(E.$t("scene.seed")),1),pe(w("input",{id:"system-seed",class:"seed-input",type:"number",min:"0",step:"1","onUpdate:modelValue":S[14]||(S[14]=C=>_(n).config.seed=C),title:E.$t("scene.seedTitle")},null,8,Sj),[[Je,_(n).config.seed,void 0,{number:!0}]]),w("button",{class:"seed-random",title:E.$t("scene.randomizeSeed"),onClick:S[15]||(S[15]=(...C)=>_(b)&&_(b)(...C))},"⚄",8,Cj)]),w("div",Aj,F(E.$t("scene.seedHint")),1)],64)):_(r)?(Q(),te(_e,{key:1},[w("div",Tj,F(E.$t("scene.colliderTitle")),1),w("label",Ej,[w("span",null,F(E.$t("scene.colliderName")),1),pe(w("input",{"onUpdate:modelValue":S[16]||(S[16]=C=>_(r).name=C),class:"inp"},null,512),[[Je,_(r).name]])]),w("div",_j,[w("label",Mj,[w("span",null,F(E.$t("scene.type")),1),pe(w("select",{"onUpdate:modelValue":S[17]||(S[17]=C=>_(r).shape=C),class:"inp"},[w("option",Pj,F(E.$t("scene.circle")),1),w("option",kj,F(E.$t("scene.ellipse")),1),w("option",Ij,F(E.$t("scene.rect")),1),w("option",Rj,F(E.$t("scene.polygon")),1),w("option",Fj,F(E.$t("scene.custom")),1)],512),[[_t,_(r).shape]])]),w("label",Lj,[w("span",null,F(E.$t("scene.enabled")),1),pe(w("input",{"onUpdate:modelValue":S[18]||(S[18]=C=>_(r).enabled=C),type:"checkbox"},null,512),[[vt,_(r).enabled]])])]),w("div",Dj,[w("label",Oj,[w("span",null,F(E.$t("scene.xPosition")),1),pe(w("input",{"onUpdate:modelValue":S[19]||(S[19]=C=>_(r).x=C),type:"number",class:"inp"},null,512),[[Je,_(r).x,void 0,{number:!0}]])]),w("label",Nj,[w("span",null,F(E.$t("scene.yPosition")),1),pe(w("input",{"onUpdate:modelValue":S[20]||(S[20]=C=>_(r).y=C),type:"number",class:"inp"},null,512),[[Je,_(r).y,void 0,{number:!0}]])])]),Ce(Ue,{label:E.$t("scene.rotation"),min:-360,max:360,step:1,modelValue:_(r).rotation,"onUpdate:modelValue":S[21]||(S[21]=C=>_(r).rotation=C)},null,8,["label","modelValue"]),w("div",$j,[w("label",Bj,[w("span",null,F(E.$t("scene.scaleXShort")),1),pe(w("input",{"onUpdate:modelValue":S[22]||(S[22]=C=>_(r).scaleX=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[Je,_(r).scaleX,void 0,{number:!0}]])]),w("label",Uj,[w("span",null,F(E.$t("scene.scaleYShort")),1),pe(w("input",{"onUpdate:modelValue":S[23]||(S[23]=C=>_(r).scaleY=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[Je,_(r).scaleY,void 0,{number:!0}]])])]),_(r).shape==="circle"?(Q(),kt(Ue,{key:0,label:E.$t("scene.radius"),min:1,max:1e3,step:1,modelValue:_(r).radius,"onUpdate:modelValue":S[24]||(S[24]=C=>_(r).radius=C)},null,8,["label","modelValue"])):_(r).shape==="ellipse"?(Q(),te("div",Vj,[w("label",Xj,[w("span",null,F(E.$t("scene.radiusX")),1),pe(w("input",{"onUpdate:modelValue":S[25]||(S[25]=C=>_(r).radiusX=C),type:"number",min:"1",class:"inp"},null,512),[[Je,_(r).radiusX,void 0,{number:!0}]])]),w("label",Yj,[w("span",null,F(E.$t("scene.radiusY")),1),pe(w("input",{"onUpdate:modelValue":S[26]||(S[26]=C=>_(r).radiusY=C),type:"number",min:"1",class:"inp"},null,512),[[Je,_(r).radiusY,void 0,{number:!0}]])])])):(Q(),te("div",zj,[w("label",jj,[w("span",null,F(E.$t("scene.width")),1),pe(w("input",{"onUpdate:modelValue":S[27]||(S[27]=C=>_(r).width=C),type:"number",min:"1",class:"inp"},null,512),[[Je,_(r).width,void 0,{number:!0}]])]),w("label",Hj,[w("span",null,F(E.$t("scene.height")),1),pe(w("input",{"onUpdate:modelValue":S[28]||(S[28]=C=>_(r).height=C),type:"number",min:"1",class:"inp"},null,512),[[Je,_(r).height,void 0,{number:!0}]])])])),_(r).shape==="polygon"||_(r).shape==="custom"?(Q(),kt(Ue,{key:3,label:E.$t("scene.sides"),min:3,max:16,step:1,modelValue:_(r).sides,"onUpdate:modelValue":S[29]||(S[29]=C=>_(r).sides=C)},null,8,["label","modelValue"])):xe("",!0),w("label",Gj,[w("span",null,F(E.$t("scene.collisionResponse")),1),pe(w("select",{"onUpdate:modelValue":S[30]||(S[30]=C=>_(r).response=C),class:"inp"},[w("option",Wj,F(E.$t("scene.physics")),1),w("option",qj,F(E.$t("scene.pause")),1),w("option",Kj,F(E.$t("scene.destroy")),1)],512),[[_t,_(r).response]])]),_(r).response==="physics"?(Q(),te("div",Jj,[w("label",Zj,[w("span",null,F(E.$t("scene.elasticity")),1),pe(w("input",{"onUpdate:modelValue":S[31]||(S[31]=C=>_(r).elasticity=C),type:"number",min:"0",max:"1",step:"0.01",class:"inp"},null,512),[[Je,_(r).elasticity,void 0,{number:!0}]])]),w("label",Qj,[w("span",null,F(E.$t("scene.friction")),1),pe(w("input",{"onUpdate:modelValue":S[32]||(S[32]=C=>_(r).friction=C),type:"number",min:"0",max:"1",step:"0.01",class:"inp"},null,512),[[Je,_(r).friction,void 0,{number:!0}]])])])):xe("",!0),w("div",eH,[w("label",tH,[pe(w("input",{"onUpdate:modelValue":S[33]||(S[33]=C=>_(r).followPath=C),type:"checkbox"},null,512),[[vt,_(r).followPath]]),Ct(F(E.$t("scene.followPath")),1)]),_(r).followPath?(Q(),te(_e,{key:0},[w("label",nH,[w("span",null,F(E.$t("scene.targetPath")),1),pe(w("select",{"onUpdate:modelValue":S[34]||(S[34]=C=>_(r).followPathId=C),class:"inp"},[w("option",iH,F(E.$t("scene.notSelected")),1),(Q(!0),te(_e,null,Mt(_(e).paths,C=>(Q(),te("option",{key:C.id,value:C.id},F(C.name),9,sH))),128))],512),[[_t,_(r).followPathId,void 0,{number:!0}]])]),w("div",rH,[w("label",oH,[w("span",null,F(E.$t("scene.moveDuration")),1),pe(w("input",{"onUpdate:modelValue":S[35]||(S[35]=C=>_(r).followDuration=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[Je,_(r).followDuration,void 0,{number:!0}]])]),w("label",aH,[w("span",null,F(E.$t("appearance.curveMode")),1),pe(w("select",{"onUpdate:modelValue":S[36]||(S[36]=C=>_(r).followCurveMode=C),class:"inp"},[w("option",lH,F(E.$t("common.followExport")),1),w("option",cH,F(E.$t("common.linear")),1),w("option",dH,F(E.$t("common.bezier")),1)],512),[[_t,_(r).followCurveMode]])])]),w("label",uH,[pe(w("input",{"onUpdate:modelValue":S[37]||(S[37]=C=>_(r).followPathRotation=C),type:"checkbox"},null,512),[[vt,_(r).followPathRotation]]),Ct(F(E.$t("scene.followDirection")),1)]),w("div",hH,[Ct(F(E.$t("scene.moveProgressCurve"))+" ",1),w("small",null,F(E.$t("scene.moveProgressHelp")),1)]),Ce(Ts,{"model-value":_(r).followCurve||_(x),"default-value":_(x),mode:_(t)(_(r).followCurveMode),"onUpdate:modelValue":S[38]||(S[38]=C=>_(r).followCurve=C)},null,8,["model-value","default-value","mode"])],64)):xe("",!0)])],64)):_(o)?(Q(),te(_e,{key:2},[w("div",fH,F(E.$t("scene.pathTitle")),1),w("label",pH,[w("span",null,F(E.$t("scene.pathName")),1),pe(w("input",{"onUpdate:modelValue":S[39]||(S[39]=C=>_(o).name=C),class:"inp"},null,512),[[Je,_(o).name]])]),w("div",mH,[w("label",gH,[w("span",null,F(E.$t("scene.xPosition")),1),pe(w("input",{"onUpdate:modelValue":S[40]||(S[40]=C=>_(o).x=C),type:"number",class:"inp"},null,512),[[Je,_(o).x,void 0,{number:!0}]])]),w("label",vH,[w("span",null,F(E.$t("scene.yPosition")),1),pe(w("input",{"onUpdate:modelValue":S[41]||(S[41]=C=>_(o).y=C),type:"number",class:"inp"},null,512),[[Je,_(o).y,void 0,{number:!0}]])])]),Ce(Ue,{label:E.$t("scene.rotation"),min:-360,max:360,step:1,modelValue:_(o).rotation,"onUpdate:modelValue":S[42]||(S[42]=C=>_(o).rotation=C)},null,8,["label","modelValue"]),w("div",bH,[w("label",yH,[w("span",null,F(E.$t("scene.scaleXShort")),1),pe(w("input",{"onUpdate:modelValue":S[43]||(S[43]=C=>_(o).scaleX=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[Je,_(o).scaleX,void 0,{number:!0}]])]),w("label",xH,[w("span",null,F(E.$t("scene.scaleYShort")),1),pe(w("input",{"onUpdate:modelValue":S[44]||(S[44]=C=>_(o).scaleY=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[Je,_(o).scaleY,void 0,{number:!0}]])])]),w("label",wH,[w("span",null,F(E.$t("scene.closedPath")),1),pe(w("input",{"onUpdate:modelValue":S[45]||(S[45]=C=>_(o).closed=C),type:"checkbox"},null,512),[[vt,_(o).closed]])]),w("label",SH,[w("span",null,F(E.$t("scene.pathColor")),1),pe(w("input",{"onUpdate:modelValue":S[46]||(S[46]=C=>_(o).color=C),type:"color",class:"path-color"},null,512),[[Je,_(o).color]])]),w("div",CH,[w("span",null,F(E.$t("scene.pathHelp")),1),w("ul",null,[w("li",null,F(E.$t("scene.pathHelpItems.0")),1),w("li",null,F(E.$t("scene.pathHelpItems.1")),1),w("li",null,F(E.$t("scene.pathHelpItems.2")),1),w("li",null,F(E.$t("scene.pathHelpItems.3")),1),w("li",null,F(E.$t("scene.pathHelpItems.4")),1),w("li",null,F(E.$t("scene.pathHelpItems.5")),1),w("li",null,F(E.$t("scene.pathHelpItems.6")),1),w("li",null,F(E.$t("scene.pathHelpItems.7")),1),w("li",null,F(E.$t("scene.pathHelpItems.8")),1),w("li",null,F(E.$t("scene.pathHelpItems.9")),1)])]),w("label",AH,[w("span",null,F(E.$t("scene.applyPresetShape")),1),pe(w("select",{"onUpdate:modelValue":S[47]||(S[47]=C=>_(o).preset=C),class:"inp"},[w("option",TH,F(E.$t("scene.choosePreset")),1),w("option",EH,F(E.$t("scene.circle")),1),w("option",_H,F(E.$t("scene.square")),1),w("option",MH,F(E.$t("scene.polygon")),1),w("option",PH,F(E.$t("scene.star")),1)],512),[[_t,_(o).preset]])]),w("button",{class:"path-action primary",onClick:S[48]||(S[48]=(...C)=>_(v)&&_(v)(...C))},F(E.$t("scene.applyPreset")),1),w("button",{class:"path-action",onClick:S[49]||(S[49]=(...C)=>_(y)&&_(y)(...C))},F(E.$t("scene.clearAnchors")),1)],64)):_(a)?(Q(),kt(F6,{key:3,"spine-object":_(a)},null,8,["spine-object"])):(Q(),te("div",kH,F(E.$t("scene.panelHint")),1))],512),[[Bt,_(u)("scene")]])]))}}),Gx=dn(IH,[["__scopeId","data-v-f0cc6209"]]),RH={class:"group"},FH={class:"caret"},LH=["title"],DH={class:"group-body"},OH={class:"segs"},NH={class:"segs stream-behavior-segs"},$H={key:2,class:"stream-loop-options"},BH={class:"loop-section-row"},UH={class:"switch-row"},VH=["checked"],XH={key:0,class:"loop-duration-control"},YH={class:"switch-row loop-duration-toggle"},zH=["checked"],jH={class:"loop-section-duration"},HH=["value","aria-label"],GH={key:1},WH={key:2,class:"loop-auto-duration"},qH={class:"loop-section-row"},KH={class:"switch-row"},JH=["checked"],ZH={key:0,class:"loop-duration-control"},QH={class:"switch-row loop-duration-toggle"},eG=["checked"],tG={class:"loop-section-duration"},nG=["value","aria-label"],iG={key:1},sG={key:2,class:"loop-auto-duration"},rG={key:3,class:"modifier-hint stream-loop-hint"},oG={class:"group"},aG={class:"caret"},lG=["title"],cG={class:"group-body"},dG={class:"row"},uG={value:"point"},hG={value:"circle"},fG={value:"rect"},pG={value:"cone"},mG={value:"path"},gG={class:"row"},vG={value:0},bG=["value","disabled"],yG={key:0,class:"row"},xG={value:"fixed"},wG={value:"random"},SG={class:"row"},CG={value:"fixed"},AG={value:"random"},TG={key:0,value:"radial"},EG={key:1,value:"path-normal"},_G={key:2,value:"path-tangent"},MG={key:6,class:"switch-row"},PG=Zt({__name:"EmissionSection",setup(i){const{store:e,sys:t,automaticLoopDuration:n,loopDurationFrames:s,collapsed:r,toggle:o,sectionVisible:a,sectionOpen:c,setEmitMode:l,setLoopDurationFrames:d,setStreamBehavior:u,setLoopSection:h,setLoopSectionDuration:f,setLoopCustomDuration:p,resetModule:m,select:g,onShapeChange:v,onSpawnPathChange:y}=Tr();return(b,x)=>(Q(),te(_e,null,[pe(w("div",RH,[w("div",{class:"group-head",onClick:x[1]||(x[1]=T=>_(o)("emitMode"))},[w("span",FH,F(_(r).emitMode?"▸":"▾"),1),w("span",null,F(b.$t("emission.title")),1),w("button",{class:"group-reset",title:b.$t("emission.reset"),onClick:x[0]||(x[0]=We(T=>_(m)("emitMode"),["stop"]))},F(b.$t("common.reset")),9,LH)]),pe(w("div",DH,[w("div",OH,[w("button",{class:Me(["seg",{on:_(t).config.mode==="stream"}]),onClick:x[2]||(x[2]=T=>_(l)("stream"))},F(b.$t("emission.stream")),3),w("button",{class:Me(["seg",{on:_(t).config.mode==="burst"}]),onClick:x[3]||(x[3]=T=>_(l)("burst"))},F(b.$t("emission.burst")),3)]),_(t).config.mode==="stream"?(Q(),te(_e,{key:0},[w("div",NH,[w("button",{class:Me(["seg",{on:_(t).config.streamBehavior==="normal"}]),onClick:x[4]||(x[4]=T=>_(u)("normal"))},F(b.$t("emission.normalStream")),3),w("button",{class:Me(["seg",{on:_(t).config.streamBehavior==="loop"}]),onClick:x[5]||(x[5]=T=>_(u)("loop"))},F(b.$t("emission.loopStream")),3)]),Ce(Ue,{label:b.$t("emission.rate"),min:1,max:300,step:1,modelValue:_(t).config.rate,"onUpdate:modelValue":x[6]||(x[6]=T=>_(t).config.rate=T)},null,8,["label","modelValue"]),_(t).config.streamBehavior==="normal"?(Q(),kt(Ue,{key:0,label:b.$t("emission.duration"),min:1/30,max:60,step:1/30,modelValue:_(t).config.duration,"onUpdate:modelValue":x[7]||(x[7]=T=>_(t).config.duration=T)},null,8,["label","modelValue"])):(Q(),kt(Ue,{key:1,label:b.$t("emission.loopDuration"),min:1,max:1800,step:1,"model-value":_(s),"onUpdate:modelValue":_(d)},null,8,["label","model-value","onUpdate:modelValue"])),_(t).config.streamBehavior==="loop"?(Q(),te("div",$H,[w("div",BH,[w("label",UH,[w("input",{type:"checkbox",checked:_(t).config.generateLoopStartAnimation,onChange:x[8]||(x[8]=T=>_(h)("start",T))},null,40,VH),x[36]||(x[36]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(b.$t("emission.generateStart")),1)]),_(t).config.generateLoopStartAnimation?(Q(),te("div",XH,[w("label",YH,[w("input",{type:"checkbox",checked:_(t).config.loopStartUseCustomDuration,onChange:x[9]||(x[9]=T=>_(p)("start",T))},null,40,zH),x[37]||(x[37]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(b.$t("emission.customDuration")),1)]),w("label",jH,[_(t).config.loopStartUseCustomDuration?(Q(),te("input",{key:0,value:_(t).config.loopStartDurationFrames,type:"number",min:"1",max:"1800",step:"1","aria-label":b.$t("emission.startLoopDuration"),onChange:x[10]||(x[10]=T=>_(f)("start",T))},null,40,HH)):xe("",!0),_(t).config.loopStartUseCustomDuration?(Q(),te("span",GH,"f")):(Q(),te("span",WH,F(b.$t("emission.auto",{frames:_(n)})),1))])])):xe("",!0)]),w("div",qH,[w("label",KH,[w("input",{type:"checkbox",checked:_(t).config.generateLoopEndAnimation,onChange:x[11]||(x[11]=T=>_(h)("end",T))},null,40,JH),x[38]||(x[38]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(b.$t("emission.generateEnd")),1)]),_(t).config.generateLoopEndAnimation?(Q(),te("div",ZH,[w("label",QH,[w("input",{type:"checkbox",checked:_(t).config.loopEndUseCustomDuration,onChange:x[12]||(x[12]=T=>_(p)("end",T))},null,40,eG),x[39]||(x[39]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(b.$t("emission.customDuration")),1)]),w("label",tG,[_(t).config.loopEndUseCustomDuration?(Q(),te("input",{key:0,value:_(t).config.loopEndDurationFrames,type:"number",min:"1",max:"1800",step:"1","aria-label":b.$t("emission.endLoopDuration"),onChange:x[13]||(x[13]=T=>_(f)("end",T))},null,40,nG)):xe("",!0),_(t).config.loopEndUseCustomDuration?(Q(),te("span",iG,"f")):(Q(),te("span",sG,F(b.$t("emission.auto",{frames:_(n)})),1))])])):xe("",!0)])])):xe("",!0),_(t).config.streamBehavior==="loop"?(Q(),te("div",rG,F(b.$t("emission.loopWarning")),1)):xe("",!0)],64)):(Q(),kt(Ue,{key:1,label:b.$t("emission.burstCount"),min:1,max:1e3,step:1,modelValue:_(t).config.burstCount,"onUpdate:modelValue":x[14]||(x[14]=T=>_(t).config.burstCount=T)},null,8,["label","modelValue"])),Ce(Ue,{label:b.$t("emission.delay"),min:0,max:5,step:.1,modelValue:_(t).config.delay,"onUpdate:modelValue":x[15]||(x[15]=T=>_(t).config.delay=T)},null,8,["label","modelValue"])],512),[[Bt,_(c)("emitMode")]])],512),[[Bt,_(a)("emitMode")]]),pe(w("div",oG,[w("div",{class:"group-head",onClick:x[17]||(x[17]=T=>_(o)("shape"))},[w("span",aG,F(_(r).shape?"▸":"▾"),1),w("span",null,F(b.$t("emission.shapeTitle")),1),w("button",{class:"group-reset",title:b.$t("emission.shapeReset"),onClick:x[16]||(x[16]=We(T=>_(m)("shape"),["stop"]))},F(b.$t("common.reset")),9,lG)]),pe(w("div",cG,[w("label",dG,[w("span",null,F(b.$t("emission.shape")),1),pe(w("select",{"onUpdate:modelValue":x[18]||(x[18]=T=>_(t).config.shape=T),class:"inp",onChange:x[19]||(x[19]=(...T)=>_(v)&&_(v)(...T))},[w("option",uG,F(b.$t("emission.point")),1),w("option",hG,F(b.$t("emission.circle")),1),w("option",fG,F(b.$t("emission.rect")),1),w("option",pG,F(b.$t("emission.cone")),1),w("option",mG,F(b.$t("emission.path")),1)],544),[[_t,_(t).config.shape]])]),_(t).config.shape==="circle"||_(t).config.shape==="cone"?(Q(),te(_e,{key:0},[Ce(Ue,{label:_(t).config.shape==="cone"?b.$t("emission.innerDiameter"):b.$t("emission.innerRadius"),min:0,max:_(t).config.outerRadius,step:1,modelValue:_(t).config.innerRadius,"onUpdate:modelValue":x[20]||(x[20]=T=>_(t).config.innerRadius=T)},null,8,["label","max","modelValue"]),Ce(Ue,{label:_(t).config.shape==="cone"?b.$t("emission.outerDiameter"):b.$t("emission.outerRadius"),min:_(t).config.innerRadius,max:300,step:1,modelValue:_(t).config.outerRadius,"onUpdate:modelValue":x[21]||(x[21]=T=>_(t).config.outerRadius=T)},null,8,["label","min","modelValue"])],64)):xe("",!0),_(t).config.shape==="cone"?(Q(),te(_e,{key:1},[Ce(Ue,{label:b.$t("emission.coneDirection"),min:-360,max:360,step:1,modelValue:_(t).config.coneDirection,"onUpdate:modelValue":x[22]||(x[22]=T=>_(t).config.coneDirection=T)},null,8,["label","modelValue"]),Ce(Ue,{label:b.$t("emission.coneAngle"),min:1,max:360,step:1,modelValue:_(t).config.coneAngle,"onUpdate:modelValue":x[23]||(x[23]=T=>_(t).config.coneAngle=T)},null,8,["label","modelValue"])],64)):_(t).config.shape==="rect"?(Q(),te(_e,{key:2},[Ce(Ue,{label:b.$t("emission.innerWidth"),min:0,max:_(t).config.outerRectW,step:1,modelValue:_(t).config.innerRectW,"onUpdate:modelValue":x[24]||(x[24]=T=>_(t).config.innerRectW=T)},null,8,["label","max","modelValue"]),Ce(Ue,{label:b.$t("emission.innerHeight"),min:0,max:_(t).config.outerRectH,step:1,modelValue:_(t).config.innerRectH,"onUpdate:modelValue":x[25]||(x[25]=T=>_(t).config.innerRectH=T)},null,8,["label","max","modelValue"]),Ce(Ue,{label:b.$t("emission.outerWidth"),min:_(t).config.innerRectW,max:400,step:1,modelValue:_(t).config.outerRectW,"onUpdate:modelValue":x[26]||(x[26]=T=>_(t).config.outerRectW=T)},null,8,["label","min","modelValue"]),Ce(Ue,{label:b.$t("emission.outerHeight"),min:_(t).config.innerRectH,max:400,step:1,modelValue:_(t).config.outerRectH,"onUpdate:modelValue":x[27]||(x[27]=T=>_(t).config.outerRectH=T)},null,8,["label","min","modelValue"])],64)):_(t).config.shape==="path"?(Q(),te(_e,{key:3},[w("label",gG,[w("span",null,F(b.$t("emission.selectPath")),1),pe(w("select",{"onUpdate:modelValue":x[28]||(x[28]=T=>_(t).config.spawnPathId=T),class:"inp",onChange:x[29]||(x[29]=(...T)=>_(y)&&_(y)(...T))},[w("option",vG,F(b.$t("emission.noPath")),1),(Q(!0),te(_e,null,Mt(_(e).paths,T=>(Q(),te("option",{key:T.id,value:T.id,disabled:!T.enabled},F(T.name),9,bG))),128))],544),[[_t,_(t).config.spawnPathId,void 0,{number:!0}]])]),_(t).config.spawnPathId>0?(Q(),te("label",yG,[w("span",null,F(b.$t("emission.birthDistribution")),1),pe(w("select",{"onUpdate:modelValue":x[30]||(x[30]=T=>_(t).config.spawnPathDistribution=T),class:"inp"},[w("option",xG,F(b.$t("emission.evenDistribution")),1),w("option",wG,F(b.$t("emission.randomDistribution")),1)],512),[[_t,_(t).config.spawnPathDistribution]])])):xe("",!0)],64)):xe("",!0),x[41]||(x[41]=w("div",{class:"divider"},null,-1)),w("label",SG,[w("span",null,F(b.$t("emission.emissionAngle")),1),pe(w("select",{"onUpdate:modelValue":x[31]||(x[31]=T=>_(t).config.emissionAngleMode=T),class:"inp"},[w("option",CG,F(b.$t("common.fixed")),1),w("option",AG,F(b.$t("common.random")),1),_(t).config.shape==="circle"||_(t).config.shape==="rect"||_(t).config.shape==="cone"?(Q(),te("option",TG,F(b.$t("emission.radial")),1)):xe("",!0),_(t).config.shape==="path"&&_(t).config.spawnPathId>0?(Q(),te("option",EG,F(b.$t("emission.pathNormal")),1)):xe("",!0),_(t).config.shape==="path"&&_(t).config.spawnPathId>0?(Q(),te("option",_G,F(b.$t("emission.pathTangent")),1)):xe("",!0)],512),[[_t,_(t).config.emissionAngleMode]])]),_(t).config.emissionAngleMode==="fixed"?(Q(),kt(Ue,{key:4,label:b.$t("emission.fixedAngle"),min:-360,max:360,step:1,modelValue:_(t).config.direction,"onUpdate:modelValue":x[32]||(x[32]=T=>_(t).config.direction=T)},null,8,["label","modelValue"])):_(t).config.emissionAngleMode==="random"?(Q(),te(_e,{key:5},[Ce(Ue,{label:b.$t("emission.baseAngle"),min:-360,max:360,step:1,modelValue:_(t).config.direction,"onUpdate:modelValue":x[33]||(x[33]=T=>_(t).config.direction=T)},null,8,["label","modelValue"]),Ce(Ue,{label:b.$t("emission.randomRange"),min:0,max:360,step:1,modelValue:_(t).config.spread,"onUpdate:modelValue":x[34]||(x[34]=T=>_(t).config.spread=T)},null,8,["label","modelValue"])],64)):xe("",!0),_(t).config.shape!=="point"?(Q(),te("label",MG,[pe(w("input",{type:"checkbox","onUpdate:modelValue":x[35]||(x[35]=T=>_(t).config.showShape=T)},null,512),[[vt,_(t).config.showShape]]),x[40]||(x[40]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(b.$t("emission.showShape")),1)])):xe("",!0)],512),[[Bt,_(c)("shape")]])],512),[[Bt,_(a)("shape")]])],64))}}),Wx=dn(PG,[["__scopeId","data-v-fc08ba9a"]]),kG={class:"pac"},IG={class:"pac-head"},RG={class:"pac-label"},FG={key:0,class:"pac-modes"},LG=["onClick"],DG={class:"pac-range"},OG={class:"pac-curve"},NG={class:"pac-axis"},$G=Zt({__name:"ParticleAttributeControl",props:{label:{},mode:{},valueMin:{},valueMax:{},curve:{},defaultCurve:{default:()=>[{x:0,y:0},{x:1,y:1}]},min:{},max:{},step:{default:1},allowDirection:{type:Boolean,default:!1},allowCurve:{type:Boolean,default:!0},showModes:{type:Boolean,default:!0},curveLabel:{default:""}},emits:["update:mode","update:valueMin","update:valueMax","update:curve"],setup(i){const e=i,{t}=mi(),n=Fe(()=>{const s=[{label:t("common.fixed"),value:"fixed"},{label:t("common.random"),value:"random"}];return e.allowCurve&&s.push({label:t("common.curve"),value:"curve"}),e.allowDirection&&s.push({label:t("attributeControl.direction"),value:"direction"}),s});return(s,r)=>(Q(),te("div",kG,[w("div",IG,[w("span",RG,F(i.label),1),i.showModes?(Q(),te("div",FG,[(Q(!0),te(_e,null,Mt(n.value,o=>(Q(),te("button",{key:o.value,class:Me(["pac-mode",{on:i.mode===o.value}]),onClick:a=>s.$emit("update:mode",o.value)},F(o.label),11,LG))),128))])):xe("",!0)]),i.mode==="fixed"||i.mode==="direction"?(Q(),kt(Ue,{key:0,label:i.mode==="direction"?s.$t("attributeControl.angleOffset"):s.$t("attributeControl.value"),min:i.min,max:i.max,step:i.step,"model-value":i.valueMin,"onUpdate:modelValue":r[0]||(r[0]=o=>s.$emit("update:valueMin",o))},null,8,["label","min","max","step","model-value"])):i.mode==="random"?(Q(),te(_e,{key:1},[Ce(Ue,{label:s.$t("attributeControl.lower"),min:i.min,max:i.max,step:i.step,"model-value":i.valueMin,"onUpdate:modelValue":r[1]||(r[1]=o=>s.$emit("update:valueMin",o))},null,8,["label","min","max","step","model-value"]),Ce(Ue,{label:s.$t("attributeControl.upper"),min:i.min,max:i.max,step:i.step,"model-value":i.valueMax,"onUpdate:modelValue":r[2]||(r[2]=o=>s.$emit("update:valueMax",o))},null,8,["label","min","max","step","model-value"])],64)):(Q(),te(_e,{key:2},[w("div",DG,[Ce(Ue,{label:s.$t("attributeControl.rangeLower"),min:i.min,max:i.max,step:i.step,"model-value":i.valueMin,"onUpdate:modelValue":r[3]||(r[3]=o=>s.$emit("update:valueMin",o))},null,8,["label","min","max","step","model-value"]),Ce(Ue,{label:s.$t("attributeControl.rangeUpper"),min:i.min,max:i.max,step:i.step,"model-value":i.valueMax,"onUpdate:modelValue":r[4]||(r[4]=o=>s.$emit("update:valueMax",o))},null,8,["label","min","max","step","model-value"])]),w("div",OG,[Ce(Ts,{"model-value":i.curve,"default-value":i.defaultCurve,"onUpdate:modelValue":r[5]||(r[5]=o=>s.$emit("update:curve",o))},null,8,["model-value","default-value"]),w("div",NG,[r[6]||(r[6]=w("span",null,"0",-1)),w("span",null,F(i.curveLabel||s.$t("attributeControl.curveInput")),1),r[7]||(r[7]=w("span",null,"1",-1))])])],64))]))}}),Hs=dn($G,[["__scopeId","data-v-a3a8dde3"]]),BG={class:"group"},UG={class:"caret"},VG=["title"],XG={class:"group-body attr-body"},YG={class:"attr-section-title"},zG={class:"attr-axis-head"},jG={class:"axis-modes"},HG={class:"attr-section-title life-title"},GG={class:"life-item"},WG={class:"switch-row"},qG={class:"life-item"},KG={class:"switch-row"},JG={class:"axis-modes life-axis"},ZG={class:"life-item"},QG={class:"switch-row"},eW=Zt({__name:"ParticleAttributesSection",setup(i){const{sys:e,collapsed:t,toggle:n,sectionOpen:s,resetModule:r,setSpeedOverLifeMode:o,prepareScaleOverLifeCurve:a,setScaleOverLifeMode:c,LINEAR_CURVE:l,FLAT_CURVE:d}=Tr();return(u,h)=>(Q(),te("div",BG,[w("div",{class:"group-head",onClick:h[1]||(h[1]=f=>_(n)("attr"))},[w("span",UG,F(_(t).attr?"▸":"▾"),1),w("span",null,F(u.$t("attributes.title")),1),w("button",{class:"group-reset",title:u.$t("attributes.reset"),onClick:h[0]||(h[0]=We(f=>_(r)("attr"),["stop"]))},F(u.$t("common.reset")),9,VG)]),pe(w("div",XG,[w("div",YG,F(u.$t("attributes.initialParams")),1),Ce(Hs,{label:u.$t("attributes.initialLife"),"allow-curve":!1,mode:_(e).config.lifeMode,"onUpdate:mode":h[2]||(h[2]=f=>_(e).config.lifeMode=f),"value-min":_(e).config.lifeMin,"onUpdate:valueMin":h[3]||(h[3]=f=>_(e).config.lifeMin=f),"value-max":_(e).config.lifeMax,"onUpdate:valueMax":h[4]||(h[4]=f=>_(e).config.lifeMax=f),curve:_(e).config.lifeCurve,"onUpdate:curve":h[5]||(h[5]=f=>_(e).config.lifeCurve=f),min:.1,max:10,step:.1,"curve-label":u.$t("attributes.randomSample")},null,8,["label","mode","value-min","value-max","curve","curve-label"]),Ce(Hs,{label:u.$t("attributes.initialSpeed"),"allow-curve":!1,mode:_(e).config.speedMode,"onUpdate:mode":h[6]||(h[6]=f=>_(e).config.speedMode=f),"value-min":_(e).config.speedMin,"onUpdate:valueMin":h[7]||(h[7]=f=>_(e).config.speedMin=f),"value-max":_(e).config.speedMax,"onUpdate:valueMax":h[8]||(h[8]=f=>_(e).config.speedMax=f),curve:_(e).config.speedCurve,"onUpdate:curve":h[9]||(h[9]=f=>_(e).config.speedCurve=f),min:0,max:1e3,step:1,"curve-label":u.$t("attributes.randomSample")},null,8,["label","mode","value-min","value-max","curve","curve-label"]),w("div",zG,[w("span",null,F(u.$t("attributes.initialScale")),1),w("div",jG,[w("button",{class:Me(["axis-mode",{on:_(e).config.scaleAxisMode==="uniform"}]),onClick:h[10]||(h[10]=f=>_(e).config.scaleAxisMode="uniform")},F(u.$t("attributes.uniform")),3),w("button",{class:Me(["axis-mode",{on:_(e).config.scaleAxisMode==="separate"}]),onClick:h[11]||(h[11]=f=>_(e).config.scaleAxisMode="separate")},F(u.$t("attributes.separateXY")),3)])]),Ce(Hs,{label:_(e).config.scaleAxisMode==="uniform"?u.$t("attributes.initialScale"):u.$t("attributes.scaleX"),"allow-curve":!1,mode:_(e).config.scaleMode,"onUpdate:mode":h[12]||(h[12]=f=>_(e).config.scaleMode=f),"value-min":_(e).config.scaleMin,"onUpdate:valueMin":h[13]||(h[13]=f=>_(e).config.scaleMin=f),"value-max":_(e).config.scaleMax,"onUpdate:valueMax":h[14]||(h[14]=f=>_(e).config.scaleMax=f),curve:_(e).config.scaleCurve,"onUpdate:curve":h[15]||(h[15]=f=>_(e).config.scaleCurve=f),min:0,max:5,step:.05,"curve-label":u.$t("attributes.randomSample")},null,8,["label","mode","value-min","value-max","curve","curve-label"]),_(e).config.scaleAxisMode==="separate"?(Q(),kt(Hs,{key:0,label:u.$t("attributes.scaleY"),"show-modes":!1,"allow-curve":!1,mode:_(e).config.scaleMode,"onUpdate:mode":h[16]||(h[16]=f=>_(e).config.scaleMode=f),"value-min":_(e).config.scaleYMin,"onUpdate:valueMin":h[17]||(h[17]=f=>_(e).config.scaleYMin=f),"value-max":_(e).config.scaleYMax,"onUpdate:valueMax":h[18]||(h[18]=f=>_(e).config.scaleYMax=f),curve:_(e).config.scaleYCurve,"onUpdate:curve":h[19]||(h[19]=f=>_(e).config.scaleYCurve=f),min:0,max:5,step:.05,"curve-label":u.$t("attributes.randomSample")},null,8,["label","mode","value-min","value-max","curve","curve-label"])):xe("",!0),Ce(Hs,{label:u.$t("attributes.initialRotation"),"allow-direction":"","allow-curve":!1,mode:_(e).config.initialRotationMode,"onUpdate:mode":h[20]||(h[20]=f=>_(e).config.initialRotationMode=f),"value-min":_(e).config.initialRotationMin,"onUpdate:valueMin":h[21]||(h[21]=f=>_(e).config.initialRotationMin=f),"value-max":_(e).config.initialRotationMax,"onUpdate:valueMax":h[22]||(h[22]=f=>_(e).config.initialRotationMax=f),curve:_(e).config.initialRotationCurve,"onUpdate:curve":h[23]||(h[23]=f=>_(e).config.initialRotationCurve=f),min:-360,max:360,step:1,"curve-label":u.$t("attributes.randomSample")},null,8,["label","mode","value-min","value-max","curve","curve-label"]),w("div",HG,F(u.$t("attributes.lifecycleTitle")),1),w("div",GG,[w("label",WG,[pe(w("input",{type:"checkbox","onUpdate:modelValue":h[24]||(h[24]=f=>_(e).config.speedOverLifeEnabled=f)},null,512),[[vt,_(e).config.speedOverLifeEnabled]]),h[44]||(h[44]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(u.$t("attributes.speedOverLife")),1)]),_(e).config.speedOverLifeEnabled?(Q(),kt(Hs,{key:0,label:u.$t("attributes.speedMultiplier"),mode:_(e).config.speedOverLifeMode,"onUpdate:mode":_(o),"value-min":_(e).config.speedOverLifeMin,"onUpdate:valueMin":h[25]||(h[25]=f=>_(e).config.speedOverLifeMin=f),"value-max":_(e).config.speedOverLifeMax,"onUpdate:valueMax":h[26]||(h[26]=f=>_(e).config.speedOverLifeMax=f),curve:_(e).config.speedOverLifeCurve,"onUpdate:curve":h[27]||(h[27]=f=>_(e).config.speedOverLifeCurve=f),"default-curve":_(d),min:0,max:3,step:.05,"curve-label":u.$t("attributes.lifeTo")},null,8,["label","mode","onUpdate:mode","value-min","value-max","curve","default-curve","curve-label"])):xe("",!0)]),w("div",qG,[w("label",KG,[pe(w("input",{type:"checkbox","onUpdate:modelValue":h[28]||(h[28]=f=>_(e).config.scaleOverLifeEnabled=f),onChange:h[29]||(h[29]=(...f)=>_(a)&&_(a)(...f))},null,544),[[vt,_(e).config.scaleOverLifeEnabled]]),h[45]||(h[45]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(u.$t("attributes.scaleOverLife")),1)]),_(e).config.scaleOverLifeEnabled?(Q(),te(_e,{key:0},[w("div",JG,[w("button",{class:Me(["axis-mode",{on:_(e).config.scaleOverLifeAxisMode==="uniform"}]),onClick:h[30]||(h[30]=f=>_(e).config.scaleOverLifeAxisMode="uniform")},F(u.$t("attributes.uniform")),3),w("button",{class:Me(["axis-mode",{on:_(e).config.scaleOverLifeAxisMode==="separate"}]),onClick:h[31]||(h[31]=f=>_(e).config.scaleOverLifeAxisMode="separate")},F(u.$t("attributes.separateXY")),3)]),Ce(Hs,{label:_(e).config.scaleOverLifeAxisMode==="uniform"?u.$t("attributes.scaleMultiplier"):u.$t("attributes.multiplierX"),mode:_(e).config.scaleOverLifeMode,"onUpdate:mode":_(c),"value-min":_(e).config.scaleOverLifeMin,"onUpdate:valueMin":h[32]||(h[32]=f=>_(e).config.scaleOverLifeMin=f),"value-max":_(e).config.scaleOverLifeMax,"onUpdate:valueMax":h[33]||(h[33]=f=>_(e).config.scaleOverLifeMax=f),curve:_(e).config.scaleOverLifeCurve,"onUpdate:curve":h[34]||(h[34]=f=>_(e).config.scaleOverLifeCurve=f),"default-curve":_(d),min:0,max:3,step:.05,"curve-label":u.$t("attributes.lifeTo")},null,8,["label","mode","onUpdate:mode","value-min","value-max","curve","default-curve","curve-label"]),_(e).config.scaleOverLifeAxisMode==="separate"?(Q(),kt(Hs,{key:0,label:u.$t("attributes.multiplierY"),"show-modes":!1,mode:_(e).config.scaleOverLifeMode,"onUpdate:mode":h[35]||(h[35]=f=>_(e).config.scaleOverLifeMode=f),"value-min":_(e).config.scaleYOverLifeMin,"onUpdate:valueMin":h[36]||(h[36]=f=>_(e).config.scaleYOverLifeMin=f),"value-max":_(e).config.scaleYOverLifeMax,"onUpdate:valueMax":h[37]||(h[37]=f=>_(e).config.scaleYOverLifeMax=f),curve:_(e).config.scaleYOverLifeCurve,"onUpdate:curve":h[38]||(h[38]=f=>_(e).config.scaleYOverLifeCurve=f),"default-curve":_(d),min:0,max:3,step:.05,"curve-label":u.$t("attributes.lifeTo")},null,8,["label","mode","value-min","value-max","curve","default-curve","curve-label"])):xe("",!0)],64)):xe("",!0)]),w("div",ZG,[w("label",QG,[pe(w("input",{type:"checkbox","onUpdate:modelValue":h[39]||(h[39]=f=>_(e).config.rotationOverLifeEnabled=f)},null,512),[[vt,_(e).config.rotationOverLifeEnabled]]),h[46]||(h[46]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(u.$t("attributes.rotationOverLife")),1)]),_(e).config.rotationOverLifeEnabled?(Q(),kt(Hs,{key:0,label:u.$t("attributes.rotationSpeed"),mode:_(e).config.rotationOverLifeMode,"onUpdate:mode":h[40]||(h[40]=f=>_(e).config.rotationOverLifeMode=f),"value-min":_(e).config.rotationSpeedMin,"onUpdate:valueMin":h[41]||(h[41]=f=>_(e).config.rotationSpeedMin=f),"value-max":_(e).config.rotationSpeedMax,"onUpdate:valueMax":h[42]||(h[42]=f=>_(e).config.rotationSpeedMax=f),curve:_(e).config.rotationOverLifeCurve,"onUpdate:curve":h[43]||(h[43]=f=>_(e).config.rotationOverLifeCurve=f),"default-curve":_(l),min:-720,max:720,step:10,"curve-label":u.$t("attributes.lifeTo")},null,8,["label","mode","value-min","value-max","curve","default-curve","curve-label"])):xe("",!0)])],512),[[Bt,_(s)("attr")]])]))}}),qx=dn(eW,[["__scopeId","data-v-b713ad99"]]),tW={class:"gradient-editor"},nW=["title"],iW=["title","onClick","onDblclick","onPointerdown"],sW={key:0,class:"gradient-controls"},rW=["value","aria-label"],oW=["value","aria-label"],aW={class:"gradient-position"},lW=["value","aria-label"],cW=["title"],dW=["title","disabled"],uW={class:"gradient-hint"},hW=Zt({__name:"ColorGradientEditor",props:{modelValue:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=e,s=Re(null),r=Re(0),o=Fe(()=>t.modelValue[r.value]||null),a=Fe(()=>[...t.modelValue].sort((C,M)=>C.position-M.position)),c=Fe(()=>{const C=a.value;return C.length?`linear-gradient(90deg, ${C.map(M=>`${M.color} ${l(M.position)*100}%`).join(", ")})`:"#ffffff"});Vt(()=>t.modelValue.length,C=>{r.value>=C&&(r.value=Math.max(0,C-1))});function l(C){return Math.min(1,Math.max(0,Number(C)||0))}function d(){return t.modelValue.map(C=>({position:l(C.position),color:C.color}))}function u(C,M){const k=d();k[C]&&(k[C]={...k[C],...M},n("update:modelValue",k))}function h(C){u(r.value,{color:C.target.value})}function f(C){var P;const M=C.target,k=S(M.value,((P=o.value)==null?void 0:P.color)||"#ffffff");M.value=k,u(r.value,{color:k})}function p(C){const M=C.target;f(C),M.blur()}function m(C){const M=Number(C.target.value);Number.isFinite(M)&&u(r.value,{position:l(M/100)})}function g(C){const M=d();M.push({position:l(C),color:T(M,C)}),r.value=M.length-1,n("update:modelValue",M)}function v(C){if(!s.value)return;const M=s.value.getBoundingClientRect();g((C.clientX-M.left)/Math.max(1,M.width))}function y(){const C=a.value;let M=.5;if(C.length>1){let k=-1;for(let P=0;P<C.length-1;P++){const I=C[P+1].position-C[P].position;I>k&&(k=I,M=(C[P].position+C[P+1].position)/2)}}g(M)}function b(C){if(t.modelValue.length<=2||C<0)return;const M=d().filter((k,P)=>P!==C);r.value=Math.min(C,M.length-1),n("update:modelValue",M)}function x(C,M){if(!s.value)return;r.value=M;const k=I=>{const D=s.value.getBoundingClientRect();u(M,{position:l((I.clientX-D.left)/Math.max(1,D.width))})},P=()=>{window.removeEventListener("pointermove",k),window.removeEventListener("pointerup",P),window.removeEventListener("pointercancel",P)};window.addEventListener("pointermove",k),window.addEventListener("pointerup",P),window.addEventListener("pointercancel",P),C.preventDefault()}function T(C,M){const k=[...C].sort((P,I)=>P.position-I.position);if(!k.length)return"#ffffff";if(M<=k[0].position)return k[0].color;if(M>=k[k.length-1].position)return k[k.length-1].color;for(let P=0;P<k.length-1;P++){const I=k[P],D=k[P+1];if(M<I.position||M>D.position)continue;const $=(M-I.position)/Math.max(1e-4,D.position-I.position);return E(I.color,D.color,$)}return k[k.length-1].color}function E(C,M,k){const P=j=>{const B=parseInt(j.replace("#","").padEnd(6,"0").slice(0,6),16);return[B>>16&255,B>>8&255,B&255]},I=P(C),D=P(M),$=j=>Math.round(I[j]+(D[j]-I[j])*k);return`#${[$(0),$(1),$(2)].map(j=>j.toString(16).padStart(2,"0")).join("")}`}function S(C,M){let k=C.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(k)&&(k=k.split("").map(P=>P+P).join("")),/^[0-9a-f]{6}$/i.test(k)?`#${k.toLowerCase()}`:M}return(C,M)=>(Q(),te("div",tW,[w("div",{ref_key:"bar",ref:s,class:"gradient-bar",style:Yt({background:c.value}),title:C.$t("gradient.addTitle"),onDblclick:v},[(Q(!0),te(_e,null,Mt(i.modelValue,(k,P)=>(Q(),te("button",{key:P,type:"button",class:Me(["gradient-stop",{selected:P===r.value}]),style:Yt({left:`${l(k.position)*100}%`,"--stop-color":k.color}),title:`${Math.round(l(k.position)*100)}% · ${k.color}`,onClick:We(I=>r.value=P,["stop"]),onDblclick:We(I=>b(P),["stop"]),onPointerdown:We(I=>x(I,P),["stop"])},null,46,iW))),128))],44,nW),o.value?(Q(),te("div",sW,[w("input",{type:"color",class:"gradient-color",value:o.value.color,"aria-label":C.$t("gradient.color"),onInput:h},null,40,rW),w("input",{type:"text",class:"gradient-hex-input",value:o.value.color,"aria-label":C.$t("gradient.colorValue"),spellcheck:"false",onChange:f,onKeydown:es(p,["enter"])},null,40,oW),w("label",aW,[w("input",{type:"number",min:"0",max:"100",step:"1",value:Math.round(l(o.value.position)*100),"aria-label":C.$t("gradient.position"),onInput:m},null,40,lW),M[1]||(M[1]=w("span",null,"%",-1))]),w("button",{type:"button",class:"gradient-action",title:C.$t("gradient.addMiddle"),onClick:y},"+",8,cW),w("button",{type:"button",class:"gradient-action danger",title:C.$t("gradient.delete"),disabled:i.modelValue.length<=2,onClick:M[0]||(M[0]=k=>b(r.value))},"×",8,dW)])):xe("",!0),w("div",uW,F(C.$t("gradient.hint")),1)]))}}),iE=dn(hW,[["__scopeId","data-v-cb6cfaf8"]]),fW={class:"pivot-toolbar"},pW={class:"pivot-hint"},mW={class:"pivot-zoom"},gW=["disabled","title"],vW=["disabled","title"],bW=["title"],yW=["title"],xW=["src","alt"],wW={key:2,class:"pivot-empty"},SW={class:"pivot-bottom"},CW={class:"pivot-card"},AW={class:"pivot-presets"},TW=["title","aria-label","onClick"],EW={class:"pivot-card"},_W={class:"pivot-card-head"},MW={class:"pivot-coords"},PW=["value"],kW=["value"],IW={class:"pivot-card-head pivot-rotate-head"},RW={class:"pivot-rotate-state"},FW={class:"pivot-rotate-body"},LW={class:"pivot-rotate-modes"},DW={class:"pivot-rotate-preview"},OW=["src","alt"],Pp=1e3,NW=Zt({__name:"PivotEditor",props:{previewUrl:{},anchorX:{},anchorY:{},large:{type:Boolean,default:!1}},emits:["update:anchorX","update:anchorY","fullscreen"],setup(i,{emit:e}){const t=i,n=e,{t:s}=mi(),r=Fe(()=>[{icon:"↖",label:s("pivot.topLeft"),x:0,y:0},{icon:"↑",label:s("pivot.top"),x:50,y:0},{icon:"↗",label:s("pivot.topRight"),x:100,y:0},{icon:"←",label:s("pivot.left"),x:0,y:50},{icon:"◯",label:s("pivot.center"),x:50,y:50},{icon:"→",label:s("pivot.right"),x:100,y:50},{icon:"↙",label:s("pivot.bottomLeft"),x:0,y:100},{icon:"↓",label:s("pivot.bottom"),x:50,y:100},{icon:"↘",label:s("pivot.bottomRight"),x:100,y:100}]),o=Re(null),a=Re(null),c=Re({w:0,h:0}),l=Re({w:1,h:1}),d=Re(100),u=Re({x:0,y:0}),h=Re(!1),f=Re("static");let p=null;const m=U=>Math.min(Pp,Math.max(-Pp,Number.isFinite(U)?U:0)),g=Fe(()=>m(t.anchorX*100).toFixed(1)),v=Fe(()=>m(t.anchorY*100).toFixed(1));function y(U,O){const L=l.value.w/Math.max(1,l.value.h);let R=U,X=R/L;return X>O&&(X=O,R=X*L),{w:Math.max(1,R),h:Math.max(1,X)}}const b=Fe(()=>{const U=t.large?26:12,O=Math.max(1,c.value.w-U*2),L=Math.max(1,c.value.h-U*2);return y(O,L)}),x=Fe(()=>({width:`${b.value.w}px`,height:`${b.value.h}px`,transform:`translate(${u.value.x}px, ${u.value.y}px) scale(${d.value/100})`})),T=Fe(()=>{const U=d.value/100;return{x:c.value.w/2+u.value.x+(m(t.anchorX*100)/100-.5)*b.value.w*U,y:c.value.h/2+u.value.y+(m(t.anchorY*100)/100-.5)*b.value.h*U}}),E=Fe(()=>{const U=t.large?128:72,O=y(U,U);return{width:`${O.w}px`,height:`${O.h}px`,transformOrigin:`${m(t.anchorX*100)}% ${m(t.anchorY*100)}%`}});function S(U,O){const L=Pp/100;n("update:anchorX",Math.min(L,Math.max(-L,Number.isFinite(U)?U:0))),n("update:anchorY",Math.min(L,Math.max(-L,Number.isFinite(O)?O:0)))}function C(U){const O=a.value;if(!O)return;const L=O.getBoundingClientRect();L.width<=0||L.height<=0||S((U.clientX-L.left)/L.width,(U.clientY-L.top)/L.height)}function M(U){if(!t.previewUrl)return;if(U.button===2){k(U);return}if(U.button!==0)return;U.preventDefault(),C(U);const O=R=>C(R),L=()=>{window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",L),window.removeEventListener("pointercancel",L)};window.addEventListener("pointermove",O),window.addEventListener("pointerup",L),window.addEventListener("pointercancel",L)}function k(U){U.preventDefault(),h.value=!0;const O=U.clientX,L=U.clientY,R=u.value.x,X=u.value.y,z=Z=>{u.value={x:R+Z.clientX-O,y:X+Z.clientY-L}},K=()=>{h.value=!1,window.removeEventListener("pointermove",z),window.removeEventListener("pointerup",K),window.removeEventListener("pointercancel",K)};window.addEventListener("pointermove",z),window.addEventListener("pointerup",K),window.addEventListener("pointercancel",K)}function P(U){const O=U.deltaY<0?1.12:.8928571428571428,L=Math.min(400,Math.max(100,Math.round(d.value*O)));if(L===d.value)return;const R=o.value;if(!R){d.value=L;return}const X=R.getBoundingClientRect(),z=U.clientX-X.left,K=U.clientY-X.top,Z=L/d.value;u.value={x:u.value.x+(z-X.width/2-u.value.x)*(1-Z),y:u.value.y+(K-X.height/2-u.value.y)*(1-Z)},d.value=L}function I(U){const O=U.target;l.value={w:O.naturalWidth||1,h:O.naturalHeight||1}}function D(U){d.value=Math.min(400,Math.max(100,d.value+U))}function $(){S(.5,.5)}function j(U){S(U.x/100,U.y/100)}function B(U){return Math.abs(m(t.anchorX*100)-U.x)<.05&&Math.abs(m(t.anchorY*100)-U.y)<.05}function Y(U,O){const L=m(Number(O.target.value));n(U==="x"?"update:anchorX":"update:anchorY",L/100)}return Vt(()=>t.previewUrl,()=>{l.value={w:1,h:1},u.value={x:0,y:0},d.value=100}),Ti(()=>{o.value&&(p=new ResizeObserver(U=>{var L;const O=(L=U[0])==null?void 0:L.contentRect;O&&(c.value={w:O.width,h:O.height})}),p.observe(o.value))}),Ar(()=>{p==null||p.disconnect(),p=null}),(U,O)=>(Q(),te("div",{class:Me(["pivot-editor",{"pivot-large":i.large}])},[w("div",fW,[w("div",pW,[O[9]||(O[9]=w("span",{class:"pivot-hint-icon"},"⊕",-1)),w("span",null,F(U.$t("pivot.title")),1)]),w("div",mW,[w("button",{type:"button",disabled:d.value<=100,title:U.$t("pivot.zoomOut"),onClick:O[0]||(O[0]=L=>D(-25))},"−",8,gW),w("span",null,F(d.value)+"%",1),w("button",{type:"button",disabled:d.value>=400,title:U.$t("pivot.zoomIn"),onClick:O[1]||(O[1]=L=>D(25))},"+",8,vW)]),i.large?xe("",!0):(Q(),te("button",{key:0,type:"button",class:"pivot-expand",title:U.$t("pivot.expand"),onClick:O[2]||(O[2]=L=>U.$emit("fullscreen"))},"⤢",8,bW))]),w("div",{ref_key:"stageRef",ref:o,class:Me(["pivot-stage",{panning:h.value}]),title:U.$t("pivot.interaction"),onPointerdown:M,onWheel:We(P,["prevent"]),onContextmenu:O[3]||(O[3]=We(()=>{},["prevent"]))},[i.previewUrl?(Q(),te("div",{key:0,ref_key:"boxRef",ref:a,class:"pivot-box",style:Yt(x.value)},[w("img",{src:i.previewUrl,alt:U.$t("pivot.previewAlt"),draggable:"false",onLoad:I},null,40,xW)],4)):xe("",!0),i.previewUrl?(Q(),te(_e,{key:1},[w("div",{class:"pivot-cross vertical",style:Yt({left:`${T.value.x}px`})},null,4),w("div",{class:"pivot-cross horizontal",style:Yt({top:`${T.value.y}px`})},null,4),w("div",{class:"pivot-marker",style:Yt({left:`${T.value.x}px`,top:`${T.value.y}px`})},null,4),w("div",{class:"pivot-badge",style:Yt({left:`${T.value.x}px`,top:`${T.value.y}px`})},"X: "+F(g.value)+"% | Y: "+F(v.value)+"%",5)],64)):(Q(),te("div",wW,F(U.$t("pivot.noImage")),1))],42,yW),w("div",SW,[w("div",CW,[w("div",AW,[(Q(!0),te(_e,null,Mt(r.value,L=>(Q(),te("button",{key:L.label,type:"button",class:Me(["pivot-preset",{on:B(L)}]),title:`${L.label}(${L.x}%, ${L.y}%)`,"aria-label":L.label,onClick:R=>j(L)},F(L.icon),11,TW))),128))]),w("button",{type:"button",class:"pivot-reset",onClick:$},"↺ "+F(U.$t("pivot.resetCenter")),1)]),w("div",EW,[w("div",_W,[w("span",null,[O[10]||(O[10]=w("span",{class:"pivot-card-icon"},"◎",-1)),Ct(" "+F(U.$t("pivot.coordinates")),1)])]),w("div",MW,[w("label",null,[O[11]||(O[11]=Ct("X: ",-1)),w("input",{type:"number",min:"-1000",max:"1000",step:"0.1",value:g.value,onInput:O[4]||(O[4]=L=>Y("x",L))},null,40,PW),O[12]||(O[12]=w("span",null,"%",-1))]),w("label",null,[O[13]||(O[13]=Ct("Y: ",-1)),w("input",{type:"number",min:"-1000",max:"1000",step:"0.1",value:v.value,onInput:O[5]||(O[5]=L=>Y("y",L))},null,40,kW),O[14]||(O[14]=w("span",null,"%",-1))])]),i.large?(Q(),te(_e,{key:0},[w("div",IW,[w("span",null,[O[15]||(O[15]=w("span",{class:"pivot-card-icon"},"✥",-1)),Ct(" "+F(U.$t("pivot.rotationTest")),1)]),w("span",RW,F(f.value==="static"?U.$t("pivot.static"):f.value==="spin"?U.$t("pivot.spin"):U.$t("pivot.swing")),1)]),w("div",FW,[w("div",LW,[w("button",{type:"button",class:Me({on:f.value==="static"}),onClick:O[6]||(O[6]=L=>f.value="static")},F(U.$t("pivot.static")),3),w("button",{type:"button",class:Me({on:f.value==="spin"}),onClick:O[7]||(O[7]=L=>f.value="spin")},"↻ "+F(U.$t("pivot.spin")),3),w("button",{type:"button",class:Me({on:f.value==="swing"}),onClick:O[8]||(O[8]=L=>f.value="swing")},"⇄ "+F(U.$t("pivot.swing")),3)]),w("div",DW,[i.previewUrl?(Q(),te("img",{key:0,src:i.previewUrl,alt:U.$t("pivot.rotationAlt"),draggable:"false",class:Me(f.value),style:Yt(E.value)},null,14,OW)):xe("",!0)])])],64)):xe("",!0)])])],2))}}),Kx=dn(NW,[["__scopeId","data-v-a5622844"]]),$W={class:"image-card"},BW={class:"imgrow"},UW=["title"],VW=["src","alt"],XW={key:1,viewBox:"0 0 24 24",width:"22",height:"22",fill:"none",stroke:"#8a93bb","stroke-width":"1.6"},YW={class:"img-fields"},zW={key:0,class:"row"},jW={class:"row"},HW=["placeholder"],GW={class:"img-actions"},WW=["title"],qW=["title","disabled"],KW={class:"thumb-note"},JW={key:0,class:"row"},ZW={value:"fixed"},QW={value:"sequence"},eq={class:"row"},tq={value:"once-hide"},nq={value:"once-hold"},iq={value:"loop-forward"},sq={value:"loop-reverse"},rq={class:"row"},oq={class:"sequence-note"},aq={class:"resource-weight-row"},lq=["disabled","title"],cq={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},dq={key:1,viewBox:"0 0 24 24","aria-hidden":"true"},uq={key:2,class:"pivot-toggle-row"},hq={class:"pivot-toggle-text"},fq={class:"pivot-toggle-title"},pq=["title"],mq=["title"],gq=["aria-label"],vq={class:"pivot-modal-head"},bq={class:"pivot-modal-info"},yq={class:"pivot-modal-title"},xq={class:"pivot-modal-badge"},wq={class:"pivot-modal-desc"},Sq=["title"],Cq={class:"pivot-modal-hint"},Aq={class:"pivot-modal-actions"},Jx="SpineParticle.PivotPanels.v1",Tq=Zt({__name:"ImageResourceCard",props:{resource:{},resourceCount:{},defaultFile:{},namePlaceholder:{default:"particle"},showFolder:{type:Boolean,default:!0},supportsSequence:{type:Boolean,default:!1},pivotKey:{}},emits:["pick","pickSequence","reset","remove","updateWeight","toggleLock"],setup(i,{emit:e}){const t=i,n=e,{t:s}=mi(),r=Fe(()=>{var M,k;if(t.resource.imageMode==="sequence"){const P=t.resource.sequenceFrames||[];if(!P.length)return s("image.noSequence");const I=((M=P[0])==null?void 0:M.name)||s("image.firstFrame"),D=((k=P[P.length-1])==null?void 0:k.name)||I;return P.length===1?s("image.frameCountOne",{name:I}):s("image.frameCountMany",{count:P.length,first:I,last:D})}const C=t.resource.textureName||t.defaultFile.replace(/\.[^.]+$/,"");return C.includes(".")?C:`${C}.png`}),o=Fe(()=>{var C,M;return t.resource.imageMode==="sequence"?((M=(C=t.resource.sequenceFrames)==null?void 0:C[0])==null?void 0:M.previewUrl)||"":t.resource.previewUrl});function a(){try{const C=JSON.parse(sessionStorage.getItem(Jx)||"{}");return C&&typeof C=="object"?C:{}}catch{return{}}}const c=a(),l=Fe(()=>t.pivotKey||`particle-image:${t.resource.id}`),d=Fe(()=>typeof t.resource.anchorX=="number"&&typeof t.resource.anchorY=="number"),u=Fe(()=>Math.abs((t.resource.anchorX??.5)-.5)<1e-4&&Math.abs((t.resource.anchorY??.5)-.5)<1e-4),h=typeof c[l.value]=="boolean",f=Re(h?c[l.value]:!u.value);Vt(f,C=>{c[l.value]=C;try{sessionStorage.setItem(Jx,JSON.stringify(c))}catch{}}),Vt(l,C=>{f.value=typeof c[C]=="boolean"?c[C]:!u.value}),Vt(()=>u.value,C=>{C||(f.value=!0)},{immediate:!0});const p=Re(!1),m=Re(.5),g=Re(.5),v=Fe(()=>{const C=((t.resource.anchorX??.5)*100).toFixed(1),M=((t.resource.anchorY??.5)*100).toFixed(1);return f.value?s("image.pivotOn",{x:C,y:M}):u.value?s("image.pivotOff"):s("image.pivotCustom",{x:C,y:M})});function y(){m.value=t.resource.anchorX??.5,g.value=t.resource.anchorY??.5,p.value=!0}function b(){f.value||(t.resource.anchorX=.5,t.resource.anchorY=.5,p.value=!1)}function x(C){C&&(t.resource.anchorX=m.value,t.resource.anchorY=g.value),p.value=!1}function T(C){C.key==="Escape"&&p.value&&x(!1)}Ti(()=>window.addEventListener("keydown",T)),Ar(()=>window.removeEventListener("keydown",T));const E=Fe(()=>{var P,I;const C=t.resource.sequenceFrames||[];if(!C.length)return s("image.noSequence");const M=((P=C[0])==null?void 0:P.name)||s("image.firstImage"),k=((I=C[C.length-1])==null?void 0:I.name)||s("image.lastImage");return s("image.sequenceSelected",{count:C.length,first:M,last:k})});function S(){t.supportsSequence&&t.resource.imageMode==="sequence"?n("pickSequence",t.resource.id):n("pick",t.resource.id)}return(C,M)=>(Q(),te(_e,null,[w("div",$W,[w("div",BW,[w("button",{class:"img-thumb",title:i.supportsSequence&&i.resource.imageMode==="sequence"?C.$t("image.chooseSequence"):C.$t("image.chooseLocal"),onClick:S},[o.value?(Q(),te("img",{key:0,src:o.value,alt:i.resource.textureName},null,8,VW)):(Q(),te("svg",XW,[...M[19]||(M[19]=[w("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},null,-1),w("circle",{cx:"8.5",cy:"8.5",r:"1.6"},null,-1),w("path",{d:"M21 15l-5-5-9 9"},null,-1)])]))],8,UW),w("div",YW,[i.showFolder?(Q(),te("label",zW,[w("span",null,F(C.$t("image.subfolder")),1),pe(w("input",{"onUpdate:modelValue":M[0]||(M[0]=k=>i.resource.textureFolder=k),type:"text",class:"inp",placeholder:"subfolder/"},null,512),[[Je,i.resource.textureFolder]])])):xe("",!0),w("label",jW,[w("span",null,F(C.$t("image.name")),1),pe(w("input",{"onUpdate:modelValue":M[1]||(M[1]=k=>i.resource.textureName=k),type:"text",class:"inp",placeholder:i.namePlaceholder},null,8,HW),[[Je,i.resource.textureName]])])]),w("div",GW,[w("button",{class:"mini-btn2",title:C.$t("image.restore",{name:i.defaultFile}),onClick:M[2]||(M[2]=k=>C.$emit("reset",i.resource.id))},"⟳",8,WW),w("button",{class:"mini-btn2",title:C.$t("image.deleteResource"),disabled:i.resourceCount===1,onClick:M[3]||(M[3]=k=>C.$emit("remove",i.resource.id))},"🗑",8,qW)])]),w("div",KW,F(r.value),1),i.supportsSequence?(Q(),te("label",JW,[w("span",null,F(C.$t("image.imageMode")),1),pe(w("select",{"onUpdate:modelValue":M[4]||(M[4]=k=>i.resource.imageMode=k),class:"inp"},[w("option",ZW,F(C.$t("image.fixed")),1),w("option",QW,F(C.$t("image.sequence")),1)],512),[[_t,i.resource.imageMode]])])):xe("",!0),i.supportsSequence&&i.resource.imageMode==="sequence"?(Q(),te(_e,{key:1},[w("label",eq,[w("span",null,F(C.$t("image.playbackMode")),1),pe(w("select",{"onUpdate:modelValue":M[5]||(M[5]=k=>i.resource.sequencePlayback=k),class:"inp"},[w("option",tq,F(C.$t("image.onceHide")),1),w("option",nq,F(C.$t("image.onceHold")),1),w("option",iq,F(C.$t("image.loopForward")),1),w("option",sq,F(C.$t("image.loopReverse")),1)],512),[[_t,i.resource.sequencePlayback]])]),w("label",rq,[w("span",null,F(C.$t("image.playbackFps")),1),pe(w("input",{"onUpdate:modelValue":M[6]||(M[6]=k=>i.resource.sequenceFps=k),type:"number",min:"1",max:"120",step:"1",class:"inp"},null,512),[[Je,i.resource.sequenceFps,void 0,{number:!0}]])]),w("button",{class:"sequence-pick",onClick:M[7]||(M[7]=k=>C.$emit("pickSequence",i.resource.id))},F(C.$t("image.chooseSequenceMulti")),1),w("div",oq,F(E.value),1)],64)):xe("",!0),w("div",aq,[Ce(Ue,{class:"resource-weight-control",label:C.$t("image.weight"),min:0,max:100,step:1,"model-value":i.resource.weight,disabled:i.resource.locked||i.resourceCount===1,"onUpdate:modelValue":M[8]||(M[8]=k=>C.$emit("updateWeight",i.resource.id,k))},null,8,["label","model-value","disabled"]),w("button",{class:Me(["weight-lock",{on:i.resource.locked}]),disabled:i.resourceCount===1,title:i.resource.locked?C.$t("image.unlockWeight"):C.$t("image.lockWeight"),onClick:M[9]||(M[9]=k=>C.$emit("toggleLock",i.resource.id))},[i.resource.locked?(Q(),te("svg",cq,[...M[20]||(M[20]=[w("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"},null,-1),w("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"},null,-1)])])):(Q(),te("svg",dq,[...M[21]||(M[21]=[w("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"},null,-1),w("path",{d:"M16 10V7a4 4 0 0 0-7.5-2"},null,-1)])]))],10,lq)]),H_(C.$slots,"default",{},void 0),d.value?(Q(),te("div",uq,[M[23]||(M[23]=w("div",{class:"pivot-toggle-icon"},"◎",-1)),w("div",hq,[w("div",fq,F(C.$t("image.pivot")),1),w("div",{class:"pivot-toggle-sub",title:v.value},F(v.value),9,pq)]),w("label",{class:"pivot-switch",title:f.value?C.$t("image.collapsePivot"):C.$t("image.expandPivot")},[pe(w("input",{"onUpdate:modelValue":M[10]||(M[10]=k=>f.value=k),type:"checkbox",onChange:b},null,544),[[vt,f.value]]),M[22]||(M[22]=w("span",{class:"pivot-switch-ui"},null,-1))],8,mq)])):xe("",!0),d.value&&f.value?(Q(),kt(Kx,{key:3,"preview-url":o.value,"anchor-x":i.resource.anchorX??.5,"anchor-y":i.resource.anchorY??.5,"onUpdate:anchorX":M[11]||(M[11]=k=>i.resource.anchorX=k),"onUpdate:anchorY":M[12]||(M[12]=k=>i.resource.anchorY=k),onFullscreen:y},null,8,["preview-url","anchor-x","anchor-y"])):xe("",!0)]),(Q(),kt(Qu,{to:"body"},[p.value?(Q(),te("div",{key:0,class:"pivot-modal-backdrop",onPointerdown:M[18]||(M[18]=We(k=>x(!1),["self"]))},[w("div",{class:"pivot-modal",role:"dialog","aria-modal":"true","aria-label":C.$t("image.pivotModal")},[w("div",vq,[M[24]||(M[24]=w("div",{class:"pivot-modal-icon"},"◎",-1)),w("div",bq,[w("div",yq,[Ct(F(C.$t("image.pivotModal"))+" ",1),w("span",xq,F(i.resource.textureName||i.defaultFile),1)]),w("div",wq,F(C.$t("image.pivotModalDesc")),1)]),w("button",{type:"button",class:"pivot-modal-close",title:C.$t("common.close"),onClick:M[13]||(M[13]=k=>x(!1))},"✕",8,Sq)]),w("div",Cq,F(C.$t("image.pivotZoomHint")),1),Ce(Kx,{large:"","preview-url":o.value,"anchor-x":m.value,"anchor-y":g.value,"onUpdate:anchorX":M[14]||(M[14]=k=>m.value=k),"onUpdate:anchorY":M[15]||(M[15]=k=>g.value=k)},null,8,["preview-url","anchor-x","anchor-y"]),w("div",Aq,[w("button",{type:"button",class:"pivot-modal-cancel",onClick:M[16]||(M[16]=k=>x(!1))},F(C.$t("common.cancel")),1),w("button",{type:"button",class:"pivot-modal-confirm",onClick:M[17]||(M[17]=k=>x(!0))},F(C.$t("image.confirmPivot")),1)])],8,gq)],32)):xe("",!0)]))],64))}}),sE=dn(Tq,[["__scopeId","data-v-89f1e08d"]]),Eq={class:"group"},_q={class:"caret"},Mq=["title"],Pq={class:"group-body"},kq={class:"look-title"},Iq={class:"seg"},Rq={class:"row"},Fq={value:"跟随导出"},Lq={value:"线性"},Dq={value:"贝塞尔"},Oq={class:"curve-wrap"},Nq={class:"curve-labels"},$q={class:"look-title"},Bq={class:"seg"},Uq={class:"row"},Vq=["value"],Xq={value:0},Yq=["value"],zq={class:"render-layer-current"},jq=["title"],Hq={key:0,class:"slot-picker"},Gq=["placeholder","aria-label"],Wq={class:"slot-list"},qq=["onClick"],Kq={class:"slot-order"},Jq={class:"slot-name"},Zq={class:"slot-attachment"},Qq={key:0,class:"modifier-hint"},e7={class:"seg"},t7={class:"switch-row render-layer-switch"},n7=["disabled"],i7={key:0,class:"modifier-hint"},s7={key:2,class:"modifier-hint render-layer-warning"},r7={class:"modifier-hint"},o7={class:"look-title image-title"},a7=["title"],l7={class:"row resource-color-row"},c7=["onUpdate:modelValue"],d7={value:"fixed"},u7={value:"random"},h7={value:"lifetime"},f7=["onUpdate:modelValue"],p7={value:"normal"},m7={value:"add"},g7={value:"multiply"},v7={value:"screen"},b7={key:0,class:"row resource-color-picker"},y7=["onUpdate:modelValue"],x7=["value","aria-label","onChange","onKeydown"],w7={key:0,class:"random-color-hint"},S7={class:"resource-alpha-head"},C7={class:"alpha-modes"},A7=["onClick"],T7=["onClick"],E7=["onClick"],_7={class:"row"},M7=["onUpdate:modelValue"],P7={value:"跟随导出"},k7={value:"线性"},I7={value:"贝塞尔"},R7={class:"resource-alpha-curve"},F7=Zt({__name:"ParticleAppearanceSection",setup(i){const{resolvedCurveEditorMode:e,sys:t,textureFileInput:n,sequenceFileInput:s,addImageResource:r,openTexturePicker:o,openSequencePicker:a,onTextureFile:c,onSequenceFiles:l,resetTexture:d,setResourceFixedColor:u,commitResourceFixedColor:h,removeImageResource:f,setResourceWeight:p,toggleResourceLock:m,collapsed:g,toggle:v,sectionOpen:y,resetModule:b,select:x,renderLayerSlotPickerOpen:T,renderLayerSlotSearch:E,renderLayerReadySpines:S,renderLayerSpineReady:C,renderLayerFilteredSlots:M,renderLayerSlotLabel:k,renderLayerResolvedLabel:P,renderLayerWarning:I,setRenderLayerSlotMode:D,selectRenderLayerSpine:$,pickRenderLayerSlot:j,clearRenderLayerSlot:B,ALPHA_CURVE:Y,RESOURCE_ALPHA_CURVE:U}=Tr();return(O,L)=>(Q(),te("div",Eq,[w("div",{class:"group-head",onClick:L[1]||(L[1]=R=>_(v)("look"))},[w("span",_q,F(_(g).look?"▸":"▾"),1),w("span",null,F(O.$t("appearance.title")),1),w("button",{class:"group-reset",title:O.$t("appearance.reset"),onClick:L[0]||(L[0]=We(R=>_(b)("look"),["stop"]))},F(O.$t("common.reset")),9,Mq)]),pe(w("div",Pq,[w("div",kq,F(O.$t("appearance.opacity")),1),w("div",Iq,[w("button",{class:Me(["seg-btn",{active:_(t).config.alphaMode==="curve"}]),onClick:L[2]||(L[2]=R=>_(t).config.alphaMode="curve")},F(O.$t("common.curve")),3),w("button",{class:Me(["seg-btn",{active:_(t).config.alphaMode==="fixed"}]),onClick:L[3]||(L[3]=R=>_(t).config.alphaMode="fixed")},F(O.$t("common.fixed")),3)]),_(t).config.alphaMode==="fixed"?(Q(),kt(Ue,{key:0,label:O.$t("appearance.opacity"),min:0,max:1,step:.01,modelValue:_(t).config.alpha,"onUpdate:modelValue":L[4]||(L[4]=R=>_(t).config.alpha=R)},null,8,["label","modelValue"])):(Q(),te(_e,{key:1},[w("label",Rq,[w("span",null,F(O.$t("appearance.curveMode")),1),pe(w("select",{"onUpdate:modelValue":L[5]||(L[5]=R=>_(t).config.curveMode=R),class:"inp"},[w("option",Fq,F(O.$t("common.followExport")),1),w("option",Lq,F(O.$t("common.linear")),1),w("option",Dq,F(O.$t("common.bezier")),1)],512),[[_t,_(t).config.curveMode]])]),w("div",Oq,[Ce(Ts,{modelValue:_(t).config.alphaCurve,"onUpdate:modelValue":L[6]||(L[6]=R=>_(t).config.alphaCurve=R),"default-value":_(Y),mode:_(e)(_(t).config.curveMode)},null,8,["modelValue","default-value","mode"]),w("div",Nq,[w("span",null,F(O.$t("appearance.transparent")),1),w("span",null,F(O.$t("attributes.lifeTo")),1),w("span",null,F(O.$t("appearance.opaque")),1)])])],64)),w("div",$q,F(O.$t("appearance.renderLayer")),1),w("div",Bq,[w("button",{class:Me(["seg-btn",{active:_(t).config.renderLayerMode==="top"}]),onClick:L[7]||(L[7]=R=>_(t).config.renderLayerMode="top")},F(O.$t("appearance.top")),3),w("button",{class:Me(["seg-btn",{active:_(t).config.renderLayerMode==="slot"}]),onClick:L[8]||(L[8]=(...R)=>_(D)&&_(D)(...R))},F(O.$t("appearance.spineSlot")),3)]),_(t).config.renderLayerMode==="slot"?(Q(),te(_e,{key:2},[w("label",Uq,[L[19]||(L[19]=w("span",null,"Spine",-1)),w("select",{class:"inp",value:_(t).config.renderLayerSpineId,onChange:L[9]||(L[9]=(...R)=>_($)&&_($)(...R))},[w("option",Xq,F(_(S).length?O.$t("appearance.selectSpine"):O.$t("appearance.noSpine")),1),(Q(!0),te(_e,null,Mt(_(S),R=>(Q(),te("option",{key:R.id,value:R.id},F(R.name),9,Yq))),128))],40,Vq)]),_(C)?(Q(),te(_e,{key:0},[w("div",zq,[w("span",{class:"render-layer-text",title:_(k)},F(_(k)||O.$t("appearance.noSlot")),9,jq),w("button",{class:"mini-btn",onClick:L[10]||(L[10]=R=>T.value=!_(T))},F(_(k)?O.$t("appearance.reselect"):O.$t("appearance.selectSlot")),1),_(t).config.renderLayerSlotName?(Q(),te("button",{key:0,class:"mini-btn ghost",onClick:L[11]||(L[11]=(...R)=>_(B)&&_(B)(...R))},F(O.$t("common.clear")),1)):xe("",!0)]),_(T)?(Q(),te("div",Hq,[pe(w("input",{"onUpdate:modelValue":L[12]||(L[12]=R=>Jt(E)?E.value=R:null),class:"inp",type:"search",placeholder:O.$t("appearance.searchSlots"),"aria-label":O.$t("appearance.searchSlotsAria")},null,8,Gq),[[Je,_(E),void 0,{trim:!0}]]),w("div",Wq,[(Q(!0),te(_e,null,Mt(_(M),R=>(Q(),te("button",{key:R.name,class:Me(["slot-item",{on:_(t).config.renderLayerSlotName===R.name}]),onClick:X=>_(j)(R)},[w("span",Kq,F(R.order+1),1),w("span",Jq,F(R.name),1),w("span",Zq,F(R.attachment||O.$t("appearance.emptySlot")),1)],10,qq))),128)),_(M).length?xe("",!0):(Q(),te("div",Qq,F(O.$t("appearance.noMatchingSlots")),1))])])):xe("",!0),_(t).config.renderLayerSlotName?(Q(),te(_e,{key:1},[w("div",e7,[w("button",{class:Me(["seg-btn",{active:_(t).config.renderLayerSlotPosition==="above"}]),onClick:L[13]||(L[13]=R=>_(t).config.renderLayerSlotPosition="above")},F(O.$t("appearance.above")),3),w("button",{class:Me(["seg-btn",{active:_(t).config.renderLayerSlotPosition==="below"}]),onClick:L[14]||(L[14]=R=>_(t).config.renderLayerSlotPosition="below")},F(O.$t("appearance.below")),3)]),w("label",t7,[pe(w("input",{"onUpdate:modelValue":L[15]||(L[15]=R=>_(t).config.renderLayerFollowAttachment=R),type:"checkbox",disabled:_(t).config.renderLayerSlotPosition==="below"},null,8,n7),[[vt,_(t).config.renderLayerFollowAttachment]]),L[20]||(L[20]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(O.$t("appearance.followAttachment")),1)]),_(P)?(Q(),te("div",i7,F(_(P)),1)):xe("",!0)],64)):xe("",!0),_(I)?(Q(),te("div",s7,F(_(I)),1)):xe("",!0),w("div",r7,F(O.$t("appearance.previewOnly")),1)],64)):xe("",!0)],64)):xe("",!0),w("div",o7,[w("span",null,F(O.$t("appearance.imageResources")),1),w("button",{class:"image-add",title:O.$t("appearance.addImage"),onClick:L[16]||(L[16]=(...R)=>_(r)&&_(r)(...R))},"+",8,a7)]),(Q(!0),te(_e,null,Mt(_(t).config.imageResources,R=>(Q(),kt(sE,{key:`${_(t).id}:${R.id}`,resource:R,"resource-count":_(t).config.imageResources.length,"pivot-key":`${_(t).id}:${R.id}`,"supports-sequence":"","default-file":"star.png",onPick:_(o),onPickSequence:_(a),onReset:_(d),onRemove:_(f),onUpdateWeight:_(p),onToggleLock:_(m)},{default:Ju(()=>[Ce(Ue,{label:O.$t("appearance.scale"),min:.1,max:3,step:.05,modelValue:R.scale,"onUpdate:modelValue":X=>R.scale=X},null,8,["label","modelValue","onUpdate:modelValue"]),L[21]||(L[21]=w("div",{class:"resource-divider"},null,-1)),w("label",l7,[w("span",null,F(O.$t("appearance.color")),1),pe(w("select",{"onUpdate:modelValue":X=>R.colorMode=X,class:"inp"},[w("option",d7,F(O.$t("appearance.fixedColor")),1),w("option",u7,F(O.$t("appearance.randomColor")),1),w("option",h7,F(O.$t("appearance.lifetime")),1)],8,c7),[[_t,R.colorMode]]),pe(w("select",{"onUpdate:modelValue":X=>R.blend=X,class:"inp blend-select"},[w("option",p7,F(O.$t("appearance.normal")),1),w("option",m7,F(O.$t("appearance.add")),1),w("option",g7,F(O.$t("appearance.multiply")),1),w("option",v7,F(O.$t("appearance.screen")),1)],8,f7),[[_t,R.blend]])]),R.colorMode==="fixed"?(Q(),te("label",b7,[w("span",null,F(O.$t("appearance.fixedColor")),1),pe(w("input",{type:"color","onUpdate:modelValue":X=>R.colorStart=X,class:"colr"},null,8,y7),[[Je,R.colorStart]]),w("input",{type:"text",class:"hex-input",value:R.colorStart,spellcheck:"false","aria-label":O.$t("appearance.fixedColorValue"),onChange:X=>_(u)(R,X),onKeydown:es(X=>_(h)(R,X),["enter"])},null,40,x7)])):(Q(),te(_e,{key:1},[Ce(iE,{modelValue:R.colorGradient,"onUpdate:modelValue":X=>R.colorGradient=X},null,8,["modelValue","onUpdate:modelValue"]),R.colorMode==="random"?(Q(),te("div",w7,F(O.$t("appearance.randomColorHint")),1)):xe("",!0)],64)),w("div",S7,[w("span",null,F(O.$t("appearance.independentAlpha")),1),w("div",C7,[w("button",{class:Me({on:R.independentAlpha==="off"}),onClick:X=>R.independentAlpha="off"},F(O.$t("appearance.off")),11,A7),w("button",{class:Me({on:R.independentAlpha==="fixed"}),onClick:X=>R.independentAlpha="fixed"},F(O.$t("common.fixed")),11,T7),w("button",{class:Me({on:R.independentAlpha==="curve"}),onClick:X=>R.independentAlpha="curve"},F(O.$t("common.curve")),11,E7)])]),R.independentAlpha==="fixed"?(Q(),kt(Ue,{key:2,label:O.$t("appearance.opacity"),min:0,max:1,step:.01,modelValue:R.alpha,"onUpdate:modelValue":X=>R.alpha=X},null,8,["label","modelValue","onUpdate:modelValue"])):R.independentAlpha==="curve"?(Q(),te(_e,{key:3},[w("label",_7,[w("span",null,F(O.$t("appearance.curveMode")),1),pe(w("select",{"onUpdate:modelValue":X=>R.alphaCurveMode=X,class:"inp"},[w("option",P7,F(O.$t("common.followExport")),1),w("option",k7,F(O.$t("common.linear")),1),w("option",I7,F(O.$t("common.bezier")),1)],8,M7),[[_t,R.alphaCurveMode]])]),w("div",R7,[Ce(Ts,{modelValue:R.alphaCurve,"onUpdate:modelValue":X=>R.alphaCurve=X,"default-value":_(U),mode:_(e)(R.alphaCurveMode)},null,8,["modelValue","onUpdate:modelValue","default-value","mode"])])],64)):xe("",!0)]),_:2},1032,["resource","resource-count","pivot-key","onPick","onPickSequence","onReset","onRemove","onUpdateWeight","onToggleLock"]))),128)),w("input",{ref_key:"textureFileInput",ref:n,class:"file-input",type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",onChange:L[17]||(L[17]=(...R)=>_(c)&&_(c)(...R))},null,544),w("input",{ref_key:"sequenceFileInput",ref:s,class:"file-input",type:"file",multiple:"",accept:"image/png,image/jpeg,image/webp,image/gif",onChange:L[18]||(L[18]=(...R)=>_(l)&&_(l)(...R))},null,544)],512),[[Bt,_(y)("look")]])]))}}),Zx=dn(F7,[["__scopeId","data-v-bfe00f1f"]]),L7={class:"group"},D7={class:"caret"},O7=["title"],N7={class:"group-body"},$7={class:"modifier-item damping-item"},B7={class:"modifier-item"},U7={class:"switch-row modifier-switch"},V7={key:0,class:"modifier-params"},X7={class:"modifier-hint"},Y7={class:"modifier-item"},z7={class:"switch-row modifier-switch"},j7={key:0,class:"modifier-params gravity-params"},H7={class:"modifier-mode-row"},G7={class:"gravity-curve-title"},W7={class:"gravity-curve-axis"},q7={class:"modifier-hint"},K7={class:"modifier-item"},J7={class:"switch-row modifier-switch"},Z7={key:0,class:"modifier-params gravity-params"},Q7={class:"modifier-mode-row"},e9={class:"gravity-curve-title"},t9={class:"gravity-curve-axis"},n9={class:"modifier-hint"},i9={class:"modifier-item"},s9={class:"switch-row modifier-switch"},r9={key:0,class:"modifier-params"},o9={class:"row"},a9={value:"constant"},l9={value:"linear"},c9={value:"inverse"},d9={class:"modifier-hint"},u9={class:"switch-row"},h9={class:"modifier-item"},f9={class:"switch-row modifier-switch"},p9={key:0,class:"modifier-params"},m9={class:"row"},g9={value:"constant"},v9={value:"linear"},b9={value:"inverse"},y9={class:"modifier-hint"},x9={class:"switch-row"},w9={class:"modifier-item"},S9={class:"switch-row modifier-switch"},C9={key:0,class:"modifier-params"},A9={class:"row"},T9={value:"global"},E9={value:"particle"},_9={class:"row"},M9={value:"linear"},P9={value:"curve"},k9={class:"modifier-hint"},I9={class:"switch-row"},R9={class:"modifier-item"},F9={class:"switch-row modifier-switch"},L9={key:0,class:"modifier-params trail-params"},D9={class:"trail-section-head"},O9={class:"trail-section-title"},N9=["title"],$9={class:"row"},B9=["onUpdate:modelValue"],U9={value:"fixed"},V9={value:"random"},X9={class:"row"},Y9=["onUpdate:modelValue"],z9={value:"fixed"},j9={value:"random"},H9={class:"row"},G9=["onUpdate:modelValue"],W9={value:"particle"},q9={value:"fixed"},K9={class:"switch-row trail-sub-switch"},J9=["onUpdate:modelValue"],Z9={class:"switch-row trail-sub-switch"},Q9=["onUpdate:modelValue"],eK={class:"trail-mode-head"},tK={class:"alpha-modes"},nK=["onClick"],iK=["onClick"],sK=["onClick"],rK={class:"row"},oK=["onUpdate:modelValue"],aK={value:"normal"},lK={value:"add"},cK={value:"multiply"},dK={value:"screen"},uK={key:6,class:"row trail-fixed-color"},hK=["onUpdate:modelValue"],fK=["value","onChange","onKeydown"],pK={class:"trail-mode-head"},mK={class:"alpha-modes"},gK=["onClick"],vK=["onClick"],bK=["onClick"],yK={class:"trail-grid-row"},xK={class:"modifier-hint"},wK={class:"modifier-item"},SK={class:"switch-row modifier-switch"},CK=["disabled"],AK={key:0,class:"modifier-params emitter-follow-params"},TK={class:"field-block"},EK=["value"],_K={value:"none"},MK={value:"path"},PK={key:0,value:"bone"},kK={class:"field-block"},IK={value:0},RK=["value"],FK={class:"field-block"},LK={value:"fixed"},DK={value:"direction"},OK={class:"gravity-curve-title"},NK={class:"field-grid follow-grid"},$K={class:"compact-field"},BK={class:"compact-field"},UK={value:"local"},VK={value:"world"},XK={class:"field-block"},YK={value:"forward"},zK={value:"reverse"},jK={class:"modifier-hint"},HK={key:0,class:"bone-follow-target"},GK={key:1,class:"bone-follow-missing"},WK={class:"field-block"},qK={value:"local"},KK={value:"world"},JK={class:"field-grid follow-grid"},ZK={class:"compact-field"},QK={class:"compact-field"},eJ={class:"bone-follow-transform-grid"},tJ={class:"compact-field"},nJ={class:"compact-field"},iJ={class:"compact-field"},sJ={class:"modifier-hint"},rJ={class:"modifier-item"},oJ={class:"switch-row modifier-switch"},aJ={key:0,class:"modifier-params collision-filter-params"},lJ={class:"collision-filter-title"},cJ={class:"collision-filter-tags"},dJ=["title"],uJ=["aria-label","onClick"],hJ=["disabled","title"],fJ={key:0,class:"collision-filter-empty"},pJ={key:1,class:"collision-filter-picker"},mJ=["onClick"],gJ={class:"modifier-hint"},vJ={class:"modifier-item events-item"},bJ={class:"switch-row modifier-switch"},yJ={key:0,class:"event-rules"},xJ={class:"event-selects"},wJ=["onUpdate:modelValue","title"],SJ={value:"birth"},CJ={value:"death"},AJ={value:"collision"},TJ=["onUpdate:modelValue","title"],EJ={value:0},_J=["value"],MJ=["title","onClick"],PJ={class:"event-probability"},kJ=["onUpdate:modelValue"],IJ={key:0,class:"event-probability event-collision-limit"},RJ=["value","onInput"],FJ={class:"event-probability event-inherit"},LJ=["onClick"],DJ={class:"inherit-summary"},OJ={key:1,class:"event-probability event-color-mode"},NJ=["onUpdate:modelValue"],$J={value:"add"},BJ={value:"replace"},UJ={class:"inherit-check"},VJ={class:"inherit-check"},XJ=["onClick"],YJ={class:"inherit-check"},zJ=Zt({__name:"ParticleModifiersSection",setup(i){const{store:e,sys:t,trailTextureFileInput:n,addTrailResource:s,openTrailTexturePicker:r,onTrailRigChange:o,onTrailResourceBoneCountChange:a,onTrailResourceRotationChange:c,onTrailTextureFile:l,resetTrailTexture:d,removeTrailResource:u,setTrailResourceWeight:h,toggleTrailResourceLock:f,setTrailColor:p,commitTrailColor:m,selectedSpineBone:g,boundSpineBone:v,collisionPickerOpen:y,selectedCollisionBodies:b,availableCollisionBodies:x,addCollisionBody:T,removeCollisionBody:E,collapsed:S,toggle:C,sectionOpen:M,onEmitterFollowModeChange:k,bindSelectedBone:P,resetModule:I,select:D,LINEAR_CURVE:$,FLAT_CURVE:j,TRAIL_ALPHA_CURVE:B,TRAIL_SHAPE_CURVE:Y}=Tr(),{t:U}=mi(),O=Fe(()=>{var N;const H=(N=t.value)==null?void 0:N.id;if(!H)return[];const G=nC(e.systems,H);return e.systems.filter(V=>V.id!==H&&!G.has(V.id))}),L=Fe(()=>[{key:"color",label:U("modifiers.inheritColor")},{key:"scale",label:U("modifiers.inheritScale")},{key:"rotation",label:U("modifiers.inheritRotation")},{key:"life",label:U("modifiers.inheritLife")}]),R=Re(null),X=Fe(()=>{var N;const H=R.value,G=(N=t.value)==null?void 0:N.config.events;return!H||!Array.isArray(G)?null:G.find(V=>V.id===H.ruleId)||null});function z(H){return Array.isArray(H.inherit)||(H.inherit=[]),H.inherit}function K(H){const G=z(H);return G.length?G.length===L.value.length?U("modifiers.inheritAll"):L.value.filter(N=>G.includes(N.key)).map(N=>N.label).join("、"):U("modifiers.inheritNone")}function Z(H,G){return z(H).includes(G)}function ae(H,G){const N=z(H),V=N.indexOf(G);V>=0?N.splice(V,1):N.push(G)}function ce(H){z(H).splice(0)}function ve(H){z(H).splice(0,z(H).length,...L.value.map(G=>G.key))}function we(H,G){var he;if(((he=R.value)==null?void 0:he.ruleId)===H.id){R.value=null;return}const N=G.currentTarget;if(!N)return;const V=N.getBoundingClientRect(),W=Math.max(168,V.width),ee=212,be=Math.min(Math.max(8,V.left),Math.max(8,window.innerWidth-W-8));let ye=V.bottom+4;ye+ee>window.innerHeight-8&&(ye=Math.max(8,V.top-ee-4)),R.value={ruleId:H.id,left:be,top:ye,width:W}}function re(){R.value=null}function Ee(){re()}function q(H){H.key==="Escape"&&re()}Ti(()=>{document.addEventListener("pointerdown",re),window.addEventListener("scroll",Ee,!0),window.addEventListener("resize",Ee),window.addEventListener("keydown",q)}),Ar(()=>{document.removeEventListener("pointerdown",re),window.removeEventListener("scroll",Ee,!0),window.removeEventListener("resize",Ee),window.removeEventListener("keydown",q)});function J(){var N;const H=(N=t.value)==null?void 0:N.config;if(!H)return;Array.isArray(H.events)||(H.events=[]);const G=Math.max(0,...H.events.map(V=>V.id))+1;H.events.push({id:G,event:"birth",targetSystemId:0,probability:1,collisionLimit:1,inherit:[],colorInheritMode:"add"})}function ie(H){var G;(G=t.value)==null||G.config.events.splice(H,1)}function se(H,G){const N=G.target,V=Math.round(Number(N.value));H.collisionLimit=Math.min(4,Math.max(1,Number.isFinite(V)?V:1)),N.value=String(H.collisionLimit)}return(H,G)=>(Q(),te(_e,null,[w("div",L7,[w("div",{class:"group-head",onClick:G[1]||(G[1]=N=>_(C)("mods"))},[w("span",D7,F(_(S).mods?"▸":"▾"),1),w("span",null,F(H.$t("modifiers.title")),1),w("button",{class:"group-reset",title:H.$t("modifiers.reset"),onClick:G[0]||(G[0]=We(N=>_(I)("mods"),["stop"]))},F(H.$t("common.reset")),9,O7)]),pe(w("div",N7,[w("div",$7,[Ce(Ue,{label:H.$t("modifiers.damping"),min:0,max:2,step:.05,modelValue:_(t).config.damping,"onUpdate:modelValue":G[2]||(G[2]=N=>_(t).config.damping=N)},null,8,["label","modelValue"])]),w("div",B7,[w("label",U7,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[3]||(G[3]=N=>_(t).config.noise=N)},null,512),[[vt,_(t).config.noise]]),G[74]||(G[74]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableNoise")),1)]),_(t).config.noise?(Q(),te("div",V7,[Ce(Ue,{label:H.$t("modifiers.strength"),min:0,max:100,step:1,modelValue:_(t).config.noiseAmt,"onUpdate:modelValue":G[4]||(G[4]=N=>_(t).config.noiseAmt=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.noiseRange"),min:0,max:500,step:1,modelValue:_(t).config.noiseRange,"onUpdate:modelValue":G[5]||(G[5]=N=>_(t).config.noiseRange=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.noiseSpeed"),min:0,max:10,step:.1,modelValue:_(t).config.noiseSpeed,"onUpdate:modelValue":G[6]||(G[6]=N=>_(t).config.noiseSpeed=N)},null,8,["label","modelValue"]),w("div",X7,F(H.$t("modifiers.noiseHint")),1)])):xe("",!0)]),w("div",Y7,[w("label",z7,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[7]||(G[7]=N=>_(t).config.useGravity=N)},null,512),[[vt,_(t).config.useGravity]]),G[75]||(G[75]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableGravity")),1)]),_(t).config.useGravity?(Q(),te("div",j7,[w("div",H7,[w("button",{class:Me(["axis-mode",{on:_(t).config.gravityMode==="fixed"}]),onClick:G[8]||(G[8]=N=>_(t).config.gravityMode="fixed")},F(H.$t("common.fixed")),3),w("button",{class:Me(["axis-mode",{on:_(t).config.gravityMode==="random"}]),onClick:G[9]||(G[9]=N=>_(t).config.gravityMode="random")},F(H.$t("common.random")),3)]),_(t).config.gravityMode==="fixed"?(Q(),kt(Ue,{key:0,label:H.$t("modifiers.gravityStrength"),min:-3e3,max:3e3,step:10,modelValue:_(t).config.gravityMin,"onUpdate:modelValue":G[10]||(G[10]=N=>_(t).config.gravityMin=N)},null,8,["label","modelValue"])):(Q(),te(_e,{key:1},[Ce(Ue,{label:H.$t("modifiers.strengthMin"),min:-3e3,max:3e3,step:10,modelValue:_(t).config.gravityMin,"onUpdate:modelValue":G[11]||(G[11]=N=>_(t).config.gravityMin=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.strengthMax"),min:-3e3,max:3e3,step:10,modelValue:_(t).config.gravityMax,"onUpdate:modelValue":G[12]||(G[12]=N=>_(t).config.gravityMax=N)},null,8,["label","modelValue"])],64)),Ce(Ue,{label:H.$t("modifiers.direction"),min:-360,max:360,step:1,modelValue:_(t).config.gravityDirection,"onUpdate:modelValue":G[13]||(G[13]=N=>_(t).config.gravityDirection=N)},null,8,["label","modelValue"]),w("div",G7,[w("span",null,F(H.$t("modifiers.gravityOverLife")),1),w("span",null,F(H.$t("modifiers.axisStrength")),1)]),Ce(Ts,{modelValue:_(t).config.gravityCurve,"onUpdate:modelValue":G[14]||(G[14]=N=>_(t).config.gravityCurve=N),"default-value":_(j)},null,8,["modelValue","default-value"]),w("div",W7,[G[76]||(G[76]=w("span",null,"0",-1)),w("span",null,F(H.$t("attributes.lifeTo")),1),G[77]||(G[77]=w("span",null,"1",-1))]),w("div",q7,F(H.$t("modifiers.directionHint")),1)])):xe("",!0)]),w("div",K7,[w("label",J7,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[15]||(G[15]=N=>_(t).config.wind=N)},null,512),[[vt,_(t).config.wind]]),G[78]||(G[78]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableWind")),1)]),_(t).config.wind?(Q(),te("div",Z7,[w("div",Q7,[w("button",{class:Me(["axis-mode",{on:_(t).config.windMode==="fixed"}]),onClick:G[16]||(G[16]=N=>_(t).config.windMode="fixed")},F(H.$t("common.fixed")),3),w("button",{class:Me(["axis-mode",{on:_(t).config.windMode==="random"}]),onClick:G[17]||(G[17]=N=>_(t).config.windMode="random")},F(H.$t("common.random")),3)]),_(t).config.windMode==="fixed"?(Q(),kt(Ue,{key:0,label:H.$t("modifiers.windStrength"),min:-3e3,max:3e3,step:10,modelValue:_(t).config.windMin,"onUpdate:modelValue":G[18]||(G[18]=N=>_(t).config.windMin=N)},null,8,["label","modelValue"])):(Q(),te(_e,{key:1},[Ce(Ue,{label:H.$t("modifiers.strengthMin"),min:-3e3,max:3e3,step:10,modelValue:_(t).config.windMin,"onUpdate:modelValue":G[19]||(G[19]=N=>_(t).config.windMin=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.strengthMax"),min:-3e3,max:3e3,step:10,modelValue:_(t).config.windMax,"onUpdate:modelValue":G[20]||(G[20]=N=>_(t).config.windMax=N)},null,8,["label","modelValue"])],64)),Ce(Ue,{label:H.$t("modifiers.direction"),min:-360,max:360,step:1,modelValue:_(t).config.windDirection,"onUpdate:modelValue":G[21]||(G[21]=N=>_(t).config.windDirection=N)},null,8,["label","modelValue"]),w("div",e9,[w("span",null,F(H.$t("modifiers.windOverLife")),1),w("span",null,F(H.$t("modifiers.axisStrength")),1)]),Ce(Ts,{modelValue:_(t).config.windCurve,"onUpdate:modelValue":G[22]||(G[22]=N=>_(t).config.windCurve=N),"default-value":_(j)},null,8,["modelValue","default-value"]),w("div",t9,[G[79]||(G[79]=w("span",null,"0",-1)),w("span",null,F(H.$t("attributes.lifeTo")),1),G[80]||(G[80]=w("span",null,"1",-1))]),w("div",n9,F(H.$t("modifiers.directionHint")),1)])):xe("",!0)]),w("div",i9,[w("label",s9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[23]||(G[23]=N=>_(t).config.forceField=N)},null,512),[[vt,_(t).config.forceField]]),G[81]||(G[81]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableForceField")),1)]),_(t).config.forceField?(Q(),te("div",r9,[Ce(Ue,{label:H.$t("modifiers.centerX"),min:-5e3,max:5e3,step:1,modelValue:_(t).config.forceCenterX,"onUpdate:modelValue":G[24]||(G[24]=N=>_(t).config.forceCenterX=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.centerY"),min:-5e3,max:5e3,step:1,modelValue:_(t).config.forceCenterY,"onUpdate:modelValue":G[25]||(G[25]=N=>_(t).config.forceCenterY=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.forceStrength"),min:-300,max:300,step:1,modelValue:_(t).config.forceStrength,"onUpdate:modelValue":G[26]||(G[26]=N=>_(t).config.forceStrength=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.forceRadius"),min:1,max:2e3,step:1,modelValue:_(t).config.forceRadius,"onUpdate:modelValue":G[27]||(G[27]=N=>_(t).config.forceRadius=N)},null,8,["label","modelValue"]),w("label",o9,[w("span",null,F(H.$t("modifiers.falloffMode")),1),pe(w("select",{"onUpdate:modelValue":G[28]||(G[28]=N=>_(t).config.forceFalloff=N),class:"inp"},[w("option",a9,F(H.$t("modifiers.constant")),1),w("option",l9,F(H.$t("modifiers.linearFalloff")),1),w("option",c9,F(H.$t("modifiers.inverseFalloff")),1)],512),[[_t,_(t).config.forceFalloff]])]),w("div",d9,F(H.$t("modifiers.forceHint")),1),w("label",u9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[29]||(G[29]=N=>_(t).config.showForceFieldShape=N)},null,512),[[vt,_(t).config.showForceFieldShape]]),G[82]||(G[82]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.showShape")),1)])])):xe("",!0)]),w("div",h9,[w("label",f9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[30]||(G[30]=N=>_(t).config.vortex=N)},null,512),[[vt,_(t).config.vortex]]),G[83]||(G[83]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableVortex")),1)]),_(t).config.vortex?(Q(),te("div",p9,[Ce(Ue,{label:H.$t("modifiers.centerX"),min:-5e3,max:5e3,step:1,modelValue:_(t).config.vortexCenterX,"onUpdate:modelValue":G[31]||(G[31]=N=>_(t).config.vortexCenterX=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.centerY"),min:-5e3,max:5e3,step:1,modelValue:_(t).config.vortexCenterY,"onUpdate:modelValue":G[32]||(G[32]=N=>_(t).config.vortexCenterY=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.forceStrength"),min:-300,max:300,step:1,modelValue:_(t).config.vortexStrength,"onUpdate:modelValue":G[33]||(G[33]=N=>_(t).config.vortexStrength=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.forceRadius"),min:1,max:2e3,step:1,modelValue:_(t).config.vortexRadius,"onUpdate:modelValue":G[34]||(G[34]=N=>_(t).config.vortexRadius=N)},null,8,["label","modelValue"]),w("label",m9,[w("span",null,F(H.$t("modifiers.falloffMode")),1),pe(w("select",{"onUpdate:modelValue":G[35]||(G[35]=N=>_(t).config.vortexFalloff=N),class:"inp"},[w("option",g9,F(H.$t("modifiers.constant")),1),w("option",v9,F(H.$t("modifiers.linearFalloff")),1),w("option",b9,F(H.$t("modifiers.inverseFalloff")),1)],512),[[_t,_(t).config.vortexFalloff]])]),w("div",y9,F(H.$t("modifiers.vortexHint")),1),w("label",x9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[36]||(G[36]=N=>_(t).config.showVortexShape=N)},null,512),[[vt,_(t).config.showVortexShape]]),G[84]||(G[84]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.showShape")),1)])])):xe("",!0)]),w("div",w9,[w("label",S9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[37]||(G[37]=N=>_(t).config.attraction=N)},null,512),[[vt,_(t).config.attraction]]),G[85]||(G[85]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableAttraction")),1)]),_(t).config.attraction?(Q(),te("div",C9,[Ce(Ue,{label:H.$t("modifiers.attractionX"),min:-5e3,max:5e3,step:1,modelValue:_(t).config.attractionCenterX,"onUpdate:modelValue":G[38]||(G[38]=N=>_(t).config.attractionCenterX=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.attractionY"),min:-5e3,max:5e3,step:1,modelValue:_(t).config.attractionCenterY,"onUpdate:modelValue":G[39]||(G[39]=N=>_(t).config.attractionCenterY=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.attractionRadius"),min:0,max:2e3,step:1,modelValue:_(t).config.attractionRadius,"onUpdate:modelValue":G[40]||(G[40]=N=>_(t).config.attractionRadius=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.attractionDuration"),min:.05,max:30,step:.05,modelValue:_(t).config.attractionDuration,"onUpdate:modelValue":G[41]||(G[41]=N=>_(t).config.attractionDuration=N)},null,8,["label","modelValue"]),Ce(Ue,{label:H.$t("modifiers.delay"),min:0,max:30,step:.05,modelValue:_(t).config.attractionDelay,"onUpdate:modelValue":G[42]||(G[42]=N=>_(t).config.attractionDelay=N)},null,8,["label","modelValue"]),w("label",A9,[w("span",null,F(H.$t("modifiers.delayMode")),1),pe(w("select",{"onUpdate:modelValue":G[43]||(G[43]=N=>_(t).config.attractionDelayMode=N),class:"inp"},[w("option",T9,F(H.$t("modifiers.globalTime")),1),w("option",E9,F(H.$t("modifiers.particleLife")),1)],512),[[_t,_(t).config.attractionDelayMode]])]),w("label",_9,[w("span",null,F(H.$t("modifiers.attractionPath")),1),pe(w("select",{"onUpdate:modelValue":G[44]||(G[44]=N=>_(t).config.attractionPath=N),class:"inp"},[w("option",M9,F(H.$t("modifiers.straight")),1),w("option",P9,F(H.$t("common.curve")),1)],512),[[_t,_(t).config.attractionPath]])]),w("div",k9,F(H.$t("modifiers.attractionHint")),1),w("label",I9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[45]||(G[45]=N=>_(t).config.showAttractionShape=N)},null,512),[[vt,_(t).config.showAttractionShape]]),G[86]||(G[86]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.showShape")),1)])])):xe("",!0)]),w("div",R9,[w("label",F9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[46]||(G[46]=N=>_(t).config.trail=N)},null,512),[[vt,_(t).config.trail]]),G[87]||(G[87]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableTrail")),1)]),_(t).config.trail?(Q(),te("div",L9,[w("div",D9,[w("div",O9,F(H.$t("modifiers.trailImages")),1),w("button",{class:"image-add",title:H.$t("modifiers.addTrailImage"),onClick:G[47]||(G[47]=(...N)=>_(s)&&_(s)(...N))},"+",8,N9)]),(Q(!0),te(_e,null,Mt(_(t).config.trailResources,N=>(Q(),kt(sE,{key:N.id,resource:N,"resource-count":_(t).config.trailResources.length,"default-file":"trail.png","name-placeholder":"trail","show-folder":!1,onPick:_(r),onReset:_(d),onRemove:_(u),onUpdateWeight:_(h),onToggleLock:_(f)},{default:Ju(()=>[G[90]||(G[90]=w("div",{class:"resource-divider"},null,-1)),Ce(Ue,{label:H.$t("modifiers.trailRotation"),min:-360,max:360,step:1,"model-value":N.rotation,"onUpdate:modelValue":V=>_(c)(N.id,V)},null,8,["label","model-value","onUpdate:modelValue"]),Ce(Ue,{label:H.$t("modifiers.trailBones"),min:2,max:16,step:1,"model-value":N.boneCount,"onUpdate:modelValue":V=>_(a)(N.id,V)},null,8,["label","model-value","onUpdate:modelValue"]),Ce(Ue,{label:H.$t("modifiers.trailRatio"),min:0,max:100,step:1,modelValue:N.trailRatio,"onUpdate:modelValue":V=>N.trailRatio=V},null,8,["label","modelValue","onUpdate:modelValue"]),w("label",$9,[w("span",null,F(H.$t("modifiers.trailLength")),1),pe(w("select",{"onUpdate:modelValue":V=>N.lengthMode=V,class:"inp"},[w("option",U9,F(H.$t("common.fixed")),1),w("option",V9,F(H.$t("modifiers.randomRange")),1)],8,B9),[[_t,N.lengthMode]])]),N.lengthMode==="fixed"?(Q(),kt(Ue,{key:0,label:H.$t("modifiers.lengthRatio"),min:0,max:500,step:1,modelValue:N.length,"onUpdate:modelValue":V=>N.length=V},null,8,["label","modelValue","onUpdate:modelValue"])):(Q(),te(_e,{key:1},[Ce(Ue,{label:H.$t("modifiers.lengthMin"),min:0,max:500,step:1,modelValue:N.lengthMin,"onUpdate:modelValue":V=>N.lengthMin=V},null,8,["label","modelValue","onUpdate:modelValue"]),Ce(Ue,{label:H.$t("modifiers.lengthMax"),min:0,max:500,step:1,modelValue:N.lengthMax,"onUpdate:modelValue":V=>N.lengthMax=V},null,8,["label","modelValue","onUpdate:modelValue"])],64)),w("label",X9,[w("span",null,F(H.$t("modifiers.trailWidth")),1),pe(w("select",{"onUpdate:modelValue":V=>N.widthSizeMode=V,class:"inp"},[w("option",z9,F(H.$t("common.fixed")),1),w("option",j9,F(H.$t("modifiers.randomRange")),1)],8,Y9),[[_t,N.widthSizeMode]])]),N.widthSizeMode==="fixed"?(Q(),kt(Ue,{key:2,label:H.$t("modifiers.widthRatio"),min:0,max:500,step:1,modelValue:N.width,"onUpdate:modelValue":V=>N.width=V},null,8,["label","modelValue","onUpdate:modelValue"])):(Q(),te(_e,{key:3},[Ce(Ue,{label:H.$t("modifiers.widthMin"),min:0,max:500,step:1,modelValue:N.widthMin,"onUpdate:modelValue":V=>N.widthMin=V},null,8,["label","modelValue","onUpdate:modelValue"]),Ce(Ue,{label:H.$t("modifiers.widthMax"),min:0,max:500,step:1,modelValue:N.widthMax,"onUpdate:modelValue":V=>N.widthMax=V},null,8,["label","modelValue","onUpdate:modelValue"])],64)),w("label",H9,[w("span",null,F(H.$t("modifiers.widthScale")),1),pe(w("select",{"onUpdate:modelValue":V=>N.widthMode=V,class:"inp"},[w("option",W9,F(H.$t("modifiers.followParticle")),1),w("option",q9,F(H.$t("common.fixed")),1)],8,G9),[[_t,N.widthMode]])]),w("label",K9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":V=>N.lifeLengthEnabled=V},null,8,J9),[[vt,N.lifeLengthEnabled]]),G[88]||(G[88]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.lifeLengthCurve")),1)]),N.lifeLengthEnabled?(Q(),kt(Ts,{key:4,modelValue:N.lifeLengthCurve,"onUpdate:modelValue":V=>N.lifeLengthCurve=V,"default-value":_(j)},null,8,["modelValue","onUpdate:modelValue","default-value"])):xe("",!0),w("label",Z9,[pe(w("input",{type:"checkbox","onUpdate:modelValue":V=>N.shapeEnabled=V},null,8,Q9),[[vt,N.shapeEnabled]]),G[89]||(G[89]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.shapeCurve")),1)]),N.shapeEnabled?(Q(),kt(Ts,{key:5,modelValue:N.shapeCurve,"onUpdate:modelValue":V=>N.shapeCurve=V,"default-value":_(Y)},null,8,["modelValue","onUpdate:modelValue","default-value"])):xe("",!0),w("div",eK,[w("span",null,F(H.$t("modifiers.colorMode")),1),w("div",tK,[w("button",{class:Me(["axis-mode",{on:N.colorMode==="particle"}]),onClick:V=>N.colorMode="particle"},F(H.$t("modifiers.followParticle")),11,nK),w("button",{class:Me(["axis-mode",{on:N.colorMode==="fixed"}]),onClick:V=>N.colorMode="fixed"},F(H.$t("common.fixed")),11,iK),w("button",{class:Me(["axis-mode",{on:N.colorMode==="curve"}]),onClick:V=>N.colorMode="curve"},F(H.$t("common.curve")),11,sK)])]),w("label",rK,[w("span",null,F(H.$t("modifiers.blendMode")),1),pe(w("select",{"onUpdate:modelValue":V=>N.blend=V,class:"inp"},[w("option",aK,F(H.$t("appearance.normal")),1),w("option",lK,F(H.$t("appearance.add")),1),w("option",cK,F(H.$t("appearance.multiply")),1),w("option",dK,F(H.$t("appearance.screen")),1)],8,oK),[[_t,N.blend]])]),N.colorMode==="fixed"?(Q(),te("label",uK,[w("span",null,F(H.$t("modifiers.fixedColor")),1),pe(w("input",{class:"colr",type:"color","onUpdate:modelValue":V=>N.color=V},null,8,hK),[[Je,N.color]]),w("input",{class:"hex-input",value:N.color,onChange:V=>_(p)(N,V),onKeydown:es(We(V=>_(m)(N,V),["prevent"]),["enter"])},null,40,fK)])):N.colorMode==="curve"?(Q(),kt(iE,{key:7,modelValue:N.colorGradient,"onUpdate:modelValue":V=>N.colorGradient=V},null,8,["modelValue","onUpdate:modelValue"])):xe("",!0),w("div",pK,[w("span",null,F(H.$t("modifiers.alphaMode")),1),w("div",mK,[w("button",{class:Me(["axis-mode",{on:N.alphaMode==="particle"}]),onClick:V=>N.alphaMode="particle"},F(H.$t("modifiers.followParticle")),11,gK),w("button",{class:Me(["axis-mode",{on:N.alphaMode==="fixed"}]),onClick:V=>N.alphaMode="fixed"},F(H.$t("common.fixed")),11,vK),w("button",{class:Me(["axis-mode",{on:N.alphaMode==="curve"}]),onClick:V=>N.alphaMode="curve"},F(H.$t("common.curve")),11,bK)])]),N.alphaMode==="fixed"?(Q(),kt(Ue,{key:8,label:H.$t("modifiers.opacity"),min:0,max:1,step:.01,modelValue:N.alpha,"onUpdate:modelValue":V=>N.alpha=V},null,8,["label","modelValue","onUpdate:modelValue"])):xe("",!0),N.alphaMode==="curve"?(Q(),kt(Ts,{key:9,modelValue:N.alphaCurve,"onUpdate:modelValue":V=>N.alphaCurve=V,"default-value":_(B)},null,8,["modelValue","onUpdate:modelValue","default-value"])):xe("",!0)]),_:2},1032,["resource","resource-count","onPick","onReset","onRemove","onUpdateWeight","onToggleLock"]))),128)),w("input",{ref_key:"trailTextureFileInput",ref:n,class:"file-input",type:"file",accept:"image/png,image/jpeg,image/webp",onChange:G[48]||(G[48]=(...N)=>_(l)&&_(l)(...N))},null,544),w("div",yK,[Ce(Ue,{label:H.$t("modifiers.gridRows"),min:2,max:16,step:1,"model-value":_(t).config.trailGridRows,"onUpdate:modelValue":G[49]||(G[49]=N=>_(o)("trailGridRows",N))},null,8,["label","model-value"]),Ce(Ue,{label:H.$t("modifiers.gridCols"),min:2,max:32,step:1,"model-value":_(t).config.trailGridCols,"onUpdate:modelValue":G[50]||(G[50]=N=>_(o)("trailGridCols",N))},null,8,["label","model-value"])]),w("div",xK,F(H.$t("modifiers.trailHint")),1)])):xe("",!0)]),w("div",wK,[w("label",SK,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[51]||(G[51]=N=>_(t).config.emitterFollow=N),disabled:_(t).config.streamBehavior==="loop"},null,8,CK),[[vt,_(t).config.emitterFollow]]),G[91]||(G[91]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableFollow")),1)]),_(t).config.emitterFollow&&_(t).config.streamBehavior!=="loop"?(Q(),te("div",AK,[w("label",TK,[w("span",null,F(H.$t("modifiers.followMode")),1),w("select",{value:_(t).config.emitterFollowMode,class:"inp",onChange:G[52]||(G[52]=N=>_(k)(N,_(t).config))},[w("option",_K,F(H.$t("modifiers.noFollow")),1),w("option",MK,F(H.$t("modifiers.followPath")),1),_(g)||_(t).config.emitterFollowMode==="bone"?(Q(),te("option",PK,F(H.$t("modifiers.selectedBone")),1)):xe("",!0)],40,EK)]),_(t).config.emitterFollowMode==="path"?(Q(),te(_e,{key:0},[w("label",kK,[w("span",null,F(H.$t("modifiers.followPath")),1),pe(w("select",{"onUpdate:modelValue":G[53]||(G[53]=N=>_(t).config.emitterFollowPathId=N),class:"inp"},[w("option",IK,F(H.$t("modifiers.noFollow")),1),(Q(!0),te(_e,null,Mt(_(e).paths,N=>(Q(),te("option",{key:N.id,value:N.id},F(N.name),9,RK))),128))],512),[[_t,_(t).config.emitterFollowPathId,void 0,{number:!0}]])]),w("label",FK,[w("span",null,F(H.$t("modifiers.emitterAngleMode")),1),pe(w("select",{"onUpdate:modelValue":G[54]||(G[54]=N=>_(t).config.emitterAngleMode=N),class:"inp"},[w("option",LK,F(H.$t("modifiers.fixedAngle")),1),w("option",DK,F(H.$t("modifiers.followMoveDirection")),1)],512),[[_t,_(t).config.emitterAngleMode]])]),w("div",OK,[w("span",null,F(H.$t("modifiers.moveProgressCurve")),1)]),Ce(Ts,{modelValue:_(t).config.emitterFollowCurve,"onUpdate:modelValue":G[55]||(G[55]=N=>_(t).config.emitterFollowCurve=N),"default-value":_($)},null,8,["modelValue","default-value"]),w("div",NK,[w("label",$K,[w("span",null,F(H.$t("modifiers.moveDuration")),1),pe(w("input",{"onUpdate:modelValue":G[56]||(G[56]=N=>_(t).config.emitterFollowDuration=N),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[Je,_(t).config.emitterFollowDuration,void 0,{number:!0}]])]),w("label",BK,[w("span",null,F(H.$t("modifiers.followSpace")),1),pe(w("select",{"onUpdate:modelValue":G[57]||(G[57]=N=>_(t).config.emitterFollowSpace=N),class:"inp"},[w("option",UK,F(H.$t("modifiers.localSpace")),1),w("option",VK,F(H.$t("modifiers.worldSpace")),1)],512),[[_t,_(t).config.emitterFollowSpace]])])]),w("label",XK,[w("span",null,F(H.$t("modifiers.moveDirection")),1),pe(w("select",{"onUpdate:modelValue":G[58]||(G[58]=N=>_(t).config.emitterFollowDirection=N),class:"inp"},[w("option",YK,F(H.$t("modifiers.forward")),1),w("option",zK,F(H.$t("modifiers.reverse")),1)],512),[[_t,_(t).config.emitterFollowDirection]])]),Ce(Ue,{label:H.$t("modifiers.followOffset"),min:0,max:1,step:.01,modelValue:_(t).config.emitterFollowOffset,"onUpdate:modelValue":G[59]||(G[59]=N=>_(t).config.emitterFollowOffset=N)},null,8,["label","modelValue"]),w("div",jK,F(H.$t("modifiers.followSpaceHint")),1)],64)):_(t).config.emitterFollowMode==="bone"?(Q(),te(_e,{key:1},[_(v)?(Q(),te("div",HK,[Ct(F(H.$t("modifiers.followTarget")),1),w("strong",null,F(_(v).spine.name)+" / "+F(_(v).boneName),1)])):(Q(),te("div",GK,F(H.$t("modifiers.noValidBone")),1)),_(g)&&(!_(v)||_(g).spine.id!==_(v).spine.id||_(g).boneName!==_(v).boneName)?(Q(),te("button",{key:2,class:"bone-follow-rebind",onClick:G[60]||(G[60]=N=>_(P)(_(t).config))},F(_(v)?H.$t("modifiers.rebind"):H.$t("modifiers.bind"))+F(H.$t("modifiers.selectedBoneLabel"))+F(_(g).spine.name)+" / "+F(_(g).boneName),1)):xe("",!0),_(v)?(Q(),te(_e,{key:3},[w("label",WK,[w("span",null,F(H.$t("modifiers.followSpace")),1),pe(w("select",{"onUpdate:modelValue":G[61]||(G[61]=N=>_(t).config.emitterFollowSpace=N),class:"inp"},[w("option",qK,F(H.$t("modifiers.boneLocalSpace")),1),w("option",KK,F(H.$t("modifiers.boneWorldSpace")),1)],512),[[_t,_(t).config.emitterFollowSpace]])]),w("div",JK,[w("label",ZK,[w("span",null,F(H.$t("modifiers.offsetX")),1),pe(w("input",{"onUpdate:modelValue":G[62]||(G[62]=N=>_(t).config.emitterFollowBoneOffsetX=N),type:"number",step:"1",class:"inp"},null,512),[[Je,_(t).config.emitterFollowBoneOffsetX,void 0,{number:!0}]])]),w("label",QK,[w("span",null,F(H.$t("modifiers.offsetY")),1),pe(w("input",{"onUpdate:modelValue":G[63]||(G[63]=N=>_(t).config.emitterFollowBoneOffsetY=N),type:"number",step:"1",class:"inp"},null,512),[[Je,_(t).config.emitterFollowBoneOffsetY,void 0,{number:!0}]])])]),w("div",eJ,[w("label",tJ,[w("span",null,F(H.$t("modifiers.rotationOffset")),1),pe(w("input",{"onUpdate:modelValue":G[64]||(G[64]=N=>_(t).config.emitterFollowBoneRotation=N),type:"number",step:"1",class:"inp"},null,512),[[Je,_(t).config.emitterFollowBoneRotation,void 0,{number:!0}]])]),w("label",nJ,[w("span",null,F(H.$t("modifiers.scaleOffsetX")),1),pe(w("input",{"onUpdate:modelValue":G[65]||(G[65]=N=>_(t).config.emitterFollowBoneScaleX=N),type:"number",step:"0.05",class:"inp"},null,512),[[Je,_(t).config.emitterFollowBoneScaleX,void 0,{number:!0}]])]),w("label",iJ,[w("span",null,F(H.$t("modifiers.scaleOffsetY")),1),pe(w("input",{"onUpdate:modelValue":G[66]||(G[66]=N=>_(t).config.emitterFollowBoneScaleY=N),type:"number",step:"0.05",class:"inp"},null,512),[[Je,_(t).config.emitterFollowBoneScaleY,void 0,{number:!0}]])])]),w("div",sJ,F(H.$t("modifiers.boneFollowHint")),1)],64)):xe("",!0)],64)):xe("",!0)])):xe("",!0)]),w("div",rJ,[w("label",oJ,[pe(w("input",{type:"checkbox","onUpdate:modelValue":G[67]||(G[67]=N=>_(t).config.collision=N)},null,512),[[vt,_(t).config.collision]]),G[92]||(G[92]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableCollision")),1)]),_(t).config.collision?(Q(),te("div",aJ,[w("div",lJ,F(H.$t("modifiers.collisionObjects")),1),w("div",cJ,[(Q(!0),te(_e,null,Mt(_(b),N=>(Q(),te("span",{key:N.id,class:Me(["collision-filter-tag",{disabled:!N.enabled}]),title:N.enabled?N.name:H.$t("modifiers.colliderDisabled",{name:N.name})},[w("span",null,F(N.name),1),w("button",{type:"button","aria-label":H.$t("modifiers.clearCollider",{name:N.name}),onClick:V=>_(E)(N.id)},"×",8,uJ)],10,dJ))),128)),w("button",{type:"button",class:Me(["collision-filter-add",{active:_(y)}]),disabled:_(x).length===0,title:_(x).length?H.$t("modifiers.addCollider"):H.$t("modifiers.noAvailableColliders"),onClick:G[68]||(G[68]=N=>y.value=!_(y))},"+",10,hJ)]),_(b).length===0?(Q(),te("div",fJ,F(H.$t("modifiers.noCollidersSelected")),1)):xe("",!0),_(y)&&_(x).length?(Q(),te("div",pJ,[(Q(!0),te(_e,null,Mt(_(x),N=>(Q(),te("button",{key:N.id,type:"button",onClick:V=>_(T)(N.id)},[w("span",null,F(N.name),1),w("small",null,F(N.enabled?H.$t("modifiers.available"):H.$t("modifiers.disabled")),1)],8,mJ))),128))])):xe("",!0),w("div",gJ,F(H.$t("modifiers.collisionHint")),1)])):xe("",!0)]),w("div",vJ,[w("label",bJ,[pe(w("input",{"onUpdate:modelValue":G[69]||(G[69]=N=>_(t).config.eventEnabled=N),type:"checkbox"},null,512),[[vt,_(t).config.eventEnabled]]),G[93]||(G[93]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(H.$t("modifiers.enableSubEmitter")),1)]),_(t).config.eventEnabled?(Q(),te("div",yJ,[(Q(!0),te(_e,null,Mt(_(t).config.events,(N,V)=>(Q(),te("div",{key:N.id,class:"event-card"},[w("div",xJ,[pe(w("select",{"onUpdate:modelValue":W=>N.event=W,class:"inp event-select",title:H.$t("modifiers.triggerTiming")},[w("option",SJ,F(H.$t("modifiers.birth")),1),w("option",CJ,F(H.$t("modifiers.death")),1),w("option",AJ,F(H.$t("modifiers.collision")),1)],8,wJ),[[_t,N.event]]),pe(w("select",{"onUpdate:modelValue":W=>N.targetSystemId=W,class:"inp event-target",title:H.$t("modifiers.chooseTarget")},[w("option",EJ,F(H.$t("modifiers.noTarget")),1),(Q(!0),te(_e,null,Mt(O.value,W=>(Q(),te("option",{key:W.id,value:W.id},F(W.config.name||`ParticleSystem${W.id}`),9,_J))),128))],8,TJ),[[_t,N.targetSystemId,void 0,{number:!0}]]),w("button",{type:"button",class:"event-remove",title:H.$t("modifiers.deleteSubEmitter"),onClick:W=>ie(V)},"✕",8,MJ)]),w("label",PJ,[w("span",null,F(H.$t("modifiers.probability")),1),pe(w("input",{"onUpdate:modelValue":W=>N.probability=W,type:"number",min:"0",max:"1",step:"0.01",class:"inp"},null,8,kJ),[[Je,N.probability,void 0,{number:!0}]])]),N.event==="collision"?(Q(),te("label",IJ,[w("span",null,F(H.$t("modifiers.collisionLimit")),1),w("input",{value:N.collisionLimit??1,type:"number",min:"1",max:"4",step:"1",class:"inp",onInput:W=>se(N,W)},null,40,RJ)])):xe("",!0),w("div",FJ,[w("span",null,F(H.$t("modifiers.inherit")),1),w("button",{type:"button",class:"inherit-trigger",onPointerdown:G[70]||(G[70]=We(()=>{},["stop"])),onClick:We(W=>we(N,W),["stop"])},[w("span",DJ,F(K(N)),1),G[94]||(G[94]=w("i",null,"⌄",-1))],40,LJ)]),Z(N,"color")?(Q(),te("label",OJ,[w("span",null,F(H.$t("modifiers.colorInheritMode")),1),pe(w("select",{"onUpdate:modelValue":W=>N.colorInheritMode=W,class:"inp"},[w("option",$J,F(H.$t("modifiers.add")),1),w("option",BJ,F(H.$t("modifiers.replace")),1)],8,NJ),[[_t,N.colorInheritMode]])])):xe("",!0)]))),128)),w("button",{type:"button",class:"event-add",onClick:J},F(H.$t("modifiers.addSubEmitter")),1)])):xe("",!0)])],512),[[Bt,_(M)("mods")]])]),(Q(),kt(Qu,{to:"body"},[R.value&&X.value?(Q(),te("div",{key:0,class:"inherit-menu",style:Yt({left:`${R.value.left}px`,top:`${R.value.top}px`,width:`${R.value.width}px`}),onPointerdown:G[73]||(G[73]=We(()=>{},["stop"]))},[w("button",{type:"button",class:"inherit-option",onClick:G[71]||(G[71]=N=>ce(X.value))},[w("span",UJ,F(z(X.value).length===0?"✓":""),1),Ct(F(H.$t("modifiers.inheritNone")),1)]),w("button",{type:"button",class:"inherit-option",onClick:G[72]||(G[72]=N=>ve(X.value))},[w("span",VJ,F(z(X.value).length===4?"✓":""),1),Ct(F(H.$t("modifiers.inheritAll")),1)]),G[95]||(G[95]=w("div",{class:"inherit-divider"},null,-1)),(Q(!0),te(_e,null,Mt(L.value,N=>(Q(),te("button",{key:N.key,type:"button",class:"inherit-option",onClick:V=>ae(X.value,N.key)},[w("span",YJ,F(Z(X.value,N.key)?"✓":""),1),Ct(F(N.label),1)],8,XJ))),128))],36)):xe("",!0)]))],64))}}),Qx=dn(zJ,[["__scopeId","data-v-54af9ba1"]]),jJ={class:"spine-export-actions"},HJ=["disabled","title"],GJ=["disabled","title"],WJ=["disabled","title"],qJ={key:0},KJ=["href","title"],JJ=["title"],ZJ=["href"],QJ=Zt({__name:"ParticleExportFooter",setup(i){const{exportSettings:e,exportBusy:t,exportTarget:n,exportMessage:s,exportError:r,connectorPairUrl:o,connectorStatusText:a,connectorStatusClass:c,connectorReady:l,connectorAuthorizationUrl:d,connectorDisabledReason:u,connectorButtonTitle:h,refreshConnectorHealth:f,exportSpineJson:p,exportSpineProject:m,exportSpineImages:g}=Tr();return(v,y)=>(Q(),te(_e,null,[w("div",jJ,[w("button",{type:"button",class:"export-spine-json",disabled:_(t),title:_(t)?v.$t("export.baking"):v.$t("export.exportJsonTitle",{version:_(e).spineVersion}),onClick:y[0]||(y[0]=(...b)=>_(p)&&_(p)(...b))},F(_(t)&&_(n)==="json"?v.$t("export.preparing"):v.$t("export.exportJson")),9,HJ),w("button",{type:"button",class:"export-spine-images",disabled:_(t),title:v.$t("export.exportImagesTitle"),onClick:y[1]||(y[1]=(...b)=>_(g)&&_(g)(...b))},F(_(t)&&_(n)==="images"?v.$t("export.organizingImages"):v.$t("export.exportImages")),9,GJ),w("button",{type:"button",class:"export-spine-project",disabled:_(t)||!_(l),title:_(h),onClick:y[2]||(y[2]=(...b)=>_(m)&&_(m)(...b))},[w("span",null,F(_(t)&&_(n)==="spine"?v.$t("export.generatingProject"):v.$t("export.exportSpine")),1),!_(t)&&_(u)?(Q(),te("small",qJ,F(_(u)),1)):xe("",!0)],8,WJ)]),w("div",{class:Me(["connector-status",_(c)])},[y[5]||(y[5]=w("span",{class:"connector-dot"},null,-1)),Ct(F(_(a))+" ",1),_(d)?(Q(),te("a",{key:0,href:_(d),target:"_blank",rel:"noopener",title:v.$t("export.authorizeTitle")},F(v.$t("export.authorize")),9,KJ)):xe("",!0),w("button",{type:"button",title:v.$t("export.refreshConnector"),onClick:y[3]||(y[3]=(...b)=>_(f)&&_(f)(...b))},F(v.$t("export.refresh")),9,JJ)],2),_(s)?(Q(),te("div",{key:0,class:Me(["export-message",{error:_(r)}])},[Ct(F(_(s))+" ",1),_(o)?(Q(),te("a",{key:0,href:_(o),target:"_blank",rel:"noopener",onClick:y[4]||(y[4]=b=>o.value="")},F(v.$t("export.authorize")),9,ZJ)):xe("",!0)],2)):xe("",!0)],64))}}),eZ=dn(QJ,[["__scopeId","data-v-33af5045"]]),tZ={class:"group"},nZ={class:"caret"},iZ=["title"],sZ={class:"group-body export-settings"},rZ={class:"export-field"},oZ={class:"export-field"},aZ={class:"export-field"},lZ={value:"linear"},cZ={value:"bezier"},dZ={class:"export-help"},uZ={key:0,class:"export-help"},hZ={class:"export-fps-row"},fZ={class:"export-field export-fps-field"},pZ={class:"export-checkbox"},mZ={class:"export-help"},gZ={class:"export-switches"},vZ={class:"switch-row export-switch"},bZ={class:"switch-row export-switch"},yZ={class:"switch-row export-switch export-switch-last"},xZ={class:"export-resource-actions"},wZ=Zt({__name:"ExportSettingsSection",setup(i){const{exportSettings:e,collapsed:t,toggle:n,sectionOpen:s,resetModule:r,normalizeExportFps:o,select:a}=Tr();return(c,l)=>(Q(),te("div",tZ,[w("div",{class:"group-head",onClick:l[1]||(l[1]=d=>_(n)("export"))},[w("span",nZ,F(_(t).export?"▸":"▾"),1),w("span",null,F(c.$t("export.title")),1),w("button",{class:"group-reset",title:c.$t("export.reset"),onClick:l[0]||(l[0]=We(d=>_(r)("export"),["stop"]))},F(c.$t("common.reset")),9,iZ)]),pe(w("div",sZ,[w("label",rZ,[w("span",null,F(c.$t("export.imagesPath")),1),pe(w("input",{"onUpdate:modelValue":l[2]||(l[2]=d=>_(e).imagesPath=d),class:"inp export-input",type:"text",placeholder:"./images/"},null,512),[[Je,_(e).imagesPath,void 0,{trim:!0}]])]),w("label",oZ,[w("span",null,F(c.$t("export.spineVersion")),1),pe(w("select",{"onUpdate:modelValue":l[3]||(l[3]=d=>_(e).spineVersion=d),class:"inp export-input"},[...l[11]||(l[11]=[wM('<option value="3.8" data-v-43ee846c>Spine 3.8</option><option value="4.0" data-v-43ee846c>Spine 4.0</option><option value="4.1" data-v-43ee846c>Spine 4.1</option><option value="4.2" data-v-43ee846c>Spine 4.2</option><option value="4.3" data-v-43ee846c>Spine 4.3</option>',5)])],512),[[_t,_(e).spineVersion]])]),w("label",aZ,[w("span",null,F(c.$t("export.keyframeCurve")),1),pe(w("select",{"onUpdate:modelValue":l[4]||(l[4]=d=>_(e).keyframeCurve=d),class:"inp export-input"},[w("option",lZ,F(c.$t("export.linear")),1),w("option",cZ,F(c.$t("export.smoothBezier")),1)],512),[[_t,_(e).keyframeCurve]])]),w("div",dZ,F(c.$t("export.bezierHelp")),1),_(e).spineVersion==="3.8"?(Q(),te("div",uZ,F(c.$t("export.spine38Help")),1)):xe("",!0),w("div",hZ,[w("label",fZ,[w("span",null,F(c.$t("export.fps")),1),pe(w("input",{"onUpdate:modelValue":l[5]||(l[5]=d=>_(e).fps=d),class:"inp export-input",type:"number",min:"1",max:"240",step:"1",onChange:l[6]||(l[6]=(...d)=>_(o)&&_(o)(...d))},null,544),[[Je,_(e).fps,void 0,{number:!0}]])]),w("label",pZ,[pe(w("input",{"onUpdate:modelValue":l[7]||(l[7]=d=>_(e).omitFps=d),type:"checkbox"},null,512),[[vt,_(e).omitFps]]),Ct(F(c.$t("export.omitFps")),1)])]),w("div",mZ,F(c.$t("export.fpsHelp")),1),w("div",gZ,[w("label",vZ,[pe(w("input",{"onUpdate:modelValue":l[8]||(l[8]=d=>_(e).integerFrameAlignment=d),type:"checkbox"},null,512),[[vt,_(e).integerFrameAlignment]]),l[12]||(l[12]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(c.$t("export.integerFrames")),1)]),w("label",bZ,[pe(w("input",{"onUpdate:modelValue":l[9]||(l[9]=d=>_(e).bonePool=d),type:"checkbox"},null,512),[[vt,_(e).bonePool]]),l[13]||(l[13]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(c.$t("export.bonePool")),1)]),w("label",yZ,[pe(w("input",{"onUpdate:modelValue":l[10]||(l[10]=d=>_(e).excludeEmptyAnimations=d),type:"checkbox"},null,512),[[vt,_(e).excludeEmptyAnimations]]),l[14]||(l[14]=w("span",{class:"switch-ui"},null,-1)),w("span",null,F(c.$t("export.excludeEmpty")),1)])]),w("div",xZ,[Ce(eZ)])],512),[[Bt,_(s)("export")]])]))}}),e1=dn(wZ,[["__scopeId","data-v-43ee846c"]]),SZ={class:"panel"},CZ={class:"panel-header"},AZ=["title"],TZ=["data-active-section"],EZ=["data-active-section"],_Z=["data-active-section"],MZ=["data-active-section"],PZ=["data-active-section"],kZ=["data-active-section"],IZ=["data-active-section"],RZ=Zt({__name:"ParticlePanel",setup(i){const{store:e,activeObjectType:t,activeSection:n,sys:s,canUseSection:r}=Tr(),o=Re(null);function a(){n.value=null}const c=Fe(()=>{const l=n.value;return!l||!r(l)||l!=="config"&&l!=="scene"&&(t.value!=="particle"||!s.value)?null:l});return Vt(c,async()=>{var l,d;await tl(),(d=(l=o.value)==null?void 0:l.querySelector('[data-active-section="true"]'))==null||d.scrollIntoView({block:"start"})}),(l,d)=>(Q(),te("div",SZ,[w("div",CZ,[w("span",null,F(l.$t("app.title")),1),_(e).settings.floatingMenuEnabled&&_(n)?(Q(),te("button",{key:0,type:"button",class:"panel-collapse",title:l.$t("common.collapse"),onClick:a},F(l.$t("common.collapse")),9,AZ)):xe("",!0)]),w("div",{ref_key:"panelScroll",ref:o,class:"panel-scroll"},[_(e).settings.floatingMenuEnabled?(Q(),te(_e,{key:0},[pe(w("div",{class:"section-detail","data-active-section":c.value==="config"?!0:void 0},[Ce(Hx)],8,TZ),[[Bt,_(n)==="config"]]),pe(w("div",{class:"section-detail","data-active-section":c.value==="scene"?!0:void 0},[Ce(Gx)],8,EZ),[[Bt,_(n)==="scene"]]),pe(w("div",{class:"section-detail","data-active-section":c.value==="emitMode"||c.value==="shape"?!0:void 0},[Ce(Wx)],8,_Z),[[Bt,c.value==="emitMode"||c.value==="shape"]]),pe(w("div",{class:"section-detail","data-active-section":c.value==="attr"?!0:void 0},[Ce(qx)],8,MZ),[[Bt,c.value==="attr"]]),pe(w("div",{class:"section-detail","data-active-section":c.value==="look"?!0:void 0},[Ce(Zx)],8,PZ),[[Bt,c.value==="look"]]),pe(w("div",{class:"section-detail","data-active-section":c.value==="mods"?!0:void 0},[Ce(Qx)],8,kZ),[[Bt,c.value==="mods"]]),pe(w("div",{class:"section-detail","data-active-section":c.value==="export"?!0:void 0},[Ce(e1)],8,IZ),[[Bt,c.value==="export"]])],64)):(Q(),te(_e,{key:1},[Ce(Hx),Ce(Gx),_(t)==="particle"&&_(s)?(Q(),te(_e,{key:0},[Ce(Wx),Ce(qx),Ce(Zx),Ce(Qx),Ce(e1)],64)):xe("",!0)],64))],512)]))}}),FZ=dn(RZ,[["__scopeId","data-v-01c761d3"]]),fa=i=>Math.max(0,Number(i)||0);function LZ(i,e){const t=Math.max(1,e),n=new Map(i.map(y=>[y.id,y])),s=new Set;for(const y of i)if(y.config.eventEnabled)for(const b of y.config.events||[])b.targetSystemId>0&&b.targetSystemId!==y.id&&n.has(b.targetSystemId)&&s.add(b.targetSystemId);const r=new Map;for(const y of i)if(y.config.eventEnabled)for(const b of y.config.events||[]){if(b.targetSystemId<=0||b.targetSystemId===y.id||!n.has(b.targetSystemId))continue;const x=r.get(b.targetSystemId);x?x.push({parent:y,rule:b}):r.set(b.targetSystemId,[{parent:y,rule:b}])}const o=y=>fa(y.delay),a=y=>fa(y.delay),c=y=>{const b=o(y);return y.mode!=="stream"?b:y.streamBehavior==="loop"?b+Ji(y,t).total/t:b+Math.max(1/t,Number(y.duration)||0)},l=y=>{const b=fa(y.lifeMin),x=fa(y.lifeMax);return y.lifeMode==="fixed"?b:Math.min(b,x)},d=y=>{const b=fa(y.lifeMin),x=fa(y.lifeMax);return y.lifeMode==="fixed"?b:Math.max(b,x)},u=new Map,h=new Map,f=new Set,p=new Set,m=y=>{const b=u.get(y.id);if(b!=null)return b;if(f.has(y.id))return o(y.config);f.add(y.id);let x=1/0;for(const{parent:T,rule:E}of r.get(y.id)||[]){const S=s.has(T.id)?m(T)+a(T.config):o(T.config),C=E.event==="death"?l(T.config):0;x=Math.min(x,S+C)}return Number.isFinite(x)||(x=o(y.config)),f.delete(y.id),u.set(y.id,x),x},g=y=>{const b=h.get(y.id);if(b!=null)return b;if(p.has(y.id))return c(y.config);p.add(y.id);let x=-1/0;for(const{parent:T,rule:E}of r.get(y.id)||[]){const S=s.has(T.id)?g(T)+a(T.config):c(T.config),C=E.event==="birth"?0:d(T.config);x=Math.max(x,S+C)}return Number.isFinite(x)||(x=c(y.config)),p.delete(y.id),h.set(y.id,x),x},v=new Map;for(const y of s){const b=n.get(y);if(!b)continue;const x=m(b),T=g(b);v.set(y,{firstTrigger:x,lastTrigger:T,end:Math.max(x,T)+d(b.config)})}return v}const DZ={class:"timeline"},OZ={class:"tl-controls"},NZ=["title"],$Z=["title"],BZ=["title"],UZ=["title"],VZ=["title"],XZ=["title","aria-label"],YZ={class:"tl-ab-loop"},zZ=["title"],jZ={class:"tl-ab-title"},HZ=["title"],GZ=["max","aria-label","onKeydown"],WZ=["title"],qZ=["min","max","aria-label","onKeydown"],KZ={class:"tl-frame"},JZ={class:"tl-legend"},ZZ=["disabled","title"],QZ={class:"tl-animation-menu-title"},eQ=["onClick"],tQ={key:0},nQ={class:"tl-animation-editor"},iQ=["aria-label"],sQ=["title"],rQ={key:0,class:"tl-animation-error"},oQ={class:"tl-animation-actions"},aQ=["disabled"],lQ={key:1,class:"tl-animation-hint"},cQ={class:"tl-anim tl-spine-preview"},dQ=["value","disabled"],uQ={value:""},hQ=["value"],fQ={class:"tl-zoom"},pQ={class:"tl-ticks"},mQ={class:"tl-ticklabel"},gQ={class:"tl-lanes"},vQ=["onPointerdown"],bQ={class:"lane-name"},yQ=["title","onPointerdown"],xQ=["title","onPointerdown"],wQ=["title","onPointerdown"],SQ={class:"lane-name"},CQ={key:0,class:"tl-empty"},AQ=Zt({__name:"Timeline",setup(i){const e=Zo(),{t}=mi(),n=Re(null),s=Re(0);let r=null;const o=Re(null),a=Re(!1),c=Re("animation"),l=Re("");ma(()=>{(!Array.isArray(e.timeline.animations)||!e.timeline.animations.length)&&(e.timeline.animations=["animation"]),e.timeline.animations.includes(e.timeline.animation)||(e.timeline.animation=e.timeline.animations[0]);for(const V of e.systems)(!V.animation||!e.timeline.animations.includes(V.animation))&&(V.animation=e.timeline.animations[0])});const d=Fe(()=>e.systems.find(V=>V.id===e.activeId)||null);function u(){d.value&&(a.value=!a.value,c.value=d.value.animation,l.value="")}function h(V){const W=d.value;W&&(e.setSystemAnimation(W.id,V),c.value=V,l.value="")}function f(){const V=e.addAnimation();c.value=V,l.value=""}function p(){var ee;const V=((ee=d.value)==null?void 0:ee.animation)||e.timeline.animation,W=c.value.trim();if(!W){l.value=t("timeline.animationNameEmpty");return}if(W!==V&&e.timeline.animations.includes(W)){l.value=t("timeline.animationNameDuplicate");return}if(!e.renameAnimation(V,W)){l.value=t("timeline.animationRenameFailed");return}c.value=W,l.value=""}function m(){var ee,be;const V=((ee=d.value)==null?void 0:ee.animation)||e.timeline.animation;if(!e.removeAnimation(V)){l.value=t("timeline.keepOneAnimation");return}const W=((be=d.value)==null?void 0:be.animation)||e.timeline.animation;c.value=W,l.value=""}function g(V){var W;(W=o.value)!=null&&W.contains(V.target)||(a.value=!1)}Ti(()=>{document.addEventListener("pointerdown",g);const V=n.value;V&&(s.value=V.clientWidth,r=new ResizeObserver(([W])=>{s.value=Math.max(1,W.contentRect.width)}),r.observe(V))}),Ar(()=>{document.removeEventListener("pointerdown",g),r==null||r.disconnect(),r=null});const v=Fe(()=>Math.max(1,e.timeline.fps||30)),y=Re(Math.max(120,e.timeline.totalFrames)),b=Re({}),x=Re({}),T=Re({}),E=Re({}),S=Re(String(e.timeline.playbackStart)),C=Re(String(e.timeline.playbackEnd));Vt(()=>e.timeline.playbackStart,V=>{S.value=String(V)}),Vt(()=>e.timeline.playbackEnd,V=>{C.value=String(V)});const M=Fe(()=>e.timeline.totalFrames);Vt(M,V=>{V>y.value&&(y.value=Math.min(2e3,V))});const k=Fe(()=>y.value<=30?t("timeline.zoomIn"):y.value>=300?t("timeline.zoomOut"):t("timeline.zoomFit")),P=Fe(()=>e.spines.filter(V=>V.selectedAnimation&&V.animations.some(W=>W.name===V.selectedAnimation&&W.duration>0))),I=Fe(()=>(e.activeObjectType==="spine"?e.spines.find(W=>W.id===e.activeObjectId&&W.animations.length):null)||e.spines.find(W=>W.animations.length)||null);function D(V){const W=I.value;W&&(W.selectedAnimation=V.target.value,e.recalcTotalFrames(),e.timeline.frame=0)}function $(){e.setPlaybackStart(Number(S.value)),S.value=String(e.timeline.playbackStart)}function j(){e.setPlaybackEnd(Number(C.value)),C.value=String(e.timeline.playbackEnd)}function B(){var W;const V=s.value||((W=n.value)==null?void 0:W.clientWidth)||600;return y.value/V}const Y=Fe(()=>{const V=[],W=y.value;let ee=1;y.value<=10?ee=1:y.value<=50?ee=5:y.value<=200?ee=10:y.value<=500?ee=50:ee=100;for(let be=0;be<=W;be+=ee)V.push({f:be,px:be/B()});return V}),U=Fe(()=>e.timeline.frame/B()),O=Fe(()=>ja(e.systems)),L=Fe(()=>LZ(e.systems,v.value));function R(V){return O.value.has(V.id)}function X(V){var ee;return(R(V)?((ee=L.value.get(V.id))==null?void 0:ee.firstTrigger)??0:0)*v.value/B()+4}function z(V){var be;const W=V.config;if(R(V)){const ye=((be=L.value.get(V.id))==null?void 0:be.firstTrigger)??0,he=b.value[V.id]??Math.max(0,Number(W.delay)||0);return(ye+he)*v.value/B()}return(b.value[V.id]??Math.max(0,Number(W.delay)||0))*v.value/B()}function K(V){const W=V.config,ee=Math.max(0,Number(W.lifeMin)||0),be=Math.max(0,Number(W.lifeMax)||0);return W.lifeMode==="fixed"?ee:Math.max(ee,be)}function Z(V){if(R(V)){const W=L.value.get(V.id),ee=(W==null?void 0:W.firstTrigger)??0,be=(W==null?void 0:W.end)??ee;return Math.max(0,be-ee)*v.value/B()}return ce(V)}function ae(V){if(R(V)||V.config.mode!=="stream")return 0;if(V.config.streamBehavior==="loop"){const ee=V.config;return(T.value[V.id]??Ji(ee,v.value).loop)/B()}return(x.value[V.id]??Math.max(1/v.value,Number(V.config.duration)||1))*v.value/B()}function ce(V){if(R(V))return Z(V);const W=V.config;return W.mode==="stream"&&W.streamBehavior==="loop"?we(V)+ae(V)+re(V):ae(V)+K(V)*v.value/B()}function ve(V){const W=V.config;return W.mode==="stream"&&W.streamBehavior==="loop"}function we(V){return ve(V)?Ji(V.config,v.value).start/B():0}function re(V){return ve(V)?Ji(V.config,v.value).end/B():0}function Ee(V){var W;return((W=V.animations.find(ee=>ee.name===V.selectedAnimation))==null?void 0:W.duration)||0}function q(V){return(E.value[V.id]??Math.max(0,Number(V.timeOffset)||0))*v.value/B()}function J(V){return Ee(V)*v.value/B()}function ie(V){const W=V.deltaY<0?.8:1.25;let ee=y.value*W;ee=Math.min(2e3,Math.max(10,ee)),y.value=Math.round(ee)}function se(V){const W=n.value;e.pause();const ee=ye=>{const he=W.getBoundingClientRect(),Be=Math.floor((ye.clientX-he.left)/he.width*y.value);e.timeline.frame=Math.max(0,Math.min(Be,M.value-1))};ee(V);const be=()=>{window.removeEventListener("pointermove",ee),window.removeEventListener("pointerup",be)};window.addEventListener("pointermove",ee),window.addEventListener("pointerup",be)}function H(V,W){V.stopPropagation();const ee=V.clientX,be=Math.max(0,Number(W.config.delay)||0),ye=B()/v.value,he=ge=>{const Ve=(ge.clientX-ee)*ye,qe=Math.max(0,Math.min(be+Ve,600));b.value[W.id]=Math.round(qe*v.value)/v.value},Be=ge=>{window.removeEventListener("pointermove",he),window.removeEventListener("pointerup",Ae),window.removeEventListener("pointercancel",de);const Ve=b.value[W.id];delete b.value[W.id],ge&&Ve!=null&&Ve!==be&&(W.config.delay=Ve)},Ae=()=>Be(!0),de=()=>Be(!1);window.addEventListener("pointermove",he),window.addEventListener("pointerup",Ae),window.addEventListener("pointercancel",de)}function G(V,W){var ft;V.stopPropagation();const ee=ve(W),be=Math.max(0,Number(W.config.duration)||0),ye=Ji(W.config,v.value).loop,he=B()/v.value,Be=((ft=V.currentTarget.closest(".lane-bar"))==null?void 0:ft.getBoundingClientRect().left)??V.clientX,Ae=we(W);let de=!1;const ge=Oe=>{if(de=!0,ee){const ot=Math.min(1800,Math.max(1,Math.round((Oe.clientX-Be-Ae)/B())));T.value[W.id]=ot}else{const ot=Math.max(1/v.value,Math.min((Oe.clientX-Be)*he,600));x.value[W.id]=Math.round(ot*v.value)/v.value}},Ve=Oe=>{window.removeEventListener("pointermove",ge),window.removeEventListener("pointerup",qe),window.removeEventListener("pointercancel",bt);const ot=x.value[W.id],Te=T.value[W.id];delete x.value[W.id],delete T.value[W.id],Oe&&de&&ee&&Te!=null&&Te!==ye?W.config.loopDurationFrames=Te:Oe&&de&&!ee&&ot!=null&&ot!==be&&(W.config.duration=ot)},qe=()=>Ve(!0),bt=()=>Ve(!1);window.addEventListener("pointermove",ge),window.addEventListener("pointerup",qe),window.addEventListener("pointercancel",bt)}function N(V,W){V.stopPropagation();const ee=V.clientX,be=Math.max(0,Number(W.timeOffset)||0),ye=B()/v.value,he=ge=>{const Ve=Math.max(0,Math.min(be+(ge.clientX-ee)*ye,600));E.value[W.id]=Math.round(Ve*v.value)/v.value},Be=ge=>{window.removeEventListener("pointermove",he),window.removeEventListener("pointerup",Ae),window.removeEventListener("pointercancel",de);const Ve=E.value[W.id];delete E.value[W.id],ge&&Ve!=null&&Ve!==be&&(W.timeOffset=Ve,e.recalcTotalFrames())},Ae=()=>Be(!0),de=()=>Be(!1);window.addEventListener("pointermove",he),window.addEventListener("pointerup",Ae),window.addEventListener("pointercancel",de)}return(V,W)=>{var ee,be,ye;return Q(),te("div",DZ,[(Q(),kt(Qu,{defer:"",to:"#timeline-controls-host"},[w("div",OZ,[w("button",{class:Me(["tl-btn",{on:_(e).timeline.playing}]),onClick:W[0]||(W[0]=he=>_(e).togglePlay()),title:_(e).timeline.playing?V.$t("timeline.pause"):V.$t("timeline.play")},F(_(e).timeline.playing?"❚❚":"▶"),11,NZ),w("button",{class:"tl-btn",onClick:W[1]||(W[1]=he=>_(e).toStart()),title:V.$t("timeline.toStart")},"⏮",8,$Z),w("button",{class:"tl-btn",onClick:W[2]||(W[2]=he=>_(e).previousFrame()),title:V.$t("timeline.previous")},"◀",8,BZ),w("button",{class:"tl-btn",onClick:W[3]||(W[3]=he=>_(e).nextFrame()),title:V.$t("timeline.next")},"▶",8,UZ),w("button",{class:"tl-btn",onClick:W[4]||(W[4]=he=>_(e).toEnd()),title:V.$t("timeline.toEnd")},"⏭",8,VZ),w("button",{class:Me(["tl-btn",{on:_(e).timeline.loop}]),title:V.$t("timeline.continuousLoop"),"aria-label":V.$t("timeline.continuousLoop"),onClick:W[5]||(W[5]=he=>_(e).toggleLoop())},"⟳",10,XZ),w("div",YZ,[w("button",{class:Me(["tl-ab-toggle",{on:_(e).timeline.abLoop}]),title:V.$t("timeline.abLoop"),onClick:W[6]||(W[6]=he=>_(e).toggleABLoop())},[w("span",null,F(V.$t("timeline.abLoopShort")),1),W[12]||(W[12]=w("i",{class:"tl-switch"},[w("b")],-1))],10,zZ),_(e).timeline.abLoop?(Q(),te("div",{key:0,class:"tl-ab-popover",onPointerdown:W[9]||(W[9]=We(()=>{},["stop"]))},[w("div",jZ,F(V.$t("timeline.abRange")),1),w("label",{class:"tl-range",title:V.$t("timeline.playbackStart")},[W[13]||(W[13]=w("span",null,"A",-1)),pe(w("input",{"onUpdate:modelValue":W[7]||(W[7]=he=>S.value=he),type:"number",min:"0",max:Math.max(0,_(e).timeline.playbackEnd-1),"aria-label":V.$t("timeline.startFrame"),onChange:$,onKeydown:es(We($,["prevent"]),["enter"])},null,40,GZ),[[Je,S.value]])],8,HZ),w("label",{class:"tl-range",title:V.$t("timeline.playbackEnd")},[W[14]||(W[14]=w("span",null,"B",-1)),pe(w("input",{"onUpdate:modelValue":W[8]||(W[8]=he=>C.value=he),type:"number",min:_(e).timeline.playbackStart+1,max:Math.max(1,_(e).timeline.totalFrames-1),"aria-label":V.$t("timeline.endFrame"),onChange:j,onKeydown:es(We(j,["prevent"]),["enter"])},null,40,qZ),[[Je,C.value]])],8,WZ)],32)):xe("",!0)]),w("span",KZ,F(V.$t("timeline.frameStatus",{current:_(e).timeline.frame,total:Math.max(0,_(e).timeline.totalFrames-1)})),1),w("span",JZ,[W[15]||(W[15]=w("i",{class:"legend-emission"},null,-1)),Ct(F(V.$t("timeline.emission"))+" ",1),W[16]||(W[16]=w("i",{class:"legend-life"},null,-1)),Ct(F(V.$t("timeline.particleLife"))+" ",1),W[17]||(W[17]=w("i",{class:"legend-spine"},null,-1)),Ct(F(V.$t("timeline.spineAnimation")),1)]),w("div",{ref_key:"animationMenuRef",ref:o,class:"tl-anim tl-owner-animation"},[w("span",null,F(V.$t("timeline.ownerAnimation")),1),w("button",{class:"tl-animation-trigger",disabled:!d.value,title:V.$t("timeline.setOwnerAnimation"),onClick:We(u,["stop"])},[w("span",null,F(((ee=d.value)==null?void 0:ee.animation)||_(e).timeline.animation),1),W[18]||(W[18]=w("i",null,"⌄",-1))],8,ZZ),a.value?(Q(),te("div",{key:0,class:"tl-animation-menu",onPointerdown:W[11]||(W[11]=We(()=>{},["stop"]))},[w("div",QZ,F(V.$t("timeline.chooseOwnerAnimation")),1),(Q(!0),te(_e,null,Mt(_(e).timeline.animations,he=>{var Be,Ae;return Q(),te("button",{key:he,class:Me(["tl-animation-option",{on:((Be=d.value)==null?void 0:Be.animation)===he}]),onClick:de=>h(he)},[w("span",null,F(he),1),((Ae=d.value)==null?void 0:Ae.animation)===he?(Q(),te("i",tQ,"✓")):xe("",!0)],10,eQ)}),128)),w("div",nQ,[pe(w("input",{"onUpdate:modelValue":W[10]||(W[10]=he=>c.value=he),class:"tl-animation-name",maxlength:"64","aria-label":V.$t("timeline.animationName"),onKeydown:es(p,["enter"])},null,40,iQ),[[Je,c.value]]),w("button",{title:V.$t("timeline.renameAnimation"),onClick:p},F(V.$t("timeline.rename")),9,sQ)]),l.value?(Q(),te("div",rQ,F(l.value),1)):xe("",!0),w("div",oQ,[w("button",{onClick:f},F(V.$t("timeline.newAnimation")),1),w("button",{disabled:_(e).timeline.animations.length<=1,onClick:m},F(V.$t("common.delete")),9,aQ)]),_(e).timeline.animations.length<=1?(Q(),te("div",lQ,F(V.$t("timeline.keepOneAnimation")),1)):xe("",!0)],32)):xe("",!0)],512),w("label",cQ,[Ct(F(V.$t("timeline.spinePreview"))+" ",1),w("select",{class:"tl-sel",value:((be=I.value)==null?void 0:be.selectedAnimation)||"",disabled:!I.value,onChange:D},[w("option",uQ,F(I.value?V.$t("timeline.none"):V.$t("timeline.noSpineAnimation")),1),(Q(!0),te(_e,null,Mt(((ye=I.value)==null?void 0:ye.animations)||[],he=>(Q(),te("option",{key:he.name,value:he.name},F(he.name)+"("+F(he.duration.toFixed(2))+"s) ",9,hQ))),128))],40,dQ)]),w("span",fQ,F(k.value),1)])])),w("div",{class:"tl-viewport",ref_key:"vpRef",ref:n,onWheel:We(ie,["prevent"]),onPointerdown:se},[w("div",pQ,[(Q(!0),te(_e,null,Mt(Y.value,he=>(Q(),te("div",{key:he.f,class:"tl-tickline",style:Yt({left:he.px+"px"})},[w("span",mQ,F(he.f)+"f",1)],4))),128))]),w("div",{class:"tl-playhead",style:Yt({left:U.value+"px"})},null,4),w("div",gQ,[(Q(!0),te(_e,null,Mt(_(e).systems,(he,Be)=>(Q(),te("div",{key:he.id,class:"tl-lane"},[w("span",{class:Me(["lane-ico",{"sub-lane-ico":R(he)}]),style:Yt({left:X(he)+"px"})},"●",6),w("div",{class:Me(["lane-bar",{"sub-emitter-bar":R(he)}]),style:Yt({left:z(he)+"px",width:Z(he)+"px"}),onPointerdown:We(Ae=>H(Ae,he),["stop"])},[w("span",bQ,F(he.config.name||V.$t("timeline.systemName",{index:Be+1})),1),w("span",{class:Me(["bar-life",{"loop-life":!R(he)&&ve(he)}]),style:Yt({width:ce(he)+"px"})},null,6),!R(he)&&ve(he)?(Q(),te(_e,{key:0},[we(he)?(Q(),te("span",{key:0,class:"bar-loop-transition bar-loop-start",style:Yt({width:we(he)+"px"})},null,4)):xe("",!0),w("span",{class:"bar-emission bar-loop",style:Yt({left:we(he)+"px",width:ae(he)+"px"})},[w("span",{class:"bar-handle",title:V.$t("timeline.dragLoopDuration"),onPointerdown:We(Ae=>G(Ae,he),["stop"])},null,40,yQ)],4),re(he)?(Q(),te("span",{key:1,class:"bar-loop-transition bar-loop-end",style:Yt({left:we(he)+ae(he)+"px",width:re(he)+"px"})},null,4)):xe("",!0)],64)):!R(he)&&he.config.mode==="stream"?(Q(),te("span",{key:1,class:"bar-emission",style:Yt({width:ae(he)+"px"})},[w("span",{class:"bar-handle",title:V.$t("timeline.dragEmissionDuration"),onPointerdown:We(Ae=>G(Ae,he),["stop"])},null,40,xQ)],4)):xe("",!0)],46,vQ)]))),128)),(Q(!0),te(_e,null,Mt(P.value,he=>(Q(),te("div",{key:`spine-${he.id}`,class:"tl-lane spine-lane"},[W[19]||(W[19]=w("span",{class:"lane-ico spine-ico"},"◆",-1)),w("div",{class:"spine-bar",style:Yt({left:q(he)+"px",width:J(he)+"px"}),title:V.$t("timeline.dragSpineStart"),onPointerdown:We(Be=>N(Be,he),["stop"])},[w("span",SQ,F(he.name)+" · "+F(he.selectedAnimation),1)],44,wQ)]))),128)),!_(e).systems.length&&!P.value.length?(Q(),te("div",CQ,F(V.$t("timeline.noAnimationData")),1)):xe("",!0)])],544)])}}}),TQ=dn(AQ,[["__scopeId","data-v-d8a5c3cb"]]),EQ={class:"transfer-heading"},_Q={key:0},MQ={class:"transfer-detail"},PQ=Zt({__name:"TransferProgressOverlay",setup(i){const e=Re(null);return Vt(()=>hn.visible,async t=>{var n;t&&(await tl(),(n=e.value)==null||n.focus({preventScroll:!0}))},{flush:"post"}),(t,n)=>(Q(),kt(NM,{name:"transfer-fade"},{default:Ju(()=>[_(hn).visible?(Q(),te("div",{key:0,ref_key:"overlayElement",ref:e,class:"transfer-overlay",role:"dialog","aria-modal":"true","aria-live":"polite",tabindex:"-1",onPointerdown:n[0]||(n[0]=We(()=>{},["stop","prevent"])),onPointerup:n[1]||(n[1]=We(()=>{},["stop","prevent"])),onClick:n[2]||(n[2]=We(()=>{},["stop","prevent"])),onDblclick:n[3]||(n[3]=We(()=>{},["stop","prevent"])),onContextmenu:n[4]||(n[4]=We(()=>{},["stop","prevent"])),onWheel:n[5]||(n[5]=We(()=>{},["stop","prevent"])),onKeydown:n[6]||(n[6]=We(()=>{},["stop","prevent"]))},[w("div",{class:Me(["transfer-dialog",{failed:_(hn).failed}])},[w("div",EQ,[w("span",null,F(_(hn).title),1),_(hn).indeterminate?xe("",!0):(Q(),te("strong",_Q,F(Math.round(_(hn).progress))+"%",1))]),w("div",{class:Me(["transfer-track",{indeterminate:_(hn).indeterminate}])},[w("div",{class:"transfer-bar",style:Yt(_(hn).indeterminate?void 0:{width:`${_(hn).progress}%`})},null,4)],2),w("div",MQ,F(_(hn).detail),1)],2)],544)):xe("",!0)]),_:1}))}}),kQ=dn(PQ,[["__scopeId","data-v-592b922e"]]),IQ=["inert","aria-hidden"],RQ={class:"right"},FQ=["aria-label"],LQ=["disabled","aria-selected","title","onClick"],DQ={class:"floating-section-index"},OQ={class:"floating-section-label"},NQ=["aria-expanded","title"],$Q=["title"],t1="SpineParticle.TimelineHeight.v1",BQ=Zt({__name:"App",setup(i){const e=Zo();v3(e);const{activeSection:t,activateSection:n,canUseSection:s}=IY(),r=Fe(()=>!e.settings.floatingMenuEnabled||t.value!==null),o=Re(360);function a(){try{const T=Number(localStorage.getItem(t1));return!Number.isFinite(T)||T<=0?180:Math.min(T,window.innerHeight-200)}catch{return 180}}function c(){if(!(l.value<=0))try{localStorage.setItem(t1,String(l.value))}catch{}}const l=Re(a()),d=Re(!1),u=Re(null);let h=l.value,f=84;const p=Fe(()=>u.value==null?void 0:{"--operation-bar-height":`${u.value}px`}),m=Fe(()=>!d.value&&(l.value>0||u.value==null||u.value>0));let g=!1;function v(){if(g)return;if(!m.value){u.value=null,l.value=h,d.value=!1;return}const T=document.querySelector(".top-operation-stack");T&&(f=Math.max(T.getBoundingClientRect().height,T.scrollHeight)),l.value>0&&(h=l.value),c(),u.value=null,d.value=!0}function y(T){if(T.button!==0)return;const E=T.clientY,S=document.querySelector(".top-operation-stack"),C=d.value;!C&&l.value>0&&(h=l.value);const M=C?f:S?Math.max(S.getBoundingClientRect().height,S.scrollHeight):f;f=M;const k=C?-M:l.value+(u.value??M)-M;let P=!1;const I=$=>{const j=E-$.clientY;if(!P&&Math.abs(j)<4)return;P=!0;const B=Math.min(k+j,window.innerHeight-200);B<=0?(d.value=!1,l.value=0,u.value=Math.max(0,M+B)):(d.value=!1,l.value=B,u.value=null),$.preventDefault()},D=()=>{window.removeEventListener("pointermove",I),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),P&&(l.value>0&&c(),g=!0,setTimeout(()=>{g=!1}))};window.addEventListener("pointermove",I),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)}function b(T){T.preventDefault();const E=C=>{const M=e.settings.parameterPanelOnRight?window.innerWidth-C.clientX:C.clientX,k=Math.max(240,Math.min(M,window.innerWidth-200));o.value=k},S=()=>{window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",S)};window.addEventListener("pointermove",E),window.addEventListener("pointerup",S)}function x(T){T.preventDefault();const E=T.clientY,S=l.value,C=k=>{const P=Math.max(80,Math.min(S+(E-k.clientY),window.innerHeight-200));l.value=P},M=()=>{window.removeEventListener("pointermove",C),window.removeEventListener("pointerup",M),c()};window.addEventListener("pointermove",C),window.addEventListener("pointerup",M)}return(T,E)=>(Q(),te(_e,null,[w("div",{class:Me(["layout",{"panel-right":_(e).settings.parameterPanelOnRight}]),inert:_(hn).visible?!0:void 0,"aria-hidden":_(hn).visible?"true":void 0},[pe(w("div",{class:"parameter-panel",style:Yt({width:o.value+"px"})},[Ce(FZ)],4),[[Bt,r.value]]),pe(w("div",{class:"resizer-col",onPointerdown:b},null,544),[[Bt,r.value]]),w("div",RQ,[w("div",{class:Me(["stage-area",{"timeline-collapsed":d.value,"operation-bar-clipped":u.value!==null}]),style:Yt(p.value)},[Ce(EV),_(e).settings.floatingMenuEnabled?(Q(),te("nav",{key:0,class:Me(["floating-section-nav",{"nav-left":!_(e).settings.parameterPanelOnRight}]),role:"tablist","aria-label":T.$t("settings.floatingMenu")},[(Q(!0),te(_e,null,Mt(_(tE),(S,C)=>(Q(),te("button",{key:S.key,type:"button",role:"tab",class:Me(["floating-section-tab",{selected:_(t)===S.key&&_(s)(S.key)}]),disabled:!_(s)(S.key),"aria-selected":_(t)===S.key&&_(s)(S.key),title:_(s)(S.key)?T.$t(S.titleKey):T.$t("settings.floatingMenuParticleOnly"),onClick:M=>_(n)(S.key)},[w("span",DQ,F(C+1),1),w("span",OQ,F(T.$t(S.titleKey)),1)],10,LQ))),128))],10,FQ)):xe("",!0),w("button",{type:"button",class:Me(["timeline-collapse-toggle",{collapsed:!m.value}]),"aria-expanded":m.value,title:d.value?"展开时间轴":"点击收起,拖动调整高度",onPointerdown:y,onClick:v},[...E[0]||(E[0]=[w("svg",{class:"timeline-collapse-shape",viewBox:"0 0 160 34",preserveAspectRatio:"none","aria-hidden":"true"},[w("path",{class:"timeline-collapse-fill",d:"M0 34 C 24 34 35 32 48 25 C 60 19 68 4 80 4 C 92 4 100 19 112 25 C 125 32 136 34 160 34 Z"}),w("path",{class:"timeline-collapse-outline","vector-effect":"non-scaling-stroke",d:"M0 34 C 24 34 35 32 48 25 C 60 19 68 4 80 4 C 92 4 100 19 112 25 C 125 32 136 34 160 34"})],-1),w("span",{class:"timeline-collapse-lines"},[w("i"),w("i"),w("i")],-1)])],42,NQ)],6),pe(w("div",{class:"resizer-row",onPointerdown:x,title:T.$t("app.resizeTimeline")},null,40,$Q),[[Bt,!d.value&&l.value>0]]),pe(w("div",{class:"timeline-area",style:Yt({height:l.value+"px"})},[Ce(TQ)],4),[[Bt,!d.value&&l.value>0]])])],10,IQ),Ce(kQ)],64))}}),UQ=dn(BQ,[["__scopeId","data-v-14e8f36c"]]);uP(UQ).use(pP()).use(pc).mount("#app");export{Ux as $,Is as A,Ou as B,Ot as C,Mn as D,$e as E,ai as F,Ns as G,at as H,Pt as I,jT as J,ti as K,Ei as L,Bi as M,so as N,Th as O,ks as P,oc as Q,Ka as R,Ki as S,cX as T,Ze as U,Lx as V,ts as W,gte as X,oY as Y,bc as Z,jg as _,tt as a,tg as a$,Bx as a0,AT as a1,uv as a2,pte as a3,Ru as a4,Yl as a5,yX as a6,zl as a7,Eh as a8,Jm as a9,cg as aA,dg as aB,Cd as aC,Ur as aD,Bd as aE,Zm as aF,MT as aG,an as aH,wT as aI,ote as aJ,Va as aK,$x as aL,Le as aM,Ge as aN,eg as aO,Ud as aP,RT as aQ,Qm as aR,kT as aS,IT as aT,_h as aU,DT as aV,Vd as aW,$T as aX,FT as aY,OT as aZ,BT as a_,ta as aa,hv as ab,fv as ac,Ox as ad,Pc as ae,kc as af,Mc as ag,ea as ah,lr as ai,lte as aj,_T as ak,bX as al,Za as am,eo as an,gv as ao,zT as ap,gX as aq,vc as ar,ui as as,Nx as at,ute as au,rl as av,lg as aw,ug as ax,hg as ay,fg as az,Wa as b,Sr as b$,Du as b0,LT as b1,uo as b2,NT as b3,pv as b4,lX as b5,XT as b6,YT as b7,mv as b8,Os as b9,UT as bA,vv as bB,Ah as bC,HT as bD,ng as bE,En as bF,oX as bG,uX as bH,dT as bI,cT as bJ,cte as bK,Gt as bL,ol as bM,GT as bN,KT as bO,JT as bP,ZT as bQ,WT as bR,qT as bS,mX as bT,bv as bU,Lt as bV,ag as bW,PT as bX,hT as bY,fT as bZ,pT as b_,aX as ba,ate as bb,rt as bc,ET as bd,TT as be,ST as bf,CT as bg,Yo as bh,Fu as bi,vX as bj,mT as bk,gT as bl,ri as bm,vT as bn,Ja as bo,Nn as bp,uT as bq,Lu as br,bT as bs,yT as bt,xT as bu,Vx as bv,rg as bw,Io as bx,VT as by,sg as bz,qa as c,dte as c0,fX as c1,pX as c2,hX as c3,Qe as d,He as e,hte as f,st as g,Fn as h,lu as i,fi as j,Kt as k,je as l,ss as m,zt as n,$g as o,pn as p,ac as q,Nr as r,Xe as s,zw as t,zg as u,fu as v,ig as w,Po as x,Dx as y,og as z};
|