openvideo 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SharedSystems-BmCMssRs.js → SharedSystems-CXindXRH.js} +1 -1
- package/dist/{WebGLRenderer-C_6TQ1h9.js → WebGLRenderer-CmrnYimx.js} +2 -2
- package/dist/{WebGPURenderer-2Q3ro95g.js → WebGPURenderer-CUlPzoET.js} +2 -2
- package/dist/{browserAll-CqGwXsvh.js → browserAll-DZcFbAZx.js} +2 -2
- package/dist/{index-Btpkt1Jj.js → index-Dmkmv4u7.js} +154 -91
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/{webworkerAll-G2TZLg-n.js → webworkerAll-BxlCSeKM.js} +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -63,7 +63,7 @@ void main() {
|
|
|
63
63
|
<div xmlns="http://www.w3.org/1999/xhtml">${i.outerHTML}</div>
|
|
64
64
|
</foreignObject>
|
|
65
65
|
</svg>
|
|
66
|
-
`.replace(/\t/g,"").replace(/#/g,"%23");return o.src=`data:image/svg+xml;charset=utf-8,${l}`,await new Promise(c=>{o.onload=c}),o}async function sE(r,e,t={}){const i=await rE(r,e,t),s=new OffscreenCanvas(i.width,i.height);return s.getContext("2d")?.drawImage(i,0,0,i.width,i.height),await createImageBitmap(s)}async function nE(r,e){const t={type:e,data:r},i=new ImageDecoder(t);await Promise.all([i.completed,i.tracks.ready]);const s=i.tracks.selectedTrack?.frameCount??1,n=[];for(let o=0;o<s;o+=1)n.push((await i.decode({frameIndex:o})).image);return n}let Dd=class{all=new Map;on(e,t){const i=this.all.get(e);return i?i.push(t):this.all.set(e,[t]),()=>this.off(e,t)}once(e,t){const i=this.on(e,s=>{i(),t(s)});return i}off(e,t){const i=this.all.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):this.all.set(e,[]))}emit(e,t){let i=this.all.get(e);i&&i.slice().forEach(s=>{s(t)}),i=this.all.get("*"),i&&i.slice().forEach(s=>{s(e,t)})}};const oE={x:{label:"X Position",min:-2e3,max:2e3,step:1,default:0},y:{label:"Y Position",min:-2e3,max:2e3,step:1,default:0},width:{label:"Width",min:-1e3,max:1e3,step:1,default:0},height:{label:"Height",min:-1e3,max:1e3,step:1,default:0},scale:{label:"Scale",min:0,max:3,step:.1,default:1},opacity:{label:"Opacity",min:0,max:1,step:.01,default:1},angle:{label:"Rotation",min:-360,max:360,step:1,default:0},blur:{label:"Blur",min:0,max:100,step:1,default:0},brightness:{label:"Brightness",min:0,max:5,step:.1,default:1},mirror:{label:"Mirror",min:0,max:1,step:1,default:0}},to={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>r*(2-r),easeInOutQuad:r=>r<.5?2*r*r:-1+(4-2*r)*r,easeInCubic:r=>r*r*r,easeOutCubic:r=>--r*r*r+1,easeInOutCubic:r=>r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1,easeInSine:r=>1-Math.cos(r*Math.PI/2),easeOutSine:r=>Math.sin(r*Math.PI/2),easeInOutSine:r=>.5*(1-Math.cos(Math.PI*r)),easeInExpo:r=>r===0?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>r===1?1:1-Math.pow(2,-10*r),easeInOutExpo:r=>r===0?0:r===1?1:(r/=.5)<1?.5*Math.pow(2,10*(r-1)):.5*(2-Math.pow(2,-10*--r)),easeInCirc:r=>1-Math.sqrt(1-r*r),easeOutCirc:r=>Math.sqrt(1-(r-1)*(r-1)),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-2)*r)+1)};function Qg(r){return typeof r=="function"?r:typeof r=="string"&&to[r]?to[r]:to.linear}class X{id;type;options;params;frames;constructor(e,t,i="keyframes"){this.id=t.id||`keyframe_${Math.random().toString(36).substr(2,9)}`,this.type=i,this.params=e,this.options={duration:t.duration,delay:t.delay??0,easing:t.easing??"linear",iterCount:t.iterCount??1,id:this.id},Array.isArray(e)?this.frames=e.map(s=>({progress:s.progress,props:s.props||s,easing:s.easing||"linear"})):this.frames=Object.entries(e).filter(([s])=>{if(s==="from"||s==="to")return!0;const n=Number(s.replace("%",""));return!isNaN(n)&&n>=0&&n<=100}).map(([s,n])=>{const o={from:0,to:100}[s]??Number(s.replace("%","")),{easing:a,...l}=n;return{progress:o/100,props:l,easing:a||"linear"}}).sort((s,n)=>s.progress-n.progress),this.frames.length>0&&this.frames[0].progress!==0&&this.frames.unshift({progress:0,props:{},easing:"linear"}),this.frames.length>0&&this.frames[this.frames.length-1].progress!==1&&this.frames.push({progress:1,props:{},easing:"linear"})}getTransform(e){const{duration:t,delay:i,iterCount:s}=this.options,n=e-i;if(n<0)return{};if(s!==1/0&&n>=t){const l=this.interpolateProps(1);return"mirror"in l&&(l.mirror=0),l}const o=s===1/0?t:t/s,a=n%o/o;return this.interpolateProps(a)}interpolateProps(e){const t=this.frames.findIndex(c=>c.progress>=e);if(t===-1)return this.frames[this.frames.length-1].props;if(t===0)return this.frames[0].props;const i=this.frames[t-1],s=this.frames[t],n=(e-i.progress)/(s.progress-i.progress),o=Qg(s.easing)(n),a={},l=new Set([...Object.keys(i.props),...Object.keys(s.props)]);for(const c of l){const h=c,u=h==="scale"||h==="opacity"?1:0,d=i.props[h]??u,f=s.props[h]??u;a[h]=d+(f-d)*o}return a}}class aE{factories=new Map;constructor(){this.register("keyframes",(e,t)=>new X(t,e))}register(e,t){this.factories.set(e,t)}create(e,t,i){const s=this.factories.get(e);if(!s)throw new Error(`Animation "${e}" not found in registry`);return s(t,i)}has(e){return this.factories.has(e)}}const fe=new aE;function di(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function e0(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var vt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Fr={duration:.5,overwrite:!1,delay:0},zd,Je,Ce,Ot=1e8,xe=1/Ot,Gd=Math.PI*2,lE=Gd/4,cE=0,t0=Math.sqrt,hE=Math.cos,uE=Math.sin,qe=function(e){return typeof e=="string"},Re=function(e){return typeof e=="function"},fi=function(e){return typeof e=="number"},Nd=function(e){return typeof e>"u"},ti=function(e){return typeof e=="object"},ft=function(e){return e!==!1},Ld=function(){return typeof window<"u"},io=function(e){return Re(e)||qe(e)},i0=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},rt=Array.isArray,dE=/random\([^)]+\)/g,fE=/,\s*/g,r0=/(?:-?\.?\d|\.)+/gi,s0=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Ur=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Hd=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,n0=/[+-]=-?[.\d]+/,pE=/[^,'"\[\]\s]+/gi,mE=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ee,ii,Wd,Vd,bt={},ro={},o0,a0=function(e){return(ro=Or(e,bt))&>},$d=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Ss=function(e,t){return!t&&console.warn(e)},l0=function(e,t){return e&&(bt[e]=t)&&ro&&(ro[e]=t)||bt},Cs=function(){return 0},gE={suppressEvents:!0,isStart:!0,kill:!1},so={suppressEvents:!0,kill:!1},_E={suppressEvents:!0},Xd={},Ui=[],Yd={},c0,wt={},qd={},h0=30,no=[],Kd="",jd=function(e){var t=e[0],i,s;if(ti(t)||Re(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(s=no.length;s--&&!no[s].targetTest(t););i=no[s]}for(s=e.length;s--;)e[s]&&(e[s]._gsap||(e[s]._gsap=new G0(e[s],i)))||e.splice(s,1);return e},rr=function(e){return e._gsap||jd(zt(e))[0]._gsap},u0=function(e,t,i){return(i=e[t])&&Re(i)?e[t]():Nd(i)&&e.getAttribute&&e.getAttribute(t)||i},pt=function(e,t){return(e=e.split(",")).forEach(t)||e},Oe=function(e){return Math.round(e*1e5)/1e5||0},Ae=function(e){return Math.round(e*1e7)/1e7||0},Br=function(e,t){var i=t.charAt(0),s=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+s:i==="-"?e-s:i==="*"?e*s:e/s},xE=function(e,t){for(var i=t.length,s=0;e.indexOf(t[s])<0&&++s<i;);return s<i},oo=function(){var e=Ui.length,t=Ui.slice(0),i,s;for(Yd={},Ui.length=0,i=0;i<e;i++)s=t[i],s&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},Zd=function(e){return!!(e._initted||e._startAt||e.add)},d0=function(e,t,i,s){Ui.length&&!Je&&oo(),e.render(t,i,!!(Je&&t<0&&Zd(e))),Ui.length&&!Je&&oo()},f0=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(pE).length<2?t:qe(e)?e.trim():e},p0=function(e){return e},Tt=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},yE=function(e){return function(t,i){for(var s in i)s in t||s==="duration"&&e||s==="ease"||(t[s]=i[s])}},Or=function(e,t){for(var i in t)e[i]=t[i];return e},m0=function r(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=ti(t[i])?r(e[i]||(e[i]={}),t[i]):t[i]);return e},ao=function(e,t){var i={},s;for(s in e)s in t||(i[s]=e[s]);return i},Es=function(e){var t=e.parent||Ee,i=e.keyframes?yE(rt(e.keyframes)):Tt;if(ft(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},vE=function(e,t){for(var i=e.length,s=i===t.length;s&&i--&&e[i]===t[i];);return i<0},g0=function(e,t,i,s,n){var o=e[s],a;if(n)for(a=t[n];o&&o[n]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[s]=t,t._prev=o,t.parent=t._dp=e,t},lo=function(e,t,i,s){i===void 0&&(i="_first"),s===void 0&&(s="_last");var n=t._prev,o=t._next;n?n._next=o:e[i]===t&&(e[i]=o),o?o._prev=n:e[s]===t&&(e[s]=n),t._next=t._prev=t.parent=null},Bi=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},sr=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},bE=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Jd=function(e,t,i,s){return e._startAt&&(Je?e._startAt.revert(so):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,s))},wE=function r(e){return!e||e._ts&&r(e.parent)},_0=function(e){return e._repeat?Dr(e._tTime,e=e.duration()+e._rDelay)*e:0},Dr=function(e,t){var i=Math.floor(e=Ae(e/t));return e&&i===e?i-1:i},co=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},ho=function(e){return e._end=Ae(e._start+(e._tDur/Math.abs(e._ts||e._rts||xe)||0))},uo=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Ae(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),ho(e),i._dirty||sr(i,e)),e},x0=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=co(e.rawTime(),t),(!t._dur||Ps(0,t.totalDuration(),i)-t._tTime>xe)&&t.render(i,!0)),sr(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-xe}},ri=function(e,t,i,s){return t.parent&&Bi(t),t._start=Ae((fi(i)?i:i||e!==Ee?Dt(e,i,t):e._time)+t._delay),t._end=Ae(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),g0(e,t,"_first","_last",e._sort?"_start":0),Qd(t)||(e._recent=t),s||x0(e,t),e._ts<0&&uo(e,e._tTime),e},y0=function(e,t){return(bt.ScrollTrigger||$d("scrollTrigger",t))&&bt.ScrollTrigger.create(t,e)},v0=function(e,t,i,s,n){if(cf(e,t,n),!e._initted)return 1;if(!i&&e._pt&&!Je&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&c0!==Ct.frame)return Ui.push(e),e._lazy=[n,s],1},TE=function r(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||r(t))},Qd=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},SE=function(e,t,i,s){var n=e.ratio,o=t<0||!t&&(!e._start&&TE(e)&&!(!e._initted&&Qd(e))||(e._ts<0||e._dp._ts<0)&&!Qd(e))?0:1,a=e._rDelay,l=0,c,h,u;if(a&&e._repeat&&(l=Ps(0,e._tDur,t),h=Dr(l,a),e._yoyo&&h&1&&(o=1-o),h!==Dr(e._tTime,a)&&(n=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==n||Je||s||e._zTime===xe||!t&&e._zTime){if(!e._initted&&v0(e,t,s,i,l))return;for(u=e._zTime,e._zTime=t||(i?xe:0),i||(i=t&&!u),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,c=e._pt;c;)c.r(o,c.d),c=c._next;t<0&&Jd(e,t,i,!0),e._onUpdate&&!i&&St(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&St(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Bi(e,1),!i&&!Je&&(St(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},CE=function(e,t,i){var s;if(i>t)for(s=e._first;s&&s._start<=i;){if(s.data==="isPause"&&s._start>t)return s;s=s._next}else for(s=e._last;s&&s._start>=i;){if(s.data==="isPause"&&s._start<t)return s;s=s._prev}},zr=function(e,t,i,s){var n=e._repeat,o=Ae(t)||0,a=e._tTime/e._tDur;return a&&!s&&(e._time*=o/e._dur),e._dur=o,e._tDur=n?n<0?1e10:Ae(o*(n+1)+e._rDelay*n):o,a>0&&!s&&uo(e,e._tTime=e._tDur*a),e.parent&&ho(e),i||sr(e.parent,e),e},b0=function(e){return e instanceof ct?sr(e):zr(e,e._dur)},EE={_start:0,endTime:Cs,totalDuration:Cs},Dt=function r(e,t,i){var s=e.labels,n=e._recent||EE,o=e.duration()>=Ot?n.endTime(!1):e._dur,a,l,c;return qe(t)&&(isNaN(t)||t in s)?(l=t.charAt(0),c=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?n._start:n.endTime(n._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(a<0?n:i).totalDuration()/100:1)):a<0?(t in s||(s[t]=o),s[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),c&&i&&(l=l/100*(rt(i)?i[0]:i).totalDuration()),a>1?r(e,t.substr(0,a-1),i)+l:o+l)):t==null?o:+t},As=function(e,t,i){var s=fi(t[1]),n=(s?2:1)+(e<2?0:1),o=t[n],a,l;if(s&&(o.duration=t[1]),o.parent=i,e){for(a=o,l=i;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=ft(l.vars.inherit)&&l.parent;o.immediateRender=ft(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[n-1]}return new Le(t[0],o,t[n+1])},Oi=function(e,t){return e||e===0?t(e):t},Ps=function(e,t,i){return i<e?e:i>t?t:i},st=function(e,t){return!qe(e)||!(t=mE.exec(e))?"":t[1]},AE=function(e,t,i){return Oi(i,function(s){return Ps(e,t,s)})},ef=[].slice,w0=function(e,t){return e&&ti(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&ti(e[0]))&&!e.nodeType&&e!==ii},PE=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(s){var n;return qe(s)&&!t||w0(s,1)?(n=i).push.apply(n,zt(s)):i.push(s)})||i},zt=function(e,t,i){return Ce&&!t&&Ce.selector?Ce.selector(e):qe(e)&&!i&&(Wd||!Nr())?ef.call((t||Vd).querySelectorAll(e),0):rt(e)?PE(e,i):w0(e)?ef.call(e,0):e?[e]:[]},tf=function(e){return e=zt(e)[0]||Ss("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return zt(t,i.querySelectorAll?i:i===e?Ss("Invalid scope")||Vd.createElement("div"):e)}},T0=function(e){return e.sort(function(){return .5-Math.random()})},S0=function(e){if(Re(e))return e;var t=ti(e)?e:{each:e},i=nr(t.ease),s=t.from||0,n=parseFloat(t.base)||0,o={},a=s>0&&s<1,l=isNaN(s)||a,c=t.axis,h=s,u=s;return qe(s)?h=u={center:.5,edges:.5,end:1}[s]||0:!a&&l&&(h=s[0],u=s[1]),function(d,f,m){var p=(m||t).length,g=o[p],_,x,y,v,b,T,w,S,C;if(!g){if(C=t.grid==="auto"?0:(t.grid||[1,Ot])[1],!C){for(w=-Ot;w<(w=m[C++].getBoundingClientRect().left)&&C<p;);C<p&&C--}for(g=o[p]=[],_=l?Math.min(C,p)*h-.5:s%C,x=C===Ot?0:l?p*u/C-.5:s/C|0,w=0,S=Ot,T=0;T<p;T++)y=T%C-_,v=x-(T/C|0),g[T]=b=c?Math.abs(c==="y"?v:y):t0(y*y+v*v),b>w&&(w=b),b<S&&(S=b);s==="random"&&T0(g),g.max=w-S,g.min=S,g.v=p=(parseFloat(t.amount)||parseFloat(t.each)*(C>p?p-1:c?c==="y"?p/C:C:Math.max(C,p/C))||0)*(s==="edges"?-1:1),g.b=p<0?n-p:n,g.u=st(t.amount||t.each)||0,i=i&&p<0?O0(i):i}return p=(g[d]-g.min)/g.max||0,Ae(g.b+(i?i(p):p)*g.v)+g.u}},rf=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var s=Ae(Math.round(parseFloat(i)/e)*e*t);return(s-s%1)/t+(fi(i)?0:st(i))}},C0=function(e,t){var i=rt(e),s,n;return!i&&ti(e)&&(s=i=e.radius||Ot,e.values?(e=zt(e.values),(n=!fi(e[0]))&&(s*=s)):e=rf(e.increment)),Oi(t,i?Re(e)?function(o){return n=e(o),Math.abs(n-o)<=s?n:o}:function(o){for(var a=parseFloat(n?o.x:o),l=parseFloat(n?o.y:0),c=Ot,h=0,u=e.length,d,f;u--;)n?(d=e[u].x-a,f=e[u].y-l,d=d*d+f*f):d=Math.abs(e[u]-a),d<c&&(c=d,h=u);return h=!s||c<=s?e[h]:o,n||h===o||fi(o)?h:h+st(o)}:rf(e))},E0=function(e,t,i,s){return Oi(rt(e)?!t:i===!0?!!(i=0):!s,function(){return rt(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(s=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*s)/s})},IE=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(s){return t.reduce(function(n,o){return o(n)},s)}},ME=function(e,t){return function(i){return e(parseFloat(i))+(t||st(i))}},RE=function(e,t,i){return P0(e,t,0,1,i)},A0=function(e,t,i){return Oi(i,function(s){return e[~~t(s)]})},kE=function r(e,t,i){var s=t-e;return rt(e)?A0(e,r(0,e.length),t):Oi(i,function(n){return(s+(n-e)%s)%s+e})},FE=function r(e,t,i){var s=t-e,n=s*2;return rt(e)?A0(e,r(0,e.length-1),t):Oi(i,function(o){return o=(n+(o-e)%n)%n||0,e+(o>s?n-o:o)})},Is=function(e){return e.replace(dE,function(t){var i=t.indexOf("[")+1,s=t.substring(i||7,i?t.indexOf("]"):t.length-1).split(fE);return E0(i?s:+s[0],i?0:+s[1],+s[2]||1e-5)})},P0=function(e,t,i,s,n){var o=t-e,a=s-i;return Oi(n,function(l){return i+((l-e)/o*a||0)})},UE=function r(e,t,i,s){var n=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!n){var o=qe(e),a={},l,c,h,u,d;if(i===!0&&(s=1)&&(i=null),o)e={p:e},t={p:t};else if(rt(e)&&!rt(t)){for(h=[],u=e.length,d=u-2,c=1;c<u;c++)h.push(r(e[c-1],e[c]));u--,n=function(m){m*=u;var p=Math.min(d,~~m);return h[p](m-p)},i=t}else s||(e=Or(rt(e)?[]:{},e));if(!h){for(l in t)af.call(a,e,l,"get",t[l]);n=function(m){return df(m,a)||(o?e.p:e)}}}return Oi(i,n)},I0=function(e,t,i){var s=e.labels,n=Ot,o,a,l;for(o in s)a=s[o]-t,a<0==!!i&&a&&n>(a=Math.abs(a))&&(l=o,n=a);return l},St=function(e,t,i){var s=e.vars,n=s[t],o=Ce,a=e._ctx,l,c,h;if(n)return l=s[t+"Params"],c=s.callbackScope||e,i&&Ui.length&&oo(),a&&(Ce=a),h=l?n.apply(c,l):n.call(c),Ce=o,h},Ms=function(e){return Bi(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Je),e.progress()<1&&St(e,"onInterrupt"),e},Gr,M0=[],R0=function(e){if(e)if(e=!e.name&&e.default||e,Ld()||e.headless){var t=e.name,i=Re(e),s=t&&!i&&e.init?function(){this._props=[]}:e,n={init:Cs,render:df,add:af,kill:jE,modifier:KE,rawVars:0},o={targetTest:0,get:0,getSetter:uf,aliases:{},register:0};if(Nr(),e!==s){if(wt[t])return;Tt(s,Tt(ao(e,n),o)),Or(s.prototype,Or(n,ao(e,o))),wt[s.prop=t]=s,e.targetTest&&(no.push(s),Xd[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}l0(t,s),e.register&&e.register(gt,s,mt)}else M0.push(e)},ye=255,Rs={aqua:[0,ye,ye],lime:[0,ye,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ye],navy:[0,0,128],white:[ye,ye,ye],olive:[128,128,0],yellow:[ye,ye,0],orange:[ye,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ye,0,0],pink:[ye,192,203],cyan:[0,ye,ye],transparent:[ye,ye,ye,0]},sf=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*ye+.5|0},k0=function(e,t,i){var s=e?fi(e)?[e>>16,e>>8&ye,e&ye]:0:Rs.black,n,o,a,l,c,h,u,d,f,m;if(!s){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Rs[e])s=Rs[e];else if(e.charAt(0)==="#"){if(e.length<6&&(n=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+n+n+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return s=parseInt(e.substr(1,6),16),[s>>16,s>>8&ye,s&ye,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),s=[e>>16,e>>8&ye,e&ye]}else if(e.substr(0,3)==="hsl"){if(s=m=e.match(r0),!t)l=+s[0]%360/360,c=+s[1]/100,h=+s[2]/100,o=h<=.5?h*(c+1):h+c-h*c,n=h*2-o,s.length>3&&(s[3]*=1),s[0]=sf(l+1/3,n,o),s[1]=sf(l,n,o),s[2]=sf(l-1/3,n,o);else if(~e.indexOf("="))return s=e.match(s0),i&&s.length<4&&(s[3]=1),s}else s=e.match(r0)||Rs.transparent;s=s.map(Number)}return t&&!m&&(n=s[0]/ye,o=s[1]/ye,a=s[2]/ye,u=Math.max(n,o,a),d=Math.min(n,o,a),h=(u+d)/2,u===d?l=c=0:(f=u-d,c=h>.5?f/(2-u-d):f/(u+d),l=u===n?(o-a)/f+(o<a?6:0):u===o?(a-n)/f+2:(n-o)/f+4,l*=60),s[0]=~~(l+.5),s[1]=~~(c*100+.5),s[2]=~~(h*100+.5)),i&&s.length<4&&(s[3]=1),s},F0=function(e){var t=[],i=[],s=-1;return e.split(Di).forEach(function(n){var o=n.match(Ur)||[];t.push.apply(t,o),i.push(s+=o.length+1)}),t.c=i,t},U0=function(e,t,i){var s="",n=(e+s).match(Di),o=t?"hsla(":"rgba(",a=0,l,c,h,u;if(!n)return e;if(n=n.map(function(d){return(d=k0(d,t,1))&&o+(t?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),i&&(h=F0(e),l=i.c,l.join(s)!==h.c.join(s)))for(c=e.replace(Di,"1").split(Ur),u=c.length-1;a<u;a++)s+=c[a]+(~l.indexOf(a)?n.shift()||o+"0,0,0,0)":(h.length?h:n.length?n:i).shift());if(!c)for(c=e.split(Di),u=c.length-1;a<u;a++)s+=c[a]+n[a];return s+c[u]},Di=(function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Rs)r+="|"+e+"\\b";return new RegExp(r+")","gi")})(),BE=/hsl[a]?\(/,B0=function(e){var t=e.join(" "),i;if(Di.lastIndex=0,Di.test(t))return i=BE.test(t),e[1]=U0(e[1],i),e[0]=U0(e[0],i,F0(e[1])),!0},ks,Ct=(function(){var r=Date.now,e=500,t=33,i=r(),s=i,n=1e3/240,o=n,a=[],l,c,h,u,d,f,m=function p(g){var _=r()-s,x=g===!0,y,v,b,T;if((_>e||_<0)&&(i+=_-t),s+=_,b=s-i,y=b-o,(y>0||x)&&(T=++u.frame,d=b-u.time*1e3,u.time=b=b/1e3,o+=y+(y>=n?4:n-y),v=1),x||(l=c(p)),v)for(f=0;f<a.length;f++)a[f](b,d,T,g)};return u={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(g){return d/(1e3/(g||60))},wake:function(){o0&&(!Wd&&Ld()&&(ii=Wd=window,Vd=ii.document||{},bt.gsap=gt,(ii.gsapVersions||(ii.gsapVersions=[])).push(gt.version),a0(ro||ii.GreenSockGlobals||!ii.gsap&&ii||{}),M0.forEach(R0)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&u.sleep(),c=h||function(g){return setTimeout(g,o-u.time*1e3+1|0)},ks=1,m(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),ks=0,c=Cs},lagSmoothing:function(g,_){e=g||1/0,t=Math.min(_||33,e)},fps:function(g){n=1e3/(g||240),o=u.time*1e3+n},add:function(g,_,x){var y=_?function(v,b,T,w){g(v,b,T,w),u.remove(y)}:g;return u.remove(g),a[x?"unshift":"push"](y),Nr(),y},remove:function(g,_){~(_=a.indexOf(g))&&a.splice(_,1)&&f>=_&&f--},_listeners:a},u})(),Nr=function(){return!ks&&Ct.wake()},oe={},OE=/^[\d.\-M][\d.\-,\s]/,DE=/["']/g,zE=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),s=i[0],n=1,o=i.length,a,l,c;n<o;n++)l=i[n],a=n!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),t[s]=isNaN(c)?c.replace(DE,"").trim():+c,s=l.substr(a+1).trim();return t},GE=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),s=e.indexOf("(",t);return e.substring(t,~s&&s<i?e.indexOf(")",i+1):i)},NE=function(e){var t=(e+"").split("("),i=oe[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[zE(t[1])]:GE(e).split(",").map(f0)):oe._CE&&OE.test(e)?oe._CE("",e):i},O0=function(e){return function(t){return 1-e(1-t)}},D0=function r(e,t){for(var i=e._first,s;i;)i instanceof ct?r(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?r(i.timeline,t):(s=i._ease,i._ease=i._yEase,i._yEase=s,i._yoyo=t)),i=i._next},nr=function(e,t){return e&&(Re(e)?e:oe[e]||NE(e))||t},or=function(e,t,i,s){i===void 0&&(i=function(l){return 1-t(1-l)}),s===void 0&&(s=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var n={easeIn:t,easeOut:i,easeInOut:s},o;return pt(e,function(a){oe[a]=bt[a]=n,oe[o=a.toLowerCase()]=i;for(var l in n)oe[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=oe[a+"."+l]=n[l]}),n},z0=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},nf=function r(e,t,i){var s=t>=1?t:1,n=(i||(e?.3:.45))/(t<1?t:1),o=n/Gd*(Math.asin(1/s)||0),a=function(h){return h===1?1:s*Math.pow(2,-10*h)*uE((h-o)*n)+1},l=e==="out"?a:e==="in"?function(c){return 1-a(1-c)}:z0(a);return n=Gd/n,l.config=function(c,h){return r(e,c,h)},l},of=function r(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},s=e==="out"?i:e==="in"?function(n){return 1-i(1-n)}:z0(i);return s.config=function(n){return r(e,n)},s};pt("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,e){var t=e<5?e+1:e;or(r+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})}),oe.Linear.easeNone=oe.none=oe.Linear.easeIn,or("Elastic",nf("in"),nf("out"),nf()),(function(r,e){var t=1/e,i=2*t,s=2.5*t,n=function(a){return a<t?r*a*a:a<i?r*Math.pow(a-1.5/e,2)+.75:a<s?r*(a-=2.25/e)*a+.9375:r*Math.pow(a-2.625/e,2)+.984375};or("Bounce",function(o){return 1-n(1-o)},n)})(7.5625,2.75),or("Expo",function(r){return Math.pow(2,10*(r-1))*r+r*r*r*r*r*r*(1-r)}),or("Circ",function(r){return-(t0(1-r*r)-1)}),or("Sine",function(r){return r===1?1:-hE(r*lE)+1}),or("Back",of("in"),of("out"),of()),oe.SteppedEase=oe.steps=bt.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,s=e+(t?0:1),n=t?1:0,o=1-xe;return function(a){return((s*Ps(0,o,a)|0)+n)*i}}},Fr.ease=oe["quad.out"],pt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return Kd+=r+","+r+"Params,"});var G0=function(e,t){this.id=cE++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:u0,this.set=t?t.getSetter:uf},Fs=(function(){function r(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,zr(this,+t.duration,1,1),this.data=t.data,Ce&&(this._ctx=Ce,Ce.data.push(this)),ks||Ct.wake()}var e=r.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,zr(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,s){if(Nr(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(uo(this,i),!n._dp||n.parent||x0(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&ri(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!s||this._initted&&Math.abs(this._zTime)===xe||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),d0(this,i,s)),this},e.time=function(i,s){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+_0(this))%(this._dur+this._rDelay)||(i?this._dur:0),s):this._time},e.totalProgress=function(i,s){return arguments.length?this.totalTime(this.totalDuration()*i,s):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,s){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+_0(this),s):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,s){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*n,s):this._repeat?Dr(this._tTime,n)+1:1},e.timeScale=function(i,s){if(!arguments.length)return this._rts===-xe?0:this._rts;if(this._rts===i)return this;var n=this.parent&&this._ts?co(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-xe?0:this._rts,this.totalTime(Ps(-Math.abs(this._delay),this.totalDuration(),n),s!==!1),ho(this),bE(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Nr(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==xe&&(this._tTime-=xe)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=Ae(i);var s=this.parent||this._dp;return s&&(s._sort||!this.parent)&&ri(s,this,this._start-this._delay),this}return this._start},e.endTime=function(i){return this._start+(ft(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var s=this.parent||this._dp;return s?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?co(s.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=_E);var s=Je;return Je=i,Zd(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),Je=s,this},e.globalTime=function(i){for(var s=this,n=arguments.length?i:s.rawTime();s;)n=s._start+n/(Math.abs(s._ts)||1),s=s._dp;return!this.parent&&this._sat?this._sat.globalTime(i):n},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,b0(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var s=this._time;return this._rDelay=i,b0(this),s?this.time(s):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,s){return this.totalTime(Dt(this,i),ft(s))},e.restart=function(i,s){return this.play().totalTime(i?-this._delay:0,ft(s)),this._dur||(this._zTime=-xe),this},e.play=function(i,s){return i!=null&&this.seek(i,s),this.reversed(!1).paused(!1)},e.reverse=function(i,s){return i!=null&&this.seek(i||this.totalDuration(),s),this.reversed(!0).paused(!1)},e.pause=function(i,s){return i!=null&&this.seek(i,s),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-xe:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-xe,this},e.isActive=function(){var i=this.parent||this._dp,s=this._start,n;return!!(!i||this._ts&&this._initted&&i.isActive()&&(n=i.rawTime(!0))>=s&&n<this.endTime(!0)-xe)},e.eventCallback=function(i,s,n){var o=this.vars;return arguments.length>1?(s?(o[i]=s,n&&(o[i+"Params"]=n),i==="onUpdate"&&(this._onUpdate=s)):delete o[i],this):o[i]},e.then=function(i){var s=this,n=s._prom;return new Promise(function(o){var a=Re(i)?i:p0,l=function(){var h=s.then;s.then=null,n&&n(),Re(a)&&(a=a(s))&&(a.then||a===s)&&(s.then=h),o(a),s.then=h};s._initted&&s.totalProgress()===1&&s._ts>=0||!s._tTime&&s._ts<0?l():s._prom=l})},e.kill=function(){Ms(this)},r})();Tt(Fs.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-xe,_prom:0,_ps:!1,_rts:1});var ct=(function(r){e0(e,r);function e(i,s){var n;return i===void 0&&(i={}),n=r.call(this,i)||this,n.labels={},n.smoothChildTiming=!!i.smoothChildTiming,n.autoRemoveChildren=!!i.autoRemoveChildren,n._sort=ft(i.sortChildren),Ee&&ri(i.parent||Ee,di(n),s),i.reversed&&n.reverse(),i.paused&&n.paused(!0),i.scrollTrigger&&y0(di(n),i.scrollTrigger),n}var t=e.prototype;return t.to=function(s,n,o){return As(0,arguments,this),this},t.from=function(s,n,o){return As(1,arguments,this),this},t.fromTo=function(s,n,o,a){return As(2,arguments,this),this},t.set=function(s,n,o){return n.duration=0,n.parent=this,Es(n).repeatDelay||(n.repeat=0),n.immediateRender=!!n.immediateRender,new Le(s,n,Dt(this,o),1),this},t.call=function(s,n,o){return ri(this,Le.delayedCall(0,s,n),o)},t.staggerTo=function(s,n,o,a,l,c,h){return o.duration=n,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=h,o.parent=this,new Le(s,o,Dt(this,l)),this},t.staggerFrom=function(s,n,o,a,l,c,h){return o.runBackwards=1,Es(o).immediateRender=ft(o.immediateRender),this.staggerTo(s,n,o,a,l,c,h)},t.staggerFromTo=function(s,n,o,a,l,c,h,u){return a.startAt=o,Es(a).immediateRender=ft(a.immediateRender),this.staggerTo(s,n,a,l,c,h,u)},t.render=function(s,n,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=s<=0?0:Ae(s),u=this._zTime<0!=s<0&&(this._initted||!c),d,f,m,p,g,_,x,y,v,b,T,w;if(this!==Ee&&h>l&&s>=0&&(h=l),h!==this._tTime||o||u){if(a!==this._time&&c&&(h+=this._time-a,s+=this._time-a),d=h,v=this._start,y=this._ts,_=!y,u&&(c||(a=this._zTime),(s||!n)&&(this._zTime=s)),this._repeat){if(T=this._yoyo,g=c+this._rDelay,this._repeat<-1&&s<0)return this.totalTime(g*100+s,n,o);if(d=Ae(h%g),h===l?(p=this._repeat,d=c):(b=Ae(h/g),p=~~b,p&&p===b&&(d=c,p--),d>c&&(d=c)),b=Dr(this._tTime,g),!a&&this._tTime&&b!==p&&this._tTime-b*g-this._dur<=0&&(b=p),T&&p&1&&(d=c-d,w=1),p!==b&&!this._lock){var S=T&&b&1,C=S===(T&&p&1);if(p<b&&(S=!S),a=S?0:h%c?c:h,this._lock=1,this.render(a||(w?0:Ae(p*g)),n,!c)._lock=0,this._tTime=h,!n&&this.parent&&St(this,"onRepeat"),this.vars.repeatRefresh&&!w&&(this.invalidate()._lock=1,b=p),a&&a!==this._time||_!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,C&&(this._lock=2,a=S?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!w&&this.invalidate()),this._lock=0,!this._ts&&!_)return this;D0(this,w)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(x=CE(this,Ae(a),Ae(d)),x&&(h-=d-(d=x._start))),this._tTime=h,this._time=d,this._act=!y,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=s,a=0),!a&&h&&c&&!n&&!b&&(St(this,"onStart"),this._tTime!==h))return this;if(d>=a&&s>=0)for(f=this._first;f;){if(m=f._next,(f._act||d>=f._start)&&f._ts&&x!==f){if(f.parent!==this)return this.render(s,n,o);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,n,o),d!==this._time||!this._ts&&!_){x=0,m&&(h+=this._zTime=-xe);break}}f=m}else{f=this._last;for(var E=s<0?s:d;f;){if(m=f._prev,(f._act||E<=f._end)&&f._ts&&x!==f){if(f.parent!==this)return this.render(s,n,o);if(f.render(f._ts>0?(E-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(E-f._start)*f._ts,n,o||Je&&Zd(f)),d!==this._time||!this._ts&&!_){x=0,m&&(h+=this._zTime=E?-xe:xe);break}}f=m}}if(x&&!n&&(this.pause(),x.render(d>=a?0:-xe)._zTime=d>=a?1:-1,this._ts))return this._start=v,ho(this),this.render(s,n,o);this._onUpdate&&!n&&St(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&a)&&(v===this._start||Math.abs(y)!==Math.abs(this._ts))&&(this._lock||((s||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&Bi(this,1),!n&&!(s<0&&!a)&&(h||a||!l)&&(St(this,h===l&&s>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(s,n){var o=this;if(fi(n)||(n=Dt(this,n,s)),!(s instanceof Fs)){if(rt(s))return s.forEach(function(a){return o.add(a,n)}),this;if(qe(s))return this.addLabel(s,n);if(Re(s))s=Le.delayedCall(0,s);else return this}return this!==s?ri(this,s,n):this},t.getChildren=function(s,n,o,a){s===void 0&&(s=!0),n===void 0&&(n=!0),o===void 0&&(o=!0),a===void 0&&(a=-Ot);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Le?n&&l.push(c):(o&&l.push(c),s&&l.push.apply(l,c.getChildren(!0,n,o)))),c=c._next;return l},t.getById=function(s){for(var n=this.getChildren(1,1,1),o=n.length;o--;)if(n[o].vars.id===s)return n[o]},t.remove=function(s){return qe(s)?this.removeLabel(s):Re(s)?this.killTweensOf(s):(s.parent===this&&lo(this,s),s===this._recent&&(this._recent=this._last),sr(this))},t.totalTime=function(s,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ae(Ct.time-(this._ts>0?s/this._ts:(this.totalDuration()-s)/-this._ts))),r.prototype.totalTime.call(this,s,n),this._forcing=0,this):this._tTime},t.addLabel=function(s,n){return this.labels[s]=Dt(this,n),this},t.removeLabel=function(s){return delete this.labels[s],this},t.addPause=function(s,n,o){var a=Le.delayedCall(0,n||Cs,o);return a.data="isPause",this._hasPause=1,ri(this,a,Dt(this,s))},t.removePause=function(s){var n=this._first;for(s=Dt(this,s);n;)n._start===s&&n.data==="isPause"&&Bi(n),n=n._next},t.killTweensOf=function(s,n,o){for(var a=this.getTweensOf(s,o),l=a.length;l--;)zi!==a[l]&&a[l].kill(s,n);return this},t.getTweensOf=function(s,n){for(var o=[],a=zt(s),l=this._first,c=fi(n),h;l;)l instanceof Le?xE(l._targets,a)&&(c?(!zi||l._initted&&l._ts)&&l.globalTime(0)<=n&&l.globalTime(l.totalDuration())>n:!n||l.isActive())&&o.push(l):(h=l.getTweensOf(a,n)).length&&o.push.apply(o,h),l=l._next;return o},t.tweenTo=function(s,n){n=n||{};var o=this,a=Dt(o,s),l=n,c=l.startAt,h=l.onStart,u=l.onStartParams,d=l.immediateRender,f,m=Le.to(o,Tt({ease:n.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:n.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||xe,onStart:function(){if(o.pause(),!f){var g=n.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());m._dur!==g&&zr(m,g,0,1).render(m._time,!0,!0),f=1}h&&h.apply(m,u||[])}},n));return d?m.render(0):m},t.tweenFromTo=function(s,n,o){return this.tweenTo(n,Tt({startAt:{time:Dt(this,s)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(s){return s===void 0&&(s=this._time),I0(this,Dt(this,s))},t.previousLabel=function(s){return s===void 0&&(s=this._time),I0(this,Dt(this,s),1)},t.currentLabel=function(s){return arguments.length?this.seek(s,!0):this.previousLabel(this._time+xe)},t.shiftChildren=function(s,n,o){o===void 0&&(o=0);var a=this._first,l=this.labels,c;for(s=Ae(s);a;)a._start>=o&&(a._start+=s,a._end+=s),a=a._next;if(n)for(c in l)l[c]>=o&&(l[c]+=s);return sr(this)},t.invalidate=function(s){var n=this._first;for(this._lock=0;n;)n.invalidate(s),n=n._next;return r.prototype.invalidate.call(this,s)},t.clear=function(s){s===void 0&&(s=!0);for(var n=this._first,o;n;)o=n._next,this.remove(n),n=o;return this._dp&&(this._time=this._tTime=this._pTime=0),s&&(this.labels={}),sr(this)},t.totalDuration=function(s){var n=0,o=this,a=o._last,l=Ot,c,h,u;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-s:s));if(o._dirty){for(u=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),h=a._start,h>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,ri(o,a,h-a._delay,1)._lock=0):l=h,h<0&&a._ts&&(n-=h,(!u&&!o._dp||u&&u.smoothChildTiming)&&(o._start+=Ae(h/o._ts),o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),l=0),a._end>n&&a._ts&&(n=a._end),a=c;zr(o,o===Ee&&o._time>n?o._time:n,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(s){if(Ee._ts&&(d0(Ee,co(s,Ee)),c0=Ct.frame),Ct.frame>=h0){h0+=vt.autoSleep||120;var n=Ee._first;if((!n||!n._ts)&&vt.autoSleep&&Ct._listeners.length<2){for(;n&&!n._ts;)n=n._next;n||Ct.sleep()}}},e})(Fs);Tt(ct.prototype,{_lock:0,_hasPause:0,_forcing:0});var LE=function(e,t,i,s,n,o,a){var l=new mt(this._pt,e,t,0,1,$0,null,n),c=0,h=0,u,d,f,m,p,g,_,x;for(l.b=i,l.e=s,i+="",s+="",(_=~s.indexOf("random("))&&(s=Is(s)),o&&(x=[i,s],o(x,e,t),i=x[0],s=x[1]),d=i.match(Hd)||[];u=Hd.exec(s);)m=u[0],p=s.substring(c,u.index),f?f=(f+1)%5:p.substr(-5)==="rgba("&&(f=1),m!==d[h++]&&(g=parseFloat(d[h-1])||0,l._pt={_next:l._pt,p:p||h===1?p:",",s:g,c:m.charAt(1)==="="?Br(g,m)-g:parseFloat(m)-g,m:f&&f<4?Math.round:0},c=Hd.lastIndex);return l.c=c<s.length?s.substring(c,s.length):"",l.fp=a,(n0.test(s)||_)&&(l.e=0),this._pt=l,l},af=function(e,t,i,s,n,o,a,l,c,h){Re(s)&&(s=s(n||0,e,o));var u=e[t],d=i!=="get"?i:Re(u)?c?e[t.indexOf("set")||!Re(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():u,f=Re(u)?c?XE:W0:hf,m;if(qe(s)&&(~s.indexOf("random(")&&(s=Is(s)),s.charAt(1)==="="&&(m=Br(d,s)+(st(d)||0),(m||m===0)&&(s=m))),!h||d!==s||lf)return!isNaN(d*s)&&s!==""?(m=new mt(this._pt,e,t,+d||0,s-(d||0),typeof u=="boolean"?qE:V0,0,f),c&&(m.fp=c),a&&m.modifier(a,this,e),this._pt=m):(!u&&!(t in e)&&$d(t,s),LE.call(this,e,t,d,s,f,l||vt.stringFilter,c))},HE=function(e,t,i,s,n){if(Re(e)&&(e=Us(e,n,t,i,s)),!ti(e)||e.style&&e.nodeType||rt(e)||i0(e))return qe(e)?Us(e,n,t,i,s):e;var o={},a;for(a in e)o[a]=Us(e[a],n,t,i,s);return o},N0=function(e,t,i,s,n,o){var a,l,c,h;if(wt[e]&&(a=new wt[e]).init(n,a.rawVars?t[e]:HE(t[e],s,n,o,i),i,s,o)!==!1&&(i._pt=l=new mt(i._pt,n,e,0,1,a.render,a,0,a.priority),i!==Gr))for(c=i._ptLookup[i._targets.indexOf(n)],h=a._props.length;h--;)c[a._props[h]]=l;return a},zi,lf,cf=function r(e,t,i){var s=e.vars,n=s.ease,o=s.startAt,a=s.immediateRender,l=s.lazy,c=s.onUpdate,h=s.runBackwards,u=s.yoyoEase,d=s.keyframes,f=s.autoRevert,m=e._dur,p=e._startAt,g=e._targets,_=e.parent,x=_&&_.data==="nested"?_.vars.targets:g,y=e._overwrite==="auto"&&!zd,v=e.timeline,b,T,w,S,C,E,P,F,B,G,j,R,I;if(v&&(!d||!n)&&(n="none"),e._ease=nr(n,Fr.ease),e._yEase=u?O0(nr(u===!0?n:u,Fr.ease)):0,u&&e._yoyo&&!e._repeat&&(u=e._yEase,e._yEase=e._ease,e._ease=u),e._from=!v&&!!s.runBackwards,!v||d&&!s.stagger){if(F=g[0]?rr(g[0]).harness:0,R=F&&s[F.prop],b=ao(s,Xd),p&&(p._zTime<0&&p.progress(1),t<0&&h&&a&&!f?p.render(-1,!0):p.revert(h&&m?so:gE),p._lazy=0),o){if(Bi(e._startAt=Le.set(g,Tt({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!p&&ft(l),startAt:null,delay:0,onUpdate:c&&function(){return St(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Je||!a&&!f)&&e._startAt.revert(so),a&&m&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(h&&m&&!p){if(t&&(a=!1),w=Tt({overwrite:!1,data:"isFromStart",lazy:a&&!p&&ft(l),immediateRender:a,stagger:0,parent:_},b),R&&(w[F.prop]=R),Bi(e._startAt=Le.set(g,w)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Je?e._startAt.revert(so):e._startAt.render(-1,!0)),e._zTime=t,!a)r(e._startAt,xe,xe);else if(!t)return}for(e._pt=e._ptCache=0,l=m&&ft(l)||l&&!m,T=0;T<g.length;T++){if(C=g[T],P=C._gsap||jd(g)[T]._gsap,e._ptLookup[T]=G={},Yd[P.id]&&Ui.length&&oo(),j=x===g?T:x.indexOf(C),F&&(B=new F).init(C,R||b,e,j,x)!==!1&&(e._pt=S=new mt(e._pt,C,B.name,0,1,B.render,B,0,B.priority),B._props.forEach(function(V){G[V]=S}),B.priority&&(E=1)),!F||R)for(w in b)wt[w]&&(B=N0(w,b,e,j,C,x))?B.priority&&(E=1):G[w]=S=af.call(e,C,w,"get",b[w],j,x,0,s.stringFilter);e._op&&e._op[T]&&e.kill(C,e._op[T]),y&&e._pt&&(zi=e,Ee.killTweensOf(C,G,e.globalTime(t)),I=!e.parent,zi=0),e._pt&&l&&(Yd[P.id]=1)}E&&X0(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!I,d&&t<=0&&v.render(Ot,!0,!0)},WE=function(e,t,i,s,n,o,a,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],h,u,d,f;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(h=d[f][t],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==t&&h.fp!==t;)h=h._next;if(!h)return lf=1,e.vars[t]="+=0",cf(e,a),lf=0,l?Ss(t+" not eligible for reset"):1;c.push(h)}for(f=c.length;f--;)u=c[f],h=u._pt||u,h.s=(s||s===0)&&!n?s:h.s+(s||0)+o*h.c,h.c=i-h.s,u.e&&(u.e=Oe(i)+st(u.e)),u.b&&(u.b=h.s+st(u.b))},VE=function(e,t){var i=e[0]?rr(e[0]).harness:0,s=i&&i.aliases,n,o,a,l;if(!s)return t;n=Or({},t);for(o in s)if(o in n)for(l=s[o].split(","),a=l.length;a--;)n[l[a]]=n[o];return n},$E=function(e,t,i,s){var n=t.ease||s||"power1.inOut",o,a;if(rt(t))a=i[e]||(i[e]=[]),t.forEach(function(l,c){return a.push({t:c/(t.length-1)*100,v:l,e:n})});else for(o in t)a=i[o]||(i[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:n})},Us=function(e,t,i,s,n){return Re(e)?e.call(t,i,s,n):qe(e)&&~e.indexOf("random(")?Is(e):e},L0=Kd+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",H0={};pt(L0+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return H0[r]=1});var Le=(function(r){e0(e,r);function e(i,s,n,o){var a;typeof s=="number"&&(n.duration=s,s=n,n=null),a=r.call(this,o?s:Es(s))||this;var l=a.vars,c=l.duration,h=l.delay,u=l.immediateRender,d=l.stagger,f=l.overwrite,m=l.keyframes,p=l.defaults,g=l.scrollTrigger,_=l.yoyoEase,x=s.parent||Ee,y=(rt(i)||i0(i)?fi(i[0]):"length"in s)?[i]:zt(i),v,b,T,w,S,C,E,P;if(a._targets=y.length?jd(y):Ss("GSAP target "+i+" not found. https://gsap.com",!vt.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=f,m||d||io(c)||io(h)){if(s=a.vars,v=a.timeline=new ct({data:"nested",defaults:p||{},targets:x&&x.data==="nested"?x.vars.targets:y}),v.kill(),v.parent=v._dp=di(a),v._start=0,d||io(c)||io(h)){if(w=y.length,E=d&&S0(d),ti(d))for(S in d)~L0.indexOf(S)&&(P||(P={}),P[S]=d[S]);for(b=0;b<w;b++)T=ao(s,H0),T.stagger=0,_&&(T.yoyoEase=_),P&&Or(T,P),C=y[b],T.duration=+Us(c,di(a),b,C,y),T.delay=(+Us(h,di(a),b,C,y)||0)-a._delay,!d&&w===1&&T.delay&&(a._delay=h=T.delay,a._start+=h,T.delay=0),v.to(C,T,E?E(b,C,y):0),v._ease=oe.none;v.duration()?c=h=0:a.timeline=0}else if(m){Es(Tt(v.vars.defaults,{ease:"none"})),v._ease=nr(m.ease||s.ease||"none");var F=0,B,G,j;if(rt(m))m.forEach(function(R){return v.to(y,R,">")}),v.duration();else{T={};for(S in m)S==="ease"||S==="easeEach"||$E(S,m[S],T,m.easeEach);for(S in T)for(B=T[S].sort(function(R,I){return R.t-I.t}),F=0,b=0;b<B.length;b++)G=B[b],j={ease:G.e,duration:(G.t-(b?B[b-1].t:0))/100*c},j[S]=G.v,v.to(y,j,F),F+=j.duration;v.duration()<c&&v.to({},{duration:c-v.duration()})}}c||a.duration(c=v.duration())}else a.timeline=0;return f===!0&&!zd&&(zi=di(a),Ee.killTweensOf(y),zi=0),ri(x,di(a),n),s.reversed&&a.reverse(),s.paused&&a.paused(!0),(u||!c&&!m&&a._start===Ae(x._time)&&ft(u)&&wE(di(a))&&x.data!=="nested")&&(a._tTime=-xe,a.render(Math.max(0,-h)||0)),g&&y0(di(a),g),a}var t=e.prototype;return t.render=function(s,n,o){var a=this._time,l=this._tDur,c=this._dur,h=s<0,u=s>l-xe&&!h?l:s<xe?0:s,d,f,m,p,g,_,x,y,v;if(!c)SE(this,s,n,o);else if(u!==this._tTime||!s||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(d=u,y=this.timeline,this._repeat){if(p=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(p*100+s,n,o);if(d=Ae(u%p),u===l?(m=this._repeat,d=c):(g=Ae(u/p),m=~~g,m&&m===g?(d=c,m--):d>c&&(d=c)),_=this._yoyo&&m&1,_&&(v=this._yEase,d=c-d),g=Dr(this._tTime,p),d===a&&!o&&this._initted&&m===g)return this._tTime=u,this;m!==g&&(y&&this._yEase&&D0(y,_),this.vars.repeatRefresh&&!_&&!this._lock&&d!==p&&this._initted&&(this._lock=o=1,this.render(Ae(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(v0(this,h?s:d,o,n,u))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==g))return this;if(c!==this._dur)return this.render(s,n,o)}if(this._tTime=u,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(v||this._ease)(d/c),this._from&&(this.ratio=x=1-x),!a&&u&&!n&&!g&&(St(this,"onStart"),this._tTime!==u))return this;for(f=this._pt;f;)f.r(x,f.d),f=f._next;y&&y.render(s<0?s:y._dur*y._ease(d/this._dur),n,o)||this._startAt&&(this._zTime=s),this._onUpdate&&!n&&(h&&Jd(this,s,n,o),St(this,"onUpdate")),this._repeat&&m!==g&&this.vars.onRepeat&&!n&&this.parent&&St(this,"onRepeat"),(u===this._tDur||!u)&&this._tTime===u&&(h&&!this._onUpdate&&Jd(this,s,!0,!0),(s||!c)&&(u===this._tDur&&this._ts>0||!u&&this._ts<0)&&Bi(this,1),!n&&!(h&&!a)&&(u||a||_)&&(St(this,u===l?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(s){return(!s||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(s),r.prototype.invalidate.call(this,s)},t.resetTo=function(s,n,o,a,l){ks||Ct.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||cf(this,c),h=this._ease(c/this._dur),WE(this,s,n,o,a,h,c,l)?this.resetTo(s,n,o,a,1):(uo(this,0),this.parent||g0(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(s,n){if(n===void 0&&(n="all"),!s&&(!n||n==="all"))return this._lazy=this._pt=0,this.parent?Ms(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Je),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(s,n,zi&&zi.vars.overwrite!==!0)._first||Ms(this),this.parent&&o!==this.timeline.totalDuration()&&zr(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=s?zt(s):a,c=this._ptLookup,h=this._pt,u,d,f,m,p,g,_;if((!n||n==="all")&&vE(a,l))return n==="all"&&(this._pt=0),Ms(this);for(u=this._op=this._op||[],n!=="all"&&(qe(n)&&(p={},pt(n,function(x){return p[x]=1}),n=p),n=VE(a,n)),_=a.length;_--;)if(~l.indexOf(a[_])){d=c[_],n==="all"?(u[_]=n,m=d,f={}):(f=u[_]=u[_]||{},m=n);for(p in m)g=d&&d[p],g&&((!("kill"in g.d)||g.d.kill(p)===!0)&&lo(this,g,"_pt"),delete d[p]),f!=="all"&&(f[p]=1)}return this._initted&&!this._pt&&h&&Ms(this),this},e.to=function(s,n){return new e(s,n,arguments[2])},e.from=function(s,n){return As(1,arguments)},e.delayedCall=function(s,n,o,a){return new e(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:s,onComplete:n,onReverseComplete:n,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(s,n,o){return As(2,arguments)},e.set=function(s,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new e(s,n)},e.killTweensOf=function(s,n,o){return Ee.killTweensOf(s,n,o)},e})(Fs);Tt(Le.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),pt("staggerTo,staggerFrom,staggerFromTo",function(r){Le[r]=function(){var e=new ct,t=ef.call(arguments,0);return t.splice(r==="staggerFromTo"?5:4,0,0),e[r].apply(e,t)}});var hf=function(e,t,i){return e[t]=i},W0=function(e,t,i){return e[t](i)},XE=function(e,t,i,s){return e[t](s.fp,i)},YE=function(e,t,i){return e.setAttribute(t,i)},uf=function(e,t){return Re(e[t])?W0:Nd(e[t])&&e.setAttribute?YE:hf},V0=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},qE=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},$0=function(e,t){var i=t._pt,s="";if(!e&&t.b)s=t.b;else if(e===1&&t.e)s=t.e;else{for(;i;)s=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+s,i=i._next;s+=t.c}t.set(t.t,t.p,s,t)},df=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},KE=function(e,t,i,s){for(var n=this._pt,o;n;)o=n._next,n.p===s&&n.modifier(e,t,i),n=o},jE=function(e){for(var t=this._pt,i,s;t;)s=t._next,t.p===e&&!t.op||t.op===e?lo(this,t,"_pt"):t.dep||(i=1),t=s;return!i},ZE=function(e,t,i,s){s.mSet(e,t,s.m.call(s.tween,i,s.mt),s)},X0=function(e){for(var t=e._pt,i,s,n,o;t;){for(i=t._next,s=n;s&&s.pr>t.pr;)s=s._next;(t._prev=s?s._prev:o)?t._prev._next=t:n=t,(t._next=s)?s._prev=t:o=t,t=i}e._pt=n},mt=(function(){function r(t,i,s,n,o,a,l,c,h){this.t=i,this.s=n,this.c=o,this.p=s,this.r=a||V0,this.d=l||this,this.set=c||hf,this.pr=h||0,this._next=t,t&&(t._prev=this)}var e=r.prototype;return e.modifier=function(i,s,n){this.mSet=this.mSet||this.set,this.set=ZE,this.m=i,this.mt=n,this.tween=s},r})();pt(Kd+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return Xd[r]=1}),bt.TweenMax=bt.TweenLite=Le,bt.TimelineLite=bt.TimelineMax=ct,Ee=new ct({sortChildren:!1,defaults:Fr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),vt.stringFilter=B0;var ar=[],fo={},JE=[],Y0=0,QE=0,ff=function(e){return(fo[e]||JE).map(function(t){return t()})},pf=function(){var e=Date.now(),t=[];e-Y0>2&&(ff("matchMediaInit"),ar.forEach(function(i){var s=i.queries,n=i.conditions,o,a,l,c;for(a in s)o=ii.matchMedia(s[a]).matches,o&&(l=1),o!==n[a]&&(n[a]=o,c=1);c&&(i.revert(),l&&t.push(i))}),ff("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(s){return i.add(null,s)})}),Y0=e,ff("matchMedia"))},q0=(function(){function r(t,i){this.selector=i&&tf(i),this.data=[],this._r=[],this.isReverted=!1,this.id=QE++,t&&this.add(t)}var e=r.prototype;return e.add=function(i,s,n){Re(i)&&(n=s,s=i,i=Re);var o=this,a=function(){var c=Ce,h=o.selector,u;return c&&c!==o&&c.data.push(o),n&&(o.selector=tf(n)),Ce=o,u=s.apply(o,arguments),Re(u)&&o._r.push(u),Ce=c,o.selector=h,o.isReverted=!1,u};return o.last=a,i===Re?a(o,function(l){return o.add(null,l)}):i?o[i]=a:a},e.ignore=function(i){var s=Ce;Ce=null,i(this),Ce=s},e.getTweens=function(){var i=[];return this.data.forEach(function(s){return s instanceof r?i.push.apply(i,s.getTweens()):s instanceof Le&&!(s.parent&&s.parent.data==="nested")&&i.push(s)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,s){var n=this;if(i?(function(){for(var a=n.getTweens(),l=n.data.length,c;l--;)c=n.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(h){return a.splice(a.indexOf(h),1)}));for(a.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,u){return u.g-h.g||-1/0}).forEach(function(h){return h.t.revert(i)}),l=n.data.length;l--;)c=n.data[l],c instanceof ct?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof Le)&&c.revert&&c.revert(i);n._r.forEach(function(h){return h(i,n)}),n.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),s)for(var o=ar.length;o--;)ar[o].id===this.id&&ar.splice(o,1)},e.revert=function(i){this.kill(i||{})},r})(),eA=(function(){function r(t){this.contexts=[],this.scope=t,Ce&&Ce.data.push(this)}var e=r.prototype;return e.add=function(i,s,n){ti(i)||(i={matches:i});var o=new q0(0,n||this.scope),a=o.conditions={},l,c,h;Ce&&!o.selector&&(o.selector=Ce.selector),this.contexts.push(o),s=o.add("onMatch",s),o.queries=i;for(c in i)c==="all"?h=1:(l=ii.matchMedia(i[c]),l&&(ar.indexOf(o)<0&&ar.push(o),(a[c]=l.matches)&&(h=1),l.addListener?l.addListener(pf):l.addEventListener("change",pf)));return h&&s(o,function(u){return o.add(null,u)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(s){return s.kill(i,!0)})},r})(),po={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(s){return R0(s)})},timeline:function(e){return new ct(e)},getTweensOf:function(e,t){return Ee.getTweensOf(e,t)},getProperty:function(e,t,i,s){qe(e)&&(e=zt(e)[0]);var n=rr(e||{}).get,o=i?p0:f0;return i==="native"&&(i=""),e&&(t?o((wt[t]&&wt[t].get||n)(e,t,i,s)):function(a,l,c){return o((wt[a]&&wt[a].get||n)(e,a,l,c))})},quickSetter:function(e,t,i){if(e=zt(e),e.length>1){var s=e.map(function(h){return gt.quickSetter(h,t,i)}),n=s.length;return function(h){for(var u=n;u--;)s[u](h)}}e=e[0]||{};var o=wt[t],a=rr(e),l=a.harness&&(a.harness.aliases||{})[t]||t,c=o?function(h){var u=new o;Gr._pt=0,u.init(e,i?h+i:h,Gr,0,[e]),u.render(1,u),Gr._pt&&df(1,Gr)}:a.set(e,l);return o?c:function(h){return c(e,l,i?h+i:h,a,1)}},quickTo:function(e,t,i){var s,n=gt.to(e,Tt((s={},s[t]="+=0.1",s.paused=!0,s.stagger=0,s),i||{})),o=function(l,c,h){return n.resetTo(t,l,c,h)};return o.tween=n,o},isTweening:function(e){return Ee.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=nr(e.ease,Fr.ease)),m0(Fr,e||{})},config:function(e){return m0(vt,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,s=e.plugins,n=e.defaults,o=e.extendTimeline;(s||"").split(",").forEach(function(a){return a&&!wt[a]&&!bt[a]&&Ss(t+" effect requires "+a+" plugin.")}),qd[t]=function(a,l,c){return i(zt(a),Tt(l||{},n),c)},o&&(ct.prototype[t]=function(a,l,c){return this.add(qd[t](a,ti(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){oe[e]=nr(t)},parseEase:function(e,t){return arguments.length?nr(e,t):oe},getById:function(e){return Ee.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new ct(e),s,n;for(i.smoothChildTiming=ft(e.smoothChildTiming),Ee.remove(i),i._dp=0,i._time=i._tTime=Ee._time,s=Ee._first;s;)n=s._next,(t||!(!s._dur&&s instanceof Le&&s.vars.onComplete===s._targets[0]))&&ri(i,s,s._start-s._delay),s=n;return ri(Ee,i,0),i},context:function(e,t){return e?new q0(e,t):Ce},matchMedia:function(e){return new eA(e)},matchMediaRefresh:function(){return ar.forEach(function(e){var t=e.conditions,i,s;for(s in t)t[s]&&(t[s]=!1,i=1);i&&e.revert()})||pf()},addEventListener:function(e,t){var i=fo[e]||(fo[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=fo[e],s=i&&i.indexOf(t);s>=0&&i.splice(s,1)},utils:{wrap:kE,wrapYoyo:FE,distribute:S0,random:E0,snap:C0,normalize:RE,getUnit:st,clamp:AE,splitColor:k0,toArray:zt,selector:tf,mapRange:P0,pipe:IE,unitize:ME,interpolate:UE,shuffle:T0},install:a0,effects:qd,ticker:Ct,updateRoot:ct.updateRoot,plugins:wt,globalTimeline:Ee,core:{PropTween:mt,globals:l0,Tween:Le,Timeline:ct,Animation:Fs,getCache:rr,_removeLinkedListItem:lo,reverting:function(){return Je},context:function(e){return e&&Ce&&(Ce.data.push(e),e._ctx=Ce),Ce},suppressOverwrites:function(e){return zd=e}}};pt("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return po[r]=Le[r]}),Ct.add(ct.updateRoot),Gr=po.to({},{duration:0});var tA=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},iA=function(e,t){var i=e._targets,s,n,o;for(s in t)for(n=i.length;n--;)o=e._ptLookup[n][s],o&&(o=o.d)&&(o._pt&&(o=tA(o,s)),o&&o.modifier&&o.modifier(t[s],e,i[n],s))},mf=function(e,t){return{name:e,headless:1,rawVars:1,init:function(s,n,o){o._onInit=function(a){var l,c;if(qe(n)&&(l={},pt(n,function(h){return l[h]=1}),n=l),t){l={};for(c in n)l[c]=t(n[c]);n=l}iA(a,n)}}}},gt=po.registerPlugin({name:"attr",init:function(e,t,i,s,n){var o,a,l;this.tween=i;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],s,n,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)Je?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},mf("roundProps",rf),mf("modifiers"),mf("snap",C0))||po;Le.version=ct.version=gt.version="3.14.2",o0=1,Ld()&&Nr(),oe.Power0,oe.Power1,oe.Power2,oe.Power3,oe.Power4,oe.Linear,oe.Quad,oe.Cubic,oe.Quart,oe.Quint,oe.Strong,oe.Elastic,oe.Back,oe.SteppedEase,oe.Bounce,oe.Sine,oe.Expo,oe.Circ;var K0,Gi,Lr,gf,lr,j0,_f,rA=function(){return typeof window<"u"},pi={},cr=180/Math.PI,Hr=Math.PI/180,Wr=Math.atan2,Z0=1e8,xf=/([A-Z])/g,sA=/(left|right|width|margin|padding|x)/i,nA=/[\s,\(]\S/,si={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},yf=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},oA=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},aA=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},lA=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},cA=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},J0=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Q0=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},hA=function(e,t,i){return e.style[t]=i},uA=function(e,t,i){return e.style.setProperty(t,i)},dA=function(e,t,i){return e._gsap[t]=i},fA=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},pA=function(e,t,i,s,n){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(n,o)},mA=function(e,t,i,s,n){var o=e._gsap;o[t]=i,o.renderTransform(n,o)},Pe="transform",_t=Pe+"Origin",gA=function r(e,t){var i=this,s=this.target,n=s.style,o=s._gsap;if(e in pi&&n){if(this.tfm=this.tfm||{},e!=="transform")e=si[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return i.tfm[a]=mi(s,a)}):this.tfm[e]=o.x?o[e]:mi(s,e),e===_t&&(this.tfm.zOrigin=o.zOrigin);else return si.transform.split(",").forEach(function(a){return r.call(i,a,t)});if(this.props.indexOf(Pe)>=0)return;o.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(_t,t,"")),e=Pe}(n||t)&&this.props.push(e,t,n[e])},e_=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_A=function(){var e=this.props,t=this.target,i=t.style,s=t._gsap,n,o;for(n=0;n<e.length;n+=3)e[n+1]?e[n+1]===2?t[e[n]](e[n+2]):t[e[n]]=e[n+2]:e[n+2]?i[e[n]]=e[n+2]:i.removeProperty(e[n].substr(0,2)==="--"?e[n]:e[n].replace(xf,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)s[o]=this.tfm[o];s.svg&&(s.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),n=_f(),(!n||!n.isStart)&&!i[Pe]&&(e_(i),s.zOrigin&&i[_t]&&(i[_t]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},t_=function(e,t){var i={target:e,props:[],revert:_A,save:gA};return e._gsap||gt.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(s){return i.save(s)}),i},i_,vf=function(e,t){var i=Gi.createElementNS?Gi.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Gi.createElement(e);return i&&i.style?i:Gi.createElement(e)},Et=function r(e,t,i){var s=getComputedStyle(e);return s[t]||s.getPropertyValue(t.replace(xf,"-$1").toLowerCase())||s.getPropertyValue(t)||!i&&r(e,Vr(t)||t,1)||""},r_="O,Moz,ms,Ms,Webkit".split(","),Vr=function(e,t,i){var s=t||lr,n=s.style,o=5;if(e in n&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(r_[o]+e in n););return o<0?null:(o===3?"ms":o>=0?r_[o]:"")+e},bf=function(){rA()&&window.document&&(K0=window,Gi=K0.document,Lr=Gi.documentElement,lr=vf("div")||{style:{}},vf("div"),Pe=Vr(Pe),_t=Pe+"Origin",lr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",i_=!!Vr("perspective"),_f=gt.core.reverting,gf=1)},s_=function(e){var t=e.ownerSVGElement,i=vf("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=e.cloneNode(!0),n;s.style.display="block",i.appendChild(s),Lr.appendChild(i);try{n=s.getBBox()}catch{}return i.removeChild(s),Lr.removeChild(i),n},n_=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},o_=function(e){var t,i;try{t=e.getBBox()}catch{t=s_(e),i=1}return t&&(t.width||t.height)||i||(t=s_(e)),t&&!t.width&&!t.x&&!t.y?{x:+n_(e,["x","cx","x1"])||0,y:+n_(e,["y","cy","y1"])||0,width:0,height:0}:t},a_=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&o_(e))},Ni=function(e,t){if(t){var i=e.style,s;t in pi&&t!==_t&&(t=Pe),i.removeProperty?(s=t.substr(0,2),(s==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(s==="--"?t:t.replace(xf,"-$1").toLowerCase())):i.removeAttribute(t)}},Li=function(e,t,i,s,n,o){var a=new mt(e._pt,t,i,0,1,o?Q0:J0);return e._pt=a,a.b=s,a.e=n,e._props.push(i),a},l_={deg:1,rad:1,turn:1},xA={grid:1,flex:1},Hi=function r(e,t,i,s){var n=parseFloat(i)||0,o=(i+"").trim().substr((n+"").length)||"px",a=lr.style,l=sA.test(t),c=e.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),u=100,d=s==="px",f=s==="%",m,p,g,_;if(s===o||!n||l_[s]||l_[o])return n;if(o!=="px"&&!d&&(n=r(e,t,i,"px")),_=e.getCTM&&a_(e),(f||o==="%")&&(pi[t]||~t.indexOf("adius")))return m=_?e.getBBox()[l?"width":"height"]:e[h],Oe(f?n/m*u:n/100*m);if(a[l?"width":"height"]=u+(d?o:s),p=s!=="rem"&&~t.indexOf("adius")||s==="em"&&e.appendChild&&!c?e:e.parentNode,_&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===Gi||!p.appendChild)&&(p=Gi.body),g=p._gsap,g&&f&&g.width&&l&&g.time===Ct.time&&!g.uncache)return Oe(n/g.width*u);if(f&&(t==="height"||t==="width")){var x=e.style[t];e.style[t]=u+s,m=e[h],x?e.style[t]=x:Ni(e,t)}else(f||o==="%")&&!xA[Et(p,"display")]&&(a.position=Et(e,"position")),p===e&&(a.position="static"),p.appendChild(lr),m=lr[h],p.removeChild(lr),a.position="absolute";return l&&f&&(g=rr(p),g.time=Ct.time,g.width=p[h]),Oe(d?m*n/u:m&&n?u/m*n:0)},mi=function(e,t,i,s){var n;return gf||bf(),t in si&&t!=="transform"&&(t=si[t],~t.indexOf(",")&&(t=t.split(",")[0])),pi[t]&&t!=="transform"?(n=Os(e,s),n=t!=="transformOrigin"?n[t]:n.svg?n.origin:go(Et(e,_t))+" "+n.zOrigin+"px"):(n=e.style[t],(!n||n==="auto"||s||~(n+"").indexOf("calc("))&&(n=mo[t]&&mo[t](e,t,i)||Et(e,t)||u0(e,t)||(t==="opacity"?1:0))),i&&!~(n+"").trim().indexOf(" ")?Hi(e,t,n,i)+i:n},yA=function(e,t,i,s){if(!i||i==="none"){var n=Vr(t,e,1),o=n&&Et(e,n,1);o&&o!==i?(t=n,i=o):t==="borderColor"&&(i=Et(e,"borderTopColor"))}var a=new mt(this._pt,e.style,t,0,1,$0),l=0,c=0,h,u,d,f,m,p,g,_,x,y,v,b;if(a.b=i,a.e=s,i+="",s+="",s.substring(0,6)==="var(--"&&(s=Et(e,s.substring(4,s.indexOf(")")))),s==="auto"&&(p=e.style[t],e.style[t]=s,s=Et(e,t)||s,p?e.style[t]=p:Ni(e,t)),h=[i,s],B0(h),i=h[0],s=h[1],d=i.match(Ur)||[],b=s.match(Ur)||[],b.length){for(;u=Ur.exec(s);)g=u[0],x=s.substring(l,u.index),m?m=(m+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(m=1),g!==(p=d[c++]||"")&&(f=parseFloat(p)||0,v=p.substr((f+"").length),g.charAt(1)==="="&&(g=Br(f,g)+v),_=parseFloat(g),y=g.substr((_+"").length),l=Ur.lastIndex-y.length,y||(y=y||vt.units[t]||v,l===s.length&&(s+=y,a.e+=y)),v!==y&&(f=Hi(e,t,p,y)||0),a._pt={_next:a._pt,p:x||c===1?x:",",s:f,c:_-f,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=l<s.length?s.substring(l,s.length):""}else a.r=t==="display"&&s==="none"?Q0:J0;return n0.test(s)&&(a.e=0),this._pt=a,a},c_={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},vA=function(e){var t=e.split(" "),i=t[0],s=t[1]||"50%";return(i==="top"||i==="bottom"||s==="left"||s==="right")&&(e=i,i=s,s=e),t[0]=c_[i]||i,t[1]=c_[s]||s,t.join(" ")},bA=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,s=i.style,n=t.u,o=i._gsap,a,l,c;if(n==="all"||n===!0)s.cssText="",l=1;else for(n=n.split(","),c=n.length;--c>-1;)a=n[c],pi[a]&&(l=1,a=a==="transformOrigin"?_t:Pe),Ni(i,a);l&&(Ni(i,Pe),o&&(o.svg&&i.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Os(i,1),o.uncache=1,e_(s)))}},mo={clearProps:function(e,t,i,s,n){if(n.data!=="isFromStart"){var o=e._pt=new mt(e._pt,t,i,0,0,bA);return o.u=s,o.pr=-10,o.tween=n,e._props.push(i),1}}},Bs=[1,0,0,1,0,0],h_={},u_=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},d_=function(e){var t=Et(e,Pe);return u_(t)?Bs:t.substr(7).match(s0).map(Oe)},wf=function(e,t){var i=e._gsap||rr(e),s=e.style,n=d_(e),o,a,l,c;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,n=[l.a,l.b,l.c,l.d,l.e,l.f],n.join(",")==="1,0,0,1,0,0"?Bs:n):(n===Bs&&!e.offsetParent&&e!==Lr&&!i.svg&&(l=s.display,s.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,a=e.nextElementSibling,Lr.appendChild(e)),n=d_(e),l?s.display=l:Ni(e,"display"),c&&(a?o.insertBefore(e,a):o?o.appendChild(e):Lr.removeChild(e))),t&&n.length>6?[n[0],n[1],n[4],n[5],n[12],n[13]]:n)},Tf=function(e,t,i,s,n,o){var a=e._gsap,l=n||wf(e,!0),c=a.xOrigin||0,h=a.yOrigin||0,u=a.xOffset||0,d=a.yOffset||0,f=l[0],m=l[1],p=l[2],g=l[3],_=l[4],x=l[5],y=t.split(" "),v=parseFloat(y[0])||0,b=parseFloat(y[1])||0,T,w,S,C;i?l!==Bs&&(w=f*g-m*p)&&(S=v*(g/w)+b*(-p/w)+(p*x-g*_)/w,C=v*(-m/w)+b*(f/w)-(f*x-m*_)/w,v=S,b=C):(T=o_(e),v=T.x+(~y[0].indexOf("%")?v/100*T.width:v),b=T.y+(~(y[1]||y[0]).indexOf("%")?b/100*T.height:b)),s||s!==!1&&a.smooth?(_=v-c,x=b-h,a.xOffset=u+(_*f+x*p)-_,a.yOffset=d+(_*m+x*g)-x):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=b,a.smooth=!!s,a.origin=t,a.originIsAbsolute=!!i,e.style[_t]="0px 0px",o&&(Li(o,a,"xOrigin",c,v),Li(o,a,"yOrigin",h,b),Li(o,a,"xOffset",u,a.xOffset),Li(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",v+" "+b)},Os=function(e,t){var i=e._gsap||new G0(e);if("x"in i&&!t&&!i.uncache)return i;var s=e.style,n=i.scaleX<0,o="px",a="deg",l=getComputedStyle(e),c=Et(e,_t)||"0",h,u,d,f,m,p,g,_,x,y,v,b,T,w,S,C,E,P,F,B,G,j,R,I,V,H,te,ie,pe,N,Z,U;return h=u=d=p=g=_=x=y=v=0,f=m=1,i.svg=!!(e.getCTM&&a_(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(s[Pe]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Pe]!=="none"?l[Pe]:"")),s.scale=s.rotate=s.translate="none"),w=wf(e,i.svg),i.svg&&(i.uncache?(V=e.getBBox(),c=i.xOrigin-V.x+"px "+(i.yOrigin-V.y)+"px",I=""):I=!t&&e.getAttribute("data-svg-origin"),Tf(e,I||c,!!I||i.originIsAbsolute,i.smooth!==!1,w)),b=i.xOrigin||0,T=i.yOrigin||0,w!==Bs&&(P=w[0],F=w[1],B=w[2],G=w[3],h=j=w[4],u=R=w[5],w.length===6?(f=Math.sqrt(P*P+F*F),m=Math.sqrt(G*G+B*B),p=P||F?Wr(F,P)*cr:0,x=B||G?Wr(B,G)*cr+p:0,x&&(m*=Math.abs(Math.cos(x*Hr))),i.svg&&(h-=b-(b*P+T*B),u-=T-(b*F+T*G))):(U=w[6],N=w[7],te=w[8],ie=w[9],pe=w[10],Z=w[11],h=w[12],u=w[13],d=w[14],S=Wr(U,pe),g=S*cr,S&&(C=Math.cos(-S),E=Math.sin(-S),I=j*C+te*E,V=R*C+ie*E,H=U*C+pe*E,te=j*-E+te*C,ie=R*-E+ie*C,pe=U*-E+pe*C,Z=N*-E+Z*C,j=I,R=V,U=H),S=Wr(-B,pe),_=S*cr,S&&(C=Math.cos(-S),E=Math.sin(-S),I=P*C-te*E,V=F*C-ie*E,H=B*C-pe*E,Z=G*E+Z*C,P=I,F=V,B=H),S=Wr(F,P),p=S*cr,S&&(C=Math.cos(S),E=Math.sin(S),I=P*C+F*E,V=j*C+R*E,F=F*C-P*E,R=R*C-j*E,P=I,j=V),g&&Math.abs(g)+Math.abs(p)>359.9&&(g=p=0,_=180-_),f=Oe(Math.sqrt(P*P+F*F+B*B)),m=Oe(Math.sqrt(R*R+U*U)),S=Wr(j,R),x=Math.abs(S)>2e-4?S*cr:0,v=Z?1/(Z<0?-Z:Z):0),i.svg&&(I=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!u_(Et(e,Pe)),I&&e.setAttribute("transform",I))),Math.abs(x)>90&&Math.abs(x)<270&&(n?(f*=-1,x+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,x+=x<=0?180:-180)),t=t||i.uncache,i.x=h-((i.xPercent=h&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-h)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=u-((i.yPercent=u&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=d+o,i.scaleX=Oe(f),i.scaleY=Oe(m),i.rotation=Oe(p)+a,i.rotationX=Oe(g)+a,i.rotationY=Oe(_)+a,i.skewX=x+a,i.skewY=y+a,i.transformPerspective=v+o,(i.zOrigin=parseFloat(c.split(" ")[2])||!t&&i.zOrigin||0)&&(s[_t]=go(c)),i.xOffset=i.yOffset=0,i.force3D=vt.force3D,i.renderTransform=i.svg?TA:i_?f_:wA,i.uncache=0,i},go=function(e){return(e=e.split(" "))[0]+" "+e[1]},Sf=function(e,t,i){var s=st(t);return Oe(parseFloat(t)+parseFloat(Hi(e,"x",i+"px",s)))+s},wA=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,f_(e,t)},hr="0deg",Ds="0px",ur=") ",f_=function(e,t){var i=t||this,s=i.xPercent,n=i.yPercent,o=i.x,a=i.y,l=i.z,c=i.rotation,h=i.rotationY,u=i.rotationX,d=i.skewX,f=i.skewY,m=i.scaleX,p=i.scaleY,g=i.transformPerspective,_=i.force3D,x=i.target,y=i.zOrigin,v="",b=_==="auto"&&e&&e!==1||_===!0;if(y&&(u!==hr||h!==hr)){var T=parseFloat(h)*Hr,w=Math.sin(T),S=Math.cos(T),C;T=parseFloat(u)*Hr,C=Math.cos(T),o=Sf(x,o,w*C*-y),a=Sf(x,a,-Math.sin(T)*-y),l=Sf(x,l,S*C*-y+y)}g!==Ds&&(v+="perspective("+g+ur),(s||n)&&(v+="translate("+s+"%, "+n+"%) "),(b||o!==Ds||a!==Ds||l!==Ds)&&(v+=l!==Ds||b?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+ur),c!==hr&&(v+="rotate("+c+ur),h!==hr&&(v+="rotateY("+h+ur),u!==hr&&(v+="rotateX("+u+ur),(d!==hr||f!==hr)&&(v+="skew("+d+", "+f+ur),(m!==1||p!==1)&&(v+="scale("+m+", "+p+ur),x.style[Pe]=v||"translate(0, 0)"},TA=function(e,t){var i=t||this,s=i.xPercent,n=i.yPercent,o=i.x,a=i.y,l=i.rotation,c=i.skewX,h=i.skewY,u=i.scaleX,d=i.scaleY,f=i.target,m=i.xOrigin,p=i.yOrigin,g=i.xOffset,_=i.yOffset,x=i.forceCSS,y=parseFloat(o),v=parseFloat(a),b,T,w,S,C;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=Hr,c*=Hr,b=Math.cos(l)*u,T=Math.sin(l)*u,w=Math.sin(l-c)*-d,S=Math.cos(l-c)*d,c&&(h*=Hr,C=Math.tan(c-h),C=Math.sqrt(1+C*C),w*=C,S*=C,h&&(C=Math.tan(h),C=Math.sqrt(1+C*C),b*=C,T*=C)),b=Oe(b),T=Oe(T),w=Oe(w),S=Oe(S)):(b=u,S=d,T=w=0),(y&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(y=Hi(f,"x",o,"px"),v=Hi(f,"y",a,"px")),(m||p||g||_)&&(y=Oe(y+m-(m*b+p*w)+g),v=Oe(v+p-(m*T+p*S)+_)),(s||n)&&(C=f.getBBox(),y=Oe(y+s/100*C.width),v=Oe(v+n/100*C.height)),C="matrix("+b+","+T+","+w+","+S+","+y+","+v+")",f.setAttribute("transform",C),x&&(f.style[Pe]=C)},SA=function(e,t,i,s,n){var o=360,a=qe(n),l=parseFloat(n)*(a&&~n.indexOf("rad")?cr:1),c=l-s,h=s+c+"deg",u,d;return a&&(u=n.split("_")[1],u==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),u==="cw"&&c<0?c=(c+o*Z0)%o-~~(c/o)*o:u==="ccw"&&c>0&&(c=(c-o*Z0)%o-~~(c/o)*o)),e._pt=d=new mt(e._pt,t,i,s,c,oA),d.e=h,d.u="deg",e._props.push(i),d},p_=function(e,t){for(var i in t)e[i]=t[i];return e},CA=function(e,t,i){var s=p_({},i._gsap),n="perspective,force3D,transformOrigin,svgOrigin",o=i.style,a,l,c,h,u,d,f,m;s.svg?(c=i.getAttribute("transform"),i.setAttribute("transform",""),o[Pe]=t,a=Os(i,1),Ni(i,Pe),i.setAttribute("transform",c)):(c=getComputedStyle(i)[Pe],o[Pe]=t,a=Os(i,1),o[Pe]=c);for(l in pi)c=s[l],h=a[l],c!==h&&n.indexOf(l)<0&&(f=st(c),m=st(h),u=f!==m?Hi(i,l,c,m):parseFloat(c),d=parseFloat(h),e._pt=new mt(e._pt,a,l,u,d-u,yf),e._pt.u=m||0,e._props.push(l));p_(a,s)};pt("padding,margin,Width,Radius",function(r,e){var t="Top",i="Right",s="Bottom",n="Left",o=(e<3?[t,i,s,n]:[t+n,t+i,s+i,s+n]).map(function(a){return e<2?r+a:"border"+a+r});mo[e>1?"border"+r:r]=function(a,l,c,h,u){var d,f;if(arguments.length<4)return d=o.map(function(m){return mi(a,m,c)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(h+"").split(" "),f={},o.forEach(function(m,p){return f[m]=d[p]=d[p]||d[(p-1)/2|0]}),a.init(l,f,u)}});var m_={name:"css",register:bf,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,s,n){var o=this._props,a=e.style,l=i.vars.startAt,c,h,u,d,f,m,p,g,_,x,y,v,b,T,w,S,C;gf||bf(),this.styles=this.styles||t_(e),S=this.styles.props,this.tween=i;for(p in t)if(p!=="autoRound"&&(h=t[p],!(wt[p]&&N0(p,t,i,s,e,n)))){if(f=typeof h,m=mo[p],f==="function"&&(h=h.call(i,s,e,n),f=typeof h),f==="string"&&~h.indexOf("random(")&&(h=Is(h)),m)m(this,e,p,h,i)&&(w=1);else if(p.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(p)+"").trim(),h+="",Di.lastIndex=0,Di.test(c)||(g=st(c),_=st(h),_?g!==_&&(c=Hi(e,p,c,_)+_):g&&(h+=g)),this.add(a,"setProperty",c,h,s,n,0,0,p),o.push(p),S.push(p,0,a[p]);else if(f!=="undefined"){if(l&&p in l?(c=typeof l[p]=="function"?l[p].call(i,s,e,n):l[p],qe(c)&&~c.indexOf("random(")&&(c=Is(c)),st(c+"")||c==="auto"||(c+=vt.units[p]||st(mi(e,p))||""),(c+"").charAt(1)==="="&&(c=mi(e,p))):c=mi(e,p),d=parseFloat(c),x=f==="string"&&h.charAt(1)==="="&&h.substr(0,2),x&&(h=h.substr(2)),u=parseFloat(h),p in si&&(p==="autoAlpha"&&(d===1&&mi(e,"visibility")==="hidden"&&u&&(d=0),S.push("visibility",0,a.visibility),Li(this,a,"visibility",d?"inherit":"hidden",u?"inherit":"hidden",!u)),p!=="scale"&&p!=="transform"&&(p=si[p],~p.indexOf(",")&&(p=p.split(",")[0]))),y=p in pi,y){if(this.styles.save(p),C=h,f==="string"&&h.substring(0,6)==="var(--"){if(h=Et(e,h.substring(4,h.indexOf(")"))),h.substring(0,5)==="calc("){var E=e.style.perspective;e.style.perspective=h,h=Et(e,"perspective"),E?e.style.perspective=E:Ni(e,"perspective")}u=parseFloat(h)}if(v||(b=e._gsap,b.renderTransform&&!t.parseTransform||Os(e,t.parseTransform),T=t.smoothOrigin!==!1&&b.smooth,v=this._pt=new mt(this._pt,a,Pe,0,1,b.renderTransform,b,0,-1),v.dep=1),p==="scale")this._pt=new mt(this._pt,b,"scaleY",b.scaleY,(x?Br(b.scaleY,x+u):u)-b.scaleY||0,yf),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){S.push(_t,0,a[_t]),h=vA(h),b.svg?Tf(e,h,0,T,0,this):(_=parseFloat(h.split(" ")[2])||0,_!==b.zOrigin&&Li(this,b,"zOrigin",b.zOrigin,_),Li(this,a,p,go(c),go(h)));continue}else if(p==="svgOrigin"){Tf(e,h,1,T,0,this);continue}else if(p in h_){SA(this,b,p,d,x?Br(d,x+h):h);continue}else if(p==="smoothOrigin"){Li(this,b,"smooth",b.smooth,h);continue}else if(p==="force3D"){b[p]=h;continue}else if(p==="transform"){CA(this,h,e);continue}}else p in a||(p=Vr(p)||p);if(y||(u||u===0)&&(d||d===0)&&!nA.test(h)&&p in a)g=(c+"").substr((d+"").length),u||(u=0),_=st(h)||(p in vt.units?vt.units[p]:g),g!==_&&(d=Hi(e,p,c,_)),this._pt=new mt(this._pt,y?b:a,p,d,(x?Br(d,x+u):u)-d,!y&&(_==="px"||p==="zIndex")&&t.autoRound!==!1?cA:yf),this._pt.u=_||0,y&&C!==h?(this._pt.b=c,this._pt.e=C,this._pt.r=lA):g!==_&&_!=="%"&&(this._pt.b=c,this._pt.r=aA);else if(p in a)yA.call(this,e,p,c,x?x+h:h);else if(p in e)this.add(e,p,c||e[p],x?x+h:h,s,n);else if(p!=="parseTransform"){$d(p,h);continue}y||(p in a?S.push(p,0,a[p]):typeof e[p]=="function"?S.push(p,2,e[p]()):S.push(p,1,c||e[p])),o.push(p)}}w&&X0(this)},render:function(e,t){if(t.tween._time||!_f())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:mi,aliases:si,getSetter:function(e,t,i){var s=si[t];return s&&s.indexOf(",")<0&&(t=s),t in pi&&t!==_t&&(e._gsap.x||mi(e,"x"))?i&&j0===i?t==="scale"?fA:dA:(j0=i||{})&&(t==="scale"?pA:mA):e.style&&!Nd(e.style[t])?hA:~t.indexOf("-")?uA:uf(e,t)},core:{_removeProperty:Ni,_getMatrix:wf}};gt.utils.checkPrefix=Vr,gt.core.getStyleSaver=t_,(function(r,e,t,i){var s=pt(r+","+e+","+t,function(n){pi[n]=1});pt(e,function(n){vt.units[n]="deg",h_[n]=1}),si[s[13]]=r+","+e,pt(i,function(n){var o=n.split(":");si[o[1]]=s[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),pt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){vt.units[r]="px"}),gt.registerPlugin(m_);var g_=gt.registerPlugin(m_)||gt;g_.core.Tween;class EA{id;type;options;params;timeline=null;lastTarget=null;constructor(e,t,i="gsap"){this.id=t.id||`gsap_${Math.random().toString(36).substr(2,9)}`,this.type=i,this.params=e,this.options={duration:t.duration,delay:t.delay??0,easing:t.easing??"none",iterCount:t.iterCount??1,id:this.id}}getTransform(e){return{}}getTargetCount(e){if(!e)return 0;const{type:t}=this.params;if(t==="character"){const i=(s,n=!1)=>{if(!s.children||s.children.length===0)return n?0:1;let o=0;for(const a of s.children)o+=i(a);return o};return i(e,!0)}else if(t==="word")return e.children?e.children.length:0;return 1}apply(e,t){const{duration:i,delay:s}=this.options,n=t-s;let o=this.lastTarget!==e||!this.timeline;const a=this.getCurrentTargets(e);if(!o&&this.timeline){const h=this.timeline.getChildren();if(h.length===0)e&&e.children&&e.children.length>0&&(o=!0);else{const u=h[0],d=typeof u.targets=="function"?u.targets():[],f=this.getTargetCount(e);if(d.length!==f)o=!0;else if(d&&d.length>0&&a.length>0)if(d[0]===e&&e.children&&e.children.length>0)o=!0;else for(let m=0;m<d.length;m++){const p=d[m];if(p.destroyed||!p.parent){o=!0;break}if(m<a.length&&p!==a[m]){o=!0;break}}else e&&e.children&&e.children.length>0&&(o=!0)}}if(o&&(this.initTimeline(e),this.lastTarget=e),!this.timeline)return;if(n<0){this.timeline.pause(0);return}const l=this.options.iterCount===1/0?i:i/this.options.iterCount;if(this.options.iterCount!==1/0&&n>=i){this.timeline.progress(1);return}const c=n%l/l;this.timeline.progress(c)}getCurrentTargets(e){if(!e||!e.children)return[e];const{type:t}=this.params;if(t==="character"){const i=(s,n=!1)=>{if(!s.children||s.children.length===0)return n?[]:[s];let o=[];for(const a of s.children)o=o.concat(i(a));return o};return i(e,!0)}else if(t==="word")return[...e.children||[]];return[e]}initTimeline(e){const{from:t,to:i,stagger:s,type:n}=this.params,o=this.options.duration/1e6;let a=[];if(e&&e.children)if(n==="character"){const l=(c,h=!1)=>{if(!c.children||c.children.length===0)return h?[]:[c];let u=[];for(const d of c.children)u=u.concat(l(d));return u};a=l(e,!0)}else n==="word"?a=e.children||[]:a=[e];else a=[e];if((n==="character"||n==="word")&&a.length===0){this.timeline&&(this.timeline.kill(),this.timeline=null);return}this.timeline&&this.timeline.kill(),this.timeline=g_.timeline({paused:!0}),this.timeline.fromTo(a,t,{duration:o,stagger:s||0,ease:this.options.easing,...i})}destroy(){this.timeline&&(this.timeline.kill(),this.timeline=null)}}const AA=(r,e)=>{const t=Math.max(r.duration/1e6,1);return e&&(e["0%"]||e["100%"])?new X(e,{...r,iterCount:t*3},"pulse"):new X({"0%":{scale:.9},"50%":{scale:1},"100%":{scale:.9}},{...r,easing:r.easing||"easeOutQuad",iterCount:t*3},"pulse")},PA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"fadeIn"):new X({"0%":{opacity:0,scale:.9},"100%":{opacity:1,scale:1}},{...r,easing:r.easing||"easeOutQuad"},"fadeIn"),IA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"fadeOut"):new X({"0%":{opacity:1},"100%":{opacity:0}},{...r,easing:r.easing||"easeInQuad"},"fadeOut"),MA=(r,e)=>{if(e&&(e["0%"]||e["100%"]))return new X(e,r,"slideIn");const t=e||{direction:"left"},i=t.distance||300,s={"100%":{x:0,y:0,opacity:1}};t.direction==="left"?s["0%"]={x:-i,opacity:0}:t.direction==="right"?s["0%"]={x:i,opacity:0}:t.direction==="top"?s["0%"]={y:-i,opacity:0}:t.direction==="bottom"?s["0%"]={y:i,opacity:0}:s["0%"]={x:-i,opacity:0};const n=new X(s,{...r,easing:r.easing||"easeOutCubic"},"slideIn");return n.presetParams=e,n},RA=(r,e)=>{if(e&&(e["0%"]||e["100%"]))return new X(e,r,"slideOut");const t=e||{direction:"left"},i=t.distance||300,s={"0%":{x:0,y:0,opacity:1}};t.direction==="left"?s["100%"]={x:-i,opacity:0}:t.direction==="right"?s["100%"]={x:i,opacity:0}:t.direction==="top"?s["100%"]={y:-i,opacity:0}:t.direction==="bottom"?s["100%"]={y:i,opacity:0}:s["100%"]={x:-i,opacity:0};const n=new X(s,{...r,easing:r.easing||"easeInCubic"},"slideOut");return n.presetParams=e,n},kA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"zoomIn"):new X({"0%":{scale:0,opacity:0},"100%":{scale:1,opacity:1}},{...r,easing:r.easing||"easeOutBack"},"zoomIn"),FA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"zoomOut"):new X({"0%":{scale:1,opacity:1},"100%":{scale:0,opacity:0}},{...r,easing:r.easing||"easeInBack"},"zoomOut"),UA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"blurIn"):new X({"0%":{blur:20,opacity:0},"100%":{blur:0,opacity:1}},{...r,easing:r.easing||"easeOutQuad"},"blurIn"),BA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"blurOut"):new X({"0%":{blur:0,opacity:1},"100%":{blur:20,opacity:0}},{...r,easing:r.easing||"easeInQuad"},"blurOut"),OA=(r,e)=>new EA({type:"character",from:{alpha:0},to:{alpha:1,duration:.001},stagger:e?.stagger??.05},{...r,easing:r.easing||"none"},"charTypewriter"),DA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"blurSlideRightIn"):new X({"0%":{blur:5,x:100,mirror:1},"100%":{blur:0,x:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"blurSlideRightIn"),zA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"wobbleZoomIn"):new X({"0%":{scale:1.2,angle:-5,mirror:1},"32%":{scale:1,angle:0,mirror:1},"64%":{scale:1.2,angle:-5,mirror:1},"100%":{scale:1,angle:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"wobbleZoomIn"),GA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"spinZoomIn"):new X({"0%":{blur:5,angle:45,scale:2,mirror:1},"100%":{blur:0,angle:0,scale:1,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"spinZoomIn"),NA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"blurSlideLeftIn"):new X({"0%":{x:-200,blur:10,mirror:1},"100%":{x:0,blur:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"blurSlideLeftIn"),LA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"blurSlideRightStrongIn"):new X({"0%":{x:200,blur:10,mirror:1},"100%":{x:0,blur:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"blurSlideRightStrongIn"),HA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"cinematicZoomSlideIn"):new X({"0%":{scale:.6,blur:30,x:200,mirror:1},"30%":{scale:.8,blur:20,x:50,mirror:1},"60%":{scale:.9,blur:10,x:0,mirror:1},"100%":{scale:1,blur:0,x:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"cinematicZoomSlideIn"),WA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"elasticTwistIn"):new X({"0%":{scale:1.4,blur:20,angle:10,mirror:1},"40%":{scale:1,blur:0,angle:0,mirror:1},"60%":{scale:1.3,blur:0,angle:-10,mirror:1},"100%":{scale:1,blur:0,angle:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"elasticTwistIn"),VA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"spinFadeIn"):new X({"0%":{blur:40,angle:80,mirror:1},"100%":{blur:0,angle:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"spinFadeIn"),$A=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"flashZoomIn"):new X({"0%":{scale:1,brightness:3,mirror:1},"40%":{scale:1,brightness:3,mirror:1},"80%":{scale:1.5,brightness:3,mirror:1},"100%":{scale:1,brightness:1,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"flashZoomIn"),XA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"tiltSlideRightOut"):new X({"0%":{angle:0,x:0,mirror:1},"70%":{angle:7,x:0,mirror:1},"100%":{angle:10,x:200,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"tiltSlideRightOut"),YA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"tiltZoomOut"):new X({"0%":{angle:0,scale:1,mirror:1},"100%":{angle:-10,scale:1.2,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"tiltZoomOut"),qA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"glitchSlideOut"):new X({"0%":{x:0,angle:0,mirror:1},"30%":{x:100,angle:-5,mirror:1},"70%":{x:100,angle:-20,mirror:1},"100%":{x:-100,angle:-20,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"glitchSlideOut"),KA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"dropBlurOut"):new X({"0%":{y:0,blur:0,mirror:1},"100%":{y:200,blur:20,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"dropBlurOut"),jA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"fallZoomOut"):new X({"0%":{y:0,scale:1,mirror:1},"100%":{y:250,scale:1.5,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"fallZoomOut"),ZA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"zoomSpinOut"):new X({"0%":{scale:1,angle:0,mirror:1},"100%":{scale:2,angle:10,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"zoomSpinOut"),JA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"dramaticSpinSlideOut"):new X({"0%":{x:0,angle:0,blur:0,mirror:1},"40%":{x:-200,angle:10,blur:5,mirror:1},"100%":{x:-200,angle:60,blur:20,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"dramaticSpinSlideOut");fe.register("fadeIn",PA),fe.register("fadeOut",IA),fe.register("slideIn",MA),fe.register("slideOut",RA),fe.register("zoomIn",kA),fe.register("zoomOut",FA),fe.register("charTypewriter",OA),fe.register("pulse",AA),fe.register("blurIn",UA),fe.register("blurOut",BA),fe.register("blurSlideRightIn",DA),fe.register("wobbleZoomIn",zA),fe.register("spinZoomIn",GA),fe.register("blurSlideLeftIn",NA),fe.register("blurSlideRightStrongIn",LA),fe.register("cinematicZoomSlideIn",HA),fe.register("elasticTwistIn",WA),fe.register("spinFadeIn",VA),fe.register("flashZoomIn",$A),fe.register("tiltSlideRightOut",XA),fe.register("tiltZoomOut",YA),fe.register("glitchSlideOut",qA),fe.register("dropBlurOut",KA),fe.register("fallZoomOut",jA),fe.register("zoomSpinOut",ZA),fe.register("dramaticSpinSlideOut",JA);function QA(r,e){switch(r){case"fadeIn":return{"0%":{opacity:0,scale:.9},"100%":{opacity:1,scale:1}};case"fadeOut":return{"0%":{opacity:1},"100%":{opacity:0}};case"zoomIn":return{"0%":{scale:0,opacity:0},"100%":{scale:1,opacity:1}};case"zoomOut":return{"0%":{scale:1,opacity:1},"100%":{scale:0,opacity:0}};case"slideIn":{const t=e?.direction||"left",i=e?.distance||300;return{"0%":{x:t==="left"?-i:t==="right"?i:0,y:t==="top"?-i:t==="bottom"?i:0,opacity:0},"100%":{x:0,y:0,opacity:1}}}case"slideOut":{const t=e?.direction||"left",i=e?.distance||300;return{"0%":{x:0,y:0,opacity:1},"100%":{x:t==="left"?-i:t==="right"?i:0,y:t==="top"?-i:t==="bottom"?i:0,opacity:0}}}case"pulse":return{"0%":{scale:.9},"50%":{scale:1},"100%":{scale:.9}};case"blurIn":return{"0%":{blur:20,opacity:0},"100%":{blur:0,opacity:1}};case"blurOut":return{"0%":{blur:0,opacity:1},"100%":{blur:20,opacity:0}};case"blurSlideRightIn":return{"0%":{blur:5,x:100,mirror:1},"100%":{blur:0,x:0,mirror:1}};case"wobbleZoomIn":return{"0%":{scale:1.2,angle:-5,mirror:1},"32%":{scale:1,angle:0,mirror:1},"64%":{scale:1.2,angle:-5,mirror:1},"100%":{scale:1,angle:0,mirror:1}};case"spinZoomIn":return{"0%":{blur:5,angle:45,scale:2,mirror:1},"100%":{blur:0,angle:0,scale:1,mirror:1}};case"blurSlideLeftIn":return{"0%":{x:-200,blur:10,mirror:1},"100%":{x:0,blur:0,mirror:1}};case"blurSlideRightStrongIn":return{"0%":{x:200,blur:10,mirror:1},"100%":{x:0,blur:0,mirror:1}};case"cinematicZoomSlideIn":return{"0%":{scale:.6,blur:30,x:200,mirror:1},"30%":{scale:.8,blur:20,x:50,mirror:1},"60%":{scale:.9,blur:10,x:0,mirror:1},"100%":{scale:1,blur:0,x:0,mirror:1}};case"elasticTwistIn":return{"0%":{scale:1.4,blur:20,angle:10,mirror:1},"40%":{scale:1,blur:0,angle:0,mirror:1},"60%":{scale:1.3,blur:0,angle:-10,mirror:1},"100%":{scale:1,blur:0,angle:0,mirror:1}};case"spinFadeIn":return{"0%":{blur:40,angle:80,mirror:1},"100%":{blur:0,angle:0,mirror:1}};case"flashZoomIn":return{"0%":{scale:1,brightness:3,mirror:1},"40%":{scale:1,brightness:3,mirror:1},"80%":{scale:1.5,brightness:3,mirror:1},"100%":{scale:1,brightness:1,mirror:1}};case"tiltSlideRightOut":return{"0%":{angle:0,x:0,mirror:1},"70%":{angle:7,x:0,mirror:1},"100%":{angle:10,x:200,mirror:1}};case"tiltZoomOut":return{"0%":{angle:0,scale:1,mirror:1},"100%":{angle:-10,scale:1.2,mirror:1}};case"glitchSlideOut":return{"0%":{x:0,angle:0,mirror:1},"30%":{x:100,angle:-5,mirror:1},"70%":{x:100,angle:-20,mirror:1},"100%":{x:-100,angle:-20,mirror:1}};case"dropBlurOut":return{"0%":{y:0,blur:0,mirror:1},"100%":{y:200,blur:20,mirror:1}};case"fallZoomOut":return{"0%":{y:0,scale:1,mirror:1},"100%":{y:250,scale:1.5,mirror:1}};case"zoomSpinOut":return{"0%":{scale:1,angle:0,mirror:1},"100%":{scale:2,angle:10,mirror:1}};case"dramaticSpinSlideOut":return{"0%":{x:0,angle:0,blur:0,mirror:1},"40%":{x:-200,angle:10,blur:5,mirror:1},"100%":{x:-200,angle:60,blur:20,mirror:1}};case"custom":default:return{"0%":{},"100%":{}}}}class eP extends Dd{id="";name="";display={from:0,to:0};duration=0;playbackRate=1;trim={from:0,to:0};constructor(){super()}_left=0;get left(){return this._left}set left(e){const t=this._left!==e;this._left=e,t&&this.emit("propsChange",{left:e})}_top=0;get top(){return this._top}set top(e){const t=this._top!==e;this._top=e,t&&this.emit("propsChange",{top:e})}_width=0;get width(){return this._width}set width(e){const t=this._width!==e;this._width=e,t&&this.emit("propsChange",{width:e})}_height=0;get height(){return this._height}set height(e){const t=this._height!==e;this._height=e,t&&this.emit("propsChange",{height:e})}_angle=0;get angle(){return this._angle}set angle(e){const t=this._angle!==e;this._angle=e,t&&this.emit("propsChange",{angle:e})}get center(){return{x:this.left+this.width/2,y:this.top+this.height/2}}_zIndex=0;get zIndex(){return this._zIndex}set zIndex(e){const t=this._zIndex!==e;this._zIndex=e,t&&this.emit("propsChange",{zIndex:e})}_opacity=1;get opacity(){return this._opacity}set opacity(e){const t=this._opacity!==e;this._opacity=e,t&&this.emit("propsChange",{opacity:e})}_volume=1;get volume(){return this._volume}set volume(e){const t=this._volume!==e;this._volume=e,t&&this.emit("propsChange",{volume:e})}flip=null;effects=[];_style={};get style(){return this._style}set style(e){this._style=e}animatKeyFrame=null;animatOpts=null;animations=[];renderTransform={x:0,y:0,width:0,height:0,scale:1,opacity:1,angle:0,blur:0,brightness:1,mirror:0};_render(e){const{center:t}=this;e.setTransform(this.flip==="horizontal"?-1:1,0,0,this.flip==="vertical"?-1:1,t.x,t.y),e.globalAlpha=this.opacity*(this.renderTransform.opacity??1)*(this.renderTransform.brightness??1);const i=this.renderTransform.x??0,s=this.renderTransform.y??0,n=this.renderTransform.angle??0,o=this.renderTransform.scale??1;e.translate(i,s),e.scale(o,o),e.rotate((this.flip==null?1:-1)*(n*Math.PI)/180)}setAnimation(e,t){this.animatKeyFrame=Object.entries(e).map(([i,s])=>{const n={from:0,to:100}[i]??Number(i.slice(0,-1));if(isNaN(n)||n>100||n<0)throw Error("keyFrame must between 0~100");return[n/100,s]}),this.animatOpts=Object.assign({},this.animatOpts,{duration:t.duration,delay:t.delay??0,iterCount:t.iterCount??1/0})}animate(e,t){this.renderTransform={x:0,y:0,width:0,height:0,scale:1,opacity:1,angle:0,blur:0,brightness:1,mirror:0};for(const s of this.animations){const n=s.getTransform(e);n.x!==void 0&&(this.renderTransform.x+=n.x),n.y!==void 0&&(this.renderTransform.y+=n.y),n.width!==void 0&&(this.renderTransform.width+=n.width),n.height!==void 0&&(this.renderTransform.height+=n.height),n.angle!==void 0&&(this.renderTransform.angle+=n.angle),n.blur!==void 0&&(this.renderTransform.blur+=n.blur),n.scale!==void 0&&(this.renderTransform.scale*=n.scale),n.opacity!==void 0&&(this.renderTransform.opacity*=n.opacity),n.brightness!==void 0&&(this.renderTransform.brightness*=n.brightness),n.mirror!==void 0&&(this.renderTransform.mirror=Math.max(this.renderTransform.mirror||0,n.mirror)),t&&s.apply&&s.apply(t,e)}if(this.animatKeyFrame==null||this.animatOpts==null||e<this.animatOpts.delay)return;const i=tP(e,this.animatKeyFrame,this.animatOpts);for(const s in i)switch(s){case"opacity":this.opacity=i[s];break;case"x":this.left=i[s];break;case"y":this.top=i[s];break;case"w":this.width=i[s];break;case"h":this.height=i[s];break;case"angle":this.angle=i[s];break}}addAnimation(e,t,i){const s=fe.create(e,t,i);return this.animations.push(s),s.id}removeAnimation(e){this.animations=this.animations.filter(t=>t.id!==e)}clearAnimations(){this.animations=[]}updateAnimation(e,t,i,s){const n=this.animations.findIndex(a=>a.id===e);if(n===-1)return;const o=fe.create(t,{...i,id:e},s);this.animations[n]=o}copyStateTo(e){e.animatKeyFrame=this.animatKeyFrame,e.animatOpts=this.animatOpts,e.zIndex=this.zIndex,e.opacity=this.opacity,e.volume=this.volume,e.flip=this.flip,e.left=this.left,e.top=this.top,e.width=this.width,e.height=this.height,e.angle=this.angle,e.display={...this.display},e.duration=this.duration,e.playbackRate=this.playbackRate,e.trim={...this.trim},e.style=JSON.parse(JSON.stringify(this.style||{})),e.animations=[...this.animations],"src"in this&&"src"in e&&(e.src=this.src)}update(e){Object.assign(this,e),this.emit("propsChange",e)}destroy(){this.all.clear()}}function tP(r,e,t){const i=r-t.delay,s=i%t.duration,n=i/t.duration>=t.iterCount||i===t.duration?1:s/t.duration,o=e.findIndex(f=>f[0]>=n);if(o===-1)return{};const a=e[o-1],l=e[o],c=l[1];if(a==null)return c;const h=a[1],u={},d=(n-a[0])/(l[0]-a[0]);for(const f in c){if(!Object.hasOwn(c,f)||typeof f!="string")continue;const m=f;h[m]!=null&&(u[m]=(c[m]-h[m])*d+h[m])}return u}class Wi extends eP{lastVf=null;destroyed=!1;src="";transition;constructor(){super()}async getFrame(e){const t=e*this.playbackRate,{video:i,audio:s,state:n}=await this.tick(t);let o=s??[];s!=null&&this.playbackRate!==1&&(o=s.map(l=>Zg(l,this.playbackRate)));let a=null;return i!=null?(this.lastVf?.close(),i instanceof VideoFrame?(a=await createImageBitmap(i),i.close()):a=i,this.lastVf=a):this.lastVf!=null&&(a=this.lastVf),{video:a,audio:o,done:n==="done"}}async offscreenRender(e,t){const i=t*this.playbackRate;this.animate(i),super._render(e);const{width:s,height:n}=this,{video:o,audio:a,state:l}=await this.tick(i);let c=a??[];if(a!=null&&this.playbackRate!==1&&(c=a.map(u=>Zg(u,this.playbackRate))),l==="done")return{audio:c,done:!0};const h=o??this.lastVf;if(h!=null){const u=this.style.borderRadius||0,d=this.style.dropShadow;if(e.save(),d&&(d.blur>0||d.distance>0)){const m=d.distance??0,p=d.angle??0;e.shadowColor=d.color||"#000000",e.shadowBlur=d.blur||0,e.shadowOffsetX=Math.cos(p)*m,e.shadowOffsetY=Math.sin(p)*m}if(u>0){const m=Math.min(u,s/2,n/2);e.beginPath(),e.roundRect(-s/2,-n/2,s,n,m),e.clip()}e.drawImage(h,-s/2,-n/2,s,n),e.restore();const f=this.style.stroke;if(f&&f.width>0){if(e.save(),e.strokeStyle=f.color,e.lineWidth=f.width,u>0){const m=Math.min(u,s/2,n/2);e.beginPath(),e.roundRect(-s/2,-n/2,s,n,m),e.stroke()}else e.strokeRect(-s/2,-n/2,s,n);e.restore()}}return o!=null&&(this.lastVf?.close(),o instanceof ImageBitmap&&(this.lastVf=o)),{audio:c,done:!1}}set(e,t=30){if(e.display&&(e.display.from!==void 0&&(this.display.from=e.display.from<1e6?e.display.from/t*1e6:e.display.from),e.display.to!==void 0&&(this.display.to=e.display.to<1e6?e.display.to/t*1e6:e.display.to)),e.x!==void 0&&(this.left=e.x),e.y!==void 0&&(this.top=e.y),e.width!==void 0&&(this.width=e.width),e.height!==void 0&&(this.height=e.height),e.duration!==void 0){const i=e.duration<1e6?e.duration/t*1e6:e.duration;this.duration=i,this.display.from!==void 0&&(this.display.to=this.display.from+i)}return this}toJSON(e=!1){const t=this.animatKeyFrame&&this.animatOpts?{keyFrames:this.animatKeyFrame.reduce((s,[n,o])=>{const a=n===0?"from":n===1?"to":`${Math.round(n*100)}%`;return s[a]=o,s},{}),opts:this.animatOpts}:void 0,i=this.animations.map(s=>({type:s.type,opts:s.options,params:s.params||{}}));return{type:this.constructor.name,id:this.id,name:this.name,src:this.src,display:{from:this.display.from,to:this.display.to},playbackRate:this.playbackRate,duration:this.duration,left:this.left,top:this.top,width:this.width,height:this.height,angle:this.angle,zIndex:this.zIndex,opacity:this.opacity,flip:this.flip,style:this.style,trim:{from:this.trim.from,to:this.trim.to},...t&&{animation:t},...i.length>0&&{animations:i},...e&&{main:!0}}}getVisibleHandles(){return["tl","tr","bl","br","ml","mr","mt","mb","rot"]}async scaleToFit(e,t){await this.ready;const{width:i,height:s}=this.meta;if(i===0||s===0)return;const n=Math.min(e/i,t/s);this.width=i*n,this.height=s*n}async scaleToFill(e,t){await this.ready;const{width:i,height:s}=this.meta;if(i===0||s===0)return;const n=Math.max(e/i,t/s);this.width=i*n,this.height=s*n}centerInScene(e,t){this.left=(e-this.width)/2,this.top=(t-this.height)/2}destroy(){this.destroyed||(this.destroyed=!0,se.info("BaseClip destroy"),super.destroy(),this.lastVf?.close(),this.lastVf=null)}}let Cf=null;async function __(){return Cf===null&&(Cf=N3()),await Cf}const ve={get codec(){return Qn()?.codec??"mp4a.40.2"},get codecType(){return Qn()?.codecType??"aac"},get sampleRate(){return Qn()?.sampleRate??48e3},get channelCount(){return Qn()?.channelCount??2}};class $r{static async getCacheKey(e){const i=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-1",i);return Array.from(new Uint8Array(s)).map(o=>o.toString(16).padStart(2,"0")).join("")}static getPath(e){return`assets/${e}`}static async get(e){const t=await this.getCacheKey(e),i=this.getPath(t),s=ir(i);return await s.exists()?s:null}static async put(e,t){const i=await this.getCacheKey(e),s=this.getPath(i),n=ir(s);return await Ir(n,t),n}}class Xr{resources=new Map;loadingPromises=new Map;async preload(e){const i=[...new Set(e)].filter(s=>s&&!s.startsWith("data:")&&!s.startsWith("blob:")).map(s=>this.loadResource(s));await Promise.allSettled(i)}static async getReadableStream(e){const t=await $r.get(e);if(t){const a=await t.getOriginFile();if(a)return a.stream()}const i=await fetch(e);if(!i.ok)throw new Error(`Failed to fetch: ${i.status} ${i.statusText}`);const s=i.body;if(!s)throw new Error("Response body is null");if(e.startsWith("data:")||e.startsWith("blob:"))return s;const[n,o]=s.tee();return $r.put(e,o).catch(a=>{console.error(`ResourceManager: Failed to cache ${e}`,a)}),n}static async getImageBitmap(e){const t=await $r.get(e);if(t){const l=await t.getOriginFile();if(l)return await createImageBitmap(l)}if(e.startsWith("data:")||e.startsWith("blob:")){const c=await(await fetch(e)).blob();return await createImageBitmap(c)}const i=await fetch(e);if(!i.ok)throw new Error(`Failed to fetch: ${i.status} ${i.statusText}`);const s=i.body;if(!s)throw new Error("Response body is null");const[n,o]=s.tee(),a=(async()=>{const c=await new Response(n).blob();return await createImageBitmap(c)})();return $r.put(e,o).catch(l=>{console.error(`ResourceManager: Failed to cache ${e}`,l)}),await a}async loadResource(e){const t=this.loadingPromises.get(e);if(t)return t;if(this.resources.has(e)){const s=this.resources.get(e);if(s.status==="completed")return s}const i=(async()=>{const s={url:e,status:"loading"};this.resources.set(e,s);try{const n=await $r.get(e);if(n)return s.status="completed",s.localFile=n,s;const o=await fetch(e);if(!o.ok)throw new Error(`Fetch failed: ${o.status}`);const a=o.body;if(!a)throw new Error("No body");const l=await $r.put(e,a);return s.status="completed",s.localFile=l,s}catch(n){return s.status="failed",s.error=n instanceof Error?n:new Error(String(n)),s}finally{this.loadingPromises.delete(e)}})();return this.loadingPromises.set(e,i),i}async resolve(e){if(!e||e.startsWith("data:")||e.startsWith("blob:"))return e;const t=await this.loadResource(e);return t.status==="completed"&&t.localFile?t.localFile:e}getStatus(e){return this.resources.get(e)}clear(){this.resources.clear(),this.loadingPromises.clear()}}class Gt extends Wi{type="Audio";static ctx=null;ready;_meta={duration:0,width:0,height:0};get meta(){return{...this._meta,sampleRate:ve.sampleRate,chanCount:2}}chan0Buf=new Float32Array;chan1Buf=new Float32Array;getPCMData(){return[this.chan0Buf,this.chan1Buf]}opts;loop=!1;static async fromUrl(e,t={}){const i=await Xr.getReadableStream(e),s=new Gt(i,t,e);return await s.ready,s}static async fromObject(e){if(e.type!=="Audio")throw new Error(`Expected Audio, got ${e.type}`);if(!e.src||e.src.trim()==="")throw new Error("Audio requires a valid source URL");const t={};e.loop!==void 0&&(t.loop=e.loop),e.volume!==void 0&&(t.volume=e.volume);const i=await Gt.fromUrl(e.src,t);return i.left=e.left,i.top=e.top,i.width=e.width,i.height=e.height,i.angle=e.angle,i.display.from=e.display.from,i.display.to=e.display.to,i.duration=e.duration,i.playbackRate=e.playbackRate,i.zIndex=e.zIndex,i.opacity=e.opacity,i.flip=e.flip,e.animation&&i.setAnimation(e.animation.keyFrames,e.animation.opts),i}constructor(e,t={},i){super(),this.src=i!==void 0?i:"",this.opts={loop:!1,volume:1,...t},this.loop=this.opts.loop??!1,this.volume=this.opts.volume??1,this.ready=this.init(e).then(s=>{const n={width:0,height:0,duration:t.loop?1/0:this._meta.duration};return this.width=this.width===0?n.width:this.width,this.height=this.height===0?n.height:this.height,this.duration=this.duration===0?n.duration:this.duration,this.display.to=this.display.from+this.duration,n})}async init(e){Gt.ctx==null&&(Gt.ctx=new AudioContext({sampleRate:ve.sampleRate}));const t=performance.now(),i=e instanceof ReadableStream?await rP(e,Gt.ctx):e;se.info("Audio clip decoded complete:",performance.now()-t),this._meta.duration=i[0].length/ve.sampleRate*1e6,this.chan0Buf=i[0],this.chan1Buf=i[1]??this.chan0Buf,se.info("Audio clip convert to AudioData, time:",performance.now()-t)}tickInterceptor=async(e,t)=>t;timestamp=0;frameOffset=0;async tick(e){if(!this.opts.loop&&e>=this._meta.duration)return await this.tickInterceptor(e,{audio:[],state:"done"});const t=e-this.timestamp;if(e<this.timestamp||t>3e6)return this.timestamp=e,this.frameOffset=Math.ceil(this.timestamp/1e6*ve.sampleRate),await this.tickInterceptor(e,{audio:[new Float32Array(0),new Float32Array(0)],state:"success"});this.timestamp=e;const i=Math.ceil(t/1e6*ve.sampleRate),s=this.frameOffset+i,n=this.opts.loop?[Ud(this.chan0Buf,this.frameOffset,s),Ud(this.chan1Buf,this.frameOffset,s)]:[this.chan0Buf.slice(this.frameOffset,s),this.chan1Buf.slice(this.frameOffset,s)];if(this.volume!==1)for(const o of n)for(let a=0;a<o.length;a++)o[a]*=this.volume;return this.frameOffset=s,await this.tickInterceptor(e,{audio:n,state:"success"})}async split(e){await this.ready;const t=Math.ceil(e/1e6*ve.sampleRate),i=new Gt(this.getPCMData().map(n=>n.slice(0,t)),this.opts,this.src),s=new Gt(this.getPCMData().map(n=>n.slice(t)),this.opts,this.src);return[i,s]}async clone(){await this.ready;const e=new Gt(this.getPCMData(),this.opts,this.src);return await e.ready,this.copyStateTo(e),e}destroy(){this.chan0Buf=new Float32Array(0),this.chan1Buf=new Float32Array(0),se.info("---- audioclip destroy ----"),super.destroy()}toJSON(e=!1){return{...super.toJSON(e),type:"Audio",loop:this.loop,id:this.id,volume:this.volume}}static concatAudio=iP;async createPlaybackElement(){if(await this.ready,!this.src||this.src.trim()==="")throw new Error("Audio requires a source URL for playback");const e=this.src.startsWith("blob:")?this.src:void 0,t=document.createElement("audio");return t.crossOrigin="anonymous",t.autoplay=!1,t.preload="auto",t.loop=this.opts.loop||!1,t.src=this.src,await new Promise((i,s)=>{const n=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",o),t.pause(),t.currentTime=0,i()},o=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",o),s(new Error("Failed to load audio"))};t.addEventListener("loadeddata",n,{once:!0}),t.addEventListener("error",o,{once:!0}),t.load()}),{element:t,objectUrl:e}}async play(e,t){const i=e;if(Math.abs(i.currentTime-t)>.1&&(i.currentTime=t),i.paused)try{await i.play()}catch{try{await i.play()}catch(n){console.warn("Failed to play audio:",n)}}}pause(e){e.pause()}async seek(e,t){const i=e;return i.pause(),i.currentTime=t,new Promise(s=>{if(Math.abs(i.currentTime-t)<.01){s();return}const n=()=>{i.removeEventListener("seeked",n),s()};i.addEventListener("seeked",n,{once:!0}),setTimeout(()=>{i.removeEventListener("seeked",n),s()},500)})}syncPlayback(e,t,i){const s=e,n=this.meta.duration/1e6,o=i>=0&&i<n;s.volume=this.volume,t&&o?s.paused&&this.play(s,i).catch(console.warn):(s.paused||s.pause(),o&&Math.abs(s.currentTime-i)>.1&&(s.currentTime=i))}cleanupPlayback(e,t){const i=e;i.pause(),i.removeAttribute("src"),i.load(),t&&t.startsWith("blob:")&&URL.revokeObjectURL(t)}}async function iP(r,e){const t=[];for(const i of r)await i.ready,t.push(i.getPCMData());return new Gt(qg(t),e)}async function rP(r,e){const t=await new Response(r).arrayBuffer();return Fd(await e.decodeAudioData(t))}var A=(r=>(r.Application="application",r.WebGLPipes="webgl-pipes",r.WebGLPipesAdaptor="webgl-pipes-adaptor",r.WebGLSystem="webgl-system",r.WebGPUPipes="webgpu-pipes",r.WebGPUPipesAdaptor="webgpu-pipes-adaptor",r.WebGPUSystem="webgpu-system",r.CanvasSystem="canvas-system",r.CanvasPipesAdaptor="canvas-pipes-adaptor",r.CanvasPipes="canvas-pipes",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r.MaskEffect="mask-effect",r.BlendMode="blend-mode",r.TextureSource="texture-source",r.Environment="environment",r.ShapeBuilder="shape-builder",r.Batcher="batcher",r))(A||{});const Ef=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},_o=(r,e)=>Ef(r).priority??e,J={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Ef).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...r){return r.map(Ef).forEach(e=>{e.type.forEach(t=>{const i=this._addHandlers,s=this._queue;i[t]?i[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e))})}),this},handle(r,e,t){const i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=e,s[r]=t;const n=this._queue;return n[r]&&(n[r]?.forEach(o=>e(o)),delete n[r]),this},handleByMap(r,e){return this.handle(r,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByNamedList(r,e,t=-1){return this.handle(r,i=>{e.findIndex(n=>n.name===i.name)>=0||(e.push({name:i.name,value:i.ref}),e.sort((n,o)=>_o(o.value,t)-_o(n.value,t)))},i=>{const s=e.findIndex(n=>n.name===i.name);s!==-1&&e.splice(s,1)})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>_o(n,t)-_o(s,t)))},i=>{const s=e.indexOf(i.ref);s!==-1&&e.splice(s,1)})},mixin(r,...e){for(const t of e)Object.defineProperties(r.prototype,Object.getOwnPropertyDescriptors(t))}},sP={extension:{type:A.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Promise.resolve().then(()=>KO)}},nP={extension:{type:A.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Promise.resolve().then(()=>jO)}};class ke{constructor(e,t,i){this._x=t||0,this._y=i||0,this._observer=e}clone(e){return new ke(e??this._observer,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}}function Af(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pf={exports:{}},x_;function oP(){return x_||(x_=1,(function(r){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(l,c,h){this.fn=l,this.context=c,this.once=h||!1}function n(l,c,h,u,d){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new s(h,u||l,d),m=t?t+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],f]:l._events[m].push(f):(l._events[m]=f,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)e.call(h,u)&&c.push(t?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},a.prototype.listeners=function(c){var h=t?t+c:c,u=this._events[h];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,f=u.length,m=new Array(f);d<f;d++)m[d]=u[d].fn;return m},a.prototype.listenerCount=function(c){var h=t?t+c:c,u=this._events[h];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,h,u,d,f,m){var p=t?t+c:c;if(!this._events[p])return!1;var g=this._events[p],_=arguments.length,x,y;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),_){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,h),!0;case 3:return g.fn.call(g.context,h,u),!0;case 4:return g.fn.call(g.context,h,u,d),!0;case 5:return g.fn.call(g.context,h,u,d,f),!0;case 6:return g.fn.call(g.context,h,u,d,f,m),!0}for(y=1,x=new Array(_-1);y<_;y++)x[y-1]=arguments[y];g.fn.apply(g.context,x)}else{var v=g.length,b;for(y=0;y<v;y++)switch(g[y].once&&this.removeListener(c,g[y].fn,void 0,!0),_){case 1:g[y].fn.call(g[y].context);break;case 2:g[y].fn.call(g[y].context,h);break;case 3:g[y].fn.call(g[y].context,h,u);break;case 4:g[y].fn.call(g[y].context,h,u,d);break;default:if(!x)for(b=1,x=new Array(_-1);b<_;b++)x[b-1]=arguments[b];g[y].fn.apply(g[y].context,x)}}return!0},a.prototype.on=function(c,h,u){return n(this,c,h,u,!1)},a.prototype.once=function(c,h,u){return n(this,c,h,u,!0)},a.prototype.removeListener=function(c,h,u,d){var f=t?t+c:c;if(!this._events[f])return this;if(!h)return o(this,f),this;var m=this._events[f];if(m.fn)m.fn===h&&(!d||m.once)&&(!u||m.context===u)&&o(this,f);else{for(var p=0,g=[],_=m.length;p<_;p++)(m[p].fn!==h||d&&!m[p].once||u&&m[p].context!==u)&&g.push(m[p]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(c){var h;return c?(h=t?t+c:c,this._events[h]&&o(this,h)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,r.exports=a})(Pf)),Pf.exports}var aP=oP();const At=Af(aP),lP=Math.PI*2,cP=180/Math.PI,hP=Math.PI/180;class K{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new K(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}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return If.x=0,If.y=0,If}}const If=new K;class L{constructor(e=1,t=0,i=0,s=1,n=0,o=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,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,i,s,n,o){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=o,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new K;const i=e.x,s=e.y;return t.x=this.a*i+this.c*s+this.tx,t.y=this.b*i+this.d*s+this.ty,t}applyInverse(e,t){t=t||new K;const i=this.a,s=this.b,n=this.c,o=this.d,a=this.tx,l=this.ty,c=1/(i*o+n*-s),h=e.x,u=e.y;return t.x=o*c*h+-n*c*u+(l*n-a*o)*c,t.y=i*c*u+-s*c*h+(-l*i+a*s)*c,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),i=Math.sin(e),s=this.a,n=this.c,o=this.tx;return this.a=s*t-this.b*i,this.b=s*i+this.b*t,this.c=n*t-this.d*i,this.d=n*i+this.d*t,this.tx=o*t-this.ty*i,this.ty=o*i+this.ty*t,this}append(e){const t=this.a,i=this.b,s=this.c,n=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*n+this.ty,this}appendFrom(e,t){const i=e.a,s=e.b,n=e.c,o=e.d,a=e.tx,l=e.ty,c=t.a,h=t.b,u=t.c,d=t.d;return this.a=i*c+s*u,this.b=i*h+s*d,this.c=n*c+o*u,this.d=n*h+o*d,this.tx=a*c+l*u+t.tx,this.ty=a*h+l*d+t.ty,this}setTransform(e,t,i,s,n,o,a,l,c){return this.a=Math.cos(a+c)*n,this.b=Math.sin(a+c)*n,this.c=-Math.sin(a-l)*o,this.d=Math.cos(a-l)*o,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*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 i=this.a,s=this.c;this.a=i*e.a+this.b*e.c,this.b=i*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,i=this.b,s=this.c,n=this.d,o=e.pivot,a=-Math.atan2(-s,n),l=Math.atan2(i,t),c=Math.abs(a+l);return c<1e-5||Math.abs(lP-c)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(o.x*t+o.y*s),e.position.y=this.ty+(o.x*i+o.y*n),e}invert(){const e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,o=e*s-t*i;return this.a=s/o,this.b=-t/o,this.c=-i/o,this.d=e/o,this.tx=(i*this.ty-s*n)/o,this.ty=-(e*this.ty-t*n)/o,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}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 L;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}equals(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}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return dP.identity()}static get shared(){return uP.identity()}}const uP=new L,dP=new L,dr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],fr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],pr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],mr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Mf=[],y_=[],xo=Math.sign;function fP(){for(let r=0;r<16;r++){const e=[];Mf.push(e);for(let t=0;t<16;t++){const i=xo(dr[r]*dr[t]+pr[r]*fr[t]),s=xo(fr[r]*dr[t]+mr[r]*fr[t]),n=xo(dr[r]*pr[t]+pr[r]*mr[t]),o=xo(fr[r]*pr[t]+mr[r]*mr[t]);for(let a=0;a<16;a++)if(dr[a]===i&&fr[a]===s&&pr[a]===n&&mr[a]===o){e.push(a);break}}}for(let r=0;r<16;r++){const e=new L;e.set(dr[r],fr[r],pr[r],mr[r],0,0),y_.push(e)}}fP();const be={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:r=>dr[r],uY:r=>fr[r],vX:r=>pr[r],vY:r=>mr[r],inv:r=>r&8?r&15:-r&7,add:(r,e)=>Mf[r][e],sub:(r,e)=>Mf[r][be.inv(e)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,e)=>Math.abs(r)*2<=Math.abs(e)?e>=0?be.S:be.N:Math.abs(e)*2<=Math.abs(r)?r>0?be.E:be.W:e>0?r>0?be.SE:be.SW:r>0?be.NE:be.NW,matrixAppendRotationInv:(r,e,t=0,i=0)=>{const s=y_[be.inv(e)];s.tx=t,s.ty=i,r.append(s)},transformRectCoords:(r,e,t,i)=>{const{x:s,y:n,width:o,height:a}=r,{x:l,y:c,width:h,height:u}=e;return t===be.E?(i.set(s+l,n+c,o,a),i):t===be.S?i.set(h-n-a+l,s+c,a,o):t===be.W?i.set(h-s-o+l,u-n-a+c,o,a):t===be.N?i.set(n+l,u-s-o+c,a,o):i.set(s+l,n+c,o,a)}},yo=[new K,new K,new K,new K];class Y{constructor(e=0,t=0,i=0,s=0){this.type="rectangle",this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new Y(0,0,0,0)}clone(){return new Y(this.x,this.y,this.width,this.height)}copyFromBounds(e){return this.x=e.minX,this.y=e.minY,this.width=e.maxX-e.minX,this.height=e.maxY-e.minY,this}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),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}strokeContains(e,t,i,s=.5){const{width:n,height:o}=this;if(n<=0||o<=0)return!1;const a=this.x,l=this.y,c=i*(1-s),h=i-c,u=a-c,d=a+n+c,f=l-c,m=l+o+c,p=a+h,g=a+n-h,_=l+h,x=l+o-h;return e>=u&&e<=d&&t>=f&&t<=m&&!(e>p&&e<g&&t>_&&t<x)}intersects(e,t){if(!t){const S=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=S)return!1;const E=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>E}const i=this.left,s=this.right,n=this.top,o=this.bottom;if(s<=i||o<=n)return!1;const a=yo[0].set(e.left,e.top),l=yo[1].set(e.left,e.bottom),c=yo[2].set(e.right,e.top),h=yo[3].set(e.right,e.bottom);if(c.x<=a.x||l.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(l,l),t.apply(c,c),t.apply(h,h),Math.max(a.x,l.x,c.x,h.x)<=i||Math.min(a.x,l.x,c.x,h.x)>=s||Math.max(a.y,l.y,c.y,h.y)<=n||Math.min(a.y,l.y,c.y,h.y)>=o))return!1;const d=u*(l.y-a.y),f=u*(a.x-l.x),m=d*i+f*n,p=d*s+f*n,g=d*i+f*o,_=d*s+f*o;if(Math.max(m,p,g,_)<=d*a.x+f*a.y||Math.min(m,p,g,_)>=d*h.x+f*h.y)return!1;const x=u*(a.y-c.y),y=u*(c.x-a.x),v=x*i+y*n,b=x*s+y*n,T=x*i+y*o,w=x*s+y*o;return!(Math.max(v,b,T,w)<=x*a.x+y*a.y||Math.min(v,b,T,w)>=x*h.x+y*h.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),i=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(e=1,t=.001){const i=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=i-this.x,this.height=s-this.y,this}scale(e,t=e){return this.x*=e,this.y*=t,this.width*=e,this.height*=t,this}enlarge(e){const t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=s,this.height=n-s,this}getBounds(e){return e||(e=new Y),e.copyFrom(this),e}containsRect(e){if(this.width<=0||this.height<=0)return!1;const t=e.x,i=e.y,s=e.x+e.width,n=e.y+e.height;return t>=this.x&&t<this.x+this.width&&i>=this.y&&i<this.y+this.height&&s>=this.x&&s<this.x+this.width&&n>=this.y&&n<this.y+this.height}set(e,t,i,s){return this.x=e,this.y=t,this.width=i,this.height=s,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const Rf={default:-1};function we(r="default"){return Rf[r]===void 0&&(Rf[r]=-1),++Rf[r]}const v_=new Set,ne="8.0.0",pP="8.3.4",Yr={quiet:!1,noColor:!1},$=(r,e,t=3)=>{if(Yr.quiet||v_.has(e))return;let i=new Error().stack;const s=`${e}
|
|
66
|
+
`.replace(/\t/g,"").replace(/#/g,"%23");return o.src=`data:image/svg+xml;charset=utf-8,${l}`,await new Promise(c=>{o.onload=c}),o}async function sE(r,e,t={}){const i=await rE(r,e,t),s=new OffscreenCanvas(i.width,i.height);return s.getContext("2d")?.drawImage(i,0,0,i.width,i.height),await createImageBitmap(s)}async function nE(r,e){const t={type:e,data:r},i=new ImageDecoder(t);await Promise.all([i.completed,i.tracks.ready]);const s=i.tracks.selectedTrack?.frameCount??1,n=[];for(let o=0;o<s;o+=1)n.push((await i.decode({frameIndex:o})).image);return n}let Dd=class{all=new Map;on(e,t){const i=this.all.get(e);return i?i.push(t):this.all.set(e,[t]),()=>this.off(e,t)}once(e,t){const i=this.on(e,s=>{i(),t(s)});return i}off(e,t){const i=this.all.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):this.all.set(e,[]))}emit(e,t){let i=this.all.get(e);i&&i.slice().forEach(s=>{s(t)}),i=this.all.get("*"),i&&i.slice().forEach(s=>{s(e,t)})}};const oE={x:{label:"X Position",min:-2e3,max:2e3,step:1,default:0},y:{label:"Y Position",min:-2e3,max:2e3,step:1,default:0},width:{label:"Width",min:-1e3,max:1e3,step:1,default:0},height:{label:"Height",min:-1e3,max:1e3,step:1,default:0},scale:{label:"Scale",min:0,max:3,step:.1,default:1},opacity:{label:"Opacity",min:0,max:1,step:.01,default:1},angle:{label:"Rotation",min:-360,max:360,step:1,default:0},blur:{label:"Blur",min:0,max:100,step:1,default:0},brightness:{label:"Brightness",min:0,max:5,step:.1,default:1},mirror:{label:"Mirror",min:0,max:1,step:1,default:0}},to={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>r*(2-r),easeInOutQuad:r=>r<.5?2*r*r:-1+(4-2*r)*r,easeInCubic:r=>r*r*r,easeOutCubic:r=>--r*r*r+1,easeInOutCubic:r=>r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1,easeInSine:r=>1-Math.cos(r*Math.PI/2),easeOutSine:r=>Math.sin(r*Math.PI/2),easeInOutSine:r=>.5*(1-Math.cos(Math.PI*r)),easeInExpo:r=>r===0?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>r===1?1:1-Math.pow(2,-10*r),easeInOutExpo:r=>r===0?0:r===1?1:(r/=.5)<1?.5*Math.pow(2,10*(r-1)):.5*(2-Math.pow(2,-10*--r)),easeInCirc:r=>1-Math.sqrt(1-r*r),easeOutCirc:r=>Math.sqrt(1-(r-1)*(r-1)),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-2)*r)+1)};function Qg(r){return typeof r=="function"?r:typeof r=="string"&&to[r]?to[r]:to.linear}class X{id;type;options;params;frames;constructor(e,t,i="keyframes"){this.id=t.id||`keyframe_${Math.random().toString(36).substr(2,9)}`,this.type=i,this.params=e,this.options={duration:t.duration,delay:t.delay??0,easing:t.easing??"linear",iterCount:t.iterCount??1,id:this.id},Array.isArray(e)?this.frames=e.map(s=>({progress:s.progress,props:s.props||s,easing:s.easing||"linear"})):this.frames=Object.entries(e).filter(([s])=>{if(s==="from"||s==="to")return!0;const n=Number(s.replace("%",""));return!isNaN(n)&&n>=0&&n<=100}).map(([s,n])=>{const o={from:0,to:100}[s]??Number(s.replace("%","")),{easing:a,...l}=n;return{progress:o/100,props:l,easing:a||"linear"}}).sort((s,n)=>s.progress-n.progress),this.frames.length>0&&this.frames[0].progress!==0&&this.frames.unshift({progress:0,props:{},easing:"linear"}),this.frames.length>0&&this.frames[this.frames.length-1].progress!==1&&this.frames.push({progress:1,props:{},easing:"linear"})}getTransform(e){const{duration:t,delay:i,iterCount:s}=this.options,n=e-i;if(n<0)return{};if(s!==1/0&&n>=t){const l=this.interpolateProps(1);return"mirror"in l&&(l.mirror=0),l}const o=s===1/0?t:t/s,a=n%o/o;return this.interpolateProps(a)}interpolateProps(e){const t=this.frames.findIndex(c=>c.progress>=e);if(t===-1)return this.frames[this.frames.length-1].props;if(t===0)return this.frames[0].props;const i=this.frames[t-1],s=this.frames[t],n=(e-i.progress)/(s.progress-i.progress),o=Qg(s.easing)(n),a={},l=new Set([...Object.keys(i.props),...Object.keys(s.props)]);for(const c of l){const h=c,u=h==="scale"||h==="opacity"?1:0,d=i.props[h]??u,f=s.props[h]??u;a[h]=d+(f-d)*o}return a}}class aE{factories=new Map;constructor(){this.register("keyframes",(e,t)=>new X(t,e))}register(e,t){this.factories.set(e,t)}create(e,t,i){const s=this.factories.get(e);if(!s)throw new Error(`Animation "${e}" not found in registry`);return s(t,i)}has(e){return this.factories.has(e)}}const fe=new aE;function di(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function e0(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var vt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Fr={duration:.5,overwrite:!1,delay:0},zd,Je,Ce,Ot=1e8,xe=1/Ot,Gd=Math.PI*2,lE=Gd/4,cE=0,t0=Math.sqrt,hE=Math.cos,uE=Math.sin,qe=function(e){return typeof e=="string"},Re=function(e){return typeof e=="function"},fi=function(e){return typeof e=="number"},Nd=function(e){return typeof e>"u"},ti=function(e){return typeof e=="object"},ft=function(e){return e!==!1},Ld=function(){return typeof window<"u"},io=function(e){return Re(e)||qe(e)},i0=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},rt=Array.isArray,dE=/random\([^)]+\)/g,fE=/,\s*/g,r0=/(?:-?\.?\d|\.)+/gi,s0=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Ur=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Hd=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,n0=/[+-]=-?[.\d]+/,pE=/[^,'"\[\]\s]+/gi,mE=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ee,ii,Wd,Vd,bt={},ro={},o0,a0=function(e){return(ro=Or(e,bt))&>},$d=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Ss=function(e,t){return!t&&console.warn(e)},l0=function(e,t){return e&&(bt[e]=t)&&ro&&(ro[e]=t)||bt},Cs=function(){return 0},gE={suppressEvents:!0,isStart:!0,kill:!1},so={suppressEvents:!0,kill:!1},_E={suppressEvents:!0},Xd={},Ui=[],Yd={},c0,wt={},qd={},h0=30,no=[],Kd="",jd=function(e){var t=e[0],i,s;if(ti(t)||Re(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(s=no.length;s--&&!no[s].targetTest(t););i=no[s]}for(s=e.length;s--;)e[s]&&(e[s]._gsap||(e[s]._gsap=new G0(e[s],i)))||e.splice(s,1);return e},rr=function(e){return e._gsap||jd(zt(e))[0]._gsap},u0=function(e,t,i){return(i=e[t])&&Re(i)?e[t]():Nd(i)&&e.getAttribute&&e.getAttribute(t)||i},pt=function(e,t){return(e=e.split(",")).forEach(t)||e},Oe=function(e){return Math.round(e*1e5)/1e5||0},Ae=function(e){return Math.round(e*1e7)/1e7||0},Br=function(e,t){var i=t.charAt(0),s=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+s:i==="-"?e-s:i==="*"?e*s:e/s},xE=function(e,t){for(var i=t.length,s=0;e.indexOf(t[s])<0&&++s<i;);return s<i},oo=function(){var e=Ui.length,t=Ui.slice(0),i,s;for(Yd={},Ui.length=0,i=0;i<e;i++)s=t[i],s&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},Zd=function(e){return!!(e._initted||e._startAt||e.add)},d0=function(e,t,i,s){Ui.length&&!Je&&oo(),e.render(t,i,!!(Je&&t<0&&Zd(e))),Ui.length&&!Je&&oo()},f0=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(pE).length<2?t:qe(e)?e.trim():e},p0=function(e){return e},Tt=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},yE=function(e){return function(t,i){for(var s in i)s in t||s==="duration"&&e||s==="ease"||(t[s]=i[s])}},Or=function(e,t){for(var i in t)e[i]=t[i];return e},m0=function r(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=ti(t[i])?r(e[i]||(e[i]={}),t[i]):t[i]);return e},ao=function(e,t){var i={},s;for(s in e)s in t||(i[s]=e[s]);return i},Es=function(e){var t=e.parent||Ee,i=e.keyframes?yE(rt(e.keyframes)):Tt;if(ft(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},vE=function(e,t){for(var i=e.length,s=i===t.length;s&&i--&&e[i]===t[i];);return i<0},g0=function(e,t,i,s,n){var o=e[s],a;if(n)for(a=t[n];o&&o[n]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[s]=t,t._prev=o,t.parent=t._dp=e,t},lo=function(e,t,i,s){i===void 0&&(i="_first"),s===void 0&&(s="_last");var n=t._prev,o=t._next;n?n._next=o:e[i]===t&&(e[i]=o),o?o._prev=n:e[s]===t&&(e[s]=n),t._next=t._prev=t.parent=null},Bi=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},sr=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},bE=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Jd=function(e,t,i,s){return e._startAt&&(Je?e._startAt.revert(so):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,s))},wE=function r(e){return!e||e._ts&&r(e.parent)},_0=function(e){return e._repeat?Dr(e._tTime,e=e.duration()+e._rDelay)*e:0},Dr=function(e,t){var i=Math.floor(e=Ae(e/t));return e&&i===e?i-1:i},co=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},ho=function(e){return e._end=Ae(e._start+(e._tDur/Math.abs(e._ts||e._rts||xe)||0))},uo=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Ae(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),ho(e),i._dirty||sr(i,e)),e},x0=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=co(e.rawTime(),t),(!t._dur||Ps(0,t.totalDuration(),i)-t._tTime>xe)&&t.render(i,!0)),sr(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-xe}},ri=function(e,t,i,s){return t.parent&&Bi(t),t._start=Ae((fi(i)?i:i||e!==Ee?Dt(e,i,t):e._time)+t._delay),t._end=Ae(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),g0(e,t,"_first","_last",e._sort?"_start":0),Qd(t)||(e._recent=t),s||x0(e,t),e._ts<0&&uo(e,e._tTime),e},y0=function(e,t){return(bt.ScrollTrigger||$d("scrollTrigger",t))&&bt.ScrollTrigger.create(t,e)},v0=function(e,t,i,s,n){if(cf(e,t,n),!e._initted)return 1;if(!i&&e._pt&&!Je&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&c0!==Ct.frame)return Ui.push(e),e._lazy=[n,s],1},TE=function r(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||r(t))},Qd=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},SE=function(e,t,i,s){var n=e.ratio,o=t<0||!t&&(!e._start&&TE(e)&&!(!e._initted&&Qd(e))||(e._ts<0||e._dp._ts<0)&&!Qd(e))?0:1,a=e._rDelay,l=0,c,h,u;if(a&&e._repeat&&(l=Ps(0,e._tDur,t),h=Dr(l,a),e._yoyo&&h&1&&(o=1-o),h!==Dr(e._tTime,a)&&(n=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==n||Je||s||e._zTime===xe||!t&&e._zTime){if(!e._initted&&v0(e,t,s,i,l))return;for(u=e._zTime,e._zTime=t||(i?xe:0),i||(i=t&&!u),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,c=e._pt;c;)c.r(o,c.d),c=c._next;t<0&&Jd(e,t,i,!0),e._onUpdate&&!i&&St(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&St(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Bi(e,1),!i&&!Je&&(St(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},CE=function(e,t,i){var s;if(i>t)for(s=e._first;s&&s._start<=i;){if(s.data==="isPause"&&s._start>t)return s;s=s._next}else for(s=e._last;s&&s._start>=i;){if(s.data==="isPause"&&s._start<t)return s;s=s._prev}},zr=function(e,t,i,s){var n=e._repeat,o=Ae(t)||0,a=e._tTime/e._tDur;return a&&!s&&(e._time*=o/e._dur),e._dur=o,e._tDur=n?n<0?1e10:Ae(o*(n+1)+e._rDelay*n):o,a>0&&!s&&uo(e,e._tTime=e._tDur*a),e.parent&&ho(e),i||sr(e.parent,e),e},b0=function(e){return e instanceof ct?sr(e):zr(e,e._dur)},EE={_start:0,endTime:Cs,totalDuration:Cs},Dt=function r(e,t,i){var s=e.labels,n=e._recent||EE,o=e.duration()>=Ot?n.endTime(!1):e._dur,a,l,c;return qe(t)&&(isNaN(t)||t in s)?(l=t.charAt(0),c=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?n._start:n.endTime(n._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(a<0?n:i).totalDuration()/100:1)):a<0?(t in s||(s[t]=o),s[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),c&&i&&(l=l/100*(rt(i)?i[0]:i).totalDuration()),a>1?r(e,t.substr(0,a-1),i)+l:o+l)):t==null?o:+t},As=function(e,t,i){var s=fi(t[1]),n=(s?2:1)+(e<2?0:1),o=t[n],a,l;if(s&&(o.duration=t[1]),o.parent=i,e){for(a=o,l=i;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=ft(l.vars.inherit)&&l.parent;o.immediateRender=ft(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[n-1]}return new Le(t[0],o,t[n+1])},Oi=function(e,t){return e||e===0?t(e):t},Ps=function(e,t,i){return i<e?e:i>t?t:i},st=function(e,t){return!qe(e)||!(t=mE.exec(e))?"":t[1]},AE=function(e,t,i){return Oi(i,function(s){return Ps(e,t,s)})},ef=[].slice,w0=function(e,t){return e&&ti(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&ti(e[0]))&&!e.nodeType&&e!==ii},PE=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(s){var n;return qe(s)&&!t||w0(s,1)?(n=i).push.apply(n,zt(s)):i.push(s)})||i},zt=function(e,t,i){return Ce&&!t&&Ce.selector?Ce.selector(e):qe(e)&&!i&&(Wd||!Nr())?ef.call((t||Vd).querySelectorAll(e),0):rt(e)?PE(e,i):w0(e)?ef.call(e,0):e?[e]:[]},tf=function(e){return e=zt(e)[0]||Ss("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return zt(t,i.querySelectorAll?i:i===e?Ss("Invalid scope")||Vd.createElement("div"):e)}},T0=function(e){return e.sort(function(){return .5-Math.random()})},S0=function(e){if(Re(e))return e;var t=ti(e)?e:{each:e},i=nr(t.ease),s=t.from||0,n=parseFloat(t.base)||0,o={},a=s>0&&s<1,l=isNaN(s)||a,c=t.axis,h=s,u=s;return qe(s)?h=u={center:.5,edges:.5,end:1}[s]||0:!a&&l&&(h=s[0],u=s[1]),function(d,f,m){var p=(m||t).length,g=o[p],_,x,y,v,b,T,w,S,C;if(!g){if(C=t.grid==="auto"?0:(t.grid||[1,Ot])[1],!C){for(w=-Ot;w<(w=m[C++].getBoundingClientRect().left)&&C<p;);C<p&&C--}for(g=o[p]=[],_=l?Math.min(C,p)*h-.5:s%C,x=C===Ot?0:l?p*u/C-.5:s/C|0,w=0,S=Ot,T=0;T<p;T++)y=T%C-_,v=x-(T/C|0),g[T]=b=c?Math.abs(c==="y"?v:y):t0(y*y+v*v),b>w&&(w=b),b<S&&(S=b);s==="random"&&T0(g),g.max=w-S,g.min=S,g.v=p=(parseFloat(t.amount)||parseFloat(t.each)*(C>p?p-1:c?c==="y"?p/C:C:Math.max(C,p/C))||0)*(s==="edges"?-1:1),g.b=p<0?n-p:n,g.u=st(t.amount||t.each)||0,i=i&&p<0?O0(i):i}return p=(g[d]-g.min)/g.max||0,Ae(g.b+(i?i(p):p)*g.v)+g.u}},rf=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var s=Ae(Math.round(parseFloat(i)/e)*e*t);return(s-s%1)/t+(fi(i)?0:st(i))}},C0=function(e,t){var i=rt(e),s,n;return!i&&ti(e)&&(s=i=e.radius||Ot,e.values?(e=zt(e.values),(n=!fi(e[0]))&&(s*=s)):e=rf(e.increment)),Oi(t,i?Re(e)?function(o){return n=e(o),Math.abs(n-o)<=s?n:o}:function(o){for(var a=parseFloat(n?o.x:o),l=parseFloat(n?o.y:0),c=Ot,h=0,u=e.length,d,f;u--;)n?(d=e[u].x-a,f=e[u].y-l,d=d*d+f*f):d=Math.abs(e[u]-a),d<c&&(c=d,h=u);return h=!s||c<=s?e[h]:o,n||h===o||fi(o)?h:h+st(o)}:rf(e))},E0=function(e,t,i,s){return Oi(rt(e)?!t:i===!0?!!(i=0):!s,function(){return rt(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(s=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*s)/s})},IE=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(s){return t.reduce(function(n,o){return o(n)},s)}},ME=function(e,t){return function(i){return e(parseFloat(i))+(t||st(i))}},RE=function(e,t,i){return P0(e,t,0,1,i)},A0=function(e,t,i){return Oi(i,function(s){return e[~~t(s)]})},kE=function r(e,t,i){var s=t-e;return rt(e)?A0(e,r(0,e.length),t):Oi(i,function(n){return(s+(n-e)%s)%s+e})},FE=function r(e,t,i){var s=t-e,n=s*2;return rt(e)?A0(e,r(0,e.length-1),t):Oi(i,function(o){return o=(n+(o-e)%n)%n||0,e+(o>s?n-o:o)})},Is=function(e){return e.replace(dE,function(t){var i=t.indexOf("[")+1,s=t.substring(i||7,i?t.indexOf("]"):t.length-1).split(fE);return E0(i?s:+s[0],i?0:+s[1],+s[2]||1e-5)})},P0=function(e,t,i,s,n){var o=t-e,a=s-i;return Oi(n,function(l){return i+((l-e)/o*a||0)})},UE=function r(e,t,i,s){var n=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!n){var o=qe(e),a={},l,c,h,u,d;if(i===!0&&(s=1)&&(i=null),o)e={p:e},t={p:t};else if(rt(e)&&!rt(t)){for(h=[],u=e.length,d=u-2,c=1;c<u;c++)h.push(r(e[c-1],e[c]));u--,n=function(m){m*=u;var p=Math.min(d,~~m);return h[p](m-p)},i=t}else s||(e=Or(rt(e)?[]:{},e));if(!h){for(l in t)af.call(a,e,l,"get",t[l]);n=function(m){return df(m,a)||(o?e.p:e)}}}return Oi(i,n)},I0=function(e,t,i){var s=e.labels,n=Ot,o,a,l;for(o in s)a=s[o]-t,a<0==!!i&&a&&n>(a=Math.abs(a))&&(l=o,n=a);return l},St=function(e,t,i){var s=e.vars,n=s[t],o=Ce,a=e._ctx,l,c,h;if(n)return l=s[t+"Params"],c=s.callbackScope||e,i&&Ui.length&&oo(),a&&(Ce=a),h=l?n.apply(c,l):n.call(c),Ce=o,h},Ms=function(e){return Bi(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Je),e.progress()<1&&St(e,"onInterrupt"),e},Gr,M0=[],R0=function(e){if(e)if(e=!e.name&&e.default||e,Ld()||e.headless){var t=e.name,i=Re(e),s=t&&!i&&e.init?function(){this._props=[]}:e,n={init:Cs,render:df,add:af,kill:jE,modifier:KE,rawVars:0},o={targetTest:0,get:0,getSetter:uf,aliases:{},register:0};if(Nr(),e!==s){if(wt[t])return;Tt(s,Tt(ao(e,n),o)),Or(s.prototype,Or(n,ao(e,o))),wt[s.prop=t]=s,e.targetTest&&(no.push(s),Xd[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}l0(t,s),e.register&&e.register(gt,s,mt)}else M0.push(e)},ye=255,Rs={aqua:[0,ye,ye],lime:[0,ye,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ye],navy:[0,0,128],white:[ye,ye,ye],olive:[128,128,0],yellow:[ye,ye,0],orange:[ye,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ye,0,0],pink:[ye,192,203],cyan:[0,ye,ye],transparent:[ye,ye,ye,0]},sf=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*ye+.5|0},k0=function(e,t,i){var s=e?fi(e)?[e>>16,e>>8&ye,e&ye]:0:Rs.black,n,o,a,l,c,h,u,d,f,m;if(!s){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Rs[e])s=Rs[e];else if(e.charAt(0)==="#"){if(e.length<6&&(n=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+n+n+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return s=parseInt(e.substr(1,6),16),[s>>16,s>>8&ye,s&ye,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),s=[e>>16,e>>8&ye,e&ye]}else if(e.substr(0,3)==="hsl"){if(s=m=e.match(r0),!t)l=+s[0]%360/360,c=+s[1]/100,h=+s[2]/100,o=h<=.5?h*(c+1):h+c-h*c,n=h*2-o,s.length>3&&(s[3]*=1),s[0]=sf(l+1/3,n,o),s[1]=sf(l,n,o),s[2]=sf(l-1/3,n,o);else if(~e.indexOf("="))return s=e.match(s0),i&&s.length<4&&(s[3]=1),s}else s=e.match(r0)||Rs.transparent;s=s.map(Number)}return t&&!m&&(n=s[0]/ye,o=s[1]/ye,a=s[2]/ye,u=Math.max(n,o,a),d=Math.min(n,o,a),h=(u+d)/2,u===d?l=c=0:(f=u-d,c=h>.5?f/(2-u-d):f/(u+d),l=u===n?(o-a)/f+(o<a?6:0):u===o?(a-n)/f+2:(n-o)/f+4,l*=60),s[0]=~~(l+.5),s[1]=~~(c*100+.5),s[2]=~~(h*100+.5)),i&&s.length<4&&(s[3]=1),s},F0=function(e){var t=[],i=[],s=-1;return e.split(Di).forEach(function(n){var o=n.match(Ur)||[];t.push.apply(t,o),i.push(s+=o.length+1)}),t.c=i,t},U0=function(e,t,i){var s="",n=(e+s).match(Di),o=t?"hsla(":"rgba(",a=0,l,c,h,u;if(!n)return e;if(n=n.map(function(d){return(d=k0(d,t,1))&&o+(t?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),i&&(h=F0(e),l=i.c,l.join(s)!==h.c.join(s)))for(c=e.replace(Di,"1").split(Ur),u=c.length-1;a<u;a++)s+=c[a]+(~l.indexOf(a)?n.shift()||o+"0,0,0,0)":(h.length?h:n.length?n:i).shift());if(!c)for(c=e.split(Di),u=c.length-1;a<u;a++)s+=c[a]+n[a];return s+c[u]},Di=(function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Rs)r+="|"+e+"\\b";return new RegExp(r+")","gi")})(),BE=/hsl[a]?\(/,B0=function(e){var t=e.join(" "),i;if(Di.lastIndex=0,Di.test(t))return i=BE.test(t),e[1]=U0(e[1],i),e[0]=U0(e[0],i,F0(e[1])),!0},ks,Ct=(function(){var r=Date.now,e=500,t=33,i=r(),s=i,n=1e3/240,o=n,a=[],l,c,h,u,d,f,m=function p(g){var _=r()-s,x=g===!0,y,v,b,T;if((_>e||_<0)&&(i+=_-t),s+=_,b=s-i,y=b-o,(y>0||x)&&(T=++u.frame,d=b-u.time*1e3,u.time=b=b/1e3,o+=y+(y>=n?4:n-y),v=1),x||(l=c(p)),v)for(f=0;f<a.length;f++)a[f](b,d,T,g)};return u={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(g){return d/(1e3/(g||60))},wake:function(){o0&&(!Wd&&Ld()&&(ii=Wd=window,Vd=ii.document||{},bt.gsap=gt,(ii.gsapVersions||(ii.gsapVersions=[])).push(gt.version),a0(ro||ii.GreenSockGlobals||!ii.gsap&&ii||{}),M0.forEach(R0)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&u.sleep(),c=h||function(g){return setTimeout(g,o-u.time*1e3+1|0)},ks=1,m(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),ks=0,c=Cs},lagSmoothing:function(g,_){e=g||1/0,t=Math.min(_||33,e)},fps:function(g){n=1e3/(g||240),o=u.time*1e3+n},add:function(g,_,x){var y=_?function(v,b,T,w){g(v,b,T,w),u.remove(y)}:g;return u.remove(g),a[x?"unshift":"push"](y),Nr(),y},remove:function(g,_){~(_=a.indexOf(g))&&a.splice(_,1)&&f>=_&&f--},_listeners:a},u})(),Nr=function(){return!ks&&Ct.wake()},oe={},OE=/^[\d.\-M][\d.\-,\s]/,DE=/["']/g,zE=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),s=i[0],n=1,o=i.length,a,l,c;n<o;n++)l=i[n],a=n!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),t[s]=isNaN(c)?c.replace(DE,"").trim():+c,s=l.substr(a+1).trim();return t},GE=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),s=e.indexOf("(",t);return e.substring(t,~s&&s<i?e.indexOf(")",i+1):i)},NE=function(e){var t=(e+"").split("("),i=oe[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[zE(t[1])]:GE(e).split(",").map(f0)):oe._CE&&OE.test(e)?oe._CE("",e):i},O0=function(e){return function(t){return 1-e(1-t)}},D0=function r(e,t){for(var i=e._first,s;i;)i instanceof ct?r(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?r(i.timeline,t):(s=i._ease,i._ease=i._yEase,i._yEase=s,i._yoyo=t)),i=i._next},nr=function(e,t){return e&&(Re(e)?e:oe[e]||NE(e))||t},or=function(e,t,i,s){i===void 0&&(i=function(l){return 1-t(1-l)}),s===void 0&&(s=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var n={easeIn:t,easeOut:i,easeInOut:s},o;return pt(e,function(a){oe[a]=bt[a]=n,oe[o=a.toLowerCase()]=i;for(var l in n)oe[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=oe[a+"."+l]=n[l]}),n},z0=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},nf=function r(e,t,i){var s=t>=1?t:1,n=(i||(e?.3:.45))/(t<1?t:1),o=n/Gd*(Math.asin(1/s)||0),a=function(h){return h===1?1:s*Math.pow(2,-10*h)*uE((h-o)*n)+1},l=e==="out"?a:e==="in"?function(c){return 1-a(1-c)}:z0(a);return n=Gd/n,l.config=function(c,h){return r(e,c,h)},l},of=function r(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},s=e==="out"?i:e==="in"?function(n){return 1-i(1-n)}:z0(i);return s.config=function(n){return r(e,n)},s};pt("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,e){var t=e<5?e+1:e;or(r+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})}),oe.Linear.easeNone=oe.none=oe.Linear.easeIn,or("Elastic",nf("in"),nf("out"),nf()),(function(r,e){var t=1/e,i=2*t,s=2.5*t,n=function(a){return a<t?r*a*a:a<i?r*Math.pow(a-1.5/e,2)+.75:a<s?r*(a-=2.25/e)*a+.9375:r*Math.pow(a-2.625/e,2)+.984375};or("Bounce",function(o){return 1-n(1-o)},n)})(7.5625,2.75),or("Expo",function(r){return Math.pow(2,10*(r-1))*r+r*r*r*r*r*r*(1-r)}),or("Circ",function(r){return-(t0(1-r*r)-1)}),or("Sine",function(r){return r===1?1:-hE(r*lE)+1}),or("Back",of("in"),of("out"),of()),oe.SteppedEase=oe.steps=bt.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,s=e+(t?0:1),n=t?1:0,o=1-xe;return function(a){return((s*Ps(0,o,a)|0)+n)*i}}},Fr.ease=oe["quad.out"],pt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return Kd+=r+","+r+"Params,"});var G0=function(e,t){this.id=cE++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:u0,this.set=t?t.getSetter:uf},Fs=(function(){function r(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,zr(this,+t.duration,1,1),this.data=t.data,Ce&&(this._ctx=Ce,Ce.data.push(this)),ks||Ct.wake()}var e=r.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,zr(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,s){if(Nr(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(uo(this,i),!n._dp||n.parent||x0(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&ri(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!s||this._initted&&Math.abs(this._zTime)===xe||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),d0(this,i,s)),this},e.time=function(i,s){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+_0(this))%(this._dur+this._rDelay)||(i?this._dur:0),s):this._time},e.totalProgress=function(i,s){return arguments.length?this.totalTime(this.totalDuration()*i,s):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,s){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+_0(this),s):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,s){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*n,s):this._repeat?Dr(this._tTime,n)+1:1},e.timeScale=function(i,s){if(!arguments.length)return this._rts===-xe?0:this._rts;if(this._rts===i)return this;var n=this.parent&&this._ts?co(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-xe?0:this._rts,this.totalTime(Ps(-Math.abs(this._delay),this.totalDuration(),n),s!==!1),ho(this),bE(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Nr(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==xe&&(this._tTime-=xe)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=Ae(i);var s=this.parent||this._dp;return s&&(s._sort||!this.parent)&&ri(s,this,this._start-this._delay),this}return this._start},e.endTime=function(i){return this._start+(ft(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var s=this.parent||this._dp;return s?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?co(s.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=_E);var s=Je;return Je=i,Zd(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),Je=s,this},e.globalTime=function(i){for(var s=this,n=arguments.length?i:s.rawTime();s;)n=s._start+n/(Math.abs(s._ts)||1),s=s._dp;return!this.parent&&this._sat?this._sat.globalTime(i):n},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,b0(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var s=this._time;return this._rDelay=i,b0(this),s?this.time(s):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,s){return this.totalTime(Dt(this,i),ft(s))},e.restart=function(i,s){return this.play().totalTime(i?-this._delay:0,ft(s)),this._dur||(this._zTime=-xe),this},e.play=function(i,s){return i!=null&&this.seek(i,s),this.reversed(!1).paused(!1)},e.reverse=function(i,s){return i!=null&&this.seek(i||this.totalDuration(),s),this.reversed(!0).paused(!1)},e.pause=function(i,s){return i!=null&&this.seek(i,s),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-xe:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-xe,this},e.isActive=function(){var i=this.parent||this._dp,s=this._start,n;return!!(!i||this._ts&&this._initted&&i.isActive()&&(n=i.rawTime(!0))>=s&&n<this.endTime(!0)-xe)},e.eventCallback=function(i,s,n){var o=this.vars;return arguments.length>1?(s?(o[i]=s,n&&(o[i+"Params"]=n),i==="onUpdate"&&(this._onUpdate=s)):delete o[i],this):o[i]},e.then=function(i){var s=this,n=s._prom;return new Promise(function(o){var a=Re(i)?i:p0,l=function(){var h=s.then;s.then=null,n&&n(),Re(a)&&(a=a(s))&&(a.then||a===s)&&(s.then=h),o(a),s.then=h};s._initted&&s.totalProgress()===1&&s._ts>=0||!s._tTime&&s._ts<0?l():s._prom=l})},e.kill=function(){Ms(this)},r})();Tt(Fs.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-xe,_prom:0,_ps:!1,_rts:1});var ct=(function(r){e0(e,r);function e(i,s){var n;return i===void 0&&(i={}),n=r.call(this,i)||this,n.labels={},n.smoothChildTiming=!!i.smoothChildTiming,n.autoRemoveChildren=!!i.autoRemoveChildren,n._sort=ft(i.sortChildren),Ee&&ri(i.parent||Ee,di(n),s),i.reversed&&n.reverse(),i.paused&&n.paused(!0),i.scrollTrigger&&y0(di(n),i.scrollTrigger),n}var t=e.prototype;return t.to=function(s,n,o){return As(0,arguments,this),this},t.from=function(s,n,o){return As(1,arguments,this),this},t.fromTo=function(s,n,o,a){return As(2,arguments,this),this},t.set=function(s,n,o){return n.duration=0,n.parent=this,Es(n).repeatDelay||(n.repeat=0),n.immediateRender=!!n.immediateRender,new Le(s,n,Dt(this,o),1),this},t.call=function(s,n,o){return ri(this,Le.delayedCall(0,s,n),o)},t.staggerTo=function(s,n,o,a,l,c,h){return o.duration=n,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=h,o.parent=this,new Le(s,o,Dt(this,l)),this},t.staggerFrom=function(s,n,o,a,l,c,h){return o.runBackwards=1,Es(o).immediateRender=ft(o.immediateRender),this.staggerTo(s,n,o,a,l,c,h)},t.staggerFromTo=function(s,n,o,a,l,c,h,u){return a.startAt=o,Es(a).immediateRender=ft(a.immediateRender),this.staggerTo(s,n,a,l,c,h,u)},t.render=function(s,n,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=s<=0?0:Ae(s),u=this._zTime<0!=s<0&&(this._initted||!c),d,f,m,p,g,_,x,y,v,b,T,w;if(this!==Ee&&h>l&&s>=0&&(h=l),h!==this._tTime||o||u){if(a!==this._time&&c&&(h+=this._time-a,s+=this._time-a),d=h,v=this._start,y=this._ts,_=!y,u&&(c||(a=this._zTime),(s||!n)&&(this._zTime=s)),this._repeat){if(T=this._yoyo,g=c+this._rDelay,this._repeat<-1&&s<0)return this.totalTime(g*100+s,n,o);if(d=Ae(h%g),h===l?(p=this._repeat,d=c):(b=Ae(h/g),p=~~b,p&&p===b&&(d=c,p--),d>c&&(d=c)),b=Dr(this._tTime,g),!a&&this._tTime&&b!==p&&this._tTime-b*g-this._dur<=0&&(b=p),T&&p&1&&(d=c-d,w=1),p!==b&&!this._lock){var S=T&&b&1,C=S===(T&&p&1);if(p<b&&(S=!S),a=S?0:h%c?c:h,this._lock=1,this.render(a||(w?0:Ae(p*g)),n,!c)._lock=0,this._tTime=h,!n&&this.parent&&St(this,"onRepeat"),this.vars.repeatRefresh&&!w&&(this.invalidate()._lock=1,b=p),a&&a!==this._time||_!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,C&&(this._lock=2,a=S?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!w&&this.invalidate()),this._lock=0,!this._ts&&!_)return this;D0(this,w)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(x=CE(this,Ae(a),Ae(d)),x&&(h-=d-(d=x._start))),this._tTime=h,this._time=d,this._act=!y,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=s,a=0),!a&&h&&c&&!n&&!b&&(St(this,"onStart"),this._tTime!==h))return this;if(d>=a&&s>=0)for(f=this._first;f;){if(m=f._next,(f._act||d>=f._start)&&f._ts&&x!==f){if(f.parent!==this)return this.render(s,n,o);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,n,o),d!==this._time||!this._ts&&!_){x=0,m&&(h+=this._zTime=-xe);break}}f=m}else{f=this._last;for(var E=s<0?s:d;f;){if(m=f._prev,(f._act||E<=f._end)&&f._ts&&x!==f){if(f.parent!==this)return this.render(s,n,o);if(f.render(f._ts>0?(E-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(E-f._start)*f._ts,n,o||Je&&Zd(f)),d!==this._time||!this._ts&&!_){x=0,m&&(h+=this._zTime=E?-xe:xe);break}}f=m}}if(x&&!n&&(this.pause(),x.render(d>=a?0:-xe)._zTime=d>=a?1:-1,this._ts))return this._start=v,ho(this),this.render(s,n,o);this._onUpdate&&!n&&St(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&a)&&(v===this._start||Math.abs(y)!==Math.abs(this._ts))&&(this._lock||((s||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&Bi(this,1),!n&&!(s<0&&!a)&&(h||a||!l)&&(St(this,h===l&&s>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(s,n){var o=this;if(fi(n)||(n=Dt(this,n,s)),!(s instanceof Fs)){if(rt(s))return s.forEach(function(a){return o.add(a,n)}),this;if(qe(s))return this.addLabel(s,n);if(Re(s))s=Le.delayedCall(0,s);else return this}return this!==s?ri(this,s,n):this},t.getChildren=function(s,n,o,a){s===void 0&&(s=!0),n===void 0&&(n=!0),o===void 0&&(o=!0),a===void 0&&(a=-Ot);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Le?n&&l.push(c):(o&&l.push(c),s&&l.push.apply(l,c.getChildren(!0,n,o)))),c=c._next;return l},t.getById=function(s){for(var n=this.getChildren(1,1,1),o=n.length;o--;)if(n[o].vars.id===s)return n[o]},t.remove=function(s){return qe(s)?this.removeLabel(s):Re(s)?this.killTweensOf(s):(s.parent===this&&lo(this,s),s===this._recent&&(this._recent=this._last),sr(this))},t.totalTime=function(s,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ae(Ct.time-(this._ts>0?s/this._ts:(this.totalDuration()-s)/-this._ts))),r.prototype.totalTime.call(this,s,n),this._forcing=0,this):this._tTime},t.addLabel=function(s,n){return this.labels[s]=Dt(this,n),this},t.removeLabel=function(s){return delete this.labels[s],this},t.addPause=function(s,n,o){var a=Le.delayedCall(0,n||Cs,o);return a.data="isPause",this._hasPause=1,ri(this,a,Dt(this,s))},t.removePause=function(s){var n=this._first;for(s=Dt(this,s);n;)n._start===s&&n.data==="isPause"&&Bi(n),n=n._next},t.killTweensOf=function(s,n,o){for(var a=this.getTweensOf(s,o),l=a.length;l--;)zi!==a[l]&&a[l].kill(s,n);return this},t.getTweensOf=function(s,n){for(var o=[],a=zt(s),l=this._first,c=fi(n),h;l;)l instanceof Le?xE(l._targets,a)&&(c?(!zi||l._initted&&l._ts)&&l.globalTime(0)<=n&&l.globalTime(l.totalDuration())>n:!n||l.isActive())&&o.push(l):(h=l.getTweensOf(a,n)).length&&o.push.apply(o,h),l=l._next;return o},t.tweenTo=function(s,n){n=n||{};var o=this,a=Dt(o,s),l=n,c=l.startAt,h=l.onStart,u=l.onStartParams,d=l.immediateRender,f,m=Le.to(o,Tt({ease:n.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:n.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||xe,onStart:function(){if(o.pause(),!f){var g=n.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());m._dur!==g&&zr(m,g,0,1).render(m._time,!0,!0),f=1}h&&h.apply(m,u||[])}},n));return d?m.render(0):m},t.tweenFromTo=function(s,n,o){return this.tweenTo(n,Tt({startAt:{time:Dt(this,s)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(s){return s===void 0&&(s=this._time),I0(this,Dt(this,s))},t.previousLabel=function(s){return s===void 0&&(s=this._time),I0(this,Dt(this,s),1)},t.currentLabel=function(s){return arguments.length?this.seek(s,!0):this.previousLabel(this._time+xe)},t.shiftChildren=function(s,n,o){o===void 0&&(o=0);var a=this._first,l=this.labels,c;for(s=Ae(s);a;)a._start>=o&&(a._start+=s,a._end+=s),a=a._next;if(n)for(c in l)l[c]>=o&&(l[c]+=s);return sr(this)},t.invalidate=function(s){var n=this._first;for(this._lock=0;n;)n.invalidate(s),n=n._next;return r.prototype.invalidate.call(this,s)},t.clear=function(s){s===void 0&&(s=!0);for(var n=this._first,o;n;)o=n._next,this.remove(n),n=o;return this._dp&&(this._time=this._tTime=this._pTime=0),s&&(this.labels={}),sr(this)},t.totalDuration=function(s){var n=0,o=this,a=o._last,l=Ot,c,h,u;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-s:s));if(o._dirty){for(u=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),h=a._start,h>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,ri(o,a,h-a._delay,1)._lock=0):l=h,h<0&&a._ts&&(n-=h,(!u&&!o._dp||u&&u.smoothChildTiming)&&(o._start+=Ae(h/o._ts),o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),l=0),a._end>n&&a._ts&&(n=a._end),a=c;zr(o,o===Ee&&o._time>n?o._time:n,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(s){if(Ee._ts&&(d0(Ee,co(s,Ee)),c0=Ct.frame),Ct.frame>=h0){h0+=vt.autoSleep||120;var n=Ee._first;if((!n||!n._ts)&&vt.autoSleep&&Ct._listeners.length<2){for(;n&&!n._ts;)n=n._next;n||Ct.sleep()}}},e})(Fs);Tt(ct.prototype,{_lock:0,_hasPause:0,_forcing:0});var LE=function(e,t,i,s,n,o,a){var l=new mt(this._pt,e,t,0,1,$0,null,n),c=0,h=0,u,d,f,m,p,g,_,x;for(l.b=i,l.e=s,i+="",s+="",(_=~s.indexOf("random("))&&(s=Is(s)),o&&(x=[i,s],o(x,e,t),i=x[0],s=x[1]),d=i.match(Hd)||[];u=Hd.exec(s);)m=u[0],p=s.substring(c,u.index),f?f=(f+1)%5:p.substr(-5)==="rgba("&&(f=1),m!==d[h++]&&(g=parseFloat(d[h-1])||0,l._pt={_next:l._pt,p:p||h===1?p:",",s:g,c:m.charAt(1)==="="?Br(g,m)-g:parseFloat(m)-g,m:f&&f<4?Math.round:0},c=Hd.lastIndex);return l.c=c<s.length?s.substring(c,s.length):"",l.fp=a,(n0.test(s)||_)&&(l.e=0),this._pt=l,l},af=function(e,t,i,s,n,o,a,l,c,h){Re(s)&&(s=s(n||0,e,o));var u=e[t],d=i!=="get"?i:Re(u)?c?e[t.indexOf("set")||!Re(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():u,f=Re(u)?c?XE:W0:hf,m;if(qe(s)&&(~s.indexOf("random(")&&(s=Is(s)),s.charAt(1)==="="&&(m=Br(d,s)+(st(d)||0),(m||m===0)&&(s=m))),!h||d!==s||lf)return!isNaN(d*s)&&s!==""?(m=new mt(this._pt,e,t,+d||0,s-(d||0),typeof u=="boolean"?qE:V0,0,f),c&&(m.fp=c),a&&m.modifier(a,this,e),this._pt=m):(!u&&!(t in e)&&$d(t,s),LE.call(this,e,t,d,s,f,l||vt.stringFilter,c))},HE=function(e,t,i,s,n){if(Re(e)&&(e=Us(e,n,t,i,s)),!ti(e)||e.style&&e.nodeType||rt(e)||i0(e))return qe(e)?Us(e,n,t,i,s):e;var o={},a;for(a in e)o[a]=Us(e[a],n,t,i,s);return o},N0=function(e,t,i,s,n,o){var a,l,c,h;if(wt[e]&&(a=new wt[e]).init(n,a.rawVars?t[e]:HE(t[e],s,n,o,i),i,s,o)!==!1&&(i._pt=l=new mt(i._pt,n,e,0,1,a.render,a,0,a.priority),i!==Gr))for(c=i._ptLookup[i._targets.indexOf(n)],h=a._props.length;h--;)c[a._props[h]]=l;return a},zi,lf,cf=function r(e,t,i){var s=e.vars,n=s.ease,o=s.startAt,a=s.immediateRender,l=s.lazy,c=s.onUpdate,h=s.runBackwards,u=s.yoyoEase,d=s.keyframes,f=s.autoRevert,m=e._dur,p=e._startAt,g=e._targets,_=e.parent,x=_&&_.data==="nested"?_.vars.targets:g,y=e._overwrite==="auto"&&!zd,v=e.timeline,b,T,w,S,C,E,P,F,B,G,j,R,I;if(v&&(!d||!n)&&(n="none"),e._ease=nr(n,Fr.ease),e._yEase=u?O0(nr(u===!0?n:u,Fr.ease)):0,u&&e._yoyo&&!e._repeat&&(u=e._yEase,e._yEase=e._ease,e._ease=u),e._from=!v&&!!s.runBackwards,!v||d&&!s.stagger){if(F=g[0]?rr(g[0]).harness:0,R=F&&s[F.prop],b=ao(s,Xd),p&&(p._zTime<0&&p.progress(1),t<0&&h&&a&&!f?p.render(-1,!0):p.revert(h&&m?so:gE),p._lazy=0),o){if(Bi(e._startAt=Le.set(g,Tt({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!p&&ft(l),startAt:null,delay:0,onUpdate:c&&function(){return St(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Je||!a&&!f)&&e._startAt.revert(so),a&&m&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(h&&m&&!p){if(t&&(a=!1),w=Tt({overwrite:!1,data:"isFromStart",lazy:a&&!p&&ft(l),immediateRender:a,stagger:0,parent:_},b),R&&(w[F.prop]=R),Bi(e._startAt=Le.set(g,w)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Je?e._startAt.revert(so):e._startAt.render(-1,!0)),e._zTime=t,!a)r(e._startAt,xe,xe);else if(!t)return}for(e._pt=e._ptCache=0,l=m&&ft(l)||l&&!m,T=0;T<g.length;T++){if(C=g[T],P=C._gsap||jd(g)[T]._gsap,e._ptLookup[T]=G={},Yd[P.id]&&Ui.length&&oo(),j=x===g?T:x.indexOf(C),F&&(B=new F).init(C,R||b,e,j,x)!==!1&&(e._pt=S=new mt(e._pt,C,B.name,0,1,B.render,B,0,B.priority),B._props.forEach(function(V){G[V]=S}),B.priority&&(E=1)),!F||R)for(w in b)wt[w]&&(B=N0(w,b,e,j,C,x))?B.priority&&(E=1):G[w]=S=af.call(e,C,w,"get",b[w],j,x,0,s.stringFilter);e._op&&e._op[T]&&e.kill(C,e._op[T]),y&&e._pt&&(zi=e,Ee.killTweensOf(C,G,e.globalTime(t)),I=!e.parent,zi=0),e._pt&&l&&(Yd[P.id]=1)}E&&X0(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!I,d&&t<=0&&v.render(Ot,!0,!0)},WE=function(e,t,i,s,n,o,a,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],h,u,d,f;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(h=d[f][t],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==t&&h.fp!==t;)h=h._next;if(!h)return lf=1,e.vars[t]="+=0",cf(e,a),lf=0,l?Ss(t+" not eligible for reset"):1;c.push(h)}for(f=c.length;f--;)u=c[f],h=u._pt||u,h.s=(s||s===0)&&!n?s:h.s+(s||0)+o*h.c,h.c=i-h.s,u.e&&(u.e=Oe(i)+st(u.e)),u.b&&(u.b=h.s+st(u.b))},VE=function(e,t){var i=e[0]?rr(e[0]).harness:0,s=i&&i.aliases,n,o,a,l;if(!s)return t;n=Or({},t);for(o in s)if(o in n)for(l=s[o].split(","),a=l.length;a--;)n[l[a]]=n[o];return n},$E=function(e,t,i,s){var n=t.ease||s||"power1.inOut",o,a;if(rt(t))a=i[e]||(i[e]=[]),t.forEach(function(l,c){return a.push({t:c/(t.length-1)*100,v:l,e:n})});else for(o in t)a=i[o]||(i[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:n})},Us=function(e,t,i,s,n){return Re(e)?e.call(t,i,s,n):qe(e)&&~e.indexOf("random(")?Is(e):e},L0=Kd+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",H0={};pt(L0+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return H0[r]=1});var Le=(function(r){e0(e,r);function e(i,s,n,o){var a;typeof s=="number"&&(n.duration=s,s=n,n=null),a=r.call(this,o?s:Es(s))||this;var l=a.vars,c=l.duration,h=l.delay,u=l.immediateRender,d=l.stagger,f=l.overwrite,m=l.keyframes,p=l.defaults,g=l.scrollTrigger,_=l.yoyoEase,x=s.parent||Ee,y=(rt(i)||i0(i)?fi(i[0]):"length"in s)?[i]:zt(i),v,b,T,w,S,C,E,P;if(a._targets=y.length?jd(y):Ss("GSAP target "+i+" not found. https://gsap.com",!vt.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=f,m||d||io(c)||io(h)){if(s=a.vars,v=a.timeline=new ct({data:"nested",defaults:p||{},targets:x&&x.data==="nested"?x.vars.targets:y}),v.kill(),v.parent=v._dp=di(a),v._start=0,d||io(c)||io(h)){if(w=y.length,E=d&&S0(d),ti(d))for(S in d)~L0.indexOf(S)&&(P||(P={}),P[S]=d[S]);for(b=0;b<w;b++)T=ao(s,H0),T.stagger=0,_&&(T.yoyoEase=_),P&&Or(T,P),C=y[b],T.duration=+Us(c,di(a),b,C,y),T.delay=(+Us(h,di(a),b,C,y)||0)-a._delay,!d&&w===1&&T.delay&&(a._delay=h=T.delay,a._start+=h,T.delay=0),v.to(C,T,E?E(b,C,y):0),v._ease=oe.none;v.duration()?c=h=0:a.timeline=0}else if(m){Es(Tt(v.vars.defaults,{ease:"none"})),v._ease=nr(m.ease||s.ease||"none");var F=0,B,G,j;if(rt(m))m.forEach(function(R){return v.to(y,R,">")}),v.duration();else{T={};for(S in m)S==="ease"||S==="easeEach"||$E(S,m[S],T,m.easeEach);for(S in T)for(B=T[S].sort(function(R,I){return R.t-I.t}),F=0,b=0;b<B.length;b++)G=B[b],j={ease:G.e,duration:(G.t-(b?B[b-1].t:0))/100*c},j[S]=G.v,v.to(y,j,F),F+=j.duration;v.duration()<c&&v.to({},{duration:c-v.duration()})}}c||a.duration(c=v.duration())}else a.timeline=0;return f===!0&&!zd&&(zi=di(a),Ee.killTweensOf(y),zi=0),ri(x,di(a),n),s.reversed&&a.reverse(),s.paused&&a.paused(!0),(u||!c&&!m&&a._start===Ae(x._time)&&ft(u)&&wE(di(a))&&x.data!=="nested")&&(a._tTime=-xe,a.render(Math.max(0,-h)||0)),g&&y0(di(a),g),a}var t=e.prototype;return t.render=function(s,n,o){var a=this._time,l=this._tDur,c=this._dur,h=s<0,u=s>l-xe&&!h?l:s<xe?0:s,d,f,m,p,g,_,x,y,v;if(!c)SE(this,s,n,o);else if(u!==this._tTime||!s||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(d=u,y=this.timeline,this._repeat){if(p=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(p*100+s,n,o);if(d=Ae(u%p),u===l?(m=this._repeat,d=c):(g=Ae(u/p),m=~~g,m&&m===g?(d=c,m--):d>c&&(d=c)),_=this._yoyo&&m&1,_&&(v=this._yEase,d=c-d),g=Dr(this._tTime,p),d===a&&!o&&this._initted&&m===g)return this._tTime=u,this;m!==g&&(y&&this._yEase&&D0(y,_),this.vars.repeatRefresh&&!_&&!this._lock&&d!==p&&this._initted&&(this._lock=o=1,this.render(Ae(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(v0(this,h?s:d,o,n,u))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==g))return this;if(c!==this._dur)return this.render(s,n,o)}if(this._tTime=u,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(v||this._ease)(d/c),this._from&&(this.ratio=x=1-x),!a&&u&&!n&&!g&&(St(this,"onStart"),this._tTime!==u))return this;for(f=this._pt;f;)f.r(x,f.d),f=f._next;y&&y.render(s<0?s:y._dur*y._ease(d/this._dur),n,o)||this._startAt&&(this._zTime=s),this._onUpdate&&!n&&(h&&Jd(this,s,n,o),St(this,"onUpdate")),this._repeat&&m!==g&&this.vars.onRepeat&&!n&&this.parent&&St(this,"onRepeat"),(u===this._tDur||!u)&&this._tTime===u&&(h&&!this._onUpdate&&Jd(this,s,!0,!0),(s||!c)&&(u===this._tDur&&this._ts>0||!u&&this._ts<0)&&Bi(this,1),!n&&!(h&&!a)&&(u||a||_)&&(St(this,u===l?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(s){return(!s||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(s),r.prototype.invalidate.call(this,s)},t.resetTo=function(s,n,o,a,l){ks||Ct.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||cf(this,c),h=this._ease(c/this._dur),WE(this,s,n,o,a,h,c,l)?this.resetTo(s,n,o,a,1):(uo(this,0),this.parent||g0(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(s,n){if(n===void 0&&(n="all"),!s&&(!n||n==="all"))return this._lazy=this._pt=0,this.parent?Ms(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Je),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(s,n,zi&&zi.vars.overwrite!==!0)._first||Ms(this),this.parent&&o!==this.timeline.totalDuration()&&zr(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=s?zt(s):a,c=this._ptLookup,h=this._pt,u,d,f,m,p,g,_;if((!n||n==="all")&&vE(a,l))return n==="all"&&(this._pt=0),Ms(this);for(u=this._op=this._op||[],n!=="all"&&(qe(n)&&(p={},pt(n,function(x){return p[x]=1}),n=p),n=VE(a,n)),_=a.length;_--;)if(~l.indexOf(a[_])){d=c[_],n==="all"?(u[_]=n,m=d,f={}):(f=u[_]=u[_]||{},m=n);for(p in m)g=d&&d[p],g&&((!("kill"in g.d)||g.d.kill(p)===!0)&&lo(this,g,"_pt"),delete d[p]),f!=="all"&&(f[p]=1)}return this._initted&&!this._pt&&h&&Ms(this),this},e.to=function(s,n){return new e(s,n,arguments[2])},e.from=function(s,n){return As(1,arguments)},e.delayedCall=function(s,n,o,a){return new e(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:s,onComplete:n,onReverseComplete:n,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(s,n,o){return As(2,arguments)},e.set=function(s,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new e(s,n)},e.killTweensOf=function(s,n,o){return Ee.killTweensOf(s,n,o)},e})(Fs);Tt(Le.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),pt("staggerTo,staggerFrom,staggerFromTo",function(r){Le[r]=function(){var e=new ct,t=ef.call(arguments,0);return t.splice(r==="staggerFromTo"?5:4,0,0),e[r].apply(e,t)}});var hf=function(e,t,i){return e[t]=i},W0=function(e,t,i){return e[t](i)},XE=function(e,t,i,s){return e[t](s.fp,i)},YE=function(e,t,i){return e.setAttribute(t,i)},uf=function(e,t){return Re(e[t])?W0:Nd(e[t])&&e.setAttribute?YE:hf},V0=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},qE=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},$0=function(e,t){var i=t._pt,s="";if(!e&&t.b)s=t.b;else if(e===1&&t.e)s=t.e;else{for(;i;)s=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+s,i=i._next;s+=t.c}t.set(t.t,t.p,s,t)},df=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},KE=function(e,t,i,s){for(var n=this._pt,o;n;)o=n._next,n.p===s&&n.modifier(e,t,i),n=o},jE=function(e){for(var t=this._pt,i,s;t;)s=t._next,t.p===e&&!t.op||t.op===e?lo(this,t,"_pt"):t.dep||(i=1),t=s;return!i},ZE=function(e,t,i,s){s.mSet(e,t,s.m.call(s.tween,i,s.mt),s)},X0=function(e){for(var t=e._pt,i,s,n,o;t;){for(i=t._next,s=n;s&&s.pr>t.pr;)s=s._next;(t._prev=s?s._prev:o)?t._prev._next=t:n=t,(t._next=s)?s._prev=t:o=t,t=i}e._pt=n},mt=(function(){function r(t,i,s,n,o,a,l,c,h){this.t=i,this.s=n,this.c=o,this.p=s,this.r=a||V0,this.d=l||this,this.set=c||hf,this.pr=h||0,this._next=t,t&&(t._prev=this)}var e=r.prototype;return e.modifier=function(i,s,n){this.mSet=this.mSet||this.set,this.set=ZE,this.m=i,this.mt=n,this.tween=s},r})();pt(Kd+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return Xd[r]=1}),bt.TweenMax=bt.TweenLite=Le,bt.TimelineLite=bt.TimelineMax=ct,Ee=new ct({sortChildren:!1,defaults:Fr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),vt.stringFilter=B0;var ar=[],fo={},JE=[],Y0=0,QE=0,ff=function(e){return(fo[e]||JE).map(function(t){return t()})},pf=function(){var e=Date.now(),t=[];e-Y0>2&&(ff("matchMediaInit"),ar.forEach(function(i){var s=i.queries,n=i.conditions,o,a,l,c;for(a in s)o=ii.matchMedia(s[a]).matches,o&&(l=1),o!==n[a]&&(n[a]=o,c=1);c&&(i.revert(),l&&t.push(i))}),ff("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(s){return i.add(null,s)})}),Y0=e,ff("matchMedia"))},q0=(function(){function r(t,i){this.selector=i&&tf(i),this.data=[],this._r=[],this.isReverted=!1,this.id=QE++,t&&this.add(t)}var e=r.prototype;return e.add=function(i,s,n){Re(i)&&(n=s,s=i,i=Re);var o=this,a=function(){var c=Ce,h=o.selector,u;return c&&c!==o&&c.data.push(o),n&&(o.selector=tf(n)),Ce=o,u=s.apply(o,arguments),Re(u)&&o._r.push(u),Ce=c,o.selector=h,o.isReverted=!1,u};return o.last=a,i===Re?a(o,function(l){return o.add(null,l)}):i?o[i]=a:a},e.ignore=function(i){var s=Ce;Ce=null,i(this),Ce=s},e.getTweens=function(){var i=[];return this.data.forEach(function(s){return s instanceof r?i.push.apply(i,s.getTweens()):s instanceof Le&&!(s.parent&&s.parent.data==="nested")&&i.push(s)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,s){var n=this;if(i?(function(){for(var a=n.getTweens(),l=n.data.length,c;l--;)c=n.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(h){return a.splice(a.indexOf(h),1)}));for(a.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,u){return u.g-h.g||-1/0}).forEach(function(h){return h.t.revert(i)}),l=n.data.length;l--;)c=n.data[l],c instanceof ct?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof Le)&&c.revert&&c.revert(i);n._r.forEach(function(h){return h(i,n)}),n.isReverted=!0})():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),s)for(var o=ar.length;o--;)ar[o].id===this.id&&ar.splice(o,1)},e.revert=function(i){this.kill(i||{})},r})(),eA=(function(){function r(t){this.contexts=[],this.scope=t,Ce&&Ce.data.push(this)}var e=r.prototype;return e.add=function(i,s,n){ti(i)||(i={matches:i});var o=new q0(0,n||this.scope),a=o.conditions={},l,c,h;Ce&&!o.selector&&(o.selector=Ce.selector),this.contexts.push(o),s=o.add("onMatch",s),o.queries=i;for(c in i)c==="all"?h=1:(l=ii.matchMedia(i[c]),l&&(ar.indexOf(o)<0&&ar.push(o),(a[c]=l.matches)&&(h=1),l.addListener?l.addListener(pf):l.addEventListener("change",pf)));return h&&s(o,function(u){return o.add(null,u)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(s){return s.kill(i,!0)})},r})(),po={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(s){return R0(s)})},timeline:function(e){return new ct(e)},getTweensOf:function(e,t){return Ee.getTweensOf(e,t)},getProperty:function(e,t,i,s){qe(e)&&(e=zt(e)[0]);var n=rr(e||{}).get,o=i?p0:f0;return i==="native"&&(i=""),e&&(t?o((wt[t]&&wt[t].get||n)(e,t,i,s)):function(a,l,c){return o((wt[a]&&wt[a].get||n)(e,a,l,c))})},quickSetter:function(e,t,i){if(e=zt(e),e.length>1){var s=e.map(function(h){return gt.quickSetter(h,t,i)}),n=s.length;return function(h){for(var u=n;u--;)s[u](h)}}e=e[0]||{};var o=wt[t],a=rr(e),l=a.harness&&(a.harness.aliases||{})[t]||t,c=o?function(h){var u=new o;Gr._pt=0,u.init(e,i?h+i:h,Gr,0,[e]),u.render(1,u),Gr._pt&&df(1,Gr)}:a.set(e,l);return o?c:function(h){return c(e,l,i?h+i:h,a,1)}},quickTo:function(e,t,i){var s,n=gt.to(e,Tt((s={},s[t]="+=0.1",s.paused=!0,s.stagger=0,s),i||{})),o=function(l,c,h){return n.resetTo(t,l,c,h)};return o.tween=n,o},isTweening:function(e){return Ee.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=nr(e.ease,Fr.ease)),m0(Fr,e||{})},config:function(e){return m0(vt,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,s=e.plugins,n=e.defaults,o=e.extendTimeline;(s||"").split(",").forEach(function(a){return a&&!wt[a]&&!bt[a]&&Ss(t+" effect requires "+a+" plugin.")}),qd[t]=function(a,l,c){return i(zt(a),Tt(l||{},n),c)},o&&(ct.prototype[t]=function(a,l,c){return this.add(qd[t](a,ti(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){oe[e]=nr(t)},parseEase:function(e,t){return arguments.length?nr(e,t):oe},getById:function(e){return Ee.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new ct(e),s,n;for(i.smoothChildTiming=ft(e.smoothChildTiming),Ee.remove(i),i._dp=0,i._time=i._tTime=Ee._time,s=Ee._first;s;)n=s._next,(t||!(!s._dur&&s instanceof Le&&s.vars.onComplete===s._targets[0]))&&ri(i,s,s._start-s._delay),s=n;return ri(Ee,i,0),i},context:function(e,t){return e?new q0(e,t):Ce},matchMedia:function(e){return new eA(e)},matchMediaRefresh:function(){return ar.forEach(function(e){var t=e.conditions,i,s;for(s in t)t[s]&&(t[s]=!1,i=1);i&&e.revert()})||pf()},addEventListener:function(e,t){var i=fo[e]||(fo[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=fo[e],s=i&&i.indexOf(t);s>=0&&i.splice(s,1)},utils:{wrap:kE,wrapYoyo:FE,distribute:S0,random:E0,snap:C0,normalize:RE,getUnit:st,clamp:AE,splitColor:k0,toArray:zt,selector:tf,mapRange:P0,pipe:IE,unitize:ME,interpolate:UE,shuffle:T0},install:a0,effects:qd,ticker:Ct,updateRoot:ct.updateRoot,plugins:wt,globalTimeline:Ee,core:{PropTween:mt,globals:l0,Tween:Le,Timeline:ct,Animation:Fs,getCache:rr,_removeLinkedListItem:lo,reverting:function(){return Je},context:function(e){return e&&Ce&&(Ce.data.push(e),e._ctx=Ce),Ce},suppressOverwrites:function(e){return zd=e}}};pt("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return po[r]=Le[r]}),Ct.add(ct.updateRoot),Gr=po.to({},{duration:0});var tA=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},iA=function(e,t){var i=e._targets,s,n,o;for(s in t)for(n=i.length;n--;)o=e._ptLookup[n][s],o&&(o=o.d)&&(o._pt&&(o=tA(o,s)),o&&o.modifier&&o.modifier(t[s],e,i[n],s))},mf=function(e,t){return{name:e,headless:1,rawVars:1,init:function(s,n,o){o._onInit=function(a){var l,c;if(qe(n)&&(l={},pt(n,function(h){return l[h]=1}),n=l),t){l={};for(c in n)l[c]=t(n[c]);n=l}iA(a,n)}}}},gt=po.registerPlugin({name:"attr",init:function(e,t,i,s,n){var o,a,l;this.tween=i;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],s,n,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)Je?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},mf("roundProps",rf),mf("modifiers"),mf("snap",C0))||po;Le.version=ct.version=gt.version="3.14.2",o0=1,Ld()&&Nr(),oe.Power0,oe.Power1,oe.Power2,oe.Power3,oe.Power4,oe.Linear,oe.Quad,oe.Cubic,oe.Quart,oe.Quint,oe.Strong,oe.Elastic,oe.Back,oe.SteppedEase,oe.Bounce,oe.Sine,oe.Expo,oe.Circ;var K0,Gi,Lr,gf,lr,j0,_f,rA=function(){return typeof window<"u"},pi={},cr=180/Math.PI,Hr=Math.PI/180,Wr=Math.atan2,Z0=1e8,xf=/([A-Z])/g,sA=/(left|right|width|margin|padding|x)/i,nA=/[\s,\(]\S/,si={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},yf=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},oA=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},aA=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},lA=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},cA=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},J0=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Q0=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},hA=function(e,t,i){return e.style[t]=i},uA=function(e,t,i){return e.style.setProperty(t,i)},dA=function(e,t,i){return e._gsap[t]=i},fA=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},pA=function(e,t,i,s,n){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(n,o)},mA=function(e,t,i,s,n){var o=e._gsap;o[t]=i,o.renderTransform(n,o)},Pe="transform",_t=Pe+"Origin",gA=function r(e,t){var i=this,s=this.target,n=s.style,o=s._gsap;if(e in pi&&n){if(this.tfm=this.tfm||{},e!=="transform")e=si[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return i.tfm[a]=mi(s,a)}):this.tfm[e]=o.x?o[e]:mi(s,e),e===_t&&(this.tfm.zOrigin=o.zOrigin);else return si.transform.split(",").forEach(function(a){return r.call(i,a,t)});if(this.props.indexOf(Pe)>=0)return;o.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(_t,t,"")),e=Pe}(n||t)&&this.props.push(e,t,n[e])},e_=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_A=function(){var e=this.props,t=this.target,i=t.style,s=t._gsap,n,o;for(n=0;n<e.length;n+=3)e[n+1]?e[n+1]===2?t[e[n]](e[n+2]):t[e[n]]=e[n+2]:e[n+2]?i[e[n]]=e[n+2]:i.removeProperty(e[n].substr(0,2)==="--"?e[n]:e[n].replace(xf,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)s[o]=this.tfm[o];s.svg&&(s.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),n=_f(),(!n||!n.isStart)&&!i[Pe]&&(e_(i),s.zOrigin&&i[_t]&&(i[_t]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},t_=function(e,t){var i={target:e,props:[],revert:_A,save:gA};return e._gsap||gt.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(s){return i.save(s)}),i},i_,vf=function(e,t){var i=Gi.createElementNS?Gi.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Gi.createElement(e);return i&&i.style?i:Gi.createElement(e)},Et=function r(e,t,i){var s=getComputedStyle(e);return s[t]||s.getPropertyValue(t.replace(xf,"-$1").toLowerCase())||s.getPropertyValue(t)||!i&&r(e,Vr(t)||t,1)||""},r_="O,Moz,ms,Ms,Webkit".split(","),Vr=function(e,t,i){var s=t||lr,n=s.style,o=5;if(e in n&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(r_[o]+e in n););return o<0?null:(o===3?"ms":o>=0?r_[o]:"")+e},bf=function(){rA()&&window.document&&(K0=window,Gi=K0.document,Lr=Gi.documentElement,lr=vf("div")||{style:{}},vf("div"),Pe=Vr(Pe),_t=Pe+"Origin",lr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",i_=!!Vr("perspective"),_f=gt.core.reverting,gf=1)},s_=function(e){var t=e.ownerSVGElement,i=vf("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=e.cloneNode(!0),n;s.style.display="block",i.appendChild(s),Lr.appendChild(i);try{n=s.getBBox()}catch{}return i.removeChild(s),Lr.removeChild(i),n},n_=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},o_=function(e){var t,i;try{t=e.getBBox()}catch{t=s_(e),i=1}return t&&(t.width||t.height)||i||(t=s_(e)),t&&!t.width&&!t.x&&!t.y?{x:+n_(e,["x","cx","x1"])||0,y:+n_(e,["y","cy","y1"])||0,width:0,height:0}:t},a_=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&o_(e))},Ni=function(e,t){if(t){var i=e.style,s;t in pi&&t!==_t&&(t=Pe),i.removeProperty?(s=t.substr(0,2),(s==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(s==="--"?t:t.replace(xf,"-$1").toLowerCase())):i.removeAttribute(t)}},Li=function(e,t,i,s,n,o){var a=new mt(e._pt,t,i,0,1,o?Q0:J0);return e._pt=a,a.b=s,a.e=n,e._props.push(i),a},l_={deg:1,rad:1,turn:1},xA={grid:1,flex:1},Hi=function r(e,t,i,s){var n=parseFloat(i)||0,o=(i+"").trim().substr((n+"").length)||"px",a=lr.style,l=sA.test(t),c=e.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),u=100,d=s==="px",f=s==="%",m,p,g,_;if(s===o||!n||l_[s]||l_[o])return n;if(o!=="px"&&!d&&(n=r(e,t,i,"px")),_=e.getCTM&&a_(e),(f||o==="%")&&(pi[t]||~t.indexOf("adius")))return m=_?e.getBBox()[l?"width":"height"]:e[h],Oe(f?n/m*u:n/100*m);if(a[l?"width":"height"]=u+(d?o:s),p=s!=="rem"&&~t.indexOf("adius")||s==="em"&&e.appendChild&&!c?e:e.parentNode,_&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===Gi||!p.appendChild)&&(p=Gi.body),g=p._gsap,g&&f&&g.width&&l&&g.time===Ct.time&&!g.uncache)return Oe(n/g.width*u);if(f&&(t==="height"||t==="width")){var x=e.style[t];e.style[t]=u+s,m=e[h],x?e.style[t]=x:Ni(e,t)}else(f||o==="%")&&!xA[Et(p,"display")]&&(a.position=Et(e,"position")),p===e&&(a.position="static"),p.appendChild(lr),m=lr[h],p.removeChild(lr),a.position="absolute";return l&&f&&(g=rr(p),g.time=Ct.time,g.width=p[h]),Oe(d?m*n/u:m&&n?u/m*n:0)},mi=function(e,t,i,s){var n;return gf||bf(),t in si&&t!=="transform"&&(t=si[t],~t.indexOf(",")&&(t=t.split(",")[0])),pi[t]&&t!=="transform"?(n=Os(e,s),n=t!=="transformOrigin"?n[t]:n.svg?n.origin:go(Et(e,_t))+" "+n.zOrigin+"px"):(n=e.style[t],(!n||n==="auto"||s||~(n+"").indexOf("calc("))&&(n=mo[t]&&mo[t](e,t,i)||Et(e,t)||u0(e,t)||(t==="opacity"?1:0))),i&&!~(n+"").trim().indexOf(" ")?Hi(e,t,n,i)+i:n},yA=function(e,t,i,s){if(!i||i==="none"){var n=Vr(t,e,1),o=n&&Et(e,n,1);o&&o!==i?(t=n,i=o):t==="borderColor"&&(i=Et(e,"borderTopColor"))}var a=new mt(this._pt,e.style,t,0,1,$0),l=0,c=0,h,u,d,f,m,p,g,_,x,y,v,b;if(a.b=i,a.e=s,i+="",s+="",s.substring(0,6)==="var(--"&&(s=Et(e,s.substring(4,s.indexOf(")")))),s==="auto"&&(p=e.style[t],e.style[t]=s,s=Et(e,t)||s,p?e.style[t]=p:Ni(e,t)),h=[i,s],B0(h),i=h[0],s=h[1],d=i.match(Ur)||[],b=s.match(Ur)||[],b.length){for(;u=Ur.exec(s);)g=u[0],x=s.substring(l,u.index),m?m=(m+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(m=1),g!==(p=d[c++]||"")&&(f=parseFloat(p)||0,v=p.substr((f+"").length),g.charAt(1)==="="&&(g=Br(f,g)+v),_=parseFloat(g),y=g.substr((_+"").length),l=Ur.lastIndex-y.length,y||(y=y||vt.units[t]||v,l===s.length&&(s+=y,a.e+=y)),v!==y&&(f=Hi(e,t,p,y)||0),a._pt={_next:a._pt,p:x||c===1?x:",",s:f,c:_-f,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=l<s.length?s.substring(l,s.length):""}else a.r=t==="display"&&s==="none"?Q0:J0;return n0.test(s)&&(a.e=0),this._pt=a,a},c_={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},vA=function(e){var t=e.split(" "),i=t[0],s=t[1]||"50%";return(i==="top"||i==="bottom"||s==="left"||s==="right")&&(e=i,i=s,s=e),t[0]=c_[i]||i,t[1]=c_[s]||s,t.join(" ")},bA=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,s=i.style,n=t.u,o=i._gsap,a,l,c;if(n==="all"||n===!0)s.cssText="",l=1;else for(n=n.split(","),c=n.length;--c>-1;)a=n[c],pi[a]&&(l=1,a=a==="transformOrigin"?_t:Pe),Ni(i,a);l&&(Ni(i,Pe),o&&(o.svg&&i.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Os(i,1),o.uncache=1,e_(s)))}},mo={clearProps:function(e,t,i,s,n){if(n.data!=="isFromStart"){var o=e._pt=new mt(e._pt,t,i,0,0,bA);return o.u=s,o.pr=-10,o.tween=n,e._props.push(i),1}}},Bs=[1,0,0,1,0,0],h_={},u_=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},d_=function(e){var t=Et(e,Pe);return u_(t)?Bs:t.substr(7).match(s0).map(Oe)},wf=function(e,t){var i=e._gsap||rr(e),s=e.style,n=d_(e),o,a,l,c;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,n=[l.a,l.b,l.c,l.d,l.e,l.f],n.join(",")==="1,0,0,1,0,0"?Bs:n):(n===Bs&&!e.offsetParent&&e!==Lr&&!i.svg&&(l=s.display,s.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,a=e.nextElementSibling,Lr.appendChild(e)),n=d_(e),l?s.display=l:Ni(e,"display"),c&&(a?o.insertBefore(e,a):o?o.appendChild(e):Lr.removeChild(e))),t&&n.length>6?[n[0],n[1],n[4],n[5],n[12],n[13]]:n)},Tf=function(e,t,i,s,n,o){var a=e._gsap,l=n||wf(e,!0),c=a.xOrigin||0,h=a.yOrigin||0,u=a.xOffset||0,d=a.yOffset||0,f=l[0],m=l[1],p=l[2],g=l[3],_=l[4],x=l[5],y=t.split(" "),v=parseFloat(y[0])||0,b=parseFloat(y[1])||0,T,w,S,C;i?l!==Bs&&(w=f*g-m*p)&&(S=v*(g/w)+b*(-p/w)+(p*x-g*_)/w,C=v*(-m/w)+b*(f/w)-(f*x-m*_)/w,v=S,b=C):(T=o_(e),v=T.x+(~y[0].indexOf("%")?v/100*T.width:v),b=T.y+(~(y[1]||y[0]).indexOf("%")?b/100*T.height:b)),s||s!==!1&&a.smooth?(_=v-c,x=b-h,a.xOffset=u+(_*f+x*p)-_,a.yOffset=d+(_*m+x*g)-x):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=b,a.smooth=!!s,a.origin=t,a.originIsAbsolute=!!i,e.style[_t]="0px 0px",o&&(Li(o,a,"xOrigin",c,v),Li(o,a,"yOrigin",h,b),Li(o,a,"xOffset",u,a.xOffset),Li(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",v+" "+b)},Os=function(e,t){var i=e._gsap||new G0(e);if("x"in i&&!t&&!i.uncache)return i;var s=e.style,n=i.scaleX<0,o="px",a="deg",l=getComputedStyle(e),c=Et(e,_t)||"0",h,u,d,f,m,p,g,_,x,y,v,b,T,w,S,C,E,P,F,B,G,j,R,I,V,H,te,ie,pe,N,Z,U;return h=u=d=p=g=_=x=y=v=0,f=m=1,i.svg=!!(e.getCTM&&a_(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(s[Pe]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Pe]!=="none"?l[Pe]:"")),s.scale=s.rotate=s.translate="none"),w=wf(e,i.svg),i.svg&&(i.uncache?(V=e.getBBox(),c=i.xOrigin-V.x+"px "+(i.yOrigin-V.y)+"px",I=""):I=!t&&e.getAttribute("data-svg-origin"),Tf(e,I||c,!!I||i.originIsAbsolute,i.smooth!==!1,w)),b=i.xOrigin||0,T=i.yOrigin||0,w!==Bs&&(P=w[0],F=w[1],B=w[2],G=w[3],h=j=w[4],u=R=w[5],w.length===6?(f=Math.sqrt(P*P+F*F),m=Math.sqrt(G*G+B*B),p=P||F?Wr(F,P)*cr:0,x=B||G?Wr(B,G)*cr+p:0,x&&(m*=Math.abs(Math.cos(x*Hr))),i.svg&&(h-=b-(b*P+T*B),u-=T-(b*F+T*G))):(U=w[6],N=w[7],te=w[8],ie=w[9],pe=w[10],Z=w[11],h=w[12],u=w[13],d=w[14],S=Wr(U,pe),g=S*cr,S&&(C=Math.cos(-S),E=Math.sin(-S),I=j*C+te*E,V=R*C+ie*E,H=U*C+pe*E,te=j*-E+te*C,ie=R*-E+ie*C,pe=U*-E+pe*C,Z=N*-E+Z*C,j=I,R=V,U=H),S=Wr(-B,pe),_=S*cr,S&&(C=Math.cos(-S),E=Math.sin(-S),I=P*C-te*E,V=F*C-ie*E,H=B*C-pe*E,Z=G*E+Z*C,P=I,F=V,B=H),S=Wr(F,P),p=S*cr,S&&(C=Math.cos(S),E=Math.sin(S),I=P*C+F*E,V=j*C+R*E,F=F*C-P*E,R=R*C-j*E,P=I,j=V),g&&Math.abs(g)+Math.abs(p)>359.9&&(g=p=0,_=180-_),f=Oe(Math.sqrt(P*P+F*F+B*B)),m=Oe(Math.sqrt(R*R+U*U)),S=Wr(j,R),x=Math.abs(S)>2e-4?S*cr:0,v=Z?1/(Z<0?-Z:Z):0),i.svg&&(I=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!u_(Et(e,Pe)),I&&e.setAttribute("transform",I))),Math.abs(x)>90&&Math.abs(x)<270&&(n?(f*=-1,x+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,x+=x<=0?180:-180)),t=t||i.uncache,i.x=h-((i.xPercent=h&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-h)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=u-((i.yPercent=u&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=d+o,i.scaleX=Oe(f),i.scaleY=Oe(m),i.rotation=Oe(p)+a,i.rotationX=Oe(g)+a,i.rotationY=Oe(_)+a,i.skewX=x+a,i.skewY=y+a,i.transformPerspective=v+o,(i.zOrigin=parseFloat(c.split(" ")[2])||!t&&i.zOrigin||0)&&(s[_t]=go(c)),i.xOffset=i.yOffset=0,i.force3D=vt.force3D,i.renderTransform=i.svg?TA:i_?f_:wA,i.uncache=0,i},go=function(e){return(e=e.split(" "))[0]+" "+e[1]},Sf=function(e,t,i){var s=st(t);return Oe(parseFloat(t)+parseFloat(Hi(e,"x",i+"px",s)))+s},wA=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,f_(e,t)},hr="0deg",Ds="0px",ur=") ",f_=function(e,t){var i=t||this,s=i.xPercent,n=i.yPercent,o=i.x,a=i.y,l=i.z,c=i.rotation,h=i.rotationY,u=i.rotationX,d=i.skewX,f=i.skewY,m=i.scaleX,p=i.scaleY,g=i.transformPerspective,_=i.force3D,x=i.target,y=i.zOrigin,v="",b=_==="auto"&&e&&e!==1||_===!0;if(y&&(u!==hr||h!==hr)){var T=parseFloat(h)*Hr,w=Math.sin(T),S=Math.cos(T),C;T=parseFloat(u)*Hr,C=Math.cos(T),o=Sf(x,o,w*C*-y),a=Sf(x,a,-Math.sin(T)*-y),l=Sf(x,l,S*C*-y+y)}g!==Ds&&(v+="perspective("+g+ur),(s||n)&&(v+="translate("+s+"%, "+n+"%) "),(b||o!==Ds||a!==Ds||l!==Ds)&&(v+=l!==Ds||b?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+ur),c!==hr&&(v+="rotate("+c+ur),h!==hr&&(v+="rotateY("+h+ur),u!==hr&&(v+="rotateX("+u+ur),(d!==hr||f!==hr)&&(v+="skew("+d+", "+f+ur),(m!==1||p!==1)&&(v+="scale("+m+", "+p+ur),x.style[Pe]=v||"translate(0, 0)"},TA=function(e,t){var i=t||this,s=i.xPercent,n=i.yPercent,o=i.x,a=i.y,l=i.rotation,c=i.skewX,h=i.skewY,u=i.scaleX,d=i.scaleY,f=i.target,m=i.xOrigin,p=i.yOrigin,g=i.xOffset,_=i.yOffset,x=i.forceCSS,y=parseFloat(o),v=parseFloat(a),b,T,w,S,C;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=Hr,c*=Hr,b=Math.cos(l)*u,T=Math.sin(l)*u,w=Math.sin(l-c)*-d,S=Math.cos(l-c)*d,c&&(h*=Hr,C=Math.tan(c-h),C=Math.sqrt(1+C*C),w*=C,S*=C,h&&(C=Math.tan(h),C=Math.sqrt(1+C*C),b*=C,T*=C)),b=Oe(b),T=Oe(T),w=Oe(w),S=Oe(S)):(b=u,S=d,T=w=0),(y&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(y=Hi(f,"x",o,"px"),v=Hi(f,"y",a,"px")),(m||p||g||_)&&(y=Oe(y+m-(m*b+p*w)+g),v=Oe(v+p-(m*T+p*S)+_)),(s||n)&&(C=f.getBBox(),y=Oe(y+s/100*C.width),v=Oe(v+n/100*C.height)),C="matrix("+b+","+T+","+w+","+S+","+y+","+v+")",f.setAttribute("transform",C),x&&(f.style[Pe]=C)},SA=function(e,t,i,s,n){var o=360,a=qe(n),l=parseFloat(n)*(a&&~n.indexOf("rad")?cr:1),c=l-s,h=s+c+"deg",u,d;return a&&(u=n.split("_")[1],u==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),u==="cw"&&c<0?c=(c+o*Z0)%o-~~(c/o)*o:u==="ccw"&&c>0&&(c=(c-o*Z0)%o-~~(c/o)*o)),e._pt=d=new mt(e._pt,t,i,s,c,oA),d.e=h,d.u="deg",e._props.push(i),d},p_=function(e,t){for(var i in t)e[i]=t[i];return e},CA=function(e,t,i){var s=p_({},i._gsap),n="perspective,force3D,transformOrigin,svgOrigin",o=i.style,a,l,c,h,u,d,f,m;s.svg?(c=i.getAttribute("transform"),i.setAttribute("transform",""),o[Pe]=t,a=Os(i,1),Ni(i,Pe),i.setAttribute("transform",c)):(c=getComputedStyle(i)[Pe],o[Pe]=t,a=Os(i,1),o[Pe]=c);for(l in pi)c=s[l],h=a[l],c!==h&&n.indexOf(l)<0&&(f=st(c),m=st(h),u=f!==m?Hi(i,l,c,m):parseFloat(c),d=parseFloat(h),e._pt=new mt(e._pt,a,l,u,d-u,yf),e._pt.u=m||0,e._props.push(l));p_(a,s)};pt("padding,margin,Width,Radius",function(r,e){var t="Top",i="Right",s="Bottom",n="Left",o=(e<3?[t,i,s,n]:[t+n,t+i,s+i,s+n]).map(function(a){return e<2?r+a:"border"+a+r});mo[e>1?"border"+r:r]=function(a,l,c,h,u){var d,f;if(arguments.length<4)return d=o.map(function(m){return mi(a,m,c)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(h+"").split(" "),f={},o.forEach(function(m,p){return f[m]=d[p]=d[p]||d[(p-1)/2|0]}),a.init(l,f,u)}});var m_={name:"css",register:bf,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,s,n){var o=this._props,a=e.style,l=i.vars.startAt,c,h,u,d,f,m,p,g,_,x,y,v,b,T,w,S,C;gf||bf(),this.styles=this.styles||t_(e),S=this.styles.props,this.tween=i;for(p in t)if(p!=="autoRound"&&(h=t[p],!(wt[p]&&N0(p,t,i,s,e,n)))){if(f=typeof h,m=mo[p],f==="function"&&(h=h.call(i,s,e,n),f=typeof h),f==="string"&&~h.indexOf("random(")&&(h=Is(h)),m)m(this,e,p,h,i)&&(w=1);else if(p.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(p)+"").trim(),h+="",Di.lastIndex=0,Di.test(c)||(g=st(c),_=st(h),_?g!==_&&(c=Hi(e,p,c,_)+_):g&&(h+=g)),this.add(a,"setProperty",c,h,s,n,0,0,p),o.push(p),S.push(p,0,a[p]);else if(f!=="undefined"){if(l&&p in l?(c=typeof l[p]=="function"?l[p].call(i,s,e,n):l[p],qe(c)&&~c.indexOf("random(")&&(c=Is(c)),st(c+"")||c==="auto"||(c+=vt.units[p]||st(mi(e,p))||""),(c+"").charAt(1)==="="&&(c=mi(e,p))):c=mi(e,p),d=parseFloat(c),x=f==="string"&&h.charAt(1)==="="&&h.substr(0,2),x&&(h=h.substr(2)),u=parseFloat(h),p in si&&(p==="autoAlpha"&&(d===1&&mi(e,"visibility")==="hidden"&&u&&(d=0),S.push("visibility",0,a.visibility),Li(this,a,"visibility",d?"inherit":"hidden",u?"inherit":"hidden",!u)),p!=="scale"&&p!=="transform"&&(p=si[p],~p.indexOf(",")&&(p=p.split(",")[0]))),y=p in pi,y){if(this.styles.save(p),C=h,f==="string"&&h.substring(0,6)==="var(--"){if(h=Et(e,h.substring(4,h.indexOf(")"))),h.substring(0,5)==="calc("){var E=e.style.perspective;e.style.perspective=h,h=Et(e,"perspective"),E?e.style.perspective=E:Ni(e,"perspective")}u=parseFloat(h)}if(v||(b=e._gsap,b.renderTransform&&!t.parseTransform||Os(e,t.parseTransform),T=t.smoothOrigin!==!1&&b.smooth,v=this._pt=new mt(this._pt,a,Pe,0,1,b.renderTransform,b,0,-1),v.dep=1),p==="scale")this._pt=new mt(this._pt,b,"scaleY",b.scaleY,(x?Br(b.scaleY,x+u):u)-b.scaleY||0,yf),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){S.push(_t,0,a[_t]),h=vA(h),b.svg?Tf(e,h,0,T,0,this):(_=parseFloat(h.split(" ")[2])||0,_!==b.zOrigin&&Li(this,b,"zOrigin",b.zOrigin,_),Li(this,a,p,go(c),go(h)));continue}else if(p==="svgOrigin"){Tf(e,h,1,T,0,this);continue}else if(p in h_){SA(this,b,p,d,x?Br(d,x+h):h);continue}else if(p==="smoothOrigin"){Li(this,b,"smooth",b.smooth,h);continue}else if(p==="force3D"){b[p]=h;continue}else if(p==="transform"){CA(this,h,e);continue}}else p in a||(p=Vr(p)||p);if(y||(u||u===0)&&(d||d===0)&&!nA.test(h)&&p in a)g=(c+"").substr((d+"").length),u||(u=0),_=st(h)||(p in vt.units?vt.units[p]:g),g!==_&&(d=Hi(e,p,c,_)),this._pt=new mt(this._pt,y?b:a,p,d,(x?Br(d,x+u):u)-d,!y&&(_==="px"||p==="zIndex")&&t.autoRound!==!1?cA:yf),this._pt.u=_||0,y&&C!==h?(this._pt.b=c,this._pt.e=C,this._pt.r=lA):g!==_&&_!=="%"&&(this._pt.b=c,this._pt.r=aA);else if(p in a)yA.call(this,e,p,c,x?x+h:h);else if(p in e)this.add(e,p,c||e[p],x?x+h:h,s,n);else if(p!=="parseTransform"){$d(p,h);continue}y||(p in a?S.push(p,0,a[p]):typeof e[p]=="function"?S.push(p,2,e[p]()):S.push(p,1,c||e[p])),o.push(p)}}w&&X0(this)},render:function(e,t){if(t.tween._time||!_f())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:mi,aliases:si,getSetter:function(e,t,i){var s=si[t];return s&&s.indexOf(",")<0&&(t=s),t in pi&&t!==_t&&(e._gsap.x||mi(e,"x"))?i&&j0===i?t==="scale"?fA:dA:(j0=i||{})&&(t==="scale"?pA:mA):e.style&&!Nd(e.style[t])?hA:~t.indexOf("-")?uA:uf(e,t)},core:{_removeProperty:Ni,_getMatrix:wf}};gt.utils.checkPrefix=Vr,gt.core.getStyleSaver=t_,(function(r,e,t,i){var s=pt(r+","+e+","+t,function(n){pi[n]=1});pt(e,function(n){vt.units[n]="deg",h_[n]=1}),si[s[13]]=r+","+e,pt(i,function(n){var o=n.split(":");si[o[1]]=s[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),pt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){vt.units[r]="px"}),gt.registerPlugin(m_);var g_=gt.registerPlugin(m_)||gt;g_.core.Tween;class EA{id;type;options;params;timeline=null;lastTarget=null;constructor(e,t,i="gsap"){this.id=t.id||`gsap_${Math.random().toString(36).substr(2,9)}`,this.type=i,this.params=e,this.options={duration:t.duration,delay:t.delay??0,easing:t.easing??"none",iterCount:t.iterCount??1,id:this.id}}getTransform(e){return{}}getTargetCount(e){if(!e)return 0;const{type:t}=this.params;if(t==="character"){const i=(s,n=!1)=>{if(!s.children||s.children.length===0)return n?0:1;let o=0;for(const a of s.children)o+=i(a);return o};return i(e,!0)}else if(t==="word")return e.children?e.children.length:0;return 1}apply(e,t){const{duration:i,delay:s}=this.options,n=t-s;let o=this.lastTarget!==e||!this.timeline;const a=this.getCurrentTargets(e);if(!o&&this.timeline){const h=this.timeline.getChildren();if(h.length===0)e&&e.children&&e.children.length>0&&(o=!0);else{const u=h[0],d=typeof u.targets=="function"?u.targets():[],f=this.getTargetCount(e);if(d.length!==f)o=!0;else if(d&&d.length>0&&a.length>0)if(d[0]===e&&e.children&&e.children.length>0)o=!0;else for(let m=0;m<d.length;m++){const p=d[m];if(p.destroyed||!p.parent){o=!0;break}if(m<a.length&&p!==a[m]){o=!0;break}}else e&&e.children&&e.children.length>0&&(o=!0)}}if(o&&(this.initTimeline(e),this.lastTarget=e),!this.timeline)return;if(n<0){this.timeline.pause(0);return}const l=this.options.iterCount===1/0?i:i/this.options.iterCount;if(this.options.iterCount!==1/0&&n>=i){this.timeline.progress(1);return}const c=n%l/l;this.timeline.progress(c)}getCurrentTargets(e){if(!e||!e.children)return[e];const{type:t}=this.params;if(t==="character"){const i=(s,n=!1)=>{if(!s.children||s.children.length===0)return n?[]:[s];let o=[];for(const a of s.children)o=o.concat(i(a));return o};return i(e,!0)}else if(t==="word")return[...e.children||[]];return[e]}initTimeline(e){const{from:t,to:i,stagger:s,type:n}=this.params,o=this.options.duration/1e6;let a=[];if(e&&e.children)if(n==="character"){const l=(c,h=!1)=>{if(!c.children||c.children.length===0)return h?[]:[c];let u=[];for(const d of c.children)u=u.concat(l(d));return u};a=l(e,!0)}else n==="word"?a=e.children||[]:a=[e];else a=[e];if((n==="character"||n==="word")&&a.length===0){this.timeline&&(this.timeline.kill(),this.timeline=null);return}this.timeline&&this.timeline.kill(),this.timeline=g_.timeline({paused:!0}),this.timeline.fromTo(a,t,{duration:o,stagger:s||0,ease:this.options.easing,...i})}destroy(){this.timeline&&(this.timeline.kill(),this.timeline=null)}}const AA=(r,e)=>{const t=Math.max(r.duration/1e6,1),i=e?.mirror||0;return e&&(e["0%"]||e["100%"])?new X(e,{...r,iterCount:t*3},"pulse"):new X({"0%":{scale:1,mirror:i},"25%":{scale:.9,mirror:i},"50%":{scale:1,mirror:i},"75%":{scale:.9,mirror:i},"100%":{scale:1,mirror:i}},{...r,easing:r.easing||"easeOutQuad",iterCount:t*3},"pulse")},PA=(r,e)=>{const t=e?.mirror||0,i=e?.opacity||0;return e&&(e["0%"]||e["100%"])?new X(e,r,"fadeIn"):new X({"0%":{opacity:i,scale:.9,mirror:t},"100%":{opacity:1,scale:1,mirror:t}},{...r,easing:r.easing||"easeOutQuad"},"fadeIn")},IA=(r,e)=>{const t=e?.mirror||0,i=e?.opacity||0;return e&&(e["0%"]||e["100%"])?new X(e,r,"fadeOut"):new X({"0%":{opacity:1,mirror:t},"100%":{opacity:i,mirror:t}},{...r,easing:r.easing||"easeInQuad"},"fadeOut")},MA=(r,e)=>{const t=e?.mirror||0,i=e?.opacity||0;if(e&&(e["0%"]||e["100%"]))return new X(e,r,"slideIn");const s=e||{direction:"left"},n=s.distance||300,o={"100%":{x:0,y:0,opacity:1,mirror:t}};s.direction==="left"?o["0%"]={x:-n,opacity:i,mirror:t}:s.direction==="right"?o["0%"]={x:n,opacity:i,mirror:t}:s.direction==="top"?o["0%"]={y:-n,opacity:i,mirror:t}:s.direction==="bottom"?o["0%"]={y:n,opacity:i,mirror:t}:o["0%"]={x:-n,opacity:i,mirror:t};const a=new X(o,{...r,easing:r.easing||"easeOutCubic"},"slideIn");return a.presetParams=e,a},RA=(r,e)=>{const t=e?.mirror||0,i=e?.opacity||0;if(e&&(e["0%"]||e["100%"]))return new X(e,r,"slideOut");const s=e||{direction:"left"},n=s.distance||300,o={"0%":{x:0,y:0,opacity:1,mirror:t}};s.direction==="left"?o["100%"]={x:-n,opacity:i,mirror:t}:s.direction==="right"?o["100%"]={x:n,opacity:i,mirror:t}:s.direction==="top"?o["100%"]={y:-n,opacity:i,mirror:t}:s.direction==="bottom"?o["100%"]={y:n,opacity:i,mirror:t}:o["100%"]={x:-n,opacity:i,mirror:t};const a=new X(o,{...r,easing:r.easing||"easeInCubic"},"slideOut");return a.presetParams=e,a},kA=(r,e)=>{const t=e?.mirror||0,i=e?.opacity||0,s=e?.scale||0;return e&&(e["0%"]||e["100%"])?new X(e,r,"zoomIn"):new X({"0%":{scale:s,opacity:i,mirror:t},"100%":{scale:1,opacity:1,mirror:t}},{...r,easing:r.easing||"easeOutBack"},"zoomIn")},FA=(r,e)=>{const t=e?.mirror||0,i=e?.opacity||0,s=e?.scale||0;return e&&(e["0%"]||e["100%"])?new X(e,r,"zoomOut"):new X({"0%":{scale:1,opacity:1,mirror:t},"100%":{scale:s,opacity:i,mirror:t}},{...r,easing:r.easing||"easeInBack"},"zoomOut")},UA=(r,e)=>{const t=e?.mirror||0,i=e?.opacity||0;return e&&(e["0%"]||e["100%"])?new X(e,r,"blurIn"):new X({"0%":{blur:20,opacity:i,mirror:t},"100%":{blur:0,opacity:1,mirror:t}},{...r,easing:r.easing||"easeOutQuad"},"blurIn")},BA=(r,e)=>{const t=e?.mirror||0,i=e?.opacity||0;return e&&(e["0%"]||e["100%"])?new X(e,r,"blurOut"):new X({"0%":{blur:0,opacity:1,mirror:t},"100%":{blur:20,opacity:i,mirror:t}},{...r,easing:r.easing||"easeInQuad"},"blurOut")},OA=(r,e)=>new EA({type:"character",from:{alpha:0},to:{alpha:1,duration:.001},stagger:e?.stagger??.05},{...r,easing:r.easing||"none"},"charTypewriter"),DA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"blurSlideRightIn"):new X({"0%":{blur:5,x:100,mirror:1},"100%":{blur:0,x:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"blurSlideRightIn"),zA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"wobbleZoomIn"):new X({"0%":{scale:1.2,angle:-5,mirror:1},"32%":{scale:1,angle:0,mirror:1},"64%":{scale:1.2,angle:-5,mirror:1},"100%":{scale:1,angle:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"wobbleZoomIn"),GA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"spinZoomIn"):new X({"0%":{blur:5,angle:45,scale:2,mirror:1},"100%":{blur:0,angle:0,scale:1,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"spinZoomIn"),NA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"blurSlideLeftIn"):new X({"0%":{x:-200,blur:10,mirror:1},"100%":{x:0,blur:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"blurSlideLeftIn"),LA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"blurSlideRightStrongIn"):new X({"0%":{x:200,blur:10,mirror:1},"100%":{x:0,blur:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"blurSlideRightStrongIn"),HA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"cinematicZoomSlideIn"):new X({"0%":{scale:.6,blur:30,x:200,mirror:1},"30%":{scale:.8,blur:20,x:50,mirror:1},"60%":{scale:.9,blur:10,x:0,mirror:1},"100%":{scale:1,blur:0,x:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"cinematicZoomSlideIn"),WA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"elasticTwistIn"):new X({"0%":{scale:1.4,blur:20,angle:10,mirror:1},"40%":{scale:1,blur:0,angle:0,mirror:1},"60%":{scale:1.3,blur:0,angle:-10,mirror:1},"100%":{scale:1,blur:0,angle:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"elasticTwistIn"),VA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"spinFadeIn"):new X({"0%":{blur:40,angle:80,mirror:1},"100%":{blur:0,angle:0,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"spinFadeIn"),$A=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"flashZoomIn"):new X({"0%":{scale:1,brightness:3,mirror:1},"40%":{scale:1,brightness:3,mirror:1},"80%":{scale:1.5,brightness:3,mirror:1},"100%":{scale:1,brightness:1,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"flashZoomIn"),XA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"tiltSlideRightOut"):new X({"0%":{angle:0,x:0,mirror:1},"70%":{angle:7,x:0,mirror:1},"100%":{angle:10,x:200,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"tiltSlideRightOut"),YA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"tiltZoomOut"):new X({"0%":{angle:0,scale:1,mirror:1},"100%":{angle:-10,scale:1.2,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"tiltZoomOut"),qA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"glitchSlideOut"):new X({"0%":{x:0,angle:0,mirror:1},"30%":{x:100,angle:-5,mirror:1},"70%":{x:100,angle:-20,mirror:1},"100%":{x:-100,angle:-20,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"glitchSlideOut"),KA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"dropBlurOut"):new X({"0%":{y:0,blur:0,mirror:1},"100%":{y:200,blur:20,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"dropBlurOut"),jA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"fallZoomOut"):new X({"0%":{y:0,scale:1,mirror:1},"100%":{y:250,scale:1.5,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"fallZoomOut"),ZA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"zoomSpinOut"):new X({"0%":{scale:1,angle:0,mirror:1},"100%":{scale:2,angle:10,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"zoomSpinOut"),JA=(r,e)=>e&&(e["0%"]||e["100%"])?new X(e,r,"dramaticSpinSlideOut"):new X({"0%":{x:0,angle:0,blur:0,mirror:1},"40%":{x:-200,angle:10,blur:5,mirror:1},"100%":{x:-200,angle:60,blur:20,mirror:1}},{...r,easing:r.easing||"easeOutQuad"},"dramaticSpinSlideOut");fe.register("fadeIn",PA),fe.register("fadeOut",IA),fe.register("slideIn",MA),fe.register("slideOut",RA),fe.register("zoomIn",kA),fe.register("zoomOut",FA),fe.register("charTypewriter",OA),fe.register("pulse",AA),fe.register("blurIn",UA),fe.register("blurOut",BA),fe.register("blurSlideRightIn",DA),fe.register("wobbleZoomIn",zA),fe.register("spinZoomIn",GA),fe.register("blurSlideLeftIn",NA),fe.register("blurSlideRightStrongIn",LA),fe.register("cinematicZoomSlideIn",HA),fe.register("elasticTwistIn",WA),fe.register("spinFadeIn",VA),fe.register("flashZoomIn",$A),fe.register("tiltSlideRightOut",XA),fe.register("tiltZoomOut",YA),fe.register("glitchSlideOut",qA),fe.register("dropBlurOut",KA),fe.register("fallZoomOut",jA),fe.register("zoomSpinOut",ZA),fe.register("dramaticSpinSlideOut",JA);function QA(r,e){const t=e?.mirror||0,i=e?.scale||0,s=e?.opacity||0;switch(r){case"fadeIn":return{"0%":{opacity:s,scale:.9,mirror:t},"100%":{opacity:1,scale:1,mirror:t}};case"fadeOut":return{"0%":{opacity:1,mirror:t},"100%":{opacity:s,mirror:t}};case"zoomIn":return{"0%":{scale:i,opacity:s,mirror:t},"100%":{scale:1,opacity:1,mirror:t}};case"zoomOut":return{"0%":{scale:1,opacity:1,mirror:t},"100%":{scale:i,opacity:s,mirror:t}};case"slideIn":{const n=e?.direction||"left",o=e?.distance||300;return{"0%":{x:n==="left"?-o:n==="right"?o:0,y:n==="top"?-o:n==="bottom"?o:0,opacity:s,mirror:t},"100%":{x:0,y:0,opacity:1,mirror:t}}}case"slideOut":{const n=e?.direction||"left",o=e?.distance||300;return{"0%":{x:0,y:0,opacity:1,mirror:t},"100%":{x:n==="left"?-o:n==="right"?o:0,y:n==="top"?-o:n==="bottom"?o:0,opacity:s,mirror:t}}}case"pulse":return{"0%":{scale:1,mirror:t},"25%":{scale:.9,mirror:t},"50%":{scale:1,mirror:t},"75%":{scale:.9,mirror:t},"100%":{scale:1,mirror:t}};case"blurIn":return{"0%":{blur:20,opacity:s,mirror:t},"100%":{blur:0,opacity:1,mirror:t}};case"blurOut":return{"0%":{blur:0,opacity:1,mirror:t},"100%":{blur:20,opacity:s,mirror:t}};case"blurSlideRightIn":return{"0%":{blur:5,x:100,mirror:t},"100%":{blur:0,x:0,mirror:t}};case"wobbleZoomIn":return{"0%":{scale:1.2,angle:-5,mirror:1},"32%":{scale:1,angle:0,mirror:1},"64%":{scale:1.2,angle:-5,mirror:1},"100%":{scale:1,angle:0,mirror:1}};case"spinZoomIn":return{"0%":{blur:5,angle:45,scale:2,mirror:1},"100%":{blur:0,angle:0,scale:1,mirror:1}};case"blurSlideLeftIn":return{"0%":{x:-200,blur:10,mirror:1},"100%":{x:0,blur:0,mirror:1}};case"blurSlideRightStrongIn":return{"0%":{x:200,blur:10,mirror:1},"100%":{x:0,blur:0,mirror:1}};case"cinematicZoomSlideIn":return{"0%":{scale:.6,blur:30,x:200,mirror:1},"30%":{scale:.8,blur:20,x:50,mirror:1},"60%":{scale:.9,blur:10,x:0,mirror:1},"100%":{scale:1,blur:0,x:0,mirror:1}};case"elasticTwistIn":return{"0%":{scale:1.4,blur:20,angle:10,mirror:1},"40%":{scale:1,blur:0,angle:0,mirror:1},"60%":{scale:1.3,blur:0,angle:-10,mirror:1},"100%":{scale:1,blur:0,angle:0,mirror:1}};case"spinFadeIn":return{"0%":{blur:40,angle:80,mirror:1},"100%":{blur:0,angle:0,mirror:1}};case"flashZoomIn":return{"0%":{scale:1,brightness:3,mirror:1},"40%":{scale:1,brightness:3,mirror:1},"80%":{scale:1.5,brightness:3,mirror:1},"100%":{scale:1,brightness:1,mirror:1}};case"tiltSlideRightOut":return{"0%":{angle:0,x:0,mirror:1},"70%":{angle:7,x:0,mirror:1},"100%":{angle:10,x:200,mirror:1}};case"tiltZoomOut":return{"0%":{angle:0,scale:1,mirror:1},"100%":{angle:-10,scale:1.2,mirror:1}};case"glitchSlideOut":return{"0%":{x:0,angle:0,mirror:1},"30%":{x:100,angle:-5,mirror:1},"70%":{x:100,angle:-20,mirror:1},"100%":{x:-100,angle:-20,mirror:1}};case"dropBlurOut":return{"0%":{y:0,blur:0,mirror:1},"100%":{y:200,blur:20,mirror:1}};case"fallZoomOut":return{"0%":{y:0,scale:1,mirror:1},"100%":{y:250,scale:1.5,mirror:1}};case"zoomSpinOut":return{"0%":{scale:1,angle:0,mirror:1},"100%":{scale:2,angle:10,mirror:1}};case"dramaticSpinSlideOut":return{"0%":{x:0,angle:0,blur:0,mirror:1},"40%":{x:-200,angle:10,blur:5,mirror:1},"100%":{x:-200,angle:60,blur:20,mirror:1}};case"custom":default:return{"0%":{},"100%":{}}}}class eP extends Dd{id="";name="";display={from:0,to:0};duration=0;playbackRate=1;trim={from:0,to:0};constructor(){super()}_left=0;get left(){return this._left}set left(e){const t=this._left!==e;this._left=e,t&&this.emit("propsChange",{left:e})}_top=0;get top(){return this._top}set top(e){const t=this._top!==e;this._top=e,t&&this.emit("propsChange",{top:e})}_width=0;get width(){return this._width}set width(e){const t=this._width!==e;this._width=e,t&&this.emit("propsChange",{width:e})}_height=0;get height(){return this._height}set height(e){const t=this._height!==e;this._height=e,t&&this.emit("propsChange",{height:e})}_angle=0;get angle(){return this._angle}set angle(e){const t=this._angle!==e;this._angle=e,t&&this.emit("propsChange",{angle:e})}get center(){return{x:this.left+this.width/2,y:this.top+this.height/2}}_zIndex=0;get zIndex(){return this._zIndex}set zIndex(e){const t=this._zIndex!==e;this._zIndex=e,t&&this.emit("propsChange",{zIndex:e})}_opacity=1;get opacity(){return this._opacity}set opacity(e){const t=this._opacity!==e;this._opacity=e,t&&this.emit("propsChange",{opacity:e})}_volume=1;get volume(){return this._volume}set volume(e){const t=this._volume!==e;this._volume=e,t&&this.emit("propsChange",{volume:e})}flip=null;effects=[];_style={};get style(){return this._style}set style(e){this._style=e}animatKeyFrame=null;animatOpts=null;animations=[];renderTransform={x:0,y:0,width:0,height:0,scale:1,opacity:1,angle:0,blur:0,brightness:1,mirror:0};_render(e){const{center:t}=this;e.setTransform(this.flip==="horizontal"?-1:1,0,0,this.flip==="vertical"?-1:1,t.x,t.y),e.globalAlpha=this.opacity*(this.renderTransform.opacity??1)*(this.renderTransform.brightness??1);const i=this.renderTransform.x??0,s=this.renderTransform.y??0,n=this.renderTransform.angle??0,o=this.renderTransform.scale??1;e.translate(i,s),e.scale(o,o),e.rotate((this.flip==null?1:-1)*(n*Math.PI)/180)}setAnimation(e,t){this.animatKeyFrame=Object.entries(e).map(([i,s])=>{const n={from:0,to:100}[i]??Number(i.slice(0,-1));if(isNaN(n)||n>100||n<0)throw Error("keyFrame must between 0~100");return[n/100,s]}),this.animatOpts=Object.assign({},this.animatOpts,{duration:t.duration,delay:t.delay??0,iterCount:t.iterCount??1/0})}animate(e,t){this.renderTransform={x:0,y:0,width:0,height:0,scale:1,opacity:1,angle:0,blur:0,brightness:1,mirror:0};for(const s of this.animations){const n=s.getTransform(e);n.x!==void 0&&(this.renderTransform.x+=n.x),n.y!==void 0&&(this.renderTransform.y+=n.y),n.width!==void 0&&(this.renderTransform.width+=n.width),n.height!==void 0&&(this.renderTransform.height+=n.height),n.angle!==void 0&&(this.renderTransform.angle+=n.angle),n.blur!==void 0&&(this.renderTransform.blur+=n.blur),n.scale!==void 0&&(this.renderTransform.scale*=n.scale),n.opacity!==void 0&&(this.renderTransform.opacity*=n.opacity),n.brightness!==void 0&&(this.renderTransform.brightness*=n.brightness),n.mirror!==void 0&&(this.renderTransform.mirror=Math.max(this.renderTransform.mirror||0,n.mirror)),t&&s.apply&&s.apply(t,e)}if(this.animatKeyFrame==null||this.animatOpts==null||e<this.animatOpts.delay)return;const i=tP(e,this.animatKeyFrame,this.animatOpts);for(const s in i)switch(s){case"opacity":this.opacity=i[s];break;case"x":this.left=i[s];break;case"y":this.top=i[s];break;case"w":this.width=i[s];break;case"h":this.height=i[s];break;case"angle":this.angle=i[s];break}}addAnimation(e,t,i){const s=fe.create(e,t,i);return this.animations.push(s),s.id}removeAnimation(e){this.animations=this.animations.filter(t=>t.id!==e)}clearAnimations(){this.animations=[]}updateAnimation(e,t,i,s){const n=this.animations.findIndex(a=>a.id===e);if(n===-1)return;const o=fe.create(t,{...i,id:e},s);this.animations[n]=o}copyStateTo(e){e.animatKeyFrame=this.animatKeyFrame,e.animatOpts=this.animatOpts,e.zIndex=this.zIndex,e.opacity=this.opacity,e.volume=this.volume,e.flip=this.flip,e.left=this.left,e.top=this.top,e.width=this.width,e.height=this.height,e.angle=this.angle,e.display={...this.display},e.duration=this.duration,e.playbackRate=this.playbackRate,e.trim={...this.trim},e.style=JSON.parse(JSON.stringify(this.style||{})),e.animations=[...this.animations],"src"in this&&"src"in e&&(e.src=this.src)}update(e){Object.assign(this,e),this.emit("propsChange",e)}destroy(){this.all.clear()}}function tP(r,e,t){const i=r-t.delay,s=i%t.duration,n=i/t.duration>=t.iterCount||i===t.duration?1:s/t.duration,o=e.findIndex(f=>f[0]>=n);if(o===-1)return{};const a=e[o-1],l=e[o],c=l[1];if(a==null)return c;const h=a[1],u={},d=(n-a[0])/(l[0]-a[0]);for(const f in c){if(!Object.hasOwn(c,f)||typeof f!="string")continue;const m=f;h[m]!=null&&(u[m]=(c[m]-h[m])*d+h[m])}return u}class Wi extends eP{lastVf=null;destroyed=!1;src="";transition;constructor(){super()}async getFrame(e){const t=e*this.playbackRate,{video:i,audio:s,state:n}=await this.tick(t);let o=s??[];s!=null&&this.playbackRate!==1&&(o=s.map(l=>Zg(l,this.playbackRate)));let a=null;return i!=null?(this.lastVf?.close(),i instanceof VideoFrame?(a=await createImageBitmap(i),i.close()):a=i,this.lastVf=a):this.lastVf!=null&&(a=this.lastVf),{video:a,audio:o,done:n==="done"}}async offscreenRender(e,t){const i=t*this.playbackRate;this.animate(i),super._render(e);const{width:s,height:n}=this,{video:o,audio:a,state:l}=await this.tick(i);let c=a??[];if(a!=null&&this.playbackRate!==1&&(c=a.map(u=>Zg(u,this.playbackRate))),l==="done")return{audio:c,done:!0};const h=o??this.lastVf;if(h!=null){const u=this.style.borderRadius||0,d=this.style.dropShadow;if(e.save(),d&&(d.blur>0||d.distance>0)){const m=d.distance??0,p=d.angle??0;e.shadowColor=d.color||"#000000",e.shadowBlur=d.blur||0,e.shadowOffsetX=Math.cos(p)*m,e.shadowOffsetY=Math.sin(p)*m}if(u>0){const m=Math.min(u,s/2,n/2);e.beginPath(),e.roundRect(-s/2,-n/2,s,n,m),e.clip()}e.drawImage(h,-s/2,-n/2,s,n),e.restore();const f=this.style.stroke;if(f&&f.width>0){if(e.save(),e.strokeStyle=f.color,e.lineWidth=f.width,u>0){const m=Math.min(u,s/2,n/2);e.beginPath(),e.roundRect(-s/2,-n/2,s,n,m),e.stroke()}else e.strokeRect(-s/2,-n/2,s,n);e.restore()}}return o!=null&&(this.lastVf?.close(),o instanceof ImageBitmap&&(this.lastVf=o)),{audio:c,done:!1}}set(e,t=30){if(e.display&&(e.display.from!==void 0&&(this.display.from=e.display.from<1e6?e.display.from/t*1e6:e.display.from),e.display.to!==void 0&&(this.display.to=e.display.to<1e6?e.display.to/t*1e6:e.display.to)),e.x!==void 0&&(this.left=e.x),e.y!==void 0&&(this.top=e.y),e.width!==void 0&&(this.width=e.width),e.height!==void 0&&(this.height=e.height),e.duration!==void 0){const i=e.duration<1e6?e.duration/t*1e6:e.duration;this.duration=i,this.display.from!==void 0&&(this.display.to=this.display.from+i)}return this}toJSON(e=!1){const t=this.animatKeyFrame&&this.animatOpts?{keyFrames:this.animatKeyFrame.reduce((s,[n,o])=>{const a=n===0?"from":n===1?"to":`${Math.round(n*100)}%`;return s[a]=o,s},{}),opts:this.animatOpts}:void 0,i=this.animations.map(s=>({type:s.type,opts:s.options,params:s.params||{}}));return{type:this.constructor.name,id:this.id,name:this.name,src:this.src,display:{from:this.display.from,to:this.display.to},playbackRate:this.playbackRate,duration:this.duration,left:this.left,top:this.top,width:this.width,height:this.height,angle:this.angle,zIndex:this.zIndex,opacity:this.opacity,flip:this.flip,style:this.style,trim:{from:this.trim.from,to:this.trim.to},...t&&{animation:t},...i.length>0&&{animations:i},...e&&{main:!0}}}getVisibleHandles(){return["tl","tr","bl","br","ml","mr","mt","mb","rot"]}async scaleToFit(e,t){await this.ready;const{width:i,height:s}=this.meta;if(i===0||s===0)return;const n=Math.min(e/i,t/s);this.width=i*n,this.height=s*n}async scaleToFill(e,t){await this.ready;const{width:i,height:s}=this.meta;if(i===0||s===0)return;const n=Math.max(e/i,t/s);this.width=i*n,this.height=s*n}centerInScene(e,t){this.left=(e-this.width)/2,this.top=(t-this.height)/2}destroy(){this.destroyed||(this.destroyed=!0,se.info("BaseClip destroy"),super.destroy(),this.lastVf?.close(),this.lastVf=null)}}let Cf=null;async function __(){return Cf===null&&(Cf=N3()),await Cf}const ve={get codec(){return Qn()?.codec??"mp4a.40.2"},get codecType(){return Qn()?.codecType??"aac"},get sampleRate(){return Qn()?.sampleRate??48e3},get channelCount(){return Qn()?.channelCount??2}};class $r{static async getCacheKey(e){const i=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-1",i);return Array.from(new Uint8Array(s)).map(o=>o.toString(16).padStart(2,"0")).join("")}static getPath(e){return`assets/${e}`}static async get(e){const t=await this.getCacheKey(e),i=this.getPath(t),s=ir(i);return await s.exists()?s:null}static async put(e,t){const i=await this.getCacheKey(e),s=this.getPath(i),n=ir(s);return await Ir(n,t),n}}class Xr{resources=new Map;loadingPromises=new Map;async preload(e){const i=[...new Set(e)].filter(s=>s&&!s.startsWith("data:")&&!s.startsWith("blob:")).map(s=>this.loadResource(s));await Promise.allSettled(i)}static async getReadableStream(e){const t=await $r.get(e);if(t){const a=await t.getOriginFile();if(a)return a.stream()}const i=await fetch(e);if(!i.ok)throw new Error(`Failed to fetch: ${i.status} ${i.statusText}`);const s=i.body;if(!s)throw new Error("Response body is null");if(e.startsWith("data:")||e.startsWith("blob:"))return s;const[n,o]=s.tee();return $r.put(e,o).catch(a=>{console.error(`ResourceManager: Failed to cache ${e}`,a)}),n}static async getImageBitmap(e){const t=await $r.get(e);if(t){const l=await t.getOriginFile();if(l)return await createImageBitmap(l)}if(e.startsWith("data:")||e.startsWith("blob:")){const c=await(await fetch(e)).blob();return await createImageBitmap(c)}const i=await fetch(e);if(!i.ok)throw new Error(`Failed to fetch: ${i.status} ${i.statusText}`);const s=i.body;if(!s)throw new Error("Response body is null");const[n,o]=s.tee(),a=(async()=>{const c=await new Response(n).blob();return await createImageBitmap(c)})();return $r.put(e,o).catch(l=>{console.error(`ResourceManager: Failed to cache ${e}`,l)}),await a}async loadResource(e){const t=this.loadingPromises.get(e);if(t)return t;if(this.resources.has(e)){const s=this.resources.get(e);if(s.status==="completed")return s}const i=(async()=>{const s={url:e,status:"loading"};this.resources.set(e,s);try{const n=await $r.get(e);if(n)return s.status="completed",s.localFile=n,s;const o=await fetch(e);if(!o.ok)throw new Error(`Fetch failed: ${o.status}`);const a=o.body;if(!a)throw new Error("No body");const l=await $r.put(e,a);return s.status="completed",s.localFile=l,s}catch(n){return s.status="failed",s.error=n instanceof Error?n:new Error(String(n)),s}finally{this.loadingPromises.delete(e)}})();return this.loadingPromises.set(e,i),i}async resolve(e){if(!e||e.startsWith("data:")||e.startsWith("blob:"))return e;const t=await this.loadResource(e);return t.status==="completed"&&t.localFile?t.localFile:e}getStatus(e){return this.resources.get(e)}clear(){this.resources.clear(),this.loadingPromises.clear()}}class Gt extends Wi{type="Audio";static ctx=null;ready;_meta={duration:0,width:0,height:0};get meta(){return{...this._meta,sampleRate:ve.sampleRate,chanCount:2}}chan0Buf=new Float32Array;chan1Buf=new Float32Array;getPCMData(){return[this.chan0Buf,this.chan1Buf]}opts;loop=!1;static async fromUrl(e,t={}){const i=await Xr.getReadableStream(e),s=new Gt(i,t,e);return await s.ready,s}static async fromObject(e){if(e.type!=="Audio")throw new Error(`Expected Audio, got ${e.type}`);if(!e.src||e.src.trim()==="")throw new Error("Audio requires a valid source URL");const t={};e.loop!==void 0&&(t.loop=e.loop),e.volume!==void 0&&(t.volume=e.volume);const i=await Gt.fromUrl(e.src,t);return i.left=e.left,i.top=e.top,i.width=e.width,i.height=e.height,i.angle=e.angle,i.display.from=e.display.from,i.display.to=e.display.to,i.duration=e.duration,i.playbackRate=e.playbackRate,i.zIndex=e.zIndex,i.opacity=e.opacity,i.flip=e.flip,e.animation&&i.setAnimation(e.animation.keyFrames,e.animation.opts),i}constructor(e,t={},i){super(),this.src=i!==void 0?i:"",this.opts={loop:!1,volume:1,...t},this.loop=this.opts.loop??!1,this.volume=this.opts.volume??1,this.ready=this.init(e).then(s=>{const n={width:0,height:0,duration:t.loop?1/0:this._meta.duration};return this.width=this.width===0?n.width:this.width,this.height=this.height===0?n.height:this.height,this.duration=this.duration===0?n.duration:this.duration,this.display.to=this.display.from+this.duration,n})}async init(e){Gt.ctx==null&&(Gt.ctx=new AudioContext({sampleRate:ve.sampleRate}));const t=performance.now(),i=e instanceof ReadableStream?await rP(e,Gt.ctx):e;se.info("Audio clip decoded complete:",performance.now()-t),this._meta.duration=i[0].length/ve.sampleRate*1e6,this.chan0Buf=i[0],this.chan1Buf=i[1]??this.chan0Buf,se.info("Audio clip convert to AudioData, time:",performance.now()-t)}tickInterceptor=async(e,t)=>t;timestamp=0;frameOffset=0;async tick(e){if(!this.opts.loop&&e>=this._meta.duration)return await this.tickInterceptor(e,{audio:[],state:"done"});const t=e-this.timestamp;if(e<this.timestamp||t>3e6)return this.timestamp=e,this.frameOffset=Math.ceil(this.timestamp/1e6*ve.sampleRate),await this.tickInterceptor(e,{audio:[new Float32Array(0),new Float32Array(0)],state:"success"});this.timestamp=e;const i=Math.ceil(t/1e6*ve.sampleRate),s=this.frameOffset+i,n=this.opts.loop?[Ud(this.chan0Buf,this.frameOffset,s),Ud(this.chan1Buf,this.frameOffset,s)]:[this.chan0Buf.slice(this.frameOffset,s),this.chan1Buf.slice(this.frameOffset,s)];if(this.volume!==1)for(const o of n)for(let a=0;a<o.length;a++)o[a]*=this.volume;return this.frameOffset=s,await this.tickInterceptor(e,{audio:n,state:"success"})}async split(e){await this.ready;const t=Math.ceil(e/1e6*ve.sampleRate),i=new Gt(this.getPCMData().map(n=>n.slice(0,t)),this.opts,this.src),s=new Gt(this.getPCMData().map(n=>n.slice(t)),this.opts,this.src);return[i,s]}async clone(){await this.ready;const e=new Gt(this.getPCMData(),this.opts,this.src);return await e.ready,this.copyStateTo(e),e}destroy(){this.chan0Buf=new Float32Array(0),this.chan1Buf=new Float32Array(0),se.info("---- audioclip destroy ----"),super.destroy()}toJSON(e=!1){return{...super.toJSON(e),type:"Audio",loop:this.loop,id:this.id,volume:this.volume}}static concatAudio=iP;async createPlaybackElement(){if(await this.ready,!this.src||this.src.trim()==="")throw new Error("Audio requires a source URL for playback");const e=this.src.startsWith("blob:")?this.src:void 0,t=document.createElement("audio");return t.crossOrigin="anonymous",t.autoplay=!1,t.preload="auto",t.loop=this.opts.loop||!1,t.src=this.src,await new Promise((i,s)=>{const n=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",o),t.pause(),t.currentTime=0,i()},o=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",o),s(new Error("Failed to load audio"))};t.addEventListener("loadeddata",n,{once:!0}),t.addEventListener("error",o,{once:!0}),t.load()}),{element:t,objectUrl:e}}async play(e,t){const i=e;if(Math.abs(i.currentTime-t)>.1&&(i.currentTime=t),i.paused)try{await i.play()}catch{try{await i.play()}catch(n){console.warn("Failed to play audio:",n)}}}pause(e){e.pause()}async seek(e,t){const i=e;return i.pause(),i.currentTime=t,new Promise(s=>{if(Math.abs(i.currentTime-t)<.01){s();return}const n=()=>{i.removeEventListener("seeked",n),s()};i.addEventListener("seeked",n,{once:!0}),setTimeout(()=>{i.removeEventListener("seeked",n),s()},500)})}syncPlayback(e,t,i){const s=e,n=this.meta.duration/1e6,o=i>=0&&i<n;s.volume=this.volume,t&&o?s.paused&&this.play(s,i).catch(console.warn):(s.paused||s.pause(),o&&Math.abs(s.currentTime-i)>.1&&(s.currentTime=i))}cleanupPlayback(e,t){const i=e;i.pause(),i.removeAttribute("src"),i.load(),t&&t.startsWith("blob:")&&URL.revokeObjectURL(t)}}async function iP(r,e){const t=[];for(const i of r)await i.ready,t.push(i.getPCMData());return new Gt(qg(t),e)}async function rP(r,e){const t=await new Response(r).arrayBuffer();return Fd(await e.decodeAudioData(t))}var A=(r=>(r.Application="application",r.WebGLPipes="webgl-pipes",r.WebGLPipesAdaptor="webgl-pipes-adaptor",r.WebGLSystem="webgl-system",r.WebGPUPipes="webgpu-pipes",r.WebGPUPipesAdaptor="webgpu-pipes-adaptor",r.WebGPUSystem="webgpu-system",r.CanvasSystem="canvas-system",r.CanvasPipesAdaptor="canvas-pipes-adaptor",r.CanvasPipes="canvas-pipes",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r.MaskEffect="mask-effect",r.BlendMode="blend-mode",r.TextureSource="texture-source",r.Environment="environment",r.ShapeBuilder="shape-builder",r.Batcher="batcher",r))(A||{});const Ef=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},_o=(r,e)=>Ef(r).priority??e,J={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Ef).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...r){return r.map(Ef).forEach(e=>{e.type.forEach(t=>{const i=this._addHandlers,s=this._queue;i[t]?i[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e))})}),this},handle(r,e,t){const i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=e,s[r]=t;const n=this._queue;return n[r]&&(n[r]?.forEach(o=>e(o)),delete n[r]),this},handleByMap(r,e){return this.handle(r,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByNamedList(r,e,t=-1){return this.handle(r,i=>{e.findIndex(n=>n.name===i.name)>=0||(e.push({name:i.name,value:i.ref}),e.sort((n,o)=>_o(o.value,t)-_o(n.value,t)))},i=>{const s=e.findIndex(n=>n.name===i.name);s!==-1&&e.splice(s,1)})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>_o(n,t)-_o(s,t)))},i=>{const s=e.indexOf(i.ref);s!==-1&&e.splice(s,1)})},mixin(r,...e){for(const t of e)Object.defineProperties(r.prototype,Object.getOwnPropertyDescriptors(t))}},sP={extension:{type:A.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Promise.resolve().then(()=>KO)}},nP={extension:{type:A.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Promise.resolve().then(()=>jO)}};class ke{constructor(e,t,i){this._x=t||0,this._y=i||0,this._observer=e}clone(e){return new ke(e??this._observer,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}}function Af(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pf={exports:{}},x_;function oP(){return x_||(x_=1,(function(r){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(l,c,h){this.fn=l,this.context=c,this.once=h||!1}function n(l,c,h,u,d){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new s(h,u||l,d),m=t?t+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],f]:l._events[m].push(f):(l._events[m]=f,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)e.call(h,u)&&c.push(t?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},a.prototype.listeners=function(c){var h=t?t+c:c,u=this._events[h];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,f=u.length,m=new Array(f);d<f;d++)m[d]=u[d].fn;return m},a.prototype.listenerCount=function(c){var h=t?t+c:c,u=this._events[h];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,h,u,d,f,m){var p=t?t+c:c;if(!this._events[p])return!1;var g=this._events[p],_=arguments.length,x,y;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),_){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,h),!0;case 3:return g.fn.call(g.context,h,u),!0;case 4:return g.fn.call(g.context,h,u,d),!0;case 5:return g.fn.call(g.context,h,u,d,f),!0;case 6:return g.fn.call(g.context,h,u,d,f,m),!0}for(y=1,x=new Array(_-1);y<_;y++)x[y-1]=arguments[y];g.fn.apply(g.context,x)}else{var v=g.length,b;for(y=0;y<v;y++)switch(g[y].once&&this.removeListener(c,g[y].fn,void 0,!0),_){case 1:g[y].fn.call(g[y].context);break;case 2:g[y].fn.call(g[y].context,h);break;case 3:g[y].fn.call(g[y].context,h,u);break;case 4:g[y].fn.call(g[y].context,h,u,d);break;default:if(!x)for(b=1,x=new Array(_-1);b<_;b++)x[b-1]=arguments[b];g[y].fn.apply(g[y].context,x)}}return!0},a.prototype.on=function(c,h,u){return n(this,c,h,u,!1)},a.prototype.once=function(c,h,u){return n(this,c,h,u,!0)},a.prototype.removeListener=function(c,h,u,d){var f=t?t+c:c;if(!this._events[f])return this;if(!h)return o(this,f),this;var m=this._events[f];if(m.fn)m.fn===h&&(!d||m.once)&&(!u||m.context===u)&&o(this,f);else{for(var p=0,g=[],_=m.length;p<_;p++)(m[p].fn!==h||d&&!m[p].once||u&&m[p].context!==u)&&g.push(m[p]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(c){var h;return c?(h=t?t+c:c,this._events[h]&&o(this,h)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,r.exports=a})(Pf)),Pf.exports}var aP=oP();const At=Af(aP),lP=Math.PI*2,cP=180/Math.PI,hP=Math.PI/180;class K{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new K(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}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return If.x=0,If.y=0,If}}const If=new K;class L{constructor(e=1,t=0,i=0,s=1,n=0,o=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,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,i,s,n,o){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=o,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new K;const i=e.x,s=e.y;return t.x=this.a*i+this.c*s+this.tx,t.y=this.b*i+this.d*s+this.ty,t}applyInverse(e,t){t=t||new K;const i=this.a,s=this.b,n=this.c,o=this.d,a=this.tx,l=this.ty,c=1/(i*o+n*-s),h=e.x,u=e.y;return t.x=o*c*h+-n*c*u+(l*n-a*o)*c,t.y=i*c*u+-s*c*h+(-l*i+a*s)*c,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),i=Math.sin(e),s=this.a,n=this.c,o=this.tx;return this.a=s*t-this.b*i,this.b=s*i+this.b*t,this.c=n*t-this.d*i,this.d=n*i+this.d*t,this.tx=o*t-this.ty*i,this.ty=o*i+this.ty*t,this}append(e){const t=this.a,i=this.b,s=this.c,n=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*n+this.ty,this}appendFrom(e,t){const i=e.a,s=e.b,n=e.c,o=e.d,a=e.tx,l=e.ty,c=t.a,h=t.b,u=t.c,d=t.d;return this.a=i*c+s*u,this.b=i*h+s*d,this.c=n*c+o*u,this.d=n*h+o*d,this.tx=a*c+l*u+t.tx,this.ty=a*h+l*d+t.ty,this}setTransform(e,t,i,s,n,o,a,l,c){return this.a=Math.cos(a+c)*n,this.b=Math.sin(a+c)*n,this.c=-Math.sin(a-l)*o,this.d=Math.cos(a-l)*o,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*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 i=this.a,s=this.c;this.a=i*e.a+this.b*e.c,this.b=i*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,i=this.b,s=this.c,n=this.d,o=e.pivot,a=-Math.atan2(-s,n),l=Math.atan2(i,t),c=Math.abs(a+l);return c<1e-5||Math.abs(lP-c)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(o.x*t+o.y*s),e.position.y=this.ty+(o.x*i+o.y*n),e}invert(){const e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,o=e*s-t*i;return this.a=s/o,this.b=-t/o,this.c=-i/o,this.d=e/o,this.tx=(i*this.ty-s*n)/o,this.ty=-(e*this.ty-t*n)/o,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}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 L;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}equals(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}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return dP.identity()}static get shared(){return uP.identity()}}const uP=new L,dP=new L,dr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],fr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],pr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],mr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Mf=[],y_=[],xo=Math.sign;function fP(){for(let r=0;r<16;r++){const e=[];Mf.push(e);for(let t=0;t<16;t++){const i=xo(dr[r]*dr[t]+pr[r]*fr[t]),s=xo(fr[r]*dr[t]+mr[r]*fr[t]),n=xo(dr[r]*pr[t]+pr[r]*mr[t]),o=xo(fr[r]*pr[t]+mr[r]*mr[t]);for(let a=0;a<16;a++)if(dr[a]===i&&fr[a]===s&&pr[a]===n&&mr[a]===o){e.push(a);break}}}for(let r=0;r<16;r++){const e=new L;e.set(dr[r],fr[r],pr[r],mr[r],0,0),y_.push(e)}}fP();const be={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:r=>dr[r],uY:r=>fr[r],vX:r=>pr[r],vY:r=>mr[r],inv:r=>r&8?r&15:-r&7,add:(r,e)=>Mf[r][e],sub:(r,e)=>Mf[r][be.inv(e)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,e)=>Math.abs(r)*2<=Math.abs(e)?e>=0?be.S:be.N:Math.abs(e)*2<=Math.abs(r)?r>0?be.E:be.W:e>0?r>0?be.SE:be.SW:r>0?be.NE:be.NW,matrixAppendRotationInv:(r,e,t=0,i=0)=>{const s=y_[be.inv(e)];s.tx=t,s.ty=i,r.append(s)},transformRectCoords:(r,e,t,i)=>{const{x:s,y:n,width:o,height:a}=r,{x:l,y:c,width:h,height:u}=e;return t===be.E?(i.set(s+l,n+c,o,a),i):t===be.S?i.set(h-n-a+l,s+c,a,o):t===be.W?i.set(h-s-o+l,u-n-a+c,o,a):t===be.N?i.set(n+l,u-s-o+c,a,o):i.set(s+l,n+c,o,a)}},yo=[new K,new K,new K,new K];class Y{constructor(e=0,t=0,i=0,s=0){this.type="rectangle",this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new Y(0,0,0,0)}clone(){return new Y(this.x,this.y,this.width,this.height)}copyFromBounds(e){return this.x=e.minX,this.y=e.minY,this.width=e.maxX-e.minX,this.height=e.maxY-e.minY,this}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),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}strokeContains(e,t,i,s=.5){const{width:n,height:o}=this;if(n<=0||o<=0)return!1;const a=this.x,l=this.y,c=i*(1-s),h=i-c,u=a-c,d=a+n+c,f=l-c,m=l+o+c,p=a+h,g=a+n-h,_=l+h,x=l+o-h;return e>=u&&e<=d&&t>=f&&t<=m&&!(e>p&&e<g&&t>_&&t<x)}intersects(e,t){if(!t){const S=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=S)return!1;const E=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>E}const i=this.left,s=this.right,n=this.top,o=this.bottom;if(s<=i||o<=n)return!1;const a=yo[0].set(e.left,e.top),l=yo[1].set(e.left,e.bottom),c=yo[2].set(e.right,e.top),h=yo[3].set(e.right,e.bottom);if(c.x<=a.x||l.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(l,l),t.apply(c,c),t.apply(h,h),Math.max(a.x,l.x,c.x,h.x)<=i||Math.min(a.x,l.x,c.x,h.x)>=s||Math.max(a.y,l.y,c.y,h.y)<=n||Math.min(a.y,l.y,c.y,h.y)>=o))return!1;const d=u*(l.y-a.y),f=u*(a.x-l.x),m=d*i+f*n,p=d*s+f*n,g=d*i+f*o,_=d*s+f*o;if(Math.max(m,p,g,_)<=d*a.x+f*a.y||Math.min(m,p,g,_)>=d*h.x+f*h.y)return!1;const x=u*(a.y-c.y),y=u*(c.x-a.x),v=x*i+y*n,b=x*s+y*n,T=x*i+y*o,w=x*s+y*o;return!(Math.max(v,b,T,w)<=x*a.x+y*a.y||Math.min(v,b,T,w)>=x*h.x+y*h.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),i=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(e=1,t=.001){const i=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=i-this.x,this.height=s-this.y,this}scale(e,t=e){return this.x*=e,this.y*=t,this.width*=e,this.height*=t,this}enlarge(e){const t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=s,this.height=n-s,this}getBounds(e){return e||(e=new Y),e.copyFrom(this),e}containsRect(e){if(this.width<=0||this.height<=0)return!1;const t=e.x,i=e.y,s=e.x+e.width,n=e.y+e.height;return t>=this.x&&t<this.x+this.width&&i>=this.y&&i<this.y+this.height&&s>=this.x&&s<this.x+this.width&&n>=this.y&&n<this.y+this.height}set(e,t,i,s){return this.x=e,this.y=t,this.width=i,this.height=s,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const Rf={default:-1};function we(r="default"){return Rf[r]===void 0&&(Rf[r]=-1),++Rf[r]}const v_=new Set,ne="8.0.0",pP="8.3.4",Yr={quiet:!1,noColor:!1},$=(r,e,t=3)=>{if(Yr.quiet||v_.has(e))return;let i=new Error().stack;const s=`${e}
|
|
67
67
|
Deprecated since v${r}`,n=typeof console.groupCollapsed=="function"&&!Yr.noColor;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",s):(i=i.split(`
|
|
68
68
|
`).splice(t).join(`
|
|
69
69
|
`),n?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",s),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",s),console.warn(i))),v_.add(e)};Object.defineProperties($,{quiet:{get:()=>Yr.quiet,set:r=>{Yr.quiet=r},enumerable:!0,configurable:!1},noColor:{get:()=>Yr.noColor,set:r=>{Yr.noColor=r},enumerable:!0,configurable:!1}});const b_=()=>{};function qr(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function w_(r){return!(r&r-1)&&!!r}function T_(r){const e={};for(const t in r)r[t]!==void 0&&(e[t]=r[t]);return e}const S_=Object.create(null);function mP(r){const e=S_[r];return e===void 0&&(S_[r]=we("resource")),e}const C_=class w1 extends At{constructor(e={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,e={...w1.defaultOptions,...e},this.addressMode=e.addressMode,this.addressModeU=e.addressModeU??this.addressModeU,this.addressModeV=e.addressModeV??this.addressModeV,this.addressModeW=e.addressModeW??this.addressModeW,this.scaleMode=e.scaleMode,this.magFilter=e.magFilter??this.magFilter,this.minFilter=e.minFilter??this.minFilter,this.mipmapFilter=e.mipmapFilter??this.mipmapFilter,this.lodMinClamp=e.lodMinClamp,this.lodMaxClamp=e.lodMaxClamp,this.compare=e.compare,this.maxAnisotropy=e.maxAnisotropy??1}set addressMode(e){this.addressModeU=e,this.addressModeV=e,this.addressModeW=e}get addressMode(){return this.addressModeU}set wrapMode(e){$(ne,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=e}get wrapMode(){return this.addressMode}set scaleMode(e){this.magFilter=e,this.minFilter=e,this.mipmapFilter=e}get scaleMode(){return this.magFilter}set maxAnisotropy(e){this._maxAnisotropy=Math.min(e,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this.emit("change",this),this._sharedResourceId=null}_generateResourceId(){const e=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=mP(e),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};C_.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let Vi=C_;const E_=class T1 extends At{constructor(e={}){super(),this.options=e,this.uid=we("textureSource"),this._resourceType="textureSource",this._resourceId=we("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,e={...T1.defaultOptions,...e},this.label=e.label??"",this.resource=e.resource,this.autoGarbageCollect=e.autoGarbageCollect,this._resolution=e.resolution,e.width?this.pixelWidth=e.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,e.height?this.pixelHeight=e.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=e.format,this.dimension=e.dimensions,this.mipLevelCount=e.mipLevelCount,this.autoGenerateMipmaps=e.autoGenerateMipmaps,this.sampleCount=e.sampleCount,this.antialias=e.antialias,this.alphaMode=e.alphaMode,this.style=new Vi(T_(e)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(e){this.style!==e&&(this._style?.off("change",this._onStyleChange,this),this._style=e,this._style?.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(e){this._style.maxAnisotropy=e}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(e){this._style.addressMode=e}get repeatMode(){return this._style.addressMode}set repeatMode(e){this._style.addressMode=e}get magFilter(){return this._style.magFilter}set magFilter(e){this._style.magFilter=e}get minFilter(){return this._style.minFilter}set minFilter(e){this._style.minFilter=e}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(e){this._style.mipmapFilter=e}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(e){this._style.lodMinClamp=e}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(e){this._style.lodMaxClamp=e}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const e=this._resolution;if(this.resize(this.resourceWidth/e,this.resourceHeight/e))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){this._resourceId=we("resource"),this.emit("change",this),this.emit("unload",this)}get resourceWidth(){const{resource:e}=this;return e.naturalWidth||e.videoWidth||e.displayWidth||e.width}get resourceHeight(){const{resource:e}=this;return e.naturalHeight||e.videoHeight||e.displayHeight||e.height}get resolution(){return this._resolution}set resolution(e){this._resolution!==e&&(this._resolution=e,this.width=this.pixelWidth/e,this.height=this.pixelHeight/e)}resize(e,t,i){i||(i=this._resolution),e||(e=this.width),t||(t=this.height);const s=Math.round(e*i),n=Math.round(t*i);return this.width=s/i,this.height=n/i,this._resolution=i,this.pixelWidth===s&&this.pixelHeight===n?!1:(this._refreshPOT(),this.pixelWidth=s,this.pixelHeight=n,this.emit("resize",this),this._resourceId=we("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(e){this._style.wrapMode=e}get wrapMode(){return this._style.wrapMode}set scaleMode(e){this._style.scaleMode=e}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=w_(this.pixelWidth)&&w_(this.pixelHeight)}static test(e){throw new Error("Unimplemented")}};E_.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let Xe=E_;class kf extends Xe{constructor(e){const t=e.resource||new Float32Array(e.width*e.height*4);let i=e.format;i||(t instanceof Float32Array?i="rgba32float":t instanceof Int32Array||t instanceof Uint32Array?i="rgba32uint":t instanceof Int16Array||t instanceof Uint16Array?i="rgba16uint":(t instanceof Int8Array,i="bgra8unorm")),super({...e,resource:t,format:i}),this.uploadMethodId="buffer"}static test(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}kf.extension=A.TextureSource;const A_=new L;class P_{constructor(e,t){this.mapCoord=new L,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof t>"u"?this.clampMargin=e.width<10?0:.5:this.clampMargin=t,this.isSimple=!1,this.texture=e}get texture(){return this._texture}set texture(e){this.texture!==e&&(this._texture?.removeListener("update",this.update,this),this._texture=e,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(e,t){t===void 0&&(t=e);const i=this.mapCoord;for(let s=0;s<e.length;s+=2){const n=e[s],o=e[s+1];t[s]=n*i.a+o*i.c+i.tx,t[s+1]=n*i.b+o*i.d+i.ty}return t}update(){const e=this._texture;this._updateID++;const t=e.uvs;this.mapCoord.set(t.x1-t.x0,t.y1-t.y0,t.x3-t.x0,t.y3-t.y0,t.x0,t.y0);const i=e.orig,s=e.trim;s&&(A_.set(i.width/s.width,0,0,i.height/s.height,-s.x/s.width,-s.y/s.height),this.mapCoord.append(A_));const n=e.source,o=this.uClampFrame,a=this.clampMargin/n._resolution,l=this.clampOffset/n._resolution;return o[0]=(e.frame.x+a+l)/n.width,o[1]=(e.frame.y+a+l)/n.height,o[2]=(e.frame.x+e.frame.width-a+l)/n.width,o[3]=(e.frame.y+e.frame.height-a+l)/n.height,this.uClampOffset[0]=this.clampOffset/n.pixelWidth,this.uClampOffset[1]=this.clampOffset/n.pixelHeight,this.isSimple=e.frame.width===n.width&&e.frame.height===n.height&&e.rotate===0,!0}}class O extends At{constructor({source:e,label:t,frame:i,orig:s,trim:n,defaultAnchor:o,defaultBorders:a,rotate:l,dynamic:c}={}){if(super(),this.uid=we("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new Y,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=t,this.source=e?.source??new Xe,this.noFrame=!i,i)this.frame.copyFrom(i);else{const{width:h,height:u}=this._source;this.frame.width=h,this.frame.height=u}this.orig=s||this.frame,this.trim=n,this.rotate=l??0,this.defaultAnchor=o,this.defaultBorders=a,this.destroyed=!1,this.dynamic=c||!1,this.updateUvs()}set source(e){this._source&&this._source.off("resize",this.update,this),this._source=e,e.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new P_(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:e,frame:t}=this,{width:i,height:s}=this._source,n=t.x/i,o=t.y/s,a=t.width/i,l=t.height/s;let c=this.rotate;if(c){const h=a/2,u=l/2,d=n+h,f=o+u;c=be.add(c,be.NW),e.x0=d+h*be.uX(c),e.y0=f+u*be.uY(c),c=be.add(c,2),e.x1=d+h*be.uX(c),e.y1=f+u*be.uY(c),c=be.add(c,2),e.x2=d+h*be.uX(c),e.y2=f+u*be.uY(c),c=be.add(c,2),e.x3=d+h*be.uX(c),e.y3=f+u*be.uY(c)}else e.x0=n,e.y0=o,e.x1=n+a,e.y1=o,e.x2=n+a,e.y2=o+l,e.x3=n,e.y3=o+l}destroy(e=!1){this._source&&(this._source.off("resize",this.update,this),e&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return $(ne,"Texture.baseTexture is now Texture.source"),this._source}}O.EMPTY=new O({label:"EMPTY",source:new Xe({label:"EMPTY"})}),O.EMPTY.destroy=b_,O.WHITE=new O({source:new kf({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"}),O.WHITE.destroy=b_;function I_(r,e,t){const{width:i,height:s}=t.orig,n=t.trim;if(n){const o=n.width,a=n.height;r.minX=n.x-e._x*i,r.maxX=r.minX+o,r.minY=n.y-e._y*s,r.maxY=r.minY+a}else r.minX=-e._x*i,r.maxX=r.minX+i,r.minY=-e._y*s,r.maxY=r.minY+s}const M_=new L;class nt{constructor(e=1/0,t=1/0,i=-1/0,s=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=M_,this.minX=e,this.minY=t,this.maxX=i,this.maxY=s}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new Y);const e=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(e.x=0,e.y=0,e.width=0,e.height=0):e.copyFromBounds(this),e}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=M_,this}set(e,t,i,s){this.minX=e,this.minY=t,this.maxX=i,this.maxY=s}addFrame(e,t,i,s,n){n||(n=this.matrix);const o=n.a,a=n.b,l=n.c,c=n.d,h=n.tx,u=n.ty;let d=this.minX,f=this.minY,m=this.maxX,p=this.maxY,g=o*e+l*t+h,_=a*e+c*t+u;g<d&&(d=g),_<f&&(f=_),g>m&&(m=g),_>p&&(p=_),g=o*i+l*t+h,_=a*i+c*t+u,g<d&&(d=g),_<f&&(f=_),g>m&&(m=g),_>p&&(p=_),g=o*e+l*s+h,_=a*e+c*s+u,g<d&&(d=g),_<f&&(f=_),g>m&&(m=g),_>p&&(p=_),g=o*i+l*s+h,_=a*i+c*s+u,g<d&&(d=g),_<f&&(f=_),g>m&&(m=g),_>p&&(p=_),this.minX=d,this.minY=f,this.maxX=m,this.maxY=p}addRect(e,t){this.addFrame(e.x,e.y,e.x+e.width,e.y+e.height,t)}addBounds(e,t){this.addFrame(e.minX,e.minY,e.maxX,e.maxY,t)}addBoundsMask(e){this.minX=this.minX>e.minX?this.minX:e.minX,this.minY=this.minY>e.minY?this.minY:e.minY,this.maxX=this.maxX<e.maxX?this.maxX:e.maxX,this.maxY=this.maxY<e.maxY?this.maxY:e.maxY}applyMatrix(e){const t=this.minX,i=this.minY,s=this.maxX,n=this.maxY,{a:o,b:a,c:l,d:c,tx:h,ty:u}=e;let d=o*t+l*i+h,f=a*t+c*i+u;this.minX=d,this.minY=f,this.maxX=d,this.maxY=f,d=o*s+l*i+h,f=a*s+c*i+u,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY,d=o*t+l*n+h,f=a*t+c*n+u,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY,d=o*s+l*n+h,f=a*s+c*n+u,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY}fit(e){return this.minX<e.left&&(this.minX=e.left),this.maxX>e.right&&(this.maxX=e.right),this.minY<e.top&&(this.minY=e.top),this.maxY>e.bottom&&(this.maxY=e.bottom),this}fitBounds(e,t,i,s){return this.minX<e&&(this.minX=e),this.maxX>t&&(this.maxX=t),this.minY<i&&(this.minY=i),this.maxY>s&&(this.maxY=s),this}pad(e,t=e){return this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new nt(this.minX,this.minY,this.maxX,this.maxY)}scale(e,t=e){return this.minX*=e,this.minY*=t,this.maxX*=e,this.maxY*=t,this}get x(){return this.minX}set x(e){const t=this.maxX-this.minX;this.minX=e,this.maxX=e+t}get y(){return this.minY}set y(e){const t=this.maxY-this.minY;this.minY=e,this.maxY=e+t}get width(){return this.maxX-this.minX}set width(e){this.maxX=this.minX+e}get height(){return this.maxY-this.minY}set height(e){this.maxY=this.minY+e}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(e,t,i,s){let n=this.minX,o=this.minY,a=this.maxX,l=this.maxY;s||(s=this.matrix);const c=s.a,h=s.b,u=s.c,d=s.d,f=s.tx,m=s.ty;for(let p=t;p<i;p+=2){const g=e[p],_=e[p+1],x=c*g+u*_+f,y=h*g+d*_+m;n=x<n?x:n,o=y<o?y:o,a=x>a?x:a,l=y>l?y:l}this.minX=n,this.minY=o,this.maxX=a,this.maxY=l}containsPoint(e,t){return this.minX<=e&&this.minY<=t&&this.maxX>=e&&this.maxY>=t}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(e){return this.minX=e.minX,this.minY=e.minY,this.maxX=e.maxX,this.maxY=e.maxY,this}}var gP={grad:.9,turn:360,rad:360/(2*Math.PI)},gi=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},Ke=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*r)/t+0},Nt=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),r>t?t:r>e?r:e},R_=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},k_=function(r){return{r:Nt(r.r,0,255),g:Nt(r.g,0,255),b:Nt(r.b,0,255),a:Nt(r.a)}},Ff=function(r){return{r:Ke(r.r),g:Ke(r.g),b:Ke(r.b),a:Ke(r.a,3)}},_P=/^#([0-9a-f]{3,8})$/i,vo=function(r){var e=r.toString(16);return e.length<2?"0"+e:e},F_=function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=Math.max(e,t,i),o=n-Math.min(e,t,i),a=o?n===e?(t-i)/o:n===t?2+(i-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:s}},U_=function(r){var e=r.h,t=r.s,i=r.v,s=r.a;e=e/360*6,t/=100,i/=100;var n=Math.floor(e),o=i*(1-t),a=i*(1-(e-n)*t),l=i*(1-(1-e+n)*t),c=n%6;return{r:255*[i,a,o,o,l,i][c],g:255*[l,i,i,a,o,o][c],b:255*[o,o,l,i,i,a][c],a:s}},B_=function(r){return{h:R_(r.h),s:Nt(r.s,0,100),l:Nt(r.l,0,100),a:Nt(r.a)}},O_=function(r){return{h:Ke(r.h),s:Ke(r.s),l:Ke(r.l),a:Ke(r.a,3)}},D_=function(r){return U_((t=(e=r).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},zs=function(r){return{h:(e=F_(r)).h,s:(s=(200-(t=e.s))*(i=e.v)/100)>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,i,s},xP=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yP=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vP=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bP=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Uf={string:[[function(r){var e=_P.exec(r);return e?(r=e[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?Ke(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?Ke(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var e=vP.exec(r)||bP.exec(r);return e?e[2]!==e[4]||e[4]!==e[6]?null:k_({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(r){var e=xP.exec(r)||yP.exec(r);if(!e)return null;var t,i,s=B_({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(gP[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return D_(s)},"hsl"]],object:[[function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return gi(e)&&gi(t)&&gi(i)?k_({r:Number(e),g:Number(t),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var e=r.h,t=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!gi(e)||!gi(t)||!gi(i))return null;var o=B_({h:Number(e),s:Number(t),l:Number(i),a:Number(n)});return D_(o)},"hsl"],[function(r){var e=r.h,t=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!gi(e)||!gi(t)||!gi(i))return null;var o=(function(a){return{h:R_(a.h),s:Nt(a.s,0,100),v:Nt(a.v,0,100),a:Nt(a.a)}})({h:Number(e),s:Number(t),v:Number(i),a:Number(n)});return U_(o)},"hsv"]]},z_=function(r,e){for(var t=0;t<e.length;t++){var i=e[t][0](r);if(i)return[i,e[t][1]]}return[null,void 0]},wP=function(r){return typeof r=="string"?z_(r.trim(),Uf.string):typeof r=="object"&&r!==null?z_(r,Uf.object):[null,void 0]},Bf=function(r,e){var t=zs(r);return{h:t.h,s:Nt(t.s+100*e,0,100),l:t.l,a:t.a}},Of=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},G_=function(r,e){var t=zs(r);return{h:t.h,s:t.s,l:Nt(t.l+100*e,0,100),a:t.a}},Df=(function(){function r(e){this.parsed=wP(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return Ke(Of(this.rgba),2)},r.prototype.isDark=function(){return Of(this.rgba)<.5},r.prototype.isLight=function(){return Of(this.rgba)>=.5},r.prototype.toHex=function(){return e=Ff(this.rgba),t=e.r,i=e.g,s=e.b,o=(n=e.a)<1?vo(Ke(255*n)):"","#"+vo(t)+vo(i)+vo(s)+o;var e,t,i,s,n,o},r.prototype.toRgb=function(){return Ff(this.rgba)},r.prototype.toRgbString=function(){return e=Ff(this.rgba),t=e.r,i=e.g,s=e.b,(n=e.a)<1?"rgba("+t+", "+i+", "+s+", "+n+")":"rgb("+t+", "+i+", "+s+")";var e,t,i,s,n},r.prototype.toHsl=function(){return O_(zs(this.rgba))},r.prototype.toHslString=function(){return e=O_(zs(this.rgba)),t=e.h,i=e.s,s=e.l,(n=e.a)<1?"hsla("+t+", "+i+"%, "+s+"%, "+n+")":"hsl("+t+", "+i+"%, "+s+"%)";var e,t,i,s,n},r.prototype.toHsv=function(){return e=F_(this.rgba),{h:Ke(e.h),s:Ke(e.s),v:Ke(e.v),a:Ke(e.a,3)};var e},r.prototype.invert=function(){return ni({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},r.prototype.saturate=function(e){return e===void 0&&(e=.1),ni(Bf(this.rgba,e))},r.prototype.desaturate=function(e){return e===void 0&&(e=.1),ni(Bf(this.rgba,-e))},r.prototype.grayscale=function(){return ni(Bf(this.rgba,-1))},r.prototype.lighten=function(e){return e===void 0&&(e=.1),ni(G_(this.rgba,e))},r.prototype.darken=function(e){return e===void 0&&(e=.1),ni(G_(this.rgba,-e))},r.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},r.prototype.alpha=function(e){return typeof e=="number"?ni({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Ke(this.rgba.a,3);var t},r.prototype.hue=function(e){var t=zs(this.rgba);return typeof e=="number"?ni({h:e,s:t.s,l:t.l,a:t.a}):Ke(t.h)},r.prototype.isEqual=function(e){return this.toHex()===ni(e).toHex()},r})(),ni=function(r){return r instanceof Df?r:new Df(r)},N_=[],TP=function(r){r.forEach(function(e){N_.indexOf(e)<0&&(e(Df,Uf),N_.push(e))})};function SP(r,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"},i={};for(var s in t)i[t[s]]=s;var n={};r.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,l,c=i[this.toHex()];if(c)return c;if(o?.closest){var h=this.toRgb(),u=1/0,d="black";if(!n.length)for(var f in t)n[f]=new r(t[f]).toRgb();for(var m in t){var p=(a=h,l=n[m],Math.pow(a.r-l.r,2)+Math.pow(a.g-l.g,2)+Math.pow(a.b-l.b,2));p<u&&(u=p,d=m)}return d}},e.string.push([function(o){var a=o.toLowerCase(),l=a==="transparent"?"#0000":t[a];return l?new r(l).toRgb():null},"name"])}TP([SP]);const Kr=class bn{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 bn)this._value=this._cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,e))&&(this._value=this._cloneSource(e),this._normalize(this._value))}}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 i=typeof e;if(i!==typeof t)return!1;if(i==="number"||i==="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((n,o)=>n===t[o]);if(e!==null&&t!==null){const n=Object.keys(e),o=Object.keys(t);return n.length!==o.length?!1:n.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,i,s]=this._components;return{r:e,g:t,b:i,a:s}}toRgb(){const[e,t,i]=this._components;return{r:e,g:t,b:i}}toRgbaString(){const[e,t,i]=this.toUint8RgbArray();return`rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){const[t,i,s]=this._components;return this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb),e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(s*255),e}toArray(e){this._arrayRgba||(this._arrayRgba=[]),e||(e=this._arrayRgba);const[t,i,s,n]=this._components;return e[0]=t,e[1]=i,e[2]=s,e[3]=n,e}toRgbArray(e){this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb);const[t,i,s]=this._components;return e[0]=t,e[1]=i,e[2]=s,e}toNumber(){return this._int}toBgrNumber(){const[e,t,i]=this.toUint8RgbArray();return(i<<16)+(t<<8)+e}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,i,s,n]=bn._temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=i,this._components[2]*=s,this._components[3]*=n,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 i=this._int>>16&255,s=this._int>>8&255,n=this._int&255;return t&&(i=i*e+.5|0,s=s*e+.5|0,n=n*e+.5|0),(e*255<<24)+(i<<16)+(s<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}_normalize(e){let t,i,s,n;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;t=(o>>16&255)/255,i=(o>>8&255)/255,s=(o&255)/255,n=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,i,s,n=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,i,s,n=255]=e,t/=255,i/=255,s/=255,n/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const a=bn.HEX_PATTERN.exec(e);a&&(e=`#${a[2]}`)}const o=ni(e);o.isValid()&&({r:t,g:i,b:s,a:n}=o.rgba,t/=255,i/=255,s/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=i,this._components[2]=s,this._components[3]=n,this._refreshInt();else throw new Error(`Unable to convert color ${e}`)}_refreshInt(){this._clamp(this._components);const[e,t,i]=this._components;this._int=(e*255<<16)+(t*255<<8)+(i*255|0)}_clamp(e,t=0,i=1){return typeof e=="number"?Math.min(Math.max(e,t),i):(e.forEach((s,n)=>{e[n]=Math.min(Math.max(s,t),i)}),e)}static isColorLike(e){return typeof e=="number"||typeof e=="string"||e instanceof Number||e instanceof bn||Array.isArray(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Float32Array||e.r!==void 0&&e.g!==void 0&&e.b!==void 0||e.r!==void 0&&e.g!==void 0&&e.b!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0&&e.a!==void 0}};Kr.shared=new Kr,Kr._temp=new Kr,Kr.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let me=Kr;const CP={cullArea:null,cullable:!1,cullableChildren:!0};let zf=0;const L_=500;function ee(...r){zf!==L_&&(zf++,zf===L_?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...r))}const jr={_registeredResources:new Set,register(r){this._registeredResources.add(r)},unregister(r){this._registeredResources.delete(r)},release(){this._registeredResources.forEach(r=>r.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(r){return this._registeredResources.has(r)},reset(){this._registeredResources.clear()}};class EP{constructor(e,t){this._pool=[],this._count=0,this._index=0,this._classType=e,t&&this.prepopulate(t)}prepopulate(e){for(let t=0;t<e;t++)this._pool[this._index++]=new this._classType;this._count+=e}get(e){let t;return this._index>0?t=this._pool[--this._index]:(t=new this._classType,this._count++),t.init?.(e),t}return(e){e.reset?.(),this._pool[this._index++]=e}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let e=0;e<this._index;e++)this._pool[e].destroy();this._pool.length=0,this._count=0,this._index=0}}class AP{constructor(){this._poolsByClass=new Map}prepopulate(e,t){this.getPool(e).prepopulate(t)}get(e,t){return this.getPool(e).get(t)}return(e){this.getPool(e.constructor).return(e)}getPool(e){return this._poolsByClass.has(e)||this._poolsByClass.set(e,new EP(e)),this._poolsByClass.get(e)}stats(){const e={};return this._poolsByClass.forEach(t=>{const i=e[t._classType.name]?t._classType.name+t._classType.ID:t._classType.name;e[i]={free:t.totalFree,used:t.totalUsed,size:t.totalSize}}),e}clear(){this._poolsByClass.forEach(e=>e.clear()),this._poolsByClass.clear()}}const He=new AP;jr.register(He);const PP={get isCachedAsTexture(){return!!this.renderGroup?.isCachedAsTexture},cacheAsTexture(r){typeof r=="boolean"&&r===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(r===!0?{}:r))},updateCacheTexture(){this.renderGroup?.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(r){$("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(r)}};function H_(r,e,t){const i=r.length;let s;if(e>=i||t===0)return;t=e+t>i?i-e:t;const n=i-t;for(s=e;s<n;++s)r[s]=r[s+t];r.length=n}const IP={allowChildren:!0,removeChildren(r=0,e){const t=e??this.children.length,i=t-r,s=[];if(i>0&&i<=t){for(let o=t-1;o>=r;o--){const a=this.children[o];a&&(s.push(a),a.parent=null)}H_(this.children,r,t);const n=this.renderGroup||this.parentRenderGroup;n&&n.removeChildren(s);for(let o=0;o<s.length;++o){const a=s[o];a.parentRenderLayer?.detach(a),this.emit("childRemoved",a,this,o),s[o].emit("removed",this)}return s.length>0&&this._didViewChangeTick++,s}else if(i===0&&this.children.length===0)return s;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(r){const e=this.getChildAt(r);return this.removeChild(e)},getChildAt(r){if(r<0||r>=this.children.length)throw new Error(`getChildAt: Index (${r}) does not exist.`);return this.children[r]},setChildIndex(r,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);this.getChildIndex(r),this.addChildAt(r,e)},getChildIndex(r){const e=this.children.indexOf(r);if(e===-1)throw new Error("The supplied Container must be a child of the caller");return e},addChildAt(r,e){this.allowChildren||$(ne,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:t}=this;if(e<0||e>t.length)throw new Error(`${r}addChildAt: The index ${e} supplied is out of bounds ${t.length}`);if(r.parent){const s=r.parent.children.indexOf(r);if(r.parent===this&&s===e)return r;s!==-1&&r.parent.children.splice(s,1)}e===t.length?t.push(r):t.splice(e,0,r),r.parent=this,r.didChange=!0,r._updateFlags=15;const i=this.renderGroup||this.parentRenderGroup;return i&&i.addChild(r),this.sortableChildren&&(this.sortDirty=!0),this.emit("childAdded",r,this,e),r.emit("added",this),r},swapChildren(r,e){if(r===e)return;const t=this.getChildIndex(r),i=this.getChildIndex(e);this.children[t]=e,this.children[i]=r;const s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...r){return r.length===1?this.reparentChildAt(r[0],this.children.length):(r.forEach(e=>this.reparentChildAt(e,this.children.length)),r[0])},reparentChildAt(r,e){if(r.parent===this)return this.setChildIndex(r,e),r;const t=r.worldTransform.clone();r.removeFromParent(),this.addChildAt(r,e);const i=this.worldTransform.clone();return i.invert(),t.prepend(i),r.setFromMatrix(t),r},replaceChild(r,e){r.updateLocalTransform(),this.addChildAt(e,this.getChildIndex(r)),e.setFromMatrix(r.localTransform),e.updateLocalTransform(),this.removeChild(r)}},MP={collectRenderables(r,e,t){this.parentRenderLayer&&this.parentRenderLayer!==t||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(r,e,t):this.renderGroup?e.renderPipes.renderGroup.addRenderGroup(this.renderGroup,r):this.collectRenderablesWithEffects(r,e,t))},collectRenderablesSimple(r,e,t){const i=this.children,s=i.length;for(let n=0;n<s;n++)i[n].collectRenderables(r,e,t)},collectRenderablesWithEffects(r,e,t){const{renderPipes:i}=e;for(let s=0;s<this.effects.length;s++){const n=this.effects[s];i[n.pipe].push(n,this,r)}this.collectRenderablesSimple(r,e,t);for(let s=this.effects.length-1;s>=0;s--){const n=this.effects[s];i[n.pipe].pop(n,this,r)}}};class bo{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let e=0;e<this.filters.length;e++)this.filters[e].destroy();this.filters=null,this.filterArea=null}}class RP{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(e=>{this.add({test:e.test,maskClass:e})}))}add(e){this._tests.push(e)}getMaskEffect(e){this._initialized||this.init();for(let t=0;t<this._tests.length;t++){const i=this._tests[t];if(i.test(e))return He.get(i.maskClass,e)}return e}returnMaskEffect(e){He.return(e)}}const Gf=new RP;J.handleByList(A.MaskEffect,Gf._effectClasses);const kP={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const r=this.renderGroup||this.parentRenderGroup;r&&(r.structureDidChange=!0)},addEffect(r){this.effects.indexOf(r)===-1&&(this.effects.push(r),this.effects.sort((t,i)=>t.priority-i.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(r){const e=this.effects.indexOf(r);e!==-1&&(this.effects.splice(e,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(r){const e=this._maskEffect;e?.mask!==r&&(e&&(this.removeEffect(e),Gf.returnMaskEffect(e),this._maskEffect=null),r!=null&&(this._maskEffect=Gf.getMaskEffect(r),this.addEffect(this._maskEffect)))},get mask(){return this._maskEffect?.mask},setMask(r){this._maskOptions={...this._maskOptions,...r},r.mask&&(this.mask=r.mask),this._markStructureAsChanged()},set filters(r){!Array.isArray(r)&&r&&(r=[r]);const e=this._filterEffect||(this._filterEffect=new bo);r=r;const t=r?.length>0,i=e.filters?.length>0,s=t!==i;r=Array.isArray(r)?r.slice(0):r,e.filters=Object.freeze(r),s&&(t?this.addEffect(e):(this.removeEffect(e),e.filters=r??null))},get filters(){return this._filterEffect?.filters},set filterArea(r){this._filterEffect||(this._filterEffect=new bo),this._filterEffect.filterArea=r},get filterArea(){return this._filterEffect?.filterArea}},FP={label:null,get name(){return $(ne,"Container.name property has been removed, use Container.label instead"),this.label},set name(r){$(ne,"Container.name property has been removed, use Container.label instead"),this.label=r},getChildByName(r,e=!1){return this.getChildByLabel(r,e)},getChildByLabel(r,e=!1){const t=this.children;for(let i=0;i<t.length;i++){const s=t[i];if(s.label===r||r instanceof RegExp&&r.test(s.label))return s}if(e)for(let i=0;i<t.length;i++){const n=t[i].getChildByLabel(r,!0);if(n)return n}return null},getChildrenByLabel(r,e=!1,t=[]){const i=this.children;for(let s=0;s<i.length;s++){const n=i[s];(n.label===r||r instanceof RegExp&&r.test(n.label))&&t.push(n)}if(e)for(let s=0;s<i.length;s++)i[s].getChildrenByLabel(r,!0,t);return t}},ht=He.getPool(L),_i=He.getPool(nt),UP=new L,BP={getFastGlobalBounds(r,e){e||(e=new nt),e.clear(),this._getGlobalBoundsRecursive(!!r,e,this.parentRenderLayer),e.isValid||e.set(0,0,0,0);const t=this.renderGroup||this.parentRenderGroup;return e.applyMatrix(t.worldTransform),e},_getGlobalBoundsRecursive(r,e,t){let i=e;if(r&&this.parentRenderLayer&&this.parentRenderLayer!==t||this.localDisplayStatus!==7||!this.measurable)return;const s=!!this.effects.length;if((this.renderGroup||s)&&(i=_i.get().clear()),this.boundsArea)e.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const o=this.bounds;i.addFrame(o.minX,o.minY,o.maxX,o.maxY,this.groupTransform)}const n=this.children;for(let o=0;o<n.length;o++)n[o]._getGlobalBoundsRecursive(r,i,t)}if(s){let n=!1;const o=this.renderGroup||this.parentRenderGroup;for(let a=0;a<this.effects.length;a++)this.effects[a].addBounds&&(n||(n=!0,i.applyMatrix(o.worldTransform)),this.effects[a].addBounds(i,!0));n&&i.applyMatrix(o.worldTransform.copyTo(UP).invert()),e.addBounds(i),_i.return(i)}else this.renderGroup&&(e.addBounds(i,this.relativeGroupTransform),_i.return(i))}};function Nf(r,e,t){t.clear();let i,s;return r.parent?e?i=r.parent.worldTransform:(s=ht.get().identity(),i=Lf(r,s)):i=L.IDENTITY,W_(r,t,i,e),s&&ht.return(s),t.isValid||t.set(0,0,0,0),t}function W_(r,e,t,i){if(!r.visible||!r.measurable)return;let s;i?s=r.worldTransform:(r.updateLocalTransform(),s=ht.get(),s.appendFrom(r.localTransform,t));const n=e,o=!!r.effects.length;if(o&&(e=_i.get().clear()),r.boundsArea)e.addRect(r.boundsArea,s);else{const a=r.bounds;a&&!a.isEmpty()&&(e.matrix=s,e.addBounds(a));for(let l=0;l<r.children.length;l++)W_(r.children[l],e,s,i)}if(o){for(let a=0;a<r.effects.length;a++)r.effects[a].addBounds?.(e);n.addBounds(e,L.IDENTITY),_i.return(e)}i||ht.return(s)}function Lf(r,e){const t=r.parent;return t&&(Lf(t,e),t.updateLocalTransform(),e.append(t.localTransform)),e}function V_(r,e){if(r===16777215||!e)return e;if(e===16777215||!r)return r;const t=r>>16&255,i=r>>8&255,s=r&255,n=e>>16&255,o=e>>8&255,a=e&255,l=t*n/255|0,c=i*o/255|0,h=s*a/255|0;return(l<<16)+(c<<8)+h}const $_=16777215;function wo(r,e){return r===$_?e:e===$_?r:V_(r,e)}function To(r){return((r&255)<<16)+(r&65280)+(r>>16&255)}const OP={getGlobalAlpha(r){if(r)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let e=this.alpha,t=this.parent;for(;t;)e*=t.alpha,t=t.parent;return e},getGlobalTransform(r=new L,e){if(e)return r.copyFrom(this.worldTransform);this.updateLocalTransform();const t=Lf(this,ht.get().identity());return r.appendFrom(this.localTransform,t),ht.return(t),r},getGlobalTint(r){if(r)return this.renderGroup?To(this.renderGroup.worldColor):this.parentRenderGroup?To(wo(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let e=this.localColor,t=this.parent;for(;t;)e=wo(e,t.localColor),t=t.parent;return To(e)}};function Hf(r,e,t){return e.clear(),t||(t=L.IDENTITY),X_(r,e,t,r,!0),e.isValid||e.set(0,0,0,0),e}function X_(r,e,t,i,s){let n;if(s)n=ht.get(),n=t.copyTo(n);else{if(!r.visible||!r.measurable)return;r.updateLocalTransform();const l=r.localTransform;n=ht.get(),n.appendFrom(l,t)}const o=e,a=!!r.effects.length;if(a&&(e=_i.get().clear()),r.boundsArea)e.addRect(r.boundsArea,n);else{r.renderPipeId&&(e.matrix=n,e.addBounds(r.bounds));const l=r.children;for(let c=0;c<l.length;c++)X_(l[c],e,n,i,!1)}if(a){for(let l=0;l<r.effects.length;l++)r.effects[l].addLocalBounds?.(e,i);o.addBounds(e,L.IDENTITY),_i.return(e)}ht.return(n)}function Y_(r,e){const t=r.children;for(let i=0;i<t.length;i++){const s=t[i],n=s.uid,o=(s._didViewChangeTick&65535)<<16|s._didContainerChangeTick&65535,a=e.index;(e.data[a]!==n||e.data[a+1]!==o)&&(e.data[e.index]=n,e.data[e.index+1]=o,e.didChange=!0),e.index=a+2,s.children.length&&Y_(s,e)}return e.didChange}const DP=new L,zP={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(r,e){const t=Math.sign(this.scale.x)||1;e!==0?this.scale.x=r/e*t:this.scale.x=t},_setHeight(r,e){const t=Math.sign(this.scale.y)||1;e!==0?this.scale.y=r/e*t:this.scale.y=t},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new nt});const r=this._localBoundsCacheData;return r.index=1,r.didChange=!1,r.data[0]!==this._didViewChangeTick&&(r.didChange=!0,r.data[0]=this._didViewChangeTick),Y_(this,r),r.didChange&&Hf(this,r.localBounds,DP),r.localBounds},getBounds(r,e){return Nf(this,r,e||new nt)}},GP={_onRender:null,set onRender(r){const e=this.renderGroup||this.parentRenderGroup;if(!r){this._onRender&&e?.removeOnRender(this),this._onRender=null;return}this._onRender||e?.addOnRender(this),this._onRender=r},get onRender(){return this._onRender}},NP={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(r){this._zIndex!==r&&(this._zIndex=r,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(LP))}};function LP(r,e){return r._zIndex-e._zIndex}const HP={getGlobalPosition(r=new K,e=!1){return this.parent?this.parent.toGlobal(this._position,r,e):(r.x=this._position.x,r.y=this._position.y),r},toGlobal(r,e,t=!1){const i=this.getGlobalTransform(ht.get(),t);return e=i.apply(r,e),ht.return(i),e},toLocal(r,e,t,i){e&&(r=e.toGlobal(r,t,i));const s=this.getGlobalTransform(ht.get(),i);return t=s.applyInverse(r,t),ht.return(s),t}};class q_{constructor(){this.uid=we("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(e){this.instructions[this.instructionSize++]=e}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let WP=0;class VP{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this.textureStyle=new Vi(this.textureOptions)}createTexture(e,t,i){const s=new Xe({...this.textureOptions,width:e,height:t,resolution:1,antialias:i,autoGarbageCollect:!1});return new O({source:s,label:`texturePool_${WP++}`})}getOptimalTexture(e,t,i=1,s){let n=Math.ceil(e*i-1e-6),o=Math.ceil(t*i-1e-6);n=qr(n),o=qr(o);const a=(n<<17)+(o<<1)+(s?1:0);this._texturePool[a]||(this._texturePool[a]=[]);let l=this._texturePool[a].pop();return l||(l=this.createTexture(n,o,s)),l.source._resolution=i,l.source.width=n/i,l.source.height=o/i,l.source.pixelWidth=n,l.source.pixelHeight=o,l.frame.x=0,l.frame.y=0,l.frame.width=e,l.frame.height=t,l.updateUvs(),this._poolKeyHash[l.uid]=a,l}getSameSizeTexture(e,t=!1){const i=e.source;return this.getOptimalTexture(e.width,e.height,i._resolution,t)}returnTexture(e,t=!1){const i=this._poolKeyHash[e.uid];t&&(e.source.style=this.textureStyle),this._texturePool[i].push(e)}clear(e){if(e=e!==!1,e)for(const t in this._texturePool){const i=this._texturePool[t];if(i)for(let s=0;s<i.length;s++)i[s].destroy(!0)}this._texturePool={}}}const De=new VP;jr.register(De);class Wf{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new L,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new q_,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(e){this.root=e,e._onRender&&this.addOnRender(e),e.didChange=!0;const t=e.children;for(let i=0;i<t.length;i++){const s=t[i];s._updateFlags=15,this.addChild(s)}}enableCacheAsTexture(e={}){this.textureOptions=e,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(De.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const e=this._parentCacheAsTextureRenderGroup;e&&!e.textureNeedsUpdate&&e.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const e in this.childrenToUpdate){const t=this.childrenToUpdate[e];t.list.fill(null),t.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(e){e.renderGroupParent&&e.renderGroupParent._removeRenderGroupChild(e),e.renderGroupParent=this,this.renderGroupChildren.push(e)}_removeRenderGroupChild(e){const t=this.renderGroupChildren.indexOf(e);t>-1&&this.renderGroupChildren.splice(t,1),e.renderGroupParent=null}addChild(e){if(this.structureDidChange=!0,e.parentRenderGroup=this,e.updateTick=-1,e.parent===this.root?e.relativeRenderGroupDepth=1:e.relativeRenderGroupDepth=e.parent.relativeRenderGroupDepth+1,e.didChange=!0,this.onChildUpdate(e),e.renderGroup){this.addRenderGroupChild(e.renderGroup);return}e._onRender&&this.addOnRender(e);const t=e.children;for(let i=0;i<t.length;i++)this.addChild(t[i])}removeChild(e){if(this.structureDidChange=!0,e._onRender&&(e.renderGroup||this.removeOnRender(e)),e.parentRenderGroup=null,e.renderGroup){this._removeRenderGroupChild(e.renderGroup);return}const t=e.children;for(let i=0;i<t.length;i++)this.removeChild(t[i])}removeChildren(e){for(let t=0;t<e.length;t++)this.removeChild(e[t])}onChildUpdate(e){let t=this.childrenToUpdate[e.relativeRenderGroupDepth];t||(t=this.childrenToUpdate[e.relativeRenderGroupDepth]={index:0,list:[]}),t.list[t.index++]=e}updateRenderable(e){e.globalDisplayStatus<7||(this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e),e.didViewUpdate=!1)}onChildViewUpdate(e){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=e}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(e){this._onRenderContainers.push(e)}removeOnRender(e){this._onRenderContainers.splice(this._onRenderContainers.indexOf(e),1)}runOnRender(e){for(let t=0;t<this._onRenderContainers.length;t++)this._onRenderContainers[t]._onRender(e)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(e=[]){const t=this.root.children;for(let i=0;i<t.length;i++)this._getChildren(t[i],e);return e}_getChildren(e,t=[]){if(t.push(e),e.renderGroup)return t;const i=e.children;for(let s=0;s<i.length;s++)this._getChildren(i[s],t);return t}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new L),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new L),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;const e=this._parentCacheAsTextureRenderGroup;return e?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new L),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x,-e._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function $P(r,e,t={}){for(const i in e)!t[i]&&e[i]!==void 0&&(r[i]=e[i])}const Vf=new ke(null),So=new ke(null),$f=new ke(null,1,1),Co=new ke(null),Eo=1,Xf=2,Gs=4;class ue extends At{constructor(e={}){super(),this.uid=we("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new L,this.relativeGroupTransform=new L,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new ke(this,0,0),this._scale=$f,this._pivot=So,this._origin=Co,this._skew=Vf,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],$P(this,e,{children:!0,parent:!0,effects:!0}),e.children?.forEach(t=>this.addChild(t)),e.parent?.addChild(this)}static mixin(e){$("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),J.mixin(ue,e)}set _didChangeId(e){this._didViewChangeTick=e>>12&4095,this._didContainerChangeTick=e&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...e){if(this.allowChildren||$(ne,"addChild: Only Containers will be allowed to add children in v8.0.0"),e.length>1){for(let s=0;s<e.length;s++)this.addChild(e[s]);return e[0]}const t=e[0],i=this.renderGroup||this.parentRenderGroup;return t.parent===this?(this.children.splice(this.children.indexOf(t),1),this.children.push(t),i&&(i.structureDidChange=!0),t):(t.parent&&t.parent.removeChild(t),this.children.push(t),this.sortableChildren&&(this.sortDirty=!0),t.parent=this,t.didChange=!0,t._updateFlags=15,i&&i.addChild(t),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this),this._didViewChangeTick++,t._zIndex!==0&&t.depthOfChildModified(),t)}removeChild(...e){if(e.length>1){for(let s=0;s<e.length;s++)this.removeChild(e[s]);return e[0]}const t=e[0],i=this.children.indexOf(t);return i>-1&&(this._didViewChangeTick++,this.children.splice(i,1),this.renderGroup?this.renderGroup.removeChild(t):this.parentRenderGroup&&this.parentRenderGroup.removeChild(t),t.parentRenderLayer&&t.parentRenderLayer.detach(t),t.parent=null,this.emit("childRemoved",t,this,i),t.emit("removed",this)),t}_onUpdate(e){e&&e===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(e){!!this.renderGroup!==e&&(e?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const e=this.parentRenderGroup;e?.removeChild(this),this.renderGroup=He.get(Wf,this),this.groupTransform=L.IDENTITY,e?.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const e=this.parentRenderGroup;e?.removeChild(this),He.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,e?.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new L),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(e){this._position.x=e}get y(){return this._position.y}set y(e){this._position.y=e}get position(){return this._position}set position(e){this._position.copyFrom(e)}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this._onUpdate(this._skew))}get angle(){return this.rotation*cP}set angle(e){this.rotation=e*hP}get pivot(){return this._pivot===So&&(this._pivot=new ke(this,0,0)),this._pivot}set pivot(e){this._pivot===So&&(this._pivot=new ke(this,0,0),this._origin!==Co&&ee("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof e=="number"?this._pivot.set(e):this._pivot.copyFrom(e)}get skew(){return this._skew===Vf&&(this._skew=new ke(this,0,0)),this._skew}set skew(e){this._skew===Vf&&(this._skew=new ke(this,0,0)),this._skew.copyFrom(e)}get scale(){return this._scale===$f&&(this._scale=new ke(this,1,1)),this._scale}set scale(e){this._scale===$f&&(this._scale=new ke(this,0,0)),typeof e=="string"&&(e=parseFloat(e)),typeof e=="number"?this._scale.set(e):this._scale.copyFrom(e)}get origin(){return this._origin===Co&&(this._origin=new ke(this,0,0)),this._origin}set origin(e){this._origin===Co&&(this._origin=new ke(this,0,0),this._pivot!==So&&ee("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof e=="number"?this._origin.set(e):this._origin.copyFrom(e)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(e){const t=this.getLocalBounds().width;this._setWidth(e,t)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(e){const t=this.getLocalBounds().height;this._setHeight(e,t)}getSize(e){e||(e={});const t=this.getLocalBounds();return e.width=Math.abs(this.scale.x*t.width),e.height=Math.abs(this.scale.y*t.height),e}setSize(e,t){const i=this.getLocalBounds();typeof e=="object"?(t=e.height??e.width,e=e.width):t??(t=e),e!==void 0&&this._setWidth(e,i.width),t!==void 0&&this._setHeight(t,i.height)}_updateSkew(){const e=this._rotation,t=this._skew;this._cx=Math.cos(e+t._y),this._sx=Math.sin(e+t._y),this._cy=-Math.sin(e-t._x),this._sy=Math.cos(e-t._x)}updateTransform(e){return this.position.set(typeof e.x=="number"?e.x:this.position.x,typeof e.y=="number"?e.y:this.position.y),this.scale.set(typeof e.scaleX=="number"?e.scaleX||1:this.scale.x,typeof e.scaleY=="number"?e.scaleY||1:this.scale.y),this.rotation=typeof e.rotation=="number"?e.rotation:this.rotation,this.skew.set(typeof e.skewX=="number"?e.skewX:this.skew.x,typeof e.skewY=="number"?e.skewY:this.skew.y),this.pivot.set(typeof e.pivotX=="number"?e.pivotX:this.pivot.x,typeof e.pivotY=="number"?e.pivotY:this.pivot.y),this.origin.set(typeof e.originX=="number"?e.originX:this.origin.x,typeof e.originY=="number"?e.originY:this.origin.y),this}setFromMatrix(e){e.decompose(this)}updateLocalTransform(){const e=this._didContainerChangeTick;if(this._didLocalTransformChangeId===e)return;this._didLocalTransformChangeId=e;const t=this.localTransform,i=this._scale,s=this._pivot,n=this._origin,o=this._position,a=i._x,l=i._y,c=s._x,h=s._y,u=-n._x,d=-n._y;t.a=this._cx*a,t.b=this._sx*a,t.c=this._cy*l,t.d=this._sy*l,t.tx=o._x-(c*t.a+h*t.c)+(u*t.a+d*t.c)-u,t.ty=o._y-(c*t.b+h*t.d)+(u*t.b+d*t.d)-d}set alpha(e){e!==this.localAlpha&&(this.localAlpha=e,this._updateFlags|=Eo,this._onUpdate())}get alpha(){return this.localAlpha}set tint(e){const i=me.shared.setValue(e??16777215).toBgrNumber();i!==this.localColor&&(this.localColor=i,this._updateFlags|=Eo,this._onUpdate())}get tint(){return To(this.localColor)}set blendMode(e){this.localBlendMode!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Xf,this.localBlendMode=e,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(e){const t=e?2:0;(this.localDisplayStatus&2)!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Gs,this.localDisplayStatus^=2,this._onUpdate())}get culled(){return!(this.localDisplayStatus&4)}set culled(e){const t=e?0:4;(this.localDisplayStatus&4)!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Gs,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(e){const t=e?1:0;(this.localDisplayStatus&1)!==t&&(this._updateFlags|=Gs,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(e=!1){if(this.destroyed)return;this.destroyed=!0;let t;if(this.children.length&&(t=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof e=="boolean"?e:e?.children)&&t)for(let s=0;s<t.length;++s)t[s].destroy(e);this.renderGroup?.destroy(),this.renderGroup=null}}J.mixin(ue,IP,BP,HP,GP,zP,kP,FP,NP,CP,PP,OP,MP);class Ao extends ue{constructor(e){super(e),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this._bounds=new nt(0,1,0,0),this._boundsDirty=!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(e){this._roundPixels=e?1:0}containsPoint(e){const t=this.bounds,{x:i,y:s}=e;return i>=t.minX&&i<=t.maxX&&s>=t.minY&&s<=t.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const e=this.renderGroup||this.parentRenderGroup;e&&e.onChildViewUpdate(this)}destroy(e){super.destroy(e),this._bounds=null;for(const t in this._gpuData)this._gpuData[t].destroy?.();this._gpuData=null}collectRenderablesSimple(e,t,i){const{renderPipes:s}=t;s.blendMode.pushBlendMode(this,this.groupBlendMode,e),s[this.renderPipeId].addRenderable(this,e),this.didViewUpdate=!1;const o=this.children,a=o.length;for(let l=0;l<a;l++)o[l].collectRenderables(e,t,i);s.blendMode.popBlendMode(e)}}class ze extends Ao{constructor(e=O.EMPTY){e instanceof O&&(e={texture:e});const{texture:t=O.EMPTY,anchor:i,roundPixels:s,width:n,height:o,...a}=e;super({label:"Sprite",...a}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new ke({_onUpdate:()=>{this.onViewUpdate()}}),i?this.anchor=i:t.defaultAnchor&&(this.anchor=t.defaultAnchor),this.texture=t,this.allowChildren=!1,this.roundPixels=s??!1,n!==void 0&&(this.width=n),o!==void 0&&(this.height=o)}static from(e,t=!1){return e instanceof O?new ze(e):new ze(O.from(e,t))}set texture(e){e||(e=O.EMPTY);const t=this._texture;t!==e&&(t&&t.dynamic&&t.off("update",this.onViewUpdate,this),e.dynamic&&e.on("update",this.onViewUpdate,this),this._texture=e,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return I_(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return $("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const e=this._anchor,t=this._texture,i=this._bounds,{width:s,height:n}=t.orig;i.minX=-e._x*s,i.maxX=i.minX+s,i.minY=-e._y*n,i.maxY=i.minY+n}destroy(e=!1){if(super.destroy(e),typeof e=="boolean"?e:e?.texture){const i=typeof e=="boolean"?e:e?.textureSource;this._texture.destroy(i)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null,this._gpuData=null}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this._setWidth(e,this._texture.orig.width),this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this._setHeight(e,this._texture.orig.height),this._height=e}getSize(e){return e||(e={}),e.width=Math.abs(this.scale.x)*this._texture.orig.width,e.height=Math.abs(this.scale.y)*this._texture.orig.height,e}setSize(e,t){typeof e=="object"?(t=e.height??e.width,e=e.width):t??(t=e),e!==void 0&&this._setWidth(e,this._texture.orig.width),t!==void 0&&this._setHeight(t,this._texture.orig.height)}}const XP=new nt;function K_(r,e,t){const i=XP;r.measurable=!0,Nf(r,t,i),e.addBoundsMask(i),r.measurable=!1}function j_(r,e,t){const i=_i.get();r.measurable=!0;const s=ht.get().identity(),n=Z_(r,t,s);Hf(r,i,n),r.measurable=!1,e.addBoundsMask(i),ht.return(s),_i.return(i)}function Z_(r,e,t){return r?(r!==e&&(Z_(r.parent,e,t),r.updateLocalTransform(),t.append(r.localTransform)),t):(ee("Mask bounds, renderable is not inside the root container"),t)}class J_{constructor(e){this.priority=0,this.inverse=!1,this.pipe="alphaMask",e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.renderMaskToTexture=!(e instanceof ze),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(e,t){this.inverse||K_(this.mask,e,t)}addLocalBounds(e,t){j_(this.mask,e,t)}containsPoint(e,t){const i=this.mask;return t(i,e)}destroy(){this.reset()}static test(e){return e instanceof ze}}J_.extension=A.MaskEffect;class Q_{constructor(e){this.priority=0,this.pipe="colorMask",e?.mask&&this.init(e.mask)}init(e){this.mask=e}destroy(){}static test(e){return typeof e=="number"}}Q_.extension=A.MaskEffect;class ex{constructor(e){this.priority=0,this.pipe="stencilMask",e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(e,t){K_(this.mask,e,t)}addLocalBounds(e,t){j_(this.mask,e,t)}containsPoint(e,t){const i=this.mask;return t(i,e)}destroy(){this.reset()}static test(e){return e instanceof ue}}ex.extension=A.MaskEffect;let tx={createCanvas:(r,e)=>{const t=document.createElement("canvas");return t.width=r,t.height=e,t},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,e)=>fetch(r,e),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")};const ge={get(){return tx},set(r){tx=r}};class xi extends Xe{constructor(e){e.resource||(e.resource=ge.get().createCanvas()),e.width||(e.width=e.resource.width,e.autoDensity||(e.width/=e.resolution)),e.height||(e.height=e.resource.height,e.autoDensity||(e.height/=e.resolution)),super(e),this.uploadMethodId="image",this.autoDensity=e.autoDensity,this.resizeCanvas(),this.transparent=!!e.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(e=this.width,t=this.height,i=this._resolution){const s=super.resize(e,t,i);return s&&this.resizeCanvas(),s}static test(e){return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&e instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}xi.extension=A.TextureSource;class $i extends Xe{constructor(e){super(e),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(e){return globalThis.HTMLImageElement&&e instanceof HTMLImageElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||globalThis.VideoFrame&&e instanceof VideoFrame}}$i.extension=A.TextureSource;var Zr=(r=>(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(Zr||{});class Yf{constructor(e,t=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=e,this._context=t,this.priority=i,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 ix=class Ft{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 Yf(null,null,1/0),this.deltaMS=1/Ft.targetFPMS,this.elapsedMS=1/Ft.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,i=Zr.NORMAL){return this._addListener(new Yf(e,t,i))}addOnce(e,t,i=Zr.NORMAL){return this._addListener(new Yf(e,t,i,!0))}_addListener(e){let t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,t){let i=this._head.next;for(;i;)i.match(e,t)?i=i.destroy():i=i.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 n=e-this._lastFrame|0;if(n<this._minElapsedMS)return;this._lastFrame=e-n%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Ft.targetFPMS;const i=this._head;let s=i.next;for(;s;)s=s.emit(this);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),i=Math.min(Math.max(0,t)/1e3,Ft.targetFPMS);this._maxElapsedMS=1/i}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(!Ft._shared){const e=Ft._shared=new Ft;e.autoStart=!0,e._protected=!0}return Ft._shared}static get system(){if(!Ft._system){const e=Ft._system=new Ft;e.autoStart=!0,e._protected=!0}return Ft._system}};ix.targetFPMS=.06;let Pt=ix,qf;async function YP(){return qf??(qf=(async()=>{const e=ge.get().createCanvas(1,1).getContext("webgl");if(!e)return"premultiply-alpha-on-upload";const t=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(!t)return"premultiply-alpha-on-upload";const i=e.createTexture();e.bindTexture(e.TEXTURE_2D,i);const s=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,s),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t);const n=new Uint8Array(4);return e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,n),e.deleteFramebuffer(s),e.deleteTexture(i),e.getExtension("WEBGL_lose_context")?.loseContext(),n[0]<=n[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),qf}const Po=class S1 extends Xe{constructor(e){super(e),this.isReady=!1,this.uploadMethodId="video",e={...S1.defaultOptions,...e},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this.alphaMode=e.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),e.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const e=Pt.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const e=this.resource,t=this.options;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._mediaReady():(t.preload||e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlayThrough),e.addEventListener("error",this._onError,!0)),this.alphaMode=await YP(),this._load=new Promise((i,s)=>{this.isValid?i(this):(this._resolve=i,this._reject=s,t.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${t.preloadTimeoutMs}ms`))})),e.load())}),this._load}_onError(e){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.resource;return!e.paused&&!e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const e=this.resource;this.isValid&&(this.isReady=!0,this.resize(e.videoWidth,e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const e=this.resource;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._onCanPlayThrough),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.destroy()}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.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(Pt.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Pt.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Pt.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};Po.extension=A.TextureSource,Po.defaultOptions={...Xe.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},Po.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let qP=Po;const Jr=(r,e,t=!1)=>(Array.isArray(r)||(r=[r]),e?r.map(i=>typeof i=="string"||t?e(i):i):r);class KP{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||ee(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const i=Jr(e);let s;for(let l=0;l<this.parsers.length;l++){const c=this.parsers[l];if(c.test(t)){s=c.getCacheableAssets(i,t);break}}const n=new Map(Object.entries(s||{}));s||i.forEach(l=>{n.set(l,t)});const o=[...n.keys()],a={cacheKeys:o,keys:i};i.forEach(l=>{this._cacheMap.set(l,a)}),o.forEach(l=>{const c=s?s[l]:t;this._cache.has(l)&&this._cache.get(l)!==c&&ee("[Cache] already has key:",l),this._cache.set(l,n.get(l))})}remove(e){if(!this._cacheMap.has(e)){ee(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(s=>{this._cache.delete(s)}),t.keys.forEach(s=>{this._cacheMap.delete(s)})}get parsers(){return this._parsers}}const Qe=new KP,Kf=[];J.handleByList(A.TextureSource,Kf);function rx(r={}){const e=r&&r.resource,t=e?r.resource:r,i=e?r:{resource:r};for(let s=0;s<Kf.length;s++){const n=Kf[s];if(n.test(t))return new n(i)}throw new Error(`Could not find a source type for resource: ${i.resource}`)}function jP(r={},e=!1){const t=r&&r.resource,i=t?r.resource:r,s=t?r:{resource:r};if(!e&&Qe.has(i))return Qe.get(i);const n=new O({source:rx(s)});return n.on("destroy",()=>{Qe.has(i)&&Qe.remove(i)}),e||Qe.set(i,n),n}function ZP(r,e=!1){return typeof r=="string"?Qe.get(r):r instanceof Xe?new O({source:r}):jP(r,e)}O.from=ZP,Xe.from=rx,J.add(J_,Q_,ex,qP,$i,xi,kf);var sx=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(sx||{});function Vt(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function Ns(r){return r.split("?")[0].split("#")[0]}function JP(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function QP(r,e,t){return r.replace(new RegExp(JP(e),"g"),t)}function eI(r,e){let t="",i=0,s=-1,n=0,o=-1;for(let a=0;a<=r.length;++a){if(a<r.length)o=r.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||n===1))if(s!==a-1&&n===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),s=a,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=a,n=0;continue}}}else t.length>0?t+=`/${r.slice(s+1,a)}`:t=r.slice(s+1,a),i=a-s-1;s=a,n=0}else o===46&&n!==-1?++n:n=-1}return t}const Ls={toPosix(r){return QP(r,"\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},isBlobUrl(r){return r.startsWith("blob:")},hasProtocol(r){return/^[^/:]+:/.test(this.toPosix(r))},getProtocol(r){Vt(r),r=this.toPosix(r);const e=/^file:\/\/\//.exec(r);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(r);return t?t[0]:""},toAbsolute(r,e,t){if(Vt(r),this.isDataUrl(r)||this.isBlobUrl(r))return r;const i=Ns(this.toPosix(e??ge.get().getBaseUrl())),s=Ns(this.toPosix(t??this.rootname(i)));return r=this.toPosix(r),r.startsWith("/")?Ls.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(Vt(r),r.length===0)return".";if(this.isDataUrl(r)||this.isBlobUrl(r))return r;r=this.toPosix(r);let e="";const t=r.startsWith("/");this.hasProtocol(r)&&(e=this.rootname(r),r=r.slice(e.length));const i=r.endsWith("/");return r=eI(r),r.length>0&&i&&(r+="/"),t?`/${r}`:e+r},isAbsolute(r){return Vt(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let e;for(let t=0;t<r.length;++t){const i=r[t];if(Vt(i),i.length>0)if(e===void 0)e=i;else{const s=r[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(r){if(Vt(r),r.length===0)return".";r=this.toPosix(r);let e=r.charCodeAt(0);const t=e===47;let i=-1,s=!0;const n=this.getProtocol(r),o=r;r=r.slice(n.length);for(let a=r.length-1;a>=1;--a)if(e=r.charCodeAt(a),e===47){if(!s){i=a;break}}else s=!1;return i===-1?t?"/":this.isUrl(o)?n+r:n:t&&i===1?"//":n+r.slice(0,i)},rootname(r){Vt(r),r=this.toPosix(r);let e="";if(r.startsWith("/")?e="/":e=this.getProtocol(r),this.isUrl(r)){const t=r.indexOf("/",e.length);t!==-1?e=r.slice(0,t):e=r,e.endsWith("/")||(e+="/")}return e},basename(r,e){Vt(r),e&&Vt(e),r=Ns(this.toPosix(r));let t=0,i=-1,s=!0,n;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";let o=e.length-1,a=-1;for(n=r.length-1;n>=0;--n){const l=r.charCodeAt(n);if(l===47){if(!s){t=n+1;break}}else a===-1&&(s=!1,a=n+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(i=n):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=r.length),r.slice(t,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){t=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(t,i)},extname(r){Vt(r),r=Ns(this.toPosix(r));let e=-1,t=0,i=-1,s=!0,n=0;for(let o=r.length-1;o>=0;--o){const a=r.charCodeAt(o);if(a===47){if(!s){t=o+1;break}continue}i===-1&&(s=!1,i=o+1),a===46?e===-1?e=o:n!==1&&(n=1):e!==-1&&(n=-1)}return e===-1||i===-1||n===0||n===1&&e===i-1&&e===t+1?"":r.slice(e,i)},parse(r){Vt(r);const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;r=Ns(this.toPosix(r));let t=r.charCodeAt(0);const i=this.isAbsolute(r);let s;e.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let n=-1,o=0,a=-1,l=!0,c=r.length-1,h=0;for(;c>=s;--c){if(t=r.charCodeAt(c),t===47){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),t===46?n===-1?n=c:h!==1&&(h=1):n!==-1&&(h=-1)}return n===-1||a===-1||h===0||h===1&&n===a-1&&n===o+1?a!==-1&&(o===0&&i?e.base=e.name=r.slice(1,a):e.base=e.name=r.slice(o,a)):(o===0&&i?(e.name=r.slice(1,n),e.base=r.slice(1,a)):(e.name=r.slice(o,n),e.base=r.slice(o,a)),e.ext=r.slice(n,a)),e.dir=this.dirname(r),e},sep:"/",delimiter:":",joinExtensions:[".html"]};function nx(r,e,t,i,s){const n=e[t];for(let o=0;o<n.length;o++){const a=n[o];t<e.length-1?nx(r.replace(i[t],a),e,t+1,i,s):s.push(r.replace(i[t],a))}}function tI(r){const e=/\{(.*?)\}/g,t=r.match(e),i=[];if(t){const s=[];t.forEach(n=>{const o=n.substring(1,n.length-1).split(",");s.push(o)}),nx(r,s,0,t,i)}else i.push(r);return i}const ox=r=>!Array.isArray(r);class ax{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(i=>`${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`).join("&")}}getAlias(e){const{alias:t,src:i}=e;return Jr(t||i,n=>typeof n=="string"?n:Array.isArray(n)?n.map(o=>o?.src??o):n?.src?n.src:n,!0)}addManifest(e){this._manifest&&ee("[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 i=[];let s=t;Array.isArray(t)||(s=Object.entries(t).map(([n,o])=>typeof o=="string"||Array.isArray(o)?{alias:n,src:o}:{alias:n,...o})),s.forEach(n=>{const o=n.src,a=n.alias;let l;if(typeof a=="string"){const c=this._createBundleAssetId(e,a);i.push(c),l=[a,c]}else{const c=a.map(h=>this._createBundleAssetId(e,h));i.push(...c),l=[...a,...c]}this.add({...n,alias:l,src:o})}),this._bundles[e]=i}add(e){const t=[];Array.isArray(e)?t.push(...e):t.push(e);let i;i=n=>{this.hasKey(n)&&ee(`[Resolver] already has key: ${n} overwriting`)},Jr(t).forEach(n=>{const{src:o}=n;let{data:a,format:l,loadParser:c,parser:h}=n;const u=Jr(o).map(p=>typeof p=="string"?tI(p):Array.isArray(p)?p:[p]),d=this.getAlias(n);Array.isArray(d)?d.forEach(i):i(d);const f=[],m=p=>({...this._parsers.find(_=>_.test(p))?.parse(p),src:p});u.forEach(p=>{p.forEach(g=>{let _={};if(typeof g!="object"?_=m(g):(a=g.data??a,l=g.format??l,(g.loadParser||g.parser)&&(c=g.loadParser??c,h=g.parser??h),_={...m(g.src),...g}),!d)throw new Error(`[Resolver] alias is undefined for this asset: ${_.src}`);_=this._buildResolvedAsset(_,{aliases:d,data:a,format:l,loadParser:c,parser:h,progressSize:n.progressSize}),f.push(_)})}),d.forEach(p=>{this._assetMap[p]=f})})}resolveBundle(e){const t=ox(e);e=Jr(e);const i={};return e.forEach(s=>{const n=this._bundles[s];if(n){const o=this.resolve(n),a={};for(const l in o){const c=o[l];a[this._extractAssetIdFromBundle(s,l)]=c}i[s]=a}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const s in t)i[s]=t[s].src;return i}return t.src}resolve(e){const t=ox(e);e=Jr(e);const i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s];const o=this._getPreferredOrder(n);o?.priority.forEach(a=>{o.params[a].forEach(l=>{const c=n.filter(h=>h[a]?h[a]===l:!1);c.length&&(n=c)})}),this._resolverHash[s]=n[0]}else this._resolverHash[s]=this._buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const i=e[t],s=this._preferredOrder.find(n=>n.params.format.includes(i.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:i,data:s,loadParser:n,parser:o,format:a,progressSize:l}=t;return(this._basePath||this._rootPath)&&(e.src=Ls.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=n??e.loadParser,e.parser=o??e.parser,e.format=a??e.format??iI(e.src),l!==void 0&&(e.progressSize=l),e}}ax.RETINA_PREFIX=/@([0-9\.]+)x/;function iI(r){return r.split(".").pop().split("?").shift().split("#").shift()}const lx=(r,e)=>{const t=e.split("?")[1];return t&&(r+=`?${t}`),r},cx=class wn{constructor(e,t){this.linkedSheets=[];let i=e;e?.source instanceof Xe&&(i={texture:e,data:t});const{texture:s,data:n,cachePrefix:o=""}=i;this.cachePrefix=o,this._texture=s instanceof O?s:null,this.textureSource=s.source,this.textures={},this.animations={},this.data=n;const a=parseFloat(n.meta.scale);a?(this.resolution=a,s.source.resolution=this.resolution):this.resolution=s.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=wn.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=wn.BATCH_SIZE;for(;t-e<i&&t<this._frameKeys.length;){const s=this._frameKeys[t],n=this._frames[s],o=n.frame;if(o){let a=null,l=null;const c=n.trimmed!==!1&&n.sourceSize?n.sourceSize:n.frame,h=new Y(0,0,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution);n.rotated?a=new Y(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 Y(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),n.trimmed!==!1&&n.spriteSourceSize&&(l=new Y(Math.floor(n.spriteSourceSize.x)/this.resolution,Math.floor(n.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[s]=new O({source:this.textureSource,frame:a,orig:h,trim:l,rotate:n.rotated?2:0,defaultAnchor:n.anchor,defaultBorders:n.borders,label:s.toString()})}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let i=0;i<e[t].length;i++){const s=e[t][i];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*wn.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*wn.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){for(const t in this.textures)this.textures[t].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};cx.BATCH_SIZE=1e3;let hx=cx;const rI=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function ux(r,e,t){const i={};if(r.forEach(s=>{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=Ls.dirname(r[0]);e.linkedSheets.forEach((n,o)=>{const a=ux([`${s}/${e.data.meta.related_multi_packs[o]}`],n,!0);Object.assign(i,a)})}return i}const sI={extension:A.Asset,cache:{test:r=>r instanceof hx,getCacheableAssets:(r,e)=>ux(r,e,!1)},resolver:{extension:{type:A.ResolveParser,name:"resolveSpritesheet"},test:r=>{const t=r.split("?")[0].split("."),i=t.pop(),s=t.pop();return i==="json"&&rI.includes(s)},parse:r=>{const e=r.split(".");return{resolution:parseFloat(ax.RETINA_PREFIX.exec(r)?.[1]??"1"),format:e[e.length-2],src:r}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:A.LoadParser,priority:sx.Normal,name:"spritesheetLoader"},async testParse(r,e){return Ls.extname(e.src).toLowerCase()===".json"&&!!r.frames},async parse(r,e,t){const{texture:i,imageFilename:s,textureOptions:n,cachePrefix:o}=e?.data??{};let a=Ls.dirname(e.src);a&&a.lastIndexOf("/")!==a.length-1&&(a+="/");let l;if(i instanceof O)l=i;else{const u=lx(a+(s??r.meta.image),e.src);l=(await t.load([{src:u,data:n}]))[u]}const c=new hx({texture:l.source,data:r,cachePrefix:o});await c.parse();const h=r?.meta?.related_multi_packs;if(Array.isArray(h)){const u=[];for(const f of h){if(typeof f!="string")continue;let m=a+f;e.data?.ignoreMultiPack||(m=lx(m,e.src),u.push(t.load({src:m,data:{textureOptions:n,ignoreMultiPack:!0}})))}const d=await Promise.all(u);c.linkedSheets=d,d.forEach(f=>{f.linkedSheets=[c].concat(c.linkedSheets.filter(m=>m!==f))})}return c},async unload(r,e,t){await t.unload(r.textureSource._sourceOrigin),r.destroy(!1)}}};J.add(sI);class dx{constructor(e){this._lastTransform="",this._observer=null,this._tickerAttached=!1,this.updateTranslation=()=>{if(!this._canvas)return;const t=this._canvas.getBoundingClientRect(),i=this._canvas.width,s=this._canvas.height,n=t.width/i*this._renderer.resolution,o=t.height/s*this._renderer.resolution,a=t.left,l=t.top,c=`translate(${a}px, ${l}px) scale(${n}, ${o})`;c!==this._lastTransform&&(this._domElement.style.transform=c,this._lastTransform=c)},this._domElement=e.domElement,this._renderer=e.renderer,!(globalThis.OffscreenCanvas&&this._renderer.canvas instanceof OffscreenCanvas)&&(this._canvas=this._renderer.canvas,this._attachObserver())}get canvas(){return this._canvas}ensureAttached(){!this._domElement.parentNode&&this._canvas.parentNode&&(this._canvas.parentNode.appendChild(this._domElement),this.updateTranslation())}_attachObserver(){"ResizeObserver"in globalThis?(this._observer&&(this._observer.disconnect(),this._observer=null),this._observer=new ResizeObserver(e=>{for(const t of e){if(t.target!==this._canvas)continue;const i=this.canvas.width,s=this.canvas.height,n=t.contentRect.width/i*this._renderer.resolution,o=t.contentRect.height/s*this._renderer.resolution;(this._lastScaleX!==n||this._lastScaleY!==o)&&(this.updateTranslation(),this._lastScaleX=n,this._lastScaleY=o)}}),this._observer.observe(this._canvas)):this._tickerAttached||Pt.shared.add(this.updateTranslation,this,Zr.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&Pt.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform="",this._lastScaleX=null,this._lastScaleY=null}}class Hs{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Hs.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new K,this.page=new K,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,s,n){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}}var jf=/iPhone/i,fx=/iPod/i,px=/iPad/i,mx=/\biOS-universal(?:.+)Mac\b/i,Zf=/\bAndroid(?:.+)Mobile\b/i,gx=/Android/i,Qr=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Io=/Silk/i,yi=/Windows Phone/i,_x=/\bWindows(?:.+)ARM\b/i,xx=/BlackBerry/i,yx=/BB10/i,vx=/Opera Mini/i,bx=/\b(CriOS|Chrome)(?:.+)Mobile/i,wx=/Mobile(?:.+)Firefox\b/i,Tx=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function nI(r){return function(e){return e.test(r)}}function Sx(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?e.userAgent=r:r&&r.userAgent&&(e={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var s=nI(t),n={apple:{phone:s(jf)&&!s(yi),ipod:s(fx),tablet:!s(jf)&&(s(px)||Tx(e))&&!s(yi),universal:s(mx),device:(s(jf)||s(fx)||s(px)||s(mx)||Tx(e))&&!s(yi)},amazon:{phone:s(Qr),tablet:!s(Qr)&&s(Io),device:s(Qr)||s(Io)},android:{phone:!s(yi)&&s(Qr)||!s(yi)&&s(Zf),tablet:!s(yi)&&!s(Qr)&&!s(Zf)&&(s(Io)||s(gx)),device:!s(yi)&&(s(Qr)||s(Io)||s(Zf)||s(gx))||s(/\bokhttp\b/i)},windows:{phone:s(yi),tablet:s(_x),device:s(yi)||s(_x)},other:{blackberry:s(xx),blackberry10:s(yx),opera:s(vx),firefox:s(wx),chrome:s(bx),device:s(xx)||s(yx)||s(vx)||s(wx)||s(bx)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}const oI=(Sx.default??Sx)(globalThis.navigator),aI=9,Cx=100,lI=0,cI=0,Ex=2,Ax=1,hI=-1e3,uI=-1e3,dI=2,Jf=class C1{constructor(e,t=oI){this._mobileInfo=t,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pools={},this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._isRunningTests=!1,this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnMouseMove=this._onMouseMove.bind(this),this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook(),this._renderer=e}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}get div(){return this._div}_createTouchHook(){const e=document.createElement("button");e.style.width=`${Ax}px`,e.style.height=`${Ax}px`,e.style.position="absolute",e.style.top=`${hI}px`,e.style.left=`${uI}px`,e.style.zIndex=dI.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(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement("div"),this._div.style.position="absolute",this._div.style.top=`${lI}px`,this._div.style.left=`${cI}px`,this._div.style.pointerEvents="none",this._div.style.zIndex=Ex.toString(),this._canvasObserver=new dx({domElement:this._div,renderer:this._renderer})),this._activateOnTab&&globalThis.addEventListener("keydown",this._boundOnKeyDown,!1),this._deactivateOnMouseMove&&globalThis.document.addEventListener("mousemove",this._boundOnMouseMove,!0);const e=this._renderer.view.canvas;if(e.parentNode)this._canvasObserver.ensureAttached(),this._initAccessibilitySetup();else{const t=new MutationObserver(()=>{e.parentNode&&(t.disconnect(),this._canvasObserver.ensureAttached(),this._initAccessibilitySetup())});t.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){if(!(!this._isActive||this._isMobileAccessibility)){this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._boundOnMouseMove,!0),this._activateOnTab&&globalThis.addEventListener("keydown",this._boundOnKeyDown,!1),this._renderer.runners.postrender.remove(this);for(const e of this._children)e._accessibleDiv?.parentNode&&(e._accessibleDiv.parentNode.removeChild(e._accessibleDiv),e._accessibleDiv=null),e._accessibleActive=!1;for(const e in this._pools)this._pools[e].forEach(i=>{i.parentNode&&i.parentNode.removeChild(i)}),delete this._pools[e];this._div?.parentNode&&this._div.parentNode.removeChild(this._div),this._pools={},this._children=[]}}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);const t=e.children;if(t)for(let i=0;i<t.length;i++)this._updateAccessibleObjects(t[i])}init(e){const i={accessibilityOptions:{...C1.defaultOptions,...e?.accessibilityOptions||{}}};this.debug=i.accessibilityOptions.debug,this._activateOnTab=i.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=i.accessibilityOptions.deactivateOnMouseMove,i.accessibilityOptions.enabledByDefault&&this._activate(),this._renderer.runners.postrender.remove(this)}postrender(){const e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,(!this._renderer.renderingToScreen||!this._renderer.view.canvas)&&!this._isRunningTests))return;const t=new Set;if(this._renderer.lastObjectRendered){this._updateAccessibleObjects(this._renderer.lastObjectRendered);for(const i of this._children)i._renderId===this._renderId&&t.add(this._children.indexOf(i))}for(let i=this._children.length-1;i>=0;i--){const s=this._children[i];t.has(i)||(s._accessibleDiv&&s._accessibleDiv.parentNode&&(s._accessibleDiv.parentNode.removeChild(s._accessibleDiv),this._getPool(s.accessibleType).push(s._accessibleDiv),s._accessibleDiv=null),s._accessibleActive=!1,H_(this._children,i,1))}this._renderer.renderingToScreen&&this._canvasObserver.ensureAttached();for(let i=0;i<this._children.length;i++){const s=this._children[i];if(!s._accessibleActive||!s._accessibleDiv)continue;const n=s._accessibleDiv,o=s.hitArea||s.getBounds().rectangle;if(s.hitArea){const a=s.worldTransform;n.style.left=`${a.tx+o.x*a.a}px`,n.style.top=`${a.ty+o.y*a.d}px`,n.style.width=`${o.width*a.a}px`,n.style.height=`${o.height*a.d}px`}else this._capHitArea(o),n.style.left=`${o.x}px`,n.style.top=`${o.y}px`,n.style.width=`${o.width}px`,n.style.height=`${o.height}px`}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:i}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}_addChild(e){let i=this._getPool(e.accessibleType).pop();i?(i.innerHTML="",i.removeAttribute("title"),i.removeAttribute("aria-label"),i.tabIndex=0):(e.accessibleType==="button"?i=document.createElement("button"):(i=document.createElement(e.accessibleType),i.style.cssText=`
|