reacthub-pixitweenjs 0.2.107-alpha.73 → 0.2.107-alpha.75

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/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(qe,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap"],X):(qe=typeof globalThis<"u"?globalThis:qe||self,X(qe["reacthub-pixitweenjs"]={},qe.React,qe.PIXIReact,qe.PIXI,qe.reacthubReactBindings,qe.gsap))})(this,function(qe,X,Be,yv,xv,ee){"use strict";function yh(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const te=yh(X),Xt=yh(yv);var At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function bv(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var xh={exports:{}},Hs={};/**
1
+ (function(ze,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap"],W):(ze=typeof globalThis<"u"?globalThis:ze||self,W(ze["reacthub-pixitweenjs"]={},ze.React,ze.PIXIReact,ze.PIXI,ze.reacthubReactBindings,ze.gsap))})(this,function(ze,W,ke,yv,xv,ee){"use strict";function vh(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const re=vh(W),jt=vh(yv);var At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function bv(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var _h={exports:{}},Hs={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,40 +6,24 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Tv=X,wv=Symbol.for("react.element"),Sv=Symbol.for("react.fragment"),Av=Object.prototype.hasOwnProperty,Ev=Tv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Cv={key:!0,ref:!0,__self:!0,__source:!0};function bh(t,e,r){var n,i={},a=null,u=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(u=e.ref);for(n in e)Av.call(e,n)&&!Cv.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:wv,type:t,key:a,ref:u,props:i,_owner:Ev.current}}Hs.Fragment=Sv,Hs.jsx=bh,Hs.jsxs=bh,xh.exports=Hs;var Ae=xh.exports,Tn=(t=>(t.BlackAndWhite="BlackAndWhite",t.Sepia="Sepia",t.RetroVintage="RetroVintage",t.NightVision="NightVision",t.Normal="Normal",t.Vignette="Vignette",t.None="Normal",t))(Tn||{});let Th;function wh(){return Th=document.body,Th}function ht(t,e,r){let n;return X.useEffect(()=>{n=n||wh();const i=a=>{const u=a.detail;e(u)};return n.addEventListener(t,i,!1),()=>{n==null||n.removeEventListener(t,i,!1)}},r),i=>{n=i}}function Qn(t,e){const r=wh(),n=new CustomEvent(t,{detail:e});r.dispatchEvent(n)}function Iv(){let t;function e(r){t=r}return e.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});t==null||t.dispatchEvent(i)},e}const en=te.createContext({}),Ze={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE",SCRUBBER_CLICKED:"GSAP_SCRUBBER_CLICKED",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},Rv=({children:t})=>{const[e,r]=X.useState(0),n=X.useRef(),i=X.useRef(),a=X.useRef(.001),u=X.useRef(!1),l=X.useRef(!1),[f,p]=X.useState(!1);X.useLayoutEffect(()=>(i.current=ee.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&ee.killTweensOf(n.current),n.current=ee.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&n.current.revert(),i.current.revert()}),[]);const g=X.useCallback(()=>{if(n.current){let I=n.current.time();I<a.current?u.current=!0:u.current=!1,a.current=I}},[]);X.useEffect(()=>{if(n.current){const w=n.current;w.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){w.pause(),g()}).eventCallback("onUpdate",function(){g()}).eventCallback("onRepeat",function(){console.log("onrepeat",w.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",w.progress())}).eventCallback("onComplete",function(){w.seek(0),w.pause(),Qn(Ze.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),g()})}},[]);const c=X.useCallback(()=>{n.current&&n.current.revert()},[]),d=X.useCallback(()=>{n.current&&n.current.restart()},[]),m=X.useCallback(()=>{if(n.current){const w=n.current;w.repeat(1),w.restart()}},[]),_=X.useCallback(w=>{n.current&&n.current.seek(w)},[]),y=X.useCallback(()=>{n.current&&n.current.seek(4)},[]),b=X.useCallback(()=>{const w=n.current;return w?w.totalDuration():0},[]),x=()=>{n.current&&(n.current.pause(),Qn(Ze.PAUSE))},E=()=>{n.current&&(n.current.resume(),Qn(Ze.RESUME))};return ht(Ze.SEEK_START,()=>{l.current=!0}),ht(Ze.SCRUBBER_PLAY,()=>{E()}),ht(Ze.SCRUBBER_PAUSE,()=>{x()}),ht(Ze.SCRUBBER_SEEK,w=>{_(w)}),ht(Ze.SEEK_END,()=>{l.current=!1}),ht(Ze.REVERSE_MODE_START,()=>{u.current=!0}),ht(Ze.REVERSE_MODE_END,()=>{u.current=!1}),ht(Ze.SCRUBBER_PROGRESS_UPDATE,w=>{}),Ae.jsx(en.Provider,{value:{gsapCtx:i,tl:n,handlePlay:E,handlePause:x,handleReset:c,handleSeek:_,handleSeekTest:y,handleRestart:d,handleRepeat:m,playerTimeRef:a,getTimelineDuration:b,totalDuration:e,setTotalDuration:r,reverseModeRef:u,dragModeRef:l,isRemotion:f,setIsRemotion:p},children:t})},Pv=({pixiTransformerRef:t,imageRef:e,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:f=!1})=>{const p=Xt.utils.string2hex("#F3C409"),g=Xt.utils.string2hex("#F3C409"),c=te.useRef({isDragging:!1}),d=300,m=te.useRef(0),_=te.useCallback(()=>{a&&!c.current.isDragging&&a(!0)},[a]),y=te.useCallback(()=>{a&&!c.current.isDragging&&a(!1)},[a]),b=te.useCallback(()=>{c.current.isDragging=!0;const w=new Date().getTime();w-m.current<d&&u&&u(),m.current=w},[]),x=te.useCallback(w=>{c.current.isDragging=!0,i&&i(w),Qn(Ze.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),E=te.useCallback(()=>{if(e.current===null)return;const w=e.current.x,I=e.current.y,O=e.current.width,F=e.current.height,N=e.current.rotation,L=[e.current.scale.x,e.current.scale.y],D=L[0]<0?-1:1,V=L[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(w),y:Math.round(I),width:Math.round(Math.max(5,O)),height:Math.round(Math.max(5,F)),rotation:N,scale:f?L:[D,V]}}),Qn(Ze.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),c.current.isDragging=!1},[n]);return te.useEffect(()=>(t.current&&(t.current.on("mouseover",_),t.current.on("mouseout",y),t.current.on("mousedown",b)),()=>{t.current&&(t.current.off("mouseover",_),t.current.off("mouseout",y),t.current.off("mousedown",b))}),[]),Ae.jsx(xv.Transformer,{ref:t,group:r?[e.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:g},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:p,shape:"circle",radius:10},transformchange:x,transformcommit:E})};function Mv(){this.__data__=[],this.size=0}var Ov=Mv;function Fv(t,e){return t===e||t!==t&&e!==e}var Sh=Fv,Nv=Sh;function Lv(t,e){for(var r=t.length;r--;)if(Nv(t[r][0],e))return r;return-1}var zs=Lv,kv=zs,Dv=Array.prototype,Bv=Dv.splice;function Uv(t){var e=this.__data__,r=kv(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Bv.call(e,r,1),--this.size,!0}var $v=Uv,Gv=zs;function Hv(t){var e=this.__data__,r=Gv(e,t);return r<0?void 0:e[r][1]}var zv=Hv,Vv=zs;function jv(t){return Vv(this.__data__,t)>-1}var Xv=jv,Wv=zs;function qv(t,e){var r=this.__data__,n=Wv(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Yv=qv,Kv=Ov,Zv=$v,Qv=zv,Jv=Xv,e_=Yv;function Jn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jn.prototype.clear=Kv,Jn.prototype.delete=Zv,Jn.prototype.get=Qv,Jn.prototype.has=Jv,Jn.prototype.set=e_;var Vs=Jn,t_=Vs;function r_(){this.__data__=new t_,this.size=0}var n_=r_;function i_(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var s_=i_;function a_(t){return this.__data__.get(t)}var o_=a_;function u_(t){return this.__data__.has(t)}var l_=u_,c_=typeof At=="object"&&At&&At.Object===Object&&At,Ah=c_,h_=Ah,f_=typeof self=="object"&&self&&self.Object===Object&&self,d_=h_||f_||Function("return this")(),Ir=d_,p_=Ir,g_=p_.Symbol,js=g_,Eh=js,Ch=Object.prototype,m_=Ch.hasOwnProperty,v_=Ch.toString,qi=Eh?Eh.toStringTag:void 0;function __(t){var e=m_.call(t,qi),r=t[qi];try{t[qi]=void 0;var n=!0}catch{}var i=v_.call(t);return n&&(e?t[qi]=r:delete t[qi]),i}var y_=__,x_=Object.prototype,b_=x_.toString;function T_(t){return b_.call(t)}var w_=T_,Ih=js,S_=y_,A_=w_,E_="[object Null]",C_="[object Undefined]",Rh=Ih?Ih.toStringTag:void 0;function I_(t){return t==null?t===void 0?C_:E_:Rh&&Rh in Object(t)?S_(t):A_(t)}var Yi=I_;function R_(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ki=R_,P_=Yi,M_=Ki,O_="[object AsyncFunction]",F_="[object Function]",N_="[object GeneratorFunction]",L_="[object Proxy]";function k_(t){if(!M_(t))return!1;var e=P_(t);return e==F_||e==N_||e==O_||e==L_}var Ph=k_,D_=Ir,B_=D_["__core-js_shared__"],U_=B_,Ko=U_,Mh=function(){var t=/[^.]+$/.exec(Ko&&Ko.keys&&Ko.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function $_(t){return!!Mh&&Mh in t}var G_=$_,H_=Function.prototype,z_=H_.toString;function V_(t){if(t!=null){try{return z_.call(t)}catch{}try{return t+""}catch{}}return""}var Oh=V_,j_=Ph,X_=G_,W_=Ki,q_=Oh,Y_=/[\\^$.*+?()[\]{}|]/g,K_=/^\[object .+?Constructor\]$/,Z_=Function.prototype,Q_=Object.prototype,J_=Z_.toString,ey=Q_.hasOwnProperty,ty=RegExp("^"+J_.call(ey).replace(Y_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ry(t){if(!W_(t)||X_(t))return!1;var e=j_(t)?ty:K_;return e.test(q_(t))}var ny=ry;function iy(t,e){return t==null?void 0:t[e]}var sy=iy,ay=ny,oy=sy;function uy(t,e){var r=oy(t,e);return ay(r)?r:void 0}var ei=uy,ly=ei,cy=Ir,hy=ly(cy,"Map"),Zo=hy,fy=ei,dy=fy(Object,"create"),Xs=dy,Fh=Xs;function py(){this.__data__=Fh?Fh(null):{},this.size=0}var gy=py;function my(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var vy=my,_y=Xs,yy="__lodash_hash_undefined__",xy=Object.prototype,by=xy.hasOwnProperty;function Ty(t){var e=this.__data__;if(_y){var r=e[t];return r===yy?void 0:r}return by.call(e,t)?e[t]:void 0}var wy=Ty,Sy=Xs,Ay=Object.prototype,Ey=Ay.hasOwnProperty;function Cy(t){var e=this.__data__;return Sy?e[t]!==void 0:Ey.call(e,t)}var Iy=Cy,Ry=Xs,Py="__lodash_hash_undefined__";function My(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ry&&e===void 0?Py:e,this}var Oy=My,Fy=gy,Ny=vy,Ly=wy,ky=Iy,Dy=Oy;function ti(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ti.prototype.clear=Fy,ti.prototype.delete=Ny,ti.prototype.get=Ly,ti.prototype.has=ky,ti.prototype.set=Dy;var By=ti,Nh=By,Uy=Vs,$y=Zo;function Gy(){this.size=0,this.__data__={hash:new Nh,map:new($y||Uy),string:new Nh}}var Hy=Gy;function zy(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Vy=zy,jy=Vy;function Xy(t,e){var r=t.__data__;return jy(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ws=Xy,Wy=Ws;function qy(t){var e=Wy(this,t).delete(t);return this.size-=e?1:0,e}var Yy=qy,Ky=Ws;function Zy(t){return Ky(this,t).get(t)}var Qy=Zy,Jy=Ws;function ex(t){return Jy(this,t).has(t)}var tx=ex,rx=Ws;function nx(t,e){var r=rx(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var ix=nx,sx=Hy,ax=Yy,ox=Qy,ux=tx,lx=ix;function ri(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ri.prototype.clear=sx,ri.prototype.delete=ax,ri.prototype.get=ox,ri.prototype.has=ux,ri.prototype.set=lx;var Qo=ri,cx=Vs,hx=Zo,fx=Qo,dx=200;function px(t,e){var r=this.__data__;if(r instanceof cx){var n=r.__data__;if(!hx||n.length<dx-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new fx(n)}return r.set(t,e),this.size=r.size,this}var gx=px,mx=Vs,vx=n_,_x=s_,yx=o_,xx=l_,bx=gx;function ni(t){var e=this.__data__=new mx(t);this.size=e.size}ni.prototype.clear=vx,ni.prototype.delete=_x,ni.prototype.get=yx,ni.prototype.has=xx,ni.prototype.set=bx;var Lh=ni,Tx="__lodash_hash_undefined__";function wx(t){return this.__data__.set(t,Tx),this}var Sx=wx;function Ax(t){return this.__data__.has(t)}var Ex=Ax,Cx=Qo,Ix=Sx,Rx=Ex;function qs(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Cx;++e<r;)this.add(t[e])}qs.prototype.add=qs.prototype.push=Ix,qs.prototype.has=Rx;var Px=qs;function Mx(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Ox=Mx;function Fx(t,e){return t.has(e)}var Nx=Fx,Lx=Px,kx=Ox,Dx=Nx,Bx=1,Ux=2;function $x(t,e,r,n,i,a){var u=r&Bx,l=t.length,f=e.length;if(l!=f&&!(u&&f>l))return!1;var p=a.get(t),g=a.get(e);if(p&&g)return p==e&&g==t;var c=-1,d=!0,m=r&Ux?new Lx:void 0;for(a.set(t,e),a.set(e,t);++c<l;){var _=t[c],y=e[c];if(n)var b=u?n(y,_,c,e,t,a):n(_,y,c,t,e,a);if(b!==void 0){if(b)continue;d=!1;break}if(m){if(!kx(e,function(x,E){if(!Dx(m,E)&&(_===x||i(_,x,r,n,a)))return m.push(E)})){d=!1;break}}else if(!(_===y||i(_,y,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var kh=$x,Gx=Ir,Hx=Gx.Uint8Array,zx=Hx;function Vx(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var jx=Vx;function Xx(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Wx=Xx,Dh=js,Bh=zx,qx=Sh,Yx=kh,Kx=jx,Zx=Wx,Qx=1,Jx=2,e1="[object Boolean]",t1="[object Date]",r1="[object Error]",n1="[object Map]",i1="[object Number]",s1="[object RegExp]",a1="[object Set]",o1="[object String]",u1="[object Symbol]",l1="[object ArrayBuffer]",c1="[object DataView]",Uh=Dh?Dh.prototype:void 0,Jo=Uh?Uh.valueOf:void 0;function h1(t,e,r,n,i,a,u){switch(r){case c1:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case l1:return!(t.byteLength!=e.byteLength||!a(new Bh(t),new Bh(e)));case e1:case t1:case i1:return qx(+t,+e);case r1:return t.name==e.name&&t.message==e.message;case s1:case o1:return t==e+"";case n1:var l=Kx;case a1:var f=n&Qx;if(l||(l=Zx),t.size!=e.size&&!f)return!1;var p=u.get(t);if(p)return p==e;n|=Jx,u.set(t,e);var g=Yx(l(t),l(e),n,i,a,u);return u.delete(t),g;case u1:if(Jo)return Jo.call(t)==Jo.call(e)}return!1}var f1=h1;function d1(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var p1=d1,g1=Array.isArray,Rr=g1,m1=p1,v1=Rr;function _1(t,e,r){var n=e(t);return v1(t)?n:m1(n,r(t))}var y1=_1;function x1(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var u=t[r];e(u,r,t)&&(a[i++]=u)}return a}var b1=x1;function T1(){return[]}var w1=T1,S1=b1,A1=w1,E1=Object.prototype,C1=E1.propertyIsEnumerable,$h=Object.getOwnPropertySymbols,I1=$h?function(t){return t==null?[]:(t=Object(t),S1($h(t),function(e){return C1.call(t,e)}))}:A1,R1=I1;function P1(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var M1=P1;function O1(t){return t!=null&&typeof t=="object"}var Zi=O1,F1=Yi,N1=Zi,L1="[object Arguments]";function k1(t){return N1(t)&&F1(t)==L1}var D1=k1,Gh=D1,B1=Zi,Hh=Object.prototype,U1=Hh.hasOwnProperty,$1=Hh.propertyIsEnumerable,G1=Gh(function(){return arguments}())?Gh:function(t){return B1(t)&&U1.call(t,"callee")&&!$1.call(t,"callee")},eu=G1,Ys={exports:{}};function H1(){return!1}var z1=H1;Ys.exports,function(t,e){var r=Ir,n=z1,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,u=a&&a.exports===i,l=u?r.Buffer:void 0,f=l?l.isBuffer:void 0,p=f||n;t.exports=p}(Ys,Ys.exports);var tu=Ys.exports,V1=9007199254740991,j1=/^(?:0|[1-9]\d*)$/;function X1(t,e){var r=typeof t;return e=e??V1,!!e&&(r=="number"||r!="symbol"&&j1.test(t))&&t>-1&&t%1==0&&t<e}var zh=X1,W1=9007199254740991;function q1(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=W1}var ru=q1,Y1=Yi,K1=ru,Z1=Zi,Q1="[object Arguments]",J1="[object Array]",eb="[object Boolean]",tb="[object Date]",rb="[object Error]",nb="[object Function]",ib="[object Map]",sb="[object Number]",ab="[object Object]",ob="[object RegExp]",ub="[object Set]",lb="[object String]",cb="[object WeakMap]",hb="[object ArrayBuffer]",fb="[object DataView]",db="[object Float32Array]",pb="[object Float64Array]",gb="[object Int8Array]",mb="[object Int16Array]",vb="[object Int32Array]",_b="[object Uint8Array]",yb="[object Uint8ClampedArray]",xb="[object Uint16Array]",bb="[object Uint32Array]",nt={};nt[db]=nt[pb]=nt[gb]=nt[mb]=nt[vb]=nt[_b]=nt[yb]=nt[xb]=nt[bb]=!0,nt[Q1]=nt[J1]=nt[hb]=nt[eb]=nt[fb]=nt[tb]=nt[rb]=nt[nb]=nt[ib]=nt[sb]=nt[ab]=nt[ob]=nt[ub]=nt[lb]=nt[cb]=!1;function Tb(t){return Z1(t)&&K1(t.length)&&!!nt[Y1(t)]}var wb=Tb;function Sb(t){return function(e){return t(e)}}var Ab=Sb,Ks={exports:{}};Ks.exports,function(t,e){var r=Ah,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,u=a&&r.process,l=function(){try{var f=i&&i.require&&i.require("util").types;return f||u&&u.binding&&u.binding("util")}catch{}}();t.exports=l}(Ks,Ks.exports);var Eb=Ks.exports,Cb=wb,Ib=Ab,Vh=Eb,jh=Vh&&Vh.isTypedArray,Rb=jh?Ib(jh):Cb,nu=Rb,Pb=M1,Mb=eu,Ob=Rr,Fb=tu,Nb=zh,Lb=nu,kb=Object.prototype,Db=kb.hasOwnProperty;function Bb(t,e){var r=Ob(t),n=!r&&Mb(t),i=!r&&!n&&Fb(t),a=!r&&!n&&!i&&Lb(t),u=r||n||i||a,l=u?Pb(t.length,String):[],f=l.length;for(var p in t)(e||Db.call(t,p))&&!(u&&(p=="length"||i&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Nb(p,f)))&&l.push(p);return l}var Ub=Bb,$b=Object.prototype;function Gb(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||$b;return t===r}var Xh=Gb;function Hb(t,e){return function(r){return t(e(r))}}var zb=Hb,Vb=zb,jb=Vb(Object.keys,Object),Xb=jb,Wb=Xh,qb=Xb,Yb=Object.prototype,Kb=Yb.hasOwnProperty;function Zb(t){if(!Wb(t))return qb(t);var e=[];for(var r in Object(t))Kb.call(t,r)&&r!="constructor"&&e.push(r);return e}var Wh=Zb,Qb=Ph,Jb=ru;function eT(t){return t!=null&&Jb(t.length)&&!Qb(t)}var Zs=eT,tT=Ub,rT=Wh,nT=Zs;function iT(t){return nT(t)?tT(t):rT(t)}var iu=iT,sT=y1,aT=R1,oT=iu;function uT(t){return sT(t,oT,aT)}var lT=uT,qh=lT,cT=1,hT=Object.prototype,fT=hT.hasOwnProperty;function dT(t,e,r,n,i,a){var u=r&cT,l=qh(t),f=l.length,p=qh(e),g=p.length;if(f!=g&&!u)return!1;for(var c=f;c--;){var d=l[c];if(!(u?d in e:fT.call(e,d)))return!1}var m=a.get(t),_=a.get(e);if(m&&_)return m==e&&_==t;var y=!0;a.set(t,e),a.set(e,t);for(var b=u;++c<f;){d=l[c];var x=t[d],E=e[d];if(n)var w=u?n(E,x,d,e,t,a):n(x,E,d,t,e,a);if(!(w===void 0?x===E||i(x,E,r,n,a):w)){y=!1;break}b||(b=d=="constructor")}if(y&&!b){var I=t.constructor,O=e.constructor;I!=O&&"constructor"in t&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof O=="function"&&O instanceof O)&&(y=!1)}return a.delete(t),a.delete(e),y}var pT=dT,gT=ei,mT=Ir,vT=gT(mT,"DataView"),_T=vT,yT=ei,xT=Ir,bT=yT(xT,"Promise"),TT=bT,wT=ei,ST=Ir,AT=wT(ST,"Set"),ET=AT,CT=ei,IT=Ir,RT=CT(IT,"WeakMap"),PT=RT,su=_T,au=Zo,ou=TT,uu=ET,lu=PT,Yh=Yi,ii=Oh,Kh="[object Map]",MT="[object Object]",Zh="[object Promise]",Qh="[object Set]",Jh="[object WeakMap]",ef="[object DataView]",OT=ii(su),FT=ii(au),NT=ii(ou),LT=ii(uu),kT=ii(lu),wn=Yh;(su&&wn(new su(new ArrayBuffer(1)))!=ef||au&&wn(new au)!=Kh||ou&&wn(ou.resolve())!=Zh||uu&&wn(new uu)!=Qh||lu&&wn(new lu)!=Jh)&&(wn=function(t){var e=Yh(t),r=e==MT?t.constructor:void 0,n=r?ii(r):"";if(n)switch(n){case OT:return ef;case FT:return Kh;case NT:return Zh;case LT:return Qh;case kT:return Jh}return e});var tf=wn,cu=Lh,DT=kh,BT=f1,UT=pT,rf=tf,nf=Rr,sf=tu,$T=nu,GT=1,af="[object Arguments]",of="[object Array]",Qs="[object Object]",HT=Object.prototype,uf=HT.hasOwnProperty;function zT(t,e,r,n,i,a){var u=nf(t),l=nf(e),f=u?of:rf(t),p=l?of:rf(e);f=f==af?Qs:f,p=p==af?Qs:p;var g=f==Qs,c=p==Qs,d=f==p;if(d&&sf(t)){if(!sf(e))return!1;u=!0,g=!1}if(d&&!g)return a||(a=new cu),u||$T(t)?DT(t,e,r,n,i,a):BT(t,e,f,r,n,i,a);if(!(r&GT)){var m=g&&uf.call(t,"__wrapped__"),_=c&&uf.call(e,"__wrapped__");if(m||_){var y=m?t.value():t,b=_?e.value():e;return a||(a=new cu),i(y,b,r,n,a)}}return d?(a||(a=new cu),UT(t,e,r,n,i,a)):!1}var VT=zT,jT=VT,lf=Zi;function cf(t,e,r,n,i){return t===e?!0:t==null||e==null||!lf(t)&&!lf(e)?t!==t&&e!==e:jT(t,e,r,n,cf,i)}var hu=cf,XT=hu;function WT(t,e){return XT(t,e)}var qT=WT;const YT=bn(qT),KT=(t,e)=>{const r=X.useRef(!0),n=X.useRef(e);X.useEffect(()=>{const i=n.current.every((a,u)=>YT(a,e[u]));(r.current||!i)&&t(),r.current=!1,n.current=e},e)};function ZT(t,e=700){const[r,n]=X.useState(t);return KT(()=>{const i=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(i)}},[t,e]),r}var QT=Wh,JT=tf,ew=eu,tw=Rr,rw=Zs,nw=tu,iw=Xh,sw=nu,aw="[object Map]",ow="[object Set]",uw=Object.prototype,lw=uw.hasOwnProperty;function cw(t){if(t==null)return!0;if(rw(t)&&(tw(t)||typeof t=="string"||typeof t.splice=="function"||nw(t)||sw(t)||ew(t)))return!t.length;var e=JT(t);if(e==aw||e==ow)return!t.size;if(iw(t))return!QT(t).length;for(var r in t)if(lw.call(t,r))return!1;return!0}var hw=cw;const Qi=bn(hw);var fu=(t=>(t.NONE="none",t.NORMAL="normal",t.LENSFLARE="lensflare",t.FILMSTRIP="filmstrip",t.GRUNGE="grunge",t.BRICKS="bricks",t))(fu||{});const hf={normal:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:0},lensflare:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:1},filmstrip:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/frames_filmstrip_5.png",blendmode:"ADD",alpha:1},grunge:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/pixi_overlay_grunge_60.jpg",blendmode:"ADD",alpha:1},bricks:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/bricks_Overlay_100.jpg",blendmode:"MULTIPLY",alpha:1}},fw=t=>{const{overlay:e,width:r,height:n,x:i,y:a}=t,{src:u,blendmode:l}=hf[e]||hf.normal;return Ae.jsx(Be.TilingSprite,{image:u,width:r,height:n,x:i,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})};/*!
10
- * paths 3.11.5
11
- * https://greensock.com
12
- *
13
- * Copyright 2008-2023, GreenSock. All rights reserved.
14
- * Subject to the terms at https://greensock.com/standard-license or for
15
- * Club GreenSock members, the agreement issued with that membership.
16
- * @author: Jack Doyle, jack@greensock.com
17
- */var dw=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,pw=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,gw=Math.PI/180,Js=Math.sin,ea=Math.cos,Ji=Math.abs,es=Math.sqrt,mw=function(e){return typeof e=="number"},ff=1e5,tn=function(e){return Math.round(e*ff)/ff||0};function vw(t,e,r,n,i,a,u){for(var l=t.length,f,p,g,c,d;--l>-1;)for(f=t[l],p=f.length,g=0;g<p;g+=2)c=f[g],d=f[g+1],f[g]=c*e+d*n+a,f[g+1]=c*r+d*i+u;return t._dirty=1,t}function _w(t,e,r,n,i,a,u,l,f){if(!(t===l&&e===f)){r=Ji(r),n=Ji(n);var p=i%360*gw,g=ea(p),c=Js(p),d=Math.PI,m=d*2,_=(t-l)/2,y=(e-f)/2,b=g*_+c*y,x=-c*_+g*y,E=b*b,w=x*x,I=E/(r*r)+w/(n*n);I>1&&(r=es(I)*r,n=es(I)*n);var O=r*r,F=n*n,N=(O*F-O*w-F*E)/(O*w+F*E);N<0&&(N=0);var L=(a===u?-1:1)*es(N),D=L*(r*x/n),V=L*-(n*b/r),Y=(t+l)/2,ie=(e+f)/2,j=Y+(g*D-c*V),G=ie+(c*D+g*V),ae=(b-D)/r,se=(x-V)/n,H=(-b-D)/r,Q=(-x-V)/n,pe=ae*ae+se*se,W=(se<0?-1:1)*Math.acos(ae/es(pe)),q=(ae*Q-se*H<0?-1:1)*Math.acos((ae*H+se*Q)/es(pe*(H*H+Q*Q)));isNaN(q)&&(q=d),!u&&q>0?q-=m:u&&q<0&&(q+=m),W%=m,q%=m;var he=Math.ceil(Ji(q)/(m/4)),fe=[],me=q/he,be=4/3*Js(me/2)/(1+ea(me/2)),Ce=g*r,$e=c*r,ze=c*-n,Xe=g*n,_e;for(_e=0;_e<he;_e++)i=W+_e*me,b=ea(i),x=Js(i),ae=ea(i+=me),se=Js(i),fe.push(b-be*x,x+be*b,ae+be*se,se-be*ae,ae,se);for(_e=0;_e<fe.length;_e+=2)b=fe[_e],x=fe[_e+1],fe[_e]=b*Ce+x*ze+j,fe[_e+1]=b*$e+x*Xe+G;return fe[_e-2]=l,fe[_e-1]=f,fe}}function yw(t){var e=(t+"").replace(pw,function(D){var V=+D;return V<1e-4&&V>-1e-4?0:V}).match(dw)||[],r=[],n=0,i=0,a=2/3,u=e.length,l=0,f="ERROR: malformed path: "+t,p,g,c,d,m,_,y,b,x,E,w,I,O,F,N,L=function(V,Y,ie,j){E=(ie-V)/3,w=(j-Y)/3,y.push(V+E,Y+w,ie-E,j-w,ie,j)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(f),r;for(p=0;p<u;p++)if(O=m,isNaN(e[p])?(m=e[p].toUpperCase(),_=m!==e[p]):p--,c=+e[p+1],d=+e[p+2],_&&(c+=n,d+=i),p||(b=c,x=d),m==="M")y&&(y.length<8?r.length-=1:l+=y.length),n=b=c,i=x=d,y=[c,d],r.push(y),p+=2,m="L";else if(m==="C")y||(y=[0,0]),_||(n=i=0),y.push(c,d,n+e[p+3]*1,i+e[p+4]*1,n+=e[p+5]*1,i+=e[p+6]*1),p+=6;else if(m==="S")E=n,w=i,(O==="C"||O==="S")&&(E+=n-y[y.length-4],w+=i-y[y.length-3]),_||(n=i=0),y.push(E,w,c,d,n+=e[p+3]*1,i+=e[p+4]*1),p+=4;else if(m==="Q")E=n+(c-n)*a,w=i+(d-i)*a,_||(n=i=0),n+=e[p+3]*1,i+=e[p+4]*1,y.push(E,w,n+(c-n)*a,i+(d-i)*a,n,i),p+=4;else if(m==="T")E=n-y[y.length-4],w=i-y[y.length-3],y.push(n+E,i+w,c+(n+E*1.5-c)*a,d+(i+w*1.5-d)*a,n=c,i=d),p+=2;else if(m==="H")L(n,i,n=c,i),p+=1;else if(m==="V")L(n,i,n,i=c+(_?i-n:0)),p+=1;else if(m==="L"||m==="Z")m==="Z"&&(c=b,d=x,y.closed=!0),(m==="L"||Ji(n-c)>.5||Ji(i-d)>.5)&&(L(n,i,c,d),m==="L"&&(p+=2)),n=c,i=d;else if(m==="A"){if(F=e[p+4],N=e[p+5],E=e[p+6],w=e[p+7],g=7,F.length>1&&(F.length<3?(w=E,E=N,g--):(w=N,E=F.substr(2),g-=2),N=F.charAt(1),F=F.charAt(0)),I=_w(n,i,+e[p+1],+e[p+2],+e[p+3],+F,+N,(_?n:0)+E*1,(_?i:0)+w*1),p+=g,I)for(g=0;g<I.length;g++)y.push(I[g]);n=y[y.length-2],i=y[y.length-1]}else console.log(f);return p=y.length,p<6?(r.pop(),p=0):y[0]===y[p-2]&&y[1]===y[p-1]&&(y.closed=!0),r.totalPoints=l+p,r}function xw(t){mw(t[0])&&(t=[t]);var e="",r=t.length,n,i,a,u;for(i=0;i<r;i++){for(u=t[i],e+="M"+tn(u[0])+","+tn(u[1])+" C",n=u.length,a=2;a<n;a++)e+=tn(u[a++])+","+tn(u[a++])+" "+tn(u[a++])+","+tn(u[a++])+" "+tn(u[a++])+","+tn(u[a])+" ";u.closed&&(e+="z")}return e}/*!
18
- * CustomEase 3.11.5
19
- * https://greensock.com
20
- *
21
- * @license Copyright 2008-2023, GreenSock. All rights reserved.
22
- * Subject to the terms at https://greensock.com/standard-license or for
23
- * Club GreenSock members, the agreement issued with that membership.
24
- * @author: Jack Doyle, jack@greensock.com
25
- */var Gt,df,pf=function(){return Gt||typeof window<"u"&&(Gt=window.gsap)&&Gt.registerPlugin&&Gt},gf=function(){Gt=pf(),Gt?(Gt.registerEase("_CE",ts.create),df=1):console.warn("Please gsap.registerPlugin(CustomEase)")},bw=1e20,ta=function(e){return~~(e*1e3+(e<0?-.5:.5))/1e3},Tw=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,ww=/[cLlsSaAhHvVtTqQ]/g,Sw=function(e){var r=e.length,n=bw,i;for(i=1;i<r;i+=6)+e[i]<n&&(n=+e[i]);return n},Aw=function(e,r,n){!n&&n!==0&&(n=Math.max(+e[e.length-1],+e[1]));var i=+e[0]*-1,a=-n,u=e.length,l=1/(+e[u-2]+i),f=-r||(Math.abs(+e[u-1]-+e[1])<.01*(+e[u-2]-+e[0])?Sw(e)+a:+e[u-1]+a),p;for(f?f=1/f:f=-l,p=0;p<u;p+=2)e[p]=(+e[p]+i)*l,e[p+1]=(+e[p+1]+a)*f},Ew=function t(e,r,n,i,a,u,l,f,p,g,c){var d=(e+n)/2,m=(r+i)/2,_=(n+a)/2,y=(i+u)/2,b=(a+l)/2,x=(u+f)/2,E=(d+_)/2,w=(m+y)/2,I=(_+b)/2,O=(y+x)/2,F=(E+I)/2,N=(w+O)/2,L=l-e,D=f-r,V=Math.abs((n-l)*D-(i-f)*L),Y=Math.abs((a-l)*D-(u-f)*L),ie;return g||(g=[{x:e,y:r},{x:l,y:f}],c=1),g.splice(c||g.length-1,0,{x:F,y:N}),(V+Y)*(V+Y)>p*(L*L+D*D)&&(ie=g.length,t(e,r,d,m,E,w,F,N,p,g,c),t(F,N,I,O,b,x,l,f,p,g,c+1+(g.length-ie))),g},ts=function(){function t(r,n,i){df||gf(),this.id=r,this.setData(n,i)}var e=t.prototype;return e.setData=function(n,i){i=i||{},n=n||"0,0,1,1";var a=n.match(Tw),u=1,l=[],f=[],p=i.precision||1,g=p<=1,c,d,m,_,y,b,x,E,w;if(this.data=n,(ww.test(n)||~n.indexOf("M")&&n.indexOf("C")<0)&&(a=yw(n)[0]),c=a.length,c===4)a.unshift(0,0),a.push(1,1),c=8;else if((c-2)%6)throw"Invalid CustomEase";for((+a[0]!=0||+a[c-2]!=1)&&Aw(a,i.height,i.originY),this.segment=a,_=2;_<c;_+=6)d={x:+a[_-2],y:+a[_-1]},m={x:+a[_+4],y:+a[_+5]},l.push(d,m),Ew(d.x,d.y,+a[_],+a[_+1],+a[_+2],+a[_+3],m.x,m.y,1/(p*2e5),l,l.length-1);for(c=l.length,_=0;_<c;_++)x=l[_],E=l[_-1]||x,(x.x>E.x||E.y!==x.y&&E.x===x.x||x===E)&&x.x<=1?(E.cx=x.x-E.x,E.cy=x.y-E.y,E.n=x,E.nx=x.x,g&&_>1&&Math.abs(E.cy/E.cx-l[_-2].cy/l[_-2].cx)>2&&(g=0),E.cx<u&&(E.cx?u=E.cx:(E.cx=.001,_===c-1&&(E.x-=.001,u=Math.min(u,.001),g=0)))):(l.splice(_--,1),c--);if(c=1/u+1|0,y=1/c,b=0,x=l[0],g){for(_=0;_<c;_++)w=_*y,x.nx<w&&(x=l[++b]),d=x.y+(w-x.x)/x.cx*x.cy,f[_]={x:w,cx:y,y:d,cy:0,nx:9},_&&(f[_-1].cy=d-f[_-1].y);f[c-1].cy=l[l.length-1].y-d}else{for(_=0;_<c;_++)x.nx<_*y&&(x=l[++b]),f[_]=x;b<l.length-1&&(f[_-1]=l[l.length-2])}return this.ease=function(I){var O=f[I*c|0]||f[c-1];return O.nx<I&&(O=O.n),O.y+(I-O.x)/O.cx*O.cy},this.ease.custom=this,this.id&&Gt&&Gt.registerEase(this.id,this.ease),this},e.getSVGData=function(n){return t.getSVGData(this,n)},t.create=function(n,i,a){return new t(n,i,a).ease},t.register=function(n){Gt=n,gf()},t.get=function(n){return Gt.parseEase(n)},t.getSVGData=function(n,i){i=i||{};var a=i.width||100,u=i.height||100,l=i.x||0,f=(i.y||0)+u,p=Gt.utils.toArray(i.path)[0],g,c,d,m,_,y,b,x,E,w;if(i.invert&&(u=-u,f=0),typeof n=="string"&&(n=Gt.parseEase(n)),n.custom&&(n=n.custom),n instanceof t)g=xw(vw([n.segment],a,0,0,-u,l,f));else{for(g=[l,f],b=Math.max(5,(i.precision||1)*200),m=1/b,b+=2,x=5/b,E=ta(l+m*a),w=ta(f+n(m)*-u),c=(w-f)/(E-l),d=2;d<b;d++)_=ta(l+d*m*a),y=ta(f+n(d*m)*-u),(Math.abs((y-w)/(_-E)-c)>x||d===b-1)&&(g.push(E,w),c=(y-w)/(_-E)),E=_,w=y;g="M"+g.join(",")}return p&&p.setAttribute("d",g),g},t}();pf()&&Gt.registerPlugin(ts),ts.version="3.11.5",ee.registerPlugin(ts),ts.create("springBounce","0.32, 1.06, 0.61, 0.93"),ee.registerEffect({name:"PULSE",effect(t,e){return ee.timeline().fromTo(t,{width:(e==null?void 0:e.width)*.9,height:(e==null?void 0:e.height)*.9},{width:(e==null?void 0:e.width)*1.1,height:(e==null?void 0:e.height)*1.1,duration:.5,ease:"slow"}).to(t,{...e,duration:.5})}}),ee.registerEffect({name:"SHAKE",effect(t,e){return ee.timeline().to(t,{duration:.1,x:"+=5"}).to(t,{duration:.1,x:"-=10"}).to(t,{duration:.1,x:"+=10"}).to(t,{duration:.1,x:"-=10"}).to(t,{duration:.1,x:"+=5"}).to(t,{...e,duration:.5})}}),ee.registerEffect({name:"SWING",effect(t,e){return ee.timeline().to(t,{duration:.5,rotation:1}).to(t,{duration:.5,rotation:-1}).to(t,{rotation:0,...e,duration:.5})}}),ee.registerEffect({name:"JELLO",effect(t,e){return ee.timeline().to(t,{duration:.3,width:e.width*.5,rotation:-1}).to(t,{duration:.4,width:e.width*1.2,rotation:1}).to(t,{duration:.3,width:e.width,rotation:0}).to(t,{rotation:0,...e,duration:.5})}}),ee.registerEffect({name:"WOOBLE",effect(t,e){return ee.timeline().to(t,{duration:.3,width:e.width*.5,x:e.x*-.5}).to(t,{duration:.3,width:e.width*1.5,x:e.x*1.5}).to(t,{duration:.3,width:e.width*.5,x:e.x*-.01}).to(t,{duration:.3,width:e.width,x:e.x}).to(t,{rotation:0,...e,duration:.5})}}),ee.registerEffect({name:"NONE",effect(t,e){return ee.to(t,{duration:0})}}),ee.registerEffect({name:"FLASH",effect(t,e){return ee.timeline().to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1}).to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1}).to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1,...e})}}),ee.registerEffect({name:"BOUNCE_IN",effect(t,e){return ee.from(t,{...e,duration:2,width:(e==null?void 0:e.width)*1.5,height:(e==null?void 0:e.height)*1.5,ease:"bounce.out"})}}),ee.registerEffect({name:"BOUNCE_IN_DOWN",effect(t,e){return ee.from(t,{...e,duration:2,ease:"bounce.out",y:-1500,alpha:0})}}),ee.registerEffect({name:"BOUNCE_IN_LEFT",effect(t,e){return ee.from(t,{...e,ease:"bounce.out",x:-1500,duration:2,alpha:0})}}),ee.registerEffect({name:"BOUNCE_IN_RIGHT",effect(t,e){return ee.from(t,{...e,ease:"bounce.out",x:1500,duration:2})}}),ee.registerEffect({name:"BOUNCE_IN_UP",effect(t,e){return ee.from(t,{...e,ease:"bounce.out",y:1500,duration:2})}}),ee.registerEffect({name:"BOUNCE_OUT",effect(t,e){return ee.from(t,{...e,ease:"bounce.in",y:2e3,duration:1.5})}}),ee.registerEffect({name:"FADE_IN",effect(t,e){return ee.fromTo(t,{alpha:0},{ease:"power4.in",alpha:1,duration:1,...e})}}),ee.registerEffect({name:"FADE_IN_DOWN",effect(t,e){return ee.fromTo(t,{y:-1e3,alpha:0},{ease:"power4.in",y:0,alpha:1,duration:1,...e})}}),ee.registerEffect({name:"FADE_IN_LEFT",effect(t,e){return ee.fromTo(t,{x:-1e3,alpha:0},{ease:"power4.in",x:0,alpha:1,duration:1,...e})}}),ee.registerEffect({name:"FADE_IN_RIGHT",effect(t,e){return ee.fromTo(t,{x:2e3,alpha:0},{ease:"power4.in",x:0,alpha:1,duration:1,...e})}}),ee.registerEffect({name:"FADE_IN_UP",effect(t,e){return ee.fromTo(t,{y:2e3,alpha:0},{ease:"power4.in",y:0,alpha:1,duration:.8,...e})}}),ee.registerEffect({name:"SPIN",effect(t){return ee.to(t,{rotation:(e,r)=>ee.utils.snap(360,Number(ee.getProperty(r,"rotation"))+360)})}});function Cw(){return{updateEffect:X.useCallback((e,r,n)=>(console.log("useGsapEffect useEffect",r,n),ee.effects[r]&&e?ee.effects[r](e,n):ee.effects.NONE(e,n)),[])}}var du=(t=>(t.NONE="NONE",t.FLASH="FLASH",t.PULSE="PULSE",t.SHAKE="SHAKE",t.SWING="SWING",t.JELLO="JELLO",t.WOOBLE="WOOBLE",t.FADE_IN="FADE_IN",t.FADE_OUT="FADE_OUT",t.FADE_IN_OUT="FADE_IN_OUT",t.SLIDE_IN_LEFT="SLIDE_IN_LEFT",t.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",t.SLIDE_IN_TOP="SLIDE_IN_TOP",t.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",t.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",t.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",t.SLIDE_OUT_TOP="SLIDE_OUT_TOP",t.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",t.ZOOM_IN="ZOOM_IN",t.ZOOM_OUT="ZOOM_OUT",t.ZOOM_IN_OUT="ZOOM_IN_OUT",t.BOUNCE_IN="BOUNCE_IN",t.BOUNCE_OUT="BOUNCE_OUT",t.BOUNCE_IN_OUT="BOUNCE_IN_OUT",t.BOUNCE_IN_DOWN="BOUNCE_IN_DOWN",t.BOUNCE_IN_LEFT="BOUNCE_IN_LEFT",t.BOUNCE_IN_RIGHT="BOUNCE_IN_RIGHT",t.BOUNCE_IN_UP="BOUNCE_IN_UP",t.BOUNCE_OUT_DOWN="BOUNCE_OUT_DOWN",t.BOUNCE_OUT_LEFT="BOUNCE_OUT_LEFT",t.BOUNCE_OUT_RIGHT="BOUNCE_OUT_RIGHT",t.BOUNCE_OUT_UP="BOUNCE_OUT_UP",t.FADE_IN_DOWN="FADE_IN_DOWN",t.FADE_IN_LEFT="FADE_IN_LEFT",t.FADE_IN_RIGHT="FADE_IN_RIGHT",t.FADE_IN_UP="FADE_IN_UP",t.FADE_OUT_DOWN="FADE_OUT_DOWN",t.FADE_OUT_LEFT="FADE_OUT_LEFT",t.FADE_OUT_RIGHT="FADE_OUT_RIGHT",t.FADE_OUT_UP="FADE_OUT_UP",t.ELASTIC_IN="ELASTIC_IN",t.ELASTIC_OUT="ELASTIC_OUT",t.ELASTIC_IN_OUT="ELASTIC_IN_OUT",t.BACK_IN="BACK_IN",t.BACK_OUT="BACK_OUT",t.BACK_IN_OUT="BACK_IN_OUT",t.CIRCULAR_IN="CIRCULAR_IN",t.CIRCULAR_OUT="CIRCULAR_OUT",t.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",t.EXPO_IN="EXPO_IN",t.EXPO_OUT="EXPO_OUT",t.EXPO_IN_OUT="EXPO_IN_OUT",t.SINE_IN="SINE_IN",t.SINE_OUT="SINE_OUT",t.SINE_IN_OUT="SINE_IN_OUT",t.BOUNCE="BOUNCE",t.ELASTIC="ELASTIC",t.BACK="BACK",t.CIRCULAR="CIRCULAR",t.EXPO="EXPO",t.SINE="SINE",t))(du||{});const Iw=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],rn=te.forwardRef((t,e)=>{var Xe,_e,Te,De;const[r,n]=te.useState(!1),[i,a]=X.useState(!1),[u,l]=X.useState(!1),[f,p]=X.useState(),g=ZT(f,1300),c=X.useRef(null),d=X.useRef(null),m=X.useRef(null),_=X.useRef(null),y=X.useRef(null),b=X.useRef(null),{tl:x}=X.useContext(en),{uniqueId:E,visible:w,startAt:I,transformation:{x:O,y:F,width:N,height:L,scale:D=[1,1],rotation:V=0,effect:Y,overlay:ie,animation:j=du.NONE},applyTransformer:G,disabled:ae,pointerdown:se,pointerout:H,pointerover:Q,isText:pe,isDragging:W,isGif:q,onDoubleClick:he,isTextEditMode:fe}=t,me=Cw();ht(Ze.COMPLETE,()=>{c.current}),te.useImperativeHandle(e,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>u}),[i,u]),te.useEffect(()=>{c.current&&n(!0)},[]),te.useEffect(()=>{p({x:O,y:F,width:N,height:L,animation:j})},[j,O,F,N,L,V,D]),te.useEffect(()=>{if(x.current&&g){const{x:Oe,y:we,width:ge,height:tt,animation:oe}=g||{},Ie=me.updateEffect(b.current,oe,{x:Oe,y:we,anchor:.5,width:ge,height:tt,overwrite:!0,onUpdate:()=>{var Ft,Ct;console.log("current image ref location",(Ft=b.current)==null?void 0:Ft.x,(Ct=b.current)==null?void 0:Ct.y)}});y.current&&(x.current.remove(y.current),console.log("killing timeline"),y.current.progress(0).kill()),console.log("startAt Anim",I),x.current.add(Ie,I),y.current=Ie}else console.log("no animation"),y.current&&y.current.progress(0).kill();return()=>{x.current&&y.current&&(x.current.remove(y.current),y.current&&y.current.progress(0).kill())}},[I,g]);const be=te.useCallback(()=>{l(!0),Q&&Q()},[]),Ce=te.useCallback(()=>{a(!0)},[]),$e=te.useCallback(Oe=>{t.onAnchorTransformationEnd&&t.onAnchorTransformationEnd(Oe),a(!1)},[]),ze=Be.withFilters(Be.Container,{matrix:Xt.filters.ColorMatrixFilter});return console.log("render=> imageRef location",(Xe=c.current)==null?void 0:Xe.x,(_e=c.current)==null?void 0:_e.y,O,F,"imagegroup",(Te=m.current)==null?void 0:Te.x,(De=m.current)==null?void 0:De.y),Ae.jsxs(Be.Container,{ref:d,children:[Ae.jsx(Be.Container,{ref:c,position:[O,F],pivot:[O,F],width:N,height:L,scale:D,rotation:V,...!ae&&w&&!i&&!W&&{interactive:!0,buttonMode:!0,pointerdown:se,pointerover:Q,pointerout:H},children:Ae.jsxs(Be.Container,{ref:b,position:[O,F],pivot:[O,F],width:N,height:L,scale:D,children:[!q&&Ae.jsx(ze,{scale:1,apply:({matrix:Oe})=>{Y===Tn.BlackAndWhite?Oe.desaturate():Y===Tn.Sepia?Oe.sepia():Y===Tn.RetroVintage||Y===Tn.NightVision?Oe.negative():Y===Tn.Normal&&Oe.reset()},matrix:{enabled:!0,matrix:Iw},children:Ae.jsx(Be.Container,{ref:m,children:t.children})}),q&&Ae.jsx(Be.Container,{ref:m,children:t.children}),!Qi(ie)&&ie!==fu.NONE&&ie!==fu.NORMAL&&Ae.jsx(fw,{overlay:ie,width:N,height:L,x:O,y:F})]})}),G&&w&&!fe&&Ae.jsx(Pv,{pixiTransformerRef:_,imageRef:c,isMounted:r,transformCommit:$e,transformChange:Ce,mouseoverEvent:be,uniqueId:E,isText:pe,onDoubleClick:he})]})});rn.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var Sn=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))(Sn||{}),mf=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(mf||{}),pu=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(pu||{}),de=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR",t))(de||{}),nn=(t=>(t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN",t))(nn||{}),Z=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(Z||{}),si=(t=>(t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t))(si||{}),Ge=(t=>(t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT",t))(Ge||{}),gu=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(gu||{}),Pr=(t=>(t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR",t))(Pr||{}),rs=(t=>(t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t))(rs||{}),An=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(An||{}),sn=(t=>(t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",t))(sn||{}),En=(t=>(t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT",t))(En||{}),mu=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(mu||{}),tr=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(tr||{}),_t=(t=>(t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE",t[t.COLOR=4]="COLOR",t))(_t||{}),vt=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(vt||{}),Mr=(t=>(t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t))(Mr||{});const Re={ADAPTER:{createCanvas:(t,e)=>{const r=document.createElement("canvas");return r.width=t,r.height=e,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var vu=/iPhone/i,vf=/iPod/i,_f=/iPad/i,yf=/\biOS-universal(?:.+)Mac\b/i,_u=/\bAndroid(?:.+)Mobile\b/i,xf=/Android/i,ai=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ra=/Silk/i,Ur=/Windows Phone/i,bf=/\bWindows(?:.+)ARM\b/i,Tf=/BlackBerry/i,wf=/BB10/i,Sf=/Opera Mini/i,Af=/\b(CriOS|Chrome)(?:.+)Mobile/i,Ef=/Mobile(?:.+)Firefox\b/i,Cf=function(t){return typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream>"u"};function Rw(t){return function(e){return e.test(t)}}function If(t){var e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});var r=e.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=Rw(r),a={apple:{phone:i(vu)&&!i(Ur),ipod:i(vf),tablet:!i(vu)&&(i(_f)||Cf(e))&&!i(Ur),universal:i(yf),device:(i(vu)||i(vf)||i(_f)||i(yf)||Cf(e))&&!i(Ur)},amazon:{phone:i(ai),tablet:!i(ai)&&i(ra),device:i(ai)||i(ra)},android:{phone:!i(Ur)&&i(ai)||!i(Ur)&&i(_u),tablet:!i(Ur)&&!i(ai)&&!i(_u)&&(i(ra)||i(xf)),device:!i(Ur)&&(i(ai)||i(ra)||i(_u)||i(xf))||i(/\bokhttp\b/i)},windows:{phone:i(Ur),tablet:i(bf),device:i(Ur)||i(bf)},other:{blackberry:i(Tf),blackberry10:i(wf),opera:i(Sf),firefox:i(Ef),chrome:i(Af),device:i(Tf)||i(wf)||i(Sf)||i(Ef)||i(Af)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}const oi=(If.default??If)(globalThis.navigator);Re.RETINA_PREFIX=/@([0-9\.]+)x/,Re.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Rf={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,p,g){this.fn=f,this.context=p,this.once=g||!1}function a(f,p,g,c,d){if(typeof g!="function")throw new TypeError("The listener must be a function");var m=new i(g,c||f,d),_=r?r+p:p;return f._events[_]?f._events[_].fn?f._events[_]=[f._events[_],m]:f._events[_].push(m):(f._events[_]=m,f._eventsCount++),f}function u(f,p){--f._eventsCount===0?f._events=new n:delete f._events[p]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var p=[],g,c;if(this._eventsCount===0)return p;for(c in g=this._events)e.call(g,c)&&p.push(r?c.slice(1):c);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(g)):p},l.prototype.listeners=function(p){var g=r?r+p:p,c=this._events[g];if(!c)return[];if(c.fn)return[c.fn];for(var d=0,m=c.length,_=new Array(m);d<m;d++)_[d]=c[d].fn;return _},l.prototype.listenerCount=function(p){var g=r?r+p:p,c=this._events[g];return c?c.fn?1:c.length:0},l.prototype.emit=function(p,g,c,d,m,_){var y=r?r+p:p;if(!this._events[y])return!1;var b=this._events[y],x=arguments.length,E,w;if(b.fn){switch(b.once&&this.removeListener(p,b.fn,void 0,!0),x){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,g),!0;case 3:return b.fn.call(b.context,g,c),!0;case 4:return b.fn.call(b.context,g,c,d),!0;case 5:return b.fn.call(b.context,g,c,d,m),!0;case 6:return b.fn.call(b.context,g,c,d,m,_),!0}for(w=1,E=new Array(x-1);w<x;w++)E[w-1]=arguments[w];b.fn.apply(b.context,E)}else{var I=b.length,O;for(w=0;w<I;w++)switch(b[w].once&&this.removeListener(p,b[w].fn,void 0,!0),x){case 1:b[w].fn.call(b[w].context);break;case 2:b[w].fn.call(b[w].context,g);break;case 3:b[w].fn.call(b[w].context,g,c);break;case 4:b[w].fn.call(b[w].context,g,c,d);break;default:if(!E)for(O=1,E=new Array(x-1);O<x;O++)E[O-1]=arguments[O];b[w].fn.apply(b[w].context,E)}}return!0},l.prototype.on=function(p,g,c){return a(this,p,g,c,!1)},l.prototype.once=function(p,g,c){return a(this,p,g,c,!0)},l.prototype.removeListener=function(p,g,c,d){var m=r?r+p:p;if(!this._events[m])return this;if(!g)return u(this,m),this;var _=this._events[m];if(_.fn)_.fn===g&&(!d||_.once)&&(!c||_.context===c)&&u(this,m);else{for(var y=0,b=[],x=_.length;y<x;y++)(_[y].fn!==g||d&&!_[y].once||c&&_[y].context!==c)&&b.push(_[y]);b.length?this._events[m]=b.length===1?b[0]:b:u(this,m)}return this},l.prototype.removeAllListeners=function(p){var g;return p?(g=r?r+p:p,this._events[g]&&u(this,g)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l})(Rf);var Pw=Rf.exports;const na=bn(Pw);var yu={exports:{}};yu.exports=ia,yu.exports.default=ia;function ia(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,a=Pf(t,0,i,r,!0),u=[];if(!a||a.next===a.prev)return u;var l,f,p,g,c,d,m;if(n&&(a=Lw(t,e,a,r)),t.length>80*r){l=p=t[0],f=g=t[1];for(var _=r;_<i;_+=r)c=t[_],d=t[_+1],c<l&&(l=c),d<f&&(f=d),c>p&&(p=c),d>g&&(g=d);m=Math.max(p-l,g-f),m=m!==0?32767/m:0}return ns(a,u,r,l,f,m,0),u}function Pf(t,e,r,n,i){var a,u;if(i===Tu(t,e,r,n)>0)for(a=e;a<r;a+=n)u=Ff(a,t[a],t[a+1],u);else for(a=r-n;a>=e;a-=n)u=Ff(a,t[a],t[a+1],u);return u&&sa(u,u.next)&&(ss(u),u=u.next),u}function Cn(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(sa(r,r.next)||ot(r.prev,r,r.next)===0)){if(ss(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function ns(t,e,r,n,i,a,u){if(t){!u&&a&&$w(t,n,i,a);for(var l=t,f,p;t.prev!==t.next;){if(f=t.prev,p=t.next,a?Ow(t,n,i,a):Mw(t)){e.push(f.i/r|0),e.push(t.i/r|0),e.push(p.i/r|0),ss(t),t=p.next,l=p.next;continue}if(t=p,t===l){u?u===1?(t=Fw(Cn(t),e,r),ns(t,e,r,n,i,a,2)):u===2&&Nw(t,e,r,n,i,a):ns(Cn(t),e,r,n,i,a,1);break}}}}function Mw(t){var e=t.prev,r=t,n=t.next;if(ot(e,r,n)>=0)return!1;for(var i=e.x,a=r.x,u=n.x,l=e.y,f=r.y,p=n.y,g=i<a?i<u?i:u:a<u?a:u,c=l<f?l<p?l:p:f<p?f:p,d=i>a?i>u?i:u:a>u?a:u,m=l>f?l>p?l:p:f>p?f:p,_=n.next;_!==e;){if(_.x>=g&&_.x<=d&&_.y>=c&&_.y<=m&&ui(i,l,a,f,u,p,_.x,_.y)&&ot(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function Ow(t,e,r,n){var i=t.prev,a=t,u=t.next;if(ot(i,a,u)>=0)return!1;for(var l=i.x,f=a.x,p=u.x,g=i.y,c=a.y,d=u.y,m=l<f?l<p?l:p:f<p?f:p,_=g<c?g<d?g:d:c<d?c:d,y=l>f?l>p?l:p:f>p?f:p,b=g>c?g>d?g:d:c>d?c:d,x=xu(m,_,e,r,n),E=xu(y,b,e,r,n),w=t.prevZ,I=t.nextZ;w&&w.z>=x&&I&&I.z<=E;){if(w.x>=m&&w.x<=y&&w.y>=_&&w.y<=b&&w!==i&&w!==u&&ui(l,g,f,c,p,d,w.x,w.y)&&ot(w.prev,w,w.next)>=0||(w=w.prevZ,I.x>=m&&I.x<=y&&I.y>=_&&I.y<=b&&I!==i&&I!==u&&ui(l,g,f,c,p,d,I.x,I.y)&&ot(I.prev,I,I.next)>=0))return!1;I=I.nextZ}for(;w&&w.z>=x;){if(w.x>=m&&w.x<=y&&w.y>=_&&w.y<=b&&w!==i&&w!==u&&ui(l,g,f,c,p,d,w.x,w.y)&&ot(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;I&&I.z<=E;){if(I.x>=m&&I.x<=y&&I.y>=_&&I.y<=b&&I!==i&&I!==u&&ui(l,g,f,c,p,d,I.x,I.y)&&ot(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function Fw(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!sa(i,a)&&Mf(i,n,n.next,a)&&is(i,a)&&is(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),ss(n),ss(n.next),n=t=a),n=n.next}while(n!==t);return Cn(n)}function Nw(t,e,r,n,i,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&zw(u,l)){var f=Of(u,l);u=Cn(u,u.next),f=Cn(f,f.next),ns(u,e,r,n,i,a,0),ns(f,e,r,n,i,a,0);return}l=l.next}u=u.next}while(u!==t)}function Lw(t,e,r,n){var i=[],a,u,l,f,p;for(a=0,u=e.length;a<u;a++)l=e[a]*n,f=a<u-1?e[a+1]*n:t.length,p=Pf(t,l,f,n,!1),p===p.next&&(p.steiner=!0),i.push(Hw(p));for(i.sort(kw),a=0;a<i.length;a++)r=Dw(i[a],r);return r}function kw(t,e){return t.x-e.x}function Dw(t,e){var r=Bw(t,e);if(!r)return e;var n=Of(r,t);return Cn(n,n.next),Cn(r,r.next)}function Bw(t,e){var r=e,n=t.x,i=t.y,a=-1/0,u;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var l=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=n&&l>a&&(a=l,u=r.x<r.next.x?r:r.next,l===n))return u}r=r.next}while(r!==e);if(!u)return null;var f=u,p=u.x,g=u.y,c=1/0,d;r=u;do n>=r.x&&r.x>=p&&n!==r.x&&ui(i<g?n:a,i,p,g,i<g?a:n,i,r.x,r.y)&&(d=Math.abs(i-r.y)/(n-r.x),is(r,t)&&(d<c||d===c&&(r.x>u.x||r.x===u.x&&Uw(u,r)))&&(u=r,c=d)),r=r.next;while(r!==f);return u}function Uw(t,e){return ot(t.prev,t,e.prev)<0&&ot(e.next,t,t.next)<0}function $w(t,e,r,n){var i=t;do i.z===0&&(i.z=xu(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,Gw(i)}function Gw(t){var e,r,n,i,a,u,l,f,p=1;do{for(r=t,t=null,a=null,u=0;r;){for(u++,n=r,l=0,e=0;e<p&&(l++,n=n.nextZ,!!n);e++);for(f=p;l>0||f>0&&n;)l!==0&&(f===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,l--):(i=n,n=n.nextZ,f--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,p*=2}while(u>1);return t}function xu(t,e,r,n,i){return t=(t-r)*i|0,e=(e-n)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function Hw(t){var e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}function ui(t,e,r,n,i,a,u,l){return(i-u)*(e-l)>=(t-u)*(a-l)&&(t-u)*(n-l)>=(r-u)*(e-l)&&(r-u)*(a-l)>=(i-u)*(n-l)}function zw(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Vw(t,e)&&(is(t,e)&&is(e,t)&&jw(t,e)&&(ot(t.prev,t,e.prev)||ot(t,e.prev,e))||sa(t,e)&&ot(t.prev,t,t.next)>0&&ot(e.prev,e,e.next)>0)}function ot(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function sa(t,e){return t.x===e.x&&t.y===e.y}function Mf(t,e,r,n){var i=oa(ot(t,e,r)),a=oa(ot(t,e,n)),u=oa(ot(r,n,t)),l=oa(ot(r,n,e));return!!(i!==a&&u!==l||i===0&&aa(t,r,e)||a===0&&aa(t,n,e)||u===0&&aa(r,t,n)||l===0&&aa(r,e,n))}function aa(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function oa(t){return t>0?1:t<0?-1:0}function Vw(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Mf(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function is(t,e){return ot(t.prev,t,t.next)<0?ot(t,e,t.next)>=0&&ot(t,t.prev,e)>=0:ot(t,e,t.prev)<0||ot(t,t.next,e)<0}function jw(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function Of(t,e){var r=new bu(t.i,t.x,t.y),n=new bu(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Ff(t,e,r,n){var i=new bu(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ss(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function bu(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}ia.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,u=Math.abs(Tu(t,0,a,r));if(i)for(var l=0,f=e.length;l<f;l++){var p=e[l]*r,g=l<f-1?e[l+1]*r:t.length;u-=Math.abs(Tu(t,p,g,r))}var c=0;for(l=0;l<n.length;l+=3){var d=n[l]*r,m=n[l+1]*r,_=n[l+2]*r;c+=Math.abs((t[d]-t[_])*(t[m+1]-t[d+1])-(t[d]-t[m])*(t[_+1]-t[d+1]))}return u===0&&c===0?0:Math.abs((c-u)/u)};function Tu(t,e,r,n){for(var i=0,a=e,u=r-n;a<r;a+=n)i+=(t[u]-t[a])*(t[a+1]+t[u+1]),u=a;return i}ia.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var u=0;u<e;u++)r.vertices.push(t[i][a][u]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r};var Xw=yu.exports;const Ww=bn(Xw);var ua={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */ua.exports,function(t,e){(function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,a=typeof At=="object"&&At;(a.global===a||a.window===a||a.self===a)&&(r=a);var u,l=2147483647,f=36,p=1,g=26,c=38,d=700,m=72,_=128,y="-",b=/^xn--/,x=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=f-p,O=Math.floor,F=String.fromCharCode,N;function L(W){throw new RangeError(w[W])}function D(W,q){for(var he=W.length,fe=[];he--;)fe[he]=q(W[he]);return fe}function V(W,q){var he=W.split("@"),fe="";he.length>1&&(fe=he[0]+"@",W=he[1]),W=W.replace(E,".");var me=W.split("."),be=D(me,q).join(".");return fe+be}function Y(W){for(var q=[],he=0,fe=W.length,me,be;he<fe;)me=W.charCodeAt(he++),me>=55296&&me<=56319&&he<fe?(be=W.charCodeAt(he++),(be&64512)==56320?q.push(((me&1023)<<10)+(be&1023)+65536):(q.push(me),he--)):q.push(me);return q}function ie(W){return D(W,function(q){var he="";return q>65535&&(q-=65536,he+=F(q>>>10&1023|55296),q=56320|q&1023),he+=F(q),he}).join("")}function j(W){return W-48<10?W-22:W-65<26?W-65:W-97<26?W-97:f}function G(W,q){return W+22+75*(W<26)-((q!=0)<<5)}function ae(W,q,he){var fe=0;for(W=he?O(W/d):W>>1,W+=O(W/q);W>I*g>>1;fe+=f)W=O(W/I);return O(fe+(I+1)*W/(W+c))}function se(W){var q=[],he=W.length,fe,me=0,be=_,Ce=m,$e,ze,Xe,_e,Te,De,Oe,we,ge;for($e=W.lastIndexOf(y),$e<0&&($e=0),ze=0;ze<$e;++ze)W.charCodeAt(ze)>=128&&L("not-basic"),q.push(W.charCodeAt(ze));for(Xe=$e>0?$e+1:0;Xe<he;){for(_e=me,Te=1,De=f;Xe>=he&&L("invalid-input"),Oe=j(W.charCodeAt(Xe++)),(Oe>=f||Oe>O((l-me)/Te))&&L("overflow"),me+=Oe*Te,we=De<=Ce?p:De>=Ce+g?g:De-Ce,!(Oe<we);De+=f)ge=f-we,Te>O(l/ge)&&L("overflow"),Te*=ge;fe=q.length+1,Ce=ae(me-_e,fe,_e==0),O(me/fe)>l-be&&L("overflow"),be+=O(me/fe),me%=fe,q.splice(me++,0,be)}return ie(q)}function H(W){var q,he,fe,me,be,Ce,$e,ze,Xe,_e,Te,De=[],Oe,we,ge,tt;for(W=Y(W),Oe=W.length,q=_,he=0,be=m,Ce=0;Ce<Oe;++Ce)Te=W[Ce],Te<128&&De.push(F(Te));for(fe=me=De.length,me&&De.push(y);fe<Oe;){for($e=l,Ce=0;Ce<Oe;++Ce)Te=W[Ce],Te>=q&&Te<$e&&($e=Te);for(we=fe+1,$e-q>O((l-he)/we)&&L("overflow"),he+=($e-q)*we,q=$e,Ce=0;Ce<Oe;++Ce)if(Te=W[Ce],Te<q&&++he>l&&L("overflow"),Te==q){for(ze=he,Xe=f;_e=Xe<=be?p:Xe>=be+g?g:Xe-be,!(ze<_e);Xe+=f)tt=ze-_e,ge=f-_e,De.push(F(G(_e+tt%ge,0))),ze=O(tt/ge);De.push(F(G(ze,0))),be=ae(he,we,fe==me),he=0,++fe}++he,++q}return De.join("")}function Q(W){return V(W,function(q){return b.test(q)?se(q.slice(4).toLowerCase()):q})}function pe(W){return V(W,function(q){return x.test(q)?"xn--"+H(q):q})}if(u={version:"1.4.1",ucs2:{decode:Y,encode:ie},decode:se,encode:H,toASCII:pe,toUnicode:Q},n&&i)if(t.exports==n)i.exports=u;else for(N in u)u.hasOwnProperty(N)&&(n[N]=u[N]);else r.punycode=u})(At)}(ua,ua.exports);var qw=ua.exports,Yw=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,r);if(u.value!==i||u.enumerable!==!0)return!1}return!0},Nf=typeof Symbol<"u"&&Symbol,Kw=Yw,Zw=function(){return typeof Nf!="function"||typeof Symbol!="function"||typeof Nf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Kw()},Lf={foo:{}},Qw=Object,Jw=function(){return{__proto__:Lf}.foo===Lf.foo&&!({__proto__:null}instanceof Qw)},eS="Function.prototype.bind called on incompatible ",wu=Array.prototype.slice,tS=Object.prototype.toString,rS="[object Function]",nS=function(e){var r=this;if(typeof r!="function"||tS.call(r)!==rS)throw new TypeError(eS+r);for(var n=wu.call(arguments,1),i,a=function(){if(this instanceof i){var g=r.apply(this,n.concat(wu.call(arguments)));return Object(g)===g?g:this}else return r.apply(e,n.concat(wu.call(arguments)))},u=Math.max(0,r.length-n.length),l=[],f=0;f<u;f++)l.push("$"+f);if(i=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var p=function(){};p.prototype=r.prototype,i.prototype=new p,p.prototype=null}return i},iS=nS,Su=Function.prototype.bind||iS,sS=Su,aS=sS.call(Function.call,Object.prototype.hasOwnProperty),Me,li=SyntaxError,kf=Function,ci=TypeError,Au=function(t){try{return kf('"use strict"; return ('+t+").constructor;")()}catch{}},In=Object.getOwnPropertyDescriptor;if(In)try{In({},"")}catch{In=null}var Eu=function(){throw new ci},oS=In?function(){try{return arguments.callee,Eu}catch{try{return In(arguments,"callee").get}catch{return Eu}}}():Eu,hi=Zw(),uS=Jw(),bt=Object.getPrototypeOf||(uS?function(t){return t.__proto__}:null),fi={},lS=typeof Uint8Array>"u"||!bt?Me:bt(Uint8Array),Rn={"%AggregateError%":typeof AggregateError>"u"?Me:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Me:ArrayBuffer,"%ArrayIteratorPrototype%":hi&&bt?bt([][Symbol.iterator]()):Me,"%AsyncFromSyncIteratorPrototype%":Me,"%AsyncFunction%":fi,"%AsyncGenerator%":fi,"%AsyncGeneratorFunction%":fi,"%AsyncIteratorPrototype%":fi,"%Atomics%":typeof Atomics>"u"?Me:Atomics,"%BigInt%":typeof BigInt>"u"?Me:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Me:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Me:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Me:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Me:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Me:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Me:FinalizationRegistry,"%Function%":kf,"%GeneratorFunction%":fi,"%Int8Array%":typeof Int8Array>"u"?Me:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Me:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Me:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hi&&bt?bt(bt([][Symbol.iterator]())):Me,"%JSON%":typeof JSON=="object"?JSON:Me,"%Map%":typeof Map>"u"?Me:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hi||!bt?Me:bt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Me:Promise,"%Proxy%":typeof Proxy>"u"?Me:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Me:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Me:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hi||!bt?Me:bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Me:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hi&&bt?bt(""[Symbol.iterator]()):Me,"%Symbol%":hi?Symbol:Me,"%SyntaxError%":li,"%ThrowTypeError%":oS,"%TypedArray%":lS,"%TypeError%":ci,"%Uint8Array%":typeof Uint8Array>"u"?Me:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Me:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Me:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Me:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Me:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Me:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Me:WeakSet};if(bt)try{null.error}catch(t){var cS=bt(bt(t));Rn["%Error.prototype%"]=cS}var hS=function t(e){var r;if(e==="%AsyncFunction%")r=Au("async function () {}");else if(e==="%GeneratorFunction%")r=Au("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Au("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&bt&&(r=bt(i.prototype))}return Rn[e]=r,r},Df={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},as=Su,la=aS,fS=as.call(Function.call,Array.prototype.concat),dS=as.call(Function.apply,Array.prototype.splice),Bf=as.call(Function.call,String.prototype.replace),ca=as.call(Function.call,String.prototype.slice),pS=as.call(Function.call,RegExp.prototype.exec),gS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mS=/\\(\\)?/g,vS=function(e){var r=ca(e,0,1),n=ca(e,-1);if(r==="%"&&n!=="%")throw new li("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new li("invalid intrinsic syntax, expected opening `%`");var i=[];return Bf(e,gS,function(a,u,l,f){i[i.length]=l?Bf(f,mS,"$1"):u||a}),i},_S=function(e,r){var n=e,i;if(la(Df,n)&&(i=Df[n],n="%"+i[0]+"%"),la(Rn,n)){var a=Rn[n];if(a===fi&&(a=hS(n)),typeof a>"u"&&!r)throw new ci("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new li("intrinsic "+e+" does not exist!")},Cu=function(e,r){if(typeof e!="string"||e.length===0)throw new ci("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ci('"allowMissing" argument must be a boolean');if(pS(/^%?[^%]*%?$/,e)===null)throw new li("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=vS(e),i=n.length>0?n[0]:"",a=_S("%"+i+"%",r),u=a.name,l=a.value,f=!1,p=a.alias;p&&(i=p[0],dS(n,fS([0,1],p)));for(var g=1,c=!0;g<n.length;g+=1){var d=n[g],m=ca(d,0,1),_=ca(d,-1);if((m==='"'||m==="'"||m==="`"||_==='"'||_==="'"||_==="`")&&m!==_)throw new li("property names with quotes must have matching quotes");if((d==="constructor"||!c)&&(f=!0),i+="."+d,u="%"+i+"%",la(Rn,u))l=Rn[u];else if(l!=null){if(!(d in l)){if(!r)throw new ci("base intrinsic for "+e+" exists, but the property is not available.");return}if(In&&g+1>=n.length){var y=In(l,d);c=!!y,c&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[d]}else c=la(l,d),l=l[d];c&&!f&&(Rn[u]=l)}}return l},Uf={exports:{}};(function(t){var e=Su,r=Cu,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(i,n),u=r("%Object.getOwnPropertyDescriptor%",!0),l=r("%Object.defineProperty%",!0),f=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(c){var d=a(e,i,arguments);if(u&&l){var m=u(d,"length");m.configurable&&l(d,"length",{value:1+f(0,c.length-(arguments.length-1))})}return d};var p=function(){return a(e,n,arguments)};l?l(t.exports,"apply",{value:p}):t.exports.apply=p})(Uf);var yS=Uf.exports,$f=Cu,Gf=yS,xS=Gf($f("String.prototype.indexOf")),bS=function(e,r){var n=$f(e,!!r);return typeof n=="function"&&xS(e,".prototype.")>-1?Gf(n):n};const TS=bv(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Iu=typeof Map=="function"&&Map.prototype,Ru=Object.getOwnPropertyDescriptor&&Iu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ha=Iu&&Ru&&typeof Ru.get=="function"?Ru.get:null,Hf=Iu&&Map.prototype.forEach,Pu=typeof Set=="function"&&Set.prototype,Mu=Object.getOwnPropertyDescriptor&&Pu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,fa=Pu&&Mu&&typeof Mu.get=="function"?Mu.get:null,zf=Pu&&Set.prototype.forEach,wS=typeof WeakMap=="function"&&WeakMap.prototype,os=wS?WeakMap.prototype.has:null,SS=typeof WeakSet=="function"&&WeakSet.prototype,us=SS?WeakSet.prototype.has:null,AS=typeof WeakRef=="function"&&WeakRef.prototype,Vf=AS?WeakRef.prototype.deref:null,ES=Boolean.prototype.valueOf,CS=Object.prototype.toString,IS=Function.prototype.toString,RS=String.prototype.match,Ou=String.prototype.slice,an=String.prototype.replace,PS=String.prototype.toUpperCase,jf=String.prototype.toLowerCase,Xf=RegExp.prototype.test,Wf=Array.prototype.concat,Or=Array.prototype.join,MS=Array.prototype.slice,qf=Math.floor,Fu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Nu=Object.getOwnPropertySymbols,Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,di=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Pt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===di||"symbol")?Symbol.toStringTag:null,Yf=Object.prototype.propertyIsEnumerable,Kf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Zf(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Xf.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-qf(-t):qf(t);if(n!==t){var i=String(n),a=Ou.call(e,i.length+1);return an.call(i,r,"$&_")+"."+an.call(an.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return an.call(e,r,"$&_")}var ku=TS,Qf=ku.custom,Jf=rd(Qf)?Qf:null,OS=function t(e,r,n,i){var a=r||{};if(on(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(on(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=on(a,"customInspect")?a.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(on(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(on(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return id(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return l?Zf(e,f):f}if(typeof e=="bigint"){var p=String(e)+"n";return l?Zf(e,p):p}var g=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=g&&g>0&&typeof e=="object")return Du(e)?"[Array]":"[Object]";var c=KS(a,n);if(typeof i>"u")i=[];else if(nd(i,e)>=0)return"[Circular]";function d(j,G,ae){if(G&&(i=MS.call(i),i.push(G)),ae){var se={depth:a.depth};return on(a,"quoteStyle")&&(se.quoteStyle=a.quoteStyle),t(j,se,n+1,i)}return t(j,a,n+1,i)}if(typeof e=="function"&&!td(e)){var m=GS(e),_=da(e,d);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(_.length>0?" { "+Or.call(_,", ")+" }":"")}if(rd(e)){var y=di?an.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Lu.call(e);return typeof e=="object"&&!di?ls(y):y}if(WS(e)){for(var b="<"+jf.call(String(e.nodeName)),x=e.attributes||[],E=0;E<x.length;E++)b+=" "+x[E].name+"="+ed(FS(x[E].value),"double",a);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+="</"+jf.call(String(e.nodeName))+">",b}if(Du(e)){if(e.length===0)return"[]";var w=da(e,d);return c&&!YS(w)?"["+Uu(w,c)+"]":"[ "+Or.call(w,", ")+" ]"}if(LS(e)){var I=da(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!Yf.call(e,"cause")?"{ ["+String(e)+"] "+Or.call(Wf.call("[cause]: "+d(e.cause),I),", ")+" }":I.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Or.call(I,", ")+" }"}if(typeof e=="object"&&u){if(Jf&&typeof e[Jf]=="function"&&ku)return ku(e,{depth:g-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(HS(e)){var O=[];return Hf&&Hf.call(e,function(j,G){O.push(d(G,e,!0)+" => "+d(j,e))}),sd("Map",ha.call(e),O,c)}if(jS(e)){var F=[];return zf&&zf.call(e,function(j){F.push(d(j,e))}),sd("Set",fa.call(e),F,c)}if(zS(e))return Bu("WeakMap");if(XS(e))return Bu("WeakSet");if(VS(e))return Bu("WeakRef");if(DS(e))return ls(d(Number(e)));if(US(e))return ls(d(Fu.call(e)));if(BS(e))return ls(ES.call(e));if(kS(e))return ls(d(String(e)));if(!NS(e)&&!td(e)){var N=da(e,d),L=Kf?Kf(e)===Object.prototype:e instanceof Object||e.constructor===Object,D=e instanceof Object?"":"null prototype",V=!L&&Pt&&Object(e)===e&&Pt in e?Ou.call(un(e),8,-1):D?"Object":"",Y=L||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ie=Y+(V||D?"["+Or.call(Wf.call([],V||[],D||[]),": ")+"] ":"");return N.length===0?ie+"{}":c?ie+"{"+Uu(N,c)+"}":ie+"{ "+Or.call(N,", ")+" }"}return String(e)};function ed(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function FS(t){return an.call(String(t),/"/g,"&quot;")}function Du(t){return un(t)==="[object Array]"&&(!Pt||!(typeof t=="object"&&Pt in t))}function NS(t){return un(t)==="[object Date]"&&(!Pt||!(typeof t=="object"&&Pt in t))}function td(t){return un(t)==="[object RegExp]"&&(!Pt||!(typeof t=="object"&&Pt in t))}function LS(t){return un(t)==="[object Error]"&&(!Pt||!(typeof t=="object"&&Pt in t))}function kS(t){return un(t)==="[object String]"&&(!Pt||!(typeof t=="object"&&Pt in t))}function DS(t){return un(t)==="[object Number]"&&(!Pt||!(typeof t=="object"&&Pt in t))}function BS(t){return un(t)==="[object Boolean]"&&(!Pt||!(typeof t=="object"&&Pt in t))}function rd(t){if(di)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Lu)return!1;try{return Lu.call(t),!0}catch{}return!1}function US(t){if(!t||typeof t!="object"||!Fu)return!1;try{return Fu.call(t),!0}catch{}return!1}var $S=Object.prototype.hasOwnProperty||function(t){return t in this};function on(t,e){return $S.call(t,e)}function un(t){return CS.call(t)}function GS(t){if(t.name)return t.name;var e=RS.call(IS.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function nd(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function HS(t){if(!ha||!t||typeof t!="object")return!1;try{ha.call(t);try{fa.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function zS(t){if(!os||!t||typeof t!="object")return!1;try{os.call(t,os);try{us.call(t,us)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function VS(t){if(!Vf||!t||typeof t!="object")return!1;try{return Vf.call(t),!0}catch{}return!1}function jS(t){if(!fa||!t||typeof t!="object")return!1;try{fa.call(t);try{ha.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function XS(t){if(!us||!t||typeof t!="object")return!1;try{us.call(t,us);try{os.call(t,os)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function WS(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function id(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return id(Ou.call(t,0,e.maxStringLength),e)+n}var i=an.call(an.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,qS);return ed(i,"single",e)}function qS(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+PS.call(e.toString(16))}function ls(t){return"Object("+t+")"}function Bu(t){return t+" { ? }"}function sd(t,e,r,n){var i=n?Uu(r,n):Or.call(r,", ");return t+" ("+e+") {"+i+"}"}function YS(t){for(var e=0;e<t.length;e++)if(nd(t[e],`
26
- `)>=0)return!1;return!0}function KS(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Or.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Or.call(Array(e+1),r)}}function Uu(t,e){if(t.length===0)return"";var r=`
9
+ */var Tv=W,wv=Symbol.for("react.element"),Sv=Symbol.for("react.fragment"),Av=Object.prototype.hasOwnProperty,Ev=Tv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Cv={key:!0,ref:!0,__self:!0,__source:!0};function yh(t,e,r){var n,i={},a=null,u=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(u=e.ref);for(n in e)Av.call(e,n)&&!Cv.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:wv,type:t,key:a,ref:u,props:i,_owner:Ev.current}}Hs.Fragment=Sv,Hs.jsx=yh,Hs.jsxs=yh,_h.exports=Hs;var we=_h.exports,xn=(t=>(t.BlackAndWhite="BlackAndWhite",t.Sepia="Sepia",t.RetroVintage="RetroVintage",t.NightVision="NightVision",t.Normal="Normal",t.Vignette="Vignette",t.None="Normal",t))(xn||{});let xh;function bh(){return xh=document.body,xh}function ht(t,e,r){let n;return W.useEffect(()=>{n=n||bh();const i=a=>{const u=a.detail;e(u)};return n.addEventListener(t,i,!1),()=>{n==null||n.removeEventListener(t,i,!1)}},r),i=>{n=i}}function Qn(t,e){const r=bh(),n=new CustomEvent(t,{detail:e});r.dispatchEvent(n)}function Iv(){let t;function e(r){t=r}return e.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});t==null||t.dispatchEvent(i)},e}const bn=re.createContext({}),Ye={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE",SCRUBBER_CLICKED:"GSAP_SCRUBBER_CLICKED",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},Rv=({children:t})=>{const[e,r]=W.useState(0),n=W.useRef(),i=W.useRef(),a=W.useRef(.001),u=W.useRef(!1),l=W.useRef(!1),[h,p]=W.useState(!1);W.useLayoutEffect(()=>(i.current=ee.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&ee.killTweensOf(n.current),n.current=ee.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&n.current.revert(),i.current.revert()}),[]);const g=W.useCallback(()=>{if(n.current){let I=n.current.time();I<a.current?u.current=!0:u.current=!1,a.current=I}},[]);W.useEffect(()=>{if(n.current){const w=n.current;w.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){w.pause(),g()}).eventCallback("onUpdate",function(){g()}).eventCallback("onRepeat",function(){console.log("onrepeat",w.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",w.progress())}).eventCallback("onComplete",function(){w.seek(0),w.pause(),Qn(Ye.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),g()})}},[]);const c=W.useCallback(()=>{n.current&&n.current.revert()},[]),d=W.useCallback(()=>{n.current&&n.current.restart()},[]),m=W.useCallback(()=>{if(n.current){const w=n.current;w.repeat(1),w.restart()}},[]),_=W.useCallback(w=>{n.current&&n.current.seek(w)},[]),y=W.useCallback(()=>{n.current&&n.current.seek(4)},[]),b=W.useCallback(()=>{const w=n.current;return w?w.totalDuration():0},[]),x=()=>{n.current&&(n.current.pause(),Qn(Ye.PAUSE))},E=()=>{n.current&&(n.current.resume(),Qn(Ye.RESUME))};return ht(Ye.SEEK_START,()=>{l.current=!0}),ht(Ye.SCRUBBER_PLAY,()=>{E()}),ht(Ye.SCRUBBER_PAUSE,()=>{x()}),ht(Ye.SCRUBBER_SEEK,w=>{_(w)}),ht(Ye.SEEK_END,()=>{l.current=!1}),ht(Ye.REVERSE_MODE_START,()=>{u.current=!0}),ht(Ye.REVERSE_MODE_END,()=>{u.current=!1}),ht(Ye.SCRUBBER_PROGRESS_UPDATE,w=>{}),we.jsx(bn.Provider,{value:{gsapCtx:i,tl:n,handlePlay:E,handlePause:x,handleReset:c,handleSeek:_,handleSeekTest:y,handleRestart:d,handleRepeat:m,playerTimeRef:a,getTimelineDuration:b,totalDuration:e,setTotalDuration:r,reverseModeRef:u,dragModeRef:l,isRemotion:h,setIsRemotion:p},children:t})},Pv=({pixiTransformerRef:t,imageRef:e,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:h=!1})=>{const p=jt.utils.string2hex("#F3C409"),g=jt.utils.string2hex("#F3C409"),c=re.useRef({isDragging:!1}),d=300,m=re.useRef(0),_=re.useCallback(()=>{a&&!c.current.isDragging&&a(!0)},[a]),y=re.useCallback(()=>{a&&!c.current.isDragging&&a(!1)},[a]),b=re.useCallback(()=>{c.current.isDragging=!0;const w=new Date().getTime();w-m.current<d&&u&&u(),m.current=w},[]),x=re.useCallback(w=>{c.current.isDragging=!0,i&&i(w),Qn(Ye.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),E=re.useCallback(()=>{if(e.current===null)return;const w=e.current.x,I=e.current.y,O=e.current.width,F=e.current.height,N=e.current.rotation,L=[e.current.scale.x,e.current.scale.y],B=L[0]<0?-1:1,V=L[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(w),y:Math.round(I),width:Math.round(Math.max(5,O)),height:Math.round(Math.max(5,F)),rotation:N,scale:h?L:[B,V]}}),Qn(Ye.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),c.current.isDragging=!1},[n]);return re.useEffect(()=>(t.current&&(t.current.on("mouseover",_),t.current.on("mouseout",y),t.current.on("mousedown",b)),()=>{t.current&&(t.current.off("mouseover",_),t.current.off("mouseout",y),t.current.off("mousedown",b))}),[]),we.jsx(xv.Transformer,{ref:t,group:r?[e.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:g},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:p,shape:"circle",radius:10},transformchange:x,transformcommit:E})};var Mv=Object.prototype;function Ov(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Mv;return t===r}var Th=Ov;function Fv(t,e){return function(r){return t(e(r))}}var Nv=Fv,Lv=Nv,kv=Lv(Object.keys,Object),Bv=kv,Dv=Th,Uv=Bv,$v=Object.prototype,Gv=$v.hasOwnProperty;function Hv(t){if(!Dv(t))return Uv(t);var e=[];for(var r in Object(t))Gv.call(t,r)&&r!="constructor"&&e.push(r);return e}var wh=Hv,zv=typeof At=="object"&&At&&At.Object===Object&&At,Sh=zv,Vv=Sh,jv=typeof self=="object"&&self&&self.Object===Object&&self,Xv=Vv||jv||Function("return this")(),Ir=Xv,Wv=Ir,qv=Wv.Symbol,zs=qv,Ah=zs,Eh=Object.prototype,Yv=Eh.hasOwnProperty,Kv=Eh.toString,qi=Ah?Ah.toStringTag:void 0;function Zv(t){var e=Yv.call(t,qi),r=t[qi];try{t[qi]=void 0;var n=!0}catch{}var i=Kv.call(t);return n&&(e?t[qi]=r:delete t[qi]),i}var Qv=Zv,Jv=Object.prototype,e_=Jv.toString;function t_(t){return e_.call(t)}var r_=t_,Ch=zs,n_=Qv,i_=r_,s_="[object Null]",a_="[object Undefined]",Ih=Ch?Ch.toStringTag:void 0;function o_(t){return t==null?t===void 0?a_:s_:Ih&&Ih in Object(t)?n_(t):i_(t)}var Yi=o_;function u_(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ki=u_,l_=Yi,c_=Ki,h_="[object AsyncFunction]",f_="[object Function]",d_="[object GeneratorFunction]",p_="[object Proxy]";function g_(t){if(!c_(t))return!1;var e=l_(t);return e==f_||e==d_||e==h_||e==p_}var Rh=g_,m_=Ir,v_=m_["__core-js_shared__"],__=v_,Ko=__,Ph=function(){var t=/[^.]+$/.exec(Ko&&Ko.keys&&Ko.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function y_(t){return!!Ph&&Ph in t}var x_=y_,b_=Function.prototype,T_=b_.toString;function w_(t){if(t!=null){try{return T_.call(t)}catch{}try{return t+""}catch{}}return""}var Mh=w_,S_=Rh,A_=x_,E_=Ki,C_=Mh,I_=/[\\^$.*+?()[\]{}|]/g,R_=/^\[object .+?Constructor\]$/,P_=Function.prototype,M_=Object.prototype,O_=P_.toString,F_=M_.hasOwnProperty,N_=RegExp("^"+O_.call(F_).replace(I_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function L_(t){if(!E_(t)||A_(t))return!1;var e=S_(t)?N_:R_;return e.test(C_(t))}var k_=L_;function B_(t,e){return t==null?void 0:t[e]}var D_=B_,U_=k_,$_=D_;function G_(t,e){var r=$_(t,e);return U_(r)?r:void 0}var Jn=G_,H_=Jn,z_=Ir,V_=H_(z_,"DataView"),j_=V_,X_=Jn,W_=Ir,q_=X_(W_,"Map"),Zo=q_,Y_=Jn,K_=Ir,Z_=Y_(K_,"Promise"),Q_=Z_,J_=Jn,ey=Ir,ty=J_(ey,"Set"),ry=ty,ny=Jn,iy=Ir,sy=ny(iy,"WeakMap"),ay=sy,Qo=j_,Jo=Zo,eu=Q_,tu=ry,ru=ay,Oh=Yi,ei=Mh,Fh="[object Map]",oy="[object Object]",Nh="[object Promise]",Lh="[object Set]",kh="[object WeakMap]",Bh="[object DataView]",uy=ei(Qo),ly=ei(Jo),cy=ei(eu),hy=ei(tu),fy=ei(ru),Tn=Oh;(Qo&&Tn(new Qo(new ArrayBuffer(1)))!=Bh||Jo&&Tn(new Jo)!=Fh||eu&&Tn(eu.resolve())!=Nh||tu&&Tn(new tu)!=Lh||ru&&Tn(new ru)!=kh)&&(Tn=function(t){var e=Oh(t),r=e==oy?t.constructor:void 0,n=r?ei(r):"";if(n)switch(n){case uy:return Bh;case ly:return Fh;case cy:return Nh;case hy:return Lh;case fy:return kh}return e});var Dh=Tn;function dy(t){return t!=null&&typeof t=="object"}var Zi=dy,py=Yi,gy=Zi,my="[object Arguments]";function vy(t){return gy(t)&&py(t)==my}var _y=vy,Uh=_y,yy=Zi,$h=Object.prototype,xy=$h.hasOwnProperty,by=$h.propertyIsEnumerable,Ty=Uh(function(){return arguments}())?Uh:function(t){return yy(t)&&xy.call(t,"callee")&&!by.call(t,"callee")},nu=Ty,wy=Array.isArray,Rr=wy,Sy=9007199254740991;function Ay(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Sy}var iu=Ay,Ey=Rh,Cy=iu;function Iy(t){return t!=null&&Cy(t.length)&&!Ey(t)}var Vs=Iy,js={exports:{}};function Ry(){return!1}var Py=Ry;js.exports,function(t,e){var r=Ir,n=Py,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,u=a&&a.exports===i,l=u?r.Buffer:void 0,h=l?l.isBuffer:void 0,p=h||n;t.exports=p}(js,js.exports);var su=js.exports,My=Yi,Oy=iu,Fy=Zi,Ny="[object Arguments]",Ly="[object Array]",ky="[object Boolean]",By="[object Date]",Dy="[object Error]",Uy="[object Function]",$y="[object Map]",Gy="[object Number]",Hy="[object Object]",zy="[object RegExp]",Vy="[object Set]",jy="[object String]",Xy="[object WeakMap]",Wy="[object ArrayBuffer]",qy="[object DataView]",Yy="[object Float32Array]",Ky="[object Float64Array]",Zy="[object Int8Array]",Qy="[object Int16Array]",Jy="[object Int32Array]",ex="[object Uint8Array]",tx="[object Uint8ClampedArray]",rx="[object Uint16Array]",nx="[object Uint32Array]",rt={};rt[Yy]=rt[Ky]=rt[Zy]=rt[Qy]=rt[Jy]=rt[ex]=rt[tx]=rt[rx]=rt[nx]=!0,rt[Ny]=rt[Ly]=rt[Wy]=rt[ky]=rt[qy]=rt[By]=rt[Dy]=rt[Uy]=rt[$y]=rt[Gy]=rt[Hy]=rt[zy]=rt[Vy]=rt[jy]=rt[Xy]=!1;function ix(t){return Fy(t)&&Oy(t.length)&&!!rt[My(t)]}var sx=ix;function ax(t){return function(e){return t(e)}}var ox=ax,Xs={exports:{}};Xs.exports,function(t,e){var r=Sh,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,u=a&&r.process,l=function(){try{var h=i&&i.require&&i.require("util").types;return h||u&&u.binding&&u.binding("util")}catch{}}();t.exports=l}(Xs,Xs.exports);var ux=Xs.exports,lx=sx,cx=ox,Gh=ux,Hh=Gh&&Gh.isTypedArray,hx=Hh?cx(Hh):lx,au=hx,fx=wh,dx=Dh,px=nu,gx=Rr,mx=Vs,vx=su,_x=Th,yx=au,xx="[object Map]",bx="[object Set]",Tx=Object.prototype,wx=Tx.hasOwnProperty;function Sx(t){if(t==null)return!0;if(mx(t)&&(gx(t)||typeof t=="string"||typeof t.splice=="function"||vx(t)||yx(t)||px(t)))return!t.length;var e=dx(t);if(e==xx||e==bx)return!t.size;if(_x(t))return!fx(t).length;for(var r in t)if(wx.call(t,r))return!1;return!0}var Ax=Sx;const Qi=Zn(Ax);var ou=(t=>(t.NONE="none",t.NORMAL="normal",t.LENSFLARE="lensflare",t.FILMSTRIP="filmstrip",t.GRUNGE="grunge",t.BRICKS="bricks",t))(ou||{});const zh={normal:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:0},lensflare:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:1},filmstrip:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/frames_filmstrip_5.png",blendmode:"ADD",alpha:1},grunge:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/pixi_overlay_grunge_60.jpg",blendmode:"ADD",alpha:1},bricks:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/bricks_Overlay_100.jpg",blendmode:"MULTIPLY",alpha:1}},Ex=t=>{const{overlay:e,width:r,height:n,x:i,y:a}=t,{src:u,blendmode:l}=zh[e]||zh.normal;return we.jsx(ke.TilingSprite,{image:u,width:r,height:n,x:i,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},Cx=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],en=re.forwardRef((t,e)=>{var q,ue,he,me;const[r,n]=re.useState(!1),[i,a]=W.useState(!1),[u,l]=W.useState(!1),h=W.useRef(null),p=W.useRef(null),g=W.useRef(null),c=W.useRef(null),d=W.useRef(null),{uniqueId:m,visible:_,transformation:{x:y,y:b,width:x,height:E,scale:w=[1,1],rotation:I=0,effect:O,overlay:F},applyTransformer:N,disabled:L,pointerdown:B,pointerout:V,pointerover:Y,isText:ae,isDragging:j,isGif:G,onDoubleClick:se,isTextEditMode:ie}=t;ht(Ye.COMPLETE,()=>{h.current}),re.useImperativeHandle(e,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>u}),[i,u]),re.useEffect(()=>{h.current&&n(!0)},[]);const H=re.useCallback(()=>{l(!0),Y&&Y()},[]),J=re.useCallback(()=>{a(!0)},[]),ge=re.useCallback(pe=>{t.onAnchorTransformationEnd&&t.onAnchorTransformationEnd(pe),a(!1)},[]),X=ke.withFilters(ke.Container,{matrix:jt.filters.ColorMatrixFilter});return console.log("render=> imageRef location",(q=h.current)==null?void 0:q.x,(ue=h.current)==null?void 0:ue.y,y,b,"imagegroup",(he=g.current)==null?void 0:he.x,(me=g.current)==null?void 0:me.y),we.jsxs(ke.Container,{ref:p,children:[we.jsx(ke.Container,{ref:h,position:[y,b],pivot:[y,b],width:x,height:E,scale:w,rotation:I,...!L&&_&&!i&&!j&&{interactive:!0,buttonMode:!0,pointerdown:B,pointerover:Y,pointerout:V},children:we.jsxs(ke.Container,{ref:d,children:[!G&&we.jsx(X,{scale:1,apply:({matrix:pe})=>{O===xn.BlackAndWhite?pe.desaturate():O===xn.Sepia?pe.sepia():O===xn.RetroVintage||O===xn.NightVision?pe.negative():O===xn.Normal&&pe.reset()},matrix:{enabled:!0,matrix:Cx},children:we.jsx(ke.Container,{ref:g,children:t.children})}),G&&we.jsx(ke.Container,{ref:g,children:t.children}),!Qi(F)&&F!==ou.NONE&&F!==ou.NORMAL&&we.jsx(Ex,{overlay:F,width:x,height:E,x:y,y:b})]})}),N&&_&&!ie&&we.jsx(Pv,{pixiTransformerRef:c,imageRef:h,isMounted:r,transformCommit:ge,transformChange:J,mouseoverEvent:H,uniqueId:m,isText:ae,onDoubleClick:se})]})});en.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var wn=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))(wn||{}),Vh=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(Vh||{}),uu=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(uu||{}),de=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR",t))(de||{}),tn=(t=>(t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN",t))(tn||{}),Z=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(Z||{}),ti=(t=>(t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t))(ti||{}),De=(t=>(t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT",t))(De||{}),lu=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(lu||{}),Pr=(t=>(t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR",t))(Pr||{}),Ji=(t=>(t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t))(Ji||{}),Sn=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(Sn||{}),rn=(t=>(t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",t))(rn||{}),An=(t=>(t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT",t))(An||{}),cu=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(cu||{}),tr=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(tr||{}),_t=(t=>(t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE",t[t.COLOR=4]="COLOR",t))(_t||{}),vt=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(vt||{}),Mr=(t=>(t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t))(Mr||{});const Ee={ADAPTER:{createCanvas:(t,e)=>{const r=document.createElement("canvas");return r.width=t,r.height=e,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var hu=/iPhone/i,jh=/iPod/i,Xh=/iPad/i,Wh=/\biOS-universal(?:.+)Mac\b/i,fu=/\bAndroid(?:.+)Mobile\b/i,qh=/Android/i,ri=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Ws=/Silk/i,Ur=/Windows Phone/i,Yh=/\bWindows(?:.+)ARM\b/i,Kh=/BlackBerry/i,Zh=/BB10/i,Qh=/Opera Mini/i,Jh=/\b(CriOS|Chrome)(?:.+)Mobile/i,ef=/Mobile(?:.+)Firefox\b/i,tf=function(t){return typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream>"u"};function Ix(t){return function(e){return e.test(t)}}function rf(t){var e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});var r=e.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=Ix(r),a={apple:{phone:i(hu)&&!i(Ur),ipod:i(jh),tablet:!i(hu)&&(i(Xh)||tf(e))&&!i(Ur),universal:i(Wh),device:(i(hu)||i(jh)||i(Xh)||i(Wh)||tf(e))&&!i(Ur)},amazon:{phone:i(ri),tablet:!i(ri)&&i(Ws),device:i(ri)||i(Ws)},android:{phone:!i(Ur)&&i(ri)||!i(Ur)&&i(fu),tablet:!i(Ur)&&!i(ri)&&!i(fu)&&(i(Ws)||i(qh)),device:!i(Ur)&&(i(ri)||i(Ws)||i(fu)||i(qh))||i(/\bokhttp\b/i)},windows:{phone:i(Ur),tablet:i(Yh),device:i(Ur)||i(Yh)},other:{blackberry:i(Kh),blackberry10:i(Zh),opera:i(Qh),firefox:i(ef),chrome:i(Jh),device:i(Kh)||i(Zh)||i(Qh)||i(ef)||i(Jh)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}const ni=(rf.default??rf)(globalThis.navigator);Ee.RETINA_PREFIX=/@([0-9\.]+)x/,Ee.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var nf={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(h,p,g){this.fn=h,this.context=p,this.once=g||!1}function a(h,p,g,c,d){if(typeof g!="function")throw new TypeError("The listener must be a function");var m=new i(g,c||h,d),_=r?r+p:p;return h._events[_]?h._events[_].fn?h._events[_]=[h._events[_],m]:h._events[_].push(m):(h._events[_]=m,h._eventsCount++),h}function u(h,p){--h._eventsCount===0?h._events=new n:delete h._events[p]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var p=[],g,c;if(this._eventsCount===0)return p;for(c in g=this._events)e.call(g,c)&&p.push(r?c.slice(1):c);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(g)):p},l.prototype.listeners=function(p){var g=r?r+p:p,c=this._events[g];if(!c)return[];if(c.fn)return[c.fn];for(var d=0,m=c.length,_=new Array(m);d<m;d++)_[d]=c[d].fn;return _},l.prototype.listenerCount=function(p){var g=r?r+p:p,c=this._events[g];return c?c.fn?1:c.length:0},l.prototype.emit=function(p,g,c,d,m,_){var y=r?r+p:p;if(!this._events[y])return!1;var b=this._events[y],x=arguments.length,E,w;if(b.fn){switch(b.once&&this.removeListener(p,b.fn,void 0,!0),x){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,g),!0;case 3:return b.fn.call(b.context,g,c),!0;case 4:return b.fn.call(b.context,g,c,d),!0;case 5:return b.fn.call(b.context,g,c,d,m),!0;case 6:return b.fn.call(b.context,g,c,d,m,_),!0}for(w=1,E=new Array(x-1);w<x;w++)E[w-1]=arguments[w];b.fn.apply(b.context,E)}else{var I=b.length,O;for(w=0;w<I;w++)switch(b[w].once&&this.removeListener(p,b[w].fn,void 0,!0),x){case 1:b[w].fn.call(b[w].context);break;case 2:b[w].fn.call(b[w].context,g);break;case 3:b[w].fn.call(b[w].context,g,c);break;case 4:b[w].fn.call(b[w].context,g,c,d);break;default:if(!E)for(O=1,E=new Array(x-1);O<x;O++)E[O-1]=arguments[O];b[w].fn.apply(b[w].context,E)}}return!0},l.prototype.on=function(p,g,c){return a(this,p,g,c,!1)},l.prototype.once=function(p,g,c){return a(this,p,g,c,!0)},l.prototype.removeListener=function(p,g,c,d){var m=r?r+p:p;if(!this._events[m])return this;if(!g)return u(this,m),this;var _=this._events[m];if(_.fn)_.fn===g&&(!d||_.once)&&(!c||_.context===c)&&u(this,m);else{for(var y=0,b=[],x=_.length;y<x;y++)(_[y].fn!==g||d&&!_[y].once||c&&_[y].context!==c)&&b.push(_[y]);b.length?this._events[m]=b.length===1?b[0]:b:u(this,m)}return this},l.prototype.removeAllListeners=function(p){var g;return p?(g=r?r+p:p,this._events[g]&&u(this,g)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l})(nf);var Rx=nf.exports;const qs=Zn(Rx);var du={exports:{}};du.exports=Ys,du.exports.default=Ys;function Ys(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,a=sf(t,0,i,r,!0),u=[];if(!a||a.next===a.prev)return u;var l,h,p,g,c,d,m;if(n&&(a=Nx(t,e,a,r)),t.length>80*r){l=p=t[0],h=g=t[1];for(var _=r;_<i;_+=r)c=t[_],d=t[_+1],c<l&&(l=c),d<h&&(h=d),c>p&&(p=c),d>g&&(g=d);m=Math.max(p-l,g-h),m=m!==0?32767/m:0}return es(a,u,r,l,h,m,0),u}function sf(t,e,r,n,i){var a,u;if(i===mu(t,e,r,n)>0)for(a=e;a<r;a+=n)u=uf(a,t[a],t[a+1],u);else for(a=r-n;a>=e;a-=n)u=uf(a,t[a],t[a+1],u);return u&&Ks(u,u.next)&&(rs(u),u=u.next),u}function En(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(Ks(r,r.next)||ot(r.prev,r,r.next)===0)){if(rs(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function es(t,e,r,n,i,a,u){if(t){!u&&a&&Ux(t,n,i,a);for(var l=t,h,p;t.prev!==t.next;){if(h=t.prev,p=t.next,a?Mx(t,n,i,a):Px(t)){e.push(h.i/r|0),e.push(t.i/r|0),e.push(p.i/r|0),rs(t),t=p.next,l=p.next;continue}if(t=p,t===l){u?u===1?(t=Ox(En(t),e,r),es(t,e,r,n,i,a,2)):u===2&&Fx(t,e,r,n,i,a):es(En(t),e,r,n,i,a,1);break}}}}function Px(t){var e=t.prev,r=t,n=t.next;if(ot(e,r,n)>=0)return!1;for(var i=e.x,a=r.x,u=n.x,l=e.y,h=r.y,p=n.y,g=i<a?i<u?i:u:a<u?a:u,c=l<h?l<p?l:p:h<p?h:p,d=i>a?i>u?i:u:a>u?a:u,m=l>h?l>p?l:p:h>p?h:p,_=n.next;_!==e;){if(_.x>=g&&_.x<=d&&_.y>=c&&_.y<=m&&ii(i,l,a,h,u,p,_.x,_.y)&&ot(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function Mx(t,e,r,n){var i=t.prev,a=t,u=t.next;if(ot(i,a,u)>=0)return!1;for(var l=i.x,h=a.x,p=u.x,g=i.y,c=a.y,d=u.y,m=l<h?l<p?l:p:h<p?h:p,_=g<c?g<d?g:d:c<d?c:d,y=l>h?l>p?l:p:h>p?h:p,b=g>c?g>d?g:d:c>d?c:d,x=pu(m,_,e,r,n),E=pu(y,b,e,r,n),w=t.prevZ,I=t.nextZ;w&&w.z>=x&&I&&I.z<=E;){if(w.x>=m&&w.x<=y&&w.y>=_&&w.y<=b&&w!==i&&w!==u&&ii(l,g,h,c,p,d,w.x,w.y)&&ot(w.prev,w,w.next)>=0||(w=w.prevZ,I.x>=m&&I.x<=y&&I.y>=_&&I.y<=b&&I!==i&&I!==u&&ii(l,g,h,c,p,d,I.x,I.y)&&ot(I.prev,I,I.next)>=0))return!1;I=I.nextZ}for(;w&&w.z>=x;){if(w.x>=m&&w.x<=y&&w.y>=_&&w.y<=b&&w!==i&&w!==u&&ii(l,g,h,c,p,d,w.x,w.y)&&ot(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;I&&I.z<=E;){if(I.x>=m&&I.x<=y&&I.y>=_&&I.y<=b&&I!==i&&I!==u&&ii(l,g,h,c,p,d,I.x,I.y)&&ot(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function Ox(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!Ks(i,a)&&af(i,n,n.next,a)&&ts(i,a)&&ts(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),rs(n),rs(n.next),n=t=a),n=n.next}while(n!==t);return En(n)}function Fx(t,e,r,n,i,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&Hx(u,l)){var h=of(u,l);u=En(u,u.next),h=En(h,h.next),es(u,e,r,n,i,a,0),es(h,e,r,n,i,a,0);return}l=l.next}u=u.next}while(u!==t)}function Nx(t,e,r,n){var i=[],a,u,l,h,p;for(a=0,u=e.length;a<u;a++)l=e[a]*n,h=a<u-1?e[a+1]*n:t.length,p=sf(t,l,h,n,!1),p===p.next&&(p.steiner=!0),i.push(Gx(p));for(i.sort(Lx),a=0;a<i.length;a++)r=kx(i[a],r);return r}function Lx(t,e){return t.x-e.x}function kx(t,e){var r=Bx(t,e);if(!r)return e;var n=of(r,t);return En(n,n.next),En(r,r.next)}function Bx(t,e){var r=e,n=t.x,i=t.y,a=-1/0,u;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var l=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=n&&l>a&&(a=l,u=r.x<r.next.x?r:r.next,l===n))return u}r=r.next}while(r!==e);if(!u)return null;var h=u,p=u.x,g=u.y,c=1/0,d;r=u;do n>=r.x&&r.x>=p&&n!==r.x&&ii(i<g?n:a,i,p,g,i<g?a:n,i,r.x,r.y)&&(d=Math.abs(i-r.y)/(n-r.x),ts(r,t)&&(d<c||d===c&&(r.x>u.x||r.x===u.x&&Dx(u,r)))&&(u=r,c=d)),r=r.next;while(r!==h);return u}function Dx(t,e){return ot(t.prev,t,e.prev)<0&&ot(e.next,t,t.next)<0}function Ux(t,e,r,n){var i=t;do i.z===0&&(i.z=pu(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,$x(i)}function $x(t){var e,r,n,i,a,u,l,h,p=1;do{for(r=t,t=null,a=null,u=0;r;){for(u++,n=r,l=0,e=0;e<p&&(l++,n=n.nextZ,!!n);e++);for(h=p;l>0||h>0&&n;)l!==0&&(h===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,l--):(i=n,n=n.nextZ,h--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,p*=2}while(u>1);return t}function pu(t,e,r,n,i){return t=(t-r)*i|0,e=(e-n)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function Gx(t){var e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}function ii(t,e,r,n,i,a,u,l){return(i-u)*(e-l)>=(t-u)*(a-l)&&(t-u)*(n-l)>=(r-u)*(e-l)&&(r-u)*(a-l)>=(i-u)*(n-l)}function Hx(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!zx(t,e)&&(ts(t,e)&&ts(e,t)&&Vx(t,e)&&(ot(t.prev,t,e.prev)||ot(t,e.prev,e))||Ks(t,e)&&ot(t.prev,t,t.next)>0&&ot(e.prev,e,e.next)>0)}function ot(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Ks(t,e){return t.x===e.x&&t.y===e.y}function af(t,e,r,n){var i=Qs(ot(t,e,r)),a=Qs(ot(t,e,n)),u=Qs(ot(r,n,t)),l=Qs(ot(r,n,e));return!!(i!==a&&u!==l||i===0&&Zs(t,r,e)||a===0&&Zs(t,n,e)||u===0&&Zs(r,t,n)||l===0&&Zs(r,e,n))}function Zs(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Qs(t){return t>0?1:t<0?-1:0}function zx(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&af(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function ts(t,e){return ot(t.prev,t,t.next)<0?ot(t,e,t.next)>=0&&ot(t,t.prev,e)>=0:ot(t,e,t.prev)<0||ot(t,t.next,e)<0}function Vx(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function of(t,e){var r=new gu(t.i,t.x,t.y),n=new gu(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function uf(t,e,r,n){var i=new gu(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function rs(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function gu(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Ys.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,u=Math.abs(mu(t,0,a,r));if(i)for(var l=0,h=e.length;l<h;l++){var p=e[l]*r,g=l<h-1?e[l+1]*r:t.length;u-=Math.abs(mu(t,p,g,r))}var c=0;for(l=0;l<n.length;l+=3){var d=n[l]*r,m=n[l+1]*r,_=n[l+2]*r;c+=Math.abs((t[d]-t[_])*(t[m+1]-t[d+1])-(t[d]-t[m])*(t[_+1]-t[d+1]))}return u===0&&c===0?0:Math.abs((c-u)/u)};function mu(t,e,r,n){for(var i=0,a=e,u=r-n;a<r;a+=n)i+=(t[u]-t[a])*(t[a+1]+t[u+1]),u=a;return i}Ys.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var u=0;u<e;u++)r.vertices.push(t[i][a][u]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r};var jx=du.exports;const Xx=Zn(jx);var Js={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Js.exports,function(t,e){(function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,a=typeof At=="object"&&At;(a.global===a||a.window===a||a.self===a)&&(r=a);var u,l=2147483647,h=36,p=1,g=26,c=38,d=700,m=72,_=128,y="-",b=/^xn--/,x=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=h-p,O=Math.floor,F=String.fromCharCode,N;function L(X){throw new RangeError(w[X])}function B(X,q){for(var ue=X.length,he=[];ue--;)he[ue]=q(X[ue]);return he}function V(X,q){var ue=X.split("@"),he="";ue.length>1&&(he=ue[0]+"@",X=ue[1]),X=X.replace(E,".");var me=X.split("."),pe=B(me,q).join(".");return he+pe}function Y(X){for(var q=[],ue=0,he=X.length,me,pe;ue<he;)me=X.charCodeAt(ue++),me>=55296&&me<=56319&&ue<he?(pe=X.charCodeAt(ue++),(pe&64512)==56320?q.push(((me&1023)<<10)+(pe&1023)+65536):(q.push(me),ue--)):q.push(me);return q}function ae(X){return B(X,function(q){var ue="";return q>65535&&(q-=65536,ue+=F(q>>>10&1023|55296),q=56320|q&1023),ue+=F(q),ue}).join("")}function j(X){return X-48<10?X-22:X-65<26?X-65:X-97<26?X-97:h}function G(X,q){return X+22+75*(X<26)-((q!=0)<<5)}function se(X,q,ue){var he=0;for(X=ue?O(X/d):X>>1,X+=O(X/q);X>I*g>>1;he+=h)X=O(X/I);return O(he+(I+1)*X/(X+c))}function ie(X){var q=[],ue=X.length,he,me=0,pe=_,Pe=m,$e,je,Ze,be,Ce,Ge,et,Ae,_e;for($e=X.lastIndexOf(y),$e<0&&($e=0),je=0;je<$e;++je)X.charCodeAt(je)>=128&&L("not-basic"),q.push(X.charCodeAt(je));for(Ze=$e>0?$e+1:0;Ze<ue;){for(be=me,Ce=1,Ge=h;Ze>=ue&&L("invalid-input"),et=j(X.charCodeAt(Ze++)),(et>=h||et>O((l-me)/Ce))&&L("overflow"),me+=et*Ce,Ae=Ge<=Pe?p:Ge>=Pe+g?g:Ge-Pe,!(et<Ae);Ge+=h)_e=h-Ae,Ce>O(l/_e)&&L("overflow"),Ce*=_e;he=q.length+1,Pe=se(me-be,he,be==0),O(me/he)>l-pe&&L("overflow"),pe+=O(me/he),me%=he,q.splice(me++,0,pe)}return ae(q)}function H(X){var q,ue,he,me,pe,Pe,$e,je,Ze,be,Ce,Ge=[],et,Ae,_e,st;for(X=Y(X),et=X.length,q=_,ue=0,pe=m,Pe=0;Pe<et;++Pe)Ce=X[Pe],Ce<128&&Ge.push(F(Ce));for(he=me=Ge.length,me&&Ge.push(y);he<et;){for($e=l,Pe=0;Pe<et;++Pe)Ce=X[Pe],Ce>=q&&Ce<$e&&($e=Ce);for(Ae=he+1,$e-q>O((l-ue)/Ae)&&L("overflow"),ue+=($e-q)*Ae,q=$e,Pe=0;Pe<et;++Pe)if(Ce=X[Pe],Ce<q&&++ue>l&&L("overflow"),Ce==q){for(je=ue,Ze=h;be=Ze<=pe?p:Ze>=pe+g?g:Ze-pe,!(je<be);Ze+=h)st=je-be,_e=h-be,Ge.push(F(G(be+st%_e,0))),je=O(st/_e);Ge.push(F(G(je,0))),pe=se(ue,Ae,he==me),ue=0,++he}++ue,++q}return Ge.join("")}function J(X){return V(X,function(q){return b.test(q)?ie(q.slice(4).toLowerCase()):q})}function ge(X){return V(X,function(q){return x.test(q)?"xn--"+H(q):q})}if(u={version:"1.4.1",ucs2:{decode:Y,encode:ae},decode:ie,encode:H,toASCII:ge,toUnicode:J},n&&i)if(t.exports==n)i.exports=u;else for(N in u)u.hasOwnProperty(N)&&(n[N]=u[N]);else r.punycode=u})(At)}(Js,Js.exports);var Wx=Js.exports,qx=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,r);if(u.value!==i||u.enumerable!==!0)return!1}return!0},lf=typeof Symbol<"u"&&Symbol,Yx=qx,Kx=function(){return typeof lf!="function"||typeof Symbol!="function"||typeof lf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Yx()},cf={foo:{}},Zx=Object,Qx=function(){return{__proto__:cf}.foo===cf.foo&&!({__proto__:null}instanceof Zx)},Jx="Function.prototype.bind called on incompatible ",vu=Array.prototype.slice,e1=Object.prototype.toString,t1="[object Function]",r1=function(e){var r=this;if(typeof r!="function"||e1.call(r)!==t1)throw new TypeError(Jx+r);for(var n=vu.call(arguments,1),i,a=function(){if(this instanceof i){var g=r.apply(this,n.concat(vu.call(arguments)));return Object(g)===g?g:this}else return r.apply(e,n.concat(vu.call(arguments)))},u=Math.max(0,r.length-n.length),l=[],h=0;h<u;h++)l.push("$"+h);if(i=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var p=function(){};p.prototype=r.prototype,i.prototype=new p,p.prototype=null}return i},n1=r1,_u=Function.prototype.bind||n1,i1=_u,s1=i1.call(Function.call,Object.prototype.hasOwnProperty),Re,si=SyntaxError,hf=Function,ai=TypeError,yu=function(t){try{return hf('"use strict"; return ('+t+").constructor;")()}catch{}},Cn=Object.getOwnPropertyDescriptor;if(Cn)try{Cn({},"")}catch{Cn=null}var xu=function(){throw new ai},a1=Cn?function(){try{return arguments.callee,xu}catch{try{return Cn(arguments,"callee").get}catch{return xu}}}():xu,oi=Kx(),o1=Qx(),bt=Object.getPrototypeOf||(o1?function(t){return t.__proto__}:null),ui={},u1=typeof Uint8Array>"u"||!bt?Re:bt(Uint8Array),In={"%AggregateError%":typeof AggregateError>"u"?Re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Re:ArrayBuffer,"%ArrayIteratorPrototype%":oi&&bt?bt([][Symbol.iterator]()):Re,"%AsyncFromSyncIteratorPrototype%":Re,"%AsyncFunction%":ui,"%AsyncGenerator%":ui,"%AsyncGeneratorFunction%":ui,"%AsyncIteratorPrototype%":ui,"%Atomics%":typeof Atomics>"u"?Re:Atomics,"%BigInt%":typeof BigInt>"u"?Re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Re:FinalizationRegistry,"%Function%":hf,"%GeneratorFunction%":ui,"%Int8Array%":typeof Int8Array>"u"?Re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":oi&&bt?bt(bt([][Symbol.iterator]())):Re,"%JSON%":typeof JSON=="object"?JSON:Re,"%Map%":typeof Map>"u"?Re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!oi||!bt?Re:bt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Re:Promise,"%Proxy%":typeof Proxy>"u"?Re:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!oi||!bt?Re:bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":oi&&bt?bt(""[Symbol.iterator]()):Re,"%Symbol%":oi?Symbol:Re,"%SyntaxError%":si,"%ThrowTypeError%":a1,"%TypedArray%":u1,"%TypeError%":ai,"%Uint8Array%":typeof Uint8Array>"u"?Re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Re:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Re:WeakSet};if(bt)try{null.error}catch(t){var l1=bt(bt(t));In["%Error.prototype%"]=l1}var c1=function t(e){var r;if(e==="%AsyncFunction%")r=yu("async function () {}");else if(e==="%GeneratorFunction%")r=yu("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=yu("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&bt&&(r=bt(i.prototype))}return In[e]=r,r},ff={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ns=_u,ea=s1,h1=ns.call(Function.call,Array.prototype.concat),f1=ns.call(Function.apply,Array.prototype.splice),df=ns.call(Function.call,String.prototype.replace),ta=ns.call(Function.call,String.prototype.slice),d1=ns.call(Function.call,RegExp.prototype.exec),p1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,g1=/\\(\\)?/g,m1=function(e){var r=ta(e,0,1),n=ta(e,-1);if(r==="%"&&n!=="%")throw new si("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new si("invalid intrinsic syntax, expected opening `%`");var i=[];return df(e,p1,function(a,u,l,h){i[i.length]=l?df(h,g1,"$1"):u||a}),i},v1=function(e,r){var n=e,i;if(ea(ff,n)&&(i=ff[n],n="%"+i[0]+"%"),ea(In,n)){var a=In[n];if(a===ui&&(a=c1(n)),typeof a>"u"&&!r)throw new ai("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new si("intrinsic "+e+" does not exist!")},bu=function(e,r){if(typeof e!="string"||e.length===0)throw new ai("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ai('"allowMissing" argument must be a boolean');if(d1(/^%?[^%]*%?$/,e)===null)throw new si("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=m1(e),i=n.length>0?n[0]:"",a=v1("%"+i+"%",r),u=a.name,l=a.value,h=!1,p=a.alias;p&&(i=p[0],f1(n,h1([0,1],p)));for(var g=1,c=!0;g<n.length;g+=1){var d=n[g],m=ta(d,0,1),_=ta(d,-1);if((m==='"'||m==="'"||m==="`"||_==='"'||_==="'"||_==="`")&&m!==_)throw new si("property names with quotes must have matching quotes");if((d==="constructor"||!c)&&(h=!0),i+="."+d,u="%"+i+"%",ea(In,u))l=In[u];else if(l!=null){if(!(d in l)){if(!r)throw new ai("base intrinsic for "+e+" exists, but the property is not available.");return}if(Cn&&g+1>=n.length){var y=Cn(l,d);c=!!y,c&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[d]}else c=ea(l,d),l=l[d];c&&!h&&(In[u]=l)}}return l},pf={exports:{}};(function(t){var e=_u,r=bu,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(i,n),u=r("%Object.getOwnPropertyDescriptor%",!0),l=r("%Object.defineProperty%",!0),h=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(c){var d=a(e,i,arguments);if(u&&l){var m=u(d,"length");m.configurable&&l(d,"length",{value:1+h(0,c.length-(arguments.length-1))})}return d};var p=function(){return a(e,n,arguments)};l?l(t.exports,"apply",{value:p}):t.exports.apply=p})(pf);var _1=pf.exports,gf=bu,mf=_1,y1=mf(gf("String.prototype.indexOf")),x1=function(e,r){var n=gf(e,!!r);return typeof n=="function"&&y1(e,".prototype.")>-1?mf(n):n};const b1=bv(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Tu=typeof Map=="function"&&Map.prototype,wu=Object.getOwnPropertyDescriptor&&Tu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ra=Tu&&wu&&typeof wu.get=="function"?wu.get:null,vf=Tu&&Map.prototype.forEach,Su=typeof Set=="function"&&Set.prototype,Au=Object.getOwnPropertyDescriptor&&Su?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,na=Su&&Au&&typeof Au.get=="function"?Au.get:null,_f=Su&&Set.prototype.forEach,T1=typeof WeakMap=="function"&&WeakMap.prototype,is=T1?WeakMap.prototype.has:null,w1=typeof WeakSet=="function"&&WeakSet.prototype,ss=w1?WeakSet.prototype.has:null,S1=typeof WeakRef=="function"&&WeakRef.prototype,yf=S1?WeakRef.prototype.deref:null,A1=Boolean.prototype.valueOf,E1=Object.prototype.toString,C1=Function.prototype.toString,I1=String.prototype.match,Eu=String.prototype.slice,nn=String.prototype.replace,R1=String.prototype.toUpperCase,xf=String.prototype.toLowerCase,bf=RegExp.prototype.test,Tf=Array.prototype.concat,Or=Array.prototype.join,P1=Array.prototype.slice,wf=Math.floor,Cu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Iu=Object.getOwnPropertySymbols,Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,li=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Rt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===li||"symbol")?Symbol.toStringTag:null,Sf=Object.prototype.propertyIsEnumerable,Af=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Ef(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||bf.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-wf(-t):wf(t);if(n!==t){var i=String(n),a=Eu.call(e,i.length+1);return nn.call(i,r,"$&_")+"."+nn.call(nn.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return nn.call(e,r,"$&_")}var Pu=b1,Cf=Pu.custom,If=Mf(Cf)?Cf:null,M1=function t(e,r,n,i){var a=r||{};if(sn(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(sn(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=sn(a,"customInspect")?a.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(sn(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(sn(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ff(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var h=String(e);return l?Ef(e,h):h}if(typeof e=="bigint"){var p=String(e)+"n";return l?Ef(e,p):p}var g=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=g&&g>0&&typeof e=="object")return Mu(e)?"[Array]":"[Object]";var c=Y1(a,n);if(typeof i>"u")i=[];else if(Of(i,e)>=0)return"[Circular]";function d(j,G,se){if(G&&(i=P1.call(i),i.push(G)),se){var ie={depth:a.depth};return sn(a,"quoteStyle")&&(ie.quoteStyle=a.quoteStyle),t(j,ie,n+1,i)}return t(j,a,n+1,i)}if(typeof e=="function"&&!Pf(e)){var m=$1(e),_=ia(e,d);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(_.length>0?" { "+Or.call(_,", ")+" }":"")}if(Mf(e)){var y=li?nn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ru.call(e);return typeof e=="object"&&!li?as(y):y}if(X1(e)){for(var b="<"+xf.call(String(e.nodeName)),x=e.attributes||[],E=0;E<x.length;E++)b+=" "+x[E].name+"="+Rf(O1(x[E].value),"double",a);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+="</"+xf.call(String(e.nodeName))+">",b}if(Mu(e)){if(e.length===0)return"[]";var w=ia(e,d);return c&&!q1(w)?"["+Fu(w,c)+"]":"[ "+Or.call(w,", ")+" ]"}if(N1(e)){var I=ia(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!Sf.call(e,"cause")?"{ ["+String(e)+"] "+Or.call(Tf.call("[cause]: "+d(e.cause),I),", ")+" }":I.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Or.call(I,", ")+" }"}if(typeof e=="object"&&u){if(If&&typeof e[If]=="function"&&Pu)return Pu(e,{depth:g-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(G1(e)){var O=[];return vf&&vf.call(e,function(j,G){O.push(d(G,e,!0)+" => "+d(j,e))}),Nf("Map",ra.call(e),O,c)}if(V1(e)){var F=[];return _f&&_f.call(e,function(j){F.push(d(j,e))}),Nf("Set",na.call(e),F,c)}if(H1(e))return Ou("WeakMap");if(j1(e))return Ou("WeakSet");if(z1(e))return Ou("WeakRef");if(k1(e))return as(d(Number(e)));if(D1(e))return as(d(Cu.call(e)));if(B1(e))return as(A1.call(e));if(L1(e))return as(d(String(e)));if(!F1(e)&&!Pf(e)){var N=ia(e,d),L=Af?Af(e)===Object.prototype:e instanceof Object||e.constructor===Object,B=e instanceof Object?"":"null prototype",V=!L&&Rt&&Object(e)===e&&Rt in e?Eu.call(an(e),8,-1):B?"Object":"",Y=L||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ae=Y+(V||B?"["+Or.call(Tf.call([],V||[],B||[]),": ")+"] ":"");return N.length===0?ae+"{}":c?ae+"{"+Fu(N,c)+"}":ae+"{ "+Or.call(N,", ")+" }"}return String(e)};function Rf(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function O1(t){return nn.call(String(t),/"/g,"&quot;")}function Mu(t){return an(t)==="[object Array]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function F1(t){return an(t)==="[object Date]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function Pf(t){return an(t)==="[object RegExp]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function N1(t){return an(t)==="[object Error]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function L1(t){return an(t)==="[object String]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function k1(t){return an(t)==="[object Number]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function B1(t){return an(t)==="[object Boolean]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function Mf(t){if(li)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Ru)return!1;try{return Ru.call(t),!0}catch{}return!1}function D1(t){if(!t||typeof t!="object"||!Cu)return!1;try{return Cu.call(t),!0}catch{}return!1}var U1=Object.prototype.hasOwnProperty||function(t){return t in this};function sn(t,e){return U1.call(t,e)}function an(t){return E1.call(t)}function $1(t){if(t.name)return t.name;var e=I1.call(C1.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Of(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function G1(t){if(!ra||!t||typeof t!="object")return!1;try{ra.call(t);try{na.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function H1(t){if(!is||!t||typeof t!="object")return!1;try{is.call(t,is);try{ss.call(t,ss)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function z1(t){if(!yf||!t||typeof t!="object")return!1;try{return yf.call(t),!0}catch{}return!1}function V1(t){if(!na||!t||typeof t!="object")return!1;try{na.call(t);try{ra.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function j1(t){if(!ss||!t||typeof t!="object")return!1;try{ss.call(t,ss);try{is.call(t,is)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function X1(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Ff(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Ff(Eu.call(t,0,e.maxStringLength),e)+n}var i=nn.call(nn.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,W1);return Rf(i,"single",e)}function W1(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+R1.call(e.toString(16))}function as(t){return"Object("+t+")"}function Ou(t){return t+" { ? }"}function Nf(t,e,r,n){var i=n?Fu(r,n):Or.call(r,", ");return t+" ("+e+") {"+i+"}"}function q1(t){for(var e=0;e<t.length;e++)if(Of(t[e],`
10
+ `)>=0)return!1;return!0}function Y1(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Or.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Or.call(Array(e+1),r)}}function Fu(t,e){if(t.length===0)return"";var r=`
27
11
  `+e.prev+e.base;return r+Or.call(t,","+r)+`
28
- `+e.prev}function da(t,e){var r=Du(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=on(t,i)?e(t[i],t):""}var a=typeof Nu=="function"?Nu(t):[],u;if(di){u={};for(var l=0;l<a.length;l++)u["$"+a[l]]=a[l]}for(var f in t)on(t,f)&&(r&&String(Number(f))===f&&f<t.length||di&&u["$"+f]instanceof Symbol||(Xf.call(/[^\w$]/,f)?n.push(e(f,t)+": "+e(t[f],t)):n.push(f+": "+e(t[f],t))));if(typeof Nu=="function")for(var p=0;p<a.length;p++)Yf.call(t,a[p])&&n.push("["+e(a[p])+"]: "+e(t[a[p]],t));return n}var $u=Cu,pi=bS,ZS=OS,QS=$u("%TypeError%"),pa=$u("%WeakMap%",!0),ga=$u("%Map%",!0),JS=pi("WeakMap.prototype.get",!0),eA=pi("WeakMap.prototype.set",!0),tA=pi("WeakMap.prototype.has",!0),rA=pi("Map.prototype.get",!0),nA=pi("Map.prototype.set",!0),iA=pi("Map.prototype.has",!0),Gu=function(t,e){for(var r=t,n;(n=r.next)!==null;r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},sA=function(t,e){var r=Gu(t,e);return r&&r.value},aA=function(t,e,r){var n=Gu(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},oA=function(t,e){return!!Gu(t,e)},uA=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new QS("Side channel does not contain "+ZS(a))},get:function(a){if(pa&&a&&(typeof a=="object"||typeof a=="function")){if(e)return JS(e,a)}else if(ga){if(r)return rA(r,a)}else if(n)return sA(n,a)},has:function(a){if(pa&&a&&(typeof a=="object"||typeof a=="function")){if(e)return tA(e,a)}else if(ga){if(r)return iA(r,a)}else if(n)return oA(n,a);return!1},set:function(a,u){pa&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new pa),eA(e,a,u)):ga?(r||(r=new ga),nA(r,a,u)):(n||(n={key:{},next:null}),aA(n,a,u))}};return i},lA=String.prototype.replace,cA=/%20/g,Hu={RFC1738:"RFC1738",RFC3986:"RFC3986"},zu={default:Hu.RFC3986,formatters:{RFC1738:function(t){return lA.call(t,cA,"+")},RFC3986:function(t){return String(t)}},RFC1738:Hu.RFC1738,RFC3986:Hu.RFC3986},hA=zu,Vu=Object.prototype.hasOwnProperty,Pn=Array.isArray,Fr=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),fA=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Pn(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},ad=function(e,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},dA=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Pn(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Vu.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var i=e;return Pn(e)&&!Pn(r)&&(i=ad(e,n)),Pn(e)&&Pn(r)?(r.forEach(function(a,u){if(Vu.call(e,u)){var l=e[u];l&&typeof l=="object"&&a&&typeof a=="object"?e[u]=t(l,a,n):e.push(a)}else e[u]=a}),e):Object.keys(r).reduce(function(a,u){var l=r[u];return Vu.call(a,u)?a[u]=t(a[u],l,n):a[u]=l,a},i)},pA=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},gA=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},mA=function(e,r,n,i,a){if(e.length===0)return e;var u=e;if(typeof e=="symbol"?u=Symbol.prototype.toString.call(e):typeof e!="string"&&(u=String(e)),n==="iso-8859-1")return escape(u).replace(/%u[0-9a-f]{4}/gi,function(g){return"%26%23"+parseInt(g.slice(2),16)+"%3B"});for(var l="",f=0;f<u.length;++f){var p=u.charCodeAt(f);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===hA.RFC1738&&(p===40||p===41)){l+=u.charAt(f);continue}if(p<128){l=l+Fr[p];continue}if(p<2048){l=l+(Fr[192|p>>6]+Fr[128|p&63]);continue}if(p<55296||p>=57344){l=l+(Fr[224|p>>12]+Fr[128|p>>6&63]+Fr[128|p&63]);continue}f+=1,p=65536+((p&1023)<<10|u.charCodeAt(f)&1023),l+=Fr[240|p>>18]+Fr[128|p>>12&63]+Fr[128|p>>6&63]+Fr[128|p&63]}return l},vA=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],u=a.obj[a.prop],l=Object.keys(u),f=0;f<l.length;++f){var p=l[f],g=u[p];typeof g=="object"&&g!==null&&n.indexOf(g)===-1&&(r.push({obj:u,prop:p}),n.push(g))}return fA(r),e},_A=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},yA=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},xA=function(e,r){return[].concat(e,r)},bA=function(e,r){if(Pn(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},od={arrayToObject:ad,assign:pA,combine:xA,compact:vA,decode:gA,encode:mA,isBuffer:yA,isRegExp:_A,maybeMap:bA,merge:dA},ud=uA,ma=od,cs=zu,TA=Object.prototype.hasOwnProperty,ld={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},$r=Array.isArray,wA=Array.prototype.push,cd=function(t,e){wA.apply(t,$r(e)?e:[e])},SA=Date.prototype.toISOString,hd=cs.default,Mt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ma.encode,encodeValuesOnly:!1,format:hd,formatter:cs.formatters[hd],indices:!1,serializeDate:function(e){return SA.call(e)},skipNulls:!1,strictNullHandling:!1},AA=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},ju={},EA=function t(e,r,n,i,a,u,l,f,p,g,c,d,m,_,y,b){for(var x=e,E=b,w=0,I=!1;(E=E.get(ju))!==void 0&&!I;){var O=E.get(e);if(w+=1,typeof O<"u"){if(O===w)throw new RangeError("Cyclic object value");I=!0}typeof E.get(ju)>"u"&&(w=0)}if(typeof f=="function"?x=f(r,x):x instanceof Date?x=c(x):n==="comma"&&$r(x)&&(x=ma.maybeMap(x,function(se){return se instanceof Date?c(se):se})),x===null){if(a)return l&&!_?l(r,Mt.encoder,y,"key",d):r;x=""}if(AA(x)||ma.isBuffer(x)){if(l){var F=_?r:l(r,Mt.encoder,y,"key",d);return[m(F)+"="+m(l(x,Mt.encoder,y,"value",d))]}return[m(r)+"="+m(String(x))]}var N=[];if(typeof x>"u")return N;var L;if(n==="comma"&&$r(x))_&&l&&(x=ma.maybeMap(x,l)),L=[{value:x.length>0?x.join(",")||null:void 0}];else if($r(f))L=f;else{var D=Object.keys(x);L=p?D.sort(p):D}for(var V=i&&$r(x)&&x.length===1?r+"[]":r,Y=0;Y<L.length;++Y){var ie=L[Y],j=typeof ie=="object"&&typeof ie.value<"u"?ie.value:x[ie];if(!(u&&j===null)){var G=$r(x)?typeof n=="function"?n(V,ie):V:V+(g?"."+ie:"["+ie+"]");b.set(e,w);var ae=ud();ae.set(ju,b),cd(N,t(j,G,n,i,a,u,n==="comma"&&_&&$r(x)?null:l,f,p,g,c,d,m,_,y,ae))}}return N},CA=function(e){if(!e)return Mt;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||Mt.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=cs.default;if(typeof e.format<"u"){if(!TA.call(cs.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=cs.formatters[n],a=Mt.filter;return(typeof e.filter=="function"||$r(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Mt.addQueryPrefix,allowDots:typeof e.allowDots>"u"?Mt.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Mt.charsetSentinel,delimiter:typeof e.delimiter>"u"?Mt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Mt.encode,encoder:typeof e.encoder=="function"?e.encoder:Mt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Mt.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Mt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Mt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Mt.strictNullHandling}},IA=function(t,e){var r=t,n=CA(e),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):$r(n.filter)&&(a=n.filter,i=a);var u=[];if(typeof r!="object"||r===null)return"";var l;e&&e.arrayFormat in ld?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var f=ld[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=f==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var g=ud(),c=0;c<i.length;++c){var d=i[c];n.skipNulls&&r[d]===null||cd(u,EA(r[d],d,f,p,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,g))}var m=u.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),m.length>0?_+m:""},gi=od,Xu=Object.prototype.hasOwnProperty,RA=Array.isArray,Tt={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:gi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},PA=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},fd=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},MA="utf8=%26%2310003%3B",OA="utf8=%E2%9C%93",FA=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=r.parameterLimit===1/0?void 0:r.parameterLimit,u=i.split(r.delimiter,a),l=-1,f,p=r.charset;if(r.charsetSentinel)for(f=0;f<u.length;++f)u[f].indexOf("utf8=")===0&&(u[f]===OA?p="utf-8":u[f]===MA&&(p="iso-8859-1"),l=f,f=u.length);for(f=0;f<u.length;++f)if(f!==l){var g=u[f],c=g.indexOf("]="),d=c===-1?g.indexOf("="):c+1,m,_;d===-1?(m=r.decoder(g,Tt.decoder,p,"key"),_=r.strictNullHandling?null:""):(m=r.decoder(g.slice(0,d),Tt.decoder,p,"key"),_=gi.maybeMap(fd(g.slice(d+1),r),function(y){return r.decoder(y,Tt.decoder,p,"value")})),_&&r.interpretNumericEntities&&p==="iso-8859-1"&&(_=PA(_)),g.indexOf("[]=")>-1&&(_=RA(_)?[_]:_),Xu.call(n,m)?n[m]=gi.combine(n[m],_):n[m]=_}return n},NA=function(t,e,r,n){for(var i=n?e:fd(e,r),a=t.length-1;a>=0;--a){var u,l=t[a];if(l==="[]"&&r.parseArrays)u=[].concat(i);else{u=r.plainObjects?Object.create(null):{};var f=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,p=parseInt(f,10);!r.parseArrays&&f===""?u={0:i}:!isNaN(p)&&l!==f&&String(p)===f&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(u=[],u[p]=i):f!=="__proto__"&&(u[f]=i)}i=u}return i},LA=function(e,r,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,u=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,f=n.depth>0&&u.exec(a),p=f?a.slice(0,f.index):a,g=[];if(p){if(!n.plainObjects&&Xu.call(Object.prototype,p)&&!n.allowPrototypes)return;g.push(p)}for(var c=0;n.depth>0&&(f=l.exec(a))!==null&&c<n.depth;){if(c+=1,!n.plainObjects&&Xu.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;g.push(f[1])}return f&&g.push("["+a.slice(f.index)+"]"),NA(g,r,n,i)}},kA=function(e){if(!e)return Tt;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset>"u"?Tt.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?Tt.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Tt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Tt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Tt.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Tt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Tt.comma,decoder:typeof e.decoder=="function"?e.decoder:Tt.decoder,delimiter:typeof e.delimiter=="string"||gi.isRegExp(e.delimiter)?e.delimiter:Tt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Tt.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Tt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Tt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Tt.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Tt.strictNullHandling}},DA=function(t,e){var r=kA(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?FA(t,r):t,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],f=LA(l,n[l],r,typeof t=="string");i=gi.merge(i,f,r)}return r.allowSparse===!0?i:gi.compact(i)},BA=IA,UA=DA,$A=zu,GA={formats:$A,parse:UA,stringify:BA},HA=qw;function fr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var zA=/^([a-z0-9.+-]+:)/i,VA=/:[0-9]*$/,jA=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,XA=["<",">",'"',"`"," ","\r",`
29
- `," "],WA=["{","}","|","\\","^","`"].concat(XA),Wu=["'"].concat(WA),dd=["%","/","?",";","#"].concat(Wu),pd=["/","?","#"],qA=255,gd=/^[+a-z0-9A-Z_-]{0,63}$/,YA=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,KA={javascript:!0,"javascript:":!0},qu={javascript:!0,"javascript:":!0},mi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Yu=GA;function va(t,e,r){if(t&&typeof t=="object"&&t instanceof fr)return t;var n=new fr;return n.parse(t,e,r),n}fr.prototype.parse=function(t,e,r){if(typeof t!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n<t.indexOf("#")?"?":"#",a=t.split(i),u=/\\/g;a[0]=a[0].replace(u,"/"),t=a.join(i);var l=t;if(l=l.trim(),!r&&t.split("#").length===1){var f=jA.exec(l);if(f)return this.path=l,this.href=l,this.pathname=f[1],f[2]?(this.search=f[2],e?this.query=Yu.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=zA.exec(l);if(p){p=p[0];var g=p.toLowerCase();this.protocol=g,l=l.substr(p.length)}if(r||p||l.match(/^\/\/[^@/]+@[^@/]+/)){var c=l.substr(0,2)==="//";c&&!(p&&qu[p])&&(l=l.substr(2),this.slashes=!0)}if(!qu[p]&&(c||p&&!mi[p])){for(var d=-1,m=0;m<pd.length;m++){var _=l.indexOf(pd[m]);_!==-1&&(d===-1||_<d)&&(d=_)}var y,b;d===-1?b=l.lastIndexOf("@"):b=l.lastIndexOf("@",d),b!==-1&&(y=l.slice(0,b),l=l.slice(b+1),this.auth=decodeURIComponent(y)),d=-1;for(var m=0;m<dd.length;m++){var _=l.indexOf(dd[m]);_!==-1&&(d===-1||_<d)&&(d=_)}d===-1&&(d=l.length),this.host=l.slice(0,d),l=l.slice(d),this.parseHost(),this.hostname=this.hostname||"";var x=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!x)for(var E=this.hostname.split(/\./),m=0,w=E.length;m<w;m++){var I=E[m];if(I&&!I.match(gd)){for(var O="",F=0,N=I.length;F<N;F++)I.charCodeAt(F)>127?O+="x":O+=I[F];if(!O.match(gd)){var L=E.slice(0,m),D=E.slice(m+1),V=I.match(YA);V&&(L.push(V[1]),D.unshift(V[2])),D.length&&(l="/"+D.join(".")+l),this.hostname=L.join(".");break}}}this.hostname.length>qA?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=HA.toASCII(this.hostname));var Y=this.port?":"+this.port:"",ie=this.hostname||"";this.host=ie+Y,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!KA[g])for(var m=0,w=Wu.length;m<w;m++){var j=Wu[m];if(l.indexOf(j)!==-1){var G=encodeURIComponent(j);G===j&&(G=escape(j)),l=l.split(j).join(G)}}var ae=l.indexOf("#");ae!==-1&&(this.hash=l.substr(ae),l=l.slice(0,ae));var se=l.indexOf("?");if(se!==-1?(this.search=l.substr(se),this.query=l.substr(se+1),e&&(this.query=Yu.parse(this.query)),l=l.slice(0,se)):e&&(this.search="",this.query={}),l&&(this.pathname=l),mi[g]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Y=this.pathname||"",H=this.search||"";this.path=Y+H}return this.href=this.format(),this};function ZA(t){return typeof t=="string"&&(t=va(t)),t instanceof fr?t.format():fr.prototype.format.call(t)}fr.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,a="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=Yu.stringify(this.query));var u=this.search||a&&"?"+a||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||mi[e])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),u&&u.charAt(0)!=="?"&&(u="?"+u),r=r.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),u=u.replace("#","%23"),e+i+r+u+n};function QA(t,e){return va(t,!1,!0).resolve(e)}fr.prototype.resolve=function(t){return this.resolveObject(va(t,!1,!0)).format()},fr.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new fr;e.parse(t,!1,!0),t=e}for(var r=new fr,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=t.hash,t.href==="")return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),l=0;l<u.length;l++){var f=u[l];f!=="protocol"&&(r[f]=t[f])}return mi[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!mi[t.protocol]){for(var p=Object.keys(t),g=0;g<p.length;g++){var c=p[g];r[c]=t[c]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!qu[t.protocol]){for(var w=(t.pathname||"").split("/");w.length&&!(t.host=w.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),w[0]!==""&&w.unshift(""),w.length<2&&w.unshift(""),r.pathname=w.join("/")}else r.pathname=t.pathname;if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var d=r.pathname||"",m=r.search||"";r.path=d+m}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&r.pathname.charAt(0)==="/",y=t.host||t.pathname&&t.pathname.charAt(0)==="/",b=y||_||r.host&&t.pathname,x=b,E=r.pathname&&r.pathname.split("/")||[],w=t.pathname&&t.pathname.split("/")||[],I=r.protocol&&!mi[r.protocol];if(I&&(r.hostname="",r.port=null,r.host&&(E[0]===""?E[0]=r.host:E.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(w[0]===""?w[0]=t.host:w.unshift(t.host)),t.host=null),b=b&&(w[0]===""||E[0]==="")),y)r.host=t.host||t.host===""?t.host:r.host,r.hostname=t.hostname||t.hostname===""?t.hostname:r.hostname,r.search=t.search,r.query=t.query,E=w;else if(w.length)E||(E=[]),E.pop(),E=E.concat(w),r.search=t.search,r.query=t.query;else if(t.search!=null){if(I){r.host=E.shift(),r.hostname=r.host;var O=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;O&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname)}return r.search=t.search,r.query=t.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var F=E.slice(-1)[0],N=(r.host||t.host||E.length>1)&&(F==="."||F==="..")||F==="",L=0,D=E.length;D>=0;D--)F=E[D],F==="."?E.splice(D,1):F===".."?(E.splice(D,1),L++):L&&(E.splice(D,1),L--);if(!b&&!x)for(;L--;L)E.unshift("..");b&&E[0]!==""&&(!E[0]||E[0].charAt(0)!=="/")&&E.unshift(""),N&&E.join("/").substr(-1)!=="/"&&E.push("");var V=E[0]===""||E[0]&&E[0].charAt(0)==="/";if(I){r.hostname=V?"":E.length?E.shift():"",r.host=r.hostname;var O=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;O&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname)}return b=b||r.host&&E.length,b&&!V&&E.unshift(""),E.length>0?r.pathname=E.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},fr.prototype.parseHost=function(){var t=this.host,e=VA.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var JA=va,eE=QA,tE=ZA;const rE={parse:JA,format:tE,resolve:eE},md={};function ke(t,e,r=3){if(md[e])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
12
+ `+e.prev}function ia(t,e){var r=Mu(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=sn(t,i)?e(t[i],t):""}var a=typeof Iu=="function"?Iu(t):[],u;if(li){u={};for(var l=0;l<a.length;l++)u["$"+a[l]]=a[l]}for(var h in t)sn(t,h)&&(r&&String(Number(h))===h&&h<t.length||li&&u["$"+h]instanceof Symbol||(bf.call(/[^\w$]/,h)?n.push(e(h,t)+": "+e(t[h],t)):n.push(h+": "+e(t[h],t))));if(typeof Iu=="function")for(var p=0;p<a.length;p++)Sf.call(t,a[p])&&n.push("["+e(a[p])+"]: "+e(t[a[p]],t));return n}var Nu=bu,ci=x1,K1=M1,Z1=Nu("%TypeError%"),sa=Nu("%WeakMap%",!0),aa=Nu("%Map%",!0),Q1=ci("WeakMap.prototype.get",!0),J1=ci("WeakMap.prototype.set",!0),eb=ci("WeakMap.prototype.has",!0),tb=ci("Map.prototype.get",!0),rb=ci("Map.prototype.set",!0),nb=ci("Map.prototype.has",!0),Lu=function(t,e){for(var r=t,n;(n=r.next)!==null;r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},ib=function(t,e){var r=Lu(t,e);return r&&r.value},sb=function(t,e,r){var n=Lu(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},ab=function(t,e){return!!Lu(t,e)},ob=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new Z1("Side channel does not contain "+K1(a))},get:function(a){if(sa&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Q1(e,a)}else if(aa){if(r)return tb(r,a)}else if(n)return ib(n,a)},has:function(a){if(sa&&a&&(typeof a=="object"||typeof a=="function")){if(e)return eb(e,a)}else if(aa){if(r)return nb(r,a)}else if(n)return ab(n,a);return!1},set:function(a,u){sa&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new sa),J1(e,a,u)):aa?(r||(r=new aa),rb(r,a,u)):(n||(n={key:{},next:null}),sb(n,a,u))}};return i},ub=String.prototype.replace,lb=/%20/g,ku={RFC1738:"RFC1738",RFC3986:"RFC3986"},Bu={default:ku.RFC3986,formatters:{RFC1738:function(t){return ub.call(t,lb,"+")},RFC3986:function(t){return String(t)}},RFC1738:ku.RFC1738,RFC3986:ku.RFC3986},cb=Bu,Du=Object.prototype.hasOwnProperty,Rn=Array.isArray,Fr=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),hb=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Rn(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},Lf=function(e,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},fb=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Rn(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Du.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var i=e;return Rn(e)&&!Rn(r)&&(i=Lf(e,n)),Rn(e)&&Rn(r)?(r.forEach(function(a,u){if(Du.call(e,u)){var l=e[u];l&&typeof l=="object"&&a&&typeof a=="object"?e[u]=t(l,a,n):e.push(a)}else e[u]=a}),e):Object.keys(r).reduce(function(a,u){var l=r[u];return Du.call(a,u)?a[u]=t(a[u],l,n):a[u]=l,a},i)},db=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},pb=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},gb=function(e,r,n,i,a){if(e.length===0)return e;var u=e;if(typeof e=="symbol"?u=Symbol.prototype.toString.call(e):typeof e!="string"&&(u=String(e)),n==="iso-8859-1")return escape(u).replace(/%u[0-9a-f]{4}/gi,function(g){return"%26%23"+parseInt(g.slice(2),16)+"%3B"});for(var l="",h=0;h<u.length;++h){var p=u.charCodeAt(h);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===cb.RFC1738&&(p===40||p===41)){l+=u.charAt(h);continue}if(p<128){l=l+Fr[p];continue}if(p<2048){l=l+(Fr[192|p>>6]+Fr[128|p&63]);continue}if(p<55296||p>=57344){l=l+(Fr[224|p>>12]+Fr[128|p>>6&63]+Fr[128|p&63]);continue}h+=1,p=65536+((p&1023)<<10|u.charCodeAt(h)&1023),l+=Fr[240|p>>18]+Fr[128|p>>12&63]+Fr[128|p>>6&63]+Fr[128|p&63]}return l},mb=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],u=a.obj[a.prop],l=Object.keys(u),h=0;h<l.length;++h){var p=l[h],g=u[p];typeof g=="object"&&g!==null&&n.indexOf(g)===-1&&(r.push({obj:u,prop:p}),n.push(g))}return hb(r),e},vb=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},_b=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},yb=function(e,r){return[].concat(e,r)},xb=function(e,r){if(Rn(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},kf={arrayToObject:Lf,assign:db,combine:yb,compact:mb,decode:pb,encode:gb,isBuffer:_b,isRegExp:vb,maybeMap:xb,merge:fb},Bf=ob,oa=kf,os=Bu,bb=Object.prototype.hasOwnProperty,Df={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},$r=Array.isArray,Tb=Array.prototype.push,Uf=function(t,e){Tb.apply(t,$r(e)?e:[e])},wb=Date.prototype.toISOString,$f=os.default,Pt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:oa.encode,encodeValuesOnly:!1,format:$f,formatter:os.formatters[$f],indices:!1,serializeDate:function(e){return wb.call(e)},skipNulls:!1,strictNullHandling:!1},Sb=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Uu={},Ab=function t(e,r,n,i,a,u,l,h,p,g,c,d,m,_,y,b){for(var x=e,E=b,w=0,I=!1;(E=E.get(Uu))!==void 0&&!I;){var O=E.get(e);if(w+=1,typeof O<"u"){if(O===w)throw new RangeError("Cyclic object value");I=!0}typeof E.get(Uu)>"u"&&(w=0)}if(typeof h=="function"?x=h(r,x):x instanceof Date?x=c(x):n==="comma"&&$r(x)&&(x=oa.maybeMap(x,function(ie){return ie instanceof Date?c(ie):ie})),x===null){if(a)return l&&!_?l(r,Pt.encoder,y,"key",d):r;x=""}if(Sb(x)||oa.isBuffer(x)){if(l){var F=_?r:l(r,Pt.encoder,y,"key",d);return[m(F)+"="+m(l(x,Pt.encoder,y,"value",d))]}return[m(r)+"="+m(String(x))]}var N=[];if(typeof x>"u")return N;var L;if(n==="comma"&&$r(x))_&&l&&(x=oa.maybeMap(x,l)),L=[{value:x.length>0?x.join(",")||null:void 0}];else if($r(h))L=h;else{var B=Object.keys(x);L=p?B.sort(p):B}for(var V=i&&$r(x)&&x.length===1?r+"[]":r,Y=0;Y<L.length;++Y){var ae=L[Y],j=typeof ae=="object"&&typeof ae.value<"u"?ae.value:x[ae];if(!(u&&j===null)){var G=$r(x)?typeof n=="function"?n(V,ae):V:V+(g?"."+ae:"["+ae+"]");b.set(e,w);var se=Bf();se.set(Uu,b),Uf(N,t(j,G,n,i,a,u,n==="comma"&&_&&$r(x)?null:l,h,p,g,c,d,m,_,y,se))}}return N},Eb=function(e){if(!e)return Pt;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||Pt.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=os.default;if(typeof e.format<"u"){if(!bb.call(os.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=os.formatters[n],a=Pt.filter;return(typeof e.filter=="function"||$r(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Pt.addQueryPrefix,allowDots:typeof e.allowDots>"u"?Pt.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Pt.charsetSentinel,delimiter:typeof e.delimiter>"u"?Pt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Pt.encode,encoder:typeof e.encoder=="function"?e.encoder:Pt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Pt.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Pt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Pt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Pt.strictNullHandling}},Cb=function(t,e){var r=t,n=Eb(e),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):$r(n.filter)&&(a=n.filter,i=a);var u=[];if(typeof r!="object"||r===null)return"";var l;e&&e.arrayFormat in Df?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var h=Df[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=h==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var g=Bf(),c=0;c<i.length;++c){var d=i[c];n.skipNulls&&r[d]===null||Uf(u,Ab(r[d],d,h,p,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,g))}var m=u.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),m.length>0?_+m:""},hi=kf,$u=Object.prototype.hasOwnProperty,Ib=Array.isArray,Tt={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:hi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Rb=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Gf=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Pb="utf8=%26%2310003%3B",Mb="utf8=%E2%9C%93",Ob=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=r.parameterLimit===1/0?void 0:r.parameterLimit,u=i.split(r.delimiter,a),l=-1,h,p=r.charset;if(r.charsetSentinel)for(h=0;h<u.length;++h)u[h].indexOf("utf8=")===0&&(u[h]===Mb?p="utf-8":u[h]===Pb&&(p="iso-8859-1"),l=h,h=u.length);for(h=0;h<u.length;++h)if(h!==l){var g=u[h],c=g.indexOf("]="),d=c===-1?g.indexOf("="):c+1,m,_;d===-1?(m=r.decoder(g,Tt.decoder,p,"key"),_=r.strictNullHandling?null:""):(m=r.decoder(g.slice(0,d),Tt.decoder,p,"key"),_=hi.maybeMap(Gf(g.slice(d+1),r),function(y){return r.decoder(y,Tt.decoder,p,"value")})),_&&r.interpretNumericEntities&&p==="iso-8859-1"&&(_=Rb(_)),g.indexOf("[]=")>-1&&(_=Ib(_)?[_]:_),$u.call(n,m)?n[m]=hi.combine(n[m],_):n[m]=_}return n},Fb=function(t,e,r,n){for(var i=n?e:Gf(e,r),a=t.length-1;a>=0;--a){var u,l=t[a];if(l==="[]"&&r.parseArrays)u=[].concat(i);else{u=r.plainObjects?Object.create(null):{};var h=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,p=parseInt(h,10);!r.parseArrays&&h===""?u={0:i}:!isNaN(p)&&l!==h&&String(p)===h&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(u=[],u[p]=i):h!=="__proto__"&&(u[h]=i)}i=u}return i},Nb=function(e,r,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,u=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,h=n.depth>0&&u.exec(a),p=h?a.slice(0,h.index):a,g=[];if(p){if(!n.plainObjects&&$u.call(Object.prototype,p)&&!n.allowPrototypes)return;g.push(p)}for(var c=0;n.depth>0&&(h=l.exec(a))!==null&&c<n.depth;){if(c+=1,!n.plainObjects&&$u.call(Object.prototype,h[1].slice(1,-1))&&!n.allowPrototypes)return;g.push(h[1])}return h&&g.push("["+a.slice(h.index)+"]"),Fb(g,r,n,i)}},Lb=function(e){if(!e)return Tt;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset>"u"?Tt.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?Tt.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Tt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Tt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Tt.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Tt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Tt.comma,decoder:typeof e.decoder=="function"?e.decoder:Tt.decoder,delimiter:typeof e.delimiter=="string"||hi.isRegExp(e.delimiter)?e.delimiter:Tt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Tt.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Tt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Tt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Tt.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Tt.strictNullHandling}},kb=function(t,e){var r=Lb(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?Ob(t,r):t,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],h=Nb(l,n[l],r,typeof t=="string");i=hi.merge(i,h,r)}return r.allowSparse===!0?i:hi.compact(i)},Bb=Cb,Db=kb,Ub=Bu,$b={formats:Ub,parse:Db,stringify:Bb},Gb=Wx;function fr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Hb=/^([a-z0-9.+-]+:)/i,zb=/:[0-9]*$/,Vb=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,jb=["<",">",'"',"`"," ","\r",`
13
+ `," "],Xb=["{","}","|","\\","^","`"].concat(jb),Gu=["'"].concat(Xb),Hf=["%","/","?",";","#"].concat(Gu),zf=["/","?","#"],Wb=255,Vf=/^[+a-z0-9A-Z_-]{0,63}$/,qb=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Yb={javascript:!0,"javascript:":!0},Hu={javascript:!0,"javascript:":!0},fi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},zu=$b;function ua(t,e,r){if(t&&typeof t=="object"&&t instanceof fr)return t;var n=new fr;return n.parse(t,e,r),n}fr.prototype.parse=function(t,e,r){if(typeof t!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n<t.indexOf("#")?"?":"#",a=t.split(i),u=/\\/g;a[0]=a[0].replace(u,"/"),t=a.join(i);var l=t;if(l=l.trim(),!r&&t.split("#").length===1){var h=Vb.exec(l);if(h)return this.path=l,this.href=l,this.pathname=h[1],h[2]?(this.search=h[2],e?this.query=zu.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=Hb.exec(l);if(p){p=p[0];var g=p.toLowerCase();this.protocol=g,l=l.substr(p.length)}if(r||p||l.match(/^\/\/[^@/]+@[^@/]+/)){var c=l.substr(0,2)==="//";c&&!(p&&Hu[p])&&(l=l.substr(2),this.slashes=!0)}if(!Hu[p]&&(c||p&&!fi[p])){for(var d=-1,m=0;m<zf.length;m++){var _=l.indexOf(zf[m]);_!==-1&&(d===-1||_<d)&&(d=_)}var y,b;d===-1?b=l.lastIndexOf("@"):b=l.lastIndexOf("@",d),b!==-1&&(y=l.slice(0,b),l=l.slice(b+1),this.auth=decodeURIComponent(y)),d=-1;for(var m=0;m<Hf.length;m++){var _=l.indexOf(Hf[m]);_!==-1&&(d===-1||_<d)&&(d=_)}d===-1&&(d=l.length),this.host=l.slice(0,d),l=l.slice(d),this.parseHost(),this.hostname=this.hostname||"";var x=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!x)for(var E=this.hostname.split(/\./),m=0,w=E.length;m<w;m++){var I=E[m];if(I&&!I.match(Vf)){for(var O="",F=0,N=I.length;F<N;F++)I.charCodeAt(F)>127?O+="x":O+=I[F];if(!O.match(Vf)){var L=E.slice(0,m),B=E.slice(m+1),V=I.match(qb);V&&(L.push(V[1]),B.unshift(V[2])),B.length&&(l="/"+B.join(".")+l),this.hostname=L.join(".");break}}}this.hostname.length>Wb?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=Gb.toASCII(this.hostname));var Y=this.port?":"+this.port:"",ae=this.hostname||"";this.host=ae+Y,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!Yb[g])for(var m=0,w=Gu.length;m<w;m++){var j=Gu[m];if(l.indexOf(j)!==-1){var G=encodeURIComponent(j);G===j&&(G=escape(j)),l=l.split(j).join(G)}}var se=l.indexOf("#");se!==-1&&(this.hash=l.substr(se),l=l.slice(0,se));var ie=l.indexOf("?");if(ie!==-1?(this.search=l.substr(ie),this.query=l.substr(ie+1),e&&(this.query=zu.parse(this.query)),l=l.slice(0,ie)):e&&(this.search="",this.query={}),l&&(this.pathname=l),fi[g]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Y=this.pathname||"",H=this.search||"";this.path=Y+H}return this.href=this.format(),this};function Kb(t){return typeof t=="string"&&(t=ua(t)),t instanceof fr?t.format():fr.prototype.format.call(t)}fr.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,a="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=zu.stringify(this.query));var u=this.search||a&&"?"+a||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||fi[e])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),u&&u.charAt(0)!=="?"&&(u="?"+u),r=r.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),u=u.replace("#","%23"),e+i+r+u+n};function Zb(t,e){return ua(t,!1,!0).resolve(e)}fr.prototype.resolve=function(t){return this.resolveObject(ua(t,!1,!0)).format()},fr.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new fr;e.parse(t,!1,!0),t=e}for(var r=new fr,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=t.hash,t.href==="")return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),l=0;l<u.length;l++){var h=u[l];h!=="protocol"&&(r[h]=t[h])}return fi[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!fi[t.protocol]){for(var p=Object.keys(t),g=0;g<p.length;g++){var c=p[g];r[c]=t[c]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!Hu[t.protocol]){for(var w=(t.pathname||"").split("/");w.length&&!(t.host=w.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),w[0]!==""&&w.unshift(""),w.length<2&&w.unshift(""),r.pathname=w.join("/")}else r.pathname=t.pathname;if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var d=r.pathname||"",m=r.search||"";r.path=d+m}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&r.pathname.charAt(0)==="/",y=t.host||t.pathname&&t.pathname.charAt(0)==="/",b=y||_||r.host&&t.pathname,x=b,E=r.pathname&&r.pathname.split("/")||[],w=t.pathname&&t.pathname.split("/")||[],I=r.protocol&&!fi[r.protocol];if(I&&(r.hostname="",r.port=null,r.host&&(E[0]===""?E[0]=r.host:E.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(w[0]===""?w[0]=t.host:w.unshift(t.host)),t.host=null),b=b&&(w[0]===""||E[0]==="")),y)r.host=t.host||t.host===""?t.host:r.host,r.hostname=t.hostname||t.hostname===""?t.hostname:r.hostname,r.search=t.search,r.query=t.query,E=w;else if(w.length)E||(E=[]),E.pop(),E=E.concat(w),r.search=t.search,r.query=t.query;else if(t.search!=null){if(I){r.host=E.shift(),r.hostname=r.host;var O=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;O&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname)}return r.search=t.search,r.query=t.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var F=E.slice(-1)[0],N=(r.host||t.host||E.length>1)&&(F==="."||F==="..")||F==="",L=0,B=E.length;B>=0;B--)F=E[B],F==="."?E.splice(B,1):F===".."?(E.splice(B,1),L++):L&&(E.splice(B,1),L--);if(!b&&!x)for(;L--;L)E.unshift("..");b&&E[0]!==""&&(!E[0]||E[0].charAt(0)!=="/")&&E.unshift(""),N&&E.join("/").substr(-1)!=="/"&&E.push("");var V=E[0]===""||E[0]&&E[0].charAt(0)==="/";if(I){r.hostname=V?"":E.length?E.shift():"",r.host=r.hostname;var O=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;O&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname)}return b=b||r.host&&E.length,b&&!V&&E.unshift(""),E.length>0?r.pathname=E.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},fr.prototype.parseHost=function(){var t=this.host,e=zb.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var Qb=ua,Jb=Zb,eT=Kb;const tT={parse:Qb,format:eT,resolve:Jb},jf={};function Le(t,e,r=3){if(jf[e])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
30
14
  Deprecated since v${t}`):(n=n.split(`
31
15
  `).splice(r).join(`
32
16
  `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
33
17
  Deprecated since v${t}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
34
- Deprecated since v${t}`),console.warn(n))),md[e]=!0}let Ku;function nE(){return typeof Ku>"u"&&(Ku=function(){var r;const e={stencil:!0,failIfMajorPerformanceCaveat:Re.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Re.ADAPTER.getWebGLRenderingContext())return!1;const n=Re.ADAPTER.createCanvas();let i=n.getContext("webgl",e)||n.getContext("experimental-webgl",e);const a=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const u=i.getExtension("WEBGL_lose_context");u&&u.loseContext()}return i=null,a}catch{return!1}}()),Ku}var iE={grad:.9,turn:360,rad:360/(2*Math.PI)},Gr=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},wt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},rr=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},vd=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},_d=function(t){return{r:rr(t.r,0,255),g:rr(t.g,0,255),b:rr(t.b,0,255),a:rr(t.a)}},Zu=function(t){return{r:wt(t.r),g:wt(t.g),b:wt(t.b),a:wt(t.a,3)}},sE=/^#([0-9a-f]{3,8})$/i,_a=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},yd=function(t){var e=t.r,r=t.g,n=t.b,i=t.a,a=Math.max(e,r,n),u=a-Math.min(e,r,n),l=u?a===e?(r-n)/u:a===r?2+(n-e)/u:4+(e-r)/u:0;return{h:60*(l<0?l+6:l),s:a?u/a*100:0,v:a/255*100,a:i}},xd=function(t){var e=t.h,r=t.s,n=t.v,i=t.a;e=e/360*6,r/=100,n/=100;var a=Math.floor(e),u=n*(1-r),l=n*(1-(e-a)*r),f=n*(1-(1-e+a)*r),p=a%6;return{r:255*[n,l,u,u,f,n][p],g:255*[f,n,n,l,u,u][p],b:255*[u,u,f,n,n,l][p],a:i}},bd=function(t){return{h:vd(t.h),s:rr(t.s,0,100),l:rr(t.l,0,100),a:rr(t.a)}},Td=function(t){return{h:wt(t.h),s:wt(t.s),l:wt(t.l),a:wt(t.a,3)}},wd=function(t){return xd((r=(e=t).s,{h:e.h,s:(r*=((n=e.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}));var e,r,n},hs=function(t){return{h:(e=yd(t)).h,s:(i=(200-(r=e.s))*(n=e.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:e.a};var e,r,n,i},aE=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oE=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,uE=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lE=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Qu={string:[[function(t){var e=sE.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?wt(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?wt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=uE.exec(t)||lE.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:_d({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(t){var e=aE.exec(t)||oE.exec(t);if(!e)return null;var r,n,i=bd({h:(r=e[1],n=e[2],n===void 0&&(n="deg"),Number(r)*(iE[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return wd(i)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,n=t.b,i=t.a,a=i===void 0?1:i;return Gr(e)&&Gr(r)&&Gr(n)?_d({r:Number(e),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(t){var e=t.h,r=t.s,n=t.l,i=t.a,a=i===void 0?1:i;if(!Gr(e)||!Gr(r)||!Gr(n))return null;var u=bd({h:Number(e),s:Number(r),l:Number(n),a:Number(a)});return wd(u)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,i=t.a,a=i===void 0?1:i;if(!Gr(e)||!Gr(r)||!Gr(n))return null;var u=function(l){return{h:vd(l.h),s:rr(l.s,0,100),v:rr(l.v,0,100),a:rr(l.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(a)});return xd(u)},"hsv"]]},Sd=function(t,e){for(var r=0;r<e.length;r++){var n=e[r][0](t);if(n)return[n,e[r][1]]}return[null,void 0]},cE=function(t){return typeof t=="string"?Sd(t.trim(),Qu.string):typeof t=="object"&&t!==null?Sd(t,Qu.object):[null,void 0]},Ju=function(t,e){var r=hs(t);return{h:r.h,s:rr(r.s+100*e,0,100),l:r.l,a:r.a}},el=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Ad=function(t,e){var r=hs(t);return{h:r.h,s:r.s,l:rr(r.l+100*e,0,100),a:r.a}},tl=function(){function t(e){this.parsed=cE(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return wt(el(this.rgba),2)},t.prototype.isDark=function(){return el(this.rgba)<.5},t.prototype.isLight=function(){return el(this.rgba)>=.5},t.prototype.toHex=function(){return e=Zu(this.rgba),r=e.r,n=e.g,i=e.b,u=(a=e.a)<1?_a(wt(255*a)):"","#"+_a(r)+_a(n)+_a(i)+u;var e,r,n,i,a,u},t.prototype.toRgb=function(){return Zu(this.rgba)},t.prototype.toRgbString=function(){return e=Zu(this.rgba),r=e.r,n=e.g,i=e.b,(a=e.a)<1?"rgba("+r+", "+n+", "+i+", "+a+")":"rgb("+r+", "+n+", "+i+")";var e,r,n,i,a},t.prototype.toHsl=function(){return Td(hs(this.rgba))},t.prototype.toHslString=function(){return e=Td(hs(this.rgba)),r=e.h,n=e.s,i=e.l,(a=e.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+a+")":"hsl("+r+", "+n+"%, "+i+"%)";var e,r,n,i,a},t.prototype.toHsv=function(){return e=yd(this.rgba),{h:wt(e.h),s:wt(e.s),v:wt(e.v),a:wt(e.a,3)};var e},t.prototype.invert=function(){return Nr({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),Nr(Ju(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Nr(Ju(this.rgba,-e))},t.prototype.grayscale=function(){return Nr(Ju(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Nr(Ad(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Nr(Ad(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?Nr({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):wt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=hs(this.rgba);return typeof e=="number"?Nr({h:e,s:r.s,l:r.l,a:r.a}):wt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Nr(e).toHex()},t}(),Nr=function(t){return t instanceof tl?t:new tl(t)},Ed=[],hE=function(t){t.forEach(function(e){Ed.indexOf(e)<0&&(e(tl,Qu),Ed.push(e))})};function fE(t,e){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var a={};t.prototype.toName=function(u){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,f,p=n[this.toHex()];if(p)return p;if(u!=null&&u.closest){var g=this.toRgb(),c=1/0,d="black";if(!a.length)for(var m in r)a[m]=new t(r[m]).toRgb();for(var _ in r){var y=(l=g,f=a[_],Math.pow(l.r-f.r,2)+Math.pow(l.g-f.g,2)+Math.pow(l.b-f.b,2));y<c&&(c=y,d=_)}return d}},e.string.push([function(u){var l=u.toLowerCase(),f=l==="transparent"?"#0000":r[l];return f?new t(f).toRgb():null},"name"])}hE([fE]);const vi=class{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}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(t){return this.value=t,this}set value(t){if(t instanceof vi)this._value=this.cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,t))&&(this.normalize(t),this._value=this.cloneSource(t))}}get value(){return this._value}cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}isSourceEqual(t,e){const r=typeof t;if(r!==typeof e)return!1;if(r==="number"||r==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?!1:t.every((i,a)=>i===e[a]);if(t!==null&&e!==null){const i=Object.keys(t),a=Object.keys(e);return i.length!==a.length?!1:i.every(u=>t[u]===e[u])}return t===e}toRgba(){const[t,e,r,n]=this._components;return{r:t,g:e,b:r,a:n}}toRgb(){const[t,e,r]=this._components;return{r:t,g:e,b:r}}toRgbaString(){const[t,e,r]=this.toUint8RgbArray();return`rgba(${t},${e},${r},${this.alpha})`}toUint8RgbArray(t){const[e,r,n]=this._components;return t=t??[],t[0]=Math.round(e*255),t[1]=Math.round(r*255),t[2]=Math.round(n*255),t}toRgbArray(t){t=t??[];const[e,r,n]=this._components;return t[0]=e,t[1]=r,t[2]=n,t}toNumber(){return this._int}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[e,r,n,i]=vi.temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this.refreshInt(),this._value=null,this}toPremultiplied(t){if(t===1)return(t*255<<24)+this._int;if(t===0)return 0;let e=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return e=e*t+.5|0,r=r*t+.5|0,n=n*t+.5|0,(t*255<<24)+(e<<16)+(r<<8)+n}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(t){return this._components[3]=this._clamp(t),this}round(t){const[e,r,n]=this._components;return this._components[0]=Math.round(e*t)/t,this._components[1]=Math.round(r*t)/t,this._components[2]=Math.round(n*t)/t,this.refreshInt(),this._value=null,this}toArray(t){t=t??[];const[e,r,n,i]=this._components;return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}normalize(t){let e;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const r=t;e=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4){t=this._clamp(t);const[r,n,i,a=1]=t;e=[r,n,i,a]}else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4){t=this._clamp(t,0,255);const[r,n,i,a=255]=t;e=[r/255,n/255,i/255,a/255]}else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const n=vi.HEX_PATTERN.exec(t);n&&(t=`#${n[2]}`)}const r=Nr(t);if(r.isValid()){const{r:n,g:i,b:a,a:u}=r.rgba;e=[n/255,i/255,a/255,u]}}if(e)this._components.set(e),this.refreshInt();else throw new Error(`Unable to convert color ${t}`)}refreshInt(){this._clamp(this._components);const[t,e,r]=this._components;this._int=(t*255<<16)+(e*255<<8)+(r*255|0)}_clamp(t,e=0,r=1){return typeof t=="number"?Math.min(Math.max(t,e),r):(t.forEach((n,i)=>{t[i]=Math.min(Math.max(n,e),r)}),t)}};let Ot=vi;Ot.shared=new vi,Ot.temp=new vi,Ot.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function ya(t,e=[]){return ke("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Ot.shared.setValue(t).toRgbArray(e)}function rl(t){return ke("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Ot.shared.setValue(t).toNumber()}function dE(){const t=[],e=[];for(let n=0;n<32;n++)t[n]=n,e[n]=n;t[de.NORMAL_NPM]=de.NORMAL,t[de.ADD_NPM]=de.ADD,t[de.SCREEN_NPM]=de.SCREEN,e[de.NORMAL]=de.NORMAL_NPM,e[de.ADD]=de.ADD_NPM,e[de.SCREEN]=de.SCREEN_NPM;const r=[];return r.push(e),r.push(t),r}const pE=dE();function Cd(t){if(t.BYTES_PER_ELEMENT===4)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(t.BYTES_PER_ELEMENT===2){if(t instanceof Uint16Array)return"Uint16Array"}else if(t.BYTES_PER_ELEMENT===1&&t instanceof Uint8Array)return"Uint8Array";return null}function xa(t){return t+=t===0?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function Id(t){return!(t&t-1)&&!!t}function Rd(t){let e=(t>65535?1:0)<<4;t>>>=e;let r=(t>255?1:0)<<3;return t>>>=r,e|=r,r=(t>15?1:0)<<2,t>>>=r,e|=r,r=(t>3?1:0)<<1,t>>>=r,e|=r,e|t>>1}function ba(t,e,r){const n=t.length;let i;if(e>=n||r===0)return;r=e+r>n?n-e:r;const a=n-r;for(i=e;i<a;++i)t[i]=t[i+r];t.length=a}let gE=0;function fs(){return++gE}const Pd={},Lr=Object.create(null),ln=Object.create(null);let Ta;function mE(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location,Ta||(Ta=document.createElement("a")),Ta.href=t;const r=rE.parse(Ta.href),n=!r.port&&e.port===""||r.port===e.port;return r.hostname!==e.hostname||!n||r.protocol!==e.protocol?"anonymous":""}function Md(t,e=1){var n;const r=(n=Re.RETINA_PREFIX)==null?void 0:n.exec(t);return r?parseFloat(r[1]):e}var Ne=(t=>(t.Renderer="renderer",t.Application="application",t.RendererSystem="renderer-webgl-system",t.RendererPlugin="renderer-webgl-plugin",t.CanvasRendererSystem="renderer-canvas-system",t.CanvasRendererPlugin="renderer-canvas-plugin",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t))(Ne||{});const nl=t=>{if(typeof t=="function"||typeof t=="object"&&t.extension){if(!t.extension)throw new Error("Extension class must have an extension object");t={...typeof t.extension!="object"?{type:t.extension}:t.extension,ref:t}}if(typeof t=="object")t={...t};else throw new Error("Invalid extension type");return typeof t.type=="string"&&(t.type=[t.type]),t},Od=(t,e)=>nl(t).priority??e,Ye={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(nl).forEach(e=>{e.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,e)})}),this},add(...t){return t.map(nl).forEach(e=>{e.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](e):(i[r]=i[r]||[],i[r].push(e))})}),this},handle(t,e,r){const n=this._addHandlers,i=this._removeHandlers;if(n[t]||i[t])throw new Error(`Extension type ${t} already has a handler`);n[t]=e,i[t]=r;const a=this._queue;return a[t]&&(a[t].forEach(u=>e(u)),delete a[t]),this},handleByMap(t,e){return this.handle(t,r=>{e[r.name]=r.ref},r=>{delete e[r.name]})},handleByList(t,e,r=-1){return this.handle(t,n=>{e.includes(n.ref)||(e.push(n.ref),e.sort((i,a)=>Od(a,r)-Od(i,r)))},n=>{const i=e.indexOf(n.ref);i!==-1&&e.splice(i,1)})}};class vE{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const _E=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
35
- `);function yE(t){let e="";for(let r=0;r<t;++r)r>0&&(e+=`
36
- else `),r<t-1&&(e+=`if(test == ${r}.0){}`);return e}function xE(t,e){if(t===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=e.createShader(e.FRAGMENT_SHADER);for(;;){const n=_E.replace(/%forloop%/gi,yE(t));if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}const il=0,sl=1,al=2,ol=3,ul=4,ll=5;let wa=class vv{constructor(){this.data=0,this.blendMode=de.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<il)}set blend(e){!!(this.data&1<<il)!==e&&(this.data^=1<<il)}get offsets(){return!!(this.data&1<<sl)}set offsets(e){!!(this.data&1<<sl)!==e&&(this.data^=1<<sl)}get culling(){return!!(this.data&1<<al)}set culling(e){!!(this.data&1<<al)!==e&&(this.data^=1<<al)}get depthTest(){return!!(this.data&1<<ol)}set depthTest(e){!!(this.data&1<<ol)!==e&&(this.data^=1<<ol)}get depthMask(){return!!(this.data&1<<ll)}set depthMask(e){!!(this.data&1<<ll)!==e&&(this.data^=1<<ll)}get clockwiseFrontFace(){return!!(this.data&1<<ul)}set clockwiseFrontFace(e){!!(this.data&1<<ul)!==e&&(this.data^=1<<ul)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==de.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const e=new vv;return e.depthTest=!1,e.blend=!0,e}};const cl=[];function Fd(t,e){if(!t)return null;let r="";if(typeof t=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);n&&(r=n[1].toLowerCase())}for(let n=cl.length-1;n>=0;--n){const i=cl[n];if(i.test&&i.test(t,r))return new i(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class dr{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,r,n,i,a,u,l,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:p,items:g}=this;this._aliasCount++;for(let c=0,d=g.length;c<d;c++)g[c][p](e,r,n,i,a,u,l,f);return g===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const r=this.items.indexOf(e);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(dr.prototype,{dispatch:{value:dr.prototype.emit},run:{value:dr.prototype.emit}});class ds{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new dr("setRealSize"),this.onUpdate=new dr("update"),this.onError=new dr("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,r){(e!==this._width||r!==this._height)&&(this._width=e,this._height=r,this.onResize.emit(e,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,r){return!1}}class hl extends ds{constructor(e,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=e}upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===sn.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?i.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,i.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(e){return e instanceof Float32Array||e instanceof Uint8Array||e instanceof Uint32Array}}const bE={scaleMode:Pr.NEAREST,format:Z.RGBA,alphaMode:sn.NPM},_i=class extends na{constructor(t=null,e=null){super(),e=Object.assign({},_i.defaultOptions,e);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:a,width:u,height:l,wrapMode:f,format:p,type:g,target:c,resolution:d,resourceOptions:m}=e;t&&!(t instanceof ds)&&(t=Fd(t,m),t.internal=!0),this.resolution=d||Re.RESOLUTION,this.width=Math.round((u||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=i,this._wrapMode=f,this._scaleMode=a,this.format=p,this.type=g,this.target=c,this.alphaMode=r,this.uid=fs(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=u>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(t)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(t){this._mipmap!==t&&(this._mipmap=t,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(t){this._scaleMode!==t&&(this._scaleMode=t,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(t){this._wrapMode!==t&&(this._wrapMode=t,this.dirtyStyleId++)}setStyle(t,e){let r;return t!==void 0&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),e!==void 0&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this}setSize(t,e,r){return r=r||this.resolution,this.setRealSize(t*r,e*r,r)}setRealSize(t,e,r){return this.resolution=r||this.resolution,this.width=Math.round(t)/this.resolution,this.height=Math.round(e)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Id(this.realWidth)&&Id(this.realHeight)}setResolution(t){const e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=Math.round(this.width*e)/t,this.height=Math.round(this.height*e)/t,this.emit("update",this)),this._refreshPOT(),this)}setResource(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(t){this.emit("error",this,t)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete ln[this.cacheId],delete Lr[this.cacheId],this.cacheId=null),this.dispose(),_i.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(t,e,r=Re.STRICT_TEXTURE_CACHE){const n=typeof t=="string";let i=null;if(n)i=t;else{if(!t._pixiId){const u=(e==null?void 0:e.pixiIdPrefix)||"pixiid";t._pixiId=`${u}_${fs()}`}i=t._pixiId}let a=ln[i];if(n&&r&&!a)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return a||(a=new _i(t,e),a.cacheId=i,_i.addToCache(a,i)),a}static fromBuffer(t,e,r,n){t=t||new Float32Array(e*r*4);const i=new hl(t,{width:e,height:r}),a=t instanceof Float32Array?Ge.FLOAT:Ge.UNSIGNED_BYTE;return new _i(i,Object.assign({},bE,n||{width:e,height:r,type:a}))}static addToCache(t,e){e&&(t.textureCacheIds.includes(e)||t.textureCacheIds.push(e),ln[e]&&ln[e]!==t&&console.warn(`BaseTexture added to the cache with an id [${e}] that already had an entry`),ln[e]=t)}static removeFromCache(t){if(typeof t=="string"){const e=ln[t];if(e){const r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete ln[t],e}}else if(t!=null&&t.textureCacheIds){for(let e=0;e<t.textureCacheIds.length;++e)delete ln[t.textureCacheIds[e]];return t.textureCacheIds.length=0,t}return null}};let He=_i;He.defaultOptions={mipmap:An.POW2,anisotropicLevel:0,scaleMode:Pr.LINEAR,wrapMode:rs.CLAMP,alphaMode:sn.UNPACK,target:si.TEXTURE_2D,format:Z.RGBA,type:Ge.UNSIGNED_BYTE},He._globalBatch=0;class fl{constructor(){this.texArray=null,this.blend=0,this.type=nn.TRIANGLES,this.start=0,this.size=0,this.data=null}}let TE=0;class kt{constructor(e,r=!0,n=!1){this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=TE++,this.disposeRunner=new dr("disposeBuffer")}update(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(e){this.type=e?Mr.ELEMENT_ARRAY_BUFFER:Mr.ARRAY_BUFFER}get index(){return this.type===Mr.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new kt(e)}}class Sa{constructor(e,r=0,n=!1,i=Ge.FLOAT,a,u,l,f=1){this.buffer=e,this.size=r,this.normalized=n,this.type=i,this.stride=a,this.start=u,this.instance=l,this.divisor=f}destroy(){this.buffer=null}static from(e,r,n,i,a){return new Sa(e,r,n,i,a)}}const wE={Float32Array,Uint32Array,Int32Array,Uint8Array};function SE(t,e){let r=0,n=0;const i={};for(let f=0;f<t.length;f++)n+=e[f],r+=t[f].length;const a=new ArrayBuffer(r*4);let u=null,l=0;for(let f=0;f<t.length;f++){const p=e[f],g=t[f],c=Cd(g);i[c]||(i[c]=new wE[c](a)),u=i[c];for(let d=0;d<g.length;d++){const m=(d/p|0)*n+l,_=d%p;u[m+_]=g[d]}l+=p}return new Float32Array(a)}const Nd={5126:4,5123:2,5121:1};let AE=0;const EE={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class yi{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=AE++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new dr("disposeGeometry"),this.refCount=0}addAttribute(e,r,n=0,i=!1,a,u,l,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof kt||(r instanceof Array&&(r=new Float32Array(r)),r=new kt(r));const p=e.split("|");if(p.length>1){for(let c=0;c<p.length;c++)this.addAttribute(p[c],r,n,i,a);return this}let g=this.buffers.indexOf(r);return g===-1&&(this.buffers.push(r),g=this.buffers.length-1),this.attributes[e]=new Sa(g,n,i,a,u,l,f),this.instanced=this.instanced||f,this}getAttribute(e){return this.attributes[e]}getBuffer(e){return this.buffers[this.getAttribute(e).buffer]}addIndex(e){return e instanceof kt||(e instanceof Array&&(e=new Uint16Array(e)),e=new kt(e)),e.type=Mr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.includes(e)||this.buffers.push(e),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const e=[],r=[],n=new kt;let i;for(i in this.attributes){const a=this.attributes[i],u=this.buffers[a.buffer];e.push(u.data),r.push(a.size*Nd[a.type]/4),a.buffer=0}for(n.data=SE(e,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const e in this.attributes){const r=this.attributes[e];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const e=new yi;for(let r=0;r<this.buffers.length;r++)e.buffers[r]=new kt(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];e.attributes[r]=new Sa(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=Mr.ELEMENT_ARRAY_BUFFER),e}static merge(e){const r=new yi,n=[],i=[],a=[];let u;for(let l=0;l<e.length;l++){u=e[l];for(let f=0;f<u.buffers.length;f++)i[f]=i[f]||0,i[f]+=u.buffers[f].data.length,a[f]=0}for(let l=0;l<u.buffers.length;l++)n[l]=new EE[Cd(u.buffers[l].data)](i[l]),r.buffers[l]=new kt(n[l]);for(let l=0;l<e.length;l++){u=e[l];for(let f=0;f<u.buffers.length;f++)n[f].set(u.buffers[f].data,a[f]),a[f]+=u.buffers[f].data.length}if(r.attributes=u.attributes,u.indexBuffer){r.indexBuffer=r.buffers[u.buffers.indexOf(u.indexBuffer)],r.indexBuffer.type=Mr.ELEMENT_ARRAY_BUFFER;let l=0,f=0,p=0,g=0;for(let c=0;c<u.buffers.length;c++)if(u.buffers[c]!==u.indexBuffer){g=c;break}for(const c in u.attributes){const d=u.attributes[c];(d.buffer|0)===g&&(f+=d.size*Nd[d.type]/4)}for(let c=0;c<e.length;c++){const d=e[c].indexBuffer.data;for(let m=0;m<d.length;m++)r.indexBuffer.data[m+p]+=l;l+=e[c].buffers[g].data.length/f,p+=d.length}}return r}}class Ld extends yi{constructor(e=!1){super(),this._buffer=new kt(null,e,!1),this._indexBuffer=new kt(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Ge.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Ge.FLOAT).addAttribute("aColor",this._buffer,4,!0,Ge.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Ge.FLOAT).addIndex(this._indexBuffer)}}const Aa=Math.PI*2,CE=180/Math.PI,ps=Math.PI/180;var Et=(t=>(t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC",t))(Et||{});class et{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new et(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,r=e){return this.x=e,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const Ea=[new et,new et,new et,new et];class Qe{constructor(e=0,r=0,n=0,i=0){this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Et.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Qe(0,0,0,0)}clone(){return new Qe(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,r){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(e,r){if(!r){const L=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=L)return!1;const V=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>V}const n=this.left,i=this.right,a=this.top,u=this.bottom;if(i<=n||u<=a)return!1;const l=Ea[0].set(e.left,e.top),f=Ea[1].set(e.left,e.bottom),p=Ea[2].set(e.right,e.top),g=Ea[3].set(e.right,e.bottom);if(p.x<=l.x||f.y<=l.y)return!1;const c=Math.sign(r.a*r.d-r.b*r.c);if(c===0||(r.apply(l,l),r.apply(f,f),r.apply(p,p),r.apply(g,g),Math.max(l.x,f.x,p.x,g.x)<=n||Math.min(l.x,f.x,p.x,g.x)>=i||Math.max(l.y,f.y,p.y,g.y)<=a||Math.min(l.y,f.y,p.y,g.y)>=u))return!1;const d=c*(f.y-l.y),m=c*(l.x-f.x),_=d*n+m*a,y=d*i+m*a,b=d*n+m*u,x=d*i+m*u;if(Math.max(_,y,b,x)<=d*l.x+m*l.y||Math.min(_,y,b,x)>=d*g.x+m*g.y)return!1;const E=c*(l.y-p.y),w=c*(p.x-l.x),I=E*n+w*a,O=E*i+w*a,F=E*n+w*u,N=E*i+w*u;return!(Math.max(I,O,F,N)<=E*l.x+w*l.y||Math.min(I,O,F,N)>=E*g.x+w*g.y)}pad(e=0,r=e){return this.x-=e,this.y-=r,this.width+=e*2,this.height+=r*2,this}fit(e){const r=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.y,e.y),a=Math.min(this.y+this.height,e.y+e.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(a-i,0),this}ceil(e=1,r=.001){const n=Math.ceil((this.x+this.width-r)*e)/e,i=Math.ceil((this.y+this.height-r)*e)/e;return this.x=Math.floor((this.x+r)*e)/e,this.y=Math.floor((this.y+r)*e)/e,this.width=n-this.x,this.height=i-this.y,this}enlarge(e){const r=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),i=Math.min(this.y,e.y),a=Math.max(this.y+this.height,e.y+e.height);return this.x=r,this.width=n-r,this.y=i,this.height=a-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class dl{constructor(e=0,r=0,n=0){this.x=e,this.y=r,this.radius=n,this.type=Et.CIRC}clone(){return new dl(this.x,this.y,this.radius)}contains(e,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-e,a=this.y-r;return i*=i,a*=a,i+a<=n}getBounds(){return new Qe(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let IE=class _v{constructor(e=0,r=0,n=0,i=0){this.x=e,this.y=r,this.width=n,this.height=i,this.type=Et.ELIP}clone(){return new _v(this.x,this.y,this.width,this.height)}contains(e,r){if(this.width<=0||this.height<=0)return!1;let n=(e-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new Qe(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class gs{constructor(...e){let r=Array.isArray(e[0])?e[0]:e;if(typeof r[0]!="number"){const n=[];for(let i=0,a=r.length;i<a;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=Et.POLY,this.closeStroke=!0}clone(){const e=this.points.slice(),r=new gs(e);return r.closeStroke=this.closeStroke,r}contains(e,r){let n=!1;const i=this.points.length/2;for(let a=0,u=i-1;a<i;u=a++){const l=this.points[a*2],f=this.points[a*2+1],p=this.points[u*2],g=this.points[u*2+1];f>r!=g>r&&e<(p-l)*((r-f)/(g-f))+l&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((e,r)=>`${e}, ${r}`,"")}]`}}class pl{constructor(e=0,r=0,n=0,i=0,a=20){this.x=e,this.y=r,this.width=n,this.height=i,this.radius=a,this.type=Et.RREC}clone(){return new pl(this.x,this.y,this.width,this.height,this.radius)}contains(e,r){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let i=e-(this.x+n),a=r-(this.y+n);const u=n*n;if(i*i+a*a<=u||(i=e-(this.x+this.width-n),i*i+a*a<=u)||(a=r-(this.y+this.height-n),i*i+a*a<=u)||(i=e-(this.x+n),i*i+a*a<=u))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let Dt=class Yo{constructor(e=1,r=0,n=0,i=1,a=0,u=0){this.array=null,this.a=e,this.b=r,this.c=n,this.d=i,this.tx=a,this.ty=u}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,r,n,i,a,u){return this.a=e,this.b=r,this.c=n,this.d=i,this.tx=a,this.ty=u,this}toArray(e,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(e,r){r=r||new et;const n=e.x,i=e.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(e,r){r=r||new et;const n=1/(this.a*this.d+this.c*-this.b),i=e.x,a=e.y;return r.x=this.d*n*i+-this.c*n*a+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*a+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(e,r){return this.tx+=e,this.ty+=r,this}scale(e,r){return this.a*=e,this.d*=r,this.c*=e,this.b*=r,this.tx*=e,this.ty*=r,this}rotate(e){const r=Math.cos(e),n=Math.sin(e),i=this.a,a=this.c,u=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=a*r-this.d*n,this.d=a*n+this.d*r,this.tx=u*r-this.ty*n,this.ty=u*n+this.ty*r,this}append(e){const r=this.a,n=this.b,i=this.c,a=this.d;return this.a=e.a*r+e.b*i,this.b=e.a*n+e.b*a,this.c=e.c*r+e.d*i,this.d=e.c*n+e.d*a,this.tx=e.tx*r+e.ty*i+this.tx,this.ty=e.tx*n+e.ty*a+this.ty,this}setTransform(e,r,n,i,a,u,l,f,p){return this.a=Math.cos(l+p)*a,this.b=Math.sin(l+p)*a,this.c=-Math.sin(l-f)*u,this.d=Math.cos(l-f)*u,this.tx=e-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(e){const r=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const n=this.a,i=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=i*e.a+this.d*e.c,this.d=i*e.b+this.d*e.d}return this.tx=r*e.a+this.ty*e.c+e.tx,this.ty=r*e.b+this.ty*e.d+e.ty,this}decompose(e){const r=this.a,n=this.b,i=this.c,a=this.d,u=e.pivot,l=-Math.atan2(-i,a),f=Math.atan2(n,r),p=Math.abs(l+f);return p<1e-5||Math.abs(Aa-p)<1e-5?(e.rotation=f,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=l,e.skew.y=f),e.scale.x=Math.sqrt(r*r+n*n),e.scale.y=Math.sqrt(i*i+a*a),e.position.x=this.tx+(u.x*r+u.y*i),e.position.y=this.ty+(u.x*n+u.y*a),e}invert(){const e=this.a,r=this.b,n=this.c,i=this.d,a=this.tx,u=e*i-r*n;return this.a=i/u,this.b=-r/u,this.c=-n/u,this.d=e/u,this.tx=(n*this.ty-i*a)/u,this.ty=-(e*this.ty-r*a)/u,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new Yo;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}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new Yo}static get TEMP_MATRIX(){return new Yo}};const Mn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],On=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Fn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Nn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],gl=[],kd=[],Ca=Math.sign;function RE(){for(let t=0;t<16;t++){const e=[];gl.push(e);for(let r=0;r<16;r++){const n=Ca(Mn[t]*Mn[r]+Fn[t]*On[r]),i=Ca(On[t]*Mn[r]+Nn[t]*On[r]),a=Ca(Mn[t]*Fn[r]+Fn[t]*Nn[r]),u=Ca(On[t]*Fn[r]+Nn[t]*Nn[r]);for(let l=0;l<16;l++)if(Mn[l]===n&&On[l]===i&&Fn[l]===a&&Nn[l]===u){e.push(l);break}}}for(let t=0;t<16;t++){const e=new Dt;e.set(Mn[t],On[t],Fn[t],Nn[t],0,0),kd.push(e)}}RE();const ut={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:t=>Mn[t],uY:t=>On[t],vX:t=>Fn[t],vY:t=>Nn[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>gl[t][e],sub:(t,e)=>gl[t][ut.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?ut.S:ut.N:Math.abs(e)*2<=Math.abs(t)?t>0?ut.E:ut.W:e>0?t>0?ut.SE:ut.SW:t>0?ut.NE:ut.NW,matrixAppendRotationInv:(t,e,r=0,n=0)=>{const i=kd[ut.inv(e)];i.tx=r,i.ty=n,t.append(i)}};class Ln{constructor(e,r,n=0,i=0){this._x=n,this._y=i,this.cb=e,this.scope=r}clone(e=this.cb,r=this.scope){return new Ln(e,r,this._x,this._y)}set(e=0,r=e){return(this._x!==e||this._y!==r)&&(this._x=e,this._y=r,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}const Dd=class{constructor(){this.worldTransform=new Dt,this.localTransform=new Dt,this.position=new Ln(this.onChange,this,0,0),this.scale=new Ln(this.onChange,this,1,1),this.pivot=new Ln(this.onChange,this,0,0),this.skew=new Ln(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(t){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){const r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}}setFromMatrix(t){t.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())}};let ml=Dd;ml.IDENTITY=new Dd;var PE=`varying vec2 vTextureCoord;
18
+ Deprecated since v${t}`),console.warn(n))),jf[e]=!0}let Vu;function rT(){return typeof Vu>"u"&&(Vu=function(){var r;const e={stencil:!0,failIfMajorPerformanceCaveat:Ee.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Ee.ADAPTER.getWebGLRenderingContext())return!1;const n=Ee.ADAPTER.createCanvas();let i=n.getContext("webgl",e)||n.getContext("experimental-webgl",e);const a=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const u=i.getExtension("WEBGL_lose_context");u&&u.loseContext()}return i=null,a}catch{return!1}}()),Vu}var nT={grad:.9,turn:360,rad:360/(2*Math.PI)},Gr=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},wt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},rr=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},Xf=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Wf=function(t){return{r:rr(t.r,0,255),g:rr(t.g,0,255),b:rr(t.b,0,255),a:rr(t.a)}},ju=function(t){return{r:wt(t.r),g:wt(t.g),b:wt(t.b),a:wt(t.a,3)}},iT=/^#([0-9a-f]{3,8})$/i,la=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},qf=function(t){var e=t.r,r=t.g,n=t.b,i=t.a,a=Math.max(e,r,n),u=a-Math.min(e,r,n),l=u?a===e?(r-n)/u:a===r?2+(n-e)/u:4+(e-r)/u:0;return{h:60*(l<0?l+6:l),s:a?u/a*100:0,v:a/255*100,a:i}},Yf=function(t){var e=t.h,r=t.s,n=t.v,i=t.a;e=e/360*6,r/=100,n/=100;var a=Math.floor(e),u=n*(1-r),l=n*(1-(e-a)*r),h=n*(1-(1-e+a)*r),p=a%6;return{r:255*[n,l,u,u,h,n][p],g:255*[h,n,n,l,u,u][p],b:255*[u,u,h,n,n,l][p],a:i}},Kf=function(t){return{h:Xf(t.h),s:rr(t.s,0,100),l:rr(t.l,0,100),a:rr(t.a)}},Zf=function(t){return{h:wt(t.h),s:wt(t.s),l:wt(t.l),a:wt(t.a,3)}},Qf=function(t){return Yf((r=(e=t).s,{h:e.h,s:(r*=((n=e.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}));var e,r,n},us=function(t){return{h:(e=qf(t)).h,s:(i=(200-(r=e.s))*(n=e.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:e.a};var e,r,n,i},sT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,aT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,uT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xu={string:[[function(t){var e=iT.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?wt(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?wt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=oT.exec(t)||uT.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Wf({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(t){var e=sT.exec(t)||aT.exec(t);if(!e)return null;var r,n,i=Kf({h:(r=e[1],n=e[2],n===void 0&&(n="deg"),Number(r)*(nT[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Qf(i)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,n=t.b,i=t.a,a=i===void 0?1:i;return Gr(e)&&Gr(r)&&Gr(n)?Wf({r:Number(e),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(t){var e=t.h,r=t.s,n=t.l,i=t.a,a=i===void 0?1:i;if(!Gr(e)||!Gr(r)||!Gr(n))return null;var u=Kf({h:Number(e),s:Number(r),l:Number(n),a:Number(a)});return Qf(u)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,i=t.a,a=i===void 0?1:i;if(!Gr(e)||!Gr(r)||!Gr(n))return null;var u=function(l){return{h:Xf(l.h),s:rr(l.s,0,100),v:rr(l.v,0,100),a:rr(l.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(a)});return Yf(u)},"hsv"]]},Jf=function(t,e){for(var r=0;r<e.length;r++){var n=e[r][0](t);if(n)return[n,e[r][1]]}return[null,void 0]},lT=function(t){return typeof t=="string"?Jf(t.trim(),Xu.string):typeof t=="object"&&t!==null?Jf(t,Xu.object):[null,void 0]},Wu=function(t,e){var r=us(t);return{h:r.h,s:rr(r.s+100*e,0,100),l:r.l,a:r.a}},qu=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},ed=function(t,e){var r=us(t);return{h:r.h,s:r.s,l:rr(r.l+100*e,0,100),a:r.a}},Yu=function(){function t(e){this.parsed=lT(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return wt(qu(this.rgba),2)},t.prototype.isDark=function(){return qu(this.rgba)<.5},t.prototype.isLight=function(){return qu(this.rgba)>=.5},t.prototype.toHex=function(){return e=ju(this.rgba),r=e.r,n=e.g,i=e.b,u=(a=e.a)<1?la(wt(255*a)):"","#"+la(r)+la(n)+la(i)+u;var e,r,n,i,a,u},t.prototype.toRgb=function(){return ju(this.rgba)},t.prototype.toRgbString=function(){return e=ju(this.rgba),r=e.r,n=e.g,i=e.b,(a=e.a)<1?"rgba("+r+", "+n+", "+i+", "+a+")":"rgb("+r+", "+n+", "+i+")";var e,r,n,i,a},t.prototype.toHsl=function(){return Zf(us(this.rgba))},t.prototype.toHslString=function(){return e=Zf(us(this.rgba)),r=e.h,n=e.s,i=e.l,(a=e.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+a+")":"hsl("+r+", "+n+"%, "+i+"%)";var e,r,n,i,a},t.prototype.toHsv=function(){return e=qf(this.rgba),{h:wt(e.h),s:wt(e.s),v:wt(e.v),a:wt(e.a,3)};var e},t.prototype.invert=function(){return Nr({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),Nr(Wu(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Nr(Wu(this.rgba,-e))},t.prototype.grayscale=function(){return Nr(Wu(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Nr(ed(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Nr(ed(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?Nr({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):wt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=us(this.rgba);return typeof e=="number"?Nr({h:e,s:r.s,l:r.l,a:r.a}):wt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Nr(e).toHex()},t}(),Nr=function(t){return t instanceof Yu?t:new Yu(t)},td=[],cT=function(t){t.forEach(function(e){td.indexOf(e)<0&&(e(Yu,Xu),td.push(e))})};function hT(t,e){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var a={};t.prototype.toName=function(u){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,h,p=n[this.toHex()];if(p)return p;if(u!=null&&u.closest){var g=this.toRgb(),c=1/0,d="black";if(!a.length)for(var m in r)a[m]=new t(r[m]).toRgb();for(var _ in r){var y=(l=g,h=a[_],Math.pow(l.r-h.r,2)+Math.pow(l.g-h.g,2)+Math.pow(l.b-h.b,2));y<c&&(c=y,d=_)}return d}},e.string.push([function(u){var l=u.toLowerCase(),h=l==="transparent"?"#0000":r[l];return h?new t(h).toRgb():null},"name"])}cT([hT]);const di=class{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}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(t){return this.value=t,this}set value(t){if(t instanceof di)this._value=this.cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,t))&&(this.normalize(t),this._value=this.cloneSource(t))}}get value(){return this._value}cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}isSourceEqual(t,e){const r=typeof t;if(r!==typeof e)return!1;if(r==="number"||r==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?!1:t.every((i,a)=>i===e[a]);if(t!==null&&e!==null){const i=Object.keys(t),a=Object.keys(e);return i.length!==a.length?!1:i.every(u=>t[u]===e[u])}return t===e}toRgba(){const[t,e,r,n]=this._components;return{r:t,g:e,b:r,a:n}}toRgb(){const[t,e,r]=this._components;return{r:t,g:e,b:r}}toRgbaString(){const[t,e,r]=this.toUint8RgbArray();return`rgba(${t},${e},${r},${this.alpha})`}toUint8RgbArray(t){const[e,r,n]=this._components;return t=t??[],t[0]=Math.round(e*255),t[1]=Math.round(r*255),t[2]=Math.round(n*255),t}toRgbArray(t){t=t??[];const[e,r,n]=this._components;return t[0]=e,t[1]=r,t[2]=n,t}toNumber(){return this._int}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[e,r,n,i]=di.temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this.refreshInt(),this._value=null,this}toPremultiplied(t){if(t===1)return(t*255<<24)+this._int;if(t===0)return 0;let e=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return e=e*t+.5|0,r=r*t+.5|0,n=n*t+.5|0,(t*255<<24)+(e<<16)+(r<<8)+n}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(t){return this._components[3]=this._clamp(t),this}round(t){const[e,r,n]=this._components;return this._components[0]=Math.round(e*t)/t,this._components[1]=Math.round(r*t)/t,this._components[2]=Math.round(n*t)/t,this.refreshInt(),this._value=null,this}toArray(t){t=t??[];const[e,r,n,i]=this._components;return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}normalize(t){let e;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const r=t;e=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4){t=this._clamp(t);const[r,n,i,a=1]=t;e=[r,n,i,a]}else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4){t=this._clamp(t,0,255);const[r,n,i,a=255]=t;e=[r/255,n/255,i/255,a/255]}else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const n=di.HEX_PATTERN.exec(t);n&&(t=`#${n[2]}`)}const r=Nr(t);if(r.isValid()){const{r:n,g:i,b:a,a:u}=r.rgba;e=[n/255,i/255,a/255,u]}}if(e)this._components.set(e),this.refreshInt();else throw new Error(`Unable to convert color ${t}`)}refreshInt(){this._clamp(this._components);const[t,e,r]=this._components;this._int=(t*255<<16)+(e*255<<8)+(r*255|0)}_clamp(t,e=0,r=1){return typeof t=="number"?Math.min(Math.max(t,e),r):(t.forEach((n,i)=>{t[i]=Math.min(Math.max(n,e),r)}),t)}};let Mt=di;Mt.shared=new di,Mt.temp=new di,Mt.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function ca(t,e=[]){return Le("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Mt.shared.setValue(t).toRgbArray(e)}function Ku(t){return Le("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Mt.shared.setValue(t).toNumber()}function fT(){const t=[],e=[];for(let n=0;n<32;n++)t[n]=n,e[n]=n;t[de.NORMAL_NPM]=de.NORMAL,t[de.ADD_NPM]=de.ADD,t[de.SCREEN_NPM]=de.SCREEN,e[de.NORMAL]=de.NORMAL_NPM,e[de.ADD]=de.ADD_NPM,e[de.SCREEN]=de.SCREEN_NPM;const r=[];return r.push(e),r.push(t),r}const dT=fT();function rd(t){if(t.BYTES_PER_ELEMENT===4)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(t.BYTES_PER_ELEMENT===2){if(t instanceof Uint16Array)return"Uint16Array"}else if(t.BYTES_PER_ELEMENT===1&&t instanceof Uint8Array)return"Uint8Array";return null}function ha(t){return t+=t===0?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function nd(t){return!(t&t-1)&&!!t}function id(t){let e=(t>65535?1:0)<<4;t>>>=e;let r=(t>255?1:0)<<3;return t>>>=r,e|=r,r=(t>15?1:0)<<2,t>>>=r,e|=r,r=(t>3?1:0)<<1,t>>>=r,e|=r,e|t>>1}function fa(t,e,r){const n=t.length;let i;if(e>=n||r===0)return;r=e+r>n?n-e:r;const a=n-r;for(i=e;i<a;++i)t[i]=t[i+r];t.length=a}let pT=0;function ls(){return++pT}const sd={},Lr=Object.create(null),on=Object.create(null);let da;function gT(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location,da||(da=document.createElement("a")),da.href=t;const r=tT.parse(da.href),n=!r.port&&e.port===""||r.port===e.port;return r.hostname!==e.hostname||!n||r.protocol!==e.protocol?"anonymous":""}function ad(t,e=1){var n;const r=(n=Ee.RETINA_PREFIX)==null?void 0:n.exec(t);return r?parseFloat(r[1]):e}var Oe=(t=>(t.Renderer="renderer",t.Application="application",t.RendererSystem="renderer-webgl-system",t.RendererPlugin="renderer-webgl-plugin",t.CanvasRendererSystem="renderer-canvas-system",t.CanvasRendererPlugin="renderer-canvas-plugin",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t))(Oe||{});const Zu=t=>{if(typeof t=="function"||typeof t=="object"&&t.extension){if(!t.extension)throw new Error("Extension class must have an extension object");t={...typeof t.extension!="object"?{type:t.extension}:t.extension,ref:t}}if(typeof t=="object")t={...t};else throw new Error("Invalid extension type");return typeof t.type=="string"&&(t.type=[t.type]),t},od=(t,e)=>Zu(t).priority??e,We={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(Zu).forEach(e=>{e.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,e)})}),this},add(...t){return t.map(Zu).forEach(e=>{e.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](e):(i[r]=i[r]||[],i[r].push(e))})}),this},handle(t,e,r){const n=this._addHandlers,i=this._removeHandlers;if(n[t]||i[t])throw new Error(`Extension type ${t} already has a handler`);n[t]=e,i[t]=r;const a=this._queue;return a[t]&&(a[t].forEach(u=>e(u)),delete a[t]),this},handleByMap(t,e){return this.handle(t,r=>{e[r.name]=r.ref},r=>{delete e[r.name]})},handleByList(t,e,r=-1){return this.handle(t,n=>{e.includes(n.ref)||(e.push(n.ref),e.sort((i,a)=>od(a,r)-od(i,r)))},n=>{const i=e.indexOf(n.ref);i!==-1&&e.splice(i,1)})}};class mT{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const vT=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
+ `);function _T(t){let e="";for(let r=0;r<t;++r)r>0&&(e+=`
20
+ else `),r<t-1&&(e+=`if(test == ${r}.0){}`);return e}function yT(t,e){if(t===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=e.createShader(e.FRAGMENT_SHADER);for(;;){const n=vT.replace(/%forloop%/gi,_T(t));if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}const Qu=0,Ju=1,el=2,tl=3,rl=4,nl=5;let pa=class vv{constructor(){this.data=0,this.blendMode=de.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Qu)}set blend(e){!!(this.data&1<<Qu)!==e&&(this.data^=1<<Qu)}get offsets(){return!!(this.data&1<<Ju)}set offsets(e){!!(this.data&1<<Ju)!==e&&(this.data^=1<<Ju)}get culling(){return!!(this.data&1<<el)}set culling(e){!!(this.data&1<<el)!==e&&(this.data^=1<<el)}get depthTest(){return!!(this.data&1<<tl)}set depthTest(e){!!(this.data&1<<tl)!==e&&(this.data^=1<<tl)}get depthMask(){return!!(this.data&1<<nl)}set depthMask(e){!!(this.data&1<<nl)!==e&&(this.data^=1<<nl)}get clockwiseFrontFace(){return!!(this.data&1<<rl)}set clockwiseFrontFace(e){!!(this.data&1<<rl)!==e&&(this.data^=1<<rl)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==de.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const e=new vv;return e.depthTest=!1,e.blend=!0,e}};const il=[];function ud(t,e){if(!t)return null;let r="";if(typeof t=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);n&&(r=n[1].toLowerCase())}for(let n=il.length-1;n>=0;--n){const i=il[n];if(i.test&&i.test(t,r))return new i(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class dr{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,r,n,i,a,u,l,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:p,items:g}=this;this._aliasCount++;for(let c=0,d=g.length;c<d;c++)g[c][p](e,r,n,i,a,u,l,h);return g===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const r=this.items.indexOf(e);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(dr.prototype,{dispatch:{value:dr.prototype.emit},run:{value:dr.prototype.emit}});class cs{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new dr("setRealSize"),this.onUpdate=new dr("update"),this.onError=new dr("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,r){(e!==this._width||r!==this._height)&&(this._width=e,this._height=r,this.onResize.emit(e,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,r){return!1}}class sl extends cs{constructor(e,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=e}upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===rn.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?i.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,i.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(e){return e instanceof Float32Array||e instanceof Uint8Array||e instanceof Uint32Array}}const xT={scaleMode:Pr.NEAREST,format:Z.RGBA,alphaMode:rn.NPM},pi=class extends qs{constructor(t=null,e=null){super(),e=Object.assign({},pi.defaultOptions,e);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:a,width:u,height:l,wrapMode:h,format:p,type:g,target:c,resolution:d,resourceOptions:m}=e;t&&!(t instanceof cs)&&(t=ud(t,m),t.internal=!0),this.resolution=d||Ee.RESOLUTION,this.width=Math.round((u||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=i,this._wrapMode=h,this._scaleMode=a,this.format=p,this.type=g,this.target=c,this.alphaMode=r,this.uid=ls(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=u>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(t)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(t){this._mipmap!==t&&(this._mipmap=t,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(t){this._scaleMode!==t&&(this._scaleMode=t,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(t){this._wrapMode!==t&&(this._wrapMode=t,this.dirtyStyleId++)}setStyle(t,e){let r;return t!==void 0&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),e!==void 0&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this}setSize(t,e,r){return r=r||this.resolution,this.setRealSize(t*r,e*r,r)}setRealSize(t,e,r){return this.resolution=r||this.resolution,this.width=Math.round(t)/this.resolution,this.height=Math.round(e)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=nd(this.realWidth)&&nd(this.realHeight)}setResolution(t){const e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=Math.round(this.width*e)/t,this.height=Math.round(this.height*e)/t,this.emit("update",this)),this._refreshPOT(),this)}setResource(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(t){this.emit("error",this,t)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete on[this.cacheId],delete Lr[this.cacheId],this.cacheId=null),this.dispose(),pi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(t,e,r=Ee.STRICT_TEXTURE_CACHE){const n=typeof t=="string";let i=null;if(n)i=t;else{if(!t._pixiId){const u=(e==null?void 0:e.pixiIdPrefix)||"pixiid";t._pixiId=`${u}_${ls()}`}i=t._pixiId}let a=on[i];if(n&&r&&!a)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return a||(a=new pi(t,e),a.cacheId=i,pi.addToCache(a,i)),a}static fromBuffer(t,e,r,n){t=t||new Float32Array(e*r*4);const i=new sl(t,{width:e,height:r}),a=t instanceof Float32Array?De.FLOAT:De.UNSIGNED_BYTE;return new pi(i,Object.assign({},xT,n||{width:e,height:r,type:a}))}static addToCache(t,e){e&&(t.textureCacheIds.includes(e)||t.textureCacheIds.push(e),on[e]&&on[e]!==t&&console.warn(`BaseTexture added to the cache with an id [${e}] that already had an entry`),on[e]=t)}static removeFromCache(t){if(typeof t=="string"){const e=on[t];if(e){const r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete on[t],e}}else if(t!=null&&t.textureCacheIds){for(let e=0;e<t.textureCacheIds.length;++e)delete on[t.textureCacheIds[e]];return t.textureCacheIds.length=0,t}return null}};let Ue=pi;Ue.defaultOptions={mipmap:Sn.POW2,anisotropicLevel:0,scaleMode:Pr.LINEAR,wrapMode:Ji.CLAMP,alphaMode:rn.UNPACK,target:ti.TEXTURE_2D,format:Z.RGBA,type:De.UNSIGNED_BYTE},Ue._globalBatch=0;class al{constructor(){this.texArray=null,this.blend=0,this.type=tn.TRIANGLES,this.start=0,this.size=0,this.data=null}}let bT=0;class Nt{constructor(e,r=!0,n=!1){this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=bT++,this.disposeRunner=new dr("disposeBuffer")}update(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(e){this.type=e?Mr.ELEMENT_ARRAY_BUFFER:Mr.ARRAY_BUFFER}get index(){return this.type===Mr.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new Nt(e)}}class ga{constructor(e,r=0,n=!1,i=De.FLOAT,a,u,l,h=1){this.buffer=e,this.size=r,this.normalized=n,this.type=i,this.stride=a,this.start=u,this.instance=l,this.divisor=h}destroy(){this.buffer=null}static from(e,r,n,i,a){return new ga(e,r,n,i,a)}}const TT={Float32Array,Uint32Array,Int32Array,Uint8Array};function wT(t,e){let r=0,n=0;const i={};for(let h=0;h<t.length;h++)n+=e[h],r+=t[h].length;const a=new ArrayBuffer(r*4);let u=null,l=0;for(let h=0;h<t.length;h++){const p=e[h],g=t[h],c=rd(g);i[c]||(i[c]=new TT[c](a)),u=i[c];for(let d=0;d<g.length;d++){const m=(d/p|0)*n+l,_=d%p;u[m+_]=g[d]}l+=p}return new Float32Array(a)}const ld={5126:4,5123:2,5121:1};let ST=0;const AT={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class gi{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=ST++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new dr("disposeGeometry"),this.refCount=0}addAttribute(e,r,n=0,i=!1,a,u,l,h=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Nt||(r instanceof Array&&(r=new Float32Array(r)),r=new Nt(r));const p=e.split("|");if(p.length>1){for(let c=0;c<p.length;c++)this.addAttribute(p[c],r,n,i,a);return this}let g=this.buffers.indexOf(r);return g===-1&&(this.buffers.push(r),g=this.buffers.length-1),this.attributes[e]=new ga(g,n,i,a,u,l,h),this.instanced=this.instanced||h,this}getAttribute(e){return this.attributes[e]}getBuffer(e){return this.buffers[this.getAttribute(e).buffer]}addIndex(e){return e instanceof Nt||(e instanceof Array&&(e=new Uint16Array(e)),e=new Nt(e)),e.type=Mr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.includes(e)||this.buffers.push(e),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const e=[],r=[],n=new Nt;let i;for(i in this.attributes){const a=this.attributes[i],u=this.buffers[a.buffer];e.push(u.data),r.push(a.size*ld[a.type]/4),a.buffer=0}for(n.data=wT(e,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const e in this.attributes){const r=this.attributes[e];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const e=new gi;for(let r=0;r<this.buffers.length;r++)e.buffers[r]=new Nt(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];e.attributes[r]=new ga(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=Mr.ELEMENT_ARRAY_BUFFER),e}static merge(e){const r=new gi,n=[],i=[],a=[];let u;for(let l=0;l<e.length;l++){u=e[l];for(let h=0;h<u.buffers.length;h++)i[h]=i[h]||0,i[h]+=u.buffers[h].data.length,a[h]=0}for(let l=0;l<u.buffers.length;l++)n[l]=new AT[rd(u.buffers[l].data)](i[l]),r.buffers[l]=new Nt(n[l]);for(let l=0;l<e.length;l++){u=e[l];for(let h=0;h<u.buffers.length;h++)n[h].set(u.buffers[h].data,a[h]),a[h]+=u.buffers[h].data.length}if(r.attributes=u.attributes,u.indexBuffer){r.indexBuffer=r.buffers[u.buffers.indexOf(u.indexBuffer)],r.indexBuffer.type=Mr.ELEMENT_ARRAY_BUFFER;let l=0,h=0,p=0,g=0;for(let c=0;c<u.buffers.length;c++)if(u.buffers[c]!==u.indexBuffer){g=c;break}for(const c in u.attributes){const d=u.attributes[c];(d.buffer|0)===g&&(h+=d.size*ld[d.type]/4)}for(let c=0;c<e.length;c++){const d=e[c].indexBuffer.data;for(let m=0;m<d.length;m++)r.indexBuffer.data[m+p]+=l;l+=e[c].buffers[g].data.length/h,p+=d.length}}return r}}class cd extends gi{constructor(e=!1){super(),this._buffer=new Nt(null,e,!1),this._indexBuffer=new Nt(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,De.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,De.FLOAT).addAttribute("aColor",this._buffer,4,!0,De.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,De.FLOAT).addIndex(this._indexBuffer)}}const ma=Math.PI*2,ET=180/Math.PI,hs=Math.PI/180;var Et=(t=>(t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC",t))(Et||{});class Je{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new Je(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,r=e){return this.x=e,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const va=[new Je,new Je,new Je,new Je];class Ke{constructor(e=0,r=0,n=0,i=0){this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Et.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Ke(0,0,0,0)}clone(){return new Ke(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,r){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(e,r){if(!r){const L=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=L)return!1;const V=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>V}const n=this.left,i=this.right,a=this.top,u=this.bottom;if(i<=n||u<=a)return!1;const l=va[0].set(e.left,e.top),h=va[1].set(e.left,e.bottom),p=va[2].set(e.right,e.top),g=va[3].set(e.right,e.bottom);if(p.x<=l.x||h.y<=l.y)return!1;const c=Math.sign(r.a*r.d-r.b*r.c);if(c===0||(r.apply(l,l),r.apply(h,h),r.apply(p,p),r.apply(g,g),Math.max(l.x,h.x,p.x,g.x)<=n||Math.min(l.x,h.x,p.x,g.x)>=i||Math.max(l.y,h.y,p.y,g.y)<=a||Math.min(l.y,h.y,p.y,g.y)>=u))return!1;const d=c*(h.y-l.y),m=c*(l.x-h.x),_=d*n+m*a,y=d*i+m*a,b=d*n+m*u,x=d*i+m*u;if(Math.max(_,y,b,x)<=d*l.x+m*l.y||Math.min(_,y,b,x)>=d*g.x+m*g.y)return!1;const E=c*(l.y-p.y),w=c*(p.x-l.x),I=E*n+w*a,O=E*i+w*a,F=E*n+w*u,N=E*i+w*u;return!(Math.max(I,O,F,N)<=E*l.x+w*l.y||Math.min(I,O,F,N)>=E*g.x+w*g.y)}pad(e=0,r=e){return this.x-=e,this.y-=r,this.width+=e*2,this.height+=r*2,this}fit(e){const r=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.y,e.y),a=Math.min(this.y+this.height,e.y+e.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(a-i,0),this}ceil(e=1,r=.001){const n=Math.ceil((this.x+this.width-r)*e)/e,i=Math.ceil((this.y+this.height-r)*e)/e;return this.x=Math.floor((this.x+r)*e)/e,this.y=Math.floor((this.y+r)*e)/e,this.width=n-this.x,this.height=i-this.y,this}enlarge(e){const r=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),i=Math.min(this.y,e.y),a=Math.max(this.y+this.height,e.y+e.height);return this.x=r,this.width=n-r,this.y=i,this.height=a-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class ol{constructor(e=0,r=0,n=0){this.x=e,this.y=r,this.radius=n,this.type=Et.CIRC}clone(){return new ol(this.x,this.y,this.radius)}contains(e,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-e,a=this.y-r;return i*=i,a*=a,i+a<=n}getBounds(){return new Ke(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let CT=class _v{constructor(e=0,r=0,n=0,i=0){this.x=e,this.y=r,this.width=n,this.height=i,this.type=Et.ELIP}clone(){return new _v(this.x,this.y,this.width,this.height)}contains(e,r){if(this.width<=0||this.height<=0)return!1;let n=(e-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new Ke(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class fs{constructor(...e){let r=Array.isArray(e[0])?e[0]:e;if(typeof r[0]!="number"){const n=[];for(let i=0,a=r.length;i<a;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=Et.POLY,this.closeStroke=!0}clone(){const e=this.points.slice(),r=new fs(e);return r.closeStroke=this.closeStroke,r}contains(e,r){let n=!1;const i=this.points.length/2;for(let a=0,u=i-1;a<i;u=a++){const l=this.points[a*2],h=this.points[a*2+1],p=this.points[u*2],g=this.points[u*2+1];h>r!=g>r&&e<(p-l)*((r-h)/(g-h))+l&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((e,r)=>`${e}, ${r}`,"")}]`}}class ul{constructor(e=0,r=0,n=0,i=0,a=20){this.x=e,this.y=r,this.width=n,this.height=i,this.radius=a,this.type=Et.RREC}clone(){return new ul(this.x,this.y,this.width,this.height,this.radius)}contains(e,r){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let i=e-(this.x+n),a=r-(this.y+n);const u=n*n;if(i*i+a*a<=u||(i=e-(this.x+this.width-n),i*i+a*a<=u)||(a=r-(this.y+this.height-n),i*i+a*a<=u)||(i=e-(this.x+n),i*i+a*a<=u))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let Lt=class Yo{constructor(e=1,r=0,n=0,i=1,a=0,u=0){this.array=null,this.a=e,this.b=r,this.c=n,this.d=i,this.tx=a,this.ty=u}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,r,n,i,a,u){return this.a=e,this.b=r,this.c=n,this.d=i,this.tx=a,this.ty=u,this}toArray(e,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(e,r){r=r||new Je;const n=e.x,i=e.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(e,r){r=r||new Je;const n=1/(this.a*this.d+this.c*-this.b),i=e.x,a=e.y;return r.x=this.d*n*i+-this.c*n*a+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*a+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(e,r){return this.tx+=e,this.ty+=r,this}scale(e,r){return this.a*=e,this.d*=r,this.c*=e,this.b*=r,this.tx*=e,this.ty*=r,this}rotate(e){const r=Math.cos(e),n=Math.sin(e),i=this.a,a=this.c,u=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=a*r-this.d*n,this.d=a*n+this.d*r,this.tx=u*r-this.ty*n,this.ty=u*n+this.ty*r,this}append(e){const r=this.a,n=this.b,i=this.c,a=this.d;return this.a=e.a*r+e.b*i,this.b=e.a*n+e.b*a,this.c=e.c*r+e.d*i,this.d=e.c*n+e.d*a,this.tx=e.tx*r+e.ty*i+this.tx,this.ty=e.tx*n+e.ty*a+this.ty,this}setTransform(e,r,n,i,a,u,l,h,p){return this.a=Math.cos(l+p)*a,this.b=Math.sin(l+p)*a,this.c=-Math.sin(l-h)*u,this.d=Math.cos(l-h)*u,this.tx=e-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(e){const r=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const n=this.a,i=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=i*e.a+this.d*e.c,this.d=i*e.b+this.d*e.d}return this.tx=r*e.a+this.ty*e.c+e.tx,this.ty=r*e.b+this.ty*e.d+e.ty,this}decompose(e){const r=this.a,n=this.b,i=this.c,a=this.d,u=e.pivot,l=-Math.atan2(-i,a),h=Math.atan2(n,r),p=Math.abs(l+h);return p<1e-5||Math.abs(ma-p)<1e-5?(e.rotation=h,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=l,e.skew.y=h),e.scale.x=Math.sqrt(r*r+n*n),e.scale.y=Math.sqrt(i*i+a*a),e.position.x=this.tx+(u.x*r+u.y*i),e.position.y=this.ty+(u.x*n+u.y*a),e}invert(){const e=this.a,r=this.b,n=this.c,i=this.d,a=this.tx,u=e*i-r*n;return this.a=i/u,this.b=-r/u,this.c=-n/u,this.d=e/u,this.tx=(n*this.ty-i*a)/u,this.ty=-(e*this.ty-r*a)/u,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new Yo;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}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new Yo}static get TEMP_MATRIX(){return new Yo}};const Pn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Mn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],On=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Fn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],ll=[],hd=[],_a=Math.sign;function IT(){for(let t=0;t<16;t++){const e=[];ll.push(e);for(let r=0;r<16;r++){const n=_a(Pn[t]*Pn[r]+On[t]*Mn[r]),i=_a(Mn[t]*Pn[r]+Fn[t]*Mn[r]),a=_a(Pn[t]*On[r]+On[t]*Fn[r]),u=_a(Mn[t]*On[r]+Fn[t]*Fn[r]);for(let l=0;l<16;l++)if(Pn[l]===n&&Mn[l]===i&&On[l]===a&&Fn[l]===u){e.push(l);break}}}for(let t=0;t<16;t++){const e=new Lt;e.set(Pn[t],Mn[t],On[t],Fn[t],0,0),hd.push(e)}}IT();const ut={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:t=>Pn[t],uY:t=>Mn[t],vX:t=>On[t],vY:t=>Fn[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>ll[t][e],sub:(t,e)=>ll[t][ut.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?ut.S:ut.N:Math.abs(e)*2<=Math.abs(t)?t>0?ut.E:ut.W:e>0?t>0?ut.SE:ut.SW:t>0?ut.NE:ut.NW,matrixAppendRotationInv:(t,e,r=0,n=0)=>{const i=hd[ut.inv(e)];i.tx=r,i.ty=n,t.append(i)}};class Nn{constructor(e,r,n=0,i=0){this._x=n,this._y=i,this.cb=e,this.scope=r}clone(e=this.cb,r=this.scope){return new Nn(e,r,this._x,this._y)}set(e=0,r=e){return(this._x!==e||this._y!==r)&&(this._x=e,this._y=r,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}const fd=class{constructor(){this.worldTransform=new Lt,this.localTransform=new Lt,this.position=new Nn(this.onChange,this,0,0),this.scale=new Nn(this.onChange,this,1,1),this.pivot=new Nn(this.onChange,this,0,0),this.skew=new Nn(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(t){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){const r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}}setFromMatrix(t){t.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())}};let cl=fd;cl.IDENTITY=new fd;var RT=`varying vec2 vTextureCoord;
37
21
 
38
22
  uniform sampler2D uSampler;
39
23
 
40
24
  void main(void){
41
25
  gl_FragColor *= texture2D(uSampler, vTextureCoord);
42
- }`,ME=`attribute vec2 aVertexPosition;
26
+ }`,PT=`attribute vec2 aVertexPosition;
43
27
  attribute vec2 aTextureCoord;
44
28
 
45
29
  uniform mat3 projectionMatrix;
@@ -50,7 +34,7 @@ void main(void){
50
34
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
51
35
  vTextureCoord = aTextureCoord;
52
36
  }
53
- `;function Bd(t,e,r){const n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),n}function vl(t){const e=new Array(t);for(let r=0;r<e.length;r++)e[r]=!1;return e}function Ud(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return vl(2*e);case"bvec3":return vl(3*e);case"bvec4":return vl(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const xi=[{test:t=>t.type==="float"&&t.size===1&&!t.isArray,code:t=>`
37
+ `;function dd(t,e,r){const n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),n}function hl(t){const e=new Array(t);for(let r=0;r<e.length;r++)e[r]=!1;return e}function pd(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return hl(2*e);case"bvec3":return hl(3*e);case"bvec4":return hl(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const mi=[{test:t=>t.type==="float"&&t.size===1&&!t.isArray,code:t=>`
54
38
  if(uv["${t}"] !== ud["${t}"].value)
55
39
  {
56
40
  ud["${t}"].value = uv["${t}"]
@@ -170,7 +154,7 @@ void main(void){
170
154
  cv[3] = v[3];
171
155
 
172
156
  gl.uniform4f(ud["${t}"].location, v[0], v[1], v[2], v[3])
173
- }`}],OE={float:`
157
+ }`}],MT={float:`
174
158
  if (cv !== v)
175
159
  {
176
160
  cu.value = v;
@@ -306,7 +290,7 @@ void main(void){
306
290
  cu.value = v;
307
291
 
308
292
  gl.uniform1i(location, v);
309
- }`},FE={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function NE(t,e){var n;const r=[`
293
+ }`},OT={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function FT(t,e){var n;const r=[`
310
294
  var v = null;
311
295
  var cv = null;
312
296
  var cu = null;
@@ -316,18 +300,18 @@ void main(void){
316
300
  renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}');
317
301
  `):r.push(`
318
302
  renderer.shader.syncUniformGroup(uv.${i}, syncData);
319
- `));continue}const u=t.uniforms[i];let l=!1;for(let f=0;f<xi.length;f++)if(xi[f].test(a,u)){r.push(xi[f].code(i,u)),l=!0;break}if(!l){const p=(a.size===1&&!a.isArray?OE:FE)[a.type].replace("location",`ud["${i}"].location`);r.push(`
303
+ `));continue}const u=t.uniforms[i];let l=!1;for(let h=0;h<mi.length;h++)if(mi[h].test(a,u)){r.push(mi[h].code(i,u)),l=!0;break}if(!l){const p=(a.size===1&&!a.isArray?MT:OT)[a.type].replace("location",`ud["${i}"].location`);r.push(`
320
304
  cu = ud["${i}"];
321
305
  cv = cu.value;
322
306
  v = uv["${i}"];
323
307
  ${p};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
324
- `))}const $d={};let bi=$d;function LE(){if(bi===$d||bi!=null&&bi.isContextLost()){const t=Re.ADAPTER.createCanvas();let e;Re.PREFER_ENV>=Sn.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),bi=e}return bi}let Ia;function kE(){if(!Ia){Ia=tr.MEDIUM;const t=LE();t&&t.getShaderPrecisionFormat&&(Ia=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?tr.HIGH:tr.MEDIUM)}return Ia}function Gd(t,e){const r=t.getShaderSource(e).split(`
308
+ `))}const gd={};let vi=gd;function NT(){if(vi===gd||vi!=null&&vi.isContextLost()){const t=Ee.ADAPTER.createCanvas();let e;Ee.PREFER_ENV>=wn.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),vi=e}return vi}let ya;function LT(){if(!ya){ya=tr.MEDIUM;const t=NT();t&&t.getShaderPrecisionFormat&&(ya=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?tr.HIGH:tr.MEDIUM)}return ya}function md(t,e){const r=t.getShaderSource(e).split(`
325
309
  `).map((p,g)=>`${g}: ${p}`),n=t.getShaderInfoLog(e),i=n.split(`
326
- `),a={},u=i.map(p=>parseFloat(p.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(p=>p&&!a[p]?(a[p]=!0,!0):!1),l=[""];u.forEach(p=>{r[p-1]=`%c${r[p-1]}%c`,l.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const f=r.join(`
327
- `);l[0]=f,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function DE(t,e,r,n){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||Gd(t,r),t.getShaderParameter(n,t.COMPILE_STATUS)||Gd(t,n),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}const BE={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Hd(t){return BE[t]}let Ra=null;const zd={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Vd(t,e){if(!Ra){const r=Object.keys(zd);Ra={};for(let n=0;n<r.length;++n){const i=r[n];Ra[t[i]]=zd[i]}}return Ra[e]}function jd(t,e,r){if(t.substring(0,9)!=="precision"){let n=e;return e===tr.HIGH&&r!==tr.HIGH&&(n=tr.MEDIUM),`precision ${n} float;
328
- ${t}`}else if(r!==tr.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}let ms;function UE(){if(typeof ms=="boolean")return ms;try{ms=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{ms=!1}return ms}let $E=0;const Pa={},Ti=class{constructor(t,e,r="pixi-shader",n={}){this.extra={},this.id=$E++,this.vertexSrc=t||Ti.defaultVertexSrc,this.fragmentSrc=e||Ti.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),Pa[r]?(Pa[r]++,r+=`-${Pa[r]}`):Pa[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
310
+ `),a={},u=i.map(p=>parseFloat(p.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(p=>p&&!a[p]?(a[p]=!0,!0):!1),l=[""];u.forEach(p=>{r[p-1]=`%c${r[p-1]}%c`,l.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const h=r.join(`
311
+ `);l[0]=h,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function kT(t,e,r,n){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||md(t,r),t.getShaderParameter(n,t.COMPILE_STATUS)||md(t,n),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}const BT={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function vd(t){return BT[t]}let xa=null;const _d={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function yd(t,e){if(!xa){const r=Object.keys(_d);xa={};for(let n=0;n<r.length;++n){const i=r[n];xa[t[i]]=_d[i]}}return xa[e]}function xd(t,e,r){if(t.substring(0,9)!=="precision"){let n=e;return e===tr.HIGH&&r!==tr.HIGH&&(n=tr.MEDIUM),`precision ${n} float;
312
+ ${t}`}else if(r!==tr.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}let ds;function DT(){if(typeof ds=="boolean")return ds;try{ds=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{ds=!1}return ds}let UT=0;const ba={},_i=class{constructor(t,e,r="pixi-shader",n={}){this.extra={},this.id=UT++,this.vertexSrc=t||_i.defaultVertexSrc,this.fragmentSrc=e||_i.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),ba[r]?(ba[r]++,r+=`-${ba[r]}`):ba[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
329
313
  ${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${r}
330
- ${this.fragmentSrc}`,this.vertexSrc=jd(this.vertexSrc,Ti.defaultVertexPrecision,tr.HIGH),this.fragmentSrc=jd(this.fragmentSrc,Ti.defaultFragmentPrecision,kE())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return ME}static get defaultFragmentSrc(){return PE}static from(t,e,r){const n=t+e;let i=Pd[n];return i||(Pd[n]=i=new Ti(t,e,r)),i}};let Hr=Ti;Hr.defaultVertexPrecision=tr.HIGH,Hr.defaultFragmentPrecision=oi.apple.device?tr.HIGH:tr.MEDIUM;let GE=0;class pr{constructor(e,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=GE++,this.static=!!r,this.ubo=!!n,e instanceof kt?(this.buffer=e,this.buffer.type=Mr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new kt(new Float32Array(1)),this.buffer.type=Mr.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,r,n){if(!this.ubo)this.uniforms[e]=new pr(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,r,n){return new pr(e,r,n)}static uboFrom(e,r){return new pr(e,r??!0,!0)}}class vs{constructor(e,r){this.uniformBindCount=0,this.program=e,r?r instanceof pr?this.uniformGroup=r:this.uniformGroup=new pr(r):this.uniformGroup=new pr({}),this.disposeRunner=new dr("disposeShader")}checkUniformExists(e,r){if(r.uniforms[e])return!0;for(const n in r.uniforms){const i=r.uniforms[n];if(i.group&&this.checkUniformExists(e,i))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,r,n){const i=Hr.from(e,r);return new vs(i,n)}}class HE{constructor(e,r){if(this.vertexSrc=e,this.fragTemplate=r,this.programCache={},this.defaultGroupCache={},!r.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!r.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const n=new Int32Array(e);for(let a=0;a<e;a++)n[a]=a;this.defaultGroupCache[e]=pr.from({uSamplers:n},!0);let i=this.fragTemplate;i=i.replace(/%count%/gi,`${e}`),i=i.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new Hr(this.vertexSrc,i)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new Dt,default:this.defaultGroupCache[e]};return new vs(this.programCache[e],r)}generateSampleSrc(e){let r="";r+=`
314
+ ${this.fragmentSrc}`,this.vertexSrc=xd(this.vertexSrc,_i.defaultVertexPrecision,tr.HIGH),this.fragmentSrc=xd(this.fragmentSrc,_i.defaultFragmentPrecision,LT())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return PT}static get defaultFragmentSrc(){return RT}static from(t,e,r){const n=t+e;let i=sd[n];return i||(sd[n]=i=new _i(t,e,r)),i}};let Hr=_i;Hr.defaultVertexPrecision=tr.HIGH,Hr.defaultFragmentPrecision=ni.apple.device?tr.HIGH:tr.MEDIUM;let $T=0;class pr{constructor(e,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=$T++,this.static=!!r,this.ubo=!!n,e instanceof Nt?(this.buffer=e,this.buffer.type=Mr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new Nt(new Float32Array(1)),this.buffer.type=Mr.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,r,n){if(!this.ubo)this.uniforms[e]=new pr(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,r,n){return new pr(e,r,n)}static uboFrom(e,r){return new pr(e,r??!0,!0)}}class ps{constructor(e,r){this.uniformBindCount=0,this.program=e,r?r instanceof pr?this.uniformGroup=r:this.uniformGroup=new pr(r):this.uniformGroup=new pr({}),this.disposeRunner=new dr("disposeShader")}checkUniformExists(e,r){if(r.uniforms[e])return!0;for(const n in r.uniforms){const i=r.uniforms[n];if(i.group&&this.checkUniformExists(e,i))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,r,n){const i=Hr.from(e,r);return new ps(i,n)}}class GT{constructor(e,r){if(this.vertexSrc=e,this.fragTemplate=r,this.programCache={},this.defaultGroupCache={},!r.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!r.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const n=new Int32Array(e);for(let a=0;a<e;a++)n[a]=a;this.defaultGroupCache[e]=pr.from({uSamplers:n},!0);let i=this.fragTemplate;i=i.replace(/%count%/gi,`${e}`),i=i.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new Hr(this.vertexSrc,i)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new Lt,default:this.defaultGroupCache[e]};return new ps(this.programCache[e],r)}generateSampleSrc(e){let r="";r+=`
331
315
  `,r+=`
332
316
  `;for(let n=0;n<e;n++)n>0&&(r+=`
333
317
  else `),n<e-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
@@ -335,7 +319,7 @@ else `),n<e-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
335
319
  color = texture2D(uSamplers[${n}], vTextureCoord);`,r+=`
336
320
  }`;return r+=`
337
321
  `,r+=`
338
- `,r}}class _l{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function zE(){return!oi.apple.device}function VE(t){let e=!0;const r=Re.ADAPTER.getNavigator();if(oi.tablet||oi.phone){if(oi.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(e=!1)}if(oi.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(e=!1)}}return e?t:4}class Xd{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var jE=`varying vec2 vTextureCoord;
322
+ `,r}}class fl{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function HT(){return!ni.apple.device}function zT(t){let e=!0;const r=Ee.ADAPTER.getNavigator();if(ni.tablet||ni.phone){if(ni.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(e=!1)}if(ni.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(e=!1)}}return e?t:4}class bd{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var VT=`varying vec2 vTextureCoord;
339
323
  varying vec4 vColor;
340
324
  varying float vTextureId;
341
325
  uniform sampler2D uSamplers[%count%];
@@ -345,7 +329,7 @@ void main(void){
345
329
  %forloop%
346
330
  gl_FragColor = color * vColor;
347
331
  }
348
- `,XE=`precision highp float;
332
+ `,jT=`precision highp float;
349
333
  attribute vec2 aVertexPosition;
350
334
  attribute vec2 aTextureCoord;
351
335
  attribute vec4 aColor;
@@ -366,14 +350,14 @@ void main(void){
366
350
  vTextureId = aTextureId;
367
351
  vColor = aColor * tint;
368
352
  }
369
- `;const gr=class extends Xd{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=Ld,this.vertexSize=6,this.state=wa.for2d(),this.size=gr.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),t.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??VE(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??zE(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return ke("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return XE}static get defaultFragmentTemplate(){return jE}setShaderGenerator({vertex:t=gr.defaultVertexSrc,fragment:e=gr.defaultFragmentTemplate}={}){this.shaderGenerator=new HE(t,e)}contextChange(){const t=this.renderer.gl;Re.PREFER_ENV===Sn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),gr.defaultMaxTextures),this.maxTextures=xE(this.maxTextures,t)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:t,_textureArrayPool:e}=gr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;t.length<r;)t.push(new fl);for(;e.length<n;)e.push(new _l);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)}buildTexturesAndDrawCalls(){const{_bufferedTextures:t,maxTextures:e}=this,r=gr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,a=this.renderer.textureGC.count;let u=++He._globalBatch,l=0,f=r[0],p=0;n.copyBoundTextures(i,e);for(let g=0;g<this._bufferSize;++g){const c=t[g];t[g]=null,c._batchEnabled!==u&&(f.count>=e&&(n.boundArray(f,i,u,e),this.buildDrawCalls(f,p,g),p=g,f=r[++l],++u),c._batchEnabled=u,c.touched=a,f.elements[f.count++]=c)}f.count>0&&(n.boundArray(f,i,u,e),this.buildDrawCalls(f,p,this._bufferSize),++l,++u);for(let g=0;g<i.length;g++)i[g]=null;He._globalBatch=u}buildDrawCalls(t,e,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:a,vertexSize:u}=this,l=gr._drawCallPool;let f=this._dcIndex,p=this._aIndex,g=this._iIndex,c=l[f];c.start=this._iIndex,c.texArray=t;for(let d=e;d<r;++d){const m=n[d],_=m._texture.baseTexture,y=pE[_.alphaMode?1:0][m.blendMode];n[d]=null,e<d&&c.blend!==y&&(c.size=g-c.start,e=d,c=l[++f],c.texArray=t,c.start=g),this.packInterleavedGeometry(m,i,a,p,g),p+=m.vertexData.length/2*u,g+=m.indices.length,c.blend=y}e<r&&(c.size=g-c.start,++f),this._dcIndex=f,this._aIndex=p,this._iIndex=g}bindAndClearTexArray(t){const e=this.renderer.texture;for(let r=0;r<t.count;r++)e.bind(t.elements[r],t.ids[r]),t.elements[r]=null;t.count=0}updateGeometry(){const{_packedGeometries:t,_attributeBuffer:e,_indexBuffer:r}=this;gr.canUploadSameBuffer?(t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,t[this._flushId]=new this.geometryClass),t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(t[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const t=this._dcIndex,{gl:e,state:r}=this.renderer,n=gr._drawCallPool;let i=null;for(let a=0;a<t;a++){const{texArray:u,type:l,size:f,start:p,blend:g}=n[a];i!==u&&(i=u,this.bindAndClearTexArray(u)),this.state.blendMode=g,r.set(this.state),e.drawElements(l,f,e.UNSIGNED_SHORT,p*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),gr.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]&&this._packedGeometries[t].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(t){const e=xa(Math.ceil(t/8)),r=Rd(e),n=e*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._aBuffers[n];return i||(this._aBuffers[n]=i=new vE(n*this.vertexSize*4)),i}getIndexBuffer(t){const e=xa(Math.ceil(t/12)),r=Rd(e),n=e*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._iBuffers[r];return i||(this._iBuffers[r]=i=new Uint16Array(n)),i}packInterleavedGeometry(t,e,r,n,i){const{uint32View:a,float32View:u}=e,l=n/this.vertexSize,f=t.uvs,p=t.indices,g=t.vertexData,c=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),m=Ot.shared.setValue(t._tintRGB).toPremultiplied(d);for(let _=0;_<g.length;_+=2)u[n++]=g[_],u[n++]=g[_+1],u[n++]=f[_],u[n++]=f[_+1],a[n++]=m,u[n++]=c;for(let _=0;_<p.length;_++)r[i++]=l+p[_]}};let mr=gr;mr.defaultBatchSize=4096,mr.extension={name:"batch",type:Ne.RendererPlugin},mr._drawCallPool=[],mr._textureArrayPool=[],Ye.add(mr);var WE=`varying vec2 vTextureCoord;
353
+ `;const gr=class extends bd{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=cd,this.vertexSize=6,this.state=pa.for2d(),this.size=gr.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),t.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??zT(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??HT(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return Le("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return jT}static get defaultFragmentTemplate(){return VT}setShaderGenerator({vertex:t=gr.defaultVertexSrc,fragment:e=gr.defaultFragmentTemplate}={}){this.shaderGenerator=new GT(t,e)}contextChange(){const t=this.renderer.gl;Ee.PREFER_ENV===wn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),gr.defaultMaxTextures),this.maxTextures=yT(this.maxTextures,t)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:t,_textureArrayPool:e}=gr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;t.length<r;)t.push(new al);for(;e.length<n;)e.push(new fl);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)}buildTexturesAndDrawCalls(){const{_bufferedTextures:t,maxTextures:e}=this,r=gr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,a=this.renderer.textureGC.count;let u=++Ue._globalBatch,l=0,h=r[0],p=0;n.copyBoundTextures(i,e);for(let g=0;g<this._bufferSize;++g){const c=t[g];t[g]=null,c._batchEnabled!==u&&(h.count>=e&&(n.boundArray(h,i,u,e),this.buildDrawCalls(h,p,g),p=g,h=r[++l],++u),c._batchEnabled=u,c.touched=a,h.elements[h.count++]=c)}h.count>0&&(n.boundArray(h,i,u,e),this.buildDrawCalls(h,p,this._bufferSize),++l,++u);for(let g=0;g<i.length;g++)i[g]=null;Ue._globalBatch=u}buildDrawCalls(t,e,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:a,vertexSize:u}=this,l=gr._drawCallPool;let h=this._dcIndex,p=this._aIndex,g=this._iIndex,c=l[h];c.start=this._iIndex,c.texArray=t;for(let d=e;d<r;++d){const m=n[d],_=m._texture.baseTexture,y=dT[_.alphaMode?1:0][m.blendMode];n[d]=null,e<d&&c.blend!==y&&(c.size=g-c.start,e=d,c=l[++h],c.texArray=t,c.start=g),this.packInterleavedGeometry(m,i,a,p,g),p+=m.vertexData.length/2*u,g+=m.indices.length,c.blend=y}e<r&&(c.size=g-c.start,++h),this._dcIndex=h,this._aIndex=p,this._iIndex=g}bindAndClearTexArray(t){const e=this.renderer.texture;for(let r=0;r<t.count;r++)e.bind(t.elements[r],t.ids[r]),t.elements[r]=null;t.count=0}updateGeometry(){const{_packedGeometries:t,_attributeBuffer:e,_indexBuffer:r}=this;gr.canUploadSameBuffer?(t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,t[this._flushId]=new this.geometryClass),t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(t[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const t=this._dcIndex,{gl:e,state:r}=this.renderer,n=gr._drawCallPool;let i=null;for(let a=0;a<t;a++){const{texArray:u,type:l,size:h,start:p,blend:g}=n[a];i!==u&&(i=u,this.bindAndClearTexArray(u)),this.state.blendMode=g,r.set(this.state),e.drawElements(l,h,e.UNSIGNED_SHORT,p*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),gr.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]&&this._packedGeometries[t].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(t){const e=ha(Math.ceil(t/8)),r=id(e),n=e*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._aBuffers[n];return i||(this._aBuffers[n]=i=new mT(n*this.vertexSize*4)),i}getIndexBuffer(t){const e=ha(Math.ceil(t/12)),r=id(e),n=e*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._iBuffers[r];return i||(this._iBuffers[r]=i=new Uint16Array(n)),i}packInterleavedGeometry(t,e,r,n,i){const{uint32View:a,float32View:u}=e,l=n/this.vertexSize,h=t.uvs,p=t.indices,g=t.vertexData,c=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),m=Mt.shared.setValue(t._tintRGB).toPremultiplied(d);for(let _=0;_<g.length;_+=2)u[n++]=g[_],u[n++]=g[_+1],u[n++]=h[_],u[n++]=h[_+1],a[n++]=m,u[n++]=c;for(let _=0;_<p.length;_++)r[i++]=l+p[_]}};let mr=gr;mr.defaultBatchSize=4096,mr.extension={name:"batch",type:Oe.RendererPlugin},mr._drawCallPool=[],mr._textureArrayPool=[],We.add(mr);var XT=`varying vec2 vTextureCoord;
370
354
 
371
355
  uniform sampler2D uSampler;
372
356
 
373
357
  void main(void){
374
358
  gl_FragColor = texture2D(uSampler, vTextureCoord);
375
359
  }
376
- `,qE=`attribute vec2 aVertexPosition;
360
+ `,WT=`attribute vec2 aVertexPosition;
377
361
 
378
362
  uniform mat3 projectionMatrix;
379
363
 
@@ -399,7 +383,7 @@ void main(void)
399
383
  gl_Position = filterVertexPosition();
400
384
  vTextureCoord = filterTextureCoord();
401
385
  }
402
- `;const _s=class extends vs{constructor(t,e,r){const n=Hr.from(t||_s.defaultVertexSrc,e||_s.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=_s.defaultResolution,this.multisample=_s.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new wa}apply(t,e,r,n,i){t.applyFilter(this,e,r,n)}get blendMode(){return this.state.blendMode}set blendMode(t){this.state.blendMode=t}get resolution(){return this._resolution}set resolution(t){this._resolution=t}static get defaultVertexSrc(){return qE}static get defaultFragmentSrc(){return WE}};let je=_s;je.defaultResolution=1,je.defaultMultisample=vt.NONE;class Ma{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Ot(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=e,a=n??r;a!==void 0&&(this.color=a),this.alpha=i}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}Ma.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},Ma.extension={type:[Ne.RendererSystem,Ne.CanvasRendererSystem],name:"background"},Ye.add(Ma);class Wd{constructor(e){this.renderer=e,this.emptyRenderer=new Xd(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)e[i]=n[i]||null,e[i]&&(e[i]._batchLocation=i)}boundArray(e,r,n,i){const{elements:a,ids:u,count:l}=e;let f=0;for(let p=0;p<l;p++){const g=a[p],c=g._batchLocation;if(c>=0&&c<i&&r[c]===g){u[p]=c;continue}for(;f<i;){const d=r[f];if(d&&d._batchEnabled===n&&d._batchLocation===f){f++;continue}u[p]=f,g._batchLocation=f,r[f]=g;break}}}destroy(){this.renderer=null}}Wd.extension={type:Ne.RendererSystem,name:"batch"},Ye.add(Wd);let qd=0;class Oa{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=qd++}init(e){if(e.context)this.initFromContext(e.context);else{const r=this.renderer.background.alpha<1,n=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=qd++,this.renderer.runners.contextChange.emit(e);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const r=this.createContext(this.renderer.view,e);this.initFromContext(r)}createContext(e,r){let n;if(Re.PREFER_ENV>=Sn.WEBGL2&&(n=e.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",r)||e.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,r={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const r=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}Oa.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},Oa.extension={type:Ne.RendererSystem,name:"context"},Ye.add(Oa);class YE extends hl{upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===sn.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?i.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,i.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}}class yl{constructor(e,r){this.width=Math.round(e||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new dr("disposeFramebuffer"),this.multisample=vt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new He(null,{scaleMode:Pr.NEAREST,resolution:1,mipmap:An.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new He(new YE(null,{width:this.width,height:this.height}),{scaleMode:Pr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:An.OFF,format:Z.DEPTH_COMPONENT,type:Ge.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,r){if(e=Math.round(e),r=Math.round(r),!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],a=i.resolution;i.setSize(e/a,r/a)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(e/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class Yd extends He{constructor(e={}){if(typeof e=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],a=arguments[3];e={width:r,height:n,scaleMode:i,resolution:a}}e.width=e.width||100,e.height=e.height||100,e.multisample??(e.multisample=vt.NONE),super(null,e),this.mipmap=An.OFF,this.valid=!0,this._clear=new Ot([0,0,0,0]),this.framebuffer=new yl(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=e.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(e){this._clear.setValue(e)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(e,r){this.framebuffer.resize(e*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class cn extends ds{constructor(e){const r=e,n=r.naturalWidth||r.videoWidth||r.width,i=r.naturalHeight||r.videoHeight||r.height;super(n,i),this.source=e,this.noSubImage=!1}static crossOrigin(e,r,n){n===void 0&&!r.startsWith("data:")?e.crossOrigin=mE(r):n!==!1&&(e.crossOrigin=typeof n=="string"?n:"anonymous")}upload(e,r,n,i){const a=e.gl,u=r.realWidth,l=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1&&i.buffered.length===0)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===sn.UNPACK),!this.noSubImage&&r.target===a.TEXTURE_2D&&n.width===u&&n.height===l?a.texSubImage2D(a.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=u,n.height=l,a.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const e=this.source,r=e.naturalWidth||e.videoWidth||e.width,n=e.naturalHeight||e.videoHeight||e.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class Kd extends cn{constructor(e,r){if(r=r||{},typeof e=="string"){const n=new Image;cn.crossOrigin(n,e,r.crossorigin),n.src=e,e=n}super(e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??Re.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(e){return this._load?this._load:(e!==void 0&&(this.createBitmap=e),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const a=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?a():(i.onload=a,i.onerror=u=>{n(u),this.onError.emit(u)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===sn.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const a=r._glTextures;for(const u in a){const l=a[u];if(l!==n&&l.dirtyId!==r.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class Zd{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,r,n){const i=r.width,a=r.height;if(n){const u=e.width/2/i,l=e.height/2/a,f=e.x/i+u,p=e.y/a+l;n=ut.add(n,ut.NW),this.x0=f+u*ut.uX(n),this.y0=p+l*ut.uY(n),n=ut.add(n,2),this.x1=f+u*ut.uX(n),this.y1=p+l*ut.uY(n),n=ut.add(n,2),this.x2=f+u*ut.uX(n),this.y2=p+l*ut.uY(n),n=ut.add(n,2),this.x3=f+u*ut.uX(n),this.y3=p+l*ut.uY(n)}else this.x0=e.x/i,this.y0=e.y/a,this.x1=(e.x+e.width)/i,this.y1=e.y/a,this.x2=(e.x+e.width)/i,this.y2=(e.y+e.height)/a,this.x3=e.x/i,this.y3=(e.y+e.height)/a;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const Qd=new Zd;function Fa(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}class Ue extends na{constructor(e,r,n,i,a,u,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new Qe(0,0,1,1)),e instanceof Ue&&(e=e.baseTexture),this.baseTexture=e,this._frame=r,this.trim=i,this.valid=!1,this._uvs=Qd,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(a||0),a===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=u?new et(u.x,u.y):new et(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=r:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:r}=this.baseTexture;r!=null&&r.url&&Lr[r.url]&&Ue.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Ue.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const e=this._frame.clone(),r=this._frame===this.orig?e:this.orig.clone(),n=new Ue(this.baseTexture,!this.noFrame&&e,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=e),n}updateUvs(){this._uvs===Qd&&(this._uvs=new Zd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,r={},n=Re.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let a=null;if(i)a=e;else if(e instanceof He){if(!e.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${l}-${fs()}`,He.addToCache(e,e.cacheId)}a=e.cacheId}else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${fs()}`}a=e._pixiId}let u=Lr[a];if(i&&n&&!u)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!u&&!(e instanceof He)?(r.resolution||(r.resolution=Md(e)),u=new Ue(new He(e,r)),u.baseTexture.cacheId=a,He.addToCache(u.baseTexture,a),Ue.addToCache(u,a)):!u&&e instanceof He&&(u=new Ue(e),Ue.addToCache(u,a)),u}static fromURL(e,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Ue.from(e,Object.assign({resourceOptions:n},r),!1),a=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):a.load().then(()=>Promise.resolve(i))}static fromBuffer(e,r,n,i){return new Ue(He.fromBuffer(e,r,n,i))}static fromLoader(e,r,n,i){const a=new He(e,Object.assign({scaleMode:He.defaultOptions.scaleMode,resolution:Md(r)},i)),{resource:u}=a;u instanceof Kd&&(u.url=r);const l=new Ue(a);return n||(n=r),He.addToCache(l.baseTexture,n),Ue.addToCache(l,n),n!==r&&(He.addToCache(l.baseTexture,r),Ue.addToCache(l,r)),l.baseTexture.valid?Promise.resolve(l):new Promise(f=>{l.baseTexture.once("loaded",()=>f(l))})}static addToCache(e,r){r&&(e.textureCacheIds.includes(r)||e.textureCacheIds.push(r),Lr[r]&&Lr[r]!==e&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Lr[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=Lr[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete Lr[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)Lr[e.textureCacheIds[r]]===e&&delete Lr[e.textureCacheIds[r]];return e.textureCacheIds.length=0,e}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(e){this._frame=e,this.noFrame=!1;const{x:r,y:n,width:i,height:a}=e,u=r+i>this.baseTexture.width,l=n+a>this.baseTexture.height;if(u||l){const f=u&&l?"and":"or",p=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,g=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${p} ${f} ${g}`)}this.valid=i&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Ue._EMPTY||(Ue._EMPTY=new Ue(new He),Fa(Ue._EMPTY),Fa(Ue._EMPTY.baseTexture)),Ue._EMPTY}static get WHITE(){if(!Ue._WHITE){const e=Re.ADAPTER.createCanvas(16,16),r=e.getContext("2d");e.width=16,e.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Ue._WHITE=new Ue(He.from(e)),Fa(Ue._WHITE),Fa(Ue._WHITE.baseTexture)}return Ue._WHITE}}class Na extends Ue{constructor(e,r){super(e,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,r,n=!0){const i=this.baseTexture.resolution,a=Math.round(e*i)/i,u=Math.round(r*i)/i;this.valid=a>0&&u>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=u,n&&this.baseTexture.resize(a,u),this.updateUvs()}setResolution(e){const{baseTexture:r}=this;r.resolution!==e&&(r.setResolution(e),this.resize(r.width,r.height,!1))}static create(e){return new Na(new Yd(e))}}class Jd{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,r,n=vt.NONE){const i=new Yd(Object.assign({width:e,height:r,resolution:1,multisample:n},this.textureOptions));return new Na(i)}getOptimalTexture(e,r,n=1,i=vt.NONE){let a;e=Math.ceil(e*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||e!==this._pixelsWidth||r!==this._pixelsHeight?(e=xa(e),r=xa(r),a=((e&65535)<<16|r&65535)>>>0,i>1&&(a+=i*4294967296)):a=i>1?-i:-1,this.texturePool[a]||(this.texturePool[a]=[]);let u=this.texturePool[a].pop();return u||(u=this.createTexture(e,r,i)),u.filterPoolKey=a,u.setResolution(n),u}getFilterTexture(e,r,n){const i=this.getOptimalTexture(e.width,e.height,r||e.resolution,n||vt.NONE);return i.filterFrame=e.filterFrame,i}returnTexture(e){const r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}}}Jd.SCREEN_KEY=-1;class KE extends yi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class ZE extends yi{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new kt(this.vertices),this.uvBuffer=new kt(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(e,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/e.width,this.uvs[3]=i,this.uvs[4]=n+r.width/e.width,this.uvs[5]=i+r.height/e.height,this.uvs[6]=n,this.uvs[7]=i+r.height/e.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class QE{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=vt.NONE,this.sourceFrame=new Qe,this.destinationFrame=new Qe,this.bindingSourceFrame=new Qe,this.bindingDestinationFrame=new Qe,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const La=[new et,new et,new et,new et],xl=new Dt;class ep{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new Jd,this.statePool=[],this.quad=new KE,this.quadUv=new ZE,this.tempRect=new Qe,this.activeState={},this.globalUniforms=new pr({outputFrame:new Qe,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(e,r){const n=this.renderer,i=this.defaultFilterStack,a=this.statePool.pop()||new QE,u=this.renderer.renderTexture;let l=r[0].resolution,f=r[0].multisample,p=r[0].padding,g=r[0].autoFit,c=r[0].legacy??!0;for(let _=1;_<r.length;_++){const y=r[_];l=Math.min(l,y.resolution),f=Math.min(f,y.multisample),p=this.useMaxPadding?Math.max(p,y.padding):p+y.padding,g=g&&y.autoFit,c=c||(y.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=u.current),i.push(a),a.resolution=l,a.multisample=f,a.legacy=c,a.target=e,a.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),a.sourceFrame.pad(p);const d=this.tempRect.copyFrom(u.sourceFrame);n.projection.transform&&this.transformAABB(xl.copyFrom(n.projection.transform).invert(),d),g?(a.sourceFrame.fit(d),(a.sourceFrame.width<=0||a.sourceFrame.height<=0)&&(a.sourceFrame.width=0,a.sourceFrame.height=0)):a.sourceFrame.intersects(d)||(a.sourceFrame.width=0,a.sourceFrame.height=0),this.roundFrame(a.sourceFrame,u.current?u.current.resolution:n.resolution,u.sourceFrame,u.destinationFrame,n.projection.transform),a.renderTexture=this.getOptimalFilterTexture(a.sourceFrame.width,a.sourceFrame.height,l,f),a.filters=r,a.destinationFrame.width=a.renderTexture.width,a.destinationFrame.height=a.renderTexture.height;const m=this.tempRect;m.x=0,m.y=0,m.width=a.sourceFrame.width,m.height=a.sourceFrame.height,a.renderTexture.filterFrame=a.sourceFrame,a.bindingSourceFrame.copyFrom(u.sourceFrame),a.bindingDestinationFrame.copyFrom(u.destinationFrame),a.transform=n.projection.transform,n.projection.transform=null,u.bind(a.renderTexture,a.sourceFrame,m),n.framebuffer.clear(0,0,0,0)}pop(){const e=this.defaultFilterStack,r=e.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const a=i.inputSize,u=i.inputPixel,l=i.inputClamp;if(a[0]=r.destinationFrame.width,a[1]=r.destinationFrame.height,a[2]=1/a[0],a[3]=1/a[1],u[0]=Math.round(a[0]*r.resolution),u[1]=Math.round(a[1]*r.resolution),u[2]=1/u[0],u[3]=1/u[1],l[0]=.5*u[2],l[1]=.5*u[3],l[2]=r.sourceFrame.width*a[2]-.5*u[2],l[3]=r.sourceFrame.height*a[3]-.5*u[3],r.legacy){const p=i.filterArea;p[0]=r.destinationFrame.width,p[1]=r.destinationFrame.height,p[2]=r.sourceFrame.x,p[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const f=e[e.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,f.renderTexture,En.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let p=r.renderTexture,g=this.getOptimalFilterTexture(p.width,p.height,r.resolution);g.filterFrame=p.filterFrame;let c=0;for(c=0;c<n.length-1;++c){c===1&&r.multisample>1&&(g=this.getOptimalFilterTexture(p.width,p.height,r.resolution),g.filterFrame=p.filterFrame),n[c].apply(this,p,g,En.CLEAR,r);const d=p;p=g,g=d}n[c].apply(this,p,f.renderTexture,En.BLEND,r),c>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(p),this.returnFilterTexture(g)}r.clear(),this.statePool.push(r)}bindAndClear(e,r=En.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e!=null&&e.filterFrame){const u=this.tempRect;u.x=0,u.y=0,u.width=e.filterFrame.width,u.height=e.filterFrame.height,n.bind(e,e.filterFrame,u)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const a=i.stateId&1||this.forceClear;(r===En.CLEAR||r===En.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,r,n,i){const a=this.renderer;a.state.set(e.state),this.bindAndClear(n,i),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(nn.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(nn.TRIANGLE_STRIP))}calculateSpriteMatrix(e,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:a}=r._texture,u=e.set(i.width,0,0,i.height,n.x,n.y),l=r.worldTransform.copyTo(Dt.TEMP_MATRIX);return l.invert(),u.prepend(l),u.scale(1/a.width,1/a.height),u.translate(r.anchor.x,r.anchor.y),u}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,r,n=1,i=vt.NONE){return this.texturePool.getOptimalTexture(e,r,n,i)}getFilterTexture(e,r,n){if(typeof e=="number"){const a=e;e=r,r=a}e=e||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,n||vt.NONE);return i.filterFrame=e.filterFrame,i}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,r){const n=La[0],i=La[1],a=La[2],u=La[3];n.set(r.left,r.top),i.set(r.left,r.bottom),a.set(r.right,r.top),u.set(r.right,r.bottom),e.apply(n,n),e.apply(i,i),e.apply(a,a),e.apply(u,u);const l=Math.min(n.x,i.x,a.x,u.x),f=Math.min(n.y,i.y,a.y,u.y),p=Math.max(n.x,i.x,a.x,u.x),g=Math.max(n.y,i.y,a.y,u.y);r.x=l,r.y=f,r.width=p-l,r.height=g-f}roundFrame(e,r,n,i,a){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(a){const{a:u,b:l,c:f,d:p}=a;if((Math.abs(l)>1e-4||Math.abs(f)>1e-4)&&(Math.abs(u)>1e-4||Math.abs(p)>1e-4))return}a=a?xl.copyFrom(a):xl.identity(),a.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(a,e),e.ceil(r),this.transformAABB(a.invert(),e)}}}ep.extension={type:Ne.RendererSystem,name:"filter"},Ye.add(ep);class JE{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=vt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const eC=new Qe;class tp{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new yl(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Qe,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Re.PREFER_ENV===Sn.WEBGL_LEGACY&&(r=null,n=null),r?e.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,e.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,r,n=0){const{gl:i}=this;if(e){const a=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,a.mipLevel=n),a.dirtyId!==e.dirtyId&&(a.dirtyId=e.dirtyId,a.dirtyFormat!==e.dirtyFormat?(a.dirtyFormat=e.dirtyFormat,a.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):a.dirtySize!==e.dirtySize&&(a.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let u=0;u<e.colorTextures.length;u++){const l=e.colorTextures[u];this.renderer.texture.unbind(l.parentTextureArray||l)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),r){const u=r.width>>n,l=r.height>>n,f=u/r.width;this.setViewport(r.x*f,r.y*f,u,l)}else{const u=e.width>>n,l=e.height>>n;this.setViewport(0,0,u,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,r,n,i){const a=this.viewport;e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i),(a.width!==n||a.height!==i||a.x!==e||a.y!==r)&&(a.x=e,a.y=r,a.width=n,a.height=i,this.gl.viewport(e,r,n,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,r,n,i,a=pu.COLOR|pu.DEPTH){const{gl:u}=this;u.clearColor(e,r,n,i),u.clear(a)}initFramebuffer(e){const{gl:r}=this,n=new JE(r.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n}resizeFramebuffer(e){const{gl:r}=this,n=e.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e.width,e.height));const i=e.colorTextures;let a=i.length;r.drawBuffers||(a=Math.min(a,1));for(let u=0;u<a;u++){const l=i[u],f=l.parentTextureArray||l;this.renderer.texture.bind(f,0),u===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,f._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height))}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)}updateFramebuffer(e,r){const{gl:n}=this,i=e.glFramebuffers[this.CONTEXT_UID],a=e.colorTextures;let u=a.length;n.drawBuffers||(u=Math.min(u,1)),i.multisample>1&&this.canMultisampleFramebuffer(e)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let f=0;f<u;f++){const p=a[f],g=p.parentTextureArray||p;this.renderer.texture.bind(g,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,g._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+f,p.target,g._glTextures[this.CONTEXT_UID].texture,r),l.push(n.COLOR_ATTACHMENT0+f))}if(l.length>1&&n.drawBuffers(l),e.depthTexture&&this.writeDepthTexture){const p=e.depthTexture;this.renderer.texture.bind(p,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,p._glTextures[this.CONTEXT_UID].texture,r)}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:r}=this;let n=vt.NONE;if(e<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=e){n=r[i];break}return n===1&&(n=vt.NONE),n}blit(e,r,n){const{current:i,renderer:a,gl:u,CONTEXT_UID:l}=this;if(a.context.webGLVersion!==2||!i)return;const f=i.glFramebuffers[l];if(!f)return;if(!e){if(!f.msaaBuffer)return;const g=i.colorTextures[0];if(!g)return;f.blitFramebuffer||(f.blitFramebuffer=new yl(i.width,i.height),f.blitFramebuffer.addColorTexture(0,g)),e=f.blitFramebuffer,e.colorTextures[0]!==g&&(e.colorTextures[0]=g,e.dirtyId++,e.dirtyFormat++),(e.width!==i.width||e.height!==i.height)&&(e.width=i.width,e.height=i.height,e.dirtyId++,e.dirtySize++)}r||(r=eC,r.width=i.width,r.height=i.height),n||(n=r);const p=r.width===n.width&&r.height===n.height;this.bind(e),u.bindFramebuffer(u.READ_FRAMEBUFFER,f.framebuffer),u.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,u.COLOR_BUFFER_BIT,p?u.NEAREST:u.LINEAR)}disposeFramebuffer(e,r){const n=e.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete e.glFramebuffers[this.CONTEXT_UID];const a=this.managedFramebuffers.indexOf(e);a>=0&&this.managedFramebuffers.splice(a,1),e.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(e){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],e)}forceStencil(){const e=this.current;if(!e)return;const r=e.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;e.stencil=!0;const n=e.width,i=e.height,a=this.gl,u=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,u),r.msaaBuffer?a.renderbufferStorageMultisample(a.RENDERBUFFER,r.multisample,a.DEPTH24_STENCIL8,n,i):a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,n,i),r.stencil=u,a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,u)}reset(){this.current=this.unknownFramebuffer,this.viewport=new Qe}destroy(){this.renderer=null}}tp.extension={type:Ne.RendererSystem,name:"framebuffer"},Ye.add(tp);const bl={5126:4,5123:2,5121:1};class rp{constructor(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;Re.PREFER_ENV===Sn.WEBGL_LEGACY&&(n=null),n?(e.createVertexArray=()=>n.createVertexArrayOES(),e.bindVertexArray=i=>n.bindVertexArrayOES(i),e.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=e.getExtension("ANGLE_instanced_arrays");n?(e.vertexAttribDivisor=(i,a)=>n.vertexAttribDivisorANGLE(i,a),e.drawElementsInstanced=(i,a,u,l,f)=>n.drawElementsInstancedANGLE(i,a,u,l,f),e.drawArraysInstanced=(i,a,u,l)=>n.drawArraysInstancedANGLE(i,a,u,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(e,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=e.glVertexArrayObjects[this.CONTEXT_UID],a=!1;i||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=i={},a=!0);const u=i[r.program.id]||this.initGeometryVao(e,r,a);this._activeGeometry=e,this._activeVao!==u&&(this._activeVao=u,this.hasVao?n.bindVertexArray(u):this.activateVao(e,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<e.buffers.length;n++){const i=e.buffers[n];r.update(i)}}checkCompatibility(e,r){const n=e.attributes,i=r.attributeData;for(const a in i)if(!n[a])throw new Error(`shader and geometry incompatible, geometry missing the "${a}" attribute`)}getSignature(e,r){const n=e.attributes,i=r.attributeData,a=["g",e.id];for(const u in n)i[u]&&a.push(u,i[u].location);return a.join("-")}initGeometryVao(e,r,n=!0){const i=this.gl,a=this.CONTEXT_UID,u=this.renderer.buffer,l=r.program;l.glPrograms[a]||this.renderer.shader.generateProgram(r),this.checkCompatibility(e,l);const f=this.getSignature(e,l),p=e.glVertexArrayObjects[this.CONTEXT_UID];let g=p[f];if(g)return p[l.id]=g,g;const c=e.buffers,d=e.attributes,m={},_={};for(const y in c)m[y]=0,_[y]=0;for(const y in d)!d[y].size&&l.attributeData[y]?d[y].size=l.attributeData[y].size:d[y].size||console.warn(`PIXI Geometry attribute '${y}' size cannot be determined (likely the bound shader does not have the attribute)`),m[d[y].buffer]+=d[y].size*bl[d[y].type];for(const y in d){const b=d[y],x=b.size;b.stride===void 0&&(m[b.buffer]===x*bl[b.type]?b.stride=0:b.stride=m[b.buffer]),b.start===void 0&&(b.start=_[b.buffer],_[b.buffer]+=x*bl[b.type])}g=i.createVertexArray(),i.bindVertexArray(g);for(let y=0;y<c.length;y++){const b=c[y];u.bind(b),n&&b._glBuffers[a].refCount++}return this.activateVao(e,l),p[l.id]=g,p[f]=g,i.bindVertexArray(null),u.unbind(Mr.ARRAY_BUFFER),g}disposeGeometry(e,r){var l;if(!this.managedGeometries[e.id])return;delete this.managedGeometries[e.id];const n=e.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,a=e.buffers,u=(l=this.renderer)==null?void 0:l.buffer;if(e.disposeRunner.remove(this),!!n){if(u)for(let f=0;f<a.length;f++){const p=a[f]._glBuffers[this.CONTEXT_UID];p&&(p.refCount--,p.refCount===0&&!r&&u.dispose(a[f],r))}if(!r){for(const f in n)if(f[0]==="g"){const p=n[f];this._activeVao===p&&this.unbind(),i.deleteVertexArray(p)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(e){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],e)}activateVao(e,r){const n=this.gl,i=this.CONTEXT_UID,a=this.renderer.buffer,u=e.buffers,l=e.attributes;e.indexBuffer&&a.bind(e.indexBuffer);let f=null;for(const p in l){const g=l[p],c=u[g.buffer],d=c._glBuffers[i];if(r.attributeData[p]){f!==d&&(a.bind(c),f=d);const m=r.attributeData[p].location;if(n.enableVertexAttribArray(m),n.vertexAttribPointer(m,g.size,g.type||n.FLOAT,g.normalized,g.stride,g.start),g.instance)if(this.hasInstance)n.vertexAttribDivisor(m,g.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,r,n,i){const{gl:a}=this,u=this._activeGeometry;if(u.indexBuffer){const l=u.indexBuffer.data.BYTES_PER_ELEMENT,f=l===2?a.UNSIGNED_SHORT:a.UNSIGNED_INT;l===2||l===4&&this.canUseUInt32ElementIndex?u.instanced?a.drawElementsInstanced(e,r||u.indexBuffer.data.length,f,(n||0)*l,i||1):a.drawElements(e,r||u.indexBuffer.data.length,f,(n||0)*l):console.warn("unsupported index buffer type: uint32")}else u.instanced?a.drawArraysInstanced(e,n,r||u.getSize(),i||1):a.drawArrays(e,n,r||u.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}rp.extension={type:Ne.RendererSystem,name:"geometry"},Ye.add(rp);const np=new Dt;class tC{constructor(e,r){this._texture=e,this.mapCoord=new Dt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,r){r===void 0&&(r=e);const n=this.mapCoord;for(let i=0;i<e.length;i+=2){const a=e[i],u=e[i+1];r[i]=a*n.a+u*n.c+n.tx,r[i+1]=a*n.b+u*n.d+n.ty}return r}update(e){const r=this._texture;if(!r||!r.valid||!e&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=r.orig,a=r.trim;a&&(np.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(np));const u=r.baseTexture,l=this.uClampFrame,f=this.clampMargin/u.resolution,p=this.clampOffset;return l[0]=(r._frame.x+f+p)/u.width,l[1]=(r._frame.y+f+p)/u.height,l[2]=(r._frame.x+r._frame.width-f+p)/u.width,l[3]=(r._frame.y+r._frame.height-f+p)/u.height,this.uClampOffset[0]=p/u.realWidth,this.uClampOffset[1]=p/u.realHeight,this.isSimple=r._frame.width===u.width&&r._frame.height===u.height&&r.rotate===0,!0}}var rC=`varying vec2 vMaskCoord;
386
+ `;const gs=class extends ps{constructor(t,e,r){const n=Hr.from(t||gs.defaultVertexSrc,e||gs.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=gs.defaultResolution,this.multisample=gs.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new pa}apply(t,e,r,n,i){t.applyFilter(this,e,r,n)}get blendMode(){return this.state.blendMode}set blendMode(t){this.state.blendMode=t}get resolution(){return this._resolution}set resolution(t){this._resolution=t}static get defaultVertexSrc(){return WT}static get defaultFragmentSrc(){return XT}};let Ve=gs;Ve.defaultResolution=1,Ve.defaultMultisample=vt.NONE;class Ta{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Mt(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=e,a=n??r;a!==void 0&&(this.color=a),this.alpha=i}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}Ta.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},Ta.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"background"},We.add(Ta);class Td{constructor(e){this.renderer=e,this.emptyRenderer=new bd(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)e[i]=n[i]||null,e[i]&&(e[i]._batchLocation=i)}boundArray(e,r,n,i){const{elements:a,ids:u,count:l}=e;let h=0;for(let p=0;p<l;p++){const g=a[p],c=g._batchLocation;if(c>=0&&c<i&&r[c]===g){u[p]=c;continue}for(;h<i;){const d=r[h];if(d&&d._batchEnabled===n&&d._batchLocation===h){h++;continue}u[p]=h,g._batchLocation=h,r[h]=g;break}}}destroy(){this.renderer=null}}Td.extension={type:Oe.RendererSystem,name:"batch"},We.add(Td);let wd=0;class wa{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=wd++}init(e){if(e.context)this.initFromContext(e.context);else{const r=this.renderer.background.alpha<1,n=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=wd++,this.renderer.runners.contextChange.emit(e);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const r=this.createContext(this.renderer.view,e);this.initFromContext(r)}createContext(e,r){let n;if(Ee.PREFER_ENV>=wn.WEBGL2&&(n=e.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",r)||e.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,r={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const r=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}wa.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},wa.extension={type:Oe.RendererSystem,name:"context"},We.add(wa);class qT extends sl{upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===rn.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?i.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,i.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}}class dl{constructor(e,r){this.width=Math.round(e||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new dr("disposeFramebuffer"),this.multisample=vt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new Ue(null,{scaleMode:Pr.NEAREST,resolution:1,mipmap:Sn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Ue(new qT(null,{width:this.width,height:this.height}),{scaleMode:Pr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Sn.OFF,format:Z.DEPTH_COMPONENT,type:De.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,r){if(e=Math.round(e),r=Math.round(r),!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],a=i.resolution;i.setSize(e/a,r/a)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(e/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class Sd extends Ue{constructor(e={}){if(typeof e=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],a=arguments[3];e={width:r,height:n,scaleMode:i,resolution:a}}e.width=e.width||100,e.height=e.height||100,e.multisample??(e.multisample=vt.NONE),super(null,e),this.mipmap=Sn.OFF,this.valid=!0,this._clear=new Mt([0,0,0,0]),this.framebuffer=new dl(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=e.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(e){this._clear.setValue(e)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(e,r){this.framebuffer.resize(e*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class un extends cs{constructor(e){const r=e,n=r.naturalWidth||r.videoWidth||r.width,i=r.naturalHeight||r.videoHeight||r.height;super(n,i),this.source=e,this.noSubImage=!1}static crossOrigin(e,r,n){n===void 0&&!r.startsWith("data:")?e.crossOrigin=gT(r):n!==!1&&(e.crossOrigin=typeof n=="string"?n:"anonymous")}upload(e,r,n,i){const a=e.gl,u=r.realWidth,l=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1&&i.buffered.length===0)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===rn.UNPACK),!this.noSubImage&&r.target===a.TEXTURE_2D&&n.width===u&&n.height===l?a.texSubImage2D(a.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=u,n.height=l,a.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const e=this.source,r=e.naturalWidth||e.videoWidth||e.width,n=e.naturalHeight||e.videoHeight||e.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class Ad extends un{constructor(e,r){if(r=r||{},typeof e=="string"){const n=new Image;un.crossOrigin(n,e,r.crossorigin),n.src=e,e=n}super(e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??Ee.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(e){return this._load?this._load:(e!==void 0&&(this.createBitmap=e),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const a=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?a():(i.onload=a,i.onerror=u=>{n(u),this.onError.emit(u)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===rn.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const a=r._glTextures;for(const u in a){const l=a[u];if(l!==n&&l.dirtyId!==r.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class Ed{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,r,n){const i=r.width,a=r.height;if(n){const u=e.width/2/i,l=e.height/2/a,h=e.x/i+u,p=e.y/a+l;n=ut.add(n,ut.NW),this.x0=h+u*ut.uX(n),this.y0=p+l*ut.uY(n),n=ut.add(n,2),this.x1=h+u*ut.uX(n),this.y1=p+l*ut.uY(n),n=ut.add(n,2),this.x2=h+u*ut.uX(n),this.y2=p+l*ut.uY(n),n=ut.add(n,2),this.x3=h+u*ut.uX(n),this.y3=p+l*ut.uY(n)}else this.x0=e.x/i,this.y0=e.y/a,this.x1=(e.x+e.width)/i,this.y1=e.y/a,this.x2=(e.x+e.width)/i,this.y2=(e.y+e.height)/a,this.x3=e.x/i,this.y3=(e.y+e.height)/a;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const Cd=new Ed;function Sa(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}class Be extends qs{constructor(e,r,n,i,a,u,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new Ke(0,0,1,1)),e instanceof Be&&(e=e.baseTexture),this.baseTexture=e,this._frame=r,this.trim=i,this.valid=!1,this._uvs=Cd,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(a||0),a===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=u?new Je(u.x,u.y):new Je(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=r:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:r}=this.baseTexture;r!=null&&r.url&&Lr[r.url]&&Be.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Be.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const e=this._frame.clone(),r=this._frame===this.orig?e:this.orig.clone(),n=new Be(this.baseTexture,!this.noFrame&&e,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=e),n}updateUvs(){this._uvs===Cd&&(this._uvs=new Ed),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,r={},n=Ee.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let a=null;if(i)a=e;else if(e instanceof Ue){if(!e.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${l}-${ls()}`,Ue.addToCache(e,e.cacheId)}a=e.cacheId}else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${ls()}`}a=e._pixiId}let u=Lr[a];if(i&&n&&!u)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!u&&!(e instanceof Ue)?(r.resolution||(r.resolution=ad(e)),u=new Be(new Ue(e,r)),u.baseTexture.cacheId=a,Ue.addToCache(u.baseTexture,a),Be.addToCache(u,a)):!u&&e instanceof Ue&&(u=new Be(e),Be.addToCache(u,a)),u}static fromURL(e,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Be.from(e,Object.assign({resourceOptions:n},r),!1),a=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):a.load().then(()=>Promise.resolve(i))}static fromBuffer(e,r,n,i){return new Be(Ue.fromBuffer(e,r,n,i))}static fromLoader(e,r,n,i){const a=new Ue(e,Object.assign({scaleMode:Ue.defaultOptions.scaleMode,resolution:ad(r)},i)),{resource:u}=a;u instanceof Ad&&(u.url=r);const l=new Be(a);return n||(n=r),Ue.addToCache(l.baseTexture,n),Be.addToCache(l,n),n!==r&&(Ue.addToCache(l.baseTexture,r),Be.addToCache(l,r)),l.baseTexture.valid?Promise.resolve(l):new Promise(h=>{l.baseTexture.once("loaded",()=>h(l))})}static addToCache(e,r){r&&(e.textureCacheIds.includes(r)||e.textureCacheIds.push(r),Lr[r]&&Lr[r]!==e&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Lr[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=Lr[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete Lr[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)Lr[e.textureCacheIds[r]]===e&&delete Lr[e.textureCacheIds[r]];return e.textureCacheIds.length=0,e}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(e){this._frame=e,this.noFrame=!1;const{x:r,y:n,width:i,height:a}=e,u=r+i>this.baseTexture.width,l=n+a>this.baseTexture.height;if(u||l){const h=u&&l?"and":"or",p=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,g=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${p} ${h} ${g}`)}this.valid=i&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Be._EMPTY||(Be._EMPTY=new Be(new Ue),Sa(Be._EMPTY),Sa(Be._EMPTY.baseTexture)),Be._EMPTY}static get WHITE(){if(!Be._WHITE){const e=Ee.ADAPTER.createCanvas(16,16),r=e.getContext("2d");e.width=16,e.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Be._WHITE=new Be(Ue.from(e)),Sa(Be._WHITE),Sa(Be._WHITE.baseTexture)}return Be._WHITE}}class Aa extends Be{constructor(e,r){super(e,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,r,n=!0){const i=this.baseTexture.resolution,a=Math.round(e*i)/i,u=Math.round(r*i)/i;this.valid=a>0&&u>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=u,n&&this.baseTexture.resize(a,u),this.updateUvs()}setResolution(e){const{baseTexture:r}=this;r.resolution!==e&&(r.setResolution(e),this.resize(r.width,r.height,!1))}static create(e){return new Aa(new Sd(e))}}class Id{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,r,n=vt.NONE){const i=new Sd(Object.assign({width:e,height:r,resolution:1,multisample:n},this.textureOptions));return new Aa(i)}getOptimalTexture(e,r,n=1,i=vt.NONE){let a;e=Math.ceil(e*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||e!==this._pixelsWidth||r!==this._pixelsHeight?(e=ha(e),r=ha(r),a=((e&65535)<<16|r&65535)>>>0,i>1&&(a+=i*4294967296)):a=i>1?-i:-1,this.texturePool[a]||(this.texturePool[a]=[]);let u=this.texturePool[a].pop();return u||(u=this.createTexture(e,r,i)),u.filterPoolKey=a,u.setResolution(n),u}getFilterTexture(e,r,n){const i=this.getOptimalTexture(e.width,e.height,r||e.resolution,n||vt.NONE);return i.filterFrame=e.filterFrame,i}returnTexture(e){const r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}}}Id.SCREEN_KEY=-1;class YT extends gi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class KT extends gi{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Nt(this.vertices),this.uvBuffer=new Nt(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(e,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/e.width,this.uvs[3]=i,this.uvs[4]=n+r.width/e.width,this.uvs[5]=i+r.height/e.height,this.uvs[6]=n,this.uvs[7]=i+r.height/e.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class ZT{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=vt.NONE,this.sourceFrame=new Ke,this.destinationFrame=new Ke,this.bindingSourceFrame=new Ke,this.bindingDestinationFrame=new Ke,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const Ea=[new Je,new Je,new Je,new Je],pl=new Lt;class Rd{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new Id,this.statePool=[],this.quad=new YT,this.quadUv=new KT,this.tempRect=new Ke,this.activeState={},this.globalUniforms=new pr({outputFrame:new Ke,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(e,r){const n=this.renderer,i=this.defaultFilterStack,a=this.statePool.pop()||new ZT,u=this.renderer.renderTexture;let l=r[0].resolution,h=r[0].multisample,p=r[0].padding,g=r[0].autoFit,c=r[0].legacy??!0;for(let _=1;_<r.length;_++){const y=r[_];l=Math.min(l,y.resolution),h=Math.min(h,y.multisample),p=this.useMaxPadding?Math.max(p,y.padding):p+y.padding,g=g&&y.autoFit,c=c||(y.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=u.current),i.push(a),a.resolution=l,a.multisample=h,a.legacy=c,a.target=e,a.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),a.sourceFrame.pad(p);const d=this.tempRect.copyFrom(u.sourceFrame);n.projection.transform&&this.transformAABB(pl.copyFrom(n.projection.transform).invert(),d),g?(a.sourceFrame.fit(d),(a.sourceFrame.width<=0||a.sourceFrame.height<=0)&&(a.sourceFrame.width=0,a.sourceFrame.height=0)):a.sourceFrame.intersects(d)||(a.sourceFrame.width=0,a.sourceFrame.height=0),this.roundFrame(a.sourceFrame,u.current?u.current.resolution:n.resolution,u.sourceFrame,u.destinationFrame,n.projection.transform),a.renderTexture=this.getOptimalFilterTexture(a.sourceFrame.width,a.sourceFrame.height,l,h),a.filters=r,a.destinationFrame.width=a.renderTexture.width,a.destinationFrame.height=a.renderTexture.height;const m=this.tempRect;m.x=0,m.y=0,m.width=a.sourceFrame.width,m.height=a.sourceFrame.height,a.renderTexture.filterFrame=a.sourceFrame,a.bindingSourceFrame.copyFrom(u.sourceFrame),a.bindingDestinationFrame.copyFrom(u.destinationFrame),a.transform=n.projection.transform,n.projection.transform=null,u.bind(a.renderTexture,a.sourceFrame,m),n.framebuffer.clear(0,0,0,0)}pop(){const e=this.defaultFilterStack,r=e.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const a=i.inputSize,u=i.inputPixel,l=i.inputClamp;if(a[0]=r.destinationFrame.width,a[1]=r.destinationFrame.height,a[2]=1/a[0],a[3]=1/a[1],u[0]=Math.round(a[0]*r.resolution),u[1]=Math.round(a[1]*r.resolution),u[2]=1/u[0],u[3]=1/u[1],l[0]=.5*u[2],l[1]=.5*u[3],l[2]=r.sourceFrame.width*a[2]-.5*u[2],l[3]=r.sourceFrame.height*a[3]-.5*u[3],r.legacy){const p=i.filterArea;p[0]=r.destinationFrame.width,p[1]=r.destinationFrame.height,p[2]=r.sourceFrame.x,p[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const h=e[e.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,h.renderTexture,An.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let p=r.renderTexture,g=this.getOptimalFilterTexture(p.width,p.height,r.resolution);g.filterFrame=p.filterFrame;let c=0;for(c=0;c<n.length-1;++c){c===1&&r.multisample>1&&(g=this.getOptimalFilterTexture(p.width,p.height,r.resolution),g.filterFrame=p.filterFrame),n[c].apply(this,p,g,An.CLEAR,r);const d=p;p=g,g=d}n[c].apply(this,p,h.renderTexture,An.BLEND,r),c>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(p),this.returnFilterTexture(g)}r.clear(),this.statePool.push(r)}bindAndClear(e,r=An.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e!=null&&e.filterFrame){const u=this.tempRect;u.x=0,u.y=0,u.width=e.filterFrame.width,u.height=e.filterFrame.height,n.bind(e,e.filterFrame,u)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const a=i.stateId&1||this.forceClear;(r===An.CLEAR||r===An.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,r,n,i){const a=this.renderer;a.state.set(e.state),this.bindAndClear(n,i),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(tn.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(tn.TRIANGLE_STRIP))}calculateSpriteMatrix(e,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:a}=r._texture,u=e.set(i.width,0,0,i.height,n.x,n.y),l=r.worldTransform.copyTo(Lt.TEMP_MATRIX);return l.invert(),u.prepend(l),u.scale(1/a.width,1/a.height),u.translate(r.anchor.x,r.anchor.y),u}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,r,n=1,i=vt.NONE){return this.texturePool.getOptimalTexture(e,r,n,i)}getFilterTexture(e,r,n){if(typeof e=="number"){const a=e;e=r,r=a}e=e||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,n||vt.NONE);return i.filterFrame=e.filterFrame,i}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,r){const n=Ea[0],i=Ea[1],a=Ea[2],u=Ea[3];n.set(r.left,r.top),i.set(r.left,r.bottom),a.set(r.right,r.top),u.set(r.right,r.bottom),e.apply(n,n),e.apply(i,i),e.apply(a,a),e.apply(u,u);const l=Math.min(n.x,i.x,a.x,u.x),h=Math.min(n.y,i.y,a.y,u.y),p=Math.max(n.x,i.x,a.x,u.x),g=Math.max(n.y,i.y,a.y,u.y);r.x=l,r.y=h,r.width=p-l,r.height=g-h}roundFrame(e,r,n,i,a){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(a){const{a:u,b:l,c:h,d:p}=a;if((Math.abs(l)>1e-4||Math.abs(h)>1e-4)&&(Math.abs(u)>1e-4||Math.abs(p)>1e-4))return}a=a?pl.copyFrom(a):pl.identity(),a.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(a,e),e.ceil(r),this.transformAABB(a.invert(),e)}}}Rd.extension={type:Oe.RendererSystem,name:"filter"},We.add(Rd);class QT{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=vt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const JT=new Ke;class Pd{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new dl(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ke,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Ee.PREFER_ENV===wn.WEBGL_LEGACY&&(r=null,n=null),r?e.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,e.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,r,n=0){const{gl:i}=this;if(e){const a=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,a.mipLevel=n),a.dirtyId!==e.dirtyId&&(a.dirtyId=e.dirtyId,a.dirtyFormat!==e.dirtyFormat?(a.dirtyFormat=e.dirtyFormat,a.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):a.dirtySize!==e.dirtySize&&(a.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let u=0;u<e.colorTextures.length;u++){const l=e.colorTextures[u];this.renderer.texture.unbind(l.parentTextureArray||l)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),r){const u=r.width>>n,l=r.height>>n,h=u/r.width;this.setViewport(r.x*h,r.y*h,u,l)}else{const u=e.width>>n,l=e.height>>n;this.setViewport(0,0,u,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,r,n,i){const a=this.viewport;e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i),(a.width!==n||a.height!==i||a.x!==e||a.y!==r)&&(a.x=e,a.y=r,a.width=n,a.height=i,this.gl.viewport(e,r,n,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,r,n,i,a=uu.COLOR|uu.DEPTH){const{gl:u}=this;u.clearColor(e,r,n,i),u.clear(a)}initFramebuffer(e){const{gl:r}=this,n=new QT(r.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n}resizeFramebuffer(e){const{gl:r}=this,n=e.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e.width,e.height));const i=e.colorTextures;let a=i.length;r.drawBuffers||(a=Math.min(a,1));for(let u=0;u<a;u++){const l=i[u],h=l.parentTextureArray||l;this.renderer.texture.bind(h,0),u===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,h._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height))}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)}updateFramebuffer(e,r){const{gl:n}=this,i=e.glFramebuffers[this.CONTEXT_UID],a=e.colorTextures;let u=a.length;n.drawBuffers||(u=Math.min(u,1)),i.multisample>1&&this.canMultisampleFramebuffer(e)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let h=0;h<u;h++){const p=a[h],g=p.parentTextureArray||p;this.renderer.texture.bind(g,0),h===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,g._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+h,p.target,g._glTextures[this.CONTEXT_UID].texture,r),l.push(n.COLOR_ATTACHMENT0+h))}if(l.length>1&&n.drawBuffers(l),e.depthTexture&&this.writeDepthTexture){const p=e.depthTexture;this.renderer.texture.bind(p,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,p._glTextures[this.CONTEXT_UID].texture,r)}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:r}=this;let n=vt.NONE;if(e<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=e){n=r[i];break}return n===1&&(n=vt.NONE),n}blit(e,r,n){const{current:i,renderer:a,gl:u,CONTEXT_UID:l}=this;if(a.context.webGLVersion!==2||!i)return;const h=i.glFramebuffers[l];if(!h)return;if(!e){if(!h.msaaBuffer)return;const g=i.colorTextures[0];if(!g)return;h.blitFramebuffer||(h.blitFramebuffer=new dl(i.width,i.height),h.blitFramebuffer.addColorTexture(0,g)),e=h.blitFramebuffer,e.colorTextures[0]!==g&&(e.colorTextures[0]=g,e.dirtyId++,e.dirtyFormat++),(e.width!==i.width||e.height!==i.height)&&(e.width=i.width,e.height=i.height,e.dirtyId++,e.dirtySize++)}r||(r=JT,r.width=i.width,r.height=i.height),n||(n=r);const p=r.width===n.width&&r.height===n.height;this.bind(e),u.bindFramebuffer(u.READ_FRAMEBUFFER,h.framebuffer),u.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,u.COLOR_BUFFER_BIT,p?u.NEAREST:u.LINEAR)}disposeFramebuffer(e,r){const n=e.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete e.glFramebuffers[this.CONTEXT_UID];const a=this.managedFramebuffers.indexOf(e);a>=0&&this.managedFramebuffers.splice(a,1),e.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(e){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],e)}forceStencil(){const e=this.current;if(!e)return;const r=e.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;e.stencil=!0;const n=e.width,i=e.height,a=this.gl,u=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,u),r.msaaBuffer?a.renderbufferStorageMultisample(a.RENDERBUFFER,r.multisample,a.DEPTH24_STENCIL8,n,i):a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,n,i),r.stencil=u,a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,u)}reset(){this.current=this.unknownFramebuffer,this.viewport=new Ke}destroy(){this.renderer=null}}Pd.extension={type:Oe.RendererSystem,name:"framebuffer"},We.add(Pd);const gl={5126:4,5123:2,5121:1};class Md{constructor(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;Ee.PREFER_ENV===wn.WEBGL_LEGACY&&(n=null),n?(e.createVertexArray=()=>n.createVertexArrayOES(),e.bindVertexArray=i=>n.bindVertexArrayOES(i),e.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=e.getExtension("ANGLE_instanced_arrays");n?(e.vertexAttribDivisor=(i,a)=>n.vertexAttribDivisorANGLE(i,a),e.drawElementsInstanced=(i,a,u,l,h)=>n.drawElementsInstancedANGLE(i,a,u,l,h),e.drawArraysInstanced=(i,a,u,l)=>n.drawArraysInstancedANGLE(i,a,u,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(e,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=e.glVertexArrayObjects[this.CONTEXT_UID],a=!1;i||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=i={},a=!0);const u=i[r.program.id]||this.initGeometryVao(e,r,a);this._activeGeometry=e,this._activeVao!==u&&(this._activeVao=u,this.hasVao?n.bindVertexArray(u):this.activateVao(e,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<e.buffers.length;n++){const i=e.buffers[n];r.update(i)}}checkCompatibility(e,r){const n=e.attributes,i=r.attributeData;for(const a in i)if(!n[a])throw new Error(`shader and geometry incompatible, geometry missing the "${a}" attribute`)}getSignature(e,r){const n=e.attributes,i=r.attributeData,a=["g",e.id];for(const u in n)i[u]&&a.push(u,i[u].location);return a.join("-")}initGeometryVao(e,r,n=!0){const i=this.gl,a=this.CONTEXT_UID,u=this.renderer.buffer,l=r.program;l.glPrograms[a]||this.renderer.shader.generateProgram(r),this.checkCompatibility(e,l);const h=this.getSignature(e,l),p=e.glVertexArrayObjects[this.CONTEXT_UID];let g=p[h];if(g)return p[l.id]=g,g;const c=e.buffers,d=e.attributes,m={},_={};for(const y in c)m[y]=0,_[y]=0;for(const y in d)!d[y].size&&l.attributeData[y]?d[y].size=l.attributeData[y].size:d[y].size||console.warn(`PIXI Geometry attribute '${y}' size cannot be determined (likely the bound shader does not have the attribute)`),m[d[y].buffer]+=d[y].size*gl[d[y].type];for(const y in d){const b=d[y],x=b.size;b.stride===void 0&&(m[b.buffer]===x*gl[b.type]?b.stride=0:b.stride=m[b.buffer]),b.start===void 0&&(b.start=_[b.buffer],_[b.buffer]+=x*gl[b.type])}g=i.createVertexArray(),i.bindVertexArray(g);for(let y=0;y<c.length;y++){const b=c[y];u.bind(b),n&&b._glBuffers[a].refCount++}return this.activateVao(e,l),p[l.id]=g,p[h]=g,i.bindVertexArray(null),u.unbind(Mr.ARRAY_BUFFER),g}disposeGeometry(e,r){var l;if(!this.managedGeometries[e.id])return;delete this.managedGeometries[e.id];const n=e.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,a=e.buffers,u=(l=this.renderer)==null?void 0:l.buffer;if(e.disposeRunner.remove(this),!!n){if(u)for(let h=0;h<a.length;h++){const p=a[h]._glBuffers[this.CONTEXT_UID];p&&(p.refCount--,p.refCount===0&&!r&&u.dispose(a[h],r))}if(!r){for(const h in n)if(h[0]==="g"){const p=n[h];this._activeVao===p&&this.unbind(),i.deleteVertexArray(p)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(e){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],e)}activateVao(e,r){const n=this.gl,i=this.CONTEXT_UID,a=this.renderer.buffer,u=e.buffers,l=e.attributes;e.indexBuffer&&a.bind(e.indexBuffer);let h=null;for(const p in l){const g=l[p],c=u[g.buffer],d=c._glBuffers[i];if(r.attributeData[p]){h!==d&&(a.bind(c),h=d);const m=r.attributeData[p].location;if(n.enableVertexAttribArray(m),n.vertexAttribPointer(m,g.size,g.type||n.FLOAT,g.normalized,g.stride,g.start),g.instance)if(this.hasInstance)n.vertexAttribDivisor(m,g.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,r,n,i){const{gl:a}=this,u=this._activeGeometry;if(u.indexBuffer){const l=u.indexBuffer.data.BYTES_PER_ELEMENT,h=l===2?a.UNSIGNED_SHORT:a.UNSIGNED_INT;l===2||l===4&&this.canUseUInt32ElementIndex?u.instanced?a.drawElementsInstanced(e,r||u.indexBuffer.data.length,h,(n||0)*l,i||1):a.drawElements(e,r||u.indexBuffer.data.length,h,(n||0)*l):console.warn("unsupported index buffer type: uint32")}else u.instanced?a.drawArraysInstanced(e,n,r||u.getSize(),i||1):a.drawArrays(e,n,r||u.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}Md.extension={type:Oe.RendererSystem,name:"geometry"},We.add(Md);const Od=new Lt;class ew{constructor(e,r){this._texture=e,this.mapCoord=new Lt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,r){r===void 0&&(r=e);const n=this.mapCoord;for(let i=0;i<e.length;i+=2){const a=e[i],u=e[i+1];r[i]=a*n.a+u*n.c+n.tx,r[i+1]=a*n.b+u*n.d+n.ty}return r}update(e){const r=this._texture;if(!r||!r.valid||!e&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=r.orig,a=r.trim;a&&(Od.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(Od));const u=r.baseTexture,l=this.uClampFrame,h=this.clampMargin/u.resolution,p=this.clampOffset;return l[0]=(r._frame.x+h+p)/u.width,l[1]=(r._frame.y+h+p)/u.height,l[2]=(r._frame.x+r._frame.width-h+p)/u.width,l[3]=(r._frame.y+r._frame.height-h+p)/u.height,this.uClampOffset[0]=p/u.realWidth,this.uClampOffset[1]=p/u.realHeight,this.isSimple=r._frame.width===u.width&&r._frame.height===u.height&&r.rotate===0,!0}}var tw=`varying vec2 vMaskCoord;
403
387
  varying vec2 vTextureCoord;
404
388
 
405
389
  uniform sampler2D uSampler;
@@ -424,7 +408,7 @@ void main(void)
424
408
 
425
409
  gl_FragColor = original;
426
410
  }
427
- `,nC=`attribute vec2 aVertexPosition;
411
+ `,rw=`attribute vec2 aVertexPosition;
428
412
  attribute vec2 aTextureCoord;
429
413
 
430
414
  uniform mat3 projectionMatrix;
@@ -440,7 +424,7 @@ void main(void)
440
424
  vTextureCoord = aTextureCoord;
441
425
  vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
442
426
  }
443
- `;class iC extends je{constructor(e,r,n){let i=null;typeof e!="string"&&r===void 0&&n===void 0&&(i=e,e=void 0,r=void 0,n=void 0),super(e||nC,r||rC,n),this.maskSprite=i,this.maskMatrix=new Dt}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,r,n,i){const a=this._maskSprite,u=a._texture;u.valid&&(u.uvMatrix||(u.uvMatrix=new tC(u,0)),u.uvMatrix.update(),this.uniforms.npmAlpha=u.baseTexture.alphaMode?0:1,this.uniforms.mask=u,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,a).prepend(u.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=u.uvMatrix.uClampFrame,e.applyFilter(this,r,n,i))}}class sC{constructor(e=null){this.type=_t.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=je.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=_t.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class ip{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,r){let n=r;if(!n.isMaskData){const a=this.maskDataPool.pop()||new sC;a.pooled=!0,a.maskObject=r,n=a}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=e,n.type!==_t.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case _t.SCISSOR:this.renderer.scissor.push(n);break;case _t.STENCIL:this.renderer.stencil.push(n);break;case _t.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case _t.COLOR:this.pushColorMask(n);break}n.type===_t.SPRITE&&this.maskStack.push(n)}pop(e){const r=this.maskStack.pop();if(!(!r||r._target!==e)){if(r.enabled)switch(r.type){case _t.SCISSOR:this.renderer.scissor.pop(r);break;case _t.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case _t.SPRITE:this.popSpriteMask(r);break;case _t.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===_t.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(e){const r=e.maskObject;r?r.isSprite?e.type=_t.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=_t.SCISSOR:e.type=_t.STENCIL:e.type=_t.COLOR}pushSpriteMask(e){const{maskObject:r}=e,n=e._target;let i=e._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new iC]));const a=this.renderer,u=a.renderTexture;let l,f;if(u.current){const g=u.current;l=e.resolution||g.resolution,f=e.multisample??g.multisample}else l=e.resolution||a.resolution,f=e.multisample??a.multisample;i[0].resolution=l,i[0].multisample=f,i[0].maskSprite=r;const p=n.filterArea;n.filterArea=r.getBounds(!0),a.filter.push(n,i),n.filterArea=p,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const r=e._colorMask,n=e._colorMask=r&e.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(e){const r=e._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}ip.extension={type:Ne.RendererSystem,name:"mask"},Ye.add(ip);class sp{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=e;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const ap=new Dt,op=[],ka=class extends sp{constructor(t){super(t),this.glConst=Re.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0}calcScissorRect(t){if(t._scissorRectLocal)return;const e=t._scissorRect,{maskObject:r}=t,{renderer:n}=this,i=n.renderTexture,a=r.getBounds(!0,op.pop()??new Qe);this.roundFrameToPixels(a,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),e&&a.fit(e),t._scissorRectLocal=a}static isMatrixRotated(t){if(!t)return!1;const{a:e,b:r,c:n,d:i}=t;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(i)>1e-4)}testScissor(t){const{maskObject:e}=t;if(!e.isFastRect||!e.isFastRect()||ka.isMatrixRotated(e.worldTransform)||ka.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(t);const r=t._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(t,e,r,n,i){ka.isMatrixRotated(i)||(i=i?ap.copyFrom(i):ap.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,t),t.fit(n),t.x=Math.round(t.x*e),t.y=Math.round(t.y*e),t.width=Math.round(t.width*e),t.height=Math.round(t.height*e))}push(t){t._scissorRectLocal||this.calcScissorRect(t);const{gl:e}=this.renderer;t._scissorRect||e.enable(e.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=t._scissorRectLocal,this._useCurrent()}pop(t){const{gl:e}=this.renderer;t&&op.push(t._scissorRectLocal),this.getStackLength()>0?this._useCurrent():e.disable(e.SCISSOR_TEST)}_useCurrent(){const t=this.maskStack[this.maskStack.length-1]._scissorRect;let e;this.renderer.renderTexture.current?e=t.y:e=this.renderer.height-t.height-t.y,this.renderer.gl.scissor(t.x,e,t.width,t.height)}};let up=ka;up.extension={type:Ne.RendererSystem,name:"scissor"},Ye.add(up);class lp extends sp{constructor(e){super(e),this.glConst=Re.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const r=e.maskObject,{gl:n}=this.renderer,i=e._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;const a=e._colorMask;a!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(e._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}pop(e){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}lp.extension={type:Ne.RendererSystem,name:"stencil"},Ye.add(lp);class cp{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return ke("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return ke("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return ke("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const r in e)this.plugins[r]=new e[r](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}cp.extension={type:[Ne.RendererSystem,Ne.CanvasRendererSystem],name:"_plugin"},Ye.add(cp);class hp{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Dt,this.transform=null}update(e,r,n,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)}calculateProjection(e,r,n,i){const a=this.projectionMatrix,u=i?-1:1;a.identity(),a.a=1/r.width*2,a.d=u*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-u-r.y*a.d}setTransform(e){}destroy(){this.renderer=null}}hp.extension={type:Ne.RendererSystem,name:"projection"},Ye.add(hp);const aC=new ml;class fp{constructor(e){this.renderer=e,this._tempMatrix=new Dt}generateTexture(e,r){const{region:n,...i}=r||{},a=n||e.getLocalBounds(null,!0);a.width===0&&(a.width=1),a.height===0&&(a.height=1);const u=Na.create({width:a.width,height:a.height,...i});this._tempMatrix.tx=-a.x,this._tempMatrix.ty=-a.y;const l=e.transform;return e.transform=aC,this.renderer.render(e,{renderTexture:u,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=l,u}destroy(){}}fp.extension={type:[Ne.RendererSystem,Ne.CanvasRendererSystem],name:"textureGenerator"},Ye.add(fp);const kn=new Qe,ys=new Qe;class dp{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Qe,this.destinationFrame=new Qe,this.viewportFrame=new Qe}bind(e=null,r,n){const i=this.renderer;this.current=e;let a,u,l;e?(a=e.baseTexture,l=a.resolution,r||(kn.width=e.frame.width,kn.height=e.frame.height,r=kn),n||(ys.x=e.frame.x,ys.y=e.frame.y,ys.width=r.width,ys.height=r.height,n=ys),u=a.framebuffer):(l=i.resolution,r||(kn.width=i._view.screen.width,kn.height=i._view.screen.height,r=kn),n||(n=kn,n.width=r.width,n.height=r.height));const f=this.viewportFrame;f.x=n.x*l,f.y=n.y*l,f.width=n.width*l,f.height=n.height*l,e||(f.y=i.view.height-(f.y+f.height)),f.ceil(),this.renderer.framebuffer.bind(u,f),this.renderer.projection.update(n,r,l,!u),e?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(e,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=e?Ot.shared.setValue(e):n,a=this.destinationFrame,u=this.current?this.current.baseTexture:this.renderer._view.screen,l=a.width!==u.width||a.height!==u.height;if(l){let{x:f,y:p,width:g,height:c}=this.viewportFrame;f=Math.round(f),p=Math.round(p),g=Math.round(g),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,p,g,c)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}dp.extension={type:Ne.RendererSystem,name:"renderTexture"},Ye.add(dp);class oC{constructor(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function uC(t,e){const r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const a=e.getActiveAttrib(t,i);if(a.name.startsWith("gl_"))continue;const u=Vd(e,a.type),l={type:u,name:a.name,size:Hd(u),location:e.getAttribLocation(t,a.name)};r[a.name]=l}return r}function lC(t,e){const r={},n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const a=e.getActiveUniform(t,i),u=a.name.replace(/\[.*?\]$/,""),l=!!a.name.match(/\[.*?\]$/),f=Vd(e,a.type);r[u]={name:u,index:i,type:f,size:a.size,isArray:l,value:Ud(f,a.size)}}return r}function cC(t,e){var f;const r=Bd(t,t.VERTEX_SHADER,e.vertexSrc),n=Bd(t,t.FRAGMENT_SHADER,e.fragmentSrc),i=t.createProgram();t.attachShader(i,r),t.attachShader(i,n);const a=(f=e.extra)==null?void 0:f.transformFeedbackVaryings;if(a&&(typeof t.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(i,a.names,a.bufferMode==="separate"?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)||DE(t,i,r,n),e.attributeData=uC(i,t),e.uniformData=lC(i,t),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){const p=Object.keys(e.attributeData);p.sort((g,c)=>g>c?1:-1);for(let g=0;g<p.length;g++)e.attributeData[p[g]].location=g,t.bindAttribLocation(i,g,p[g]);t.linkProgram(i)}t.deleteShader(r),t.deleteShader(n);const u={};for(const p in e.uniformData){const g=e.uniformData[p];u[p]={location:t.getUniformLocation(i,p),value:Ud(g.type,g.size)}}return new oC(i,u)}function hC(t,e,r,n,i){r.buffer.update(i)}const fC={float:`
427
+ `;class nw extends Ve{constructor(e,r,n){let i=null;typeof e!="string"&&r===void 0&&n===void 0&&(i=e,e=void 0,r=void 0,n=void 0),super(e||rw,r||tw,n),this.maskSprite=i,this.maskMatrix=new Lt}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,r,n,i){const a=this._maskSprite,u=a._texture;u.valid&&(u.uvMatrix||(u.uvMatrix=new ew(u,0)),u.uvMatrix.update(),this.uniforms.npmAlpha=u.baseTexture.alphaMode?0:1,this.uniforms.mask=u,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,a).prepend(u.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=u.uvMatrix.uClampFrame,e.applyFilter(this,r,n,i))}}class iw{constructor(e=null){this.type=_t.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Ve.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=_t.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Fd{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,r){let n=r;if(!n.isMaskData){const a=this.maskDataPool.pop()||new iw;a.pooled=!0,a.maskObject=r,n=a}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=e,n.type!==_t.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case _t.SCISSOR:this.renderer.scissor.push(n);break;case _t.STENCIL:this.renderer.stencil.push(n);break;case _t.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case _t.COLOR:this.pushColorMask(n);break}n.type===_t.SPRITE&&this.maskStack.push(n)}pop(e){const r=this.maskStack.pop();if(!(!r||r._target!==e)){if(r.enabled)switch(r.type){case _t.SCISSOR:this.renderer.scissor.pop(r);break;case _t.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case _t.SPRITE:this.popSpriteMask(r);break;case _t.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===_t.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(e){const r=e.maskObject;r?r.isSprite?e.type=_t.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=_t.SCISSOR:e.type=_t.STENCIL:e.type=_t.COLOR}pushSpriteMask(e){const{maskObject:r}=e,n=e._target;let i=e._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new nw]));const a=this.renderer,u=a.renderTexture;let l,h;if(u.current){const g=u.current;l=e.resolution||g.resolution,h=e.multisample??g.multisample}else l=e.resolution||a.resolution,h=e.multisample??a.multisample;i[0].resolution=l,i[0].multisample=h,i[0].maskSprite=r;const p=n.filterArea;n.filterArea=r.getBounds(!0),a.filter.push(n,i),n.filterArea=p,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const r=e._colorMask,n=e._colorMask=r&e.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(e){const r=e._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Fd.extension={type:Oe.RendererSystem,name:"mask"},We.add(Fd);class Nd{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=e;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Ld=new Lt,kd=[],Ca=class extends Nd{constructor(t){super(t),this.glConst=Ee.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0}calcScissorRect(t){if(t._scissorRectLocal)return;const e=t._scissorRect,{maskObject:r}=t,{renderer:n}=this,i=n.renderTexture,a=r.getBounds(!0,kd.pop()??new Ke);this.roundFrameToPixels(a,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),e&&a.fit(e),t._scissorRectLocal=a}static isMatrixRotated(t){if(!t)return!1;const{a:e,b:r,c:n,d:i}=t;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(i)>1e-4)}testScissor(t){const{maskObject:e}=t;if(!e.isFastRect||!e.isFastRect()||Ca.isMatrixRotated(e.worldTransform)||Ca.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(t);const r=t._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(t,e,r,n,i){Ca.isMatrixRotated(i)||(i=i?Ld.copyFrom(i):Ld.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,t),t.fit(n),t.x=Math.round(t.x*e),t.y=Math.round(t.y*e),t.width=Math.round(t.width*e),t.height=Math.round(t.height*e))}push(t){t._scissorRectLocal||this.calcScissorRect(t);const{gl:e}=this.renderer;t._scissorRect||e.enable(e.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=t._scissorRectLocal,this._useCurrent()}pop(t){const{gl:e}=this.renderer;t&&kd.push(t._scissorRectLocal),this.getStackLength()>0?this._useCurrent():e.disable(e.SCISSOR_TEST)}_useCurrent(){const t=this.maskStack[this.maskStack.length-1]._scissorRect;let e;this.renderer.renderTexture.current?e=t.y:e=this.renderer.height-t.height-t.y,this.renderer.gl.scissor(t.x,e,t.width,t.height)}};let Bd=Ca;Bd.extension={type:Oe.RendererSystem,name:"scissor"},We.add(Bd);class Dd extends Nd{constructor(e){super(e),this.glConst=Ee.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const r=e.maskObject,{gl:n}=this.renderer,i=e._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;const a=e._colorMask;a!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(e._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}pop(e){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}Dd.extension={type:Oe.RendererSystem,name:"stencil"},We.add(Dd);class Ud{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Le("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return Le("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return Le("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const r in e)this.plugins[r]=new e[r](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}Ud.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"_plugin"},We.add(Ud);class $d{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Lt,this.transform=null}update(e,r,n,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)}calculateProjection(e,r,n,i){const a=this.projectionMatrix,u=i?-1:1;a.identity(),a.a=1/r.width*2,a.d=u*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-u-r.y*a.d}setTransform(e){}destroy(){this.renderer=null}}$d.extension={type:Oe.RendererSystem,name:"projection"},We.add($d);const sw=new cl;class Gd{constructor(e){this.renderer=e,this._tempMatrix=new Lt}generateTexture(e,r){const{region:n,...i}=r||{},a=n||e.getLocalBounds(null,!0);a.width===0&&(a.width=1),a.height===0&&(a.height=1);const u=Aa.create({width:a.width,height:a.height,...i});this._tempMatrix.tx=-a.x,this._tempMatrix.ty=-a.y;const l=e.transform;return e.transform=sw,this.renderer.render(e,{renderTexture:u,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=l,u}destroy(){}}Gd.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"textureGenerator"},We.add(Gd);const Ln=new Ke,ms=new Ke;class Hd{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Ke,this.destinationFrame=new Ke,this.viewportFrame=new Ke}bind(e=null,r,n){const i=this.renderer;this.current=e;let a,u,l;e?(a=e.baseTexture,l=a.resolution,r||(Ln.width=e.frame.width,Ln.height=e.frame.height,r=Ln),n||(ms.x=e.frame.x,ms.y=e.frame.y,ms.width=r.width,ms.height=r.height,n=ms),u=a.framebuffer):(l=i.resolution,r||(Ln.width=i._view.screen.width,Ln.height=i._view.screen.height,r=Ln),n||(n=Ln,n.width=r.width,n.height=r.height));const h=this.viewportFrame;h.x=n.x*l,h.y=n.y*l,h.width=n.width*l,h.height=n.height*l,e||(h.y=i.view.height-(h.y+h.height)),h.ceil(),this.renderer.framebuffer.bind(u,h),this.renderer.projection.update(n,r,l,!u),e?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(e,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=e?Mt.shared.setValue(e):n,a=this.destinationFrame,u=this.current?this.current.baseTexture:this.renderer._view.screen,l=a.width!==u.width||a.height!==u.height;if(l){let{x:h,y:p,width:g,height:c}=this.viewportFrame;h=Math.round(h),p=Math.round(p),g=Math.round(g),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(h,p,g,c)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Hd.extension={type:Oe.RendererSystem,name:"renderTexture"},We.add(Hd);class aw{constructor(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function ow(t,e){const r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const a=e.getActiveAttrib(t,i);if(a.name.startsWith("gl_"))continue;const u=yd(e,a.type),l={type:u,name:a.name,size:vd(u),location:e.getAttribLocation(t,a.name)};r[a.name]=l}return r}function uw(t,e){const r={},n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const a=e.getActiveUniform(t,i),u=a.name.replace(/\[.*?\]$/,""),l=!!a.name.match(/\[.*?\]$/),h=yd(e,a.type);r[u]={name:u,index:i,type:h,size:a.size,isArray:l,value:pd(h,a.size)}}return r}function lw(t,e){var h;const r=dd(t,t.VERTEX_SHADER,e.vertexSrc),n=dd(t,t.FRAGMENT_SHADER,e.fragmentSrc),i=t.createProgram();t.attachShader(i,r),t.attachShader(i,n);const a=(h=e.extra)==null?void 0:h.transformFeedbackVaryings;if(a&&(typeof t.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(i,a.names,a.bufferMode==="separate"?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)||kT(t,i,r,n),e.attributeData=ow(i,t),e.uniformData=uw(i,t),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){const p=Object.keys(e.attributeData);p.sort((g,c)=>g>c?1:-1);for(let g=0;g<p.length;g++)e.attributeData[p[g]].location=g,t.bindAttribLocation(i,g,p[g]);t.linkProgram(i)}t.deleteShader(r),t.deleteShader(n);const u={};for(const p in e.uniformData){const g=e.uniformData[p];u[p]={location:t.getUniformLocation(i,p),value:pd(g.type,g.size)}}return new aw(i,u)}function cw(t,e,r,n,i){r.buffer.update(i)}const hw={float:`
444
428
  data[offset] = v;
445
429
  `,vec2:`
446
430
  data[offset] = v[0];
@@ -478,7 +462,7 @@ void main(void)
478
462
  {
479
463
  data[offset + i] = v[i];
480
464
  }
481
- `},pp={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function dC(t){const e=t.map(a=>({data:a,offset:0,dataLen:0,dirty:0}));let r=0,n=0,i=0;for(let a=0;a<e.length;a++){const u=e[a];if(r=pp[u.data.type],u.data.size>1&&(r=Math.max(r,16)*u.data.size),u.dataLen=r,n%r!==0&&n<16){const l=n%r%16;n+=l,i+=l}n+r>16?(i=Math.ceil(i/16)*16,u.offset=i,i+=r,n=r):(u.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:e,size:i}}function pC(t,e){const r=[];for(const n in t)e[n]&&r.push(e[n]);return r.sort((n,i)=>n.index-i.index),r}function gC(t,e){if(!t.autoManage)return{size:0,syncFunc:hC};const r=pC(t.uniforms,e),{uboElements:n,size:i}=dC(r),a=[`
465
+ `},zd={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function fw(t){const e=t.map(a=>({data:a,offset:0,dataLen:0,dirty:0}));let r=0,n=0,i=0;for(let a=0;a<e.length;a++){const u=e[a];if(r=zd[u.data.type],u.data.size>1&&(r=Math.max(r,16)*u.data.size),u.dataLen=r,n%r!==0&&n<16){const l=n%r%16;n+=l,i+=l}n+r>16?(i=Math.ceil(i/16)*16,u.offset=i,i+=r,n=r):(u.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:e,size:i}}function dw(t,e){const r=[];for(const n in t)e[n]&&r.push(e[n]);return r.sort((n,i)=>n.index-i.index),r}function pw(t,e){if(!t.autoManage)return{size:0,syncFunc:cw};const r=dw(t.uniforms,e),{uboElements:n,size:i}=fw(r),a=[`
482
466
  var v = null;
483
467
  var v2 = null;
484
468
  var cv = null;
@@ -486,7 +470,7 @@ void main(void)
486
470
  var gl = renderer.gl
487
471
  var index = 0;
488
472
  var data = buffer.data;
489
- `];for(let u=0;u<n.length;u++){const l=n[u],f=t.uniforms[l.data.name],p=l.data.name;let g=!1;for(let c=0;c<xi.length;c++){const d=xi[c];if(d.codeUbo&&d.test(l.data,f)){a.push(`offset = ${l.offset/4};`,xi[c].codeUbo(l.data.name,f)),g=!0;break}}if(!g)if(l.data.size>1){const c=Hd(l.data.type),d=Math.max(pp[l.data.type]/16,1),m=c/d,_=(4-m%4)%4;a.push(`
473
+ `];for(let u=0;u<n.length;u++){const l=n[u],h=t.uniforms[l.data.name],p=l.data.name;let g=!1;for(let c=0;c<mi.length;c++){const d=mi[c];if(d.codeUbo&&d.test(l.data,h)){a.push(`offset = ${l.offset/4};`,mi[c].codeUbo(l.data.name,h)),g=!0;break}}if(!g)if(l.data.size>1){const c=vd(l.data.type),d=Math.max(zd[l.data.type]/16,1),m=c/d,_=(4-m%4)%4;a.push(`
490
474
  cv = ud.${p}.value;
491
475
  v = uv.${p};
492
476
  offset = ${l.offset/4};
@@ -502,7 +486,7 @@ void main(void)
502
486
  offset += ${_};
503
487
  }
504
488
 
505
- `)}else{const c=fC[l.data.type];a.push(`
489
+ `)}else{const c=hw[l.data.type];a.push(`
506
490
  cv = ud.${p}.value;
507
491
  v = uv.${p};
508
492
  offset = ${l.offset/4};
@@ -510,7 +494,7 @@ void main(void)
510
494
  `)}}return a.push(`
511
495
  renderer.buffer.update(buffer);
512
496
  `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(`
513
- `))}}let mC=0;const Da={textureCount:0,uboCount:0};class gp{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=mC++}systemCheck(){if(!UE())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,r){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const n=e.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Da.textureCount=0,Da.uboCount=0,this.syncUniformGroup(e.uniformGroup,Da)),i}setUniforms(e){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,e,this.renderer)}syncUniformGroup(e,r){const n=this.getGlProgram();(!e.static||e.dirtyId!==n.uniformDirtyGroups[e.id])&&(n.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,n,r))}syncUniforms(e,r,n){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(r.uniformData,e.uniforms,this.renderer,n)}createSyncGroups(e){const r=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=NE(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[r],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,r){const n=this.getGlProgram();if(!e.static||e.dirtyId!==0||!n.uniformGroups[e.id]){e.dirtyId=0;const i=n.uniformGroups[e.id]||this.createSyncBufferGroup(e,n,r);e.buffer.update(),i(n.uniformData,e.uniforms,this.renderer,Da,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(e,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(e.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const u=this.getSignature(e,this.shader.program.uniformData,"ubo");let l=this._uboCache[u];if(l||(l=this._uboCache[u]=gC(e,this.shader.program.uniformData)),e.autoManage){const f=new Float32Array(l.size/4);e.buffer.update(f)}return r.uniformGroups[e.id]=l.syncFunc,r.uniformGroups[e.id]}getSignature(e,r,n){const i=e.uniforms,a=[`${n}-`];for(const u in i)a.push(u),r[u]&&a.push(r[u].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const r=this.gl,n=e.program,i=cC(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}gp.extension={type:Ne.RendererSystem,name:"shader"},Ye.add(gp);class Ba{constructor(e){this.renderer=e}run(e){const{renderer:r}=this;r.runners.init.emit(r.options),e.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Ba.defaultOptions={hello:!1},Ba.extension={type:[Ne.RendererSystem,Ne.CanvasRendererSystem],name:"startup"},Ye.add(Ba);function vC(t,e=[]){return e[de.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.ADD]=[t.ONE,t.ONE],e[de.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.NONE]=[0,0],e[de.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[de.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[de.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[de.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[de.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[de.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[de.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[de.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[de.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[de.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}const _C=0,yC=1,xC=2,bC=3,TC=4,wC=5,Tl=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=de.NONE,this._blendEq=!1,this.map=[],this.map[_C]=this.setBlend,this.map[yC]=this.setOffset,this.map[xC]=this.setCullFace,this.map[bC]=this.setDepthTest,this.map[TC]=this.setFrontFace,this.map[wC]=this.setDepthMask,this.checks=[],this.defaultState=new wa,this.defaultState.blend=!0}contextChange(t){this.gl=t,this.blendModes=vC(t),this.set(this.defaultState),this.reset()}set(t){if(t=t||this.defaultState,this.stateId!==t.data){let e=this.stateId^t.data,r=0;for(;e;)e&1&&this.map[r].call(this,!!(t.data&1<<r)),e=e>>1,r++;this.stateId=t.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,t)}forceState(t){t=t||this.defaultState;for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data}setBlend(t){this.updateCheck(Tl.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)}setOffset(t){this.updateCheck(Tl.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(t){this.gl.depthMask(t)}setCullFace(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])}setBlendMode(t){if(t===this.blendMode)return;this.blendMode=t;const e=this.blendModes[t],r=this.gl;e.length===2?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(t,e){this.gl.polygonOffset(t,e)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(t,e){const r=this.checks.indexOf(t);e&&r===-1?this.checks.push(t):!e&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(t,e){t.setBlendMode(e.blendMode)}static checkPolygonOffset(t,e){t.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null}};let mp=Tl;mp.extension={type:Ne.RendererSystem,name:"state"},Ye.add(mp);class SC extends na{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);const r=(e.priority??[]).filter(i=>e.systems[i]),n=[...r,...Object.keys(e.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(e.systems[i],i)}addRunners(...e){e.forEach(r=>{this.runners[r]=new dr(r)})}addSystem(e,r){const n=new e(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(e,r){const n=Object.keys(this._systemsHash);e.items.forEach(i=>{const a=n.find(u=>this._systemsHash[u]===i);i[e.name](r[a])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const Ua=class{constructor(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=Ua.defaultMaxIdle,this.checkCountMax=Ua.defaultCheckCountMax,this.mode=Ua.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==mu.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const t=this.renderer.texture,e=t.managedTextures;let r=!1;for(let n=0;n<e.length;n++){const i=e[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<e.length;i++)e[i]!==null&&(e[n++]=e[i]);e.length=n}}unload(t){const e=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&e.destroyTexture(r);for(let n=t.children.length-1;n>=0;n--)this.unload(t.children[n])}destroy(){this.renderer=null}};let vr=Ua;vr.defaultMode=mu.AUTO,vr.defaultMaxIdle=60*60,vr.defaultCheckCountMax=60*10,vr.extension={type:Ne.RendererSystem,name:"textureGC"},Ye.add(vr);class wl{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ge.UNSIGNED_BYTE,this.internalFormat=Z.RGBA,this.samplerType=0}}function AC(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[Ge.UNSIGNED_BYTE]:{[Z.RGBA]:t.RGBA8,[Z.RGB]:t.RGB8,[Z.RG]:t.RG8,[Z.RED]:t.R8,[Z.RGBA_INTEGER]:t.RGBA8UI,[Z.RGB_INTEGER]:t.RGB8UI,[Z.RG_INTEGER]:t.RG8UI,[Z.RED_INTEGER]:t.R8UI,[Z.ALPHA]:t.ALPHA,[Z.LUMINANCE]:t.LUMINANCE,[Z.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ge.BYTE]:{[Z.RGBA]:t.RGBA8_SNORM,[Z.RGB]:t.RGB8_SNORM,[Z.RG]:t.RG8_SNORM,[Z.RED]:t.R8_SNORM,[Z.RGBA_INTEGER]:t.RGBA8I,[Z.RGB_INTEGER]:t.RGB8I,[Z.RG_INTEGER]:t.RG8I,[Z.RED_INTEGER]:t.R8I},[Ge.UNSIGNED_SHORT]:{[Z.RGBA_INTEGER]:t.RGBA16UI,[Z.RGB_INTEGER]:t.RGB16UI,[Z.RG_INTEGER]:t.RG16UI,[Z.RED_INTEGER]:t.R16UI,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT16},[Ge.SHORT]:{[Z.RGBA_INTEGER]:t.RGBA16I,[Z.RGB_INTEGER]:t.RGB16I,[Z.RG_INTEGER]:t.RG16I,[Z.RED_INTEGER]:t.R16I},[Ge.UNSIGNED_INT]:{[Z.RGBA_INTEGER]:t.RGBA32UI,[Z.RGB_INTEGER]:t.RGB32UI,[Z.RG_INTEGER]:t.RG32UI,[Z.RED_INTEGER]:t.R32UI,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT24},[Ge.INT]:{[Z.RGBA_INTEGER]:t.RGBA32I,[Z.RGB_INTEGER]:t.RGB32I,[Z.RG_INTEGER]:t.RG32I,[Z.RED_INTEGER]:t.R32I},[Ge.FLOAT]:{[Z.RGBA]:t.RGBA32F,[Z.RGB]:t.RGB32F,[Z.RG]:t.RG32F,[Z.RED]:t.R32F,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT32F},[Ge.HALF_FLOAT]:{[Z.RGBA]:t.RGBA16F,[Z.RGB]:t.RGB16F,[Z.RG]:t.RG16F,[Z.RED]:t.R16F},[Ge.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:t.RGB565},[Ge.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:t.RGBA4},[Ge.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:t.RGB5_A1},[Ge.UNSIGNED_INT_2_10_10_10_REV]:{[Z.RGBA]:t.RGB10_A2,[Z.RGBA_INTEGER]:t.RGB10_A2UI},[Ge.UNSIGNED_INT_10F_11F_11F_REV]:{[Z.RGB]:t.R11F_G11F_B10F},[Ge.UNSIGNED_INT_5_9_9_9_REV]:{[Z.RGB]:t.RGB9_E5},[Ge.UNSIGNED_INT_24_8]:{[Z.DEPTH_STENCIL]:t.DEPTH24_STENCIL8},[Ge.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Z.DEPTH_STENCIL]:t.DEPTH32F_STENCIL8}}:e={[Ge.UNSIGNED_BYTE]:{[Z.RGBA]:t.RGBA,[Z.RGB]:t.RGB,[Z.ALPHA]:t.ALPHA,[Z.LUMINANCE]:t.LUMINANCE,[Z.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ge.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:t.RGB},[Ge.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:t.RGBA},[Ge.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:t.RGBA}},e}class vp{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new He,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=AC(e);const r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new wl(e.createTexture());e.bindTexture(e.TEXTURE_2D,n.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=n,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new wl(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(e,r=0){const{gl:n}=this;if(e=e==null?void 0:e.castToBaseTexture(),e!=null&&e.valid&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;const i=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[r]!==e&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(e.target,i.texture)),i.dirtyId!==e.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(e)):i.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[r]=e}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===e&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(e.target,this.emptyTextures[e.target].texture),n[i]=null)}ensureSamplerType(e){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let a=e-1;a>=0;--a){const u=r[a];u&&u._glTextures[i].samplerType!==gu.FLOAT&&this.renderer.texture.unbind(u)}}initTexture(e){const r=new wl(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r}initTextureType(e,r){var n;r.internalFormat=((n=this.internalFormats[e.type])==null?void 0:n[e.format])??e.format,this.webGLVersion===2&&e.type===Ge.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type}updateTexture(e){var i;const r=e._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(e,r),(i=e.resource)!=null&&i.upload(n,e,r))r.samplerType!==gu.FLOAT&&(this.hasIntegerTextures=!0);else{const a=e.realWidth,u=e.realHeight,l=n.gl;(r.width!==a||r.height!==u||r.dirtyId<0)&&(r.width=a,r.height=u,l.texImage2D(e.target,0,r.internalFormat,a,u,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}destroyTexture(e,r){const{gl:n}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(e);i!==-1&&ba(this.managedTextures,i,1)}}updateTextureStyle(e){var n;const r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===An.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=rs.CLAMP:r.wrapMode=e.wrapMode,(n=e.resource)!=null&&n.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)}setStyle(e,r){const n=this.gl;if(r.mipmap&&e.mipmap!==An.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Pr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Pr.LINEAR){const a=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Pr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Pr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}vp.extension={type:Ne.RendererSystem,name:"texture"},Ye.add(vp);class _p{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glTransformFeedbacks[n]||this.createGLTransformFeedback(e);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:r,renderer:n,CONTEXT_UID:i}=this,a=r.createTransformFeedback();e._glTransformFeedbacks[i]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let u=0;u<e.buffers.length;u++){const l=e.buffers[u];l&&(n.buffer.update(l),l._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,u,l._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),a}disposeTransformFeedback(e,r){const n=e._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let u=0;u<e.buffers.length;u++){const l=e.buffers[u];if(!l)continue;const f=l._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&a.dispose(l,r))}n&&(r||i.deleteTransformFeedback(n),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}_p.extension={type:Ne.RendererSystem,name:"transformFeedback"},Ye.add(_p);class $a{constructor(e){this.renderer=e}init(e){this.screen=new Qe(0,0,e.width,e.height),this.element=e.view||Re.ADAPTER.createCanvas(),this.resolution=e.resolution||Re.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,r){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){var r;e&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}$a.defaultOptions={width:800,height:600,resolution:Re.RESOLUTION,autoDensity:!1},$a.extension={type:[Ne.RendererSystem,Ne.CanvasRendererSystem],name:"_view"},Ye.add($a),Re.PREFER_ENV=Sn.WEBGL2,Re.STRICT_TEXTURE_CACHE=!1,Re.RENDER_OPTIONS={...Oa.defaultOptions,...Ma.defaultOptions,...$a.defaultOptions,...Ba.defaultOptions},Object.defineProperties(Re,{WRAP_MODE:{get(){return He.defaultOptions.wrapMode},set(t){ke("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),He.defaultOptions.wrapMode=t}},SCALE_MODE:{get(){return He.defaultOptions.scaleMode},set(t){ke("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),He.defaultOptions.scaleMode=t}},MIPMAP_TEXTURES:{get(){return He.defaultOptions.mipmap},set(t){ke("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),He.defaultOptions.mipmap=t}},ANISOTROPIC_LEVEL:{get(){return He.defaultOptions.anisotropicLevel},set(t){ke("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),He.defaultOptions.anisotropicLevel=t}},FILTER_RESOLUTION:{get(){return ke("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),je.defaultResolution},set(t){je.defaultResolution=t}},FILTER_MULTISAMPLE:{get(){return ke("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),je.defaultMultisample},set(t){je.defaultMultisample=t}},SPRITE_MAX_TEXTURES:{get(){return mr.defaultMaxTextures},set(t){ke("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),mr.defaultMaxTextures=t}},SPRITE_BATCH_SIZE:{get(){return mr.defaultBatchSize},set(t){ke("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),mr.defaultBatchSize=t}},CAN_UPLOAD_SAME_BUFFER:{get(){return mr.canUploadSameBuffer},set(t){ke("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),mr.canUploadSameBuffer=t}},GC_MODE:{get(){return vr.defaultMode},set(t){ke("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),vr.defaultMode=t}},GC_MAX_IDLE:{get(){return vr.defaultMaxIdle},set(t){ke("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),vr.defaultMaxIdle=t}},GC_MAX_CHECK_COUNT:{get(){return vr.defaultCheckCountMax},set(t){ke("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),vr.defaultCheckCountMax=t}},PRECISION_VERTEX:{get(){return Hr.defaultVertexPrecision},set(t){ke("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Hr.defaultVertexPrecision=t}},PRECISION_FRAGMENT:{get(){return Hr.defaultFragmentPrecision},set(t){ke("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Hr.defaultFragmentPrecision=t}}});var Ga=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(Ga||{});class Sl{constructor(e,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=r,this.priority=n,this.once=i}match(e,r=null){return this.fn===e&&this.context===r}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}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 r=this.next;return this.next=e?null:r,this.previous=null,r}}const Wt=class{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 Sl(null,null,1/0),this.deltaMS=1/Wt.targetFPMS,this.elapsedMS=1/Wt.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),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(t,e,r=Ga.NORMAL){return this._addListener(new Sl(t,e,r))}addOnce(t,e,r=Ga.NORMAL){return this._addListener(new Sl(t,e,r,!0))}_addListener(t){let e=this._head.next,r=this._head;if(!e)t.connect(r);else{for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}return this._startIfPossible(),this}remove(t,e){let r=this._head.next;for(;r;)r.match(t,e)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){const i=t-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=t-i%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*Wt.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,Wt.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){if(t===0)this._minElapsedMS=0;else{const e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!Wt._shared){const t=Wt._shared=new Wt;t.autoStart=!0,t._protected=!0}return Wt._shared}static get system(){if(!Wt._system){const t=Wt._system=new Wt;t.autoStart=!0,t._protected=!0}return Wt._system}};let _r=Wt;_r.targetFPMS=.06,Object.defineProperties(Re,{TARGET_FPMS:{get(){return _r.targetFPMS},set(t){ke("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),_r.targetFPMS=t}}});class yp{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Ga.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?_r.shared:new _r,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}yp.extension=Ne.Application,Ye.add(yp);const EC=[];Ye.handleByList(Ne.Renderer,EC);class xp{constructor(e){this.renderer=e}contextChange(e){let r;if(this.renderer.context.webGLVersion===1){const n=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,n)}else{const n=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,n)}r>=vt.HIGH?this.multisample=vt.HIGH:r>=vt.MEDIUM?this.multisample=vt.MEDIUM:r>=vt.LOW?this.multisample=vt.LOW:this.multisample=vt.NONE}destroy(){}}xp.extension={type:Ne.RendererSystem,name:"_multisample"},Ye.add(xp);class CC{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class bp{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);r.bindBuffer(e.type,i.buffer)}unbind(e){const{gl:r}=this;r.bindBuffer(e,null)}bindBufferBase(e,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==e){const a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[r]=e,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(e,r,n){const{gl:i,CONTEXT_UID:a}=this;n=n||0;const u=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,u.buffer,n*256,256)}update(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);if(e._updateID!==i.updateID)if(i.updateID=e._updateID,r.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)r.bufferSubData(e.type,0,e.data);else{const a=e.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,r.bufferData(e.type,e.data,a)}}dispose(e,r){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],e)}createGLBuffer(e){const{CONTEXT_UID:r,gl:n}=this;return e._glBuffers[r]=new CC(n.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[r]}}bp.extension={type:Ne.RendererSystem,name:"buffer"},Ye.add(bp);class Tp{constructor(e){this.renderer=e}render(e,r){const n=this.renderer;let i,a,u,l;if(r&&(i=r.renderTexture,a=r.clear,u=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=u,!n.context.isLost){if(i||(this.lastObjectRendered=e),!l){const f=e.enableTempParent();e.updateTransform(),e.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),e.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}Tp.extension={type:Ne.RendererSystem,name:"objectRenderer"},Ye.add(Tp);const Al=class extends SC{constructor(t){super(),this.type=mf.WEBGL,t=Object.assign({},Re.RENDER_OPTIONS,t),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new pr({projectionMatrix:new Dt},!0);const e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Al.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in t&&(ke("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),t.premultipliedAlpha=t.useContextAlpha&&t.useContextAlpha!=="notMultiplied",t.backgroundAlpha=t.useContextAlpha===!1?1:t.backgroundAlpha),this._plugin.rendererPlugins=Al.__plugins,this.options=t,this.startup.run(this.options)}static test(t){return t!=null&&t.forceCanvas?!1:nE()}render(t,e){this.objectRenderer.render(t,e)}resize(t,e){this._view.resizeView(t,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(t=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:t}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(t){this._view.resolution=t,this.runners.resolutionChange.emit(t)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return ke("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return ke("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return ke("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return ke("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(t){ke("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=t}get backgroundAlpha(){return ke("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(t){ke("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=t}get powerPreference(){return ke("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(t,e){return this.textureGenerator.generateTexture(t,e)}};let wi=Al;wi.extension={type:Ne.Renderer,priority:1},wi.__plugins={},wi.__systems={},Ye.handleByMap(Ne.RendererPlugin,wi.__plugins),Ye.handleByMap(Ne.RendererSystem,wi.__systems),Ye.add(wi);class wp extends ds{constructor(e,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let a=0;a<e;a++){const u=new He;this.items.push(u),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,r){for(let n=0;n<this.length;n++)e[n]&&(e[n].castToBaseTexture?this.addBaseTextureAt(e[n].castToBaseTexture(),n):e[n]instanceof ds?this.addResourceAt(e[n],n):this.addResourceAt(Fd(e[n],r),n))}dispose(){for(let e=0,r=this.length;e<r;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[r].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)}unbind(e){super.unbind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class IC extends wp{constructor(e,r){const{width:n,height:i}=r||{};let a,u;Array.isArray(e)?(a=e,u=e.length):u=e,super(u,{width:n,height:i}),a&&this.initFromArray(a,r)}addBaseTextureAt(e,r){if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=si.TEXTURE_2D_ARRAY}upload(e,r,n){const{length:i,itemDirtyIds:a,items:u}=this,{gl:l}=e;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const p=u[f];a[f]<p.dirtyId&&(a[f]=p.dirtyId,p.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,f,p.resource.width,p.resource.height,1,r.format,n.type,p.resource.source))}return!0}}class RC extends cn{constructor(e){super(e)}static test(e){const{OffscreenCanvas:r}=globalThis;return r&&e instanceof r?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}}const xs=class extends wp{constructor(t,e){const{width:r,height:n,autoLoad:i,linkBaseTexture:a}=e||{};if(t&&t.length!==xs.SIDES)throw new Error(`Invalid length. Got ${t.length}, expected 6`);super(6,{width:r,height:n});for(let u=0;u<xs.SIDES;u++)this.items[u].target=si.TEXTURE_CUBE_MAP_POSITIVE_X+u;this.linkBaseTexture=a!==!1,t&&this.initFromArray(t,e),i!==!1&&this.load()}bind(t){super.bind(t),t.target=si.TEXTURE_CUBE_MAP}addBaseTextureAt(t,e,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[e])throw new Error(`Index ${e} is out of bounds`);if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0)if(t.resource)this.addResourceAt(t.resource,e);else throw new Error("CubeResource does not support copying of renderTexture.");else t.target=si.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this}upload(t,e,r){const n=this.itemDirtyIds;for(let i=0;i<xs.SIDES;i++){const a=this.items[i];(n[i]<a.dirtyId||r.dirtyId<e.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(t,a,r),n[i]=a.dirtyId):n[i]<-1&&(t.gl.texImage2D(a.target,0,r.internalFormat,e.realWidth,e.realHeight,0,e.format,r.type,null),n[i]=-1))}return!0}static test(t){return Array.isArray(t)&&t.length===xs.SIDES}};let Sp=xs;Sp.SIDES=6;class Si extends cn{constructor(e,r){r=r||{};let n,i;typeof e=="string"?(n=Si.EMPTY,i=e):(n=e,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,r)=>{if(this.url===null){e(this);return}try{const n=await Re.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===sn.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),e(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(e,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(e,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return Si._EMPTY=Si._EMPTY??Re.ADAPTER.createCanvas(0,0),Si._EMPTY}}const Ha=class extends cn{constructor(t,e){e=e||{},super(Re.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=t,this.scale=e.scale||1,this._overrideWidth=e.width,this._overrideHeight=e.height,this._resolve=null,this._crossorigin=e.crossorigin,this._load=null,e.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(t=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),t(this)},Ha.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const t=new Image;cn.crossOrigin(t,this.svg,this._crossorigin),t.src=this.svg,t.onerror=e=>{this._resolve&&(t.onerror=null,this.onError.emit(e))},t.onload=()=>{if(!this._resolve)return;const e=t.width,r=t.height;if(!e||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=e*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*e,i=this._overrideHeight||this._overrideWidth/e*r),n=Math.round(n),i=Math.round(i);const a=this.source;a.width=n,a.height=i,a._pixiId=`canvas_${fs()}`,a.getContext("2d").drawImage(t,0,0,e,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(t){const e=Ha.SVG_SIZE.exec(t),r={};return e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(t,e){return e==="svg"||typeof t=="string"&&t.startsWith("data:image/svg+xml")||typeof t=="string"&&Ha.SVG_XML.test(t)}};let El=Ha;El.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,El.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const Cl=class extends cn{constructor(t,e){if(e=e||{},!(t instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof t=="string"&&(t=[t]);const n=t[0].src||t[0];cn.crossOrigin(r,n,e.crossorigin);for(let i=0;i<t.length;++i){const a=document.createElement("source");let{src:u,mime:l}=t[i];u=u||t[i];const f=u.split("?").shift().toLowerCase(),p=f.slice(f.lastIndexOf(".")+1);l=l||Cl.MIME_TYPES[p]||`video/${p}`,a.src=u,a.type=l,r.appendChild(a)}t=r}super(t),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),e.autoLoad!==!1&&this.load()}update(t=0){if(!this.destroyed){const e=_r.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const t=this.source;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("error",this._onError,!0)),this._load=new Promise(e=>{this.valid?e(this):(this._resolve=e,t.load())}),this._load}_onError(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)}_isSourcePlaying(){const t=this.source;return!t.paused&&!t.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(_r.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(_r.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);const e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()}dispose(){this._isConnectedToTicker&&(_r.shared.remove(this.update,this),this._isConnectedToTicker=!1);const t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(_r.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(_r.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t)}static test(t,e){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement||Cl.TYPES.includes(e)}};let Il=Cl;Il.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],Il.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},cl.push(Si,Kd,RC,Il,El,hl,Sp,IC);var PC=`attribute vec2 aVertexPosition;
497
+ `))}}let gw=0;const Ia={textureCount:0,uboCount:0};class Vd{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=gw++}systemCheck(){if(!DT())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,r){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const n=e.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Ia.textureCount=0,Ia.uboCount=0,this.syncUniformGroup(e.uniformGroup,Ia)),i}setUniforms(e){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,e,this.renderer)}syncUniformGroup(e,r){const n=this.getGlProgram();(!e.static||e.dirtyId!==n.uniformDirtyGroups[e.id])&&(n.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,n,r))}syncUniforms(e,r,n){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(r.uniformData,e.uniforms,this.renderer,n)}createSyncGroups(e){const r=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=FT(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[r],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,r){const n=this.getGlProgram();if(!e.static||e.dirtyId!==0||!n.uniformGroups[e.id]){e.dirtyId=0;const i=n.uniformGroups[e.id]||this.createSyncBufferGroup(e,n,r);e.buffer.update(),i(n.uniformData,e.uniforms,this.renderer,Ia,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(e,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(e.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const u=this.getSignature(e,this.shader.program.uniformData,"ubo");let l=this._uboCache[u];if(l||(l=this._uboCache[u]=pw(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(l.size/4);e.buffer.update(h)}return r.uniformGroups[e.id]=l.syncFunc,r.uniformGroups[e.id]}getSignature(e,r,n){const i=e.uniforms,a=[`${n}-`];for(const u in i)a.push(u),r[u]&&a.push(r[u].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const r=this.gl,n=e.program,i=lw(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Vd.extension={type:Oe.RendererSystem,name:"shader"},We.add(Vd);class Ra{constructor(e){this.renderer=e}run(e){const{renderer:r}=this;r.runners.init.emit(r.options),e.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Ra.defaultOptions={hello:!1},Ra.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"startup"},We.add(Ra);function mw(t,e=[]){return e[de.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.ADD]=[t.ONE,t.ONE],e[de.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.NONE]=[0,0],e[de.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[de.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[de.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[de.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[de.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[de.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[de.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[de.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[de.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[de.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[de.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}const vw=0,_w=1,yw=2,xw=3,bw=4,Tw=5,ml=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=de.NONE,this._blendEq=!1,this.map=[],this.map[vw]=this.setBlend,this.map[_w]=this.setOffset,this.map[yw]=this.setCullFace,this.map[xw]=this.setDepthTest,this.map[bw]=this.setFrontFace,this.map[Tw]=this.setDepthMask,this.checks=[],this.defaultState=new pa,this.defaultState.blend=!0}contextChange(t){this.gl=t,this.blendModes=mw(t),this.set(this.defaultState),this.reset()}set(t){if(t=t||this.defaultState,this.stateId!==t.data){let e=this.stateId^t.data,r=0;for(;e;)e&1&&this.map[r].call(this,!!(t.data&1<<r)),e=e>>1,r++;this.stateId=t.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,t)}forceState(t){t=t||this.defaultState;for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data}setBlend(t){this.updateCheck(ml.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)}setOffset(t){this.updateCheck(ml.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(t){this.gl.depthMask(t)}setCullFace(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])}setBlendMode(t){if(t===this.blendMode)return;this.blendMode=t;const e=this.blendModes[t],r=this.gl;e.length===2?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(t,e){this.gl.polygonOffset(t,e)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(t,e){const r=this.checks.indexOf(t);e&&r===-1?this.checks.push(t):!e&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(t,e){t.setBlendMode(e.blendMode)}static checkPolygonOffset(t,e){t.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null}};let jd=ml;jd.extension={type:Oe.RendererSystem,name:"state"},We.add(jd);class ww extends qs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);const r=(e.priority??[]).filter(i=>e.systems[i]),n=[...r,...Object.keys(e.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(e.systems[i],i)}addRunners(...e){e.forEach(r=>{this.runners[r]=new dr(r)})}addSystem(e,r){const n=new e(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(e,r){const n=Object.keys(this._systemsHash);e.items.forEach(i=>{const a=n.find(u=>this._systemsHash[u]===i);i[e.name](r[a])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const Pa=class{constructor(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=Pa.defaultMaxIdle,this.checkCountMax=Pa.defaultCheckCountMax,this.mode=Pa.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==cu.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const t=this.renderer.texture,e=t.managedTextures;let r=!1;for(let n=0;n<e.length;n++){const i=e[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<e.length;i++)e[i]!==null&&(e[n++]=e[i]);e.length=n}}unload(t){const e=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&e.destroyTexture(r);for(let n=t.children.length-1;n>=0;n--)this.unload(t.children[n])}destroy(){this.renderer=null}};let vr=Pa;vr.defaultMode=cu.AUTO,vr.defaultMaxIdle=60*60,vr.defaultCheckCountMax=60*10,vr.extension={type:Oe.RendererSystem,name:"textureGC"},We.add(vr);class vl{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=De.UNSIGNED_BYTE,this.internalFormat=Z.RGBA,this.samplerType=0}}function Sw(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[De.UNSIGNED_BYTE]:{[Z.RGBA]:t.RGBA8,[Z.RGB]:t.RGB8,[Z.RG]:t.RG8,[Z.RED]:t.R8,[Z.RGBA_INTEGER]:t.RGBA8UI,[Z.RGB_INTEGER]:t.RGB8UI,[Z.RG_INTEGER]:t.RG8UI,[Z.RED_INTEGER]:t.R8UI,[Z.ALPHA]:t.ALPHA,[Z.LUMINANCE]:t.LUMINANCE,[Z.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[De.BYTE]:{[Z.RGBA]:t.RGBA8_SNORM,[Z.RGB]:t.RGB8_SNORM,[Z.RG]:t.RG8_SNORM,[Z.RED]:t.R8_SNORM,[Z.RGBA_INTEGER]:t.RGBA8I,[Z.RGB_INTEGER]:t.RGB8I,[Z.RG_INTEGER]:t.RG8I,[Z.RED_INTEGER]:t.R8I},[De.UNSIGNED_SHORT]:{[Z.RGBA_INTEGER]:t.RGBA16UI,[Z.RGB_INTEGER]:t.RGB16UI,[Z.RG_INTEGER]:t.RG16UI,[Z.RED_INTEGER]:t.R16UI,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT16},[De.SHORT]:{[Z.RGBA_INTEGER]:t.RGBA16I,[Z.RGB_INTEGER]:t.RGB16I,[Z.RG_INTEGER]:t.RG16I,[Z.RED_INTEGER]:t.R16I},[De.UNSIGNED_INT]:{[Z.RGBA_INTEGER]:t.RGBA32UI,[Z.RGB_INTEGER]:t.RGB32UI,[Z.RG_INTEGER]:t.RG32UI,[Z.RED_INTEGER]:t.R32UI,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT24},[De.INT]:{[Z.RGBA_INTEGER]:t.RGBA32I,[Z.RGB_INTEGER]:t.RGB32I,[Z.RG_INTEGER]:t.RG32I,[Z.RED_INTEGER]:t.R32I},[De.FLOAT]:{[Z.RGBA]:t.RGBA32F,[Z.RGB]:t.RGB32F,[Z.RG]:t.RG32F,[Z.RED]:t.R32F,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT32F},[De.HALF_FLOAT]:{[Z.RGBA]:t.RGBA16F,[Z.RGB]:t.RGB16F,[Z.RG]:t.RG16F,[Z.RED]:t.R16F},[De.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:t.RGB565},[De.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:t.RGBA4},[De.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:t.RGB5_A1},[De.UNSIGNED_INT_2_10_10_10_REV]:{[Z.RGBA]:t.RGB10_A2,[Z.RGBA_INTEGER]:t.RGB10_A2UI},[De.UNSIGNED_INT_10F_11F_11F_REV]:{[Z.RGB]:t.R11F_G11F_B10F},[De.UNSIGNED_INT_5_9_9_9_REV]:{[Z.RGB]:t.RGB9_E5},[De.UNSIGNED_INT_24_8]:{[Z.DEPTH_STENCIL]:t.DEPTH24_STENCIL8},[De.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Z.DEPTH_STENCIL]:t.DEPTH32F_STENCIL8}}:e={[De.UNSIGNED_BYTE]:{[Z.RGBA]:t.RGBA,[Z.RGB]:t.RGB,[Z.ALPHA]:t.ALPHA,[Z.LUMINANCE]:t.LUMINANCE,[Z.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[De.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:t.RGB},[De.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:t.RGBA},[De.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:t.RGBA}},e}class Xd{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Ue,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Sw(e);const r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new vl(e.createTexture());e.bindTexture(e.TEXTURE_2D,n.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=n,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new vl(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(e,r=0){const{gl:n}=this;if(e=e==null?void 0:e.castToBaseTexture(),e!=null&&e.valid&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;const i=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[r]!==e&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(e.target,i.texture)),i.dirtyId!==e.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(e)):i.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[r]=e}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===e&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(e.target,this.emptyTextures[e.target].texture),n[i]=null)}ensureSamplerType(e){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let a=e-1;a>=0;--a){const u=r[a];u&&u._glTextures[i].samplerType!==lu.FLOAT&&this.renderer.texture.unbind(u)}}initTexture(e){const r=new vl(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r}initTextureType(e,r){var n;r.internalFormat=((n=this.internalFormats[e.type])==null?void 0:n[e.format])??e.format,this.webGLVersion===2&&e.type===De.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type}updateTexture(e){var i;const r=e._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(e,r),(i=e.resource)!=null&&i.upload(n,e,r))r.samplerType!==lu.FLOAT&&(this.hasIntegerTextures=!0);else{const a=e.realWidth,u=e.realHeight,l=n.gl;(r.width!==a||r.height!==u||r.dirtyId<0)&&(r.width=a,r.height=u,l.texImage2D(e.target,0,r.internalFormat,a,u,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}destroyTexture(e,r){const{gl:n}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(e);i!==-1&&fa(this.managedTextures,i,1)}}updateTextureStyle(e){var n;const r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===Sn.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=Ji.CLAMP:r.wrapMode=e.wrapMode,(n=e.resource)!=null&&n.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)}setStyle(e,r){const n=this.gl;if(r.mipmap&&e.mipmap!==Sn.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Pr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Pr.LINEAR){const a=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Pr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Pr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Xd.extension={type:Oe.RendererSystem,name:"texture"},We.add(Xd);class Wd{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glTransformFeedbacks[n]||this.createGLTransformFeedback(e);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:r,renderer:n,CONTEXT_UID:i}=this,a=r.createTransformFeedback();e._glTransformFeedbacks[i]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let u=0;u<e.buffers.length;u++){const l=e.buffers[u];l&&(n.buffer.update(l),l._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,u,l._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),a}disposeTransformFeedback(e,r){const n=e._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let u=0;u<e.buffers.length;u++){const l=e.buffers[u];if(!l)continue;const h=l._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&a.dispose(l,r))}n&&(r||i.deleteTransformFeedback(n),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Wd.extension={type:Oe.RendererSystem,name:"transformFeedback"},We.add(Wd);class Ma{constructor(e){this.renderer=e}init(e){this.screen=new Ke(0,0,e.width,e.height),this.element=e.view||Ee.ADAPTER.createCanvas(),this.resolution=e.resolution||Ee.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,r){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){var r;e&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Ma.defaultOptions={width:800,height:600,resolution:Ee.RESOLUTION,autoDensity:!1},Ma.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"_view"},We.add(Ma),Ee.PREFER_ENV=wn.WEBGL2,Ee.STRICT_TEXTURE_CACHE=!1,Ee.RENDER_OPTIONS={...wa.defaultOptions,...Ta.defaultOptions,...Ma.defaultOptions,...Ra.defaultOptions},Object.defineProperties(Ee,{WRAP_MODE:{get(){return Ue.defaultOptions.wrapMode},set(t){Le("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Ue.defaultOptions.wrapMode=t}},SCALE_MODE:{get(){return Ue.defaultOptions.scaleMode},set(t){Le("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Ue.defaultOptions.scaleMode=t}},MIPMAP_TEXTURES:{get(){return Ue.defaultOptions.mipmap},set(t){Le("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Ue.defaultOptions.mipmap=t}},ANISOTROPIC_LEVEL:{get(){return Ue.defaultOptions.anisotropicLevel},set(t){Le("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Ue.defaultOptions.anisotropicLevel=t}},FILTER_RESOLUTION:{get(){return Le("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Ve.defaultResolution},set(t){Ve.defaultResolution=t}},FILTER_MULTISAMPLE:{get(){return Le("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Ve.defaultMultisample},set(t){Ve.defaultMultisample=t}},SPRITE_MAX_TEXTURES:{get(){return mr.defaultMaxTextures},set(t){Le("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),mr.defaultMaxTextures=t}},SPRITE_BATCH_SIZE:{get(){return mr.defaultBatchSize},set(t){Le("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),mr.defaultBatchSize=t}},CAN_UPLOAD_SAME_BUFFER:{get(){return mr.canUploadSameBuffer},set(t){Le("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),mr.canUploadSameBuffer=t}},GC_MODE:{get(){return vr.defaultMode},set(t){Le("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),vr.defaultMode=t}},GC_MAX_IDLE:{get(){return vr.defaultMaxIdle},set(t){Le("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),vr.defaultMaxIdle=t}},GC_MAX_CHECK_COUNT:{get(){return vr.defaultCheckCountMax},set(t){Le("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),vr.defaultCheckCountMax=t}},PRECISION_VERTEX:{get(){return Hr.defaultVertexPrecision},set(t){Le("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Hr.defaultVertexPrecision=t}},PRECISION_FRAGMENT:{get(){return Hr.defaultFragmentPrecision},set(t){Le("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Hr.defaultFragmentPrecision=t}}});var Oa=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(Oa||{});class _l{constructor(e,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=r,this.priority=n,this.once=i}match(e,r=null){return this.fn===e&&this.context===r}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}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 r=this.next;return this.next=e?null:r,this.previous=null,r}}const Xt=class{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 _l(null,null,1/0),this.deltaMS=1/Xt.targetFPMS,this.elapsedMS=1/Xt.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),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(t,e,r=Oa.NORMAL){return this._addListener(new _l(t,e,r))}addOnce(t,e,r=Oa.NORMAL){return this._addListener(new _l(t,e,r,!0))}_addListener(t){let e=this._head.next,r=this._head;if(!e)t.connect(r);else{for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}return this._startIfPossible(),this}remove(t,e){let r=this._head.next;for(;r;)r.match(t,e)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){const i=t-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=t-i%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*Xt.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,Xt.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){if(t===0)this._minElapsedMS=0;else{const e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!Xt._shared){const t=Xt._shared=new Xt;t.autoStart=!0,t._protected=!0}return Xt._shared}static get system(){if(!Xt._system){const t=Xt._system=new Xt;t.autoStart=!0,t._protected=!0}return Xt._system}};let _r=Xt;_r.targetFPMS=.06,Object.defineProperties(Ee,{TARGET_FPMS:{get(){return _r.targetFPMS},set(t){Le("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),_r.targetFPMS=t}}});class qd{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Oa.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?_r.shared:new _r,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}qd.extension=Oe.Application,We.add(qd);const Aw=[];We.handleByList(Oe.Renderer,Aw);class Yd{constructor(e){this.renderer=e}contextChange(e){let r;if(this.renderer.context.webGLVersion===1){const n=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,n)}else{const n=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,n)}r>=vt.HIGH?this.multisample=vt.HIGH:r>=vt.MEDIUM?this.multisample=vt.MEDIUM:r>=vt.LOW?this.multisample=vt.LOW:this.multisample=vt.NONE}destroy(){}}Yd.extension={type:Oe.RendererSystem,name:"_multisample"},We.add(Yd);class Ew{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Kd{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);r.bindBuffer(e.type,i.buffer)}unbind(e){const{gl:r}=this;r.bindBuffer(e,null)}bindBufferBase(e,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==e){const a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[r]=e,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(e,r,n){const{gl:i,CONTEXT_UID:a}=this;n=n||0;const u=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,u.buffer,n*256,256)}update(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);if(e._updateID!==i.updateID)if(i.updateID=e._updateID,r.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)r.bufferSubData(e.type,0,e.data);else{const a=e.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,r.bufferData(e.type,e.data,a)}}dispose(e,r){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],e)}createGLBuffer(e){const{CONTEXT_UID:r,gl:n}=this;return e._glBuffers[r]=new Ew(n.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[r]}}Kd.extension={type:Oe.RendererSystem,name:"buffer"},We.add(Kd);class Zd{constructor(e){this.renderer=e}render(e,r){const n=this.renderer;let i,a,u,l;if(r&&(i=r.renderTexture,a=r.clear,u=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=u,!n.context.isLost){if(i||(this.lastObjectRendered=e),!l){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),e.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}Zd.extension={type:Oe.RendererSystem,name:"objectRenderer"},We.add(Zd);const yl=class extends ww{constructor(t){super(),this.type=Vh.WEBGL,t=Object.assign({},Ee.RENDER_OPTIONS,t),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new pr({projectionMatrix:new Lt},!0);const e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:yl.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in t&&(Le("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),t.premultipliedAlpha=t.useContextAlpha&&t.useContextAlpha!=="notMultiplied",t.backgroundAlpha=t.useContextAlpha===!1?1:t.backgroundAlpha),this._plugin.rendererPlugins=yl.__plugins,this.options=t,this.startup.run(this.options)}static test(t){return t!=null&&t.forceCanvas?!1:rT()}render(t,e){this.objectRenderer.render(t,e)}resize(t,e){this._view.resizeView(t,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(t=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:t}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(t){this._view.resolution=t,this.runners.resolutionChange.emit(t)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Le("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Le("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Le("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Le("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(t){Le("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=t}get backgroundAlpha(){return Le("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(t){Le("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=t}get powerPreference(){return Le("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(t,e){return this.textureGenerator.generateTexture(t,e)}};let yi=yl;yi.extension={type:Oe.Renderer,priority:1},yi.__plugins={},yi.__systems={},We.handleByMap(Oe.RendererPlugin,yi.__plugins),We.handleByMap(Oe.RendererSystem,yi.__systems),We.add(yi);class Qd extends cs{constructor(e,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let a=0;a<e;a++){const u=new Ue;this.items.push(u),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,r){for(let n=0;n<this.length;n++)e[n]&&(e[n].castToBaseTexture?this.addBaseTextureAt(e[n].castToBaseTexture(),n):e[n]instanceof cs?this.addResourceAt(e[n],n):this.addResourceAt(ud(e[n],r),n))}dispose(){for(let e=0,r=this.length;e<r;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[r].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)}unbind(e){super.unbind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class Cw extends Qd{constructor(e,r){const{width:n,height:i}=r||{};let a,u;Array.isArray(e)?(a=e,u=e.length):u=e,super(u,{width:n,height:i}),a&&this.initFromArray(a,r)}addBaseTextureAt(e,r){if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=ti.TEXTURE_2D_ARRAY}upload(e,r,n){const{length:i,itemDirtyIds:a,items:u}=this,{gl:l}=e;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let h=0;h<i;h++){const p=u[h];a[h]<p.dirtyId&&(a[h]=p.dirtyId,p.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,h,p.resource.width,p.resource.height,1,r.format,n.type,p.resource.source))}return!0}}class Iw extends un{constructor(e){super(e)}static test(e){const{OffscreenCanvas:r}=globalThis;return r&&e instanceof r?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}}const vs=class extends Qd{constructor(t,e){const{width:r,height:n,autoLoad:i,linkBaseTexture:a}=e||{};if(t&&t.length!==vs.SIDES)throw new Error(`Invalid length. Got ${t.length}, expected 6`);super(6,{width:r,height:n});for(let u=0;u<vs.SIDES;u++)this.items[u].target=ti.TEXTURE_CUBE_MAP_POSITIVE_X+u;this.linkBaseTexture=a!==!1,t&&this.initFromArray(t,e),i!==!1&&this.load()}bind(t){super.bind(t),t.target=ti.TEXTURE_CUBE_MAP}addBaseTextureAt(t,e,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[e])throw new Error(`Index ${e} is out of bounds`);if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0)if(t.resource)this.addResourceAt(t.resource,e);else throw new Error("CubeResource does not support copying of renderTexture.");else t.target=ti.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this}upload(t,e,r){const n=this.itemDirtyIds;for(let i=0;i<vs.SIDES;i++){const a=this.items[i];(n[i]<a.dirtyId||r.dirtyId<e.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(t,a,r),n[i]=a.dirtyId):n[i]<-1&&(t.gl.texImage2D(a.target,0,r.internalFormat,e.realWidth,e.realHeight,0,e.format,r.type,null),n[i]=-1))}return!0}static test(t){return Array.isArray(t)&&t.length===vs.SIDES}};let Jd=vs;Jd.SIDES=6;class xi extends un{constructor(e,r){r=r||{};let n,i;typeof e=="string"?(n=xi.EMPTY,i=e):(n=e,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,r)=>{if(this.url===null){e(this);return}try{const n=await Ee.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===rn.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),e(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(e,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(e,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return xi._EMPTY=xi._EMPTY??Ee.ADAPTER.createCanvas(0,0),xi._EMPTY}}const Fa=class extends un{constructor(t,e){e=e||{},super(Ee.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=t,this.scale=e.scale||1,this._overrideWidth=e.width,this._overrideHeight=e.height,this._resolve=null,this._crossorigin=e.crossorigin,this._load=null,e.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(t=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),t(this)},Fa.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const t=new Image;un.crossOrigin(t,this.svg,this._crossorigin),t.src=this.svg,t.onerror=e=>{this._resolve&&(t.onerror=null,this.onError.emit(e))},t.onload=()=>{if(!this._resolve)return;const e=t.width,r=t.height;if(!e||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=e*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*e,i=this._overrideHeight||this._overrideWidth/e*r),n=Math.round(n),i=Math.round(i);const a=this.source;a.width=n,a.height=i,a._pixiId=`canvas_${ls()}`,a.getContext("2d").drawImage(t,0,0,e,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(t){const e=Fa.SVG_SIZE.exec(t),r={};return e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(t,e){return e==="svg"||typeof t=="string"&&t.startsWith("data:image/svg+xml")||typeof t=="string"&&Fa.SVG_XML.test(t)}};let xl=Fa;xl.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,xl.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const bl=class extends un{constructor(t,e){if(e=e||{},!(t instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof t=="string"&&(t=[t]);const n=t[0].src||t[0];un.crossOrigin(r,n,e.crossorigin);for(let i=0;i<t.length;++i){const a=document.createElement("source");let{src:u,mime:l}=t[i];u=u||t[i];const h=u.split("?").shift().toLowerCase(),p=h.slice(h.lastIndexOf(".")+1);l=l||bl.MIME_TYPES[p]||`video/${p}`,a.src=u,a.type=l,r.appendChild(a)}t=r}super(t),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),e.autoLoad!==!1&&this.load()}update(t=0){if(!this.destroyed){const e=_r.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const t=this.source;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("error",this._onError,!0)),this._load=new Promise(e=>{this.valid?e(this):(this._resolve=e,t.load())}),this._load}_onError(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)}_isSourcePlaying(){const t=this.source;return!t.paused&&!t.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(_r.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(_r.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);const e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()}dispose(){this._isConnectedToTicker&&(_r.shared.remove(this.update,this),this._isConnectedToTicker=!1);const t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(_r.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(_r.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t)}static test(t,e){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement||bl.TYPES.includes(e)}};let Tl=bl;Tl.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],Tl.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},il.push(xi,Ad,Iw,Tl,xl,sl,Jd,Cw);var Rw=`attribute vec2 aVertexPosition;
514
498
  attribute vec2 aTextureCoord;
515
499
 
516
500
  uniform mat3 projectionMatrix;
@@ -521,7 +505,7 @@ void main(void)
521
505
  {
522
506
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
523
507
  vTextureCoord = aTextureCoord;
524
- }`,MC=`varying vec2 vTextureCoord;
508
+ }`,Pw=`varying vec2 vTextureCoord;
525
509
  uniform sampler2D uSampler;
526
510
 
527
511
  uniform float gamma;
@@ -552,7 +536,7 @@ void main(void)
552
536
 
553
537
  gl_FragColor = c * alpha;
554
538
  }
555
- `;let OC=class extends je{constructor(e){super(PC,MC),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,e)}apply(e,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,n,i)}};var FC=`attribute vec2 aVertexPosition;
539
+ `;let Mw=class extends Ve{constructor(e){super(Rw,Pw),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,e)}apply(e,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,n,i)}};var Ow=`attribute vec2 aVertexPosition;
556
540
  attribute vec2 aTextureCoord;
557
541
 
558
542
  uniform mat3 projectionMatrix;
@@ -563,7 +547,7 @@ void main(void)
563
547
  {
564
548
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
565
549
  vTextureCoord = aTextureCoord;
566
- }`,NC=`
550
+ }`,Fw=`
567
551
  varying vec2 vTextureCoord;
568
552
  uniform sampler2D uSampler;
569
553
 
@@ -589,7 +573,7 @@ void main(void)
589
573
  color *= 0.25;
590
574
 
591
575
  gl_FragColor = color;
592
- }`,LC=`
576
+ }`,Nw=`
593
577
  varying vec2 vTextureCoord;
594
578
  uniform sampler2D uSampler;
595
579
 
@@ -617,7 +601,7 @@ void main(void)
617
601
 
618
602
  gl_FragColor = color;
619
603
  }
620
- `;let bs=class extends je{constructor(e=4,r=3,n=!1){super(FC,n?LC:NC),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new et,this.pixelSize=1,this._clamp=n,Array.isArray(e)?this.kernels=e:(this._blur=e,this.quality=r)}apply(e,r,n,i){const a=this._pixelSize.x/r._frame.width,u=this._pixelSize.y/r._frame.height;let l;if(this._quality===1||this._blur===0)l=this._kernels[0]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,r,n,i);else{const f=e.getFilterTexture();let p=r,g=f,c;const d=this._quality-1;for(let m=0;m<d;m++)l=this._kernels[m]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,p,g,1),c=p,p=g,g=c;l=this._kernels[d]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,p,n,i),e.returnFilterTexture(f)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((e,r)=>e+r+.5,0))}_generateKernels(){const e=this._blur,r=this._quality,n=[e];if(e>0){let i=e;const a=e/r;for(let u=1;u<r;u++)i-=a,n.push(i)}this._kernels=n,this._updatePadding()}get kernels(){return this._kernels}set kernels(e){Array.isArray(e)&&e.length>0?(this._kernels=e,this._quality=e.length,this._blur=Math.max(...e)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(e){typeof e=="number"?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof et?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()}get blur(){return this._blur}set blur(e){this._blur=e,this._generateKernels()}};var Ap=`attribute vec2 aVertexPosition;
604
+ `;let _s=class extends Ve{constructor(e=4,r=3,n=!1){super(Ow,n?Nw:Fw),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new Je,this.pixelSize=1,this._clamp=n,Array.isArray(e)?this.kernels=e:(this._blur=e,this.quality=r)}apply(e,r,n,i){const a=this._pixelSize.x/r._frame.width,u=this._pixelSize.y/r._frame.height;let l;if(this._quality===1||this._blur===0)l=this._kernels[0]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,r,n,i);else{const h=e.getFilterTexture();let p=r,g=h,c;const d=this._quality-1;for(let m=0;m<d;m++)l=this._kernels[m]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,p,g,1),c=p,p=g,g=c;l=this._kernels[d]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,p,n,i),e.returnFilterTexture(h)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((e,r)=>e+r+.5,0))}_generateKernels(){const e=this._blur,r=this._quality,n=[e];if(e>0){let i=e;const a=e/r;for(let u=1;u<r;u++)i-=a,n.push(i)}this._kernels=n,this._updatePadding()}get kernels(){return this._kernels}set kernels(e){Array.isArray(e)&&e.length>0?(this._kernels=e,this._quality=e.length,this._blur=Math.max(...e)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(e){typeof e=="number"?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof Je?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()}get blur(){return this._blur}set blur(e){this._blur=e,this._generateKernels()}};var ep=`attribute vec2 aVertexPosition;
621
605
  attribute vec2 aTextureCoord;
622
606
 
623
607
  uniform mat3 projectionMatrix;
@@ -628,7 +612,7 @@ void main(void)
628
612
  {
629
613
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
630
614
  vTextureCoord = aTextureCoord;
631
- }`,kC=`
615
+ }`,Lw=`
632
616
  uniform sampler2D uSampler;
633
617
  varying vec2 vTextureCoord;
634
618
 
@@ -649,7 +633,7 @@ void main() {
649
633
  gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
650
634
  }
651
635
  }
652
- `;let DC=class extends je{constructor(e=.5){super(Ap,kC),this.threshold=e}get threshold(){return this.uniforms.threshold}set threshold(e){this.uniforms.threshold=e}};var BC=`uniform sampler2D uSampler;
636
+ `;let kw=class extends Ve{constructor(e=.5){super(ep,Lw),this.threshold=e}get threshold(){return this.uniforms.threshold}set threshold(e){this.uniforms.threshold=e}};var Bw=`uniform sampler2D uSampler;
653
637
  varying vec2 vTextureCoord;
654
638
 
655
639
  uniform sampler2D bloomTexture;
@@ -663,7 +647,7 @@ void main() {
663
647
  bloomColor.rgb *= bloomScale;
664
648
  gl_FragColor = color + bloomColor;
665
649
  }
666
- `;const Ep=class extends je{constructor(e){super(Ap,BC),this.bloomScale=1,this.brightness=1,this._resolution=Re.FILTER_RESOLUTION,typeof e=="number"&&(e={threshold:e});const r=Object.assign(Ep.defaults,e);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:i,quality:a,pixelSize:u,resolution:l}=r;this._extractFilter=new DC(r.threshold),this._extractFilter.resolution=l,this._blurFilter=n?new bs(n):new bs(i,a),this.pixelSize=u,this.resolution=l}apply(e,r,n,i,a){const u=e.getFilterTexture();this._extractFilter.apply(e,r,u,1,a);const l=e.getFilterTexture();this._blurFilter.apply(e,u,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,e.applyFilter(this,r,n,i),e.returnFilterTexture(l),e.returnFilterTexture(u)}get resolution(){return this._resolution}set resolution(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)}get threshold(){return this._extractFilter.threshold}set threshold(e){this._extractFilter.threshold=e}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.blur}set blur(e){this._blurFilter.blur=e}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){this._blurFilter.pixelSize=e}};let UC=Ep;UC.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:Re.FILTER_RESOLUTION};var $C=`attribute vec2 aVertexPosition;
650
+ `;const tp=class extends Ve{constructor(e){super(ep,Bw),this.bloomScale=1,this.brightness=1,this._resolution=Ee.FILTER_RESOLUTION,typeof e=="number"&&(e={threshold:e});const r=Object.assign(tp.defaults,e);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:i,quality:a,pixelSize:u,resolution:l}=r;this._extractFilter=new kw(r.threshold),this._extractFilter.resolution=l,this._blurFilter=n?new _s(n):new _s(i,a),this.pixelSize=u,this.resolution=l}apply(e,r,n,i,a){const u=e.getFilterTexture();this._extractFilter.apply(e,r,u,1,a);const l=e.getFilterTexture();this._blurFilter.apply(e,u,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,e.applyFilter(this,r,n,i),e.returnFilterTexture(l),e.returnFilterTexture(u)}get resolution(){return this._resolution}set resolution(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)}get threshold(){return this._extractFilter.threshold}set threshold(e){this._extractFilter.threshold=e}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.blur}set blur(e){this._blurFilter.blur=e}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){this._blurFilter.pixelSize=e}};let Dw=tp;Dw.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:Ee.FILTER_RESOLUTION};var Uw=`attribute vec2 aVertexPosition;
667
651
  attribute vec2 aTextureCoord;
668
652
 
669
653
  uniform mat3 projectionMatrix;
@@ -674,7 +658,7 @@ void main(void)
674
658
  {
675
659
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
676
660
  vTextureCoord = aTextureCoord;
677
- }`,GC=`uniform float radius;
661
+ }`,$w=`uniform float radius;
678
662
  uniform float strength;
679
663
  uniform vec2 center;
680
664
  uniform sampler2D uSampler;
@@ -707,7 +691,7 @@ void main()
707
691
 
708
692
  gl_FragColor = color;
709
693
  }
710
- `;const Cp=class extends je{constructor(e){super($C,GC),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Cp.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,e.applyFilter(this,r,n,i)}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}get strength(){return this.uniforms.strength}set strength(e){this.uniforms.strength=e}get center(){return this.uniforms.center}set center(e){this.uniforms.center=e}};let HC=Cp;HC.defaults={center:[.5,.5],radius:100,strength:1};var zC=`const float PI = 3.1415926538;
694
+ `;const rp=class extends Ve{constructor(e){super(Uw,$w),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,rp.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,e.applyFilter(this,r,n,i)}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}get strength(){return this.uniforms.strength}set strength(e){this.uniforms.strength=e}get center(){return this.uniforms.center}set center(e){this.uniforms.center=e}};let Gw=rp;Gw.defaults={center:[.5,.5],radius:100,strength:1};var Hw=`const float PI = 3.1415926538;
711
695
  const float PI_2 = PI*2.;
712
696
 
713
697
  varying vec2 vTextureCoord;
@@ -834,7 +818,7 @@ void main(void) {
834
818
  // mix resulting color with current color
835
819
  gl_FragColor = gradientColor + currentColor*(1.-gradientColor.a);
836
820
  }
837
- `,VC=`attribute vec2 aVertexPosition;
821
+ `,zw=`attribute vec2 aVertexPosition;
838
822
  attribute vec2 aTextureCoord;
839
823
 
840
824
  uniform mat3 projectionMatrix;
@@ -850,7 +834,7 @@ void main(void)
850
834
  vTextureCoord = aTextureCoord;
851
835
  vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw;
852
836
  }
853
- `,Dn=Dn||{};Dn.stringify=function(){var t={"visit_linear-gradient":function(e){return t.visit_gradient(e)},"visit_repeating-linear-gradient":function(e){return t.visit_gradient(e)},"visit_radial-gradient":function(e){return t.visit_gradient(e)},"visit_repeating-radial-gradient":function(e){return t.visit_gradient(e)},visit_gradient:function(e){var r=t.visit(e.orientation);return r&&(r+=", "),e.type+"("+r+t.visit(e.colorStops)+")"},visit_shape:function(e){var r=e.value,n=t.visit(e.at),i=t.visit(e.style);return i&&(r+=" "+i),n&&(r+=" at "+n),r},"visit_default-radial":function(e){var r="",n=t.visit(e.at);return n&&(r+=n),r},"visit_extent-keyword":function(e){var r=e.value,n=t.visit(e.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(e){return e.value},visit_position:function(e){return t.visit(e.value.x)+" "+t.visit(e.value.y)},"visit_%":function(e){return e.value+"%"},visit_em:function(e){return e.value+"em"},visit_px:function(e){return e.value+"px"},visit_literal:function(e){return t.visit_color(e.value,e)},visit_hex:function(e){return t.visit_color("#"+e.value,e)},visit_rgb:function(e){return t.visit_color("rgb("+e.value.join(", ")+")",e)},visit_rgba:function(e){return t.visit_color("rgba("+e.value.join(", ")+")",e)},visit_color:function(e,r){var n=e,i=t.visit(r.length);return i&&(n+=" "+i),n},visit_angular:function(e){return e.value+"deg"},visit_directional:function(e){return"to "+e.value},visit_array:function(e){var r="",n=e.length;return e.forEach(function(i,a){r+=t.visit(i),a<n-1&&(r+=", ")}),r},visit:function(e){if(!e)return"";var r="";if(e instanceof Array)return t.visit_array(e,r);if(e.type){var n=t["visit_"+e.type];if(n)return n(e);throw Error("Missing visitor visit_"+e.type)}else throw Error("Invalid node.")}};return function(e){return t.visit(e)}}();var Dn=Dn||{};Dn.parse=function(){var t={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function r(H){var Q=new Error(e+": "+H);throw Q.source=e,Q}function n(){var H=i();return e.length>0&&r("Invalid input not EOF"),H}function i(){return w(a)}function a(){return u("linear-gradient",t.linearGradient,f)||u("repeating-linear-gradient",t.repeatingLinearGradient,f)||u("radial-gradient",t.radialGradient,c)||u("repeating-radial-gradient",t.repeatingRadialGradient,c)}function u(H,Q,pe){return l(Q,function(W){var q=pe();return q&&(ae(t.comma)||r("Missing comma before color stops")),{type:H,orientation:q,colorStops:w(I)}})}function l(H,Q){var pe=ae(H);if(pe){ae(t.startCall)||r("Missing (");var W=Q(pe);return ae(t.endCall)||r("Missing )"),W}}function f(){return p()||g()}function p(){return G("directional",t.sideOrCorner,1)}function g(){return G("angular",t.angleValue,1)}function c(){var H,Q=d(),pe;return Q&&(H=[],H.push(Q),pe=e,ae(t.comma)&&(Q=d(),Q?H.push(Q):e=pe)),H}function d(){var H=m()||_();if(H)H.at=b();else{var Q=y();if(Q){H=Q;var pe=b();pe&&(H.at=pe)}else{var W=x();W&&(H={type:"default-radial",at:W})}}return H}function m(){var H=G("shape",/^(circle)/i,0);return H&&(H.style=j()||y()),H}function _(){var H=G("shape",/^(ellipse)/i,0);return H&&(H.style=Y()||y()),H}function y(){return G("extent-keyword",t.extentKeywords,1)}function b(){if(G("position",/^at/,0)){var H=x();return H||r("Missing positioning value"),H}}function x(){var H=E();if(H.x||H.y)return{type:"position",value:H}}function E(){return{x:Y(),y:Y()}}function w(H){var Q=H(),pe=[];if(Q)for(pe.push(Q);ae(t.comma);)Q=H(),Q?pe.push(Q):r("One extra comma");return pe}function I(){var H=O();return H||r("Expected color definition"),H.length=Y(),H}function O(){return N()||D()||L()||F()}function F(){return G("literal",t.literalColor,0)}function N(){return G("hex",t.hexColor,1)}function L(){return l(t.rgbColor,function(){return{type:"rgb",value:w(V)}})}function D(){return l(t.rgbaColor,function(){return{type:"rgba",value:w(V)}})}function V(){return ae(t.number)[1]}function Y(){return G("%",t.percentageValue,1)||ie()||j()}function ie(){return G("position-keyword",t.positionKeywords,1)}function j(){return G("px",t.pixelValue,1)||G("em",t.emValue,1)}function G(H,Q,pe){var W=ae(Q);if(W)return{type:H,value:W[pe]}}function ae(H){var Q,pe;return pe=/^[\n\r\t\s]+/.exec(e),pe&&se(pe[0].length),Q=H.exec(e),Q&&se(Q[0].length),Q}function se(H){e=e.substr(H)}return function(H){return e=H.toString(),n()}}();var jC=Dn.parse;Dn.stringify;var Ip={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Rp={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function XC(t){var e,r=[],n=1,i;if(typeof t=="string")if(Ip[t])r=Ip[t].slice(),i="rgb";else if(t==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var a=t.slice(1),u=a.length,l=u<=4;n=1,l?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],u===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],u===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var f=e[1],p=f==="rgb",a=f.replace(/a$/,"");i=a;var u=a==="cmyk"?4:a==="gray"?1:3;r=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(d,m){if(/%$/.test(d))return m===u?parseFloat(d)/100:a==="rgb"?parseFloat(d)*255/100:parseFloat(d);if(a[m]==="h"){if(/deg$/.test(d))return parseFloat(d);if(Rp[d]!==void 0)return Rp[d]}return parseFloat(d)}),f===a&&r.push(1),n=p||r[u]===void 0?1:r[u],r=r.slice(0,u)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(r=t.match(/([0-9]+)/g).map(function(g){return parseFloat(g)}),i=t.match(/([a-z])/ig).join("").toLowerCase());else isNaN(t)?Array.isArray(t)||t.length?(r=[t[0],t[1],t[2]],i="rgb",n=t.length===4?t[3]:1):t instanceof Object&&(t.r!=null||t.red!=null||t.R!=null?(i="rgb",r=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(i="hsl",r=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),n=t.a||t.alpha||t.opacity||1,t.opacity!=null&&(n/=100)):(i="rgb",r=[t>>>16,(t&65280)>>>8,t&255]);return{space:i,values:r,alpha:n}}var Rl={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},Pl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,a,u,l,f;if(r===0)return f=n*255,[f,f,f];n<.5?a=n*(1+r):a=n+r-n*r,i=2*n-a,l=[0,0,0];for(var p=0;p<3;p++)u=e+1/3*-(p-1),u<0?u++:u>1&&u--,6*u<1?f=i+(a-i)*6*u:2*u<1?f=a:3*u<2?f=i+(a-i)*(2/3-u)*6:f=i,l[p]=f*255;return l}};Rl.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),u=a-i,l,f,p;return a===i?l=0:e===a?l=(r-n)/u:r===a?l=2+(n-e)/u:n===a&&(l=4+(e-r)/u),l=Math.min(l*60,360),l<0&&(l+=360),p=(i+a)/2,a===i?f=0:p<=.5?f=u/(a+i):f=u/(2-a-i),[l,f*100,p*100]};function WC(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments));var e,r=XC(t);if(!r.space)return[];const n=r.space[0]==="h"?Pl.min:Rl.min,i=r.space[0]==="h"?Pl.max:Rl.max;return e=Array(3),e[0]=Math.min(Math.max(r.values[0],n[0]),i[0]),e[1]=Math.min(Math.max(r.values[1],n[1]),i[1]),e[2]=Math.min(Math.max(r.values[2],n[2]),i[2]),r.space[0]==="h"&&(e=Pl.rgb(e)),e.push(Math.min(Math.max(r.alpha,0),1)),e}function Pp(t){switch(typeof t){case"string":return qC(t);case"number":return ya(t);default:return t}}function qC(t){const e=WC(t);if(!e)throw new Error(`Unable to parse color "${t}" as RGBA.`);return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function YC(t){const e=jC(i2(t));if(e.length===0)throw new Error("Invalid CSS gradient.");if(e.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=e[0],n=KC(r.type),i=ZC(r.colorStops),a=r2(r.orientation);return{type:n,stops:i,angle:a}}function KC(t){const e={"linear-gradient":0,"radial-gradient":1};if(!(t in e))throw new Error(`Unsupported gradient type "${t}"`);return e[t]}function ZC(t){const e=e2(t),r=[];for(let n=0;n<t.length;n++){const i=QC(t[n]);r.push({offset:e[n],color:i.slice(0,3),alpha:i[3]})}return r}function QC(t){return Pp(JC(t))}function JC(t){switch(t.type){case"hex":return`#${t.value}`;case"literal":return t.value;default:return`${t.type}(${t.value.join(",")})`}}function e2(t){const e=[];for(let i=0;i<t.length;i++){const a=t[i];let u=-1;a.type==="literal"&&a.length&&"type"in a.length&&a.length.type==="%"&&"value"in a.length&&(u=parseFloat(a.length.value)/100),e.push(u)}const r=i=>{for(let a=i;a<e.length;a++)if(e[a]!==-1)return{indexDelta:a-i,offset:e[a]};return{indexDelta:e.length-1-i,offset:1}};let n=0;for(let i=0;i<e.length;i++){const a=e[i];if(a!==-1)n=a;else if(i===0)e[i]=0;else if(i+1===e.length)e[i]=1;else{const u=r(i),l=(u.offset-n)/(1+u.indexDelta);for(let f=0;f<=u.indexDelta;f++)e[i+f]=n+(f+1)*l;i+=u.indexDelta,n=e[i]}}return e.map(t2)}function t2(t){return t.toString().length>6?parseFloat(t.toString().substring(0,6)):t}function r2(t){if(typeof t>"u")return 0;if("type"in t&&"value"in t)switch(t.type){case"angular":return parseFloat(t.value);case"directional":return n2(t.value)}return 0}function n2(t){const e={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(t in e))throw new Error(`Unsupported directional value "${t}"`);return e[t]}function i2(t){let e=t.replace(/\s{2,}/gu," ");return e=e.replace(/;/g,""),e=e.replace(/ ,/g,","),e=e.replace(/\( /g,"("),e=e.replace(/ \)/g,")"),e.trim()}var s2=Object.defineProperty,a2=Object.defineProperties,o2=Object.getOwnPropertyDescriptors,Mp=Object.getOwnPropertySymbols,u2=Object.prototype.hasOwnProperty,l2=Object.prototype.propertyIsEnumerable,Op=(t,e,r)=>e in t?s2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ml=(t,e)=>{for(var r in e||(e={}))u2.call(e,r)&&Op(t,r,e[r]);if(Mp)for(var r of Mp(e))l2.call(e,r)&&Op(t,r,e[r]);return t},c2=(t,e)=>a2(t,o2(e));const Fp=90;function h2(t){return[...t].sort((e,r)=>e.offset-r.offset)}const Ol=class extends je{constructor(e){e&&"css"in e&&(e=c2(Ml({},YC(e.css||"")),{alpha:e.alpha,maxColors:e.maxColors}));const r=Ml(Ml({},Ol.defaults),e);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(VC,zC),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(e){const r=h2(e),n=new Float32Array(r.length*3),i=0,a=1,u=2;for(let l=0;l<r.length;l++){const f=Pp(r[l].color),p=l*3;n[p+i]=f[i],n[p+a]=f[a],n[p+u]=f[u]}this.uniforms.uColors=n,this.uniforms.uOffsets=r.map(l=>l.offset),this.uniforms.uAlphas=r.map(l=>l.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(e){this.uniforms.uType=e}get type(){return this.uniforms.uType}set angle(e){this.uniforms.uAngle=e-Fp}get angle(){return this.uniforms.uAngle+Fp}set alpha(e){this.uniforms.uAlpha=e}get alpha(){return this.uniforms.uAlpha}set maxColors(e){this.uniforms.uMaxColors=e}get maxColors(){return this.uniforms.uMaxColors}};let za=Ol;za.LINEAR=0,za.RADIAL=1,za.CONIC=2,za.defaults={type:Ol.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var f2=`attribute vec2 aVertexPosition;
837
+ `,kn=kn||{};kn.stringify=function(){var t={"visit_linear-gradient":function(e){return t.visit_gradient(e)},"visit_repeating-linear-gradient":function(e){return t.visit_gradient(e)},"visit_radial-gradient":function(e){return t.visit_gradient(e)},"visit_repeating-radial-gradient":function(e){return t.visit_gradient(e)},visit_gradient:function(e){var r=t.visit(e.orientation);return r&&(r+=", "),e.type+"("+r+t.visit(e.colorStops)+")"},visit_shape:function(e){var r=e.value,n=t.visit(e.at),i=t.visit(e.style);return i&&(r+=" "+i),n&&(r+=" at "+n),r},"visit_default-radial":function(e){var r="",n=t.visit(e.at);return n&&(r+=n),r},"visit_extent-keyword":function(e){var r=e.value,n=t.visit(e.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(e){return e.value},visit_position:function(e){return t.visit(e.value.x)+" "+t.visit(e.value.y)},"visit_%":function(e){return e.value+"%"},visit_em:function(e){return e.value+"em"},visit_px:function(e){return e.value+"px"},visit_literal:function(e){return t.visit_color(e.value,e)},visit_hex:function(e){return t.visit_color("#"+e.value,e)},visit_rgb:function(e){return t.visit_color("rgb("+e.value.join(", ")+")",e)},visit_rgba:function(e){return t.visit_color("rgba("+e.value.join(", ")+")",e)},visit_color:function(e,r){var n=e,i=t.visit(r.length);return i&&(n+=" "+i),n},visit_angular:function(e){return e.value+"deg"},visit_directional:function(e){return"to "+e.value},visit_array:function(e){var r="",n=e.length;return e.forEach(function(i,a){r+=t.visit(i),a<n-1&&(r+=", ")}),r},visit:function(e){if(!e)return"";var r="";if(e instanceof Array)return t.visit_array(e,r);if(e.type){var n=t["visit_"+e.type];if(n)return n(e);throw Error("Missing visitor visit_"+e.type)}else throw Error("Invalid node.")}};return function(e){return t.visit(e)}}();var kn=kn||{};kn.parse=function(){var t={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function r(H){var J=new Error(e+": "+H);throw J.source=e,J}function n(){var H=i();return e.length>0&&r("Invalid input not EOF"),H}function i(){return w(a)}function a(){return u("linear-gradient",t.linearGradient,h)||u("repeating-linear-gradient",t.repeatingLinearGradient,h)||u("radial-gradient",t.radialGradient,c)||u("repeating-radial-gradient",t.repeatingRadialGradient,c)}function u(H,J,ge){return l(J,function(X){var q=ge();return q&&(se(t.comma)||r("Missing comma before color stops")),{type:H,orientation:q,colorStops:w(I)}})}function l(H,J){var ge=se(H);if(ge){se(t.startCall)||r("Missing (");var X=J(ge);return se(t.endCall)||r("Missing )"),X}}function h(){return p()||g()}function p(){return G("directional",t.sideOrCorner,1)}function g(){return G("angular",t.angleValue,1)}function c(){var H,J=d(),ge;return J&&(H=[],H.push(J),ge=e,se(t.comma)&&(J=d(),J?H.push(J):e=ge)),H}function d(){var H=m()||_();if(H)H.at=b();else{var J=y();if(J){H=J;var ge=b();ge&&(H.at=ge)}else{var X=x();X&&(H={type:"default-radial",at:X})}}return H}function m(){var H=G("shape",/^(circle)/i,0);return H&&(H.style=j()||y()),H}function _(){var H=G("shape",/^(ellipse)/i,0);return H&&(H.style=Y()||y()),H}function y(){return G("extent-keyword",t.extentKeywords,1)}function b(){if(G("position",/^at/,0)){var H=x();return H||r("Missing positioning value"),H}}function x(){var H=E();if(H.x||H.y)return{type:"position",value:H}}function E(){return{x:Y(),y:Y()}}function w(H){var J=H(),ge=[];if(J)for(ge.push(J);se(t.comma);)J=H(),J?ge.push(J):r("One extra comma");return ge}function I(){var H=O();return H||r("Expected color definition"),H.length=Y(),H}function O(){return N()||B()||L()||F()}function F(){return G("literal",t.literalColor,0)}function N(){return G("hex",t.hexColor,1)}function L(){return l(t.rgbColor,function(){return{type:"rgb",value:w(V)}})}function B(){return l(t.rgbaColor,function(){return{type:"rgba",value:w(V)}})}function V(){return se(t.number)[1]}function Y(){return G("%",t.percentageValue,1)||ae()||j()}function ae(){return G("position-keyword",t.positionKeywords,1)}function j(){return G("px",t.pixelValue,1)||G("em",t.emValue,1)}function G(H,J,ge){var X=se(J);if(X)return{type:H,value:X[ge]}}function se(H){var J,ge;return ge=/^[\n\r\t\s]+/.exec(e),ge&&ie(ge[0].length),J=H.exec(e),J&&ie(J[0].length),J}function ie(H){e=e.substr(H)}return function(H){return e=H.toString(),n()}}();var Vw=kn.parse;kn.stringify;var np={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ip={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function jw(t){var e,r=[],n=1,i;if(typeof t=="string")if(np[t])r=np[t].slice(),i="rgb";else if(t==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var a=t.slice(1),u=a.length,l=u<=4;n=1,l?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],u===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],u===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var h=e[1],p=h==="rgb",a=h.replace(/a$/,"");i=a;var u=a==="cmyk"?4:a==="gray"?1:3;r=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(d,m){if(/%$/.test(d))return m===u?parseFloat(d)/100:a==="rgb"?parseFloat(d)*255/100:parseFloat(d);if(a[m]==="h"){if(/deg$/.test(d))return parseFloat(d);if(ip[d]!==void 0)return ip[d]}return parseFloat(d)}),h===a&&r.push(1),n=p||r[u]===void 0?1:r[u],r=r.slice(0,u)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(r=t.match(/([0-9]+)/g).map(function(g){return parseFloat(g)}),i=t.match(/([a-z])/ig).join("").toLowerCase());else isNaN(t)?Array.isArray(t)||t.length?(r=[t[0],t[1],t[2]],i="rgb",n=t.length===4?t[3]:1):t instanceof Object&&(t.r!=null||t.red!=null||t.R!=null?(i="rgb",r=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(i="hsl",r=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),n=t.a||t.alpha||t.opacity||1,t.opacity!=null&&(n/=100)):(i="rgb",r=[t>>>16,(t&65280)>>>8,t&255]);return{space:i,values:r,alpha:n}}var wl={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},Sl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,a,u,l,h;if(r===0)return h=n*255,[h,h,h];n<.5?a=n*(1+r):a=n+r-n*r,i=2*n-a,l=[0,0,0];for(var p=0;p<3;p++)u=e+1/3*-(p-1),u<0?u++:u>1&&u--,6*u<1?h=i+(a-i)*6*u:2*u<1?h=a:3*u<2?h=i+(a-i)*(2/3-u)*6:h=i,l[p]=h*255;return l}};wl.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),u=a-i,l,h,p;return a===i?l=0:e===a?l=(r-n)/u:r===a?l=2+(n-e)/u:n===a&&(l=4+(e-r)/u),l=Math.min(l*60,360),l<0&&(l+=360),p=(i+a)/2,a===i?h=0:p<=.5?h=u/(a+i):h=u/(2-a-i),[l,h*100,p*100]};function Xw(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments));var e,r=jw(t);if(!r.space)return[];const n=r.space[0]==="h"?Sl.min:wl.min,i=r.space[0]==="h"?Sl.max:wl.max;return e=Array(3),e[0]=Math.min(Math.max(r.values[0],n[0]),i[0]),e[1]=Math.min(Math.max(r.values[1],n[1]),i[1]),e[2]=Math.min(Math.max(r.values[2],n[2]),i[2]),r.space[0]==="h"&&(e=Sl.rgb(e)),e.push(Math.min(Math.max(r.alpha,0),1)),e}function sp(t){switch(typeof t){case"string":return Ww(t);case"number":return ca(t);default:return t}}function Ww(t){const e=Xw(t);if(!e)throw new Error(`Unable to parse color "${t}" as RGBA.`);return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function qw(t){const e=Vw(nS(t));if(e.length===0)throw new Error("Invalid CSS gradient.");if(e.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=e[0],n=Yw(r.type),i=Kw(r.colorStops),a=tS(r.orientation);return{type:n,stops:i,angle:a}}function Yw(t){const e={"linear-gradient":0,"radial-gradient":1};if(!(t in e))throw new Error(`Unsupported gradient type "${t}"`);return e[t]}function Kw(t){const e=Jw(t),r=[];for(let n=0;n<t.length;n++){const i=Zw(t[n]);r.push({offset:e[n],color:i.slice(0,3),alpha:i[3]})}return r}function Zw(t){return sp(Qw(t))}function Qw(t){switch(t.type){case"hex":return`#${t.value}`;case"literal":return t.value;default:return`${t.type}(${t.value.join(",")})`}}function Jw(t){const e=[];for(let i=0;i<t.length;i++){const a=t[i];let u=-1;a.type==="literal"&&a.length&&"type"in a.length&&a.length.type==="%"&&"value"in a.length&&(u=parseFloat(a.length.value)/100),e.push(u)}const r=i=>{for(let a=i;a<e.length;a++)if(e[a]!==-1)return{indexDelta:a-i,offset:e[a]};return{indexDelta:e.length-1-i,offset:1}};let n=0;for(let i=0;i<e.length;i++){const a=e[i];if(a!==-1)n=a;else if(i===0)e[i]=0;else if(i+1===e.length)e[i]=1;else{const u=r(i),l=(u.offset-n)/(1+u.indexDelta);for(let h=0;h<=u.indexDelta;h++)e[i+h]=n+(h+1)*l;i+=u.indexDelta,n=e[i]}}return e.map(eS)}function eS(t){return t.toString().length>6?parseFloat(t.toString().substring(0,6)):t}function tS(t){if(typeof t>"u")return 0;if("type"in t&&"value"in t)switch(t.type){case"angular":return parseFloat(t.value);case"directional":return rS(t.value)}return 0}function rS(t){const e={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(t in e))throw new Error(`Unsupported directional value "${t}"`);return e[t]}function nS(t){let e=t.replace(/\s{2,}/gu," ");return e=e.replace(/;/g,""),e=e.replace(/ ,/g,","),e=e.replace(/\( /g,"("),e=e.replace(/ \)/g,")"),e.trim()}var iS=Object.defineProperty,sS=Object.defineProperties,aS=Object.getOwnPropertyDescriptors,ap=Object.getOwnPropertySymbols,oS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,op=(t,e,r)=>e in t?iS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Al=(t,e)=>{for(var r in e||(e={}))oS.call(e,r)&&op(t,r,e[r]);if(ap)for(var r of ap(e))uS.call(e,r)&&op(t,r,e[r]);return t},lS=(t,e)=>sS(t,aS(e));const up=90;function cS(t){return[...t].sort((e,r)=>e.offset-r.offset)}const El=class extends Ve{constructor(e){e&&"css"in e&&(e=lS(Al({},qw(e.css||"")),{alpha:e.alpha,maxColors:e.maxColors}));const r=Al(Al({},El.defaults),e);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(zw,Hw),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(e){const r=cS(e),n=new Float32Array(r.length*3),i=0,a=1,u=2;for(let l=0;l<r.length;l++){const h=sp(r[l].color),p=l*3;n[p+i]=h[i],n[p+a]=h[a],n[p+u]=h[u]}this.uniforms.uColors=n,this.uniforms.uOffsets=r.map(l=>l.offset),this.uniforms.uAlphas=r.map(l=>l.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(e){this.uniforms.uType=e}get type(){return this.uniforms.uType}set angle(e){this.uniforms.uAngle=e-up}get angle(){return this.uniforms.uAngle+up}set alpha(e){this.uniforms.uAlpha=e}get alpha(){return this.uniforms.uAlpha}set maxColors(e){this.uniforms.uMaxColors=e}get maxColors(){return this.uniforms.uMaxColors}};let Na=El;Na.LINEAR=0,Na.RADIAL=1,Na.CONIC=2,Na.defaults={type:El.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var hS=`attribute vec2 aVertexPosition;
854
838
  attribute vec2 aTextureCoord;
855
839
 
856
840
  uniform mat3 projectionMatrix;
@@ -861,7 +845,7 @@ void main(void)
861
845
  {
862
846
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
863
847
  vTextureCoord = aTextureCoord;
864
- }`,d2=`precision mediump float;
848
+ }`,fS=`precision mediump float;
865
849
 
866
850
  varying mediump vec2 vTextureCoord;
867
851
 
@@ -890,7 +874,7 @@ void main(void)
890
874
 
891
875
  gl_FragColor.a = c22.a;
892
876
  }
893
- `;let p2=class extends je{constructor(e,r=200,n=200){super(f2,d2),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),e!==void 0&&(this.matrix=e),this.width=r,this.height=n}get matrix(){return this.uniforms.matrix}set matrix(e){e.forEach((r,n)=>{this.uniforms.matrix[n]=r})}get width(){return 1/this.uniforms.texelSize[0]}set width(e){this.uniforms.texelSize[0]=1/e}get height(){return 1/this.uniforms.texelSize[1]}set height(e){this.uniforms.texelSize[1]=1/e}};var g2=`attribute vec2 aVertexPosition;
877
+ `;let dS=class extends Ve{constructor(e,r=200,n=200){super(hS,fS),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),e!==void 0&&(this.matrix=e),this.width=r,this.height=n}get matrix(){return this.uniforms.matrix}set matrix(e){e.forEach((r,n)=>{this.uniforms.matrix[n]=r})}get width(){return 1/this.uniforms.texelSize[0]}set width(e){this.uniforms.texelSize[0]=1/e}get height(){return 1/this.uniforms.texelSize[1]}set height(e){this.uniforms.texelSize[1]=1/e}};var pS=`attribute vec2 aVertexPosition;
894
878
  attribute vec2 aTextureCoord;
895
879
 
896
880
  uniform mat3 projectionMatrix;
@@ -901,7 +885,7 @@ void main(void)
901
885
  {
902
886
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
903
887
  vTextureCoord = aTextureCoord;
904
- }`,m2=`varying vec2 vTextureCoord;
888
+ }`,gS=`varying vec2 vTextureCoord;
905
889
  uniform sampler2D uSampler;
906
890
 
907
891
  uniform vec4 filterArea;
@@ -967,7 +951,7 @@ void main(void)
967
951
 
968
952
  gl_FragColor.rgb = rgb;
969
953
  }
970
- `;const Np=class extends je{constructor(e){super(g2,m2),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Np.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}set curvature(e){this.uniforms.curvature=e}get curvature(){return this.uniforms.curvature}set lineWidth(e){this.uniforms.lineWidth=e}get lineWidth(){return this.uniforms.lineWidth}set lineContrast(e){this.uniforms.lineContrast=e}get lineContrast(){return this.uniforms.lineContrast}set verticalLine(e){this.uniforms.verticalLine=e}get verticalLine(){return this.uniforms.verticalLine}set noise(e){this.uniforms.noise=e}get noise(){return this.uniforms.noise}set noiseSize(e){this.uniforms.noiseSize=e}get noiseSize(){return this.uniforms.noiseSize}set vignetting(e){this.uniforms.vignetting=e}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(e){this.uniforms.vignettingAlpha=e}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(e){this.uniforms.vignettingBlur=e}get vignettingBlur(){return this.uniforms.vignettingBlur}};let v2=Np;v2.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var _2=`attribute vec2 aVertexPosition;
954
+ `;const lp=class extends Ve{constructor(e){super(pS,gS),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,lp.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}set curvature(e){this.uniforms.curvature=e}get curvature(){return this.uniforms.curvature}set lineWidth(e){this.uniforms.lineWidth=e}get lineWidth(){return this.uniforms.lineWidth}set lineContrast(e){this.uniforms.lineContrast=e}get lineContrast(){return this.uniforms.lineContrast}set verticalLine(e){this.uniforms.verticalLine=e}get verticalLine(){return this.uniforms.verticalLine}set noise(e){this.uniforms.noise=e}get noise(){return this.uniforms.noise}set noiseSize(e){this.uniforms.noiseSize=e}get noiseSize(){return this.uniforms.noiseSize}set vignetting(e){this.uniforms.vignetting=e}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(e){this.uniforms.vignettingAlpha=e}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(e){this.uniforms.vignettingBlur=e}get vignettingBlur(){return this.uniforms.vignettingBlur}};let mS=lp;mS.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var vS=`attribute vec2 aVertexPosition;
971
955
  attribute vec2 aTextureCoord;
972
956
 
973
957
  uniform mat3 projectionMatrix;
@@ -978,7 +962,7 @@ void main(void)
978
962
  {
979
963
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
980
964
  vTextureCoord = aTextureCoord;
981
- }`,y2=`varying vec2 vTextureCoord;
965
+ }`,_S=`varying vec2 vTextureCoord;
982
966
  uniform sampler2D uSampler;
983
967
  uniform float alpha;
984
968
  uniform vec3 color;
@@ -996,7 +980,7 @@ void main(void){
996
980
  sample *= alpha;
997
981
 
998
982
  gl_FragColor = sample;
999
- }`,x2=Object.defineProperty,Lp=Object.getOwnPropertySymbols,b2=Object.prototype.hasOwnProperty,T2=Object.prototype.propertyIsEnumerable,kp=(t,e,r)=>e in t?x2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Dp=(t,e)=>{for(var r in e||(e={}))b2.call(e,r)&&kp(t,r,e[r]);if(Lp)for(var r of Lp(e))T2.call(e,r)&&kp(t,r,e[r]);return t};const Fl=class extends je{constructor(e){super(),this.angle=45,this._distance=5,this._resolution=Re.FILTER_RESOLUTION;const r=e?Dp(Dp({},Fl.defaults),e):Fl.defaults,{kernels:n,blur:i,quality:a,pixelSize:u,resolution:l}=r;this._offset=new Ln(this._updatePadding,this),this._tintFilter=new je(_2,y2),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=l,this._blurFilter=n?new bs(n):new bs(i,a),this.pixelSize=u,this.resolution=l;const{shadowOnly:f,rotation:p,distance:g,offset:c,alpha:d,color:m}=r;this.shadowOnly=f,p!==void 0&&g!==void 0?(this.rotation=p,this.distance=g):this.offset=c,this.alpha=d,this.color=m}apply(e,r,n,i){const a=e.getFilterTexture();this._tintFilter.apply(e,r,a,1),this._blurFilter.apply(e,a,n,i),this.shadowOnly!==!0&&e.applyFilter(this,r,n,0),e.returnFilterTexture(a)}_updatePadding(){const e=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=e+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(e){this._offset.copyFrom(e),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)}get distance(){return this._distance}set distance(e){ke("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=e,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/ps}set rotation(e){ke("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=e*ps,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(e){this._tintFilter.uniforms.alpha=e}get color(){return rl(this._tintFilter.uniforms.color)}set color(e){ya(e,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.blur}set blur(e){this._blurFilter.blur=e,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){this._blurFilter.pixelSize=e}};let w2=Fl;w2.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Re.FILTER_RESOLUTION};var S2=`attribute vec2 aVertexPosition;
983
+ }`,yS=Object.defineProperty,cp=Object.getOwnPropertySymbols,xS=Object.prototype.hasOwnProperty,bS=Object.prototype.propertyIsEnumerable,hp=(t,e,r)=>e in t?yS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,fp=(t,e)=>{for(var r in e||(e={}))xS.call(e,r)&&hp(t,r,e[r]);if(cp)for(var r of cp(e))bS.call(e,r)&&hp(t,r,e[r]);return t};const Cl=class extends Ve{constructor(e){super(),this.angle=45,this._distance=5,this._resolution=Ee.FILTER_RESOLUTION;const r=e?fp(fp({},Cl.defaults),e):Cl.defaults,{kernels:n,blur:i,quality:a,pixelSize:u,resolution:l}=r;this._offset=new Nn(this._updatePadding,this),this._tintFilter=new Ve(vS,_S),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=l,this._blurFilter=n?new _s(n):new _s(i,a),this.pixelSize=u,this.resolution=l;const{shadowOnly:h,rotation:p,distance:g,offset:c,alpha:d,color:m}=r;this.shadowOnly=h,p!==void 0&&g!==void 0?(this.rotation=p,this.distance=g):this.offset=c,this.alpha=d,this.color=m}apply(e,r,n,i){const a=e.getFilterTexture();this._tintFilter.apply(e,r,a,1),this._blurFilter.apply(e,a,n,i),this.shadowOnly!==!0&&e.applyFilter(this,r,n,0),e.returnFilterTexture(a)}_updatePadding(){const e=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=e+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(e){this._offset.copyFrom(e),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)}get distance(){return this._distance}set distance(e){Le("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=e,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/hs}set rotation(e){Le("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=e*hs,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(e){this._tintFilter.uniforms.alpha=e}get color(){return Ku(this._tintFilter.uniforms.color)}set color(e){ca(e,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.blur}set blur(e){this._blurFilter.blur=e,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){this._blurFilter.pixelSize=e}};let TS=Cl;TS.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Ee.FILTER_RESOLUTION};var wS=`attribute vec2 aVertexPosition;
1000
984
  attribute vec2 aTextureCoord;
1001
985
 
1002
986
  uniform mat3 projectionMatrix;
@@ -1007,7 +991,7 @@ void main(void)
1007
991
  {
1008
992
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1009
993
  vTextureCoord = aTextureCoord;
1010
- }`,A2=`// precision highp float;
994
+ }`,SS=`// precision highp float;
1011
995
 
1012
996
  varying vec2 vTextureCoord;
1013
997
  uniform sampler2D uSampler;
@@ -1103,7 +1087,7 @@ void main(void)
1103
1087
  gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;
1104
1088
  gl_FragColor.a = texture2D(uSampler, coord).a;
1105
1089
  }
1106
- `;const Nl=class extends je{constructor(e){super(S2,A2),this.offset=100,this.fillMode=Nl.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=Ue.from(this._canvas,{scaleMode:Pr.NEAREST}),Object.assign(this,Nl.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,r,n,i)}_randomizeSizes(){const e=this._sizes,r=this._slices-1,n=this.sampleSize,i=Math.min(this.minSize/n,.9/this._slices);if(this.average){const a=this._slices;let u=1;for(let l=0;l<r;l++){const f=u/(a-l),p=Math.max(f*(1-Math.random()*.6),i);e[l]=p,u-=p}e[r]=u}else{let a=1;const u=Math.sqrt(1/this._slices);for(let l=0;l<r;l++){const f=Math.max(u*a*Math.random(),i);e[l]=f,a-=f}e[r]=a}this.shuffle()}shuffle(){const e=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const i=Math.random()*n>>0,a=e[n];e[n]=e[i],e[i]=a}}_randomizeOffsets(){for(let e=0;e<this._slices;e++)this._offsets[e]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const e=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,e);let i,a=0;for(let u=0;u<this._slices;u++){i=Math.floor(this._offsets[u]*256);const l=this._sizes[u]*e,f=i>0?i:0,p=i<0?-i:0;n.fillStyle=`rgba(${f}, ${p}, 0, 1)`,n.fillRect(0,a>>0,e,l+1>>0),a+=l}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(e){const r=Math.min(this._slices,e.length);for(let n=0;n<r;n++)this._sizes[n]=e[n]}get sizes(){return this._sizes}set offsets(e){const r=Math.min(this._slices,e.length);for(let n=0;n<r;n++)this._offsets[n]=e[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(e){this._slices!==e&&(this._slices=e,this.uniforms.slices=e,this._sizes=this.uniforms.slicesWidth=new Float32Array(e),this._offsets=this.uniforms.slicesOffset=new Float32Array(e),this.refresh())}get direction(){return this._direction}set direction(e){if(this._direction===e)return;this._direction=e;const r=e*ps;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(e){this.uniforms.red=e}get green(){return this.uniforms.green}set green(e){this.uniforms.green=e}get blue(){return this.uniforms.blue}set blue(e){this.uniforms.blue=e}destroy(){var e;(e=this.texture)==null||e.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let Ai=Nl;Ai.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},Ai.TRANSPARENT=0,Ai.ORIGINAL=1,Ai.LOOP=2,Ai.CLAMP=3,Ai.MIRROR=4;var E2=`attribute vec2 aVertexPosition;
1090
+ `;const Il=class extends Ve{constructor(e){super(wS,SS),this.offset=100,this.fillMode=Il.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=Be.from(this._canvas,{scaleMode:Pr.NEAREST}),Object.assign(this,Il.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,r,n,i)}_randomizeSizes(){const e=this._sizes,r=this._slices-1,n=this.sampleSize,i=Math.min(this.minSize/n,.9/this._slices);if(this.average){const a=this._slices;let u=1;for(let l=0;l<r;l++){const h=u/(a-l),p=Math.max(h*(1-Math.random()*.6),i);e[l]=p,u-=p}e[r]=u}else{let a=1;const u=Math.sqrt(1/this._slices);for(let l=0;l<r;l++){const h=Math.max(u*a*Math.random(),i);e[l]=h,a-=h}e[r]=a}this.shuffle()}shuffle(){const e=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const i=Math.random()*n>>0,a=e[n];e[n]=e[i],e[i]=a}}_randomizeOffsets(){for(let e=0;e<this._slices;e++)this._offsets[e]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const e=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,e);let i,a=0;for(let u=0;u<this._slices;u++){i=Math.floor(this._offsets[u]*256);const l=this._sizes[u]*e,h=i>0?i:0,p=i<0?-i:0;n.fillStyle=`rgba(${h}, ${p}, 0, 1)`,n.fillRect(0,a>>0,e,l+1>>0),a+=l}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(e){const r=Math.min(this._slices,e.length);for(let n=0;n<r;n++)this._sizes[n]=e[n]}get sizes(){return this._sizes}set offsets(e){const r=Math.min(this._slices,e.length);for(let n=0;n<r;n++)this._offsets[n]=e[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(e){this._slices!==e&&(this._slices=e,this.uniforms.slices=e,this._sizes=this.uniforms.slicesWidth=new Float32Array(e),this._offsets=this.uniforms.slicesOffset=new Float32Array(e),this.refresh())}get direction(){return this._direction}set direction(e){if(this._direction===e)return;this._direction=e;const r=e*hs;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(e){this.uniforms.red=e}get green(){return this.uniforms.green}set green(e){this.uniforms.green=e}get blue(){return this.uniforms.blue}set blue(e){this.uniforms.blue=e}destroy(){var e;(e=this.texture)==null||e.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let bi=Il;bi.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},bi.TRANSPARENT=0,bi.ORIGINAL=1,bi.LOOP=2,bi.CLAMP=3,bi.MIRROR=4;var AS=`attribute vec2 aVertexPosition;
1107
1091
  attribute vec2 aTextureCoord;
1108
1092
 
1109
1093
  uniform mat3 projectionMatrix;
@@ -1114,7 +1098,7 @@ void main(void)
1114
1098
  {
1115
1099
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1116
1100
  vTextureCoord = aTextureCoord;
1117
- }`,C2=`varying vec2 vTextureCoord;
1101
+ }`,ES=`varying vec2 vTextureCoord;
1118
1102
  varying vec4 vColor;
1119
1103
 
1120
1104
  uniform sampler2D uSampler;
@@ -1180,7 +1164,7 @@ void main(void) {
1180
1164
  gl_FragColor = innerColor + outerGlowColor;
1181
1165
  }
1182
1166
  }
1183
- `;const Bp=class extends je{constructor(t){const e=Object.assign({},Bp.defaults,t),{outerStrength:r,innerStrength:n,color:i,knockout:a,quality:u,alpha:l}=e,f=Math.round(e.distance);super(E2,C2.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/u/f).toFixed(7)}`).replace(/__DIST__/gi,`${f.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:i,outerStrength:r,innerStrength:n,padding:f,knockout:a,alpha:l})}get color(){return rl(this.uniforms.glowColor)}set color(t){ya(t,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(t){this.uniforms.outerStrength=t}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(t){this.uniforms.innerStrength=t}get knockout(){return this.uniforms.knockout}set knockout(t){this.uniforms.knockout=t}get alpha(){return this.uniforms.alpha}set alpha(t){this.uniforms.alpha=t}};let I2=Bp;I2.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var R2=`attribute vec2 aVertexPosition;
1167
+ `;const dp=class extends Ve{constructor(t){const e=Object.assign({},dp.defaults,t),{outerStrength:r,innerStrength:n,color:i,knockout:a,quality:u,alpha:l}=e,h=Math.round(e.distance);super(AS,ES.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/u/h).toFixed(7)}`).replace(/__DIST__/gi,`${h.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:i,outerStrength:r,innerStrength:n,padding:h,knockout:a,alpha:l})}get color(){return Ku(this.uniforms.glowColor)}set color(t){ca(t,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(t){this.uniforms.outerStrength=t}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(t){this.uniforms.innerStrength=t}get knockout(){return this.uniforms.knockout}set knockout(t){this.uniforms.knockout=t}get alpha(){return this.uniforms.alpha}set alpha(t){this.uniforms.alpha=t}};let CS=dp;CS.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var IS=`attribute vec2 aVertexPosition;
1184
1168
  attribute vec2 aTextureCoord;
1185
1169
 
1186
1170
  uniform mat3 projectionMatrix;
@@ -1191,7 +1175,7 @@ void main(void)
1191
1175
  {
1192
1176
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1193
1177
  vTextureCoord = aTextureCoord;
1194
- }`,P2=`vec3 mod289(vec3 x)
1178
+ }`,RS=`vec3 mod289(vec3 x)
1195
1179
  {
1196
1180
  return x - floor(x * (1.0 / 289.0)) * 289.0;
1197
1181
  }
@@ -1286,7 +1270,7 @@ float turb(vec3 P, vec3 rep, float lacunarity, float gain)
1286
1270
  }
1287
1271
  return abs(sum);
1288
1272
  }
1289
- `,M2=`varying vec2 vTextureCoord;
1273
+ `,PS=`varying vec2 vTextureCoord;
1290
1274
  uniform sampler2D uSampler;
1291
1275
  uniform vec4 filterArea;
1292
1276
  uniform vec2 dimensions;
@@ -1331,7 +1315,7 @@ void main(void) {
1331
1315
  gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;
1332
1316
 
1333
1317
  }
1334
- `;const Up=class extends je{constructor(e){super(R2,M2.replace("${perlin}",P2)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(Up.defaults,e);this._angleLight=new et,this.angle=r.angle,this.gain=r.gain,this.lacunarity=r.lacunarity,this.alpha=r.alpha,this.parallel=r.parallel,this.center=r.center,this.time=r.time}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,n,i)}get angle(){return this._angle}set angle(e){this._angle=e;const r=e*ps;this._angleLight.x=Math.cos(r),this._angleLight.y=Math.sin(r)}get gain(){return this.uniforms.gain}set gain(e){this.uniforms.gain=e}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(e){this.uniforms.lacunarity=e}get alpha(){return this.uniforms.alpha}set alpha(e){this.uniforms.alpha=e}};let O2=Up;O2.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var F2=`attribute vec2 aVertexPosition;
1318
+ `;const pp=class extends Ve{constructor(e){super(IS,PS.replace("${perlin}",RS)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(pp.defaults,e);this._angleLight=new Je,this.angle=r.angle,this.gain=r.gain,this.lacunarity=r.lacunarity,this.alpha=r.alpha,this.parallel=r.parallel,this.center=r.center,this.time=r.time}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,n,i)}get angle(){return this._angle}set angle(e){this._angle=e;const r=e*hs;this._angleLight.x=Math.cos(r),this._angleLight.y=Math.sin(r)}get gain(){return this.uniforms.gain}set gain(e){this.uniforms.gain=e}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(e){this.uniforms.lacunarity=e}get alpha(){return this.uniforms.alpha}set alpha(e){this.uniforms.alpha=e}};let MS=pp;MS.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var OS=`attribute vec2 aVertexPosition;
1335
1319
  attribute vec2 aTextureCoord;
1336
1320
 
1337
1321
  uniform mat3 projectionMatrix;
@@ -1342,7 +1326,7 @@ void main(void)
1342
1326
  {
1343
1327
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1344
1328
  vTextureCoord = aTextureCoord;
1345
- }`,N2=`precision mediump float;
1329
+ }`,FS=`precision mediump float;
1346
1330
 
1347
1331
  varying vec2 vTextureCoord;
1348
1332
  uniform sampler2D uSampler;
@@ -1400,7 +1384,7 @@ void main()
1400
1384
  // alpha
1401
1385
  gl_FragColor = mix(color, result, uAlpha);
1402
1386
  }
1403
- `;const $p=class extends je{constructor(t){super(F2,N2),this._hue=0;const e=Object.assign({},$p.defaults,t);Object.assign(this,e)}get hue(){return this._hue}set hue(t){this._hue=t,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}get colorize(){return this.uniforms.uColorize}set colorize(t){this.uniforms.uColorize=t}get lightness(){return this.uniforms.uLightness}set lightness(t){this.uniforms.uLightness=t}get saturation(){return this.uniforms.uSaturation}set saturation(t){this.uniforms.uSaturation=t}};let L2=$p;L2.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var k2=`attribute vec2 aVertexPosition;
1387
+ `;const gp=class extends Ve{constructor(t){super(OS,FS),this._hue=0;const e=Object.assign({},gp.defaults,t);Object.assign(this,e)}get hue(){return this._hue}set hue(t){this._hue=t,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}get colorize(){return this.uniforms.uColorize}set colorize(t){this.uniforms.uColorize=t}get lightness(){return this.uniforms.uLightness}set lightness(t){this.uniforms.uLightness=t}get saturation(){return this.uniforms.uSaturation}set saturation(t){this.uniforms.uSaturation=t}};let NS=gp;NS.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var LS=`attribute vec2 aVertexPosition;
1404
1388
  attribute vec2 aTextureCoord;
1405
1389
 
1406
1390
  uniform mat3 projectionMatrix;
@@ -1411,7 +1395,7 @@ void main(void)
1411
1395
  {
1412
1396
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1413
1397
  vTextureCoord = aTextureCoord;
1414
- }`,D2=`varying vec2 vTextureCoord;
1398
+ }`,kS=`varying vec2 vTextureCoord;
1415
1399
  uniform sampler2D uSampler;
1416
1400
  uniform vec4 filterArea;
1417
1401
  uniform vec2 dimensions;
@@ -1515,7 +1499,7 @@ void main()
1515
1499
 
1516
1500
  gl_FragColor.rgb = color;
1517
1501
  }
1518
- `;const Gp=class extends je{constructor(e,r=0){super(k2,D2),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof e=="number"?(this.seed=e,e=void 0):this.seed=r,Object.assign(this,Gp.defaults,e)}apply(e,r,n,i){var a,u;this.uniforms.dimensions[0]=(a=r.filterFrame)==null?void 0:a.width,this.uniforms.dimensions[1]=(u=r.filterFrame)==null?void 0:u.height,this.uniforms.seed=this.seed,e.applyFilter(this,r,n,i)}set sepia(e){this.uniforms.sepia=e}get sepia(){return this.uniforms.sepia}set noise(e){this.uniforms.noise=e}get noise(){return this.uniforms.noise}set noiseSize(e){this.uniforms.noiseSize=e}get noiseSize(){return this.uniforms.noiseSize}set scratch(e){this.uniforms.scratch=e}get scratch(){return this.uniforms.scratch}set scratchDensity(e){this.uniforms.scratchDensity=e}get scratchDensity(){return this.uniforms.scratchDensity}set scratchWidth(e){this.uniforms.scratchWidth=e}get scratchWidth(){return this.uniforms.scratchWidth}set vignetting(e){this.uniforms.vignetting=e}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(e){this.uniforms.vignettingAlpha=e}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(e){this.uniforms.vignettingBlur=e}get vignettingBlur(){return this.uniforms.vignettingBlur}};let Hp=Gp;Hp.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var B2=`attribute vec2 aVertexPosition;
1502
+ `;const mp=class extends Ve{constructor(e,r=0){super(LS,kS),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof e=="number"?(this.seed=e,e=void 0):this.seed=r,Object.assign(this,mp.defaults,e)}apply(e,r,n,i){var a,u;this.uniforms.dimensions[0]=(a=r.filterFrame)==null?void 0:a.width,this.uniforms.dimensions[1]=(u=r.filterFrame)==null?void 0:u.height,this.uniforms.seed=this.seed,e.applyFilter(this,r,n,i)}set sepia(e){this.uniforms.sepia=e}get sepia(){return this.uniforms.sepia}set noise(e){this.uniforms.noise=e}get noise(){return this.uniforms.noise}set noiseSize(e){this.uniforms.noiseSize=e}get noiseSize(){return this.uniforms.noiseSize}set scratch(e){this.uniforms.scratch=e}get scratch(){return this.uniforms.scratch}set scratchDensity(e){this.uniforms.scratchDensity=e}get scratchDensity(){return this.uniforms.scratchDensity}set scratchWidth(e){this.uniforms.scratchWidth=e}get scratchWidth(){return this.uniforms.scratchWidth}set vignetting(e){this.uniforms.vignetting=e}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(e){this.uniforms.vignettingAlpha=e}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(e){this.uniforms.vignettingBlur=e}get vignettingBlur(){return this.uniforms.vignettingBlur}};let vp=mp;vp.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var BS=`attribute vec2 aVertexPosition;
1519
1503
  attribute vec2 aTextureCoord;
1520
1504
 
1521
1505
  uniform mat3 projectionMatrix;
@@ -1526,7 +1510,7 @@ void main(void)
1526
1510
  {
1527
1511
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1528
1512
  vTextureCoord = aTextureCoord;
1529
- }`,U2=`varying vec2 vTextureCoord;
1513
+ }`,DS=`varying vec2 vTextureCoord;
1530
1514
  uniform sampler2D uSampler;
1531
1515
  uniform vec4 filterClamp;
1532
1516
 
@@ -1564,7 +1548,7 @@ void main(void) {
1564
1548
  vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
1565
1549
  gl_FragColor = contentColor + outlineColor;
1566
1550
  }
1567
- `;const Va=class extends je{constructor(e=1,r=0,n=.1,i=1,a=!1){super(B2,U2.replace(/\$\{angleStep\}/,Va.getAngleStep(n))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=a,Object.assign(this,{thickness:e,color:r,quality:n,alpha:i,knockout:a})}static getAngleStep(e){const r=Math.max(e*Va.MAX_SAMPLES,Va.MIN_SAMPLES);return(Math.PI*2/r).toFixed(7)}apply(e,r,n,i){this.uniforms.uThickness[0]=this._thickness/r._frame.width,this.uniforms.uThickness[1]=this._thickness/r._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,e.applyFilter(this,r,n,i)}get alpha(){return this._alpha}set alpha(e){this._alpha=e}get color(){return rl(this.uniforms.uColor)}set color(e){ya(e,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(e){this._knockout=e}get thickness(){return this._thickness}set thickness(e){this._thickness=e,this.padding=e}};let zp=Va;zp.MIN_SAMPLES=1,zp.MAX_SAMPLES=100;var $2=`attribute vec2 aVertexPosition;
1551
+ `;const La=class extends Ve{constructor(e=1,r=0,n=.1,i=1,a=!1){super(BS,DS.replace(/\$\{angleStep\}/,La.getAngleStep(n))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=a,Object.assign(this,{thickness:e,color:r,quality:n,alpha:i,knockout:a})}static getAngleStep(e){const r=Math.max(e*La.MAX_SAMPLES,La.MIN_SAMPLES);return(Math.PI*2/r).toFixed(7)}apply(e,r,n,i){this.uniforms.uThickness[0]=this._thickness/r._frame.width,this.uniforms.uThickness[1]=this._thickness/r._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,e.applyFilter(this,r,n,i)}get alpha(){return this._alpha}set alpha(e){this._alpha=e}get color(){return Ku(this.uniforms.uColor)}set color(e){ca(e,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(e){this._knockout=e}get thickness(){return this._thickness}set thickness(e){this._thickness=e,this.padding=e}};let _p=La;_p.MIN_SAMPLES=1,_p.MAX_SAMPLES=100;var US=`attribute vec2 aVertexPosition;
1568
1552
  attribute vec2 aTextureCoord;
1569
1553
 
1570
1554
  uniform mat3 projectionMatrix;
@@ -1575,7 +1559,7 @@ void main(void)
1575
1559
  {
1576
1560
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1577
1561
  vTextureCoord = aTextureCoord;
1578
- }`,G2=`varying vec2 vTextureCoord;
1562
+ }`,$S=`varying vec2 vTextureCoord;
1579
1563
  uniform sampler2D uSampler;
1580
1564
 
1581
1565
  uniform vec4 filterArea;
@@ -1619,7 +1603,7 @@ void main(void)
1619
1603
 
1620
1604
  gl_FragColor = color * _alpha;
1621
1605
  }
1622
- `;const Vp=class extends je{constructor(e){super($2,G2),this.time=0,this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Vp.defaults,e)}apply(e,r,n,i){var a,u;this.uniforms.dimensions[0]=(a=r.filterFrame)==null?void 0:a.width,this.uniforms.dimensions[1]=(u=r.filterFrame)==null?void 0:u.height,this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}set mirror(e){this.uniforms.mirror=e}get mirror(){return this.uniforms.mirror}set boundary(e){this.uniforms.boundary=e}get boundary(){return this.uniforms.boundary}set amplitude(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]}get amplitude(){return this.uniforms.amplitude}set waveLength(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]}get waveLength(){return this.uniforms.waveLength}set alpha(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]}get alpha(){return this.uniforms.alpha}};let H2=Vp;H2.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var z2=`attribute vec2 aVertexPosition;
1606
+ `;const yp=class extends Ve{constructor(e){super(US,$S),this.time=0,this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,yp.defaults,e)}apply(e,r,n,i){var a,u;this.uniforms.dimensions[0]=(a=r.filterFrame)==null?void 0:a.width,this.uniforms.dimensions[1]=(u=r.filterFrame)==null?void 0:u.height,this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}set mirror(e){this.uniforms.mirror=e}get mirror(){return this.uniforms.mirror}set boundary(e){this.uniforms.boundary=e}get boundary(){return this.uniforms.boundary}set amplitude(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]}get amplitude(){return this.uniforms.amplitude}set waveLength(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]}get waveLength(){return this.uniforms.waveLength}set alpha(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]}get alpha(){return this.uniforms.alpha}};let GS=yp;GS.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var HS=`attribute vec2 aVertexPosition;
1623
1607
  attribute vec2 aTextureCoord;
1624
1608
 
1625
1609
  uniform mat3 projectionMatrix;
@@ -1630,7 +1614,7 @@ void main(void)
1630
1614
  {
1631
1615
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1632
1616
  vTextureCoord = aTextureCoord;
1633
- }`,V2=`varying vec2 vTextureCoord;
1617
+ }`,zS=`varying vec2 vTextureCoord;
1634
1618
  uniform sampler2D uSampler;
1635
1619
  uniform vec4 filterArea;
1636
1620
  uniform vec4 filterClamp;
@@ -1699,7 +1683,7 @@ void main()
1699
1683
 
1700
1684
  gl_FragColor = color;
1701
1685
  }
1702
- `;const jp=class extends je{constructor(e=[0,0],r,n=0){super(z2,V2),this.center=e,Object.assign(this,jp.defaults,r),this.time=n}apply(e,r,n,i){this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}get center(){return this.uniforms.center}set center(e){this.uniforms.center=e}get amplitude(){return this.uniforms.amplitude}set amplitude(e){this.uniforms.amplitude=e}get wavelength(){return this.uniforms.wavelength}set wavelength(e){this.uniforms.wavelength=e}get brightness(){return this.uniforms.brightness}set brightness(e){this.uniforms.brightness=e}get speed(){return this.uniforms.speed}set speed(e){this.uniforms.speed=e}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}};let j2=jp;j2.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var X2=`attribute vec2 aVertexPosition;
1686
+ `;const xp=class extends Ve{constructor(e=[0,0],r,n=0){super(HS,zS),this.center=e,Object.assign(this,xp.defaults,r),this.time=n}apply(e,r,n,i){this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}get center(){return this.uniforms.center}set center(e){this.uniforms.center=e}get amplitude(){return this.uniforms.amplitude}set amplitude(e){this.uniforms.amplitude=e}get wavelength(){return this.uniforms.wavelength}set wavelength(e){this.uniforms.wavelength=e}get brightness(){return this.uniforms.brightness}set brightness(e){this.uniforms.brightness=e}get speed(){return this.uniforms.speed}set speed(e){this.uniforms.speed=e}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}};let VS=xp;VS.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var jS=`attribute vec2 aVertexPosition;
1703
1687
  attribute vec2 aTextureCoord;
1704
1688
 
1705
1689
  uniform mat3 projectionMatrix;
@@ -1710,7 +1694,7 @@ void main(void)
1710
1694
  {
1711
1695
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1712
1696
  vTextureCoord = aTextureCoord;
1713
- }`,W2=`varying vec2 vTextureCoord;
1697
+ }`,XS=`varying vec2 vTextureCoord;
1714
1698
 
1715
1699
  uniform sampler2D uSampler;
1716
1700
  uniform float blur;
@@ -1749,7 +1733,7 @@ void main(void)
1749
1733
 
1750
1734
  gl_FragColor = color;
1751
1735
  }
1752
- `;let Xp=class extends je{constructor(e){var r,n;super(X2,W2),this.uniforms.blur=e.blur,this.uniforms.gradientBlur=e.gradientBlur,this.uniforms.start=(r=e.start)!=null?r:new et(0,window.innerHeight/2),this.uniforms.end=(n=e.end)!=null?n:new et(600,window.innerHeight/2),this.uniforms.delta=new et(30,30),this.uniforms.texSize=new et(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(e){this.uniforms.blur=e}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(e){this.uniforms.gradientBlur=e}get start(){return this.uniforms.start}set start(e){this.uniforms.start=e,this.updateDelta()}get end(){return this.uniforms.end}set end(e){this.uniforms.end=e,this.updateDelta()}},q2=class extends Xp{updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+r*r);this.uniforms.delta.x=e/n,this.uniforms.delta.y=r/n}},Y2=class extends Xp{updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=e/n}};const Wp=class extends je{constructor(e,r,n,i){super(),typeof e=="number"&&(ke("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),e={blur:e,gradientBlur:r,start:n,end:i}),e=Object.assign({},Wp.defaults,e),this.tiltShiftXFilter=new q2(e),this.tiltShiftYFilter=new Y2(e)}apply(e,r,n,i){const a=e.getFilterTexture();this.tiltShiftXFilter.apply(e,r,a,1),this.tiltShiftYFilter.apply(e,a,n,i),e.returnFilterTexture(a)}get blur(){return this.tiltShiftXFilter.blur}set blur(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e}get start(){return this.tiltShiftXFilter.start}set start(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e}get end(){return this.tiltShiftXFilter.end}set end(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e}};let K2=Wp;K2.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var Z2=`attribute vec2 aVertexPosition;
1736
+ `;let bp=class extends Ve{constructor(e){var r,n;super(jS,XS),this.uniforms.blur=e.blur,this.uniforms.gradientBlur=e.gradientBlur,this.uniforms.start=(r=e.start)!=null?r:new Je(0,window.innerHeight/2),this.uniforms.end=(n=e.end)!=null?n:new Je(600,window.innerHeight/2),this.uniforms.delta=new Je(30,30),this.uniforms.texSize=new Je(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(e){this.uniforms.blur=e}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(e){this.uniforms.gradientBlur=e}get start(){return this.uniforms.start}set start(e){this.uniforms.start=e,this.updateDelta()}get end(){return this.uniforms.end}set end(e){this.uniforms.end=e,this.updateDelta()}},WS=class extends bp{updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+r*r);this.uniforms.delta.x=e/n,this.uniforms.delta.y=r/n}},qS=class extends bp{updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=e/n}};const Tp=class extends Ve{constructor(e,r,n,i){super(),typeof e=="number"&&(Le("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),e={blur:e,gradientBlur:r,start:n,end:i}),e=Object.assign({},Tp.defaults,e),this.tiltShiftXFilter=new WS(e),this.tiltShiftYFilter=new qS(e)}apply(e,r,n,i){const a=e.getFilterTexture();this.tiltShiftXFilter.apply(e,r,a,1),this.tiltShiftYFilter.apply(e,a,n,i),e.returnFilterTexture(a)}get blur(){return this.tiltShiftXFilter.blur}set blur(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e}get start(){return this.tiltShiftXFilter.start}set start(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e}get end(){return this.tiltShiftXFilter.end}set end(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e}};let YS=Tp;YS.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var KS=`attribute vec2 aVertexPosition;
1753
1737
  attribute vec2 aTextureCoord;
1754
1738
 
1755
1739
  uniform mat3 projectionMatrix;
@@ -1760,7 +1744,7 @@ void main(void)
1760
1744
  {
1761
1745
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1762
1746
  vTextureCoord = aTextureCoord;
1763
- }`,Q2=`varying vec2 vTextureCoord;
1747
+ }`,ZS=`varying vec2 vTextureCoord;
1764
1748
 
1765
1749
  uniform sampler2D uSampler;
1766
1750
  uniform float radius;
@@ -1816,7 +1800,7 @@ void main(void)
1816
1800
  gl_FragColor = texture2D(uSampler, coord );
1817
1801
 
1818
1802
  }
1819
- `;const qp=class extends je{constructor(t){super(Z2,Q2),Object.assign(this,qp.defaults,t)}get offset(){return this.uniforms.offset}set offset(t){this.uniforms.offset=t}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}get angle(){return this.uniforms.angle}set angle(t){this.uniforms.angle=t}};let J2=qp;J2.defaults={radius:200,angle:4,padding:20,offset:new et};var eI=`attribute vec2 aVertexPosition;
1803
+ `;const wp=class extends Ve{constructor(t){super(KS,ZS),Object.assign(this,wp.defaults,t)}get offset(){return this.uniforms.offset}set offset(t){this.uniforms.offset=t}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}get angle(){return this.uniforms.angle}set angle(t){this.uniforms.angle=t}};let QS=wp;QS.defaults={radius:200,angle:4,padding:20,offset:new Je};var JS=`attribute vec2 aVertexPosition;
1820
1804
  attribute vec2 aTextureCoord;
1821
1805
 
1822
1806
  uniform mat3 projectionMatrix;
@@ -1827,7 +1811,7 @@ void main(void)
1827
1811
  {
1828
1812
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1829
1813
  vTextureCoord = aTextureCoord;
1830
- }`,tI=`varying vec2 vTextureCoord;
1814
+ }`,eA=`varying vec2 vTextureCoord;
1831
1815
  uniform sampler2D uSampler;
1832
1816
  uniform vec4 filterArea;
1833
1817
 
@@ -1913,7 +1897,7 @@ void main() {
1913
1897
 
1914
1898
  gl_FragColor = color;
1915
1899
  }
1916
- `,Yp=Object.getOwnPropertySymbols,rI=Object.prototype.hasOwnProperty,nI=Object.prototype.propertyIsEnumerable,iI=(t,e)=>{var r={};for(var n in t)rI.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Yp)for(var n of Yp(t))e.indexOf(n)<0&&nI.call(t,n)&&(r[n]=t[n]);return r};const Kp=class extends je{constructor(t){const e=Object.assign(Kp.defaults,t),{maxKernelSize:r}=e,n=iI(e,["maxKernelSize"]);super(eI,tI.replace("${maxKernelSize}",r.toFixed(1))),Object.assign(this,n)}get center(){return this.uniforms.uCenter}set center(t){this.uniforms.uCenter=t}get strength(){return this.uniforms.uStrength}set strength(t){this.uniforms.uStrength=t}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(t){this.uniforms.uInnerRadius=t}get radius(){return this.uniforms.uRadius}set radius(t){(t<0||t===1/0)&&(t=-1),this.uniforms.uRadius=t}};let sI=Kp;sI.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const Bn=t=>{const{contrast:e=1,saturation:r=1,brightness:n=1,alpha:i=1,red:a=1,blue:u=1,gamma:l=1,green:f=1,blurRadius:p=0,temperature:g=0,hue:c=0,sharpness:d=0,vignette:m=0,noise:_=0}=t||{},y=new Xt.Filter(null,`
1900
+ `,Sp=Object.getOwnPropertySymbols,tA=Object.prototype.hasOwnProperty,rA=Object.prototype.propertyIsEnumerable,nA=(t,e)=>{var r={};for(var n in t)tA.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Sp)for(var n of Sp(t))e.indexOf(n)<0&&rA.call(t,n)&&(r[n]=t[n]);return r};const Ap=class extends Ve{constructor(t){const e=Object.assign(Ap.defaults,t),{maxKernelSize:r}=e,n=nA(e,["maxKernelSize"]);super(JS,eA.replace("${maxKernelSize}",r.toFixed(1))),Object.assign(this,n)}get center(){return this.uniforms.uCenter}set center(t){this.uniforms.uCenter=t}get strength(){return this.uniforms.uStrength}set strength(t){this.uniforms.uStrength=t}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(t){this.uniforms.uInnerRadius=t}get radius(){return this.uniforms.uRadius}set radius(t){(t<0||t===1/0)&&(t=-1),this.uniforms.uRadius=t}};let iA=Ap;iA.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const Bn=t=>{const{contrast:e=1,saturation:r=1,brightness:n=1,alpha:i=1,red:a=1,blue:u=1,gamma:l=1,green:h=1,blurRadius:p=0,temperature:g=0,hue:c=0,sharpness:d=0,vignette:m=0,noise:_=0}=t||{},y=new jt.Filter(null,`
1917
1901
  precision mediump float;
1918
1902
  varying vec2 vTextureCoord;
1919
1903
  uniform sampler2D uSampler;
@@ -1925,7 +1909,7 @@ void main() {
1925
1909
  color.b = color.b - (temperature / 100.0);
1926
1910
  gl_FragColor = color;
1927
1911
  }
1928
- `);y.uniforms.temperature=g;const b=new p2([0,-d,0,-d,1+4*d,-d,0,-d,0]),x=new Xt.filters.ColorMatrixFilter;x.hue(c,!1);const E=new bs(p,1,!0),w=new Hp({vignetting:m}),I=new Xt.filters.NoiseFilter(_);return{adjustmentFilter:new OC({...l&&{gamma:l},...n&&{brightness:n},...e&&{contrast:e},...r&&{saturation:r},...a&&{red:a},...f&&{green:f},...u&&{blue:u},...i&&{alpha:i}}),blurFilter:E,hueFilter:x,sharpnessFilter:b,temperatureFilter:y,vignetteFilter:w,noiseFilter:I}},aI=()=>{const t=new Xt.Filter(null,`
1912
+ `);y.uniforms.temperature=g;const b=new dS([0,-d,0,-d,1+4*d,-d,0,-d,0]),x=new jt.filters.ColorMatrixFilter;x.hue(c,!1);const E=new _s(p,1,!0),w=new vp({vignetting:m}),I=new jt.filters.NoiseFilter(_);return{adjustmentFilter:new Mw({...l&&{gamma:l},...n&&{brightness:n},...e&&{contrast:e},...r&&{saturation:r},...a&&{red:a},...h&&{green:h},...u&&{blue:u},...i&&{alpha:i}}),blurFilter:E,hueFilter:x,sharpnessFilter:b,temperatureFilter:y,vignetteFilter:w,noiseFilter:I}},sA=()=>{const t=new jt.Filter(null,`
1929
1913
  precision mediump float;
1930
1914
  uniform mat3 uNightVisionMatrix;
1931
1915
  varying vec2 vTextureCoord;
@@ -1936,7 +1920,7 @@ void main() {
1936
1920
  vec3 color = texColor.rgb;
1937
1921
  gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1938
1922
  }
1939
- `),e=[.393,.769,.189,.349,.686,.168,.272,.534,.131];t.uniforms.uNightVisionMatrix=e;const r=new Xt.Filter(null,`
1923
+ `),e=[.393,.769,.189,.349,.686,.168,.272,.534,.131];t.uniforms.uNightVisionMatrix=e;const r=new jt.Filter(null,`
1940
1924
  precision mediump float;
1941
1925
  varying vec2 vTextureCoord;
1942
1926
  uniform sampler2D uSampler;
@@ -1950,7 +1934,7 @@ void main() {
1950
1934
  float vignette = 1.0 - smoothstep(vignetteSize, 0.5, length(delta));
1951
1935
  gl_FragColor = texColor * vignetteColor * vignetteStrength * vignette;
1952
1936
  }
1953
- `);return r.uniforms.vignetteColor=[0,0,0,1],r.uniforms.vignetteSize=.7,r.uniforms.vignetteStrength=.6,{nightVisionFilter:t,vignetteFilter:r}},Zp=te.forwardRef((t,e)=>{const r=X.useRef(null),n=X.useRef(null),{src:i,visible:a,disabled:u,transformation:{x:l,y:f,width:p,height:g,anchor:c,colorCorrection:d={},effect:m},pointerdown:_}=t,{blurRadius:y=0,vignette:b=0,noise:x=0}=d,{temperatureFilter:E,sharpnessFilter:w,hueFilter:I,blurFilter:O,adjustmentFilter:F,vignetteFilter:N,noiseFilter:L}=Bn(d),{nightVisionFilter:D}=aI();return te.useEffect(()=>(console.log("PixiImageSprite mounting"),()=>{console.log("PixiImageSprite unmounting")}),[]),console.log("imageRef",r.current,l,f,p,g),Ae.jsx(rn,{...t,ref:e,children:Ae.jsx(Be.Container,{ref:n,children:Ae.jsx(Be.Sprite,{image:i,width:p,height:g,anchor:c,ref:r,alpha:a?1:0,x:l,y:f,...!u&&a&&{interactive:!0,pointerdown:_},filters:[E,w,I,F,...y>0?[O]:[],...m===Tn.NightVision?[D]:[],...b>0?[N]:[],...x>0?[L]:[]]})})})});Zp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const ja={build(t){const e=t.points;let r,n,i,a,u,l;if(t.type===Et.CIRC){const _=t.shape;r=_.x,n=_.y,u=l=_.radius,i=a=0}else if(t.type===Et.ELIP){const _=t.shape;r=_.x,n=_.y,u=_.width,l=_.height,i=a=0}else{const _=t.shape,y=_.width/2,b=_.height/2;r=_.x+y,n=_.y+b,u=l=Math.max(0,Math.min(_.radius,Math.min(y,b))),i=y-u,a=b-l}if(!(u>=0&&l>=0&&i>=0&&a>=0)){e.length=0;return}const f=Math.ceil(2.3*Math.sqrt(u+l)),p=f*8+(i?4:0)+(a?4:0);if(e.length=p,p===0)return;if(f===0){e.length=8,e[0]=e[6]=r+i,e[1]=e[3]=n+a,e[2]=e[4]=r-i,e[5]=e[7]=n-a;return}let g=0,c=f*4+(i?2:0)+2,d=c,m=p;{const _=i+u,y=a,b=r+_,x=r-_,E=n+y;if(e[g++]=b,e[g++]=E,e[--c]=E,e[--c]=x,a){const w=n-y;e[d++]=x,e[d++]=w,e[--m]=w,e[--m]=b}}for(let _=1;_<f;_++){const y=Math.PI/2*(_/f),b=i+Math.cos(y)*u,x=a+Math.sin(y)*l,E=r+b,w=r-b,I=n+x,O=n-x;e[g++]=E,e[g++]=I,e[--c]=I,e[--c]=w,e[d++]=w,e[d++]=O,e[--m]=O,e[--m]=E}{const _=i,y=a+l,b=r+_,x=r-_,E=n+y,w=n-y;e[g++]=b,e[g++]=E,e[--m]=w,e[--m]=b,i&&(e[g++]=x,e[g++]=E,e[--m]=w,e[--m]=x)}},triangulate(t,e){const r=t.points,n=e.points,i=e.indices;if(r.length===0)return;let a=n.length/2;const u=a;let l,f;if(t.type!==Et.RREC){const g=t.shape;l=g.x,f=g.y}else{const g=t.shape;l=g.x+g.width/2,f=g.y+g.height/2}const p=t.matrix;n.push(t.matrix?p.a*l+p.c*f+p.tx:l,t.matrix?p.b*l+p.d*f+p.ty:f),a++,n.push(r[0],r[1]);for(let g=2;g<r.length;g+=2)n.push(r[g],r[g+1]),i.push(a++,u,a);i.push(u+1,u,a)}};function Qp(t,e=!1){const r=t.length;if(r<6)return;let n=0;for(let i=0,a=t[r-2],u=t[r-1];i<r;i+=2){const l=t[i],f=t[i+1];n+=(l-a)*(f+u),a=l,u=f}if(!e&&n>0||e&&n<=0){const i=r/2;for(let a=i+i%2;a<r;a+=2){const u=r-a-2,l=r-a-1,f=a,p=a+1;[t[u],t[f]]=[t[f],t[u]],[t[l],t[p]]=[t[p],t[l]]}}}const Jp={build(t){t.points=t.shape.points.slice()},triangulate(t,e){let r=t.points;const n=t.holes,i=e.points,a=e.indices;if(r.length>=6){Qp(r,!1);const u=[];for(let p=0;p<n.length;p++){const g=n[p];Qp(g.points,!0),u.push(r.length/2),r=r.concat(g.points)}const l=Ww(r,u,2);if(!l)return;const f=i.length/2;for(let p=0;p<l.length;p+=3)a.push(l[p]+f),a.push(l[p+1]+f),a.push(l[p+2]+f);for(let p=0;p<r.length;p++)i.push(r[p])}}},oI={build(t){const e=t.shape,r=e.x,n=e.y,i=e.width,a=e.height,u=t.points;u.length=0,i>=0&&a>=0&&u.push(r,n,r+i,n,r+i,n+a,r,n+a)},triangulate(t,e){const r=t.points,n=e.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},uI={build(t){ja.build(t)},triangulate(t,e){ja.triangulate(t,e)}};var yr=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(yr||{}),Un=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(Un||{});const Ei={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(t,e=20){if(!this.adaptive||!t||isNaN(t))return e;let r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class eg{static curveTo(e,r,n,i,a,u){const l=u[u.length-2],p=u[u.length-1]-r,g=l-e,c=i-r,d=n-e,m=Math.abs(p*d-g*c);if(m<1e-8||a===0)return(u[u.length-2]!==e||u[u.length-1]!==r)&&u.push(e,r),null;const _=p*p+g*g,y=c*c+d*d,b=p*c+g*d,x=a*Math.sqrt(_)/m,E=a*Math.sqrt(y)/m,w=x*b/_,I=E*b/y,O=x*d+E*g,F=x*c+E*p,N=g*(E+w),L=p*(E+w),D=d*(x+I),V=c*(x+I),Y=Math.atan2(L-F,N-O),ie=Math.atan2(V-F,D-O);return{cx:O+e,cy:F+r,radius:a,startAngle:Y,endAngle:ie,anticlockwise:g*c>d*p}}static arc(e,r,n,i,a,u,l,f,p){const g=l-u,c=Ei._segmentsCount(Math.abs(g)*a,Math.ceil(Math.abs(g)/Aa)*40),d=g/(c*2),m=d*2,_=Math.cos(d),y=Math.sin(d),b=c-1,x=b%1/b;for(let E=0;E<=b;++E){const w=E+x*E,I=d+u+m*w,O=Math.cos(I),F=-Math.sin(I);p.push((_*O+y*F)*a+n,(_*-F+y*O)*a+i)}}}class lI{constructor(){this.reset()}begin(e,r,n){this.reset(),this.style=e,this.start=r,this.attribStart=n}end(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Ll{static curveLength(e,r,n,i,a,u,l,f){let g=0,c=0,d=0,m=0,_=0,y=0,b=0,x=0,E=0,w=0,I=0,O=e,F=r;for(let N=1;N<=10;++N)c=N/10,d=c*c,m=d*c,_=1-c,y=_*_,b=y*_,x=b*e+3*y*c*n+3*_*d*a+m*l,E=b*r+3*y*c*i+3*_*d*u+m*f,w=O-x,I=F-E,O=x,F=E,g+=Math.sqrt(w*w+I*I);return g}static curveTo(e,r,n,i,a,u,l){const f=l[l.length-2],p=l[l.length-1];l.length-=2;const g=Ei._segmentsCount(Ll.curveLength(f,p,e,r,n,i,a,u));let c=0,d=0,m=0,_=0,y=0;l.push(f,p);for(let b=1,x=0;b<=g;++b)x=b/g,c=1-x,d=c*c,m=d*c,_=x*x,y=_*x,l.push(m*f+3*d*x*e+3*c*_*n+y*a,m*p+3*d*x*r+3*c*_*i+y*u)}}function tg(t,e,r,n,i,a,u,l){const f=t-r*i,p=e-n*i,g=t+r*a,c=e+n*a;let d,m;u?(d=n,m=-r):(d=-n,m=r);const _=f+d,y=p+m,b=g+d,x=c+m;return l.push(_,y,b,x),2}function $n(t,e,r,n,i,a,u,l){const f=r-t,p=n-e;let g=Math.atan2(f,p),c=Math.atan2(i-t,a-e);l&&g<c?g+=Math.PI*2:!l&&g>c&&(c+=Math.PI*2);let d=g;const m=c-g,_=Math.abs(m),y=Math.sqrt(f*f+p*p),b=(15*_*Math.sqrt(y)/Math.PI>>0)+1,x=m/b;if(d+=x,l){u.push(t,e,r,n);for(let E=1,w=d;E<b;E++,w+=x)u.push(t,e,t+Math.sin(w)*y,e+Math.cos(w)*y);u.push(t,e,i,a)}else{u.push(r,n,t,e);for(let E=1,w=d;E<b;E++,w+=x)u.push(t+Math.sin(w)*y,e+Math.cos(w)*y,t,e);u.push(i,a,t,e)}return b*2}function cI(t,e){const r=t.shape;let n=t.points||r.points.slice();const i=e.closePointEps;if(n.length===0)return;const a=t.lineStyle,u=new et(n[0],n[1]),l=new et(n[n.length-2],n[n.length-1]),f=r.type!==Et.POLY||r.closeStroke,p=Math.abs(u.x-l.x)<i&&Math.abs(u.y-l.y)<i;if(f){n=n.slice(),p&&(n.pop(),n.pop(),l.set(n[n.length-2],n[n.length-1]));const H=(u.x+l.x)*.5,Q=(l.y+u.y)*.5;n.unshift(H,Q),n.push(H,Q)}const g=e.points,c=n.length/2;let d=n.length;const m=g.length/2,_=a.width/2,y=_*_,b=a.miterLimit*a.miterLimit;let x=n[0],E=n[1],w=n[2],I=n[3],O=0,F=0,N=-(E-I),L=x-w,D=0,V=0,Y=Math.sqrt(N*N+L*L);N/=Y,L/=Y,N*=_,L*=_;const ie=a.alignment,j=(1-ie)*2,G=ie*2;f||(a.cap===Un.ROUND?d+=$n(x-N*(j-G)*.5,E-L*(j-G)*.5,x-N*j,E-L*j,x+N*G,E+L*G,g,!0)+2:a.cap===Un.SQUARE&&(d+=tg(x,E,N,L,j,G,!0,g))),g.push(x-N*j,E-L*j,x+N*G,E+L*G);for(let H=1;H<c-1;++H){x=n[(H-1)*2],E=n[(H-1)*2+1],w=n[H*2],I=n[H*2+1],O=n[(H+1)*2],F=n[(H+1)*2+1],N=-(E-I),L=x-w,Y=Math.sqrt(N*N+L*L),N/=Y,L/=Y,N*=_,L*=_,D=-(I-F),V=w-O,Y=Math.sqrt(D*D+V*V),D/=Y,V/=Y,D*=_,V*=_;const Q=w-x,pe=E-I,W=w-O,q=F-I,he=Q*W+pe*q,fe=pe*W-q*Q,me=fe<0;if(Math.abs(fe)<.001*Math.abs(he)){g.push(w-N*j,I-L*j,w+N*G,I+L*G),he>=0&&(a.join===yr.ROUND?d+=$n(w,I,w-N*j,I-L*j,w-D*j,I-V*j,g,!1)+4:d+=2,g.push(w-D*G,I-V*G,w+D*j,I+V*j));continue}const be=(-N+x)*(-L+I)-(-N+w)*(-L+E),Ce=(-D+O)*(-V+I)-(-D+w)*(-V+F),$e=(Q*Ce-W*be)/fe,ze=(q*be-pe*Ce)/fe,Xe=($e-w)*($e-w)+(ze-I)*(ze-I),_e=w+($e-w)*j,Te=I+(ze-I)*j,De=w-($e-w)*G,Oe=I-(ze-I)*G,we=Math.min(Q*Q+pe*pe,W*W+q*q),ge=me?j:G,tt=we+ge*ge*y,oe=Xe<=tt;let Ie=a.join;if(Ie===yr.MITER&&Xe/y>b&&(Ie=yr.BEVEL),oe)switch(Ie){case yr.MITER:{g.push(_e,Te,De,Oe);break}case yr.BEVEL:{me?g.push(_e,Te,w+N*G,I+L*G,_e,Te,w+D*G,I+V*G):g.push(w-N*j,I-L*j,De,Oe,w-D*j,I-V*j,De,Oe),d+=2;break}case yr.ROUND:{me?(g.push(_e,Te,w+N*G,I+L*G),d+=$n(w,I,w+N*G,I+L*G,w+D*G,I+V*G,g,!0)+4,g.push(_e,Te,w+D*G,I+V*G)):(g.push(w-N*j,I-L*j,De,Oe),d+=$n(w,I,w-N*j,I-L*j,w-D*j,I-V*j,g,!1)+4,g.push(w-D*j,I-V*j,De,Oe));break}}else{switch(g.push(w-N*j,I-L*j,w+N*G,I+L*G),Ie){case yr.MITER:{me?g.push(De,Oe,De,Oe):g.push(_e,Te,_e,Te),d+=2;break}case yr.ROUND:{me?d+=$n(w,I,w+N*G,I+L*G,w+D*G,I+V*G,g,!0)+2:d+=$n(w,I,w-N*j,I-L*j,w-D*j,I-V*j,g,!1)+2;break}}g.push(w-D*j,I-V*j,w+D*G,I+V*G),d+=2}}x=n[(c-2)*2],E=n[(c-2)*2+1],w=n[(c-1)*2],I=n[(c-1)*2+1],N=-(E-I),L=x-w,Y=Math.sqrt(N*N+L*L),N/=Y,L/=Y,N*=_,L*=_,g.push(w-N*j,I-L*j,w+N*G,I+L*G),f||(a.cap===Un.ROUND?d+=$n(w-N*(j-G)*.5,I-L*(j-G)*.5,w-N*j,I-L*j,w+N*G,I+L*G,g,!1)+2:a.cap===Un.SQUARE&&(d+=tg(w,I,N,L,j,G,!1,g)));const ae=e.indices,se=Ei.epsilon*Ei.epsilon;for(let H=m;H<d+m-2;++H)x=g[H*2],E=g[H*2+1],w=g[(H+1)*2],I=g[(H+1)*2+1],O=g[(H+2)*2],F=g[(H+2)*2+1],!(Math.abs(x*(I-F)+w*(F-E)+O*(E-I))<se)&&ae.push(H,H+1,H+2)}function hI(t,e){let r=0;const n=t.shape,i=t.points||n.points,a=n.type!==Et.POLY||n.closeStroke;if(i.length===0)return;const u=e.points,l=e.indices,f=i.length/2,p=u.length/2;let g=p;for(u.push(i[0],i[1]),r=1;r<f;r++)u.push(i[r*2],i[r*2+1]),l.push(g,g+1),g++;a&&l.push(g,p)}function rg(t,e){t.lineStyle.native?hI(t,e):cI(t,e)}class kl{static curveLength(e,r,n,i,a,u){const l=e-2*n+a,f=r-2*i+u,p=2*n-2*e,g=2*i-2*r,c=4*(l*l+f*f),d=4*(l*p+f*g),m=p*p+g*g,_=2*Math.sqrt(c+d+m),y=Math.sqrt(c),b=2*c*y,x=2*Math.sqrt(m),E=d/y;return(b*_+y*d*(_-x)+(4*m*c-d*d)*Math.log((2*y+E+_)/(E+x)))/(4*b)}static curveTo(e,r,n,i,a){const u=a[a.length-2],l=a[a.length-1],f=Ei._segmentsCount(kl.curveLength(u,l,e,r,n,i));let p=0,g=0;for(let c=1;c<=f;++c){const d=c/f;p=u+(e-u)*d,g=l+(r-l)*d,a.push(p+(e+(n-e)*d-p)*d,g+(r+(i-r)*d-g)*d)}}}const Dl={[Et.POLY]:Jp,[Et.CIRC]:ja,[Et.ELIP]:ja,[Et.RECT]:oI,[Et.RREC]:uI},ng=[],Xa=[];class Bl{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?Qe.EMPTY:(e=e||new Qe(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,r){const{a:n,b:i,c:a,d:u,tx:l,ty:f}=e,p=n*r.x+a*r.y+l,g=i*r.x+u*r.y+f;this.minX=Math.min(this.minX,p),this.maxX=Math.max(this.maxX,p),this.minY=Math.min(this.minY,g),this.maxY=Math.max(this.maxY,g)}addQuad(e){let r=this.minX,n=this.minY,i=this.maxX,a=this.maxY,u=e[0],l=e[1];r=u<r?u:r,n=l<n?l:n,i=u>i?u:i,a=l>a?l:a,u=e[2],l=e[3],r=u<r?u:r,n=l<n?l:n,i=u>i?u:i,a=l>a?l:a,u=e[4],l=e[5],r=u<r?u:r,n=l<n?l:n,i=u>i?u:i,a=l>a?l:a,u=e[6],l=e[7],r=u<r?u:r,n=l<n?l:n,i=u>i?u:i,a=l>a?l:a,this.minX=r,this.minY=n,this.maxX=i,this.maxY=a}addFrame(e,r,n,i,a){this.addFrameMatrix(e.worldTransform,r,n,i,a)}addFrameMatrix(e,r,n,i,a){const u=e.a,l=e.b,f=e.c,p=e.d,g=e.tx,c=e.ty;let d=this.minX,m=this.minY,_=this.maxX,y=this.maxY,b=u*r+f*n+g,x=l*r+p*n+c;d=b<d?b:d,m=x<m?x:m,_=b>_?b:_,y=x>y?x:y,b=u*i+f*n+g,x=l*i+p*n+c,d=b<d?b:d,m=x<m?x:m,_=b>_?b:_,y=x>y?x:y,b=u*r+f*a+g,x=l*r+p*a+c,d=b<d?b:d,m=x<m?x:m,_=b>_?b:_,y=x>y?x:y,b=u*i+f*a+g,x=l*i+p*a+c,d=b<d?b:d,m=x<m?x:m,_=b>_?b:_,y=x>y?x:y,this.minX=d,this.minY=m,this.maxX=_,this.maxY=y}addVertexData(e,r,n){let i=this.minX,a=this.minY,u=this.maxX,l=this.maxY;for(let f=r;f<n;f+=2){const p=e[f],g=e[f+1];i=p<i?p:i,a=g<a?g:a,u=p>u?p:u,l=g>l?g:l}this.minX=i,this.minY=a,this.maxX=u,this.maxY=l}addVertices(e,r,n,i){this.addVerticesMatrix(e.worldTransform,r,n,i)}addVerticesMatrix(e,r,n,i,a=0,u=a){const l=e.a,f=e.b,p=e.c,g=e.d,c=e.tx,d=e.ty;let m=this.minX,_=this.minY,y=this.maxX,b=this.maxY;for(let x=n;x<i;x+=2){const E=r[x],w=r[x+1],I=l*E+p*w+c,O=g*w+f*E+d;m=Math.min(m,I-a),y=Math.max(y,I+a),_=Math.min(_,O-u),b=Math.max(b,O+u)}this.minX=m,this.minY=_,this.maxX=y,this.maxY=b}addBounds(e){const r=this.minX,n=this.minY,i=this.maxX,a=this.maxY;this.minX=e.minX<r?e.minX:r,this.minY=e.minY<n?e.minY:n,this.maxX=e.maxX>i?e.maxX:i,this.maxY=e.maxY>a?e.maxY:a}addBoundsMask(e,r){const n=e.minX>r.minX?e.minX:r.minX,i=e.minY>r.minY?e.minY:r.minY,a=e.maxX<r.maxX?e.maxX:r.maxX,u=e.maxY<r.maxY?e.maxY:r.maxY;if(n<=a&&i<=u){const l=this.minX,f=this.minY,p=this.maxX,g=this.maxY;this.minX=n<l?n:l,this.minY=i<f?i:f,this.maxX=a>p?a:p,this.maxY=u>g?u:g}}addBoundsMatrix(e,r){this.addFrameMatrix(r,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,r){const n=e.minX>r.x?e.minX:r.x,i=e.minY>r.y?e.minY:r.y,a=e.maxX<r.x+r.width?e.maxX:r.x+r.width,u=e.maxY<r.y+r.height?e.maxY:r.y+r.height;if(n<=a&&i<=u){const l=this.minX,f=this.minY,p=this.maxX,g=this.maxY;this.minX=n<l?n:l,this.minY=i<f?i:f,this.maxX=a>p?a:p,this.maxY=u>g?u:g}}pad(e=0,r=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=r,this.maxY+=r)}addFramePad(e,r,n,i,a,u){e-=a,r-=u,n+=a,i+=u,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class Ci extends na{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new ml,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Bl,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const r=Object.keys(e);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(Ci.prototype,i,Object.getOwnPropertyDescriptor(e,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(e,r){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new Qe),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new Qe),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Bl);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const u=this.getBounds(!1,e);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-a,u}toGlobal(e,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,r)}toLocal(e,r,n,i){return r&&(e=r.toGlobal(e,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,n)}setParent(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e}removeFromParent(){var e;(e=this.parent)==null||e.removeChild(this)}setTransform(e=0,r=0,n=1,i=1,a=0,u=0,l=0,f=0,p=0){return this.position.x=e,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=a,this.skew.x=u,this.skew.y=l,this.pivot.x=f,this.pivot.y=p,this}destroy(e){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new fI),this.tempDisplayObjectParent}enableTempParent(){const e=this.parent;return this.parent=this._tempDisplayObjectParent,e}disableTempParent(e){this.parent=e}get x(){return this.position.x}set x(e){this.transform.position.x=e}get y(){return this.position.y}set y(e){this.transform.position.y=e}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(e){this.transform.position.copyFrom(e)}get scale(){return this.transform.scale}set scale(e){this.transform.scale.copyFrom(e)}get pivot(){return this.transform.pivot}set pivot(e){this.transform.pivot.copyFrom(e)}get skew(){return this.transform.skew}set skew(e){this.transform.skew.copyFrom(e)}get rotation(){return this.transform.rotation}set rotation(e){this.transform.rotation=e}get angle(){return this.transform.rotation*CE}set angle(e){this.transform.rotation=e*ps}get zIndex(){return this._zIndex}set zIndex(e){this._zIndex=e,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}get mask(){return this._mask}set mask(e){if(this._mask!==e){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=e,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class fI extends Ci{constructor(){super(...arguments),this.sortDirty=null}}Ci.prototype.displayObjectUpdateTransform=Ci.prototype.updateTransform;const dI=new Dt;function pI(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const Ul=class extends Ci{constructor(){super(),this.children=[],this.sortableChildren=Ul.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(t){}addChild(...t){if(t.length>1)for(let e=0;e<t.length;e++)this.addChild(t[e]);else{const e=t[0];e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.push(e),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this)}return t[0]}addChildAt(t,e){if(e<0||e>this.children.length)throw new Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${this.children.length}`);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t}swapChildren(t,e){if(t===e)return;const r=this.getChildIndex(t),n=this.getChildIndex(e);this.children[r]=e,this.children[n]=t,this.onChildrenChange(r<n?r:n)}getChildIndex(t){const e=this.children.indexOf(t);if(e===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return e}setChildIndex(t,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(t);ba(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)}getChildAt(t){if(t<0||t>=this.children.length)throw new Error(`getChildAt: Index (${t}) does not exist.`);return this.children[t]}removeChild(...t){if(t.length>1)for(let e=0;e<t.length;e++)this.removeChild(t[e]);else{const e=t[0],r=this.children.indexOf(e);if(r===-1)return null;e.parent=null,e.transform._parentID=-1,ba(this.children,r,1),this._boundsID++,this.onChildrenChange(r),e.emit("removed",this),this.emit("childRemoved",e,this,r)}return t[0]}removeChildAt(t){const e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,ba(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e}removeChildren(t=0,e=this.children.length){const r=t,n=e,i=n-r;let a;if(i>0&&i<=n){a=this.children.splice(r,i);for(let u=0;u<a.length;++u)a[u].parent=null,a[u].transform&&(a[u].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(let u=0;u<a.length;++u)a[u].emit("removed",this),this.emit("childRemoved",a[u],this,u);return a}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let t=!1;for(let e=0,r=this.children.length;e<r;++e){const n=this.children[e];n._lastSortedIndex=e,!t&&n.zIndex!==0&&(t=!0)}t&&this.children.length>1&&this.children.sort(pI),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let t=0,e=this.children.length;t<e;++t){const r=this.children[t];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let t=0;t<this.children.length;t++){const e=this.children[t];if(!(!e.visible||!e.renderable))if(e.calculateBounds(),e._mask){const r=e._mask.isMaskData?e._mask.maskObject:e._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(e._bounds,r._bounds)):this._bounds.addBounds(e._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(t,e=!1){const r=super.getLocalBounds(t);if(!e)for(let n=0,i=this.children.length;n<i;++n){const a=this.children[n];a.visible&&a.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(t){const e=t.renderTexture.sourceFrame;if(!(e.width>0&&e.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Ul.prototype._render&&(r=this.getBounds(!0));const i=t.projection.transform;if(i&&(n?(n=dI.copyFrom(n),n.prepend(i)):n=i),r&&e.intersects(r,n))this._render(t);else if(this.cullArea)return;for(let a=0,u=this.children.length;a<u;++a){const l=this.children[a],f=l.cullable;l.cullable=f||!this.cullArea,l.render(t),l.cullable=f}}render(t){var e;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(e=this.filters)!=null&&e.length)this.renderAdvanced(t);else if(this.cullable)this._renderWithCulling(t);else{this._render(t);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(t)}}renderAdvanced(t){var i,a,u;const e=this.filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let l=0;l<e.length;l++)e[l].enabled&&this._enabledFilters.push(e[l])}const n=e&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==_t.NONE));if(n&&t.batch.flush(),e&&((a=this._enabledFilters)!=null&&a.length)&&t.filter.push(this,this._enabledFilters),r&&t.mask.push(this,this._mask),this.cullable)this._renderWithCulling(t);else{this._render(t);for(let l=0,f=this.children.length;l<f;++l)this.children[l].render(t)}n&&t.batch.flush(),r&&t.mask.pop(this),e&&((u=this._enabledFilters)!=null&&u.length)&&t.filter.pop()}_render(t){}destroy(t){super.destroy(),this.sortDirty=!1;const e=typeof t=="boolean"?t:t==null?void 0:t.children,r=this.removeChildren(0,this.children.length);if(e)for(let n=0;n<r.length;++n)r[n].destroy(t)}get width(){return this.scale.x*this.getLocalBounds().width}set width(t){const e=this.getLocalBounds().width;e!==0?this.scale.x=t/e:this.scale.x=1,this._width=t}get height(){return this.scale.y*this.getLocalBounds().height}set height(t){const e=this.getLocalBounds().height;e!==0?this.scale.y=t/e:this.scale.y=1,this._height=t}};let Ii=Ul;Ii.defaultSortableChildren=!1,Ii.prototype.containerUpdateTransform=Ii.prototype.updateTransform,Object.defineProperties(Re,{SORTABLE_CHILDREN:{get(){return Ii.defaultSortableChildren},set(t){ke("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Ii.defaultSortableChildren=t}}});class Wa{constructor(e,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=e.type}clone(){return new Wa(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Ri=new et,ig=class extends Ld{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Bl,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let t=0;t<this.drawCalls.length;t++)this.drawCalls[t].texArray.clear(),Xa.push(this.drawCalls[t]);this.drawCalls.length=0;for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e.reset(),ng.push(e)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(t,e=null,r=null,n=null){const i=new Wa(t,e,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(t,e=null){if(!this.graphicsData.length)return null;const r=new Wa(t,null,null,e),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let t=0;t<this.graphicsData.length;++t)this.graphicsData[t].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(t){const e=this.graphicsData;for(let r=0;r<e.length;++r){const n=e[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(t,Ri):Ri.copyFrom(t),n.shape.contains(Ri.x,Ri.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(Ri.x,Ri.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const t=this.uvs,e=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let l=this.shapeIndex;l<e.length;l++){this.shapeIndex++;const f=e[l],p=f.fillStyle,g=f.lineStyle;Dl[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(p.visible||g.visible)&&this.processHoles(f.holes);for(let d=0;d<2;d++){const m=d===0?p:g;if(!m.visible)continue;const _=m.texture.baseTexture,y=this.indices.length,b=this.points.length/2;_.wrapMode=rs.REPEAT,d===0?this.processFill(f):this.processLine(f);const x=this.points.length/2-b;x!==0&&(r&&!this._compareStyles(n,m)&&(r.end(y,b),r=null),r||(r=ng.pop()||new lI,r.begin(m,y,b),this.batches.push(r),n=m),this.addUvs(this.points,t,m.texture,b,x,m.matrix))}}const i=this.indices.length,a=this.points.length/2;if(r&&r.end(i,a),this.batches.length===0){this.batchable=!0;return}const u=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&u===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=u?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(t,e){return!(!t||!e||t.texture.baseTexture!==e.texture.baseTexture||t.color+t.alpha!==e.color+e.alpha||!!t.native!=!!e.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let t=0,e=this.graphicsData.length;t<e;t++){const r=this.graphicsData[t],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const t=this.batches;for(let e=0,r=t.length;e<r;e++){const n=t[e];for(let i=0;i<n.size;i++){const a=n.start+i;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const t=this.batches;for(let e=0;e<t.length;e++)if(t[e].style.native)return!1;return this.points.length<ig.BATCHABLE_SIZE*2}buildDrawCalls(){let t=++He._globalBatch;for(let g=0;g<this.drawCalls.length;g++)this.drawCalls[g].texArray.clear(),Xa.push(this.drawCalls[g]);this.drawCalls.length=0;const e=this.colors,r=this.textureIds;let n=Xa.pop();n||(n=new fl,n.texArray=new _l),n.texArray.count=0,n.start=0,n.size=0,n.type=nn.TRIANGLES;let i=0,a=null,u=0,l=!1,f=nn.TRIANGLES,p=0;this.drawCalls.push(n);for(let g=0;g<this.batches.length;g++){const c=this.batches[g],d=8,m=c.style,_=m.texture.baseTexture;l!==!!m.native&&(l=!!m.native,f=l?nn.LINES:nn.TRIANGLES,a=null,i=d,t++),a!==_&&(a=_,_._batchEnabled!==t&&(i===d&&(t++,i=0,n.size>0&&(n=Xa.pop(),n||(n=new fl,n.texArray=new _l),this.drawCalls.push(n)),n.start=p,n.size=0,n.texArray.count=0,n.type=f),_.touched=1,_._batchEnabled=t,_._batchLocation=i,_.wrapMode=rs.REPEAT,n.texArray.elements[n.texArray.count++]=_,i++)),n.size+=c.size,p+=c.size,u=_._batchLocation,this.addColors(e,m.color,m.alpha,c.attribSize,c.attribStart),this.addTextureIds(r,u,c.attribSize,c.attribStart)}He._globalBatch=t,this.packAttributes()}packAttributes(){const t=this.points,e=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(t.length*3*4),a=new Float32Array(i),u=new Uint32Array(i);let l=0;for(let f=0;f<t.length/2;f++)a[l++]=t[f*2],a[l++]=t[f*2+1],a[l++]=e[f*2],a[l++]=e[f*2+1],u[l++]=r[f],a[l++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(t){t.holes.length?Jp.triangulate(t,this):Dl[t.type].triangulate(t,this)}processLine(t){rg(t,this);for(let e=0;e<t.holes.length;e++)rg(t.holes[e],this)}processHoles(t){for(let e=0;e<t.length;e++){const r=t[e];Dl[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const t=this._bounds;t.clear(),t.addVertexData(this.points,0,this.points.length),t.pad(this.boundsPadding,this.boundsPadding)}transformPoints(t,e){for(let r=0;r<t.length/2;r++){const n=t[r*2],i=t[r*2+1];t[r*2]=e.a*n+e.c*i+e.tx,t[r*2+1]=e.b*n+e.d*i+e.ty}}addColors(t,e,r,n,i=0){const a=Ot.shared.setValue(e).toLittleEndianNumber(),u=Ot.shared.setValue(a).toPremultiplied(r);t.length=Math.max(t.length,i+n);for(let l=0;l<n;l++)t[i+l]=u}addTextureIds(t,e,r,n=0){t.length=Math.max(t.length,n+r);for(let i=0;i<r;i++)t[n+i]=e}addUvs(t,e,r,n,i,a=null){let u=0;const l=e.length,f=r.frame;for(;u<i;){let g=t[(n+u)*2],c=t[(n+u)*2+1];if(a){const d=a.a*g+a.c*c+a.tx;c=a.b*g+a.d*c+a.ty,g=d}u++,e.push(g/f.width,c/f.height)}const p=r.baseTexture;(f.width<p.width||f.height<p.height)&&this.adjustUvs(e,r,l,i)}adjustUvs(t,e,r,n){const i=e.baseTexture,a=1e-6,u=r+n*2,l=e.frame,f=l.width/i.width,p=l.height/i.height;let g=l.x/l.width,c=l.y/l.height,d=Math.floor(t[r]+a),m=Math.floor(t[r+1]+a);for(let _=r+2;_<u;_+=2)d=Math.min(d,Math.floor(t[_]+a)),m=Math.min(m,Math.floor(t[_+1]+a));g-=d,c-=m;for(let _=r;_<u;_+=2)t[_]=(t[_]+g)*f,t[_+1]=(t[_+1]+c)*p}};let sg=ig;sg.BATCHABLE_SIZE=100;class qa{constructor(){this.color=16777215,this.alpha=1,this.texture=Ue.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new qa;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e}reset(){this.color=16777215,this.alpha=1,this.texture=Ue.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class $l extends qa{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Un.BUTT,this.join=yr.MITER,this.miterLimit=10}clone(){const e=new $l;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e.width=this.width,e.alignment=this.alignment,e.native=this.native,e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Gl={},Ya=class extends Ii{constructor(t=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new qa,this._lineStyle=new $l,this._matrix=null,this._holeMode=!1,this.state=wa.for2d(),this._geometry=t||new sg,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ot(16777215),this.blendMode=de.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Ya(this._geometry)}set blendMode(t){this.state.blendMode=t}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(t){this._tintColor.setValue(t)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(t=null,e=0,r,n=.5,i=!1){return typeof t=="number"&&(t={width:t,color:e,alpha:r,alignment:n,native:i}),this.lineTextureStyle(t)}lineTextureStyle(t){const e={width:0,texture:Ue.WHITE,color:t!=null&&t.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Un.BUTT,join:yr.MITER,miterLimit:10};t=Object.assign(e,t),this.normalizeColor(t),this.currentPath&&this.startPoly();const r=t.width>0&&t.alpha>0;return r?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:r},t)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new gs,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new gs,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this}lineTo(t,e){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==t||i!==e)&&r.push(t,e),this}_initCurve(t=0,e=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[t,e]):this.moveTo(t,e)}quadraticCurveTo(t,e,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),kl.curveTo(t,e,r,n,i),this}bezierCurveTo(t,e,r,n,i,a){return this._initCurve(),Ll.curveTo(t,e,r,n,i,a,this.currentPath.points),this}arcTo(t,e,r,n,i){this._initCurve(t,e);const a=this.currentPath.points,u=eg.curveTo(t,e,r,n,i,a);if(u){const{cx:l,cy:f,radius:p,startAngle:g,endAngle:c,anticlockwise:d}=u;this.arc(l,f,p,g,c,d)}return this}arc(t,e,r,n,i,a=!1){if(n===i)return this;if(!a&&i<=n?i+=Aa:a&&n<=i&&(n+=Aa),i-n===0)return this;const l=t+Math.cos(n)*r,f=e+Math.sin(n)*r,p=this._geometry.closePointEps;let g=this.currentPath?this.currentPath.points:null;if(g){const c=Math.abs(g[g.length-2]-l),d=Math.abs(g[g.length-1]-f);c<p&&d<p||g.push(l,f)}else this.moveTo(l,f),g=this.currentPath.points;return eg.arc(l,f,t,e,r,n,i,a,g),this}beginFill(t=0,e){return this.beginTextureFill({texture:Ue.WHITE,color:t,alpha:e})}normalizeColor(t){const e=Ot.shared.setValue(t.color??0);t.color=e.toNumber(),t.alpha??(t.alpha=e.alpha)}beginTextureFill(t){const e={texture:Ue.WHITE,color:16777215,matrix:null};t=Object.assign(e,t),this.normalizeColor(t),this.currentPath&&this.startPoly();const r=t.alpha>0;return r?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:r},t)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(t,e,r,n){return this.drawShape(new Qe(t,e,r,n))}drawRoundedRect(t,e,r,n,i){return this.drawShape(new pl(t,e,r,n,i))}drawCircle(t,e,r){return this.drawShape(new dl(t,e,r))}drawEllipse(t,e,r,n){return this.drawShape(new IE(t,e,r,n))}drawPolygon(...t){let e,r=!0;const n=t[0];n.points?(r=n.closeStroke,e=n.points):Array.isArray(t[0])?e=t[0]:e=t;const i=new gs(e);return i.closeStroke=r,this.drawShape(i),this}drawShape(t){return this._holeMode?this._geometry.drawHole(t,this._matrix):this._geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const t=this._geometry.graphicsData;return t.length===1&&t[0].shape.type===Et.RECT&&!t[0].matrix&&!t[0].holes.length&&!(t[0].lineStyle.visible&&t[0].lineStyle.width)}_render(t){this.finishPoly();const e=this._geometry;e.updateBatches(),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))}_populateBatches(){const t=this._geometry,e=this.blendMode,r=t.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(t.points);for(let n=0;n<r;n++){const i=t.batches[n],a=i.style.color,u=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),l=new Float32Array(t.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(t.indicesUint16.buffer,i.start*2,i.size),p={vertexData:u,blendMode:e,indices:f,uvs:l,_batchRGB:Ot.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=p}}_renderBatched(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let e=0,r=this.batches.length;e<r;e++){const n=this.batches[e];n.worldAlpha=this.worldAlpha*n.alpha,t.plugins[this.pluginName].render(n)}}}_renderDirect(t){const e=this._resolveDirectShader(t),r=this._geometry,n=this.worldAlpha,i=e.uniforms,a=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Ot.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(let u=0,l=a.length;u<l;u++)this._renderDrawCallDirect(t,r.drawCalls[u])}_renderDrawCallDirect(t,e){const{texArray:r,type:n,size:i,start:a}=e,u=r.count;for(let l=0;l<u;l++)t.texture.bind(r.elements[l],l);t.geometry.draw(n,i,a)}_resolveDirectShader(t){let e=this.shader;const r=this.pluginName;if(!e){if(!Gl[r]){const{maxTextures:n}=t.plugins[r],i=new Int32Array(n);for(let l=0;l<n;l++)i[l]=l;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Dt,default:pr.from({uSamplers:i},!0)},u=t.plugins[r]._shader.program;Gl[r]=new vs(u,a)}e=Gl[r]}return e}_calculateBounds(){this.finishPoly();const t=this._geometry;if(!t.graphicsData.length)return;const{minX:e,minY:r,maxX:n,maxY:i}=t.bounds;this._bounds.addFrame(this.transform,e,r,n,i)}containsPoint(t){return this.worldTransform.applyInverse(t,Ya._TEMP_POINT),this._geometry.containsPoint(Ya._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e._tintRGB=Ot.shared.setValue(this._tintColor).multiply(e._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const t=this.transform._worldID;if(this._transformID===t)return;this._transformID=t;const e=this.transform.worldTransform,r=e.a,n=e.b,i=e.c,a=e.d,u=e.tx,l=e.ty,f=this._geometry.points,p=this.vertexData;let g=0;for(let c=0;c<f.length;c+=2){const d=f[c],m=f[c+1];p[g++]=r*d+i*m+u,p[g++]=a*m+n*d+l}}closePath(){const t=this.currentPath;return t&&(t.closeStroke=!0,this.finishPoly()),this}setMatrix(t){return this._matrix=t,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(t){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(t)}};let Hl=Ya;Hl.curves=Ei,Hl._TEMP_POINT=new et;var gI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},zl={},mI={get exports(){return zl},set exports(t){zl=t}};/*!
1937
+ `);return r.uniforms.vignetteColor=[0,0,0,1],r.uniforms.vignetteSize=.7,r.uniforms.vignetteStrength=.6,{nightVisionFilter:t,vignetteFilter:r}},Ep=re.forwardRef((t,e)=>{const r=W.useRef(null),n=W.useRef(null),{src:i,visible:a,disabled:u,transformation:{x:l,y:h,width:p,height:g,anchor:c,colorCorrection:d={},effect:m},pointerdown:_}=t,{blurRadius:y=0,vignette:b=0,noise:x=0}=d,{temperatureFilter:E,sharpnessFilter:w,hueFilter:I,blurFilter:O,adjustmentFilter:F,vignetteFilter:N,noiseFilter:L}=Bn(d),{nightVisionFilter:B}=sA();return re.useEffect(()=>(console.log("PixiImageSprite mounting"),()=>{console.log("PixiImageSprite unmounting")}),[]),console.log("imageRef",r.current,l,h,p,g),we.jsx(en,{...t,ref:e,children:we.jsx(ke.Container,{ref:n,children:we.jsx(ke.Sprite,{image:i,width:p,height:g,anchor:c,ref:r,alpha:a?1:0,x:l,y:h,...!u&&a&&{interactive:!0,pointerdown:_},filters:[E,w,I,F,...y>0?[O]:[],...m===xn.NightVision?[B]:[],...b>0?[N]:[],...x>0?[L]:[]]})})})});Ep.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const ka={build(t){const e=t.points;let r,n,i,a,u,l;if(t.type===Et.CIRC){const _=t.shape;r=_.x,n=_.y,u=l=_.radius,i=a=0}else if(t.type===Et.ELIP){const _=t.shape;r=_.x,n=_.y,u=_.width,l=_.height,i=a=0}else{const _=t.shape,y=_.width/2,b=_.height/2;r=_.x+y,n=_.y+b,u=l=Math.max(0,Math.min(_.radius,Math.min(y,b))),i=y-u,a=b-l}if(!(u>=0&&l>=0&&i>=0&&a>=0)){e.length=0;return}const h=Math.ceil(2.3*Math.sqrt(u+l)),p=h*8+(i?4:0)+(a?4:0);if(e.length=p,p===0)return;if(h===0){e.length=8,e[0]=e[6]=r+i,e[1]=e[3]=n+a,e[2]=e[4]=r-i,e[5]=e[7]=n-a;return}let g=0,c=h*4+(i?2:0)+2,d=c,m=p;{const _=i+u,y=a,b=r+_,x=r-_,E=n+y;if(e[g++]=b,e[g++]=E,e[--c]=E,e[--c]=x,a){const w=n-y;e[d++]=x,e[d++]=w,e[--m]=w,e[--m]=b}}for(let _=1;_<h;_++){const y=Math.PI/2*(_/h),b=i+Math.cos(y)*u,x=a+Math.sin(y)*l,E=r+b,w=r-b,I=n+x,O=n-x;e[g++]=E,e[g++]=I,e[--c]=I,e[--c]=w,e[d++]=w,e[d++]=O,e[--m]=O,e[--m]=E}{const _=i,y=a+l,b=r+_,x=r-_,E=n+y,w=n-y;e[g++]=b,e[g++]=E,e[--m]=w,e[--m]=b,i&&(e[g++]=x,e[g++]=E,e[--m]=w,e[--m]=x)}},triangulate(t,e){const r=t.points,n=e.points,i=e.indices;if(r.length===0)return;let a=n.length/2;const u=a;let l,h;if(t.type!==Et.RREC){const g=t.shape;l=g.x,h=g.y}else{const g=t.shape;l=g.x+g.width/2,h=g.y+g.height/2}const p=t.matrix;n.push(t.matrix?p.a*l+p.c*h+p.tx:l,t.matrix?p.b*l+p.d*h+p.ty:h),a++,n.push(r[0],r[1]);for(let g=2;g<r.length;g+=2)n.push(r[g],r[g+1]),i.push(a++,u,a);i.push(u+1,u,a)}};function Cp(t,e=!1){const r=t.length;if(r<6)return;let n=0;for(let i=0,a=t[r-2],u=t[r-1];i<r;i+=2){const l=t[i],h=t[i+1];n+=(l-a)*(h+u),a=l,u=h}if(!e&&n>0||e&&n<=0){const i=r/2;for(let a=i+i%2;a<r;a+=2){const u=r-a-2,l=r-a-1,h=a,p=a+1;[t[u],t[h]]=[t[h],t[u]],[t[l],t[p]]=[t[p],t[l]]}}}const Ip={build(t){t.points=t.shape.points.slice()},triangulate(t,e){let r=t.points;const n=t.holes,i=e.points,a=e.indices;if(r.length>=6){Cp(r,!1);const u=[];for(let p=0;p<n.length;p++){const g=n[p];Cp(g.points,!0),u.push(r.length/2),r=r.concat(g.points)}const l=Xx(r,u,2);if(!l)return;const h=i.length/2;for(let p=0;p<l.length;p+=3)a.push(l[p]+h),a.push(l[p+1]+h),a.push(l[p+2]+h);for(let p=0;p<r.length;p++)i.push(r[p])}}},aA={build(t){const e=t.shape,r=e.x,n=e.y,i=e.width,a=e.height,u=t.points;u.length=0,i>=0&&a>=0&&u.push(r,n,r+i,n,r+i,n+a,r,n+a)},triangulate(t,e){const r=t.points,n=e.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},oA={build(t){ka.build(t)},triangulate(t,e){ka.triangulate(t,e)}};var yr=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(yr||{}),Dn=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(Dn||{});const Ti={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(t,e=20){if(!this.adaptive||!t||isNaN(t))return e;let r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class Rp{static curveTo(e,r,n,i,a,u){const l=u[u.length-2],p=u[u.length-1]-r,g=l-e,c=i-r,d=n-e,m=Math.abs(p*d-g*c);if(m<1e-8||a===0)return(u[u.length-2]!==e||u[u.length-1]!==r)&&u.push(e,r),null;const _=p*p+g*g,y=c*c+d*d,b=p*c+g*d,x=a*Math.sqrt(_)/m,E=a*Math.sqrt(y)/m,w=x*b/_,I=E*b/y,O=x*d+E*g,F=x*c+E*p,N=g*(E+w),L=p*(E+w),B=d*(x+I),V=c*(x+I),Y=Math.atan2(L-F,N-O),ae=Math.atan2(V-F,B-O);return{cx:O+e,cy:F+r,radius:a,startAngle:Y,endAngle:ae,anticlockwise:g*c>d*p}}static arc(e,r,n,i,a,u,l,h,p){const g=l-u,c=Ti._segmentsCount(Math.abs(g)*a,Math.ceil(Math.abs(g)/ma)*40),d=g/(c*2),m=d*2,_=Math.cos(d),y=Math.sin(d),b=c-1,x=b%1/b;for(let E=0;E<=b;++E){const w=E+x*E,I=d+u+m*w,O=Math.cos(I),F=-Math.sin(I);p.push((_*O+y*F)*a+n,(_*-F+y*O)*a+i)}}}class uA{constructor(){this.reset()}begin(e,r,n){this.reset(),this.style=e,this.start=r,this.attribStart=n}end(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Rl{static curveLength(e,r,n,i,a,u,l,h){let g=0,c=0,d=0,m=0,_=0,y=0,b=0,x=0,E=0,w=0,I=0,O=e,F=r;for(let N=1;N<=10;++N)c=N/10,d=c*c,m=d*c,_=1-c,y=_*_,b=y*_,x=b*e+3*y*c*n+3*_*d*a+m*l,E=b*r+3*y*c*i+3*_*d*u+m*h,w=O-x,I=F-E,O=x,F=E,g+=Math.sqrt(w*w+I*I);return g}static curveTo(e,r,n,i,a,u,l){const h=l[l.length-2],p=l[l.length-1];l.length-=2;const g=Ti._segmentsCount(Rl.curveLength(h,p,e,r,n,i,a,u));let c=0,d=0,m=0,_=0,y=0;l.push(h,p);for(let b=1,x=0;b<=g;++b)x=b/g,c=1-x,d=c*c,m=d*c,_=x*x,y=_*x,l.push(m*h+3*d*x*e+3*c*_*n+y*a,m*p+3*d*x*r+3*c*_*i+y*u)}}function Pp(t,e,r,n,i,a,u,l){const h=t-r*i,p=e-n*i,g=t+r*a,c=e+n*a;let d,m;u?(d=n,m=-r):(d=-n,m=r);const _=h+d,y=p+m,b=g+d,x=c+m;return l.push(_,y,b,x),2}function Un(t,e,r,n,i,a,u,l){const h=r-t,p=n-e;let g=Math.atan2(h,p),c=Math.atan2(i-t,a-e);l&&g<c?g+=Math.PI*2:!l&&g>c&&(c+=Math.PI*2);let d=g;const m=c-g,_=Math.abs(m),y=Math.sqrt(h*h+p*p),b=(15*_*Math.sqrt(y)/Math.PI>>0)+1,x=m/b;if(d+=x,l){u.push(t,e,r,n);for(let E=1,w=d;E<b;E++,w+=x)u.push(t,e,t+Math.sin(w)*y,e+Math.cos(w)*y);u.push(t,e,i,a)}else{u.push(r,n,t,e);for(let E=1,w=d;E<b;E++,w+=x)u.push(t+Math.sin(w)*y,e+Math.cos(w)*y,t,e);u.push(i,a,t,e)}return b*2}function lA(t,e){const r=t.shape;let n=t.points||r.points.slice();const i=e.closePointEps;if(n.length===0)return;const a=t.lineStyle,u=new Je(n[0],n[1]),l=new Je(n[n.length-2],n[n.length-1]),h=r.type!==Et.POLY||r.closeStroke,p=Math.abs(u.x-l.x)<i&&Math.abs(u.y-l.y)<i;if(h){n=n.slice(),p&&(n.pop(),n.pop(),l.set(n[n.length-2],n[n.length-1]));const H=(u.x+l.x)*.5,J=(l.y+u.y)*.5;n.unshift(H,J),n.push(H,J)}const g=e.points,c=n.length/2;let d=n.length;const m=g.length/2,_=a.width/2,y=_*_,b=a.miterLimit*a.miterLimit;let x=n[0],E=n[1],w=n[2],I=n[3],O=0,F=0,N=-(E-I),L=x-w,B=0,V=0,Y=Math.sqrt(N*N+L*L);N/=Y,L/=Y,N*=_,L*=_;const ae=a.alignment,j=(1-ae)*2,G=ae*2;h||(a.cap===Dn.ROUND?d+=Un(x-N*(j-G)*.5,E-L*(j-G)*.5,x-N*j,E-L*j,x+N*G,E+L*G,g,!0)+2:a.cap===Dn.SQUARE&&(d+=Pp(x,E,N,L,j,G,!0,g))),g.push(x-N*j,E-L*j,x+N*G,E+L*G);for(let H=1;H<c-1;++H){x=n[(H-1)*2],E=n[(H-1)*2+1],w=n[H*2],I=n[H*2+1],O=n[(H+1)*2],F=n[(H+1)*2+1],N=-(E-I),L=x-w,Y=Math.sqrt(N*N+L*L),N/=Y,L/=Y,N*=_,L*=_,B=-(I-F),V=w-O,Y=Math.sqrt(B*B+V*V),B/=Y,V/=Y,B*=_,V*=_;const J=w-x,ge=E-I,X=w-O,q=F-I,ue=J*X+ge*q,he=ge*X-q*J,me=he<0;if(Math.abs(he)<.001*Math.abs(ue)){g.push(w-N*j,I-L*j,w+N*G,I+L*G),ue>=0&&(a.join===yr.ROUND?d+=Un(w,I,w-N*j,I-L*j,w-B*j,I-V*j,g,!1)+4:d+=2,g.push(w-B*G,I-V*G,w+B*j,I+V*j));continue}const pe=(-N+x)*(-L+I)-(-N+w)*(-L+E),Pe=(-B+O)*(-V+I)-(-B+w)*(-V+F),$e=(J*Pe-X*pe)/he,je=(q*pe-ge*Pe)/he,Ze=($e-w)*($e-w)+(je-I)*(je-I),be=w+($e-w)*j,Ce=I+(je-I)*j,Ge=w-($e-w)*G,et=I-(je-I)*G,Ae=Math.min(J*J+ge*ge,X*X+q*q),_e=me?j:G,st=Ae+_e*_e*y,fe=Ze<=st;let Fe=a.join;if(Fe===yr.MITER&&Ze/y>b&&(Fe=yr.BEVEL),fe)switch(Fe){case yr.MITER:{g.push(be,Ce,Ge,et);break}case yr.BEVEL:{me?g.push(be,Ce,w+N*G,I+L*G,be,Ce,w+B*G,I+V*G):g.push(w-N*j,I-L*j,Ge,et,w-B*j,I-V*j,Ge,et),d+=2;break}case yr.ROUND:{me?(g.push(be,Ce,w+N*G,I+L*G),d+=Un(w,I,w+N*G,I+L*G,w+B*G,I+V*G,g,!0)+4,g.push(be,Ce,w+B*G,I+V*G)):(g.push(w-N*j,I-L*j,Ge,et),d+=Un(w,I,w-N*j,I-L*j,w-B*j,I-V*j,g,!1)+4,g.push(w-B*j,I-V*j,Ge,et));break}}else{switch(g.push(w-N*j,I-L*j,w+N*G,I+L*G),Fe){case yr.MITER:{me?g.push(Ge,et,Ge,et):g.push(be,Ce,be,Ce),d+=2;break}case yr.ROUND:{me?d+=Un(w,I,w+N*G,I+L*G,w+B*G,I+V*G,g,!0)+2:d+=Un(w,I,w-N*j,I-L*j,w-B*j,I-V*j,g,!1)+2;break}}g.push(w-B*j,I-V*j,w+B*G,I+V*G),d+=2}}x=n[(c-2)*2],E=n[(c-2)*2+1],w=n[(c-1)*2],I=n[(c-1)*2+1],N=-(E-I),L=x-w,Y=Math.sqrt(N*N+L*L),N/=Y,L/=Y,N*=_,L*=_,g.push(w-N*j,I-L*j,w+N*G,I+L*G),h||(a.cap===Dn.ROUND?d+=Un(w-N*(j-G)*.5,I-L*(j-G)*.5,w-N*j,I-L*j,w+N*G,I+L*G,g,!1)+2:a.cap===Dn.SQUARE&&(d+=Pp(w,I,N,L,j,G,!1,g)));const se=e.indices,ie=Ti.epsilon*Ti.epsilon;for(let H=m;H<d+m-2;++H)x=g[H*2],E=g[H*2+1],w=g[(H+1)*2],I=g[(H+1)*2+1],O=g[(H+2)*2],F=g[(H+2)*2+1],!(Math.abs(x*(I-F)+w*(F-E)+O*(E-I))<ie)&&se.push(H,H+1,H+2)}function cA(t,e){let r=0;const n=t.shape,i=t.points||n.points,a=n.type!==Et.POLY||n.closeStroke;if(i.length===0)return;const u=e.points,l=e.indices,h=i.length/2,p=u.length/2;let g=p;for(u.push(i[0],i[1]),r=1;r<h;r++)u.push(i[r*2],i[r*2+1]),l.push(g,g+1),g++;a&&l.push(g,p)}function Mp(t,e){t.lineStyle.native?cA(t,e):lA(t,e)}class Pl{static curveLength(e,r,n,i,a,u){const l=e-2*n+a,h=r-2*i+u,p=2*n-2*e,g=2*i-2*r,c=4*(l*l+h*h),d=4*(l*p+h*g),m=p*p+g*g,_=2*Math.sqrt(c+d+m),y=Math.sqrt(c),b=2*c*y,x=2*Math.sqrt(m),E=d/y;return(b*_+y*d*(_-x)+(4*m*c-d*d)*Math.log((2*y+E+_)/(E+x)))/(4*b)}static curveTo(e,r,n,i,a){const u=a[a.length-2],l=a[a.length-1],h=Ti._segmentsCount(Pl.curveLength(u,l,e,r,n,i));let p=0,g=0;for(let c=1;c<=h;++c){const d=c/h;p=u+(e-u)*d,g=l+(r-l)*d,a.push(p+(e+(n-e)*d-p)*d,g+(r+(i-r)*d-g)*d)}}}const Ml={[Et.POLY]:Ip,[Et.CIRC]:ka,[Et.ELIP]:ka,[Et.RECT]:aA,[Et.RREC]:oA},Op=[],Ba=[];class Ol{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?Ke.EMPTY:(e=e||new Ke(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,r){const{a:n,b:i,c:a,d:u,tx:l,ty:h}=e,p=n*r.x+a*r.y+l,g=i*r.x+u*r.y+h;this.minX=Math.min(this.minX,p),this.maxX=Math.max(this.maxX,p),this.minY=Math.min(this.minY,g),this.maxY=Math.max(this.maxY,g)}addQuad(e){let r=this.minX,n=this.minY,i=this.maxX,a=this.maxY,u=e[0],l=e[1];r=u<r?u:r,n=l<n?l:n,i=u>i?u:i,a=l>a?l:a,u=e[2],l=e[3],r=u<r?u:r,n=l<n?l:n,i=u>i?u:i,a=l>a?l:a,u=e[4],l=e[5],r=u<r?u:r,n=l<n?l:n,i=u>i?u:i,a=l>a?l:a,u=e[6],l=e[7],r=u<r?u:r,n=l<n?l:n,i=u>i?u:i,a=l>a?l:a,this.minX=r,this.minY=n,this.maxX=i,this.maxY=a}addFrame(e,r,n,i,a){this.addFrameMatrix(e.worldTransform,r,n,i,a)}addFrameMatrix(e,r,n,i,a){const u=e.a,l=e.b,h=e.c,p=e.d,g=e.tx,c=e.ty;let d=this.minX,m=this.minY,_=this.maxX,y=this.maxY,b=u*r+h*n+g,x=l*r+p*n+c;d=b<d?b:d,m=x<m?x:m,_=b>_?b:_,y=x>y?x:y,b=u*i+h*n+g,x=l*i+p*n+c,d=b<d?b:d,m=x<m?x:m,_=b>_?b:_,y=x>y?x:y,b=u*r+h*a+g,x=l*r+p*a+c,d=b<d?b:d,m=x<m?x:m,_=b>_?b:_,y=x>y?x:y,b=u*i+h*a+g,x=l*i+p*a+c,d=b<d?b:d,m=x<m?x:m,_=b>_?b:_,y=x>y?x:y,this.minX=d,this.minY=m,this.maxX=_,this.maxY=y}addVertexData(e,r,n){let i=this.minX,a=this.minY,u=this.maxX,l=this.maxY;for(let h=r;h<n;h+=2){const p=e[h],g=e[h+1];i=p<i?p:i,a=g<a?g:a,u=p>u?p:u,l=g>l?g:l}this.minX=i,this.minY=a,this.maxX=u,this.maxY=l}addVertices(e,r,n,i){this.addVerticesMatrix(e.worldTransform,r,n,i)}addVerticesMatrix(e,r,n,i,a=0,u=a){const l=e.a,h=e.b,p=e.c,g=e.d,c=e.tx,d=e.ty;let m=this.minX,_=this.minY,y=this.maxX,b=this.maxY;for(let x=n;x<i;x+=2){const E=r[x],w=r[x+1],I=l*E+p*w+c,O=g*w+h*E+d;m=Math.min(m,I-a),y=Math.max(y,I+a),_=Math.min(_,O-u),b=Math.max(b,O+u)}this.minX=m,this.minY=_,this.maxX=y,this.maxY=b}addBounds(e){const r=this.minX,n=this.minY,i=this.maxX,a=this.maxY;this.minX=e.minX<r?e.minX:r,this.minY=e.minY<n?e.minY:n,this.maxX=e.maxX>i?e.maxX:i,this.maxY=e.maxY>a?e.maxY:a}addBoundsMask(e,r){const n=e.minX>r.minX?e.minX:r.minX,i=e.minY>r.minY?e.minY:r.minY,a=e.maxX<r.maxX?e.maxX:r.maxX,u=e.maxY<r.maxY?e.maxY:r.maxY;if(n<=a&&i<=u){const l=this.minX,h=this.minY,p=this.maxX,g=this.maxY;this.minX=n<l?n:l,this.minY=i<h?i:h,this.maxX=a>p?a:p,this.maxY=u>g?u:g}}addBoundsMatrix(e,r){this.addFrameMatrix(r,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,r){const n=e.minX>r.x?e.minX:r.x,i=e.minY>r.y?e.minY:r.y,a=e.maxX<r.x+r.width?e.maxX:r.x+r.width,u=e.maxY<r.y+r.height?e.maxY:r.y+r.height;if(n<=a&&i<=u){const l=this.minX,h=this.minY,p=this.maxX,g=this.maxY;this.minX=n<l?n:l,this.minY=i<h?i:h,this.maxX=a>p?a:p,this.maxY=u>g?u:g}}pad(e=0,r=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=r,this.maxY+=r)}addFramePad(e,r,n,i,a,u){e-=a,r-=u,n+=a,i+=u,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class wi extends qs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new cl,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ol,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const r=Object.keys(e);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(wi.prototype,i,Object.getOwnPropertyDescriptor(e,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(e,r){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new Ke),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new Ke),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Ol);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const u=this.getBounds(!1,e);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-a,u}toGlobal(e,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,r)}toLocal(e,r,n,i){return r&&(e=r.toGlobal(e,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,n)}setParent(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e}removeFromParent(){var e;(e=this.parent)==null||e.removeChild(this)}setTransform(e=0,r=0,n=1,i=1,a=0,u=0,l=0,h=0,p=0){return this.position.x=e,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=a,this.skew.x=u,this.skew.y=l,this.pivot.x=h,this.pivot.y=p,this}destroy(e){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new hA),this.tempDisplayObjectParent}enableTempParent(){const e=this.parent;return this.parent=this._tempDisplayObjectParent,e}disableTempParent(e){this.parent=e}get x(){return this.position.x}set x(e){this.transform.position.x=e}get y(){return this.position.y}set y(e){this.transform.position.y=e}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(e){this.transform.position.copyFrom(e)}get scale(){return this.transform.scale}set scale(e){this.transform.scale.copyFrom(e)}get pivot(){return this.transform.pivot}set pivot(e){this.transform.pivot.copyFrom(e)}get skew(){return this.transform.skew}set skew(e){this.transform.skew.copyFrom(e)}get rotation(){return this.transform.rotation}set rotation(e){this.transform.rotation=e}get angle(){return this.transform.rotation*ET}set angle(e){this.transform.rotation=e*hs}get zIndex(){return this._zIndex}set zIndex(e){this._zIndex=e,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}get mask(){return this._mask}set mask(e){if(this._mask!==e){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=e,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class hA extends wi{constructor(){super(...arguments),this.sortDirty=null}}wi.prototype.displayObjectUpdateTransform=wi.prototype.updateTransform;const fA=new Lt;function dA(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const Fl=class extends wi{constructor(){super(),this.children=[],this.sortableChildren=Fl.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(t){}addChild(...t){if(t.length>1)for(let e=0;e<t.length;e++)this.addChild(t[e]);else{const e=t[0];e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.push(e),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this)}return t[0]}addChildAt(t,e){if(e<0||e>this.children.length)throw new Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${this.children.length}`);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t}swapChildren(t,e){if(t===e)return;const r=this.getChildIndex(t),n=this.getChildIndex(e);this.children[r]=e,this.children[n]=t,this.onChildrenChange(r<n?r:n)}getChildIndex(t){const e=this.children.indexOf(t);if(e===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return e}setChildIndex(t,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(t);fa(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)}getChildAt(t){if(t<0||t>=this.children.length)throw new Error(`getChildAt: Index (${t}) does not exist.`);return this.children[t]}removeChild(...t){if(t.length>1)for(let e=0;e<t.length;e++)this.removeChild(t[e]);else{const e=t[0],r=this.children.indexOf(e);if(r===-1)return null;e.parent=null,e.transform._parentID=-1,fa(this.children,r,1),this._boundsID++,this.onChildrenChange(r),e.emit("removed",this),this.emit("childRemoved",e,this,r)}return t[0]}removeChildAt(t){const e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,fa(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e}removeChildren(t=0,e=this.children.length){const r=t,n=e,i=n-r;let a;if(i>0&&i<=n){a=this.children.splice(r,i);for(let u=0;u<a.length;++u)a[u].parent=null,a[u].transform&&(a[u].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(let u=0;u<a.length;++u)a[u].emit("removed",this),this.emit("childRemoved",a[u],this,u);return a}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let t=!1;for(let e=0,r=this.children.length;e<r;++e){const n=this.children[e];n._lastSortedIndex=e,!t&&n.zIndex!==0&&(t=!0)}t&&this.children.length>1&&this.children.sort(dA),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let t=0,e=this.children.length;t<e;++t){const r=this.children[t];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let t=0;t<this.children.length;t++){const e=this.children[t];if(!(!e.visible||!e.renderable))if(e.calculateBounds(),e._mask){const r=e._mask.isMaskData?e._mask.maskObject:e._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(e._bounds,r._bounds)):this._bounds.addBounds(e._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(t,e=!1){const r=super.getLocalBounds(t);if(!e)for(let n=0,i=this.children.length;n<i;++n){const a=this.children[n];a.visible&&a.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(t){const e=t.renderTexture.sourceFrame;if(!(e.width>0&&e.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Fl.prototype._render&&(r=this.getBounds(!0));const i=t.projection.transform;if(i&&(n?(n=fA.copyFrom(n),n.prepend(i)):n=i),r&&e.intersects(r,n))this._render(t);else if(this.cullArea)return;for(let a=0,u=this.children.length;a<u;++a){const l=this.children[a],h=l.cullable;l.cullable=h||!this.cullArea,l.render(t),l.cullable=h}}render(t){var e;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(e=this.filters)!=null&&e.length)this.renderAdvanced(t);else if(this.cullable)this._renderWithCulling(t);else{this._render(t);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(t)}}renderAdvanced(t){var i,a,u;const e=this.filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let l=0;l<e.length;l++)e[l].enabled&&this._enabledFilters.push(e[l])}const n=e&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==_t.NONE));if(n&&t.batch.flush(),e&&((a=this._enabledFilters)!=null&&a.length)&&t.filter.push(this,this._enabledFilters),r&&t.mask.push(this,this._mask),this.cullable)this._renderWithCulling(t);else{this._render(t);for(let l=0,h=this.children.length;l<h;++l)this.children[l].render(t)}n&&t.batch.flush(),r&&t.mask.pop(this),e&&((u=this._enabledFilters)!=null&&u.length)&&t.filter.pop()}_render(t){}destroy(t){super.destroy(),this.sortDirty=!1;const e=typeof t=="boolean"?t:t==null?void 0:t.children,r=this.removeChildren(0,this.children.length);if(e)for(let n=0;n<r.length;++n)r[n].destroy(t)}get width(){return this.scale.x*this.getLocalBounds().width}set width(t){const e=this.getLocalBounds().width;e!==0?this.scale.x=t/e:this.scale.x=1,this._width=t}get height(){return this.scale.y*this.getLocalBounds().height}set height(t){const e=this.getLocalBounds().height;e!==0?this.scale.y=t/e:this.scale.y=1,this._height=t}};let Si=Fl;Si.defaultSortableChildren=!1,Si.prototype.containerUpdateTransform=Si.prototype.updateTransform,Object.defineProperties(Ee,{SORTABLE_CHILDREN:{get(){return Si.defaultSortableChildren},set(t){Le("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Si.defaultSortableChildren=t}}});class Da{constructor(e,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=e.type}clone(){return new Da(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Ai=new Je,Fp=class extends cd{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Ol,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let t=0;t<this.drawCalls.length;t++)this.drawCalls[t].texArray.clear(),Ba.push(this.drawCalls[t]);this.drawCalls.length=0;for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e.reset(),Op.push(e)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(t,e=null,r=null,n=null){const i=new Da(t,e,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(t,e=null){if(!this.graphicsData.length)return null;const r=new Da(t,null,null,e),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let t=0;t<this.graphicsData.length;++t)this.graphicsData[t].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(t){const e=this.graphicsData;for(let r=0;r<e.length;++r){const n=e[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(t,Ai):Ai.copyFrom(t),n.shape.contains(Ai.x,Ai.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(Ai.x,Ai.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const t=this.uvs,e=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let l=this.shapeIndex;l<e.length;l++){this.shapeIndex++;const h=e[l],p=h.fillStyle,g=h.lineStyle;Ml[h.type].build(h),h.matrix&&this.transformPoints(h.points,h.matrix),(p.visible||g.visible)&&this.processHoles(h.holes);for(let d=0;d<2;d++){const m=d===0?p:g;if(!m.visible)continue;const _=m.texture.baseTexture,y=this.indices.length,b=this.points.length/2;_.wrapMode=Ji.REPEAT,d===0?this.processFill(h):this.processLine(h);const x=this.points.length/2-b;x!==0&&(r&&!this._compareStyles(n,m)&&(r.end(y,b),r=null),r||(r=Op.pop()||new uA,r.begin(m,y,b),this.batches.push(r),n=m),this.addUvs(this.points,t,m.texture,b,x,m.matrix))}}const i=this.indices.length,a=this.points.length/2;if(r&&r.end(i,a),this.batches.length===0){this.batchable=!0;return}const u=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&u===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=u?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(t,e){return!(!t||!e||t.texture.baseTexture!==e.texture.baseTexture||t.color+t.alpha!==e.color+e.alpha||!!t.native!=!!e.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let t=0,e=this.graphicsData.length;t<e;t++){const r=this.graphicsData[t],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const t=this.batches;for(let e=0,r=t.length;e<r;e++){const n=t[e];for(let i=0;i<n.size;i++){const a=n.start+i;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const t=this.batches;for(let e=0;e<t.length;e++)if(t[e].style.native)return!1;return this.points.length<Fp.BATCHABLE_SIZE*2}buildDrawCalls(){let t=++Ue._globalBatch;for(let g=0;g<this.drawCalls.length;g++)this.drawCalls[g].texArray.clear(),Ba.push(this.drawCalls[g]);this.drawCalls.length=0;const e=this.colors,r=this.textureIds;let n=Ba.pop();n||(n=new al,n.texArray=new fl),n.texArray.count=0,n.start=0,n.size=0,n.type=tn.TRIANGLES;let i=0,a=null,u=0,l=!1,h=tn.TRIANGLES,p=0;this.drawCalls.push(n);for(let g=0;g<this.batches.length;g++){const c=this.batches[g],d=8,m=c.style,_=m.texture.baseTexture;l!==!!m.native&&(l=!!m.native,h=l?tn.LINES:tn.TRIANGLES,a=null,i=d,t++),a!==_&&(a=_,_._batchEnabled!==t&&(i===d&&(t++,i=0,n.size>0&&(n=Ba.pop(),n||(n=new al,n.texArray=new fl),this.drawCalls.push(n)),n.start=p,n.size=0,n.texArray.count=0,n.type=h),_.touched=1,_._batchEnabled=t,_._batchLocation=i,_.wrapMode=Ji.REPEAT,n.texArray.elements[n.texArray.count++]=_,i++)),n.size+=c.size,p+=c.size,u=_._batchLocation,this.addColors(e,m.color,m.alpha,c.attribSize,c.attribStart),this.addTextureIds(r,u,c.attribSize,c.attribStart)}Ue._globalBatch=t,this.packAttributes()}packAttributes(){const t=this.points,e=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(t.length*3*4),a=new Float32Array(i),u=new Uint32Array(i);let l=0;for(let h=0;h<t.length/2;h++)a[l++]=t[h*2],a[l++]=t[h*2+1],a[l++]=e[h*2],a[l++]=e[h*2+1],u[l++]=r[h],a[l++]=n[h];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(t){t.holes.length?Ip.triangulate(t,this):Ml[t.type].triangulate(t,this)}processLine(t){Mp(t,this);for(let e=0;e<t.holes.length;e++)Mp(t.holes[e],this)}processHoles(t){for(let e=0;e<t.length;e++){const r=t[e];Ml[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const t=this._bounds;t.clear(),t.addVertexData(this.points,0,this.points.length),t.pad(this.boundsPadding,this.boundsPadding)}transformPoints(t,e){for(let r=0;r<t.length/2;r++){const n=t[r*2],i=t[r*2+1];t[r*2]=e.a*n+e.c*i+e.tx,t[r*2+1]=e.b*n+e.d*i+e.ty}}addColors(t,e,r,n,i=0){const a=Mt.shared.setValue(e).toLittleEndianNumber(),u=Mt.shared.setValue(a).toPremultiplied(r);t.length=Math.max(t.length,i+n);for(let l=0;l<n;l++)t[i+l]=u}addTextureIds(t,e,r,n=0){t.length=Math.max(t.length,n+r);for(let i=0;i<r;i++)t[n+i]=e}addUvs(t,e,r,n,i,a=null){let u=0;const l=e.length,h=r.frame;for(;u<i;){let g=t[(n+u)*2],c=t[(n+u)*2+1];if(a){const d=a.a*g+a.c*c+a.tx;c=a.b*g+a.d*c+a.ty,g=d}u++,e.push(g/h.width,c/h.height)}const p=r.baseTexture;(h.width<p.width||h.height<p.height)&&this.adjustUvs(e,r,l,i)}adjustUvs(t,e,r,n){const i=e.baseTexture,a=1e-6,u=r+n*2,l=e.frame,h=l.width/i.width,p=l.height/i.height;let g=l.x/l.width,c=l.y/l.height,d=Math.floor(t[r]+a),m=Math.floor(t[r+1]+a);for(let _=r+2;_<u;_+=2)d=Math.min(d,Math.floor(t[_]+a)),m=Math.min(m,Math.floor(t[_+1]+a));g-=d,c-=m;for(let _=r;_<u;_+=2)t[_]=(t[_]+g)*h,t[_+1]=(t[_+1]+c)*p}};let Np=Fp;Np.BATCHABLE_SIZE=100;class Ua{constructor(){this.color=16777215,this.alpha=1,this.texture=Be.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new Ua;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e}reset(){this.color=16777215,this.alpha=1,this.texture=Be.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Nl extends Ua{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Dn.BUTT,this.join=yr.MITER,this.miterLimit=10}clone(){const e=new Nl;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e.width=this.width,e.alignment=this.alignment,e.native=this.native,e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Ll={},$a=class extends Si{constructor(t=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Ua,this._lineStyle=new Nl,this._matrix=null,this._holeMode=!1,this.state=pa.for2d(),this._geometry=t||new Np,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Mt(16777215),this.blendMode=de.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new $a(this._geometry)}set blendMode(t){this.state.blendMode=t}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(t){this._tintColor.setValue(t)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(t=null,e=0,r,n=.5,i=!1){return typeof t=="number"&&(t={width:t,color:e,alpha:r,alignment:n,native:i}),this.lineTextureStyle(t)}lineTextureStyle(t){const e={width:0,texture:Be.WHITE,color:t!=null&&t.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Dn.BUTT,join:yr.MITER,miterLimit:10};t=Object.assign(e,t),this.normalizeColor(t),this.currentPath&&this.startPoly();const r=t.width>0&&t.alpha>0;return r?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:r},t)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new fs,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new fs,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this}lineTo(t,e){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==t||i!==e)&&r.push(t,e),this}_initCurve(t=0,e=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[t,e]):this.moveTo(t,e)}quadraticCurveTo(t,e,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),Pl.curveTo(t,e,r,n,i),this}bezierCurveTo(t,e,r,n,i,a){return this._initCurve(),Rl.curveTo(t,e,r,n,i,a,this.currentPath.points),this}arcTo(t,e,r,n,i){this._initCurve(t,e);const a=this.currentPath.points,u=Rp.curveTo(t,e,r,n,i,a);if(u){const{cx:l,cy:h,radius:p,startAngle:g,endAngle:c,anticlockwise:d}=u;this.arc(l,h,p,g,c,d)}return this}arc(t,e,r,n,i,a=!1){if(n===i)return this;if(!a&&i<=n?i+=ma:a&&n<=i&&(n+=ma),i-n===0)return this;const l=t+Math.cos(n)*r,h=e+Math.sin(n)*r,p=this._geometry.closePointEps;let g=this.currentPath?this.currentPath.points:null;if(g){const c=Math.abs(g[g.length-2]-l),d=Math.abs(g[g.length-1]-h);c<p&&d<p||g.push(l,h)}else this.moveTo(l,h),g=this.currentPath.points;return Rp.arc(l,h,t,e,r,n,i,a,g),this}beginFill(t=0,e){return this.beginTextureFill({texture:Be.WHITE,color:t,alpha:e})}normalizeColor(t){const e=Mt.shared.setValue(t.color??0);t.color=e.toNumber(),t.alpha??(t.alpha=e.alpha)}beginTextureFill(t){const e={texture:Be.WHITE,color:16777215,matrix:null};t=Object.assign(e,t),this.normalizeColor(t),this.currentPath&&this.startPoly();const r=t.alpha>0;return r?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:r},t)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(t,e,r,n){return this.drawShape(new Ke(t,e,r,n))}drawRoundedRect(t,e,r,n,i){return this.drawShape(new ul(t,e,r,n,i))}drawCircle(t,e,r){return this.drawShape(new ol(t,e,r))}drawEllipse(t,e,r,n){return this.drawShape(new CT(t,e,r,n))}drawPolygon(...t){let e,r=!0;const n=t[0];n.points?(r=n.closeStroke,e=n.points):Array.isArray(t[0])?e=t[0]:e=t;const i=new fs(e);return i.closeStroke=r,this.drawShape(i),this}drawShape(t){return this._holeMode?this._geometry.drawHole(t,this._matrix):this._geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const t=this._geometry.graphicsData;return t.length===1&&t[0].shape.type===Et.RECT&&!t[0].matrix&&!t[0].holes.length&&!(t[0].lineStyle.visible&&t[0].lineStyle.width)}_render(t){this.finishPoly();const e=this._geometry;e.updateBatches(),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))}_populateBatches(){const t=this._geometry,e=this.blendMode,r=t.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(t.points);for(let n=0;n<r;n++){const i=t.batches[n],a=i.style.color,u=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),l=new Float32Array(t.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),h=new Uint16Array(t.indicesUint16.buffer,i.start*2,i.size),p={vertexData:u,blendMode:e,indices:h,uvs:l,_batchRGB:Mt.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=p}}_renderBatched(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let e=0,r=this.batches.length;e<r;e++){const n=this.batches[e];n.worldAlpha=this.worldAlpha*n.alpha,t.plugins[this.pluginName].render(n)}}}_renderDirect(t){const e=this._resolveDirectShader(t),r=this._geometry,n=this.worldAlpha,i=e.uniforms,a=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Mt.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(let u=0,l=a.length;u<l;u++)this._renderDrawCallDirect(t,r.drawCalls[u])}_renderDrawCallDirect(t,e){const{texArray:r,type:n,size:i,start:a}=e,u=r.count;for(let l=0;l<u;l++)t.texture.bind(r.elements[l],l);t.geometry.draw(n,i,a)}_resolveDirectShader(t){let e=this.shader;const r=this.pluginName;if(!e){if(!Ll[r]){const{maxTextures:n}=t.plugins[r],i=new Int32Array(n);for(let l=0;l<n;l++)i[l]=l;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Lt,default:pr.from({uSamplers:i},!0)},u=t.plugins[r]._shader.program;Ll[r]=new ps(u,a)}e=Ll[r]}return e}_calculateBounds(){this.finishPoly();const t=this._geometry;if(!t.graphicsData.length)return;const{minX:e,minY:r,maxX:n,maxY:i}=t.bounds;this._bounds.addFrame(this.transform,e,r,n,i)}containsPoint(t){return this.worldTransform.applyInverse(t,$a._TEMP_POINT),this._geometry.containsPoint($a._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e._tintRGB=Mt.shared.setValue(this._tintColor).multiply(e._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const t=this.transform._worldID;if(this._transformID===t)return;this._transformID=t;const e=this.transform.worldTransform,r=e.a,n=e.b,i=e.c,a=e.d,u=e.tx,l=e.ty,h=this._geometry.points,p=this.vertexData;let g=0;for(let c=0;c<h.length;c+=2){const d=h[c],m=h[c+1];p[g++]=r*d+i*m+u,p[g++]=a*m+n*d+l}}closePath(){const t=this.currentPath;return t&&(t.closeStroke=!0,this.finishPoly()),this}setMatrix(t){return this._matrix=t,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(t){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(t)}};let kl=$a;kl.curves=Ti,kl._TEMP_POINT=new Je;var pA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Bl={},gA={get exports(){return Bl},set exports(t){Bl=t}};/*!
1954
1938
  * d-path-parser - v1.0.0
1955
1939
  * by Massimo Artizzu (MaxArt2501)
1956
1940
  *
@@ -1958,10 +1942,10 @@ void main() {
1958
1942
  *
1959
1943
  * Licensed under the MIT License
1960
1944
  * See LICENSE for details
1961
- */(function(t,e){(function(r,n){t.exports=n()})(gI,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},a={number:function(y){return+m("number",y)},"coordinate pair":function(y){var b=m("number",y);if(b===null&&!y)return null;m("comma");var x=m("number",!0);return{x:+b,y:+x}},"arc definition":function(y){var b=a["coordinate pair"](y);if(!b&&!y)return null;m("comma");var x=+m("number",!0);m("comma",!0);var E=!!+m("flag",!0);m("comma");var w=!!+m("flag",!0);m("comma");var I=a["coordinate pair"](!0);return{radii:b,rotation:x,large:E,clockwise:w,end:I}}},u=0,l=[];u<n.length;){var f=m("command"),p=f.toUpperCase(),g=f!==p,c;switch(p){case"M":c=_("coordinate pair").map(function(y,b){return b===1&&(f=g?"l":"L"),d({end:y})});break;case"L":case"T":c=_("coordinate pair").map(function(y){return d({end:y})});break;case"C":if(c=_("coordinate pair"),c.length%3)throw Error("Expected coordinate pair triplet at position "+u);c=c.reduce(function(y,b,x){var E=x%3;if(!E)y.push(d({cp1:b}));else{var w=y[y.length-1];w[E===1?"cp2":"end"]=b}return y},[]);break;case"Q":case"S":if(c=_("coordinate pair"),c.length&1)throw Error("Expected coordinate pair couple at position "+u);c=c.reduce(function(y,b,x){var E=x&1;if(!E)y.push(d({cp:b}));else{var w=y[y.length-1];w.end=b}return y},[]);break;case"H":case"V":c=_("number").map(function(y){return d({value:y})});break;case"A":c=_("arc definition").map(d);break;case"Z":c=[{code:"Z"}];break}l.push.apply(l,c)}return l;function d(y){return y.code=f,y.relative=g,y}function m(y,b){i[y].lastIndex=u;var x=i[y].exec(n);if(!x||x.index!==u){if(!b)return null;throw Error("Expected "+y+" at position "+u)}return u=i[y].lastIndex,x[1]}function _(y){for(var b=[],x,E=!0;x=a[y](E);)b.push(x),E=!!m("comma");return b}}})})(mI);const vI=/^\s+/,_I=/\s+$/;function ne(t,e){if(t=t||"",e=e||{},t instanceof ne)return t;if(!(this instanceof ne))return new ne(t,e);var r=yI(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ne.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),e,r,n,i,a,u;return e=t.r/255,r=t.g/255,n=t.b/255,e<=.03928?i=e/12.92:i=Math.pow((e+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?u=n/12.92:u=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*u},setAlpha:function(t){return this._a=hg(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=og(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=og(this._r,this._g,this._b),e=Math.round(t.h*360),r=Math.round(t.s*100),n=Math.round(t.v*100);return this._a==1?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=ag(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ag(this._r,this._g,this._b),e=Math.round(t.h*360),r=Math.round(t.s*100),n=Math.round(t.l*100);return this._a==1?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return ug(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return wI(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(st(this._r,255)*100)+"%",g:Math.round(st(this._g,255)*100)+"%",b:Math.round(st(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%)":"rgba("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:LI[ug(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+lg(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=ne(t);r="#"+lg(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!e&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ne(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(CI,arguments)},brighten:function(){return this._applyModification(II,arguments)},darken:function(){return this._applyModification(RI,arguments)},desaturate:function(){return this._applyModification(SI,arguments)},saturate:function(){return this._applyModification(AI,arguments)},greyscale:function(){return this._applyModification(EI,arguments)},spin:function(){return this._applyModification(PI,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(FI,arguments)},complement:function(){return this._applyCombination(MI,arguments)},monochromatic:function(){return this._applyCombination(NI,arguments)},splitcomplement:function(){return this._applyCombination(OI,arguments)},triad:function(){return this._applyCombination(cg,[3])},tetrad:function(){return this._applyCombination(cg,[4])}},ne.fromRatio=function(t,e){if(typeof t=="object"){var r={};for(var n in t)t.hasOwnProperty(n)&&(n==="a"?r[n]=t[n]:r[n]=Ts(t[n]));t=r}return ne(t,e)};function yI(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,a=null,u=!1,l=!1;return typeof t=="string"&&(t=UI(t)),typeof t=="object"&&(zr(t.r)&&zr(t.g)&&zr(t.b)?(e=xI(t.r,t.g,t.b),u=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):zr(t.h)&&zr(t.s)&&zr(t.v)?(n=Ts(t.s),i=Ts(t.v),e=TI(t.h,n,i),u=!0,l="hsv"):zr(t.h)&&zr(t.s)&&zr(t.l)&&(n=Ts(t.s),a=Ts(t.l),e=bI(t.h,n,a),u=!0,l="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=hg(r),{ok:u,format:t.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function xI(t,e,r){return{r:st(t,255)*255,g:st(e,255)*255,b:st(r,255)*255}}function ag(t,e,r){t=st(t,255),e=st(e,255),r=st(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),a,u,l=(n+i)/2;if(n==i)a=u=0;else{var f=n-i;switch(u=l>.5?f/(2-n-i):f/(n+i),n){case t:a=(e-r)/f+(e<r?6:0);break;case e:a=(r-t)/f+2;break;case r:a=(t-e)/f+4;break}a/=6}return{h:a,s:u,l}}function bI(t,e,r){var n,i,a;t=st(t,360),e=st(e,100),r=st(r,100);function u(p,g,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?p+(g-p)*6*c:c<1/2?g:c<2/3?p+(g-p)*(2/3-c)*6:p}if(e===0)n=i=a=r;else{var l=r<.5?r*(1+e):r+e-r*e,f=2*r-l;n=u(f,l,t+1/3),i=u(f,l,t),a=u(f,l,t-1/3)}return{r:n*255,g:i*255,b:a*255}}function og(t,e,r){t=st(t,255),e=st(e,255),r=st(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),a,u,l=n,f=n-i;if(u=n===0?0:f/n,n==i)a=0;else{switch(n){case t:a=(e-r)/f+(e<r?6:0);break;case e:a=(r-t)/f+2;break;case r:a=(t-e)/f+4;break}a/=6}return{h:a,s:u,v:l}}function TI(t,e,r){t=st(t,360)*6,e=st(e,100),r=st(r,100);var n=Math.floor(t),i=t-n,a=r*(1-e),u=r*(1-i*e),l=r*(1-(1-i)*e),f=n%6,p=[r,u,a,a,l,r][f],g=[l,r,r,u,a,a][f],c=[a,a,l,r,r,u][f];return{r:p*255,g:g*255,b:c*255}}function ug(t,e,r,n){var i=[xr(Math.round(t).toString(16)),xr(Math.round(e).toString(16)),xr(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function wI(t,e,r,n,i){var a=[xr(Math.round(t).toString(16)),xr(Math.round(e).toString(16)),xr(Math.round(r).toString(16)),xr(fg(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function lg(t,e,r,n){var i=[xr(fg(n)),xr(Math.round(t).toString(16)),xr(Math.round(e).toString(16)),xr(Math.round(r).toString(16))];return i.join("")}ne.equals=function(t,e){return!t||!e?!1:ne(t).toRgbString()==ne(e).toRgbString()},ne.random=function(){return ne.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function SI(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.s-=e/100,r.s=Ka(r.s),ne(r)}function AI(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.s+=e/100,r.s=Ka(r.s),ne(r)}function EI(t){return ne(t).desaturate(100)}function CI(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.l+=e/100,r.l=Ka(r.l),ne(r)}function II(t,e){e=e===0?0:e||10;var r=ne(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),ne(r)}function RI(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.l-=e/100,r.l=Ka(r.l),ne(r)}function PI(t,e){var r=ne(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,ne(r)}function MI(t){var e=ne(t).toHsl();return e.h=(e.h+180)%360,ne(e)}function cg(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ne(t).toHsl(),n=[ne(t)],i=360/e,a=1;a<e;a++)n.push(ne({h:(r.h+a*i)%360,s:r.s,l:r.l}));return n}function OI(t){var e=ne(t).toHsl(),r=e.h;return[ne(t),ne({h:(r+72)%360,s:e.s,l:e.l}),ne({h:(r+216)%360,s:e.s,l:e.l})]}function FI(t,e,r){e=e||6,r=r||30;var n=ne(t).toHsl(),i=360/r,a=[ne(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(ne(n));return a}function NI(t,e){e=e||6;for(var r=ne(t).toHsv(),n=r.h,i=r.s,a=r.v,u=[],l=1/e;e--;)u.push(ne({h:n,s:i,v:a})),a=(a+l)%1;return u}ne.mix=function(t,e,r){r=r===0?0:r||50;var n=ne(t).toRgb(),i=ne(e).toRgb(),a=r/100,u={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return ne(u)},ne.readability=function(t,e){var r=ne(t),n=ne(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},ne.isReadable=function(t,e,r){var n=ne.readability(t,e),i,a;switch(a=!1,i=$I(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a},ne.mostReadable=function(t,e,r){var n=null,i=0,a,u,l,f;r=r||{},u=r.includeFallbackColors,l=r.level,f=r.size;for(var p=0;p<e.length;p++)a=ne.readability(t,e[p]),a>i&&(i=a,n=ne(e[p]));return ne.isReadable(t,n,{level:l,size:f})||!u?n:(r.includeFallbackColors=!1,ne.mostReadable(t,["#fff","#000"],r))};var Vl=ne.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},LI=ne.hexNames=kI(Vl);function kI(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function hg(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function st(t,e){DI(t)&&(t="100%");var r=BI(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function Ka(t){return Math.min(1,Math.max(0,t))}function qt(t){return parseInt(t,16)}function DI(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function BI(t){return typeof t=="string"&&t.indexOf("%")!=-1}function xr(t){return t.length==1?"0"+t:""+t}function Ts(t){return t<=1&&(t=t*100+"%"),t}function fg(t){return Math.round(parseFloat(t)*255).toString(16)}function dg(t){return qt(t)/255}var br=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function zr(t){return!!br.CSS_UNIT.exec(t)}function UI(t){t=t.replace(vI,"").replace(_I,"").toLowerCase();var e=!1;if(Vl[t])t=Vl[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=br.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=br.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=br.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=br.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=br.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=br.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=br.hex8.exec(t))?{r:qt(r[1]),g:qt(r[2]),b:qt(r[3]),a:dg(r[4]),format:e?"name":"hex8"}:(r=br.hex6.exec(t))?{r:qt(r[1]),g:qt(r[2]),b:qt(r[3]),format:e?"name":"hex"}:(r=br.hex4.exec(t))?{r:qt(r[1]+""+r[1]),g:qt(r[2]+""+r[2]),b:qt(r[3]+""+r[3]),a:dg(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=br.hex3.exec(t))?{r:qt(r[1]+""+r[1]),g:qt(r[2]+""+r[2]),b:qt(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function $I(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}var GI=function(){function t(e,r){var n=[],i=!0,a=!1,u=void 0;try{for(var l=e[Symbol.iterator](),f;!(i=(f=l.next()).done)&&(n.push(f.value),!(r&&n.length===r));i=!0);}catch(p){a=!0,u=p}finally{try{!i&&l.return&&l.return()}finally{if(a)throw u}}return n}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ws=Math.PI*2,jl=function(e,r,n,i,a,u,l){var f=e.x,p=e.y;f*=r,p*=n;var g=i*f-a*p,c=a*f+i*p;return{x:g+u,y:c+l}},HI=function(e,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(e),a=Math.sin(e),u=Math.cos(e+r),l=Math.sin(e+r);return[{x:i-a*n,y:a+i*n},{x:u+l*n,y:l-u*n},{x:u,y:l}]},pg=function(e,r,n,i){var a=e*i-r*n<0?-1:1,u=e*n+r*i;return u>1&&(u=1),u<-1&&(u=-1),a*Math.acos(u)},zI=function(e,r,n,i,a,u,l,f,p,g,c,d){var m=Math.pow(a,2),_=Math.pow(u,2),y=Math.pow(c,2),b=Math.pow(d,2),x=m*_-m*b-_*y;x<0&&(x=0),x/=m*b+_*y,x=Math.sqrt(x)*(l===f?-1:1);var E=x*a/u*d,w=x*-u/a*c,I=g*E-p*w+(e+n)/2,O=p*E+g*w+(r+i)/2,F=(c-E)/a,N=(d-w)/u,L=(-c-E)/a,D=(-d-w)/u,V=pg(1,0,F,N),Y=pg(F,N,L,D);return f===0&&Y>0&&(Y-=ws),f===1&&Y<0&&(Y+=ws),[I,O,V,Y]},gg=function(e){var r=e.px,n=e.py,i=e.cx,a=e.cy,u=e.rx,l=e.ry,f=e.xAxisRotation,p=f===void 0?0:f,g=e.largeArcFlag,c=g===void 0?0:g,d=e.sweepFlag,m=d===void 0?0:d,_=[];if(u===0||l===0)return[];var y=Math.sin(p*ws/360),b=Math.cos(p*ws/360),x=b*(r-i)/2+y*(n-a)/2,E=-y*(r-i)/2+b*(n-a)/2;if(x===0&&E===0)return[];u=Math.abs(u),l=Math.abs(l);var w=Math.pow(x,2)/Math.pow(u,2)+Math.pow(E,2)/Math.pow(l,2);w>1&&(u*=Math.sqrt(w),l*=Math.sqrt(w));var I=zI(r,n,i,a,u,l,c,m,y,b,x,E),O=GI(I,4),F=O[0],N=O[1],L=O[2],D=O[3],V=Math.abs(D)/(ws/4);Math.abs(1-V)<1e-7&&(V=1);var Y=Math.max(Math.ceil(V),1);D/=Y;for(var ie=0;ie<Y;ie++)_.push(HI(L,D)),L+=D;return _.map(function(j){var G=jl(j[0],u,l,b,y,F,N),ae=G.x,se=G.y,H=jl(j[1],u,l,b,y,F,N),Q=H.x,pe=H.y,W=jl(j[2],u,l,b,y,F,N),q=W.x,he=W.y;return{x1:ae,y1:se,x2:Q,y2:pe,x:q,y:he}})};class VI extends Hl{constructor(e){super(),this.lineColor=null,e&&this.drawSVG(e)}drawSVG(e){if(typeof e=="string"){const r=document.createElement("div");r.innerHTML=e.trim(),e=r.querySelector("svg")}if(!e)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(e),this._svgChildren(e.children),this}_svgChildren(e,r=!1){for(let n=0;n<e.length;n++){const i=e[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(e){if(e[0]==="#")return e=e.substr(1),e.length===3&&(e=e.replace(/([a-f0-9])/ig,"$1$1")),parseInt(e,16);const{r,g:n,b:i}=ne(e).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(e){let r="r",n="r";const i=e.nodeName==="elipse";i&&(r+="x",n+="y");const a=parseFloat(e.getAttribute(n)),u=parseFloat(e.getAttribute(r)),l=e.getAttribute("cx"),f=e.getAttribute("cy");let p=0,g=0;l!==null&&(p=parseFloat(l)),f!==null&&(g=parseFloat(f)),i?this.drawEllipse(p,g,a,u):this.drawCircle(p,g,a)}_svgRect(e){const r=parseFloat(e.getAttribute("x")),n=parseFloat(e.getAttribute("y")),i=parseFloat(e.getAttribute("width")),a=parseFloat(e.getAttribute("height")),u=parseFloat(e.getAttribute("rx"));u?this.drawRoundedRect(r,n,i,a,u):this.drawRect(r,n,i,a)}_convertStyleName(e){return e.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(e){const r=e.getAttribute("style"),n=e.getAttribute("opacity"),i={fill:e.getAttribute("fill"),opacity:n||e.getAttribute("fill-opacity"),stroke:e.getAttribute("stroke"),strokeOpacity:n||e.getAttribute("stroke-opacity"),strokeWidth:e.getAttribute("stroke-width"),cap:e.getAttribute("stroke-linecap"),join:e.getAttribute("stroke-linejoin"),miterLimit:e.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(a=>{const[u,l]=a.split(":");if(u){const f=this._convertStyleName(u);i[f]||(i[f]=l.trim())}}),i}_svgPoly(e,r){const n=e.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(e,r){const{fill:n,opacity:i,stroke:a,strokeOpacity:u,strokeWidth:l,cap:f,join:p,miterLimit:g}=this._svgStyle(e),d=l!==null?parseFloat(l):a!==null?1:0,m=a!==null?this._hexToUint(a):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:a===null&&l===null&&r?this.line.width:d,alpha:u===null?this.line.alpha:parseFloat(u),color:a===null&&r?this.line.color:m,cap:f===null&&r?this.line.cap:f,join:p===null&&r?this.line.join:p,miterLimit:g===null&&r?this.line.miterLimit:parseFloat(g)}),e.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(e){const r=e.getAttribute("d");let n=0,i=0;const a=zl(r.trim());for(let u=0;u<a.length;u++){const l=a[u];switch(l.code){case"m":{this.moveTo(n+=l.end.x,i+=l.end.y);break}case"M":{this.moveTo(n=l.end.x,i=l.end.y);break}case"H":{this.lineTo(n=l.value,i);break}case"h":{this.lineTo(n+=l.value,i);break}case"V":{this.lineTo(n,i=l.value);break}case"v":{this.lineTo(n,i+=l.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=l.end.x,i=l.end.y);break}case"l":{this.lineTo(n+=l.end.x,i+=l.end.y);break}case"C":{this.bezierCurveTo(l.cp1.x,l.cp1.y,l.cp2.x,l.cp2.y,n=l.end.x,i=l.end.y);break}case"c":{const f=n,p=i;this.bezierCurveTo(f+l.cp1.x,p+l.cp1.y,f+l.cp2.x,p+l.cp2.y,n+=l.end.x,i+=l.end.y);break}case"s":case"q":{const f=n,p=i;this.quadraticCurveTo(f+l.cp.x,p+l.cp.y,n+=l.end.x,i+=l.end.y);break}case"S":case"Q":{this.quadraticCurveTo(l.cp.x,l.cp.y,n=l.end.x,i=l.end.y);break}case"a":{gg({px:n,py:i,cx:n+=l.end.x,cy:i+=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:f,y1:p,x2:g,y2:c,x:d,y:m})=>this.bezierCurveTo(f,p,g,c,d,m));break}case"A":{gg({px:n,py:i,cx:n=l.end.x,cy:i=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:f,y1:p,x2:g,y2:c,x:d,y:m})=>this.bezierCurveTo(f,p,g,c,d,m));break}default:{console.info("[PIXI.SVG] Draw command not supported:",l.code,l);break}}}}}var Za={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},jI=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function XI(t){return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&jI.indexOf(t)>=0}function WI(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function qI(t){return(t|32)===97}function Pi(t){return t>=48&&t<=57}function YI(t){return t>=48&&t<=57||t===43||t===45||t===46}function KI(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function Qa(t){for(;t.index<t.max&&XI(t.path.charCodeAt(t.index));)t.index++}function ZI(t){var e=t.path.charCodeAt(t.index);if(e===48){t.param=0,t.index++;return}if(e===49){t.param=1,t.index++;return}t.err="SvgPath: arc flag can be 0 or 1 only (at pos "+t.index+")"}function QI(t){var e=t.index,r=e,n=t.max,i=!1,a=!1,u=!1,l=!1,f;if(r>=n){t.err="SvgPath: missed param (at pos "+r+")";return}if(f=t.path.charCodeAt(r),(f===43||f===45)&&(r++,f=r<n?t.path.charCodeAt(r):0),!Pi(f)&&f!==46){t.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(f!==46){if(i=f===48,r++,f=r<n?t.path.charCodeAt(r):0,i&&r<n&&f&&Pi(f)){t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+e+")";return}for(;r<n&&Pi(t.path.charCodeAt(r));)r++,a=!0;f=r<n?t.path.charCodeAt(r):0}if(f===46){for(l=!0,r++;Pi(t.path.charCodeAt(r));)r++,u=!0;f=r<n?t.path.charCodeAt(r):0}if(f===101||f===69){if(l&&!a&&!u){t.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,f=r<n?t.path.charCodeAt(r):0,(f===43||f===45)&&r++,r<n&&Pi(t.path.charCodeAt(r)))for(;r<n&&Pi(t.path.charCodeAt(r));)r++;else{t.err="SvgPath: invalid float exponent (at pos "+r+")";return}}t.index=r,t.param=parseFloat(t.path.slice(e,r))+0}function Xl(t){var e,r;e=t.path[t.segmentStart],r=e.toLowerCase();var n=t.data;if(r==="m"&&n.length>2&&(t.result.push([e,n[0],n[1]]),n=n.slice(2),r="l",e=e==="m"?"l":"L"),r==="r")t.result.push([e].concat(n));else for(;n.length>=Za[r]&&(t.result.push([e].concat(n.splice(0,Za[r]))),!!Za[r]););}function JI(t){var e=t.max,r,n,i,a,u;if(t.segmentStart=t.index,r=t.path.charCodeAt(t.index),n=qI(r),!WI(r)){t.err="SvgPath: bad command "+t.path[t.index]+" (at pos "+t.index+")";return}if(a=Za[t.path[t.index].toLowerCase()],t.index++,Qa(t),t.data=[],!a){Xl(t);return}for(i=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?ZI(t):QI(t),t.err.length){Xl(t);return}t.data.push(t.param),Qa(t),i=!1,t.index<e&&t.path.charCodeAt(t.index)===44&&(t.index++,Qa(t),i=!0)}if(!i&&(t.index>=t.max||!YI(t.path.charCodeAt(t.index))))break}Xl(t)}var eR=function(e){var r=new KI(e),n=r.max;for(Qa(r);r.index<n&&!r.err.length;)JI(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function tR(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function Tr(){if(!(this instanceof Tr))return new Tr;this.queue=[],this.cache=null}Tr.prototype.matrix=function(t){return t[0]===1&&t[1]===0&&t[2]===0&&t[3]===1&&t[4]===0&&t[5]===0?this:(this.cache=null,this.queue.push(t),this)},Tr.prototype.translate=function(t,e){return(t!==0||e!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},Tr.prototype.scale=function(t,e){return(t!==1||e!==1)&&(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},Tr.prototype.rotate=function(t,e,r){var n,i,a;return t!==0&&(this.translate(e,r),n=t*Math.PI/180,i=Math.cos(n),a=Math.sin(n),this.queue.push([i,a,-a,i,0,0]),this.cache=null,this.translate(-e,-r)),this},Tr.prototype.skewX=function(t){return t!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},Tr.prototype.skewY=function(t){return t!==0&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},Tr.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var t=1;t<this.queue.length;t++)this.cache=tR(this.cache,this.queue[t]);return this.cache},Tr.prototype.calc=function(t,e,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[t*n[0]+e*n[2]+(r?0:n[4]),t*n[1]+e*n[3]+(r?0:n[5])]):[t,e]};var mg=Tr,rR=mg,nR={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},iR=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,sR=/[\s,]+/,aR=function(e){var r=new rR,n,i;return e.split(iR).forEach(function(a){if(a.length){if(typeof nR[a]<"u"){n=a;return}switch(i=a.split(sR).map(function(u){return+u||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},Ss=Math.PI*2;function vg(t,e,r,n){var i=t*n-e*r<0?-1:1,a=t*r+e*n;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)}function oR(t,e,r,n,i,a,u,l,f,p){var g=p*(t-r)/2+f*(e-n)/2,c=-f*(t-r)/2+p*(e-n)/2,d=u*u,m=l*l,_=g*g,y=c*c,b=d*m-d*y-m*_;b<0&&(b=0),b/=d*y+m*_,b=Math.sqrt(b)*(i===a?-1:1);var x=b*u/l*c,E=b*-l/u*g,w=p*x-f*E+(t+r)/2,I=f*x+p*E+(e+n)/2,O=(g-x)/u,F=(c-E)/l,N=(-g-x)/u,L=(-c-E)/l,D=vg(1,0,O,F),V=vg(O,F,N,L);return a===0&&V>0&&(V-=Ss),a===1&&V<0&&(V+=Ss),[w,I,D,V]}function uR(t,e){var r=1.3333333333333333*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),u=Math.sin(t+e);return[n,i,n-i*r,i+n*r,a+u*r,u-a*r,a,u]}var lR=function(e,r,n,i,a,u,l,f,p){var g=Math.sin(p*Ss/360),c=Math.cos(p*Ss/360),d=c*(e-n)/2+g*(r-i)/2,m=-g*(e-n)/2+c*(r-i)/2;if(d===0&&m===0)return[];if(l===0||f===0)return[];l=Math.abs(l),f=Math.abs(f);var _=d*d/(l*l)+m*m/(f*f);_>1&&(l*=Math.sqrt(_),f*=Math.sqrt(_));var y=oR(e,r,n,i,a,u,l,f,g,c),b=[],x=y[2],E=y[3],w=Math.max(Math.ceil(Math.abs(E)/(Ss/4)),1);E/=w;for(var I=0;I<w;I++)b.push(uR(x,E)),x+=E;return b.map(function(O){for(var F=0;F<O.length;F+=2){var N=O[F+0],L=O[F+1];N*=l,L*=f;var D=c*N-g*L,V=g*N+c*L;O[F+0]=D+y[0],O[F+1]=V+y[1]}return O})},As=1e-10,_g=Math.PI/180;function Es(t,e,r){if(!(this instanceof Es))return new Es(t,e,r);this.rx=t,this.ry=e,this.ax=r}Es.prototype.transform=function(t){var e=Math.cos(this.ax*_g),r=Math.sin(this.ax*_g),n=[this.rx*(t[0]*e+t[2]*r),this.rx*(t[1]*e+t[3]*r),this.ry*(-t[0]*r+t[2]*e),this.ry*(-t[1]*r+t[3]*e)],i=n[0]*n[0]+n[2]*n[2],a=n[1]*n[1]+n[3]*n[3],u=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),l=(i+a)/2;if(u<As*l)return this.rx=this.ry=Math.sqrt(l),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];u=Math.sqrt(u);var p=l+u/2,g=l-u/2;return this.ax=Math.abs(f)<As&&Math.abs(p-a)<As?90:Math.atan(Math.abs(f)>Math.abs(p-a)?(p-i)/f:f/(p-a))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(p),this.ry=Math.sqrt(g)):(this.ax+=90,this.rx=Math.sqrt(g),this.ry=Math.sqrt(p)),this},Es.prototype.isDegenerate=function(){return this.rx<As*this.ry||this.ry<As*this.rx};var cR=Es,hR=eR,fR=aR,hn=mg,dR=lR,pR=cR;function lt(t){if(!(this instanceof lt))return new lt(t);var e=hR(t);this.segments=e.segments,this.err=e.err,this.__stack=[]}lt.from=function(t){if(typeof t=="string")return new lt(t);if(t instanceof lt){var e=new lt("");return e.err=t.err,e.segments=t.segments.map(function(r){return r.slice()}),e.__stack=t.__stack.map(function(r){return hn().matrix(r.toArray())}),e}throw new Error("SvgPath.from: invalid param type "+t)},lt.prototype.__matrix=function(t){var e=this,r;t.queue.length&&this.iterate(function(n,i,a,u){var l,f,p,g;switch(n[0]){case"v":l=t.calc(0,n[1],!0),f=l[0]===0?["v",l[1]]:["l",l[0],l[1]];break;case"V":l=t.calc(a,n[1],!1),f=l[0]===t.calc(a,u,!1)[0]?["V",l[1]]:["L",l[0],l[1]];break;case"h":l=t.calc(n[1],0,!0),f=l[1]===0?["h",l[0]]:["l",l[0],l[1]];break;case"H":l=t.calc(n[1],u,!1),f=l[1]===t.calc(a,u,!1)[1]?["H",l[0]]:["L",l[0],l[1]];break;case"a":case"A":var c=t.toArray(),d=pR(n[1],n[2],n[3]).transform(c);if(c[0]*c[3]-c[1]*c[2]<0&&(n[5]=n[5]?"0":"1"),l=t.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===a&&n[7]===u||n[0]==="a"&&n[6]===0&&n[7]===0){f=[n[0]==="a"?"l":"L",l[0],l[1]];break}d.isDegenerate()?f=[n[0]==="a"?"l":"L",l[0],l[1]]:f=[n[0],d.rx,d.ry,d.ax,n[4],n[5],l[0],l[1]];break;case"m":g=i>0,l=t.calc(n[1],n[2],g),f=["m",l[0],l[1]];break;default:for(p=n[0],f=[p],g=p.toLowerCase()===p,r=1;r<n.length;r+=2)l=t.calc(n[r],n[r+1],g),f.push(l[0],l[1])}e.segments[i]=f},!0)},lt.prototype.__evaluateStack=function(){var t,e;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(t=hn(),e=this.__stack.length;--e>=0;)t.matrix(this.__stack[e].toArray());this.__matrix(t),this.__stack=[]}},lt.prototype.toString=function(){var t="",e="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var a=this.segments[n],u=a[0];u!==e||u==="m"||u==="M"?(u==="m"&&e==="z"&&(t+=" "),t+=u,r=!1):r=!0;for(var l=1;l<a.length;l++){var f=a[l];l===1?r&&f>=0&&(t+=" "):f>=0&&(t+=" "),t+=f}e=u}return t},lt.prototype.translate=function(t,e){return this.__stack.push(hn().translate(t,e||0)),this},lt.prototype.scale=function(t,e){return this.__stack.push(hn().scale(t,!e&&e!==0?t:e)),this},lt.prototype.rotate=function(t,e,r){return this.__stack.push(hn().rotate(t,e||0,r||0)),this},lt.prototype.skewX=function(t){return this.__stack.push(hn().skewX(t)),this},lt.prototype.skewY=function(t){return this.__stack.push(hn().skewY(t)),this},lt.prototype.matrix=function(t){return this.__stack.push(hn().matrix(t)),this},lt.prototype.transform=function(t){return t.trim()?(this.__stack.push(fR(t)),this):this},lt.prototype.round=function(t){var e=0,r=0,n=0,i=0,a;return t=t||0,this.__evaluateStack(),this.segments.forEach(function(u){var l=u[0].toLowerCase()===u[0];switch(u[0]){case"H":case"h":l&&(u[1]+=n),n=u[1]-u[1].toFixed(t),u[1]=+u[1].toFixed(t);return;case"V":case"v":l&&(u[1]+=i),i=u[1]-u[1].toFixed(t),u[1]=+u[1].toFixed(t);return;case"Z":case"z":n=e,i=r;return;case"M":case"m":l&&(u[1]+=n,u[2]+=i),n=u[1]-u[1].toFixed(t),i=u[2]-u[2].toFixed(t),e=n,r=i,u[1]=+u[1].toFixed(t),u[2]=+u[2].toFixed(t);return;case"A":case"a":l&&(u[6]+=n,u[7]+=i),n=u[6]-u[6].toFixed(t),i=u[7]-u[7].toFixed(t),u[1]=+u[1].toFixed(t),u[2]=+u[2].toFixed(t),u[3]=+u[3].toFixed(t+2),u[6]=+u[6].toFixed(t),u[7]=+u[7].toFixed(t);return;default:a=u.length,l&&(u[a-2]+=n,u[a-1]+=i),n=u[a-2]-u[a-2].toFixed(t),i=u[a-1]-u[a-1].toFixed(t),u.forEach(function(f,p){p&&(u[p]=+u[p].toFixed(t))});return}}),this},lt.prototype.iterate=function(t,e){var r=this.segments,n={},i=!1,a=0,u=0,l=0,f=0,p,g,c;if(e||this.__evaluateStack(),r.forEach(function(d,m){var _=t(d,m,a,u);Array.isArray(_)&&(n[m]=_,i=!0);var y=d[0]===d[0].toLowerCase();switch(d[0]){case"m":case"M":a=d[1]+(y?a:0),u=d[2]+(y?u:0),l=a,f=u;return;case"h":case"H":a=d[1]+(y?a:0);return;case"v":case"V":u=d[1]+(y?u:0);return;case"z":case"Z":a=l,u=f;return;default:a=d[d.length-2]+(y?a:0),u=d[d.length-1]+(y?u:0)}}),!i)return this;for(c=[],p=0;p<r.length;p++)if(typeof n[p]<"u")for(g=0;g<n[p].length;g++)c.push(n[p][g]);else c.push(r[p]);return this.segments=c,this},lt.prototype.abs=function(){return this.iterate(function(t,e,r,n){var i=t[0],a=i.toUpperCase(),u;if(i!==a)switch(t[0]=a,i){case"v":t[1]+=n;return;case"a":t[6]+=r,t[7]+=n;return;default:for(u=1;u<t.length;u++)t[u]+=u%2?r:n}},!0),this},lt.prototype.rel=function(){return this.iterate(function(t,e,r,n){var i=t[0],a=i.toLowerCase(),u;if(i!==a&&!(e===0&&i==="M"))switch(t[0]=a,i){case"V":t[1]-=n;return;case"A":t[6]-=r,t[7]-=n;return;default:for(u=1;u<t.length;u++)t[u]-=u%2?r:n}},!0),this},lt.prototype.unarc=function(){return this.iterate(function(t,e,r,n){var i,a,u,l=[],f=t[0];return f!=="A"&&f!=="a"?null:(f==="a"?(a=r+t[6],u=n+t[7]):(a=t[6],u=t[7]),i=dR(r,n,a,u,t[4],t[5],t[1],t[2],t[3]),i.length===0?[[t[0]==="a"?"l":"L",t[6],t[7]]]:(i.forEach(function(p){l.push(["C",p[2],p[3],p[4],p[5],p[6],p[7]])}),l))}),this},lt.prototype.unshort=function(){var t=this.segments,e,r,n,i,a;return this.iterate(function(u,l,f,p){var g=u[0],c=g.toUpperCase(),d;l&&(c==="T"?(d=g==="t",n=t[l-1],n[0]==="Q"?(e=n[1]-f,r=n[2]-p):n[0]==="q"?(e=n[1]-n[3],r=n[2]-n[4]):(e=0,r=0),i=-e,a=-r,d||(i+=f,a+=p),t[l]=[d?"q":"Q",i,a,u[1],u[2]]):c==="S"&&(d=g==="s",n=t[l-1],n[0]==="C"?(e=n[3]-f,r=n[4]-p):n[0]==="c"?(e=n[3]-n[5],r=n[4]-n[6]):(e=0,r=0),i=-e,a=-r,d||(i+=f,a+=p),t[l]=[d?"c":"C",i,a,u[1],u[2],u[3],u[4]]))}),this};var gR=lt,mR=gR;const vR=bn(mR),_R=te.forwardRef((t,e)=>{const[r,n]=te.useState(null),i=X.useRef(null),a=X.useRef(null),u=X.useRef(null),{path:l,visible:f,disabled:p,transformation:{x:g,y:c,width:d,height:m,anchor:_,hexColor:y,fill:b,stroke:x="none",strokeWidth:E=0,colorCorrection:w={}},pointerdown:I,pointerup:O}=t,F=Be.useApp(),{temperatureFilter:N,sharpnessFilter:L,hueFilter:D,blurFilter:V,adjustmentFilter:Y,vignetteFilter:ie,noiseFilter:j}=Bn(w),{blurRadius:G=0,vignette:ae=0,noise:se=0}=w;return te.useEffect(()=>{const H=vR(l).scale(5).translate(0,0).toString(),Q=`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${m}">
1945
+ */(function(t,e){(function(r,n){t.exports=n()})(pA,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},a={number:function(y){return+m("number",y)},"coordinate pair":function(y){var b=m("number",y);if(b===null&&!y)return null;m("comma");var x=m("number",!0);return{x:+b,y:+x}},"arc definition":function(y){var b=a["coordinate pair"](y);if(!b&&!y)return null;m("comma");var x=+m("number",!0);m("comma",!0);var E=!!+m("flag",!0);m("comma");var w=!!+m("flag",!0);m("comma");var I=a["coordinate pair"](!0);return{radii:b,rotation:x,large:E,clockwise:w,end:I}}},u=0,l=[];u<n.length;){var h=m("command"),p=h.toUpperCase(),g=h!==p,c;switch(p){case"M":c=_("coordinate pair").map(function(y,b){return b===1&&(h=g?"l":"L"),d({end:y})});break;case"L":case"T":c=_("coordinate pair").map(function(y){return d({end:y})});break;case"C":if(c=_("coordinate pair"),c.length%3)throw Error("Expected coordinate pair triplet at position "+u);c=c.reduce(function(y,b,x){var E=x%3;if(!E)y.push(d({cp1:b}));else{var w=y[y.length-1];w[E===1?"cp2":"end"]=b}return y},[]);break;case"Q":case"S":if(c=_("coordinate pair"),c.length&1)throw Error("Expected coordinate pair couple at position "+u);c=c.reduce(function(y,b,x){var E=x&1;if(!E)y.push(d({cp:b}));else{var w=y[y.length-1];w.end=b}return y},[]);break;case"H":case"V":c=_("number").map(function(y){return d({value:y})});break;case"A":c=_("arc definition").map(d);break;case"Z":c=[{code:"Z"}];break}l.push.apply(l,c)}return l;function d(y){return y.code=h,y.relative=g,y}function m(y,b){i[y].lastIndex=u;var x=i[y].exec(n);if(!x||x.index!==u){if(!b)return null;throw Error("Expected "+y+" at position "+u)}return u=i[y].lastIndex,x[1]}function _(y){for(var b=[],x,E=!0;x=a[y](E);)b.push(x),E=!!m("comma");return b}}})})(gA);const mA=/^\s+/,vA=/\s+$/;function ne(t,e){if(t=t||"",e=e||{},t instanceof ne)return t;if(!(this instanceof ne))return new ne(t,e);var r=_A(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ne.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),e,r,n,i,a,u;return e=t.r/255,r=t.g/255,n=t.b/255,e<=.03928?i=e/12.92:i=Math.pow((e+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?u=n/12.92:u=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*u},setAlpha:function(t){return this._a=$p(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=kp(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=kp(this._r,this._g,this._b),e=Math.round(t.h*360),r=Math.round(t.s*100),n=Math.round(t.v*100);return this._a==1?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=Lp(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Lp(this._r,this._g,this._b),e=Math.round(t.h*360),r=Math.round(t.s*100),n=Math.round(t.l*100);return this._a==1?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return Bp(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return TA(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(it(this._r,255)*100)+"%",g:Math.round(it(this._g,255)*100)+"%",b:Math.round(it(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(it(this._r,255)*100)+"%, "+Math.round(it(this._g,255)*100)+"%, "+Math.round(it(this._b,255)*100)+"%)":"rgba("+Math.round(it(this._r,255)*100)+"%, "+Math.round(it(this._g,255)*100)+"%, "+Math.round(it(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:NA[Bp(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+Dp(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=ne(t);r="#"+Dp(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!e&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ne(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(EA,arguments)},brighten:function(){return this._applyModification(CA,arguments)},darken:function(){return this._applyModification(IA,arguments)},desaturate:function(){return this._applyModification(wA,arguments)},saturate:function(){return this._applyModification(SA,arguments)},greyscale:function(){return this._applyModification(AA,arguments)},spin:function(){return this._applyModification(RA,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(OA,arguments)},complement:function(){return this._applyCombination(PA,arguments)},monochromatic:function(){return this._applyCombination(FA,arguments)},splitcomplement:function(){return this._applyCombination(MA,arguments)},triad:function(){return this._applyCombination(Up,[3])},tetrad:function(){return this._applyCombination(Up,[4])}},ne.fromRatio=function(t,e){if(typeof t=="object"){var r={};for(var n in t)t.hasOwnProperty(n)&&(n==="a"?r[n]=t[n]:r[n]=ys(t[n]));t=r}return ne(t,e)};function _A(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,a=null,u=!1,l=!1;return typeof t=="string"&&(t=DA(t)),typeof t=="object"&&(zr(t.r)&&zr(t.g)&&zr(t.b)?(e=yA(t.r,t.g,t.b),u=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):zr(t.h)&&zr(t.s)&&zr(t.v)?(n=ys(t.s),i=ys(t.v),e=bA(t.h,n,i),u=!0,l="hsv"):zr(t.h)&&zr(t.s)&&zr(t.l)&&(n=ys(t.s),a=ys(t.l),e=xA(t.h,n,a),u=!0,l="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=$p(r),{ok:u,format:t.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function yA(t,e,r){return{r:it(t,255)*255,g:it(e,255)*255,b:it(r,255)*255}}function Lp(t,e,r){t=it(t,255),e=it(e,255),r=it(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),a,u,l=(n+i)/2;if(n==i)a=u=0;else{var h=n-i;switch(u=l>.5?h/(2-n-i):h/(n+i),n){case t:a=(e-r)/h+(e<r?6:0);break;case e:a=(r-t)/h+2;break;case r:a=(t-e)/h+4;break}a/=6}return{h:a,s:u,l}}function xA(t,e,r){var n,i,a;t=it(t,360),e=it(e,100),r=it(r,100);function u(p,g,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?p+(g-p)*6*c:c<1/2?g:c<2/3?p+(g-p)*(2/3-c)*6:p}if(e===0)n=i=a=r;else{var l=r<.5?r*(1+e):r+e-r*e,h=2*r-l;n=u(h,l,t+1/3),i=u(h,l,t),a=u(h,l,t-1/3)}return{r:n*255,g:i*255,b:a*255}}function kp(t,e,r){t=it(t,255),e=it(e,255),r=it(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),a,u,l=n,h=n-i;if(u=n===0?0:h/n,n==i)a=0;else{switch(n){case t:a=(e-r)/h+(e<r?6:0);break;case e:a=(r-t)/h+2;break;case r:a=(t-e)/h+4;break}a/=6}return{h:a,s:u,v:l}}function bA(t,e,r){t=it(t,360)*6,e=it(e,100),r=it(r,100);var n=Math.floor(t),i=t-n,a=r*(1-e),u=r*(1-i*e),l=r*(1-(1-i)*e),h=n%6,p=[r,u,a,a,l,r][h],g=[l,r,r,u,a,a][h],c=[a,a,l,r,r,u][h];return{r:p*255,g:g*255,b:c*255}}function Bp(t,e,r,n){var i=[xr(Math.round(t).toString(16)),xr(Math.round(e).toString(16)),xr(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function TA(t,e,r,n,i){var a=[xr(Math.round(t).toString(16)),xr(Math.round(e).toString(16)),xr(Math.round(r).toString(16)),xr(Gp(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Dp(t,e,r,n){var i=[xr(Gp(n)),xr(Math.round(t).toString(16)),xr(Math.round(e).toString(16)),xr(Math.round(r).toString(16))];return i.join("")}ne.equals=function(t,e){return!t||!e?!1:ne(t).toRgbString()==ne(e).toRgbString()},ne.random=function(){return ne.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function wA(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.s-=e/100,r.s=Ga(r.s),ne(r)}function SA(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.s+=e/100,r.s=Ga(r.s),ne(r)}function AA(t){return ne(t).desaturate(100)}function EA(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.l+=e/100,r.l=Ga(r.l),ne(r)}function CA(t,e){e=e===0?0:e||10;var r=ne(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),ne(r)}function IA(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.l-=e/100,r.l=Ga(r.l),ne(r)}function RA(t,e){var r=ne(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,ne(r)}function PA(t){var e=ne(t).toHsl();return e.h=(e.h+180)%360,ne(e)}function Up(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ne(t).toHsl(),n=[ne(t)],i=360/e,a=1;a<e;a++)n.push(ne({h:(r.h+a*i)%360,s:r.s,l:r.l}));return n}function MA(t){var e=ne(t).toHsl(),r=e.h;return[ne(t),ne({h:(r+72)%360,s:e.s,l:e.l}),ne({h:(r+216)%360,s:e.s,l:e.l})]}function OA(t,e,r){e=e||6,r=r||30;var n=ne(t).toHsl(),i=360/r,a=[ne(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(ne(n));return a}function FA(t,e){e=e||6;for(var r=ne(t).toHsv(),n=r.h,i=r.s,a=r.v,u=[],l=1/e;e--;)u.push(ne({h:n,s:i,v:a})),a=(a+l)%1;return u}ne.mix=function(t,e,r){r=r===0?0:r||50;var n=ne(t).toRgb(),i=ne(e).toRgb(),a=r/100,u={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return ne(u)},ne.readability=function(t,e){var r=ne(t),n=ne(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},ne.isReadable=function(t,e,r){var n=ne.readability(t,e),i,a;switch(a=!1,i=UA(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a},ne.mostReadable=function(t,e,r){var n=null,i=0,a,u,l,h;r=r||{},u=r.includeFallbackColors,l=r.level,h=r.size;for(var p=0;p<e.length;p++)a=ne.readability(t,e[p]),a>i&&(i=a,n=ne(e[p]));return ne.isReadable(t,n,{level:l,size:h})||!u?n:(r.includeFallbackColors=!1,ne.mostReadable(t,["#fff","#000"],r))};var Dl=ne.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},NA=ne.hexNames=LA(Dl);function LA(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function $p(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function it(t,e){kA(t)&&(t="100%");var r=BA(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function Ga(t){return Math.min(1,Math.max(0,t))}function Wt(t){return parseInt(t,16)}function kA(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function BA(t){return typeof t=="string"&&t.indexOf("%")!=-1}function xr(t){return t.length==1?"0"+t:""+t}function ys(t){return t<=1&&(t=t*100+"%"),t}function Gp(t){return Math.round(parseFloat(t)*255).toString(16)}function Hp(t){return Wt(t)/255}var br=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function zr(t){return!!br.CSS_UNIT.exec(t)}function DA(t){t=t.replace(mA,"").replace(vA,"").toLowerCase();var e=!1;if(Dl[t])t=Dl[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=br.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=br.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=br.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=br.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=br.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=br.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=br.hex8.exec(t))?{r:Wt(r[1]),g:Wt(r[2]),b:Wt(r[3]),a:Hp(r[4]),format:e?"name":"hex8"}:(r=br.hex6.exec(t))?{r:Wt(r[1]),g:Wt(r[2]),b:Wt(r[3]),format:e?"name":"hex"}:(r=br.hex4.exec(t))?{r:Wt(r[1]+""+r[1]),g:Wt(r[2]+""+r[2]),b:Wt(r[3]+""+r[3]),a:Hp(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=br.hex3.exec(t))?{r:Wt(r[1]+""+r[1]),g:Wt(r[2]+""+r[2]),b:Wt(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function UA(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}var $A=function(){function t(e,r){var n=[],i=!0,a=!1,u=void 0;try{for(var l=e[Symbol.iterator](),h;!(i=(h=l.next()).done)&&(n.push(h.value),!(r&&n.length===r));i=!0);}catch(p){a=!0,u=p}finally{try{!i&&l.return&&l.return()}finally{if(a)throw u}}return n}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xs=Math.PI*2,Ul=function(e,r,n,i,a,u,l){var h=e.x,p=e.y;h*=r,p*=n;var g=i*h-a*p,c=a*h+i*p;return{x:g+u,y:c+l}},GA=function(e,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(e),a=Math.sin(e),u=Math.cos(e+r),l=Math.sin(e+r);return[{x:i-a*n,y:a+i*n},{x:u+l*n,y:l-u*n},{x:u,y:l}]},zp=function(e,r,n,i){var a=e*i-r*n<0?-1:1,u=e*n+r*i;return u>1&&(u=1),u<-1&&(u=-1),a*Math.acos(u)},HA=function(e,r,n,i,a,u,l,h,p,g,c,d){var m=Math.pow(a,2),_=Math.pow(u,2),y=Math.pow(c,2),b=Math.pow(d,2),x=m*_-m*b-_*y;x<0&&(x=0),x/=m*b+_*y,x=Math.sqrt(x)*(l===h?-1:1);var E=x*a/u*d,w=x*-u/a*c,I=g*E-p*w+(e+n)/2,O=p*E+g*w+(r+i)/2,F=(c-E)/a,N=(d-w)/u,L=(-c-E)/a,B=(-d-w)/u,V=zp(1,0,F,N),Y=zp(F,N,L,B);return h===0&&Y>0&&(Y-=xs),h===1&&Y<0&&(Y+=xs),[I,O,V,Y]},Vp=function(e){var r=e.px,n=e.py,i=e.cx,a=e.cy,u=e.rx,l=e.ry,h=e.xAxisRotation,p=h===void 0?0:h,g=e.largeArcFlag,c=g===void 0?0:g,d=e.sweepFlag,m=d===void 0?0:d,_=[];if(u===0||l===0)return[];var y=Math.sin(p*xs/360),b=Math.cos(p*xs/360),x=b*(r-i)/2+y*(n-a)/2,E=-y*(r-i)/2+b*(n-a)/2;if(x===0&&E===0)return[];u=Math.abs(u),l=Math.abs(l);var w=Math.pow(x,2)/Math.pow(u,2)+Math.pow(E,2)/Math.pow(l,2);w>1&&(u*=Math.sqrt(w),l*=Math.sqrt(w));var I=HA(r,n,i,a,u,l,c,m,y,b,x,E),O=$A(I,4),F=O[0],N=O[1],L=O[2],B=O[3],V=Math.abs(B)/(xs/4);Math.abs(1-V)<1e-7&&(V=1);var Y=Math.max(Math.ceil(V),1);B/=Y;for(var ae=0;ae<Y;ae++)_.push(GA(L,B)),L+=B;return _.map(function(j){var G=Ul(j[0],u,l,b,y,F,N),se=G.x,ie=G.y,H=Ul(j[1],u,l,b,y,F,N),J=H.x,ge=H.y,X=Ul(j[2],u,l,b,y,F,N),q=X.x,ue=X.y;return{x1:se,y1:ie,x2:J,y2:ge,x:q,y:ue}})};class zA extends kl{constructor(e){super(),this.lineColor=null,e&&this.drawSVG(e)}drawSVG(e){if(typeof e=="string"){const r=document.createElement("div");r.innerHTML=e.trim(),e=r.querySelector("svg")}if(!e)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(e),this._svgChildren(e.children),this}_svgChildren(e,r=!1){for(let n=0;n<e.length;n++){const i=e[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(e){if(e[0]==="#")return e=e.substr(1),e.length===3&&(e=e.replace(/([a-f0-9])/ig,"$1$1")),parseInt(e,16);const{r,g:n,b:i}=ne(e).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(e){let r="r",n="r";const i=e.nodeName==="elipse";i&&(r+="x",n+="y");const a=parseFloat(e.getAttribute(n)),u=parseFloat(e.getAttribute(r)),l=e.getAttribute("cx"),h=e.getAttribute("cy");let p=0,g=0;l!==null&&(p=parseFloat(l)),h!==null&&(g=parseFloat(h)),i?this.drawEllipse(p,g,a,u):this.drawCircle(p,g,a)}_svgRect(e){const r=parseFloat(e.getAttribute("x")),n=parseFloat(e.getAttribute("y")),i=parseFloat(e.getAttribute("width")),a=parseFloat(e.getAttribute("height")),u=parseFloat(e.getAttribute("rx"));u?this.drawRoundedRect(r,n,i,a,u):this.drawRect(r,n,i,a)}_convertStyleName(e){return e.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(e){const r=e.getAttribute("style"),n=e.getAttribute("opacity"),i={fill:e.getAttribute("fill"),opacity:n||e.getAttribute("fill-opacity"),stroke:e.getAttribute("stroke"),strokeOpacity:n||e.getAttribute("stroke-opacity"),strokeWidth:e.getAttribute("stroke-width"),cap:e.getAttribute("stroke-linecap"),join:e.getAttribute("stroke-linejoin"),miterLimit:e.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(a=>{const[u,l]=a.split(":");if(u){const h=this._convertStyleName(u);i[h]||(i[h]=l.trim())}}),i}_svgPoly(e,r){const n=e.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(e,r){const{fill:n,opacity:i,stroke:a,strokeOpacity:u,strokeWidth:l,cap:h,join:p,miterLimit:g}=this._svgStyle(e),d=l!==null?parseFloat(l):a!==null?1:0,m=a!==null?this._hexToUint(a):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:a===null&&l===null&&r?this.line.width:d,alpha:u===null?this.line.alpha:parseFloat(u),color:a===null&&r?this.line.color:m,cap:h===null&&r?this.line.cap:h,join:p===null&&r?this.line.join:p,miterLimit:g===null&&r?this.line.miterLimit:parseFloat(g)}),e.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(e){const r=e.getAttribute("d");let n=0,i=0;const a=Bl(r.trim());for(let u=0;u<a.length;u++){const l=a[u];switch(l.code){case"m":{this.moveTo(n+=l.end.x,i+=l.end.y);break}case"M":{this.moveTo(n=l.end.x,i=l.end.y);break}case"H":{this.lineTo(n=l.value,i);break}case"h":{this.lineTo(n+=l.value,i);break}case"V":{this.lineTo(n,i=l.value);break}case"v":{this.lineTo(n,i+=l.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=l.end.x,i=l.end.y);break}case"l":{this.lineTo(n+=l.end.x,i+=l.end.y);break}case"C":{this.bezierCurveTo(l.cp1.x,l.cp1.y,l.cp2.x,l.cp2.y,n=l.end.x,i=l.end.y);break}case"c":{const h=n,p=i;this.bezierCurveTo(h+l.cp1.x,p+l.cp1.y,h+l.cp2.x,p+l.cp2.y,n+=l.end.x,i+=l.end.y);break}case"s":case"q":{const h=n,p=i;this.quadraticCurveTo(h+l.cp.x,p+l.cp.y,n+=l.end.x,i+=l.end.y);break}case"S":case"Q":{this.quadraticCurveTo(l.cp.x,l.cp.y,n=l.end.x,i=l.end.y);break}case"a":{Vp({px:n,py:i,cx:n+=l.end.x,cy:i+=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:h,y1:p,x2:g,y2:c,x:d,y:m})=>this.bezierCurveTo(h,p,g,c,d,m));break}case"A":{Vp({px:n,py:i,cx:n=l.end.x,cy:i=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:h,y1:p,x2:g,y2:c,x:d,y:m})=>this.bezierCurveTo(h,p,g,c,d,m));break}default:{console.info("[PIXI.SVG] Draw command not supported:",l.code,l);break}}}}}var Ha={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},VA=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function jA(t){return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&VA.indexOf(t)>=0}function XA(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function WA(t){return(t|32)===97}function Ei(t){return t>=48&&t<=57}function qA(t){return t>=48&&t<=57||t===43||t===45||t===46}function YA(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function za(t){for(;t.index<t.max&&jA(t.path.charCodeAt(t.index));)t.index++}function KA(t){var e=t.path.charCodeAt(t.index);if(e===48){t.param=0,t.index++;return}if(e===49){t.param=1,t.index++;return}t.err="SvgPath: arc flag can be 0 or 1 only (at pos "+t.index+")"}function ZA(t){var e=t.index,r=e,n=t.max,i=!1,a=!1,u=!1,l=!1,h;if(r>=n){t.err="SvgPath: missed param (at pos "+r+")";return}if(h=t.path.charCodeAt(r),(h===43||h===45)&&(r++,h=r<n?t.path.charCodeAt(r):0),!Ei(h)&&h!==46){t.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(h!==46){if(i=h===48,r++,h=r<n?t.path.charCodeAt(r):0,i&&r<n&&h&&Ei(h)){t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+e+")";return}for(;r<n&&Ei(t.path.charCodeAt(r));)r++,a=!0;h=r<n?t.path.charCodeAt(r):0}if(h===46){for(l=!0,r++;Ei(t.path.charCodeAt(r));)r++,u=!0;h=r<n?t.path.charCodeAt(r):0}if(h===101||h===69){if(l&&!a&&!u){t.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,h=r<n?t.path.charCodeAt(r):0,(h===43||h===45)&&r++,r<n&&Ei(t.path.charCodeAt(r)))for(;r<n&&Ei(t.path.charCodeAt(r));)r++;else{t.err="SvgPath: invalid float exponent (at pos "+r+")";return}}t.index=r,t.param=parseFloat(t.path.slice(e,r))+0}function $l(t){var e,r;e=t.path[t.segmentStart],r=e.toLowerCase();var n=t.data;if(r==="m"&&n.length>2&&(t.result.push([e,n[0],n[1]]),n=n.slice(2),r="l",e=e==="m"?"l":"L"),r==="r")t.result.push([e].concat(n));else for(;n.length>=Ha[r]&&(t.result.push([e].concat(n.splice(0,Ha[r]))),!!Ha[r]););}function QA(t){var e=t.max,r,n,i,a,u;if(t.segmentStart=t.index,r=t.path.charCodeAt(t.index),n=WA(r),!XA(r)){t.err="SvgPath: bad command "+t.path[t.index]+" (at pos "+t.index+")";return}if(a=Ha[t.path[t.index].toLowerCase()],t.index++,za(t),t.data=[],!a){$l(t);return}for(i=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?KA(t):ZA(t),t.err.length){$l(t);return}t.data.push(t.param),za(t),i=!1,t.index<e&&t.path.charCodeAt(t.index)===44&&(t.index++,za(t),i=!0)}if(!i&&(t.index>=t.max||!qA(t.path.charCodeAt(t.index))))break}$l(t)}var JA=function(e){var r=new YA(e),n=r.max;for(za(r);r.index<n&&!r.err.length;)QA(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function eE(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function Tr(){if(!(this instanceof Tr))return new Tr;this.queue=[],this.cache=null}Tr.prototype.matrix=function(t){return t[0]===1&&t[1]===0&&t[2]===0&&t[3]===1&&t[4]===0&&t[5]===0?this:(this.cache=null,this.queue.push(t),this)},Tr.prototype.translate=function(t,e){return(t!==0||e!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},Tr.prototype.scale=function(t,e){return(t!==1||e!==1)&&(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},Tr.prototype.rotate=function(t,e,r){var n,i,a;return t!==0&&(this.translate(e,r),n=t*Math.PI/180,i=Math.cos(n),a=Math.sin(n),this.queue.push([i,a,-a,i,0,0]),this.cache=null,this.translate(-e,-r)),this},Tr.prototype.skewX=function(t){return t!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},Tr.prototype.skewY=function(t){return t!==0&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},Tr.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var t=1;t<this.queue.length;t++)this.cache=eE(this.cache,this.queue[t]);return this.cache},Tr.prototype.calc=function(t,e,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[t*n[0]+e*n[2]+(r?0:n[4]),t*n[1]+e*n[3]+(r?0:n[5])]):[t,e]};var jp=Tr,tE=jp,rE={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},nE=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,iE=/[\s,]+/,sE=function(e){var r=new tE,n,i;return e.split(nE).forEach(function(a){if(a.length){if(typeof rE[a]<"u"){n=a;return}switch(i=a.split(iE).map(function(u){return+u||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},bs=Math.PI*2;function Xp(t,e,r,n){var i=t*n-e*r<0?-1:1,a=t*r+e*n;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)}function aE(t,e,r,n,i,a,u,l,h,p){var g=p*(t-r)/2+h*(e-n)/2,c=-h*(t-r)/2+p*(e-n)/2,d=u*u,m=l*l,_=g*g,y=c*c,b=d*m-d*y-m*_;b<0&&(b=0),b/=d*y+m*_,b=Math.sqrt(b)*(i===a?-1:1);var x=b*u/l*c,E=b*-l/u*g,w=p*x-h*E+(t+r)/2,I=h*x+p*E+(e+n)/2,O=(g-x)/u,F=(c-E)/l,N=(-g-x)/u,L=(-c-E)/l,B=Xp(1,0,O,F),V=Xp(O,F,N,L);return a===0&&V>0&&(V-=bs),a===1&&V<0&&(V+=bs),[w,I,B,V]}function oE(t,e){var r=1.3333333333333333*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),u=Math.sin(t+e);return[n,i,n-i*r,i+n*r,a+u*r,u-a*r,a,u]}var uE=function(e,r,n,i,a,u,l,h,p){var g=Math.sin(p*bs/360),c=Math.cos(p*bs/360),d=c*(e-n)/2+g*(r-i)/2,m=-g*(e-n)/2+c*(r-i)/2;if(d===0&&m===0)return[];if(l===0||h===0)return[];l=Math.abs(l),h=Math.abs(h);var _=d*d/(l*l)+m*m/(h*h);_>1&&(l*=Math.sqrt(_),h*=Math.sqrt(_));var y=aE(e,r,n,i,a,u,l,h,g,c),b=[],x=y[2],E=y[3],w=Math.max(Math.ceil(Math.abs(E)/(bs/4)),1);E/=w;for(var I=0;I<w;I++)b.push(oE(x,E)),x+=E;return b.map(function(O){for(var F=0;F<O.length;F+=2){var N=O[F+0],L=O[F+1];N*=l,L*=h;var B=c*N-g*L,V=g*N+c*L;O[F+0]=B+y[0],O[F+1]=V+y[1]}return O})},Ts=1e-10,Wp=Math.PI/180;function ws(t,e,r){if(!(this instanceof ws))return new ws(t,e,r);this.rx=t,this.ry=e,this.ax=r}ws.prototype.transform=function(t){var e=Math.cos(this.ax*Wp),r=Math.sin(this.ax*Wp),n=[this.rx*(t[0]*e+t[2]*r),this.rx*(t[1]*e+t[3]*r),this.ry*(-t[0]*r+t[2]*e),this.ry*(-t[1]*r+t[3]*e)],i=n[0]*n[0]+n[2]*n[2],a=n[1]*n[1]+n[3]*n[3],u=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),l=(i+a)/2;if(u<Ts*l)return this.rx=this.ry=Math.sqrt(l),this.ax=0,this;var h=n[0]*n[1]+n[2]*n[3];u=Math.sqrt(u);var p=l+u/2,g=l-u/2;return this.ax=Math.abs(h)<Ts&&Math.abs(p-a)<Ts?90:Math.atan(Math.abs(h)>Math.abs(p-a)?(p-i)/h:h/(p-a))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(p),this.ry=Math.sqrt(g)):(this.ax+=90,this.rx=Math.sqrt(g),this.ry=Math.sqrt(p)),this},ws.prototype.isDegenerate=function(){return this.rx<Ts*this.ry||this.ry<Ts*this.rx};var lE=ws,cE=JA,hE=sE,ln=jp,fE=uE,dE=lE;function lt(t){if(!(this instanceof lt))return new lt(t);var e=cE(t);this.segments=e.segments,this.err=e.err,this.__stack=[]}lt.from=function(t){if(typeof t=="string")return new lt(t);if(t instanceof lt){var e=new lt("");return e.err=t.err,e.segments=t.segments.map(function(r){return r.slice()}),e.__stack=t.__stack.map(function(r){return ln().matrix(r.toArray())}),e}throw new Error("SvgPath.from: invalid param type "+t)},lt.prototype.__matrix=function(t){var e=this,r;t.queue.length&&this.iterate(function(n,i,a,u){var l,h,p,g;switch(n[0]){case"v":l=t.calc(0,n[1],!0),h=l[0]===0?["v",l[1]]:["l",l[0],l[1]];break;case"V":l=t.calc(a,n[1],!1),h=l[0]===t.calc(a,u,!1)[0]?["V",l[1]]:["L",l[0],l[1]];break;case"h":l=t.calc(n[1],0,!0),h=l[1]===0?["h",l[0]]:["l",l[0],l[1]];break;case"H":l=t.calc(n[1],u,!1),h=l[1]===t.calc(a,u,!1)[1]?["H",l[0]]:["L",l[0],l[1]];break;case"a":case"A":var c=t.toArray(),d=dE(n[1],n[2],n[3]).transform(c);if(c[0]*c[3]-c[1]*c[2]<0&&(n[5]=n[5]?"0":"1"),l=t.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===a&&n[7]===u||n[0]==="a"&&n[6]===0&&n[7]===0){h=[n[0]==="a"?"l":"L",l[0],l[1]];break}d.isDegenerate()?h=[n[0]==="a"?"l":"L",l[0],l[1]]:h=[n[0],d.rx,d.ry,d.ax,n[4],n[5],l[0],l[1]];break;case"m":g=i>0,l=t.calc(n[1],n[2],g),h=["m",l[0],l[1]];break;default:for(p=n[0],h=[p],g=p.toLowerCase()===p,r=1;r<n.length;r+=2)l=t.calc(n[r],n[r+1],g),h.push(l[0],l[1])}e.segments[i]=h},!0)},lt.prototype.__evaluateStack=function(){var t,e;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(t=ln(),e=this.__stack.length;--e>=0;)t.matrix(this.__stack[e].toArray());this.__matrix(t),this.__stack=[]}},lt.prototype.toString=function(){var t="",e="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var a=this.segments[n],u=a[0];u!==e||u==="m"||u==="M"?(u==="m"&&e==="z"&&(t+=" "),t+=u,r=!1):r=!0;for(var l=1;l<a.length;l++){var h=a[l];l===1?r&&h>=0&&(t+=" "):h>=0&&(t+=" "),t+=h}e=u}return t},lt.prototype.translate=function(t,e){return this.__stack.push(ln().translate(t,e||0)),this},lt.prototype.scale=function(t,e){return this.__stack.push(ln().scale(t,!e&&e!==0?t:e)),this},lt.prototype.rotate=function(t,e,r){return this.__stack.push(ln().rotate(t,e||0,r||0)),this},lt.prototype.skewX=function(t){return this.__stack.push(ln().skewX(t)),this},lt.prototype.skewY=function(t){return this.__stack.push(ln().skewY(t)),this},lt.prototype.matrix=function(t){return this.__stack.push(ln().matrix(t)),this},lt.prototype.transform=function(t){return t.trim()?(this.__stack.push(hE(t)),this):this},lt.prototype.round=function(t){var e=0,r=0,n=0,i=0,a;return t=t||0,this.__evaluateStack(),this.segments.forEach(function(u){var l=u[0].toLowerCase()===u[0];switch(u[0]){case"H":case"h":l&&(u[1]+=n),n=u[1]-u[1].toFixed(t),u[1]=+u[1].toFixed(t);return;case"V":case"v":l&&(u[1]+=i),i=u[1]-u[1].toFixed(t),u[1]=+u[1].toFixed(t);return;case"Z":case"z":n=e,i=r;return;case"M":case"m":l&&(u[1]+=n,u[2]+=i),n=u[1]-u[1].toFixed(t),i=u[2]-u[2].toFixed(t),e=n,r=i,u[1]=+u[1].toFixed(t),u[2]=+u[2].toFixed(t);return;case"A":case"a":l&&(u[6]+=n,u[7]+=i),n=u[6]-u[6].toFixed(t),i=u[7]-u[7].toFixed(t),u[1]=+u[1].toFixed(t),u[2]=+u[2].toFixed(t),u[3]=+u[3].toFixed(t+2),u[6]=+u[6].toFixed(t),u[7]=+u[7].toFixed(t);return;default:a=u.length,l&&(u[a-2]+=n,u[a-1]+=i),n=u[a-2]-u[a-2].toFixed(t),i=u[a-1]-u[a-1].toFixed(t),u.forEach(function(h,p){p&&(u[p]=+u[p].toFixed(t))});return}}),this},lt.prototype.iterate=function(t,e){var r=this.segments,n={},i=!1,a=0,u=0,l=0,h=0,p,g,c;if(e||this.__evaluateStack(),r.forEach(function(d,m){var _=t(d,m,a,u);Array.isArray(_)&&(n[m]=_,i=!0);var y=d[0]===d[0].toLowerCase();switch(d[0]){case"m":case"M":a=d[1]+(y?a:0),u=d[2]+(y?u:0),l=a,h=u;return;case"h":case"H":a=d[1]+(y?a:0);return;case"v":case"V":u=d[1]+(y?u:0);return;case"z":case"Z":a=l,u=h;return;default:a=d[d.length-2]+(y?a:0),u=d[d.length-1]+(y?u:0)}}),!i)return this;for(c=[],p=0;p<r.length;p++)if(typeof n[p]<"u")for(g=0;g<n[p].length;g++)c.push(n[p][g]);else c.push(r[p]);return this.segments=c,this},lt.prototype.abs=function(){return this.iterate(function(t,e,r,n){var i=t[0],a=i.toUpperCase(),u;if(i!==a)switch(t[0]=a,i){case"v":t[1]+=n;return;case"a":t[6]+=r,t[7]+=n;return;default:for(u=1;u<t.length;u++)t[u]+=u%2?r:n}},!0),this},lt.prototype.rel=function(){return this.iterate(function(t,e,r,n){var i=t[0],a=i.toLowerCase(),u;if(i!==a&&!(e===0&&i==="M"))switch(t[0]=a,i){case"V":t[1]-=n;return;case"A":t[6]-=r,t[7]-=n;return;default:for(u=1;u<t.length;u++)t[u]-=u%2?r:n}},!0),this},lt.prototype.unarc=function(){return this.iterate(function(t,e,r,n){var i,a,u,l=[],h=t[0];return h!=="A"&&h!=="a"?null:(h==="a"?(a=r+t[6],u=n+t[7]):(a=t[6],u=t[7]),i=fE(r,n,a,u,t[4],t[5],t[1],t[2],t[3]),i.length===0?[[t[0]==="a"?"l":"L",t[6],t[7]]]:(i.forEach(function(p){l.push(["C",p[2],p[3],p[4],p[5],p[6],p[7]])}),l))}),this},lt.prototype.unshort=function(){var t=this.segments,e,r,n,i,a;return this.iterate(function(u,l,h,p){var g=u[0],c=g.toUpperCase(),d;l&&(c==="T"?(d=g==="t",n=t[l-1],n[0]==="Q"?(e=n[1]-h,r=n[2]-p):n[0]==="q"?(e=n[1]-n[3],r=n[2]-n[4]):(e=0,r=0),i=-e,a=-r,d||(i+=h,a+=p),t[l]=[d?"q":"Q",i,a,u[1],u[2]]):c==="S"&&(d=g==="s",n=t[l-1],n[0]==="C"?(e=n[3]-h,r=n[4]-p):n[0]==="c"?(e=n[3]-n[5],r=n[4]-n[6]):(e=0,r=0),i=-e,a=-r,d||(i+=h,a+=p),t[l]=[d?"c":"C",i,a,u[1],u[2],u[3],u[4]]))}),this};var pE=lt,gE=pE;const mE=Zn(gE),vE=re.forwardRef((t,e)=>{const[r,n]=re.useState(null),i=W.useRef(null),a=W.useRef(null),u=W.useRef(null),{path:l,visible:h,disabled:p,transformation:{x:g,y:c,width:d,height:m,anchor:_,hexColor:y,fill:b,stroke:x="none",strokeWidth:E=0,colorCorrection:w={}},pointerdown:I,pointerup:O}=t,F=ke.useApp(),{temperatureFilter:N,sharpnessFilter:L,hueFilter:B,blurFilter:V,adjustmentFilter:Y,vignetteFilter:ae,noiseFilter:j}=Bn(w),{blurRadius:G=0,vignette:se=0,noise:ie=0}=w;return re.useEffect(()=>{const H=mE(l).scale(5).translate(0,0).toString(),J=`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${m}">
1962
1946
  <path stroke="${x}" stroke-width="${E}" fill="${y||b}" d="${H}">
1963
1947
  </path>
1964
- </svg>`,pe=new VI(Q),W=F.renderer.generateTexture(pe);return n(W),()=>{}},[F,l,x,E,y,b]),Ae.jsx(rn,{...t,ref:e,children:Ae.jsx(Be.Container,{ref:a,children:Ae.jsx(Be.Container,{ref:u,children:r&&Ae.jsx(Be.Sprite,{texture:r,width:d,height:m,anchor:_,ref:i,x:g,y:c,alpha:f?1:0,...!p&&f&&{interactive:!0,pointerdown:I,pointerup:O},filters:[N,L,D,Y,...G>0?[V]:[],...ae>0?[ie]:[],...se>0?[j]:[]]})})})})});var yg={};/*!
1948
+ </svg>`,ge=new zA(J),X=F.renderer.generateTexture(ge);return n(X),()=>{}},[F,l,x,E,y,b]),we.jsx(en,{...t,ref:e,children:we.jsx(ke.Container,{ref:a,children:we.jsx(ke.Container,{ref:u,children:r&&we.jsx(ke.Sprite,{texture:r,width:d,height:m,anchor:_,ref:i,x:g,y:c,alpha:h?1:0,...!p&&h&&{interactive:!0,pointerdown:I,pointerup:O},filters:[N,L,B,Y,...G>0?[V]:[],...se>0?[ae]:[],...ie>0?[j]:[]]})})})})});var qp={};/*!
1965
1949
  * howler.js v2.2.3
1966
1950
  * howlerjs.com
1967
1951
  *
@@ -1969,7 +1953,7 @@ void main() {
1969
1953
  * goldfirestudios.com
1970
1954
  *
1971
1955
  * MIT License
1972
- */(function(t){(function(){var e=function(){this.init()};e.prototype={init:function(){var c=this||r;return c._counter=1e3,c._html5AudioPool=[],c.html5PoolSize=10,c._codecs={},c._howls=[],c._muted=!1,c._volume=1,c._canPlayEvent="canplaythrough",c._navigator=typeof window<"u"&&window.navigator?window.navigator:null,c.masterGain=null,c.noAudio=!1,c.usingWebAudio=!0,c.autoSuspend=!0,c.ctx=null,c.autoUnlock=!0,c._setup(),c},volume:function(c){var d=this||r;if(c=parseFloat(c),d.ctx||g(),typeof c<"u"&&c>=0&&c<=1){if(d._volume=c,d._muted)return d;d.usingWebAudio&&d.masterGain.gain.setValueAtTime(c,r.ctx.currentTime);for(var m=0;m<d._howls.length;m++)if(!d._howls[m]._webAudio)for(var _=d._howls[m]._getSoundIds(),y=0;y<_.length;y++){var b=d._howls[m]._soundById(_[y]);b&&b._node&&(b._node.volume=b._volume*c)}return d}return d._volume},mute:function(c){var d=this||r;d.ctx||g(),d._muted=c,d.usingWebAudio&&d.masterGain.gain.setValueAtTime(c?0:d._volume,r.ctx.currentTime);for(var m=0;m<d._howls.length;m++)if(!d._howls[m]._webAudio)for(var _=d._howls[m]._getSoundIds(),y=0;y<_.length;y++){var b=d._howls[m]._soundById(_[y]);b&&b._node&&(b._node.muted=c?!0:b._muted)}return d},stop:function(){for(var c=this||r,d=0;d<c._howls.length;d++)c._howls[d].stop();return c},unload:function(){for(var c=this||r,d=c._howls.length-1;d>=0;d--)c._howls[d].unload();return c.usingWebAudio&&c.ctx&&typeof c.ctx.close<"u"&&(c.ctx.close(),c.ctx=null,g()),c},codecs:function(c){return(this||r)._codecs[c.replace(/^x-/,"")]},_setup:function(){var c=this||r;if(c.state=c.ctx&&c.ctx.state||"suspended",c._autoSuspend(),!c.usingWebAudio)if(typeof Audio<"u")try{var d=new Audio;typeof d.oncanplaythrough>"u"&&(c._canPlayEvent="canplay")}catch{c.noAudio=!0}else c.noAudio=!0;try{var d=new Audio;d.muted&&(c.noAudio=!0)}catch{}return c.noAudio||c._setupCodecs(),c},_setupCodecs:function(){var c=this||r,d=null;try{d=typeof Audio<"u"?new Audio:null}catch{return c}if(!d||typeof d.canPlayType!="function")return c;var m=d.canPlayType("audio/mpeg;").replace(/^no$/,""),_=c._navigator?c._navigator.userAgent:"",y=_.match(/OPR\/([0-6].)/g),b=y&&parseInt(y[0].split("/")[1],10)<33,x=_.indexOf("Safari")!==-1&&_.indexOf("Chrome")===-1,E=_.match(/Version\/(.*?) /),w=x&&E&&parseInt(E[1],10)<15;return c._codecs={mp3:!!(!b&&(m||d.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!m,opus:!!d.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(d.canPlayType('audio/wav; codecs="1"')||d.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!d.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!d.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(d.canPlayType("audio/x-m4a;")||d.canPlayType("audio/m4a;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(d.canPlayType("audio/x-m4b;")||d.canPlayType("audio/m4b;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(d.canPlayType("audio/x-mp4;")||d.canPlayType("audio/mp4;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!w&&d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!w&&d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!d.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(d.canPlayType("audio/x-flac;")||d.canPlayType("audio/flac;")).replace(/^no$/,"")},c},_unlockAudio:function(){var c=this||r;if(!(c._audioUnlocked||!c.ctx)){c._audioUnlocked=!1,c.autoUnlock=!1,!c._mobileUnloaded&&c.ctx.sampleRate!==44100&&(c._mobileUnloaded=!0,c.unload()),c._scratchBuffer=c.ctx.createBuffer(1,1,22050);var d=function(m){for(;c._html5AudioPool.length<c.html5PoolSize;)try{var _=new Audio;_._unlocked=!0,c._releaseHtml5Audio(_)}catch{c.noAudio=!0;break}for(var y=0;y<c._howls.length;y++)if(!c._howls[y]._webAudio)for(var b=c._howls[y]._getSoundIds(),x=0;x<b.length;x++){var E=c._howls[y]._soundById(b[x]);E&&E._node&&!E._node._unlocked&&(E._node._unlocked=!0,E._node.load())}c._autoResume();var w=c.ctx.createBufferSource();w.buffer=c._scratchBuffer,w.connect(c.ctx.destination),typeof w.start>"u"?w.noteOn(0):w.start(0),typeof c.ctx.resume=="function"&&c.ctx.resume(),w.onended=function(){w.disconnect(0),c._audioUnlocked=!0,document.removeEventListener("touchstart",d,!0),document.removeEventListener("touchend",d,!0),document.removeEventListener("click",d,!0),document.removeEventListener("keydown",d,!0);for(var I=0;I<c._howls.length;I++)c._howls[I]._emit("unlock")}};return document.addEventListener("touchstart",d,!0),document.addEventListener("touchend",d,!0),document.addEventListener("click",d,!0),document.addEventListener("keydown",d,!0),c}},_obtainHtml5Audio:function(){var c=this||r;if(c._html5AudioPool.length)return c._html5AudioPool.pop();var d=new Audio().play();return d&&typeof Promise<"u"&&(d instanceof Promise||typeof d.then=="function")&&d.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(c){var d=this||r;return c._unlocked&&d._html5AudioPool.push(c),d},_autoSuspend:function(){var c=this;if(!(!c.autoSuspend||!c.ctx||typeof c.ctx.suspend>"u"||!r.usingWebAudio)){for(var d=0;d<c._howls.length;d++)if(c._howls[d]._webAudio){for(var m=0;m<c._howls[d]._sounds.length;m++)if(!c._howls[d]._sounds[m]._paused)return c}return c._suspendTimer&&clearTimeout(c._suspendTimer),c._suspendTimer=setTimeout(function(){if(c.autoSuspend){c._suspendTimer=null,c.state="suspending";var _=function(){c.state="suspended",c._resumeAfterSuspend&&(delete c._resumeAfterSuspend,c._autoResume())};c.ctx.suspend().then(_,_)}},3e4),c}},_autoResume:function(){var c=this;if(!(!c.ctx||typeof c.ctx.resume>"u"||!r.usingWebAudio))return c.state==="running"&&c.ctx.state!=="interrupted"&&c._suspendTimer?(clearTimeout(c._suspendTimer),c._suspendTimer=null):c.state==="suspended"||c.state==="running"&&c.ctx.state==="interrupted"?(c.ctx.resume().then(function(){c.state="running";for(var d=0;d<c._howls.length;d++)c._howls[d]._emit("resume")}),c._suspendTimer&&(clearTimeout(c._suspendTimer),c._suspendTimer=null)):c.state==="suspending"&&(c._resumeAfterSuspend=!0),c}};var r=new e,n=function(c){var d=this;if(!c.src||c.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}d.init(c)};n.prototype={init:function(c){var d=this;return r.ctx||g(),d._autoplay=c.autoplay||!1,d._format=typeof c.format!="string"?c.format:[c.format],d._html5=c.html5||!1,d._muted=c.mute||!1,d._loop=c.loop||!1,d._pool=c.pool||5,d._preload=typeof c.preload=="boolean"||c.preload==="metadata"?c.preload:!0,d._rate=c.rate||1,d._sprite=c.sprite||{},d._src=typeof c.src!="string"?c.src:[c.src],d._volume=c.volume!==void 0?c.volume:1,d._xhr={method:c.xhr&&c.xhr.method?c.xhr.method:"GET",headers:c.xhr&&c.xhr.headers?c.xhr.headers:null,withCredentials:c.xhr&&c.xhr.withCredentials?c.xhr.withCredentials:!1},d._duration=0,d._state="unloaded",d._sounds=[],d._endTimers={},d._queue=[],d._playLock=!1,d._onend=c.onend?[{fn:c.onend}]:[],d._onfade=c.onfade?[{fn:c.onfade}]:[],d._onload=c.onload?[{fn:c.onload}]:[],d._onloaderror=c.onloaderror?[{fn:c.onloaderror}]:[],d._onplayerror=c.onplayerror?[{fn:c.onplayerror}]:[],d._onpause=c.onpause?[{fn:c.onpause}]:[],d._onplay=c.onplay?[{fn:c.onplay}]:[],d._onstop=c.onstop?[{fn:c.onstop}]:[],d._onmute=c.onmute?[{fn:c.onmute}]:[],d._onvolume=c.onvolume?[{fn:c.onvolume}]:[],d._onrate=c.onrate?[{fn:c.onrate}]:[],d._onseek=c.onseek?[{fn:c.onseek}]:[],d._onunlock=c.onunlock?[{fn:c.onunlock}]:[],d._onresume=[],d._webAudio=r.usingWebAudio&&!d._html5,typeof r.ctx<"u"&&r.ctx&&r.autoUnlock&&r._unlockAudio(),r._howls.push(d),d._autoplay&&d._queue.push({event:"play",action:function(){d.play()}}),d._preload&&d._preload!=="none"&&d.load(),d},load:function(){var c=this,d=null;if(r.noAudio){c._emit("loaderror",null,"No audio support.");return}typeof c._src=="string"&&(c._src=[c._src]);for(var m=0;m<c._src.length;m++){var _,y;if(c._format&&c._format[m])_=c._format[m];else{if(y=c._src[m],typeof y!="string"){c._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}_=/^data:audio\/([^;,]+);/i.exec(y),_||(_=/\.([^.]+)$/.exec(y.split("?",1)[0])),_&&(_=_[1].toLowerCase())}if(_||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),_&&r.codecs(_)){d=c._src[m];break}}if(!d){c._emit("loaderror",null,"No codec support for selected audio sources.");return}return c._src=d,c._state="loading",window.location.protocol==="https:"&&d.slice(0,5)==="http:"&&(c._html5=!0,c._webAudio=!1),new i(c),c._webAudio&&u(c),c},play:function(c,d){var m=this,_=null;if(typeof c=="number")_=c,c=null;else{if(typeof c=="string"&&m._state==="loaded"&&!m._sprite[c])return null;if(typeof c>"u"&&(c="__default",!m._playLock)){for(var y=0,b=0;b<m._sounds.length;b++)m._sounds[b]._paused&&!m._sounds[b]._ended&&(y++,_=m._sounds[b]._id);y===1?c=null:_=null}}var x=_?m._soundById(_):m._inactiveSound();if(!x)return null;if(_&&!c&&(c=x._sprite||"__default"),m._state!=="loaded"){x._sprite=c,x._ended=!1;var E=x._id;return m._queue.push({event:"play",action:function(){m.play(E)}}),E}if(_&&!x._paused)return d||m._loadQueue("play"),x._id;m._webAudio&&r._autoResume();var w=Math.max(0,x._seek>0?x._seek:m._sprite[c][0]/1e3),I=Math.max(0,(m._sprite[c][0]+m._sprite[c][1])/1e3-w),O=I*1e3/Math.abs(x._rate),F=m._sprite[c][0]/1e3,N=(m._sprite[c][0]+m._sprite[c][1])/1e3;x._sprite=c,x._ended=!1;var L=function(){x._paused=!1,x._seek=w,x._start=F,x._stop=N,x._loop=!!(x._loop||m._sprite[c][2])};if(w>=N){m._ended(x);return}var D=x._node;if(m._webAudio){var V=function(){m._playLock=!1,L(),m._refreshBuffer(x);var G=x._muted||m._muted?0:x._volume;D.gain.setValueAtTime(G,r.ctx.currentTime),x._playStart=r.ctx.currentTime,typeof D.bufferSource.start>"u"?x._loop?D.bufferSource.noteGrainOn(0,w,86400):D.bufferSource.noteGrainOn(0,w,I):x._loop?D.bufferSource.start(0,w,86400):D.bufferSource.start(0,w,I),O!==1/0&&(m._endTimers[x._id]=setTimeout(m._ended.bind(m,x),O)),d||setTimeout(function(){m._emit("play",x._id),m._loadQueue()},0)};r.state==="running"&&r.ctx.state!=="interrupted"?V():(m._playLock=!0,m.once("resume",V),m._clearTimer(x._id))}else{var Y=function(){D.currentTime=w,D.muted=x._muted||m._muted||r._muted||D.muted,D.volume=x._volume*r.volume(),D.playbackRate=x._rate;try{var G=D.play();if(G&&typeof Promise<"u"&&(G instanceof Promise||typeof G.then=="function")?(m._playLock=!0,L(),G.then(function(){m._playLock=!1,D._unlocked=!0,d?m._loadQueue():m._emit("play",x._id)}).catch(function(){m._playLock=!1,m._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),x._ended=!0,x._paused=!0})):d||(m._playLock=!1,L(),m._emit("play",x._id)),D.playbackRate=x._rate,D.paused){m._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}c!=="__default"||x._loop?m._endTimers[x._id]=setTimeout(m._ended.bind(m,x),O):(m._endTimers[x._id]=function(){m._ended(x),D.removeEventListener("ended",m._endTimers[x._id],!1)},D.addEventListener("ended",m._endTimers[x._id],!1))}catch(ae){m._emit("playerror",x._id,ae)}};D.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(D.src=m._src,D.load());var ie=window&&window.ejecta||!D.readyState&&r._navigator.isCocoonJS;if(D.readyState>=3||ie)Y();else{m._playLock=!0,m._state="loading";var j=function(){m._state="loaded",Y(),D.removeEventListener(r._canPlayEvent,j,!1)};D.addEventListener(r._canPlayEvent,j,!1),m._clearTimer(x._id)}}return x._id},pause:function(c){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"pause",action:function(){d.pause(c)}}),d;for(var m=d._getSoundIds(c),_=0;_<m.length;_++){d._clearTimer(m[_]);var y=d._soundById(m[_]);if(y&&!y._paused&&(y._seek=d.seek(m[_]),y._rateSeek=0,y._paused=!0,d._stopFade(m[_]),y._node))if(d._webAudio){if(!y._node.bufferSource)continue;typeof y._node.bufferSource.stop>"u"?y._node.bufferSource.noteOff(0):y._node.bufferSource.stop(0),d._cleanBuffer(y._node)}else(!isNaN(y._node.duration)||y._node.duration===1/0)&&y._node.pause();arguments[1]||d._emit("pause",y?y._id:null)}return d},stop:function(c,d){var m=this;if(m._state!=="loaded"||m._playLock)return m._queue.push({event:"stop",action:function(){m.stop(c)}}),m;for(var _=m._getSoundIds(c),y=0;y<_.length;y++){m._clearTimer(_[y]);var b=m._soundById(_[y]);b&&(b._seek=b._start||0,b._rateSeek=0,b._paused=!0,b._ended=!0,m._stopFade(_[y]),b._node&&(m._webAudio?b._node.bufferSource&&(typeof b._node.bufferSource.stop>"u"?b._node.bufferSource.noteOff(0):b._node.bufferSource.stop(0),m._cleanBuffer(b._node)):(!isNaN(b._node.duration)||b._node.duration===1/0)&&(b._node.currentTime=b._start||0,b._node.pause(),b._node.duration===1/0&&m._clearSound(b._node))),d||m._emit("stop",b._id))}return m},mute:function(c,d){var m=this;if(m._state!=="loaded"||m._playLock)return m._queue.push({event:"mute",action:function(){m.mute(c,d)}}),m;if(typeof d>"u")if(typeof c=="boolean")m._muted=c;else return m._muted;for(var _=m._getSoundIds(d),y=0;y<_.length;y++){var b=m._soundById(_[y]);b&&(b._muted=c,b._interval&&m._stopFade(b._id),m._webAudio&&b._node?b._node.gain.setValueAtTime(c?0:b._volume,r.ctx.currentTime):b._node&&(b._node.muted=r._muted?!0:c),m._emit("mute",b._id))}return m},volume:function(){var c=this,d=arguments,m,_;if(d.length===0)return c._volume;if(d.length===1||d.length===2&&typeof d[1]>"u"){var y=c._getSoundIds(),b=y.indexOf(d[0]);b>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length>=2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var x;if(typeof m<"u"&&m>=0&&m<=1){if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"volume",action:function(){c.volume.apply(c,d)}}),c;typeof _>"u"&&(c._volume=m),_=c._getSoundIds(_);for(var E=0;E<_.length;E++)x=c._soundById(_[E]),x&&(x._volume=m,d[2]||c._stopFade(_[E]),c._webAudio&&x._node&&!x._muted?x._node.gain.setValueAtTime(m,r.ctx.currentTime):x._node&&!x._muted&&(x._node.volume=m*r.volume()),c._emit("volume",x._id))}else return x=_?c._soundById(_):c._sounds[0],x?x._volume:0;return c},fade:function(c,d,m,_){var y=this;if(y._state!=="loaded"||y._playLock)return y._queue.push({event:"fade",action:function(){y.fade(c,d,m,_)}}),y;c=Math.min(Math.max(0,parseFloat(c)),1),d=Math.min(Math.max(0,parseFloat(d)),1),m=parseFloat(m),y.volume(c,_);for(var b=y._getSoundIds(_),x=0;x<b.length;x++){var E=y._soundById(b[x]);if(E){if(_||y._stopFade(b[x]),y._webAudio&&!E._muted){var w=r.ctx.currentTime,I=w+m/1e3;E._volume=c,E._node.gain.setValueAtTime(c,w),E._node.gain.linearRampToValueAtTime(d,I)}y._startFadeInterval(E,c,d,m,b[x],typeof _>"u")}}return y},_startFadeInterval:function(c,d,m,_,y,b){var x=this,E=d,w=m-d,I=Math.abs(w/.01),O=Math.max(4,I>0?_/I:_),F=Date.now();c._fadeTo=m,c._interval=setInterval(function(){var N=(Date.now()-F)/_;F=Date.now(),E+=w*N,E=Math.round(E*100)/100,w<0?E=Math.max(m,E):E=Math.min(m,E),x._webAudio?c._volume=E:x.volume(E,c._id,!0),b&&(x._volume=E),(m<d&&E<=m||m>d&&E>=m)&&(clearInterval(c._interval),c._interval=null,c._fadeTo=null,x.volume(m,c._id),x._emit("fade",c._id))},O)},_stopFade:function(c){var d=this,m=d._soundById(c);return m&&m._interval&&(d._webAudio&&m._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(m._interval),m._interval=null,d.volume(m._fadeTo,c),m._fadeTo=null,d._emit("fade",c)),d},loop:function(){var c=this,d=arguments,m,_,y;if(d.length===0)return c._loop;if(d.length===1)if(typeof d[0]=="boolean")m=d[0],c._loop=m;else return y=c._soundById(parseInt(d[0],10)),y?y._loop:!1;else d.length===2&&(m=d[0],_=parseInt(d[1],10));for(var b=c._getSoundIds(_),x=0;x<b.length;x++)y=c._soundById(b[x]),y&&(y._loop=m,c._webAudio&&y._node&&y._node.bufferSource&&(y._node.bufferSource.loop=m,m&&(y._node.bufferSource.loopStart=y._start||0,y._node.bufferSource.loopEnd=y._stop,c.playing(b[x])&&(c.pause(b[x],!0),c.play(b[x],!0)))));return c},rate:function(){var c=this,d=arguments,m,_;if(d.length===0)_=c._sounds[0]._id;else if(d.length===1){var y=c._getSoundIds(),b=y.indexOf(d[0]);b>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var x;if(typeof m=="number"){if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"rate",action:function(){c.rate.apply(c,d)}}),c;typeof _>"u"&&(c._rate=m),_=c._getSoundIds(_);for(var E=0;E<_.length;E++)if(x=c._soundById(_[E]),x){c.playing(_[E])&&(x._rateSeek=c.seek(_[E]),x._playStart=c._webAudio?r.ctx.currentTime:x._playStart),x._rate=m,c._webAudio&&x._node&&x._node.bufferSource?x._node.bufferSource.playbackRate.setValueAtTime(m,r.ctx.currentTime):x._node&&(x._node.playbackRate=m);var w=c.seek(_[E]),I=(c._sprite[x._sprite][0]+c._sprite[x._sprite][1])/1e3-w,O=I*1e3/Math.abs(x._rate);(c._endTimers[_[E]]||!x._paused)&&(c._clearTimer(_[E]),c._endTimers[_[E]]=setTimeout(c._ended.bind(c,x),O)),c._emit("rate",x._id)}}else return x=c._soundById(_),x?x._rate:c._rate;return c},seek:function(){var c=this,d=arguments,m,_;if(d.length===0)c._sounds.length&&(_=c._sounds[0]._id);else if(d.length===1){var y=c._getSoundIds(),b=y.indexOf(d[0]);b>=0?_=parseInt(d[0],10):c._sounds.length&&(_=c._sounds[0]._id,m=parseFloat(d[0]))}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));if(typeof _>"u")return 0;if(typeof m=="number"&&(c._state!=="loaded"||c._playLock))return c._queue.push({event:"seek",action:function(){c.seek.apply(c,d)}}),c;var x=c._soundById(_);if(x)if(typeof m=="number"&&m>=0){var E=c.playing(_);E&&c.pause(_,!0),x._seek=m,x._ended=!1,c._clearTimer(_),!c._webAudio&&x._node&&!isNaN(x._node.duration)&&(x._node.currentTime=m);var w=function(){E&&c.play(_,!0),c._emit("seek",_)};if(E&&!c._webAudio){var I=function(){c._playLock?setTimeout(I,0):w()};setTimeout(I,0)}else w()}else if(c._webAudio){var O=c.playing(_)?r.ctx.currentTime-x._playStart:0,F=x._rateSeek?x._rateSeek-x._seek:0;return x._seek+(F+O*Math.abs(x._rate))}else return x._node.currentTime;return c},playing:function(c){var d=this;if(typeof c=="number"){var m=d._soundById(c);return m?!m._paused:!1}for(var _=0;_<d._sounds.length;_++)if(!d._sounds[_]._paused)return!0;return!1},duration:function(c){var d=this,m=d._duration,_=d._soundById(c);return _&&(m=d._sprite[_._sprite][1]/1e3),m},state:function(){return this._state},unload:function(){for(var c=this,d=c._sounds,m=0;m<d.length;m++)d[m]._paused||c.stop(d[m]._id),c._webAudio||(c._clearSound(d[m]._node),d[m]._node.removeEventListener("error",d[m]._errorFn,!1),d[m]._node.removeEventListener(r._canPlayEvent,d[m]._loadFn,!1),d[m]._node.removeEventListener("ended",d[m]._endFn,!1),r._releaseHtml5Audio(d[m]._node)),delete d[m]._node,c._clearTimer(d[m]._id);var _=r._howls.indexOf(c);_>=0&&r._howls.splice(_,1);var y=!0;for(m=0;m<r._howls.length;m++)if(r._howls[m]._src===c._src||c._src.indexOf(r._howls[m]._src)>=0){y=!1;break}return a&&y&&delete a[c._src],r.noAudio=!1,c._state="unloaded",c._sounds=[],c=null,null},on:function(c,d,m,_){var y=this,b=y["_on"+c];return typeof d=="function"&&b.push(_?{id:m,fn:d,once:_}:{id:m,fn:d}),y},off:function(c,d,m){var _=this,y=_["_on"+c],b=0;if(typeof d=="number"&&(m=d,d=null),d||m)for(b=0;b<y.length;b++){var x=m===y[b].id;if(d===y[b].fn&&x||!d&&x){y.splice(b,1);break}}else if(c)_["_on"+c]=[];else{var E=Object.keys(_);for(b=0;b<E.length;b++)E[b].indexOf("_on")===0&&Array.isArray(_[E[b]])&&(_[E[b]]=[])}return _},once:function(c,d,m){var _=this;return _.on(c,d,m,1),_},_emit:function(c,d,m){for(var _=this,y=_["_on"+c],b=y.length-1;b>=0;b--)(!y[b].id||y[b].id===d||c==="load")&&(setTimeout((function(x){x.call(this,d,m)}).bind(_,y[b].fn),0),y[b].once&&_.off(c,y[b].fn,y[b].id));return _._loadQueue(c),_},_loadQueue:function(c){var d=this;if(d._queue.length>0){var m=d._queue[0];m.event===c&&(d._queue.shift(),d._loadQueue()),c||m.action()}return d},_ended:function(c){var d=this,m=c._sprite;if(!d._webAudio&&c._node&&!c._node.paused&&!c._node.ended&&c._node.currentTime<c._stop)return setTimeout(d._ended.bind(d,c),100),d;var _=!!(c._loop||d._sprite[m][2]);if(d._emit("end",c._id),!d._webAudio&&_&&d.stop(c._id,!0).play(c._id),d._webAudio&&_){d._emit("play",c._id),c._seek=c._start||0,c._rateSeek=0,c._playStart=r.ctx.currentTime;var y=(c._stop-c._start)*1e3/Math.abs(c._rate);d._endTimers[c._id]=setTimeout(d._ended.bind(d,c),y)}return d._webAudio&&!_&&(c._paused=!0,c._ended=!0,c._seek=c._start||0,c._rateSeek=0,d._clearTimer(c._id),d._cleanBuffer(c._node),r._autoSuspend()),!d._webAudio&&!_&&d.stop(c._id,!0),d},_clearTimer:function(c){var d=this;if(d._endTimers[c]){if(typeof d._endTimers[c]!="function")clearTimeout(d._endTimers[c]);else{var m=d._soundById(c);m&&m._node&&m._node.removeEventListener("ended",d._endTimers[c],!1)}delete d._endTimers[c]}return d},_soundById:function(c){for(var d=this,m=0;m<d._sounds.length;m++)if(c===d._sounds[m]._id)return d._sounds[m];return null},_inactiveSound:function(){var c=this;c._drain();for(var d=0;d<c._sounds.length;d++)if(c._sounds[d]._ended)return c._sounds[d].reset();return new i(c)},_drain:function(){var c=this,d=c._pool,m=0,_=0;if(!(c._sounds.length<d)){for(_=0;_<c._sounds.length;_++)c._sounds[_]._ended&&m++;for(_=c._sounds.length-1;_>=0;_--){if(m<=d)return;c._sounds[_]._ended&&(c._webAudio&&c._sounds[_]._node&&c._sounds[_]._node.disconnect(0),c._sounds.splice(_,1),m--)}}},_getSoundIds:function(c){var d=this;if(typeof c>"u"){for(var m=[],_=0;_<d._sounds.length;_++)m.push(d._sounds[_]._id);return m}else return[c]},_refreshBuffer:function(c){var d=this;return c._node.bufferSource=r.ctx.createBufferSource(),c._node.bufferSource.buffer=a[d._src],c._panner?c._node.bufferSource.connect(c._panner):c._node.bufferSource.connect(c._node),c._node.bufferSource.loop=c._loop,c._loop&&(c._node.bufferSource.loopStart=c._start||0,c._node.bufferSource.loopEnd=c._stop||0),c._node.bufferSource.playbackRate.setValueAtTime(c._rate,r.ctx.currentTime),d},_cleanBuffer:function(c){var d=this,m=r._navigator&&r._navigator.vendor.indexOf("Apple")>=0;if(r._scratchBuffer&&c.bufferSource&&(c.bufferSource.onended=null,c.bufferSource.disconnect(0),m))try{c.bufferSource.buffer=r._scratchBuffer}catch{}return c.bufferSource=null,d},_clearSound:function(c){var d=/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent);d||(c.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var i=function(c){this._parent=c,this.init()};i.prototype={init:function(){var c=this,d=c._parent;return c._muted=d._muted,c._loop=d._loop,c._volume=d._volume,c._rate=d._rate,c._seek=0,c._paused=!0,c._ended=!0,c._sprite="__default",c._id=++r._counter,d._sounds.push(c),c.create(),c},create:function(){var c=this,d=c._parent,m=r._muted||c._muted||c._parent._muted?0:c._volume;return d._webAudio?(c._node=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),c._node.gain.setValueAtTime(m,r.ctx.currentTime),c._node.paused=!0,c._node.connect(r.masterGain)):r.noAudio||(c._node=r._obtainHtml5Audio(),c._errorFn=c._errorListener.bind(c),c._node.addEventListener("error",c._errorFn,!1),c._loadFn=c._loadListener.bind(c),c._node.addEventListener(r._canPlayEvent,c._loadFn,!1),c._endFn=c._endListener.bind(c),c._node.addEventListener("ended",c._endFn,!1),c._node.src=d._src,c._node.preload=d._preload===!0?"auto":d._preload,c._node.volume=m*r.volume(),c._node.load()),c},reset:function(){var c=this,d=c._parent;return c._muted=d._muted,c._loop=d._loop,c._volume=d._volume,c._rate=d._rate,c._seek=0,c._rateSeek=0,c._paused=!0,c._ended=!0,c._sprite="__default",c._id=++r._counter,c},_errorListener:function(){var c=this;c._parent._emit("loaderror",c._id,c._node.error?c._node.error.code:0),c._node.removeEventListener("error",c._errorFn,!1)},_loadListener:function(){var c=this,d=c._parent;d._duration=Math.ceil(c._node.duration*10)/10,Object.keys(d._sprite).length===0&&(d._sprite={__default:[0,d._duration*1e3]}),d._state!=="loaded"&&(d._state="loaded",d._emit("load"),d._loadQueue()),c._node.removeEventListener(r._canPlayEvent,c._loadFn,!1)},_endListener:function(){var c=this,d=c._parent;d._duration===1/0&&(d._duration=Math.ceil(c._node.duration*10)/10,d._sprite.__default[1]===1/0&&(d._sprite.__default[1]=d._duration*1e3),d._ended(c)),c._node.removeEventListener("ended",c._endFn,!1)}};var a={},u=function(c){var d=c._src;if(a[d]){c._duration=a[d].duration,p(c);return}if(/^data:[^;]+;base64,/.test(d)){for(var m=atob(d.split(",")[1]),_=new Uint8Array(m.length),y=0;y<m.length;++y)_[y]=m.charCodeAt(y);f(_.buffer,c)}else{var b=new XMLHttpRequest;b.open(c._xhr.method,d,!0),b.withCredentials=c._xhr.withCredentials,b.responseType="arraybuffer",c._xhr.headers&&Object.keys(c._xhr.headers).forEach(function(x){b.setRequestHeader(x,c._xhr.headers[x])}),b.onload=function(){var x=(b.status+"")[0];if(x!=="0"&&x!=="2"&&x!=="3"){c._emit("loaderror",null,"Failed loading audio file with status: "+b.status+".");return}f(b.response,c)},b.onerror=function(){c._webAudio&&(c._html5=!0,c._webAudio=!1,c._sounds=[],delete a[d],c.load())},l(b)}},l=function(c){try{c.send()}catch{c.onerror()}},f=function(c,d){var m=function(){d._emit("loaderror",null,"Decoding audio data failed.")},_=function(y){y&&d._sounds.length>0?(a[d._src]=y,p(d,y)):m()};typeof Promise<"u"&&r.ctx.decodeAudioData.length===1?r.ctx.decodeAudioData(c).then(_).catch(m):r.ctx.decodeAudioData(c,_,m)},p=function(c,d){d&&!c._duration&&(c._duration=d.duration),Object.keys(c._sprite).length===0&&(c._sprite={__default:[0,c._duration*1e3]}),c._state!=="loaded"&&(c._state="loaded",c._emit("load"),c._loadQueue())},g=function(){if(r.usingWebAudio){try{typeof AudioContext<"u"?r.ctx=new AudioContext:typeof webkitAudioContext<"u"?r.ctx=new webkitAudioContext:r.usingWebAudio=!1}catch{r.usingWebAudio=!1}r.ctx||(r.usingWebAudio=!1);var c=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),d=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),m=d?parseInt(d[1],10):null;if(c&&m&&m<9){var _=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!_&&(r.usingWebAudio=!1)}r.usingWebAudio&&(r.masterGain=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup()}};t.Howler=r,t.Howl=n,typeof At<"u"?(At.HowlerGlobal=e,At.Howler=r,At.Howl=n,At.Sound=i):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=r,window.Howl=n,window.Sound=i)})();/*!
1956
+ */(function(t){(function(){var e=function(){this.init()};e.prototype={init:function(){var c=this||r;return c._counter=1e3,c._html5AudioPool=[],c.html5PoolSize=10,c._codecs={},c._howls=[],c._muted=!1,c._volume=1,c._canPlayEvent="canplaythrough",c._navigator=typeof window<"u"&&window.navigator?window.navigator:null,c.masterGain=null,c.noAudio=!1,c.usingWebAudio=!0,c.autoSuspend=!0,c.ctx=null,c.autoUnlock=!0,c._setup(),c},volume:function(c){var d=this||r;if(c=parseFloat(c),d.ctx||g(),typeof c<"u"&&c>=0&&c<=1){if(d._volume=c,d._muted)return d;d.usingWebAudio&&d.masterGain.gain.setValueAtTime(c,r.ctx.currentTime);for(var m=0;m<d._howls.length;m++)if(!d._howls[m]._webAudio)for(var _=d._howls[m]._getSoundIds(),y=0;y<_.length;y++){var b=d._howls[m]._soundById(_[y]);b&&b._node&&(b._node.volume=b._volume*c)}return d}return d._volume},mute:function(c){var d=this||r;d.ctx||g(),d._muted=c,d.usingWebAudio&&d.masterGain.gain.setValueAtTime(c?0:d._volume,r.ctx.currentTime);for(var m=0;m<d._howls.length;m++)if(!d._howls[m]._webAudio)for(var _=d._howls[m]._getSoundIds(),y=0;y<_.length;y++){var b=d._howls[m]._soundById(_[y]);b&&b._node&&(b._node.muted=c?!0:b._muted)}return d},stop:function(){for(var c=this||r,d=0;d<c._howls.length;d++)c._howls[d].stop();return c},unload:function(){for(var c=this||r,d=c._howls.length-1;d>=0;d--)c._howls[d].unload();return c.usingWebAudio&&c.ctx&&typeof c.ctx.close<"u"&&(c.ctx.close(),c.ctx=null,g()),c},codecs:function(c){return(this||r)._codecs[c.replace(/^x-/,"")]},_setup:function(){var c=this||r;if(c.state=c.ctx&&c.ctx.state||"suspended",c._autoSuspend(),!c.usingWebAudio)if(typeof Audio<"u")try{var d=new Audio;typeof d.oncanplaythrough>"u"&&(c._canPlayEvent="canplay")}catch{c.noAudio=!0}else c.noAudio=!0;try{var d=new Audio;d.muted&&(c.noAudio=!0)}catch{}return c.noAudio||c._setupCodecs(),c},_setupCodecs:function(){var c=this||r,d=null;try{d=typeof Audio<"u"?new Audio:null}catch{return c}if(!d||typeof d.canPlayType!="function")return c;var m=d.canPlayType("audio/mpeg;").replace(/^no$/,""),_=c._navigator?c._navigator.userAgent:"",y=_.match(/OPR\/([0-6].)/g),b=y&&parseInt(y[0].split("/")[1],10)<33,x=_.indexOf("Safari")!==-1&&_.indexOf("Chrome")===-1,E=_.match(/Version\/(.*?) /),w=x&&E&&parseInt(E[1],10)<15;return c._codecs={mp3:!!(!b&&(m||d.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!m,opus:!!d.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(d.canPlayType('audio/wav; codecs="1"')||d.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!d.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!d.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(d.canPlayType("audio/x-m4a;")||d.canPlayType("audio/m4a;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(d.canPlayType("audio/x-m4b;")||d.canPlayType("audio/m4b;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(d.canPlayType("audio/x-mp4;")||d.canPlayType("audio/mp4;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!w&&d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!w&&d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!d.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(d.canPlayType("audio/x-flac;")||d.canPlayType("audio/flac;")).replace(/^no$/,"")},c},_unlockAudio:function(){var c=this||r;if(!(c._audioUnlocked||!c.ctx)){c._audioUnlocked=!1,c.autoUnlock=!1,!c._mobileUnloaded&&c.ctx.sampleRate!==44100&&(c._mobileUnloaded=!0,c.unload()),c._scratchBuffer=c.ctx.createBuffer(1,1,22050);var d=function(m){for(;c._html5AudioPool.length<c.html5PoolSize;)try{var _=new Audio;_._unlocked=!0,c._releaseHtml5Audio(_)}catch{c.noAudio=!0;break}for(var y=0;y<c._howls.length;y++)if(!c._howls[y]._webAudio)for(var b=c._howls[y]._getSoundIds(),x=0;x<b.length;x++){var E=c._howls[y]._soundById(b[x]);E&&E._node&&!E._node._unlocked&&(E._node._unlocked=!0,E._node.load())}c._autoResume();var w=c.ctx.createBufferSource();w.buffer=c._scratchBuffer,w.connect(c.ctx.destination),typeof w.start>"u"?w.noteOn(0):w.start(0),typeof c.ctx.resume=="function"&&c.ctx.resume(),w.onended=function(){w.disconnect(0),c._audioUnlocked=!0,document.removeEventListener("touchstart",d,!0),document.removeEventListener("touchend",d,!0),document.removeEventListener("click",d,!0),document.removeEventListener("keydown",d,!0);for(var I=0;I<c._howls.length;I++)c._howls[I]._emit("unlock")}};return document.addEventListener("touchstart",d,!0),document.addEventListener("touchend",d,!0),document.addEventListener("click",d,!0),document.addEventListener("keydown",d,!0),c}},_obtainHtml5Audio:function(){var c=this||r;if(c._html5AudioPool.length)return c._html5AudioPool.pop();var d=new Audio().play();return d&&typeof Promise<"u"&&(d instanceof Promise||typeof d.then=="function")&&d.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(c){var d=this||r;return c._unlocked&&d._html5AudioPool.push(c),d},_autoSuspend:function(){var c=this;if(!(!c.autoSuspend||!c.ctx||typeof c.ctx.suspend>"u"||!r.usingWebAudio)){for(var d=0;d<c._howls.length;d++)if(c._howls[d]._webAudio){for(var m=0;m<c._howls[d]._sounds.length;m++)if(!c._howls[d]._sounds[m]._paused)return c}return c._suspendTimer&&clearTimeout(c._suspendTimer),c._suspendTimer=setTimeout(function(){if(c.autoSuspend){c._suspendTimer=null,c.state="suspending";var _=function(){c.state="suspended",c._resumeAfterSuspend&&(delete c._resumeAfterSuspend,c._autoResume())};c.ctx.suspend().then(_,_)}},3e4),c}},_autoResume:function(){var c=this;if(!(!c.ctx||typeof c.ctx.resume>"u"||!r.usingWebAudio))return c.state==="running"&&c.ctx.state!=="interrupted"&&c._suspendTimer?(clearTimeout(c._suspendTimer),c._suspendTimer=null):c.state==="suspended"||c.state==="running"&&c.ctx.state==="interrupted"?(c.ctx.resume().then(function(){c.state="running";for(var d=0;d<c._howls.length;d++)c._howls[d]._emit("resume")}),c._suspendTimer&&(clearTimeout(c._suspendTimer),c._suspendTimer=null)):c.state==="suspending"&&(c._resumeAfterSuspend=!0),c}};var r=new e,n=function(c){var d=this;if(!c.src||c.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}d.init(c)};n.prototype={init:function(c){var d=this;return r.ctx||g(),d._autoplay=c.autoplay||!1,d._format=typeof c.format!="string"?c.format:[c.format],d._html5=c.html5||!1,d._muted=c.mute||!1,d._loop=c.loop||!1,d._pool=c.pool||5,d._preload=typeof c.preload=="boolean"||c.preload==="metadata"?c.preload:!0,d._rate=c.rate||1,d._sprite=c.sprite||{},d._src=typeof c.src!="string"?c.src:[c.src],d._volume=c.volume!==void 0?c.volume:1,d._xhr={method:c.xhr&&c.xhr.method?c.xhr.method:"GET",headers:c.xhr&&c.xhr.headers?c.xhr.headers:null,withCredentials:c.xhr&&c.xhr.withCredentials?c.xhr.withCredentials:!1},d._duration=0,d._state="unloaded",d._sounds=[],d._endTimers={},d._queue=[],d._playLock=!1,d._onend=c.onend?[{fn:c.onend}]:[],d._onfade=c.onfade?[{fn:c.onfade}]:[],d._onload=c.onload?[{fn:c.onload}]:[],d._onloaderror=c.onloaderror?[{fn:c.onloaderror}]:[],d._onplayerror=c.onplayerror?[{fn:c.onplayerror}]:[],d._onpause=c.onpause?[{fn:c.onpause}]:[],d._onplay=c.onplay?[{fn:c.onplay}]:[],d._onstop=c.onstop?[{fn:c.onstop}]:[],d._onmute=c.onmute?[{fn:c.onmute}]:[],d._onvolume=c.onvolume?[{fn:c.onvolume}]:[],d._onrate=c.onrate?[{fn:c.onrate}]:[],d._onseek=c.onseek?[{fn:c.onseek}]:[],d._onunlock=c.onunlock?[{fn:c.onunlock}]:[],d._onresume=[],d._webAudio=r.usingWebAudio&&!d._html5,typeof r.ctx<"u"&&r.ctx&&r.autoUnlock&&r._unlockAudio(),r._howls.push(d),d._autoplay&&d._queue.push({event:"play",action:function(){d.play()}}),d._preload&&d._preload!=="none"&&d.load(),d},load:function(){var c=this,d=null;if(r.noAudio){c._emit("loaderror",null,"No audio support.");return}typeof c._src=="string"&&(c._src=[c._src]);for(var m=0;m<c._src.length;m++){var _,y;if(c._format&&c._format[m])_=c._format[m];else{if(y=c._src[m],typeof y!="string"){c._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}_=/^data:audio\/([^;,]+);/i.exec(y),_||(_=/\.([^.]+)$/.exec(y.split("?",1)[0])),_&&(_=_[1].toLowerCase())}if(_||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),_&&r.codecs(_)){d=c._src[m];break}}if(!d){c._emit("loaderror",null,"No codec support for selected audio sources.");return}return c._src=d,c._state="loading",window.location.protocol==="https:"&&d.slice(0,5)==="http:"&&(c._html5=!0,c._webAudio=!1),new i(c),c._webAudio&&u(c),c},play:function(c,d){var m=this,_=null;if(typeof c=="number")_=c,c=null;else{if(typeof c=="string"&&m._state==="loaded"&&!m._sprite[c])return null;if(typeof c>"u"&&(c="__default",!m._playLock)){for(var y=0,b=0;b<m._sounds.length;b++)m._sounds[b]._paused&&!m._sounds[b]._ended&&(y++,_=m._sounds[b]._id);y===1?c=null:_=null}}var x=_?m._soundById(_):m._inactiveSound();if(!x)return null;if(_&&!c&&(c=x._sprite||"__default"),m._state!=="loaded"){x._sprite=c,x._ended=!1;var E=x._id;return m._queue.push({event:"play",action:function(){m.play(E)}}),E}if(_&&!x._paused)return d||m._loadQueue("play"),x._id;m._webAudio&&r._autoResume();var w=Math.max(0,x._seek>0?x._seek:m._sprite[c][0]/1e3),I=Math.max(0,(m._sprite[c][0]+m._sprite[c][1])/1e3-w),O=I*1e3/Math.abs(x._rate),F=m._sprite[c][0]/1e3,N=(m._sprite[c][0]+m._sprite[c][1])/1e3;x._sprite=c,x._ended=!1;var L=function(){x._paused=!1,x._seek=w,x._start=F,x._stop=N,x._loop=!!(x._loop||m._sprite[c][2])};if(w>=N){m._ended(x);return}var B=x._node;if(m._webAudio){var V=function(){m._playLock=!1,L(),m._refreshBuffer(x);var G=x._muted||m._muted?0:x._volume;B.gain.setValueAtTime(G,r.ctx.currentTime),x._playStart=r.ctx.currentTime,typeof B.bufferSource.start>"u"?x._loop?B.bufferSource.noteGrainOn(0,w,86400):B.bufferSource.noteGrainOn(0,w,I):x._loop?B.bufferSource.start(0,w,86400):B.bufferSource.start(0,w,I),O!==1/0&&(m._endTimers[x._id]=setTimeout(m._ended.bind(m,x),O)),d||setTimeout(function(){m._emit("play",x._id),m._loadQueue()},0)};r.state==="running"&&r.ctx.state!=="interrupted"?V():(m._playLock=!0,m.once("resume",V),m._clearTimer(x._id))}else{var Y=function(){B.currentTime=w,B.muted=x._muted||m._muted||r._muted||B.muted,B.volume=x._volume*r.volume(),B.playbackRate=x._rate;try{var G=B.play();if(G&&typeof Promise<"u"&&(G instanceof Promise||typeof G.then=="function")?(m._playLock=!0,L(),G.then(function(){m._playLock=!1,B._unlocked=!0,d?m._loadQueue():m._emit("play",x._id)}).catch(function(){m._playLock=!1,m._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),x._ended=!0,x._paused=!0})):d||(m._playLock=!1,L(),m._emit("play",x._id)),B.playbackRate=x._rate,B.paused){m._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}c!=="__default"||x._loop?m._endTimers[x._id]=setTimeout(m._ended.bind(m,x),O):(m._endTimers[x._id]=function(){m._ended(x),B.removeEventListener("ended",m._endTimers[x._id],!1)},B.addEventListener("ended",m._endTimers[x._id],!1))}catch(se){m._emit("playerror",x._id,se)}};B.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(B.src=m._src,B.load());var ae=window&&window.ejecta||!B.readyState&&r._navigator.isCocoonJS;if(B.readyState>=3||ae)Y();else{m._playLock=!0,m._state="loading";var j=function(){m._state="loaded",Y(),B.removeEventListener(r._canPlayEvent,j,!1)};B.addEventListener(r._canPlayEvent,j,!1),m._clearTimer(x._id)}}return x._id},pause:function(c){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"pause",action:function(){d.pause(c)}}),d;for(var m=d._getSoundIds(c),_=0;_<m.length;_++){d._clearTimer(m[_]);var y=d._soundById(m[_]);if(y&&!y._paused&&(y._seek=d.seek(m[_]),y._rateSeek=0,y._paused=!0,d._stopFade(m[_]),y._node))if(d._webAudio){if(!y._node.bufferSource)continue;typeof y._node.bufferSource.stop>"u"?y._node.bufferSource.noteOff(0):y._node.bufferSource.stop(0),d._cleanBuffer(y._node)}else(!isNaN(y._node.duration)||y._node.duration===1/0)&&y._node.pause();arguments[1]||d._emit("pause",y?y._id:null)}return d},stop:function(c,d){var m=this;if(m._state!=="loaded"||m._playLock)return m._queue.push({event:"stop",action:function(){m.stop(c)}}),m;for(var _=m._getSoundIds(c),y=0;y<_.length;y++){m._clearTimer(_[y]);var b=m._soundById(_[y]);b&&(b._seek=b._start||0,b._rateSeek=0,b._paused=!0,b._ended=!0,m._stopFade(_[y]),b._node&&(m._webAudio?b._node.bufferSource&&(typeof b._node.bufferSource.stop>"u"?b._node.bufferSource.noteOff(0):b._node.bufferSource.stop(0),m._cleanBuffer(b._node)):(!isNaN(b._node.duration)||b._node.duration===1/0)&&(b._node.currentTime=b._start||0,b._node.pause(),b._node.duration===1/0&&m._clearSound(b._node))),d||m._emit("stop",b._id))}return m},mute:function(c,d){var m=this;if(m._state!=="loaded"||m._playLock)return m._queue.push({event:"mute",action:function(){m.mute(c,d)}}),m;if(typeof d>"u")if(typeof c=="boolean")m._muted=c;else return m._muted;for(var _=m._getSoundIds(d),y=0;y<_.length;y++){var b=m._soundById(_[y]);b&&(b._muted=c,b._interval&&m._stopFade(b._id),m._webAudio&&b._node?b._node.gain.setValueAtTime(c?0:b._volume,r.ctx.currentTime):b._node&&(b._node.muted=r._muted?!0:c),m._emit("mute",b._id))}return m},volume:function(){var c=this,d=arguments,m,_;if(d.length===0)return c._volume;if(d.length===1||d.length===2&&typeof d[1]>"u"){var y=c._getSoundIds(),b=y.indexOf(d[0]);b>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length>=2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var x;if(typeof m<"u"&&m>=0&&m<=1){if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"volume",action:function(){c.volume.apply(c,d)}}),c;typeof _>"u"&&(c._volume=m),_=c._getSoundIds(_);for(var E=0;E<_.length;E++)x=c._soundById(_[E]),x&&(x._volume=m,d[2]||c._stopFade(_[E]),c._webAudio&&x._node&&!x._muted?x._node.gain.setValueAtTime(m,r.ctx.currentTime):x._node&&!x._muted&&(x._node.volume=m*r.volume()),c._emit("volume",x._id))}else return x=_?c._soundById(_):c._sounds[0],x?x._volume:0;return c},fade:function(c,d,m,_){var y=this;if(y._state!=="loaded"||y._playLock)return y._queue.push({event:"fade",action:function(){y.fade(c,d,m,_)}}),y;c=Math.min(Math.max(0,parseFloat(c)),1),d=Math.min(Math.max(0,parseFloat(d)),1),m=parseFloat(m),y.volume(c,_);for(var b=y._getSoundIds(_),x=0;x<b.length;x++){var E=y._soundById(b[x]);if(E){if(_||y._stopFade(b[x]),y._webAudio&&!E._muted){var w=r.ctx.currentTime,I=w+m/1e3;E._volume=c,E._node.gain.setValueAtTime(c,w),E._node.gain.linearRampToValueAtTime(d,I)}y._startFadeInterval(E,c,d,m,b[x],typeof _>"u")}}return y},_startFadeInterval:function(c,d,m,_,y,b){var x=this,E=d,w=m-d,I=Math.abs(w/.01),O=Math.max(4,I>0?_/I:_),F=Date.now();c._fadeTo=m,c._interval=setInterval(function(){var N=(Date.now()-F)/_;F=Date.now(),E+=w*N,E=Math.round(E*100)/100,w<0?E=Math.max(m,E):E=Math.min(m,E),x._webAudio?c._volume=E:x.volume(E,c._id,!0),b&&(x._volume=E),(m<d&&E<=m||m>d&&E>=m)&&(clearInterval(c._interval),c._interval=null,c._fadeTo=null,x.volume(m,c._id),x._emit("fade",c._id))},O)},_stopFade:function(c){var d=this,m=d._soundById(c);return m&&m._interval&&(d._webAudio&&m._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(m._interval),m._interval=null,d.volume(m._fadeTo,c),m._fadeTo=null,d._emit("fade",c)),d},loop:function(){var c=this,d=arguments,m,_,y;if(d.length===0)return c._loop;if(d.length===1)if(typeof d[0]=="boolean")m=d[0],c._loop=m;else return y=c._soundById(parseInt(d[0],10)),y?y._loop:!1;else d.length===2&&(m=d[0],_=parseInt(d[1],10));for(var b=c._getSoundIds(_),x=0;x<b.length;x++)y=c._soundById(b[x]),y&&(y._loop=m,c._webAudio&&y._node&&y._node.bufferSource&&(y._node.bufferSource.loop=m,m&&(y._node.bufferSource.loopStart=y._start||0,y._node.bufferSource.loopEnd=y._stop,c.playing(b[x])&&(c.pause(b[x],!0),c.play(b[x],!0)))));return c},rate:function(){var c=this,d=arguments,m,_;if(d.length===0)_=c._sounds[0]._id;else if(d.length===1){var y=c._getSoundIds(),b=y.indexOf(d[0]);b>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var x;if(typeof m=="number"){if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"rate",action:function(){c.rate.apply(c,d)}}),c;typeof _>"u"&&(c._rate=m),_=c._getSoundIds(_);for(var E=0;E<_.length;E++)if(x=c._soundById(_[E]),x){c.playing(_[E])&&(x._rateSeek=c.seek(_[E]),x._playStart=c._webAudio?r.ctx.currentTime:x._playStart),x._rate=m,c._webAudio&&x._node&&x._node.bufferSource?x._node.bufferSource.playbackRate.setValueAtTime(m,r.ctx.currentTime):x._node&&(x._node.playbackRate=m);var w=c.seek(_[E]),I=(c._sprite[x._sprite][0]+c._sprite[x._sprite][1])/1e3-w,O=I*1e3/Math.abs(x._rate);(c._endTimers[_[E]]||!x._paused)&&(c._clearTimer(_[E]),c._endTimers[_[E]]=setTimeout(c._ended.bind(c,x),O)),c._emit("rate",x._id)}}else return x=c._soundById(_),x?x._rate:c._rate;return c},seek:function(){var c=this,d=arguments,m,_;if(d.length===0)c._sounds.length&&(_=c._sounds[0]._id);else if(d.length===1){var y=c._getSoundIds(),b=y.indexOf(d[0]);b>=0?_=parseInt(d[0],10):c._sounds.length&&(_=c._sounds[0]._id,m=parseFloat(d[0]))}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));if(typeof _>"u")return 0;if(typeof m=="number"&&(c._state!=="loaded"||c._playLock))return c._queue.push({event:"seek",action:function(){c.seek.apply(c,d)}}),c;var x=c._soundById(_);if(x)if(typeof m=="number"&&m>=0){var E=c.playing(_);E&&c.pause(_,!0),x._seek=m,x._ended=!1,c._clearTimer(_),!c._webAudio&&x._node&&!isNaN(x._node.duration)&&(x._node.currentTime=m);var w=function(){E&&c.play(_,!0),c._emit("seek",_)};if(E&&!c._webAudio){var I=function(){c._playLock?setTimeout(I,0):w()};setTimeout(I,0)}else w()}else if(c._webAudio){var O=c.playing(_)?r.ctx.currentTime-x._playStart:0,F=x._rateSeek?x._rateSeek-x._seek:0;return x._seek+(F+O*Math.abs(x._rate))}else return x._node.currentTime;return c},playing:function(c){var d=this;if(typeof c=="number"){var m=d._soundById(c);return m?!m._paused:!1}for(var _=0;_<d._sounds.length;_++)if(!d._sounds[_]._paused)return!0;return!1},duration:function(c){var d=this,m=d._duration,_=d._soundById(c);return _&&(m=d._sprite[_._sprite][1]/1e3),m},state:function(){return this._state},unload:function(){for(var c=this,d=c._sounds,m=0;m<d.length;m++)d[m]._paused||c.stop(d[m]._id),c._webAudio||(c._clearSound(d[m]._node),d[m]._node.removeEventListener("error",d[m]._errorFn,!1),d[m]._node.removeEventListener(r._canPlayEvent,d[m]._loadFn,!1),d[m]._node.removeEventListener("ended",d[m]._endFn,!1),r._releaseHtml5Audio(d[m]._node)),delete d[m]._node,c._clearTimer(d[m]._id);var _=r._howls.indexOf(c);_>=0&&r._howls.splice(_,1);var y=!0;for(m=0;m<r._howls.length;m++)if(r._howls[m]._src===c._src||c._src.indexOf(r._howls[m]._src)>=0){y=!1;break}return a&&y&&delete a[c._src],r.noAudio=!1,c._state="unloaded",c._sounds=[],c=null,null},on:function(c,d,m,_){var y=this,b=y["_on"+c];return typeof d=="function"&&b.push(_?{id:m,fn:d,once:_}:{id:m,fn:d}),y},off:function(c,d,m){var _=this,y=_["_on"+c],b=0;if(typeof d=="number"&&(m=d,d=null),d||m)for(b=0;b<y.length;b++){var x=m===y[b].id;if(d===y[b].fn&&x||!d&&x){y.splice(b,1);break}}else if(c)_["_on"+c]=[];else{var E=Object.keys(_);for(b=0;b<E.length;b++)E[b].indexOf("_on")===0&&Array.isArray(_[E[b]])&&(_[E[b]]=[])}return _},once:function(c,d,m){var _=this;return _.on(c,d,m,1),_},_emit:function(c,d,m){for(var _=this,y=_["_on"+c],b=y.length-1;b>=0;b--)(!y[b].id||y[b].id===d||c==="load")&&(setTimeout((function(x){x.call(this,d,m)}).bind(_,y[b].fn),0),y[b].once&&_.off(c,y[b].fn,y[b].id));return _._loadQueue(c),_},_loadQueue:function(c){var d=this;if(d._queue.length>0){var m=d._queue[0];m.event===c&&(d._queue.shift(),d._loadQueue()),c||m.action()}return d},_ended:function(c){var d=this,m=c._sprite;if(!d._webAudio&&c._node&&!c._node.paused&&!c._node.ended&&c._node.currentTime<c._stop)return setTimeout(d._ended.bind(d,c),100),d;var _=!!(c._loop||d._sprite[m][2]);if(d._emit("end",c._id),!d._webAudio&&_&&d.stop(c._id,!0).play(c._id),d._webAudio&&_){d._emit("play",c._id),c._seek=c._start||0,c._rateSeek=0,c._playStart=r.ctx.currentTime;var y=(c._stop-c._start)*1e3/Math.abs(c._rate);d._endTimers[c._id]=setTimeout(d._ended.bind(d,c),y)}return d._webAudio&&!_&&(c._paused=!0,c._ended=!0,c._seek=c._start||0,c._rateSeek=0,d._clearTimer(c._id),d._cleanBuffer(c._node),r._autoSuspend()),!d._webAudio&&!_&&d.stop(c._id,!0),d},_clearTimer:function(c){var d=this;if(d._endTimers[c]){if(typeof d._endTimers[c]!="function")clearTimeout(d._endTimers[c]);else{var m=d._soundById(c);m&&m._node&&m._node.removeEventListener("ended",d._endTimers[c],!1)}delete d._endTimers[c]}return d},_soundById:function(c){for(var d=this,m=0;m<d._sounds.length;m++)if(c===d._sounds[m]._id)return d._sounds[m];return null},_inactiveSound:function(){var c=this;c._drain();for(var d=0;d<c._sounds.length;d++)if(c._sounds[d]._ended)return c._sounds[d].reset();return new i(c)},_drain:function(){var c=this,d=c._pool,m=0,_=0;if(!(c._sounds.length<d)){for(_=0;_<c._sounds.length;_++)c._sounds[_]._ended&&m++;for(_=c._sounds.length-1;_>=0;_--){if(m<=d)return;c._sounds[_]._ended&&(c._webAudio&&c._sounds[_]._node&&c._sounds[_]._node.disconnect(0),c._sounds.splice(_,1),m--)}}},_getSoundIds:function(c){var d=this;if(typeof c>"u"){for(var m=[],_=0;_<d._sounds.length;_++)m.push(d._sounds[_]._id);return m}else return[c]},_refreshBuffer:function(c){var d=this;return c._node.bufferSource=r.ctx.createBufferSource(),c._node.bufferSource.buffer=a[d._src],c._panner?c._node.bufferSource.connect(c._panner):c._node.bufferSource.connect(c._node),c._node.bufferSource.loop=c._loop,c._loop&&(c._node.bufferSource.loopStart=c._start||0,c._node.bufferSource.loopEnd=c._stop||0),c._node.bufferSource.playbackRate.setValueAtTime(c._rate,r.ctx.currentTime),d},_cleanBuffer:function(c){var d=this,m=r._navigator&&r._navigator.vendor.indexOf("Apple")>=0;if(r._scratchBuffer&&c.bufferSource&&(c.bufferSource.onended=null,c.bufferSource.disconnect(0),m))try{c.bufferSource.buffer=r._scratchBuffer}catch{}return c.bufferSource=null,d},_clearSound:function(c){var d=/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent);d||(c.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var i=function(c){this._parent=c,this.init()};i.prototype={init:function(){var c=this,d=c._parent;return c._muted=d._muted,c._loop=d._loop,c._volume=d._volume,c._rate=d._rate,c._seek=0,c._paused=!0,c._ended=!0,c._sprite="__default",c._id=++r._counter,d._sounds.push(c),c.create(),c},create:function(){var c=this,d=c._parent,m=r._muted||c._muted||c._parent._muted?0:c._volume;return d._webAudio?(c._node=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),c._node.gain.setValueAtTime(m,r.ctx.currentTime),c._node.paused=!0,c._node.connect(r.masterGain)):r.noAudio||(c._node=r._obtainHtml5Audio(),c._errorFn=c._errorListener.bind(c),c._node.addEventListener("error",c._errorFn,!1),c._loadFn=c._loadListener.bind(c),c._node.addEventListener(r._canPlayEvent,c._loadFn,!1),c._endFn=c._endListener.bind(c),c._node.addEventListener("ended",c._endFn,!1),c._node.src=d._src,c._node.preload=d._preload===!0?"auto":d._preload,c._node.volume=m*r.volume(),c._node.load()),c},reset:function(){var c=this,d=c._parent;return c._muted=d._muted,c._loop=d._loop,c._volume=d._volume,c._rate=d._rate,c._seek=0,c._rateSeek=0,c._paused=!0,c._ended=!0,c._sprite="__default",c._id=++r._counter,c},_errorListener:function(){var c=this;c._parent._emit("loaderror",c._id,c._node.error?c._node.error.code:0),c._node.removeEventListener("error",c._errorFn,!1)},_loadListener:function(){var c=this,d=c._parent;d._duration=Math.ceil(c._node.duration*10)/10,Object.keys(d._sprite).length===0&&(d._sprite={__default:[0,d._duration*1e3]}),d._state!=="loaded"&&(d._state="loaded",d._emit("load"),d._loadQueue()),c._node.removeEventListener(r._canPlayEvent,c._loadFn,!1)},_endListener:function(){var c=this,d=c._parent;d._duration===1/0&&(d._duration=Math.ceil(c._node.duration*10)/10,d._sprite.__default[1]===1/0&&(d._sprite.__default[1]=d._duration*1e3),d._ended(c)),c._node.removeEventListener("ended",c._endFn,!1)}};var a={},u=function(c){var d=c._src;if(a[d]){c._duration=a[d].duration,p(c);return}if(/^data:[^;]+;base64,/.test(d)){for(var m=atob(d.split(",")[1]),_=new Uint8Array(m.length),y=0;y<m.length;++y)_[y]=m.charCodeAt(y);h(_.buffer,c)}else{var b=new XMLHttpRequest;b.open(c._xhr.method,d,!0),b.withCredentials=c._xhr.withCredentials,b.responseType="arraybuffer",c._xhr.headers&&Object.keys(c._xhr.headers).forEach(function(x){b.setRequestHeader(x,c._xhr.headers[x])}),b.onload=function(){var x=(b.status+"")[0];if(x!=="0"&&x!=="2"&&x!=="3"){c._emit("loaderror",null,"Failed loading audio file with status: "+b.status+".");return}h(b.response,c)},b.onerror=function(){c._webAudio&&(c._html5=!0,c._webAudio=!1,c._sounds=[],delete a[d],c.load())},l(b)}},l=function(c){try{c.send()}catch{c.onerror()}},h=function(c,d){var m=function(){d._emit("loaderror",null,"Decoding audio data failed.")},_=function(y){y&&d._sounds.length>0?(a[d._src]=y,p(d,y)):m()};typeof Promise<"u"&&r.ctx.decodeAudioData.length===1?r.ctx.decodeAudioData(c).then(_).catch(m):r.ctx.decodeAudioData(c,_,m)},p=function(c,d){d&&!c._duration&&(c._duration=d.duration),Object.keys(c._sprite).length===0&&(c._sprite={__default:[0,c._duration*1e3]}),c._state!=="loaded"&&(c._state="loaded",c._emit("load"),c._loadQueue())},g=function(){if(r.usingWebAudio){try{typeof AudioContext<"u"?r.ctx=new AudioContext:typeof webkitAudioContext<"u"?r.ctx=new webkitAudioContext:r.usingWebAudio=!1}catch{r.usingWebAudio=!1}r.ctx||(r.usingWebAudio=!1);var c=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),d=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),m=d?parseInt(d[1],10):null;if(c&&m&&m<9){var _=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!_&&(r.usingWebAudio=!1)}r.usingWebAudio&&(r.masterGain=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup()}};t.Howler=r,t.Howl=n,typeof At<"u"?(At.HowlerGlobal=e,At.Howler=r,At.Howl=n,At.Sound=i):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=r,window.Howl=n,window.Sound=i)})();/*!
1973
1957
  * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
1974
1958
  *
1975
1959
  * howler.js v2.2.3
@@ -1979,30 +1963,46 @@ void main() {
1979
1963
  * goldfirestudios.com
1980
1964
  *
1981
1965
  * MIT License
1982
- */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var n=this;if(!n.ctx||!n.ctx.listener)return n;for(var i=n._howls.length-1;i>=0;i--)n._howls[i].stereo(r);return n},HowlerGlobal.prototype.pos=function(r,n,i){var a=this;if(!a.ctx||!a.ctx.listener)return a;if(n=typeof n!="number"?a._pos[1]:n,i=typeof i!="number"?a._pos[2]:i,typeof r=="number")a._pos=[r,n,i],typeof a.ctx.listener.positionX<"u"?(a.ctx.listener.positionX.setTargetAtTime(a._pos[0],Howler.ctx.currentTime,.1),a.ctx.listener.positionY.setTargetAtTime(a._pos[1],Howler.ctx.currentTime,.1),a.ctx.listener.positionZ.setTargetAtTime(a._pos[2],Howler.ctx.currentTime,.1)):a.ctx.listener.setPosition(a._pos[0],a._pos[1],a._pos[2]);else return a._pos;return a},HowlerGlobal.prototype.orientation=function(r,n,i,a,u,l){var f=this;if(!f.ctx||!f.ctx.listener)return f;var p=f._orientation;if(n=typeof n!="number"?p[1]:n,i=typeof i!="number"?p[2]:i,a=typeof a!="number"?p[3]:a,u=typeof u!="number"?p[4]:u,l=typeof l!="number"?p[5]:l,typeof r=="number")f._orientation=[r,n,i,a,u,l],typeof f.ctx.listener.forwardX<"u"?(f.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),f.ctx.listener.forwardY.setTargetAtTime(n,Howler.ctx.currentTime,.1),f.ctx.listener.forwardZ.setTargetAtTime(i,Howler.ctx.currentTime,.1),f.ctx.listener.upX.setTargetAtTime(a,Howler.ctx.currentTime,.1),f.ctx.listener.upY.setTargetAtTime(u,Howler.ctx.currentTime,.1),f.ctx.listener.upZ.setTargetAtTime(l,Howler.ctx.currentTime,.1)):f.ctx.listener.setOrientation(r,n,i,a,u,l);else return p;return f},Howl.prototype.init=function(r){return function(n){var i=this;return i._orientation=n.orientation||[1,0,0],i._stereo=n.stereo||null,i._pos=n.pos||null,i._pannerAttr={coneInnerAngle:typeof n.coneInnerAngle<"u"?n.coneInnerAngle:360,coneOuterAngle:typeof n.coneOuterAngle<"u"?n.coneOuterAngle:360,coneOuterGain:typeof n.coneOuterGain<"u"?n.coneOuterGain:0,distanceModel:typeof n.distanceModel<"u"?n.distanceModel:"inverse",maxDistance:typeof n.maxDistance<"u"?n.maxDistance:1e4,panningModel:typeof n.panningModel<"u"?n.panningModel:"HRTF",refDistance:typeof n.refDistance<"u"?n.refDistance:1,rolloffFactor:typeof n.rolloffFactor<"u"?n.rolloffFactor:1},i._onstereo=n.onstereo?[{fn:n.onstereo}]:[],i._onpos=n.onpos?[{fn:n.onpos}]:[],i._onorientation=n.onorientation?[{fn:n.onorientation}]:[],r.call(this,n)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,n){var i=this;if(!i._webAudio)return i;if(i._state!=="loaded")return i._queue.push({event:"stereo",action:function(){i.stereo(r,n)}}),i;var a=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof n>"u")if(typeof r=="number")i._stereo=r,i._pos=[r,0,0];else return i._stereo;for(var u=i._getSoundIds(n),l=0;l<u.length;l++){var f=i._soundById(u[l]);if(f)if(typeof r=="number")f._stereo=r,f._pos=[r,0,0],f._node&&(f._pannerAttr.panningModel="equalpower",(!f._panner||!f._panner.pan)&&e(f,a),a==="spatial"?typeof f._panner.positionX<"u"?(f._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),f._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),f._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):f._panner.setPosition(r,0,0):f._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),i._emit("stereo",f._id);else return f._stereo}return i},Howl.prototype.pos=function(r,n,i,a){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"pos",action:function(){u.pos(r,n,i,a)}}),u;if(n=typeof n!="number"?0:n,i=typeof i!="number"?-.5:i,typeof a>"u")if(typeof r=="number")u._pos=[r,n,i];else return u._pos;for(var l=u._getSoundIds(a),f=0;f<l.length;f++){var p=u._soundById(l[f]);if(p)if(typeof r=="number")p._pos=[r,n,i],p._node&&((!p._panner||p._panner.pan)&&e(p,"spatial"),typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(n,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(i,Howler.ctx.currentTime)):p._panner.setPosition(r,n,i)),u._emit("pos",p._id);else return p._pos}return u},Howl.prototype.orientation=function(r,n,i,a){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"orientation",action:function(){u.orientation(r,n,i,a)}}),u;if(n=typeof n!="number"?u._orientation[1]:n,i=typeof i!="number"?u._orientation[2]:i,typeof a>"u")if(typeof r=="number")u._orientation=[r,n,i];else return u._orientation;for(var l=u._getSoundIds(a),f=0;f<l.length;f++){var p=u._soundById(l[f]);if(p)if(typeof r=="number")p._orientation=[r,n,i],p._node&&(p._panner||(p._pos||(p._pos=u._pos||[0,0,-.5]),e(p,"spatial")),typeof p._panner.orientationX<"u"?(p._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),p._panner.orientationY.setValueAtTime(n,Howler.ctx.currentTime),p._panner.orientationZ.setValueAtTime(i,Howler.ctx.currentTime)):p._panner.setOrientation(r,n,i)),u._emit("orientation",p._id);else return p._orientation}return u},Howl.prototype.pannerAttr=function(){var r=this,n=arguments,i,a,u;if(!r._webAudio)return r;if(n.length===0)return r._pannerAttr;if(n.length===1)if(typeof n[0]=="object")i=n[0],typeof a>"u"&&(i.pannerAttr||(i.pannerAttr={coneInnerAngle:i.coneInnerAngle,coneOuterAngle:i.coneOuterAngle,coneOuterGain:i.coneOuterGain,distanceModel:i.distanceModel,maxDistance:i.maxDistance,refDistance:i.refDistance,rolloffFactor:i.rolloffFactor,panningModel:i.panningModel}),r._pannerAttr={coneInnerAngle:typeof i.pannerAttr.coneInnerAngle<"u"?i.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof i.pannerAttr.coneOuterAngle<"u"?i.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof i.pannerAttr.coneOuterGain<"u"?i.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof i.pannerAttr.distanceModel<"u"?i.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof i.pannerAttr.maxDistance<"u"?i.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof i.pannerAttr.refDistance<"u"?i.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof i.pannerAttr.rolloffFactor<"u"?i.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof i.pannerAttr.panningModel<"u"?i.pannerAttr.panningModel:r._panningModel});else return u=r._soundById(parseInt(n[0],10)),u?u._pannerAttr:r._pannerAttr;else n.length===2&&(i=n[0],a=parseInt(n[1],10));for(var l=r._getSoundIds(a),f=0;f<l.length;f++)if(u=r._soundById(l[f]),u){var p=u._pannerAttr;p={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:p.coneInnerAngle,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:p.coneOuterAngle,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:p.coneOuterGain,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:p.distanceModel,maxDistance:typeof i.maxDistance<"u"?i.maxDistance:p.maxDistance,refDistance:typeof i.refDistance<"u"?i.refDistance:p.refDistance,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:p.rolloffFactor,panningModel:typeof i.panningModel<"u"?i.panningModel:p.panningModel};var g=u._panner;g?(g.coneInnerAngle=p.coneInnerAngle,g.coneOuterAngle=p.coneOuterAngle,g.coneOuterGain=p.coneOuterGain,g.distanceModel=p.distanceModel,g.maxDistance=p.maxDistance,g.refDistance=p.refDistance,g.rolloffFactor=p.rolloffFactor,g.panningModel=p.panningModel):(u._pos||(u._pos=r._pos||[0,0,-.5]),e(u,"spatial"))}return r},Sound.prototype.init=function(r){return function(){var n=this,i=n._parent;n._orientation=i._orientation,n._stereo=i._stereo,n._pos=i._pos,n._pannerAttr=i._pannerAttr,r.call(this),n._stereo?i.stereo(n._stereo):n._pos&&i.pos(n._pos[0],n._pos[1],n._pos[2],n._id)}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var n=this,i=n._parent;return n._orientation=i._orientation,n._stereo=i._stereo,n._pos=i._pos,n._pannerAttr=i._pannerAttr,n._stereo?i.stereo(n._stereo):n._pos?i.pos(n._pos[0],n._pos[1],n._pos[2],n._id):n._panner&&(n._panner.disconnect(0),n._panner=void 0,i._refreshBuffer(n)),r.call(this)}}(Sound.prototype.reset);var e=function(r,n){n=n||"spatial",n==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,!0).play(r._id,!0)}})()})(yg);const yR=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=te.useState(!1),n=X.useRef(null),i=X.useRef(e),a=X.useRef(null),u=te.useRef(null),{tl:l,dragModeRef:f}=X.useContext(en),{uniqueId:p,src:g,startAt:c,endAt:d,mute:m,speed:_,audioStartAt:y,audioEndAt:b,visible:x}=t;ht(Ze.PAUSE,()=>{var F;n.current&&u.current&&((F=u.current)==null||F.pause(),i.current.isPlaying=!1)}),ht(Ze.COMPLETE,()=>{y>0&&u.current&&u.current.seek(y)}),ht(Ze.SCRUBBER_CLICKED,()=>{var F;n.current&&u.current&&((F=u.current)==null||F.pause(),i.current.isPlaying=!1)}),te.useEffect(()=>{u.current&&(f.current?(u.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[f]);const E=(F,N)=>{l.current&&l.current.isActive()&&a.current&&a.current.isActive()&&!f.current&&u.current&&(console.log("gsap on start 0020",p,F,N),u.current.play(),i.current.isPlaying=!0)},w=()=>{var F;n.current&&((F=u.current)==null||F.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=F=>{var L,D;const N=F+((L=a.current)==null?void 0:L.time());u.current&&f.current?(u.current.seek(N),u.current.pause(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&((D=l.current)!=null&&D.isActive())&&u.current&&(u.current.seek(N),u.current.play(),i.current.isPlaying=!0)},O=()=>{};return X.useEffect(()=>{let F=ee.context(()=>{});if(n.current&&l.current){const N={duration:Number(b)-Number(y),onStart:E,onComplete:w,onStartParams:[y,b],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[y,b]};F=ee.context(()=>{a.current=ee.from(n.current,N,y),l.current.to(n.current,{alpha:1,duration:.01},c).to(n.current,{alpha:0,duration:.1},Number(d)),l.current.add(a.current,c)})}return()=>{a.current&&(a.current.kill(),ee.killTweensOf(a.current)),F.revert()}},[c,d,y,b]),te.useEffect(()=>{n.current&&r(!0)},[]),te.useEffect(()=>(Qi(g)||(u.current=new yg.Howl({src:[g],autoplay:!1,loop:!1,rate:_||1,volume:!m&&x?1:0,onload:()=>{console.log("loaded audio sprite"+p),i.current.loaded=!0,u.current&&(y>0&&u.current.seek(y),u.current.volume(!m&&x?1:0),u.current.rate(_||1),u.current.pause(),i.current.isPlaying=!1,i.current.completed=!1)},onend:()=>{console.log("end of playing audio sprite"+p),i.current.isPlaying=!1,i.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+p),i.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+p),i.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+p),i.current.isPlaying=!1}})),()=>{u.current&&u.current.unload()}),[p,g,c,d,y,b,m,x,_]),te.useEffect(()=>{u.current&&(console.log("running updateEffect 2002",p,b),u.current.volume(!m&&x?1:0),u.current.rate(_||1),i.current.isPlaying=!0)},[m,x,_]),Ae.jsx(Be.Container,{ref:n})};function xR(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var xg=xR,bR=Lh,TR=hu,wR=1,SR=2;function AR(t,e,r,n){var i=r.length,a=i,u=!n;if(t==null)return!a;for(t=Object(t);i--;){var l=r[i];if(u&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i<a;){l=r[i];var f=l[0],p=t[f],g=l[1];if(u&&l[2]){if(p===void 0&&!(f in t))return!1}else{var c=new bR;if(n)var d=n(p,g,f,t,e,c);if(!(d===void 0?TR(g,p,wR|SR,n,c):d))return!1}}return!0}var ER=AR,CR=Ki;function IR(t){return t===t&&!CR(t)}var bg=IR,RR=bg,PR=iu;function MR(t){for(var e=PR(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,RR(i)]}return e}var OR=MR;function FR(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var Tg=FR,NR=ER,LR=OR,kR=Tg;function DR(t){var e=LR(t);return e.length==1&&e[0][2]?kR(e[0][0],e[0][1]):function(r){return r===t||NR(r,t,e)}}var BR=DR,UR=Yi,$R=Zi,GR="[object Symbol]";function HR(t){return typeof t=="symbol"||$R(t)&&UR(t)==GR}var Ja=HR,zR=Rr,VR=Ja,jR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XR=/^\w*$/;function WR(t,e){if(zR(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||VR(t)?!0:XR.test(t)||!jR.test(t)||e!=null&&t in Object(e)}var Wl=WR,wg=Qo,qR="Expected a function";function ql(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(qR);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var u=t.apply(this,n);return r.cache=a.set(i,u)||a,u};return r.cache=new(ql.Cache||wg),r}ql.Cache=wg;var YR=ql,KR=YR,ZR=500;function QR(t){var e=KR(t,function(n){return r.size===ZR&&r.clear(),n}),r=e.cache;return e}var JR=QR,eP=JR,tP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rP=/\\(\\)?/g,nP=eP(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(tP,function(r,n,i,a){e.push(i?a.replace(rP,"$1"):n||r)}),e}),iP=nP,Sg=js,sP=xg,aP=Rr,oP=Ja,uP=1/0,Ag=Sg?Sg.prototype:void 0,Eg=Ag?Ag.toString:void 0;function Cg(t){if(typeof t=="string")return t;if(aP(t))return sP(t,Cg)+"";if(oP(t))return Eg?Eg.call(t):"";var e=t+"";return e=="0"&&1/t==-uP?"-0":e}var lP=Cg,cP=lP;function hP(t){return t==null?"":cP(t)}var fP=hP,dP=Rr,pP=Wl,gP=iP,mP=fP;function vP(t,e){return dP(t)?t:pP(t,e)?[t]:gP(mP(t))}var Ig=vP,_P=Ja,yP=1/0;function xP(t){if(typeof t=="string"||_P(t))return t;var e=t+"";return e=="0"&&1/t==-yP?"-0":e}var eo=xP,bP=Ig,TP=eo;function wP(t,e){e=bP(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[TP(e[r++])];return r&&r==n?t:void 0}var Rg=wP,SP=Rg;function AP(t,e,r){var n=t==null?void 0:SP(t,e);return n===void 0?r:n}var EP=AP;function CP(t,e){return t!=null&&e in Object(t)}var IP=CP,RP=Ig,PP=eu,MP=Rr,OP=zh,FP=ru,NP=eo;function LP(t,e,r){e=RP(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var u=NP(e[n]);if(!(a=t!=null&&r(t,u)))break;t=t[u]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&FP(i)&&OP(u,i)&&(MP(t)||PP(t)))}var kP=LP,DP=IP,BP=kP;function UP(t,e){return t!=null&&BP(t,e,DP)}var $P=UP,GP=hu,HP=EP,zP=$P,VP=Wl,jP=bg,XP=Tg,WP=eo,qP=1,YP=2;function KP(t,e){return VP(t)&&jP(e)?XP(WP(t),e):function(r){var n=HP(r,t);return n===void 0&&n===e?zP(r,t):GP(e,n,qP|YP)}}var ZP=KP;function QP(t){return t}var JP=QP;function eM(t){return function(e){return e==null?void 0:e[t]}}var tM=eM,rM=Rg;function nM(t){return function(e){return rM(e,t)}}var iM=nM,sM=tM,aM=iM,oM=Wl,uM=eo;function lM(t){return oM(t)?sM(uM(t)):aM(t)}var cM=lM,hM=BR,fM=ZP,dM=JP,pM=Rr,gM=cM;function mM(t){return typeof t=="function"?t:t==null?dM:typeof t=="object"?pM(t)?fM(t[0],t[1]):hM(t):gM(t)}var vM=mM;function _M(t){return function(e,r,n){for(var i=-1,a=Object(e),u=n(e),l=u.length;l--;){var f=u[t?l:++i];if(r(a[f],f,a)===!1)break}return e}}var yM=_M,xM=yM,bM=xM(),TM=bM,wM=TM,SM=iu;function AM(t,e){return t&&wM(t,e,SM)}var EM=AM,CM=Zs;function IM(t,e){return function(r,n){if(r==null)return r;if(!CM(r))return t(r,n);for(var i=r.length,a=e?i:-1,u=Object(r);(e?a--:++a<i)&&n(u[a],a,u)!==!1;);return r}}var RM=IM,PM=EM,MM=RM,OM=MM(PM),FM=OM,NM=FM,LM=Zs;function kM(t,e){var r=-1,n=LM(t)?Array(t.length):[];return NM(t,function(i,a,u){n[++r]=e(i,a,u)}),n}var DM=kM,BM=xg,UM=vM,$M=DM,GM=Rr;function HM(t,e){var r=GM(t)?BM:$M;return r(t,UM(e))}var zM=HM;const VM=bn(zM);var Gn={},Pg={},Vr={};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.loop=Vr.conditional=Vr.parse=void 0;var jM=function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(u){return t(e,u,n,i)});else if(typeof r=="function")r(e,n,i,t);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(i[a]={},t(e,r[a],n,i[a])):i[a]=r[a](e,n,i,t)}return n};Vr.parse=jM;var XM=function(e,r){return function(n,i,a,u){r(n,i,a)&&u(n,e,i,a)}};Vr.conditional=XM;var WM=function(e,r){return function(n,i,a,u){for(var l=[],f=n.pos;r(n,i,a);){var p={};if(u(n,e,i,p),n.pos===f)break;f=n.pos,l.push(p)}return l}};Vr.loop=WM;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.readBits=pt.readArray=pt.readUnsigned=pt.readString=pt.peekBytes=pt.readBytes=pt.peekByte=pt.readByte=pt.buildStream=void 0;var qM=function(e){return{data:e,pos:0}};pt.buildStream=qM;var Mg=function(){return function(e){return e.data[e.pos++]}};pt.readByte=Mg;var YM=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};pt.peekByte=YM;var to=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};pt.readBytes=to;var KM=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};pt.peekBytes=KM;var ZM=function(e){return function(r){return Array.from(to(e)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};pt.readString=ZM;var QM=function(e){return function(r){var n=to(2)(r);return e?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};pt.readUnsigned=QM;var JM=function(e,r){return function(n,i,a){for(var u=typeof r=="function"?r(n,i,a):r,l=to(e),f=new Array(u),p=0;p<u;p++)f[p]=l(n);return f}};pt.readArray=JM;var eO=function(e,r,n){for(var i=0,a=0;a<n;a++)i+=e[r+a]&&Math.pow(2,n-a-1);return i},tO=function(e){return function(r){for(var n=Mg()(r),i=new Array(8),a=0;a<8;a++)i[7-a]=!!(n&1<<a);return Object.keys(e).reduce(function(u,l){var f=e[l];return f.length?u[l]=eO(i,f.index,f.length):u[l]=i[f.index],u},{})}};pt.readBits=tO,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=Vr,r=pt,n={blocks:function(d){for(var m=0,_=[],y=d.data.length,b=0,x=(0,r.readByte)()(d);x!==m&&x;x=(0,r.readByte)()(d)){if(d.pos+x>=y){var E=y-d.pos;_.push((0,r.readBytes)(E)(d)),b+=E;break}_.push((0,r.readBytes)(x)(d)),b+=x}for(var w=new Uint8Array(b),I=0,O=0;O<_.length;O++)w.set(_[O],I),I+=_[O].length;return w}},i=(0,e.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(c){var d=(0,r.peekBytes)(2)(c);return d[0]===33&&d[1]===249}),a=(0,e.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,r.readArray)(3,function(c,d,m){return Math.pow(2,m.descriptor.lct.size+1)})},function(c,d,m){return m.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(c){return(0,r.peekByte)()(c)===44}),u=(0,e.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(d,m,_){return(0,r.readBytes)(_.text.blockSize)(d)}},n]},function(c){var d=(0,r.peekBytes)(2)(c);return d[0]===33&&d[1]===1}),l=(0,e.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(d,m,_){return(0,r.readString)(_.blockSize)(d)}},n]},function(c){var d=(0,r.peekBytes)(2)(c);return d[0]===33&&d[1]===255}),f=(0,e.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(c){var d=(0,r.peekBytes)(2)(c);return d[0]===33&&d[1]===254}),p=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,e.conditional)({gct:(0,r.readArray)(3,function(c,d){return Math.pow(2,d.lsd.gct.size+1)})},function(c,d){return d.lsd.gct.exists}),{frames:(0,e.loop)([i,l,f,a,u],function(c){var d=(0,r.peekByte)()(c);return d===33||d===44})}],g=p;t.default=g}(Pg);var ro={};Object.defineProperty(ro,"__esModule",{value:!0}),ro.deinterlace=void 0;var rO=function(e,r){for(var n=new Array(e.length),i=e.length/r,a=function(d,m){var _=e.slice(m*r,(m+1)*r);n.splice.apply(n,[d*r,r].concat(_))},u=[0,4,2,1],l=[8,8,4,2],f=0,p=0;p<4;p++)for(var g=u[p];g<i;g+=l[p])a(g,f),f++;return n};ro.deinterlace=rO;var no={};Object.defineProperty(no,"__esModule",{value:!0}),no.lzw=void 0;var nO=function(e,r,n){var i=4096,a=-1,u=n,l,f,p,g,c,d,m,F,_,y,O,b,N,L,V,D,x=new Array(n),E=new Array(i),w=new Array(i),I=new Array(i+1);for(b=e,f=1<<b,c=f+1,l=f+2,m=a,g=b+1,p=(1<<g)-1,_=0;_<f;_++)E[_]=0,w[_]=_;var O,F,N,L,D,V;for(O=F=N=L=D=V=0,y=0;y<u;){if(L===0){if(F<g){O+=r[V]<<F,F+=8,V++;continue}if(_=O&p,O>>=g,F-=g,_>l||_==c)break;if(_==f){g=b+1,p=(1<<g)-1,l=f+2,m=a;continue}if(m==a){I[L++]=w[_],m=_,N=_;continue}for(d=_,_==l&&(I[L++]=N,_=m);_>f;)I[L++]=w[_],_=E[_];N=w[_]&255,I[L++]=N,l<i&&(E[l]=m,w[l]=N,l++,!(l&p)&&l<i&&(g++,p+=l)),m=d}L--,x[D++]=I[L],y++}for(y=D;y<u;y++)x[y]=0;return x};no.lzw=nO,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.decompressFrames=Gn.decompressFrame=Gn.parseGIF=void 0;var iO=lO(Pg),sO=Vr,aO=pt,oO=ro,uO=no;function lO(t){return t&&t.__esModule?t:{default:t}}var cO=function(e){var r=new Uint8Array(e);return(0,sO.parse)((0,aO.buildStream)(r),iO.default)};Gn.parseGIF=cO;var hO=function(e){for(var r=e.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var a=i*4,u=e.pixels[i],l=e.colorTable[u]||[0,0,0];n[a]=l[0],n[a+1]=l[1],n[a+2]=l[2],n[a+3]=u!==e.transparentIndex?255:0}return n},Og=function(e,r,n){if(!e.image){console.warn("gif frame does not have associated image.");return}var i=e.image,a=i.descriptor.width*i.descriptor.height,u=(0,uO.lzw)(i.data.minCodeSize,i.data.blocks,a);i.descriptor.lct.interlaced&&(u=(0,oO.deinterlace)(u,i.descriptor.width));var l={pixels:u,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?l.colorTable=i.lct:l.colorTable=r,e.gce&&(l.delay=(e.gce.delay||10)*10,l.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(l.transparentIndex=e.gce.transparentColorIndex)),n&&(l.patch=hO(l)),l};Gn.decompressFrame=Og;var fO=function(e,r){return e.frames.filter(function(n){return n.image}).map(function(n){return Og(n,e.gct,r)})};Gn.decompressFrames=fO;const Fg=(t,e={})=>{typeof e=="function"&&(e=e(t));const r=e.loaded&&t.loaded!==e.loaded,{playing:n,...i}=e,a={...t,...i};return r&&Object.assign(a,{playing:a.autoPlay&&a.loaded}),(e.delays!=null||e.frames!=null)&&Object.assign(a,{length:a.frames.length}),(e.index!=null||e.frames!=null)&&Object.assign(a,{index:a.length===0?0:(a.length+a.index)%a.length}),e.playing!=null&&Object.assign(a,a.loaded?{playing:n}:{autoPlay:n}),a},dO=t=>Fg({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),pO=t=>X.useReducer(Fg,t,dO);var gO='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function mO(t){const e=new Blob([gO],{type:"application/javascript"}),r=URL.createObjectURL(e),n=new Worker(r,t);return URL.revokeObjectURL(r),n}const vO=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),_O=(t,e)=>{const r={};return()=>(r.instance||(r.instance=t()),X.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(e&&e(r.instance),delete r.instance,delete r.timeout)})}),[r,e]),r.instance)},yO=t=>{const e=X.useRef(t);return X.useEffect(()=>{e.current=t},[t]),e},xO=t=>{const e=yO(t);return X.useCallback(r=>e.current&&e.current(r),[])},bO=_O(()=>new mO,t=>t.terminate()),TO=(t,e)=>{const r=xO(e),n=bO();X.useEffect(()=>{if(typeof t=="string"){const i=a=>{const u=a.data||a;if(u.src===t){const l=u.error?u:vO(u);r(l)}};return n.addEventListener("message",i),n.postMessage({src:t,type:"parse"}),()=>{n.postMessage({src:t,type:"cancel"}),n.removeEventListener("message",i)}}},[n,t])},wO=({isPlaying:t,forwardRef:e,...r})=>{const n=te.useRef(null);return te.useImperativeHandle(e,()=>n.current,[n]),te.useEffect(()=>{if(n.current===null)return;const i=n.current;i[t?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[t]),Ae.jsx(Be.AnimatedSprite,{ref:n,...r,isPlaying:t})},Ng=te.memo(wO);var io={exports:{}};/**
1966
+ */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var n=this;if(!n.ctx||!n.ctx.listener)return n;for(var i=n._howls.length-1;i>=0;i--)n._howls[i].stereo(r);return n},HowlerGlobal.prototype.pos=function(r,n,i){var a=this;if(!a.ctx||!a.ctx.listener)return a;if(n=typeof n!="number"?a._pos[1]:n,i=typeof i!="number"?a._pos[2]:i,typeof r=="number")a._pos=[r,n,i],typeof a.ctx.listener.positionX<"u"?(a.ctx.listener.positionX.setTargetAtTime(a._pos[0],Howler.ctx.currentTime,.1),a.ctx.listener.positionY.setTargetAtTime(a._pos[1],Howler.ctx.currentTime,.1),a.ctx.listener.positionZ.setTargetAtTime(a._pos[2],Howler.ctx.currentTime,.1)):a.ctx.listener.setPosition(a._pos[0],a._pos[1],a._pos[2]);else return a._pos;return a},HowlerGlobal.prototype.orientation=function(r,n,i,a,u,l){var h=this;if(!h.ctx||!h.ctx.listener)return h;var p=h._orientation;if(n=typeof n!="number"?p[1]:n,i=typeof i!="number"?p[2]:i,a=typeof a!="number"?p[3]:a,u=typeof u!="number"?p[4]:u,l=typeof l!="number"?p[5]:l,typeof r=="number")h._orientation=[r,n,i,a,u,l],typeof h.ctx.listener.forwardX<"u"?(h.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),h.ctx.listener.forwardY.setTargetAtTime(n,Howler.ctx.currentTime,.1),h.ctx.listener.forwardZ.setTargetAtTime(i,Howler.ctx.currentTime,.1),h.ctx.listener.upX.setTargetAtTime(a,Howler.ctx.currentTime,.1),h.ctx.listener.upY.setTargetAtTime(u,Howler.ctx.currentTime,.1),h.ctx.listener.upZ.setTargetAtTime(l,Howler.ctx.currentTime,.1)):h.ctx.listener.setOrientation(r,n,i,a,u,l);else return p;return h},Howl.prototype.init=function(r){return function(n){var i=this;return i._orientation=n.orientation||[1,0,0],i._stereo=n.stereo||null,i._pos=n.pos||null,i._pannerAttr={coneInnerAngle:typeof n.coneInnerAngle<"u"?n.coneInnerAngle:360,coneOuterAngle:typeof n.coneOuterAngle<"u"?n.coneOuterAngle:360,coneOuterGain:typeof n.coneOuterGain<"u"?n.coneOuterGain:0,distanceModel:typeof n.distanceModel<"u"?n.distanceModel:"inverse",maxDistance:typeof n.maxDistance<"u"?n.maxDistance:1e4,panningModel:typeof n.panningModel<"u"?n.panningModel:"HRTF",refDistance:typeof n.refDistance<"u"?n.refDistance:1,rolloffFactor:typeof n.rolloffFactor<"u"?n.rolloffFactor:1},i._onstereo=n.onstereo?[{fn:n.onstereo}]:[],i._onpos=n.onpos?[{fn:n.onpos}]:[],i._onorientation=n.onorientation?[{fn:n.onorientation}]:[],r.call(this,n)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,n){var i=this;if(!i._webAudio)return i;if(i._state!=="loaded")return i._queue.push({event:"stereo",action:function(){i.stereo(r,n)}}),i;var a=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof n>"u")if(typeof r=="number")i._stereo=r,i._pos=[r,0,0];else return i._stereo;for(var u=i._getSoundIds(n),l=0;l<u.length;l++){var h=i._soundById(u[l]);if(h)if(typeof r=="number")h._stereo=r,h._pos=[r,0,0],h._node&&(h._pannerAttr.panningModel="equalpower",(!h._panner||!h._panner.pan)&&e(h,a),a==="spatial"?typeof h._panner.positionX<"u"?(h._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),h._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),h._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):h._panner.setPosition(r,0,0):h._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),i._emit("stereo",h._id);else return h._stereo}return i},Howl.prototype.pos=function(r,n,i,a){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"pos",action:function(){u.pos(r,n,i,a)}}),u;if(n=typeof n!="number"?0:n,i=typeof i!="number"?-.5:i,typeof a>"u")if(typeof r=="number")u._pos=[r,n,i];else return u._pos;for(var l=u._getSoundIds(a),h=0;h<l.length;h++){var p=u._soundById(l[h]);if(p)if(typeof r=="number")p._pos=[r,n,i],p._node&&((!p._panner||p._panner.pan)&&e(p,"spatial"),typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(n,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(i,Howler.ctx.currentTime)):p._panner.setPosition(r,n,i)),u._emit("pos",p._id);else return p._pos}return u},Howl.prototype.orientation=function(r,n,i,a){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"orientation",action:function(){u.orientation(r,n,i,a)}}),u;if(n=typeof n!="number"?u._orientation[1]:n,i=typeof i!="number"?u._orientation[2]:i,typeof a>"u")if(typeof r=="number")u._orientation=[r,n,i];else return u._orientation;for(var l=u._getSoundIds(a),h=0;h<l.length;h++){var p=u._soundById(l[h]);if(p)if(typeof r=="number")p._orientation=[r,n,i],p._node&&(p._panner||(p._pos||(p._pos=u._pos||[0,0,-.5]),e(p,"spatial")),typeof p._panner.orientationX<"u"?(p._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),p._panner.orientationY.setValueAtTime(n,Howler.ctx.currentTime),p._panner.orientationZ.setValueAtTime(i,Howler.ctx.currentTime)):p._panner.setOrientation(r,n,i)),u._emit("orientation",p._id);else return p._orientation}return u},Howl.prototype.pannerAttr=function(){var r=this,n=arguments,i,a,u;if(!r._webAudio)return r;if(n.length===0)return r._pannerAttr;if(n.length===1)if(typeof n[0]=="object")i=n[0],typeof a>"u"&&(i.pannerAttr||(i.pannerAttr={coneInnerAngle:i.coneInnerAngle,coneOuterAngle:i.coneOuterAngle,coneOuterGain:i.coneOuterGain,distanceModel:i.distanceModel,maxDistance:i.maxDistance,refDistance:i.refDistance,rolloffFactor:i.rolloffFactor,panningModel:i.panningModel}),r._pannerAttr={coneInnerAngle:typeof i.pannerAttr.coneInnerAngle<"u"?i.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof i.pannerAttr.coneOuterAngle<"u"?i.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof i.pannerAttr.coneOuterGain<"u"?i.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof i.pannerAttr.distanceModel<"u"?i.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof i.pannerAttr.maxDistance<"u"?i.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof i.pannerAttr.refDistance<"u"?i.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof i.pannerAttr.rolloffFactor<"u"?i.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof i.pannerAttr.panningModel<"u"?i.pannerAttr.panningModel:r._panningModel});else return u=r._soundById(parseInt(n[0],10)),u?u._pannerAttr:r._pannerAttr;else n.length===2&&(i=n[0],a=parseInt(n[1],10));for(var l=r._getSoundIds(a),h=0;h<l.length;h++)if(u=r._soundById(l[h]),u){var p=u._pannerAttr;p={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:p.coneInnerAngle,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:p.coneOuterAngle,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:p.coneOuterGain,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:p.distanceModel,maxDistance:typeof i.maxDistance<"u"?i.maxDistance:p.maxDistance,refDistance:typeof i.refDistance<"u"?i.refDistance:p.refDistance,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:p.rolloffFactor,panningModel:typeof i.panningModel<"u"?i.panningModel:p.panningModel};var g=u._panner;g?(g.coneInnerAngle=p.coneInnerAngle,g.coneOuterAngle=p.coneOuterAngle,g.coneOuterGain=p.coneOuterGain,g.distanceModel=p.distanceModel,g.maxDistance=p.maxDistance,g.refDistance=p.refDistance,g.rolloffFactor=p.rolloffFactor,g.panningModel=p.panningModel):(u._pos||(u._pos=r._pos||[0,0,-.5]),e(u,"spatial"))}return r},Sound.prototype.init=function(r){return function(){var n=this,i=n._parent;n._orientation=i._orientation,n._stereo=i._stereo,n._pos=i._pos,n._pannerAttr=i._pannerAttr,r.call(this),n._stereo?i.stereo(n._stereo):n._pos&&i.pos(n._pos[0],n._pos[1],n._pos[2],n._id)}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var n=this,i=n._parent;return n._orientation=i._orientation,n._stereo=i._stereo,n._pos=i._pos,n._pannerAttr=i._pannerAttr,n._stereo?i.stereo(n._stereo):n._pos?i.pos(n._pos[0],n._pos[1],n._pos[2],n._id):n._panner&&(n._panner.disconnect(0),n._panner=void 0,i._refreshBuffer(n)),r.call(this)}}(Sound.prototype.reset);var e=function(r,n){n=n||"spatial",n==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,!0).play(r._id,!0)}})()})(qp);const _E=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=re.useState(!1),n=W.useRef(null),i=W.useRef(e),a=W.useRef(null),u=re.useRef(null),{tl:l,dragModeRef:h}=W.useContext(bn),{uniqueId:p,src:g,startAt:c,endAt:d,mute:m,speed:_,audioStartAt:y,audioEndAt:b,visible:x}=t;ht(Ye.PAUSE,()=>{var F;n.current&&u.current&&((F=u.current)==null||F.pause(),i.current.isPlaying=!1)}),ht(Ye.COMPLETE,()=>{y>0&&u.current&&u.current.seek(y)}),ht(Ye.SCRUBBER_CLICKED,()=>{var F;n.current&&u.current&&((F=u.current)==null||F.pause(),i.current.isPlaying=!1)}),re.useEffect(()=>{u.current&&(h.current?(u.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[h]);const E=(F,N)=>{l.current&&l.current.isActive()&&a.current&&a.current.isActive()&&!h.current&&u.current&&(console.log("gsap on start 0020",p,F,N),u.current.play(),i.current.isPlaying=!0)},w=()=>{var F;n.current&&((F=u.current)==null||F.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=F=>{var L,B;const N=F+((L=a.current)==null?void 0:L.time());u.current&&h.current?(u.current.seek(N),u.current.pause(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&((B=l.current)!=null&&B.isActive())&&u.current&&(u.current.seek(N),u.current.play(),i.current.isPlaying=!0)},O=()=>{};return W.useEffect(()=>{let F=ee.context(()=>{});if(n.current&&l.current){const N={duration:Number(b)-Number(y),onStart:E,onComplete:w,onStartParams:[y,b],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[y,b]};F=ee.context(()=>{a.current=ee.from(n.current,N,y),l.current.to(n.current,{alpha:1,duration:.01},c).to(n.current,{alpha:0,duration:.1},Number(d)),l.current.add(a.current,c)})}return()=>{a.current&&(a.current.kill(),ee.killTweensOf(a.current)),F.revert()}},[c,d,y,b]),re.useEffect(()=>{n.current&&r(!0)},[]),re.useEffect(()=>(Qi(g)||(u.current=new qp.Howl({src:[g],autoplay:!1,loop:!1,rate:_||1,volume:!m&&x?1:0,onload:()=>{console.log("loaded audio sprite"+p),i.current.loaded=!0,u.current&&(y>0&&u.current.seek(y),u.current.volume(!m&&x?1:0),u.current.rate(_||1),u.current.pause(),i.current.isPlaying=!1,i.current.completed=!1)},onend:()=>{console.log("end of playing audio sprite"+p),i.current.isPlaying=!1,i.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+p),i.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+p),i.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+p),i.current.isPlaying=!1}})),()=>{u.current&&u.current.unload()}),[p,g,c,d,y,b,m,x,_]),re.useEffect(()=>{u.current&&(console.log("running updateEffect 2002",p,b),u.current.volume(!m&&x?1:0),u.current.rate(_||1),i.current.isPlaying=!0)},[m,x,_]),we.jsx(ke.Container,{ref:n})};function yE(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Yp=yE;function xE(){this.__data__=[],this.size=0}var bE=xE;function TE(t,e){return t===e||t!==t&&e!==e}var Kp=TE,wE=Kp;function SE(t,e){for(var r=t.length;r--;)if(wE(t[r][0],e))return r;return-1}var Va=SE,AE=Va,EE=Array.prototype,CE=EE.splice;function IE(t){var e=this.__data__,r=AE(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():CE.call(e,r,1),--this.size,!0}var RE=IE,PE=Va;function ME(t){var e=this.__data__,r=PE(e,t);return r<0?void 0:e[r][1]}var OE=ME,FE=Va;function NE(t){return FE(this.__data__,t)>-1}var LE=NE,kE=Va;function BE(t,e){var r=this.__data__,n=kE(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var DE=BE,UE=bE,$E=RE,GE=OE,HE=LE,zE=DE;function Ci(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ci.prototype.clear=UE,Ci.prototype.delete=$E,Ci.prototype.get=GE,Ci.prototype.has=HE,Ci.prototype.set=zE;var ja=Ci,VE=ja;function jE(){this.__data__=new VE,this.size=0}var XE=jE;function WE(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var qE=WE;function YE(t){return this.__data__.get(t)}var KE=YE;function ZE(t){return this.__data__.has(t)}var QE=ZE,JE=Jn,eC=JE(Object,"create"),Xa=eC,Zp=Xa;function tC(){this.__data__=Zp?Zp(null):{},this.size=0}var rC=tC;function nC(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var iC=nC,sC=Xa,aC="__lodash_hash_undefined__",oC=Object.prototype,uC=oC.hasOwnProperty;function lC(t){var e=this.__data__;if(sC){var r=e[t];return r===aC?void 0:r}return uC.call(e,t)?e[t]:void 0}var cC=lC,hC=Xa,fC=Object.prototype,dC=fC.hasOwnProperty;function pC(t){var e=this.__data__;return hC?e[t]!==void 0:dC.call(e,t)}var gC=pC,mC=Xa,vC="__lodash_hash_undefined__";function _C(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=mC&&e===void 0?vC:e,this}var yC=_C,xC=rC,bC=iC,TC=cC,wC=gC,SC=yC;function Ii(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ii.prototype.clear=xC,Ii.prototype.delete=bC,Ii.prototype.get=TC,Ii.prototype.has=wC,Ii.prototype.set=SC;var AC=Ii,Qp=AC,EC=ja,CC=Zo;function IC(){this.size=0,this.__data__={hash:new Qp,map:new(CC||EC),string:new Qp}}var RC=IC;function PC(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var MC=PC,OC=MC;function FC(t,e){var r=t.__data__;return OC(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Wa=FC,NC=Wa;function LC(t){var e=NC(this,t).delete(t);return this.size-=e?1:0,e}var kC=LC,BC=Wa;function DC(t){return BC(this,t).get(t)}var UC=DC,$C=Wa;function GC(t){return $C(this,t).has(t)}var HC=GC,zC=Wa;function VC(t,e){var r=zC(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var jC=VC,XC=RC,WC=kC,qC=UC,YC=HC,KC=jC;function Ri(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ri.prototype.clear=XC,Ri.prototype.delete=WC,Ri.prototype.get=qC,Ri.prototype.has=YC,Ri.prototype.set=KC;var Gl=Ri,ZC=ja,QC=Zo,JC=Gl,e2=200;function t2(t,e){var r=this.__data__;if(r instanceof ZC){var n=r.__data__;if(!QC||n.length<e2-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new JC(n)}return r.set(t,e),this.size=r.size,this}var r2=t2,n2=ja,i2=XE,s2=qE,a2=KE,o2=QE,u2=r2;function Pi(t){var e=this.__data__=new n2(t);this.size=e.size}Pi.prototype.clear=i2,Pi.prototype.delete=s2,Pi.prototype.get=a2,Pi.prototype.has=o2,Pi.prototype.set=u2;var Jp=Pi,l2="__lodash_hash_undefined__";function c2(t){return this.__data__.set(t,l2),this}var h2=c2;function f2(t){return this.__data__.has(t)}var d2=f2,p2=Gl,g2=h2,m2=d2;function qa(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new p2;++e<r;)this.add(t[e])}qa.prototype.add=qa.prototype.push=g2,qa.prototype.has=m2;var v2=qa;function _2(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var y2=_2;function x2(t,e){return t.has(e)}var b2=x2,T2=v2,w2=y2,S2=b2,A2=1,E2=2;function C2(t,e,r,n,i,a){var u=r&A2,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var p=a.get(t),g=a.get(e);if(p&&g)return p==e&&g==t;var c=-1,d=!0,m=r&E2?new T2:void 0;for(a.set(t,e),a.set(e,t);++c<l;){var _=t[c],y=e[c];if(n)var b=u?n(y,_,c,e,t,a):n(_,y,c,t,e,a);if(b!==void 0){if(b)continue;d=!1;break}if(m){if(!w2(e,function(x,E){if(!S2(m,E)&&(_===x||i(_,x,r,n,a)))return m.push(E)})){d=!1;break}}else if(!(_===y||i(_,y,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var eg=C2,I2=Ir,R2=I2.Uint8Array,P2=R2;function M2(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var O2=M2;function F2(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var N2=F2,tg=zs,rg=P2,L2=Kp,k2=eg,B2=O2,D2=N2,U2=1,$2=2,G2="[object Boolean]",H2="[object Date]",z2="[object Error]",V2="[object Map]",j2="[object Number]",X2="[object RegExp]",W2="[object Set]",q2="[object String]",Y2="[object Symbol]",K2="[object ArrayBuffer]",Z2="[object DataView]",ng=tg?tg.prototype:void 0,Hl=ng?ng.valueOf:void 0;function Q2(t,e,r,n,i,a,u){switch(r){case Z2:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case K2:return!(t.byteLength!=e.byteLength||!a(new rg(t),new rg(e)));case G2:case H2:case j2:return L2(+t,+e);case z2:return t.name==e.name&&t.message==e.message;case X2:case q2:return t==e+"";case V2:var l=B2;case W2:var h=n&U2;if(l||(l=D2),t.size!=e.size&&!h)return!1;var p=u.get(t);if(p)return p==e;n|=$2,u.set(t,e);var g=k2(l(t),l(e),n,i,a,u);return u.delete(t),g;case Y2:if(Hl)return Hl.call(t)==Hl.call(e)}return!1}var J2=Q2;function eI(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var tI=eI,rI=tI,nI=Rr;function iI(t,e,r){var n=e(t);return nI(t)?n:rI(n,r(t))}var sI=iI;function aI(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var u=t[r];e(u,r,t)&&(a[i++]=u)}return a}var oI=aI;function uI(){return[]}var lI=uI,cI=oI,hI=lI,fI=Object.prototype,dI=fI.propertyIsEnumerable,ig=Object.getOwnPropertySymbols,pI=ig?function(t){return t==null?[]:(t=Object(t),cI(ig(t),function(e){return dI.call(t,e)}))}:hI,gI=pI;function mI(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var vI=mI,_I=9007199254740991,yI=/^(?:0|[1-9]\d*)$/;function xI(t,e){var r=typeof t;return e=e??_I,!!e&&(r=="number"||r!="symbol"&&yI.test(t))&&t>-1&&t%1==0&&t<e}var sg=xI,bI=vI,TI=nu,wI=Rr,SI=su,AI=sg,EI=au,CI=Object.prototype,II=CI.hasOwnProperty;function RI(t,e){var r=wI(t),n=!r&&TI(t),i=!r&&!n&&SI(t),a=!r&&!n&&!i&&EI(t),u=r||n||i||a,l=u?bI(t.length,String):[],h=l.length;for(var p in t)(e||II.call(t,p))&&!(u&&(p=="length"||i&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||AI(p,h)))&&l.push(p);return l}var PI=RI,MI=PI,OI=wh,FI=Vs;function NI(t){return FI(t)?MI(t):OI(t)}var zl=NI,LI=sI,kI=gI,BI=zl;function DI(t){return LI(t,BI,kI)}var UI=DI,ag=UI,$I=1,GI=Object.prototype,HI=GI.hasOwnProperty;function zI(t,e,r,n,i,a){var u=r&$I,l=ag(t),h=l.length,p=ag(e),g=p.length;if(h!=g&&!u)return!1;for(var c=h;c--;){var d=l[c];if(!(u?d in e:HI.call(e,d)))return!1}var m=a.get(t),_=a.get(e);if(m&&_)return m==e&&_==t;var y=!0;a.set(t,e),a.set(e,t);for(var b=u;++c<h;){d=l[c];var x=t[d],E=e[d];if(n)var w=u?n(E,x,d,e,t,a):n(x,E,d,t,e,a);if(!(w===void 0?x===E||i(x,E,r,n,a):w)){y=!1;break}b||(b=d=="constructor")}if(y&&!b){var I=t.constructor,O=e.constructor;I!=O&&"constructor"in t&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof O=="function"&&O instanceof O)&&(y=!1)}return a.delete(t),a.delete(e),y}var VI=zI,Vl=Jp,jI=eg,XI=J2,WI=VI,og=Dh,ug=Rr,lg=su,qI=au,YI=1,cg="[object Arguments]",hg="[object Array]",Ya="[object Object]",KI=Object.prototype,fg=KI.hasOwnProperty;function ZI(t,e,r,n,i,a){var u=ug(t),l=ug(e),h=u?hg:og(t),p=l?hg:og(e);h=h==cg?Ya:h,p=p==cg?Ya:p;var g=h==Ya,c=p==Ya,d=h==p;if(d&&lg(t)){if(!lg(e))return!1;u=!0,g=!1}if(d&&!g)return a||(a=new Vl),u||qI(t)?jI(t,e,r,n,i,a):XI(t,e,h,r,n,i,a);if(!(r&YI)){var m=g&&fg.call(t,"__wrapped__"),_=c&&fg.call(e,"__wrapped__");if(m||_){var y=m?t.value():t,b=_?e.value():e;return a||(a=new Vl),i(y,b,r,n,a)}}return d?(a||(a=new Vl),WI(t,e,r,n,i,a)):!1}var QI=ZI,JI=QI,dg=Zi;function pg(t,e,r,n,i){return t===e?!0:t==null||e==null||!dg(t)&&!dg(e)?t!==t&&e!==e:JI(t,e,r,n,pg,i)}var gg=pg,eR=Jp,tR=gg,rR=1,nR=2;function iR(t,e,r,n){var i=r.length,a=i,u=!n;if(t==null)return!a;for(t=Object(t);i--;){var l=r[i];if(u&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i<a;){l=r[i];var h=l[0],p=t[h],g=l[1];if(u&&l[2]){if(p===void 0&&!(h in t))return!1}else{var c=new eR;if(n)var d=n(p,g,h,t,e,c);if(!(d===void 0?tR(g,p,rR|nR,n,c):d))return!1}}return!0}var sR=iR,aR=Ki;function oR(t){return t===t&&!aR(t)}var mg=oR,uR=mg,lR=zl;function cR(t){for(var e=lR(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,uR(i)]}return e}var hR=cR;function fR(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var vg=fR,dR=sR,pR=hR,gR=vg;function mR(t){var e=pR(t);return e.length==1&&e[0][2]?gR(e[0][0],e[0][1]):function(r){return r===t||dR(r,t,e)}}var vR=mR,_R=Yi,yR=Zi,xR="[object Symbol]";function bR(t){return typeof t=="symbol"||yR(t)&&_R(t)==xR}var Ka=bR,TR=Rr,wR=Ka,SR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,AR=/^\w*$/;function ER(t,e){if(TR(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||wR(t)?!0:AR.test(t)||!SR.test(t)||e!=null&&t in Object(e)}var jl=ER,_g=Gl,CR="Expected a function";function Xl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(CR);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var u=t.apply(this,n);return r.cache=a.set(i,u)||a,u};return r.cache=new(Xl.Cache||_g),r}Xl.Cache=_g;var IR=Xl,RR=IR,PR=500;function MR(t){var e=RR(t,function(n){return r.size===PR&&r.clear(),n}),r=e.cache;return e}var OR=MR,FR=OR,NR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LR=/\\(\\)?/g,kR=FR(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(NR,function(r,n,i,a){e.push(i?a.replace(LR,"$1"):n||r)}),e}),BR=kR,yg=zs,DR=Yp,UR=Rr,$R=Ka,GR=1/0,xg=yg?yg.prototype:void 0,bg=xg?xg.toString:void 0;function Tg(t){if(typeof t=="string")return t;if(UR(t))return DR(t,Tg)+"";if($R(t))return bg?bg.call(t):"";var e=t+"";return e=="0"&&1/t==-GR?"-0":e}var HR=Tg,zR=HR;function VR(t){return t==null?"":zR(t)}var jR=VR,XR=Rr,WR=jl,qR=BR,YR=jR;function KR(t,e){return XR(t)?t:WR(t,e)?[t]:qR(YR(t))}var wg=KR,ZR=Ka,QR=1/0;function JR(t){if(typeof t=="string"||ZR(t))return t;var e=t+"";return e=="0"&&1/t==-QR?"-0":e}var Za=JR,eP=wg,tP=Za;function rP(t,e){e=eP(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[tP(e[r++])];return r&&r==n?t:void 0}var Sg=rP,nP=Sg;function iP(t,e,r){var n=t==null?void 0:nP(t,e);return n===void 0?r:n}var sP=iP;function aP(t,e){return t!=null&&e in Object(t)}var oP=aP,uP=wg,lP=nu,cP=Rr,hP=sg,fP=iu,dP=Za;function pP(t,e,r){e=uP(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var u=dP(e[n]);if(!(a=t!=null&&r(t,u)))break;t=t[u]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&fP(i)&&hP(u,i)&&(cP(t)||lP(t)))}var gP=pP,mP=oP,vP=gP;function _P(t,e){return t!=null&&vP(t,e,mP)}var yP=_P,xP=gg,bP=sP,TP=yP,wP=jl,SP=mg,AP=vg,EP=Za,CP=1,IP=2;function RP(t,e){return wP(t)&&SP(e)?AP(EP(t),e):function(r){var n=bP(r,t);return n===void 0&&n===e?TP(r,t):xP(e,n,CP|IP)}}var PP=RP;function MP(t){return t}var OP=MP;function FP(t){return function(e){return e==null?void 0:e[t]}}var NP=FP,LP=Sg;function kP(t){return function(e){return LP(e,t)}}var BP=kP,DP=NP,UP=BP,$P=jl,GP=Za;function HP(t){return $P(t)?DP(GP(t)):UP(t)}var zP=HP,VP=vR,jP=PP,XP=OP,WP=Rr,qP=zP;function YP(t){return typeof t=="function"?t:t==null?XP:typeof t=="object"?WP(t)?jP(t[0],t[1]):VP(t):qP(t)}var KP=YP;function ZP(t){return function(e,r,n){for(var i=-1,a=Object(e),u=n(e),l=u.length;l--;){var h=u[t?l:++i];if(r(a[h],h,a)===!1)break}return e}}var QP=ZP,JP=QP,eM=JP(),tM=eM,rM=tM,nM=zl;function iM(t,e){return t&&rM(t,e,nM)}var sM=iM,aM=Vs;function oM(t,e){return function(r,n){if(r==null)return r;if(!aM(r))return t(r,n);for(var i=r.length,a=e?i:-1,u=Object(r);(e?a--:++a<i)&&n(u[a],a,u)!==!1;);return r}}var uM=oM,lM=sM,cM=uM,hM=cM(lM),fM=hM,dM=fM,pM=Vs;function gM(t,e){var r=-1,n=pM(t)?Array(t.length):[];return dM(t,function(i,a,u){n[++r]=e(i,a,u)}),n}var mM=gM,vM=Yp,_M=KP,yM=mM,xM=Rr;function bM(t,e){var r=xM(t)?vM:yM;return r(t,_M(e))}var TM=bM;const wM=Zn(TM);var $n={},Ag={},Vr={};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.loop=Vr.conditional=Vr.parse=void 0;var SM=function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(u){return t(e,u,n,i)});else if(typeof r=="function")r(e,n,i,t);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(i[a]={},t(e,r[a],n,i[a])):i[a]=r[a](e,n,i,t)}return n};Vr.parse=SM;var AM=function(e,r){return function(n,i,a,u){r(n,i,a)&&u(n,e,i,a)}};Vr.conditional=AM;var EM=function(e,r){return function(n,i,a,u){for(var l=[],h=n.pos;r(n,i,a);){var p={};if(u(n,e,i,p),n.pos===h)break;h=n.pos,l.push(p)}return l}};Vr.loop=EM;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.readBits=pt.readArray=pt.readUnsigned=pt.readString=pt.peekBytes=pt.readBytes=pt.peekByte=pt.readByte=pt.buildStream=void 0;var CM=function(e){return{data:e,pos:0}};pt.buildStream=CM;var Eg=function(){return function(e){return e.data[e.pos++]}};pt.readByte=Eg;var IM=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};pt.peekByte=IM;var Qa=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};pt.readBytes=Qa;var RM=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};pt.peekBytes=RM;var PM=function(e){return function(r){return Array.from(Qa(e)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};pt.readString=PM;var MM=function(e){return function(r){var n=Qa(2)(r);return e?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};pt.readUnsigned=MM;var OM=function(e,r){return function(n,i,a){for(var u=typeof r=="function"?r(n,i,a):r,l=Qa(e),h=new Array(u),p=0;p<u;p++)h[p]=l(n);return h}};pt.readArray=OM;var FM=function(e,r,n){for(var i=0,a=0;a<n;a++)i+=e[r+a]&&Math.pow(2,n-a-1);return i},NM=function(e){return function(r){for(var n=Eg()(r),i=new Array(8),a=0;a<8;a++)i[7-a]=!!(n&1<<a);return Object.keys(e).reduce(function(u,l){var h=e[l];return h.length?u[l]=FM(i,h.index,h.length):u[l]=i[h.index],u},{})}};pt.readBits=NM,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=Vr,r=pt,n={blocks:function(d){for(var m=0,_=[],y=d.data.length,b=0,x=(0,r.readByte)()(d);x!==m&&x;x=(0,r.readByte)()(d)){if(d.pos+x>=y){var E=y-d.pos;_.push((0,r.readBytes)(E)(d)),b+=E;break}_.push((0,r.readBytes)(x)(d)),b+=x}for(var w=new Uint8Array(b),I=0,O=0;O<_.length;O++)w.set(_[O],I),I+=_[O].length;return w}},i=(0,e.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(c){var d=(0,r.peekBytes)(2)(c);return d[0]===33&&d[1]===249}),a=(0,e.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,r.readArray)(3,function(c,d,m){return Math.pow(2,m.descriptor.lct.size+1)})},function(c,d,m){return m.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(c){return(0,r.peekByte)()(c)===44}),u=(0,e.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(d,m,_){return(0,r.readBytes)(_.text.blockSize)(d)}},n]},function(c){var d=(0,r.peekBytes)(2)(c);return d[0]===33&&d[1]===1}),l=(0,e.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(d,m,_){return(0,r.readString)(_.blockSize)(d)}},n]},function(c){var d=(0,r.peekBytes)(2)(c);return d[0]===33&&d[1]===255}),h=(0,e.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(c){var d=(0,r.peekBytes)(2)(c);return d[0]===33&&d[1]===254}),p=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,e.conditional)({gct:(0,r.readArray)(3,function(c,d){return Math.pow(2,d.lsd.gct.size+1)})},function(c,d){return d.lsd.gct.exists}),{frames:(0,e.loop)([i,l,h,a,u],function(c){var d=(0,r.peekByte)()(c);return d===33||d===44})}],g=p;t.default=g}(Ag);var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.deinterlace=void 0;var LM=function(e,r){for(var n=new Array(e.length),i=e.length/r,a=function(d,m){var _=e.slice(m*r,(m+1)*r);n.splice.apply(n,[d*r,r].concat(_))},u=[0,4,2,1],l=[8,8,4,2],h=0,p=0;p<4;p++)for(var g=u[p];g<i;g+=l[p])a(g,h),h++;return n};Ja.deinterlace=LM;var eo={};Object.defineProperty(eo,"__esModule",{value:!0}),eo.lzw=void 0;var kM=function(e,r,n){var i=4096,a=-1,u=n,l,h,p,g,c,d,m,F,_,y,O,b,N,L,V,B,x=new Array(n),E=new Array(i),w=new Array(i),I=new Array(i+1);for(b=e,h=1<<b,c=h+1,l=h+2,m=a,g=b+1,p=(1<<g)-1,_=0;_<h;_++)E[_]=0,w[_]=_;var O,F,N,L,B,V;for(O=F=N=L=B=V=0,y=0;y<u;){if(L===0){if(F<g){O+=r[V]<<F,F+=8,V++;continue}if(_=O&p,O>>=g,F-=g,_>l||_==c)break;if(_==h){g=b+1,p=(1<<g)-1,l=h+2,m=a;continue}if(m==a){I[L++]=w[_],m=_,N=_;continue}for(d=_,_==l&&(I[L++]=N,_=m);_>h;)I[L++]=w[_],_=E[_];N=w[_]&255,I[L++]=N,l<i&&(E[l]=m,w[l]=N,l++,!(l&p)&&l<i&&(g++,p+=l)),m=d}L--,x[B++]=I[L],y++}for(y=B;y<u;y++)x[y]=0;return x};eo.lzw=kM,Object.defineProperty($n,"__esModule",{value:!0}),$n.decompressFrames=$n.decompressFrame=$n.parseGIF=void 0;var BM=HM(Ag),DM=Vr,UM=pt,$M=Ja,GM=eo;function HM(t){return t&&t.__esModule?t:{default:t}}var zM=function(e){var r=new Uint8Array(e);return(0,DM.parse)((0,UM.buildStream)(r),BM.default)};$n.parseGIF=zM;var VM=function(e){for(var r=e.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var a=i*4,u=e.pixels[i],l=e.colorTable[u]||[0,0,0];n[a]=l[0],n[a+1]=l[1],n[a+2]=l[2],n[a+3]=u!==e.transparentIndex?255:0}return n},Cg=function(e,r,n){if(!e.image){console.warn("gif frame does not have associated image.");return}var i=e.image,a=i.descriptor.width*i.descriptor.height,u=(0,GM.lzw)(i.data.minCodeSize,i.data.blocks,a);i.descriptor.lct.interlaced&&(u=(0,$M.deinterlace)(u,i.descriptor.width));var l={pixels:u,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?l.colorTable=i.lct:l.colorTable=r,e.gce&&(l.delay=(e.gce.delay||10)*10,l.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(l.transparentIndex=e.gce.transparentColorIndex)),n&&(l.patch=VM(l)),l};$n.decompressFrame=Cg;var jM=function(e,r){return e.frames.filter(function(n){return n.image}).map(function(n){return Cg(n,e.gct,r)})};$n.decompressFrames=jM;const Ig=(t,e={})=>{typeof e=="function"&&(e=e(t));const r=e.loaded&&t.loaded!==e.loaded,{playing:n,...i}=e,a={...t,...i};return r&&Object.assign(a,{playing:a.autoPlay&&a.loaded}),(e.delays!=null||e.frames!=null)&&Object.assign(a,{length:a.frames.length}),(e.index!=null||e.frames!=null)&&Object.assign(a,{index:a.length===0?0:(a.length+a.index)%a.length}),e.playing!=null&&Object.assign(a,a.loaded?{playing:n}:{autoPlay:n}),a},XM=t=>Ig({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),WM=t=>W.useReducer(Ig,t,XM);var qM='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function YM(t){const e=new Blob([qM],{type:"application/javascript"}),r=URL.createObjectURL(e),n=new Worker(r,t);return URL.revokeObjectURL(r),n}const KM=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),ZM=(t,e)=>{const r={};return()=>(r.instance||(r.instance=t()),W.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(e&&e(r.instance),delete r.instance,delete r.timeout)})}),[r,e]),r.instance)},QM=t=>{const e=W.useRef(t);return W.useEffect(()=>{e.current=t},[t]),e},JM=t=>{const e=QM(t);return W.useCallback(r=>e.current&&e.current(r),[])},eO=ZM(()=>new YM,t=>t.terminate()),tO=(t,e)=>{const r=JM(e),n=eO();W.useEffect(()=>{if(typeof t=="string"){const i=a=>{const u=a.data||a;if(u.src===t){const l=u.error?u:KM(u);r(l)}};return n.addEventListener("message",i),n.postMessage({src:t,type:"parse"}),()=>{n.postMessage({src:t,type:"cancel"}),n.removeEventListener("message",i)}}},[n,t])},rO=({isPlaying:t,forwardRef:e,...r})=>{const n=re.useRef(null);return re.useImperativeHandle(e,()=>n.current,[n]),re.useEffect(()=>{if(n.current===null)return;const i=n.current;i[t?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[t]),we.jsx(ke.AnimatedSprite,{ref:n,...r,isPlaying:t})},Rg=re.memo(rO);var to={exports:{}};/**
1983
1967
  * @license
1984
1968
  * Lodash <https://lodash.com/>
1985
1969
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1986
1970
  * Released under MIT license <https://lodash.com/license>
1987
1971
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1988
1972
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1989
- */io.exports,function(t,e){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",p=500,g="__lodash_placeholder__",c=1,d=2,m=4,_=1,y=2,b=1,x=2,E=4,w=8,I=16,O=32,F=64,N=128,L=256,D=512,V=30,Y="...",ie=800,j=16,G=1,ae=2,se=3,H=1/0,Q=9007199254740991,pe=17976931348623157e292,W=0/0,q=4294967295,he=q-1,fe=q>>>1,me=[["ary",N],["bind",b],["bindKey",x],["curry",w],["curryRight",I],["flip",D],["partial",O],["partialRight",F],["rearg",L]],be="[object Arguments]",Ce="[object Array]",$e="[object AsyncFunction]",ze="[object Boolean]",Xe="[object Date]",_e="[object DOMException]",Te="[object Error]",De="[object Function]",Oe="[object GeneratorFunction]",we="[object Map]",ge="[object Number]",tt="[object Null]",oe="[object Object]",Ie="[object Promise]",Ft="[object Proxy]",Ct="[object RegExp]",ft="[object Set]",nr="[object String]",Mi="[object Symbol]",Zl="[object Undefined]",Hn="[object WeakMap]",wr="[object WeakSet]",Oi="[object ArrayBuffer]",Fi="[object DataView]",Ql="[object Float32Array]",Jl="[object Float64Array]",ec="[object Int8Array]",tc="[object Int16Array]",rc="[object Int32Array]",nc="[object Uint8Array]",ic="[object Uint8ClampedArray]",sc="[object Uint16Array]",ac="[object Uint32Array]",tF=/\b__p \+= '';/g,rF=/\b(__p \+=) '' \+/g,nF=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hg=/&(?:amp|lt|gt|quot|#39);/g,zg=/[&<>"']/g,iF=RegExp(Hg.source),sF=RegExp(zg.source),aF=/<%-([\s\S]+?)%>/g,oF=/<%([\s\S]+?)%>/g,Vg=/<%=([\s\S]+?)%>/g,uF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lF=/^\w*$/,cF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oc=/[\\^$.*+?()[\]{}|]/g,hF=RegExp(oc.source),uc=/^\s+/,fF=/\s/,dF=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pF=/\{\n\/\* \[wrapped with (.+)\] \*/,gF=/,? & /,mF=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vF=/[()=,{}\[\]\/\s]/,_F=/\\(\\)?/g,yF=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jg=/\w*$/,xF=/^[-+]0x[0-9a-f]+$/i,bF=/^0b[01]+$/i,TF=/^\[object .+?Constructor\]$/,wF=/^0o[0-7]+$/i,SF=/^(?:0|[1-9]\d*)$/,AF=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ao=/($^)/,EF=/['\n\r\u2028\u2029\\]/g,oo="\\ud800-\\udfff",CF="\\u0300-\\u036f",IF="\\ufe20-\\ufe2f",RF="\\u20d0-\\u20ff",Xg=CF+IF+RF,Wg="\\u2700-\\u27bf",qg="a-z\\xdf-\\xf6\\xf8-\\xff",PF="\\xac\\xb1\\xd7\\xf7",MF="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",OF="\\u2000-\\u206f",FF=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yg="A-Z\\xc0-\\xd6\\xd8-\\xde",Kg="\\ufe0e\\ufe0f",Zg=PF+MF+OF+FF,lc="['’]",NF="["+oo+"]",Qg="["+Zg+"]",uo="["+Xg+"]",Jg="\\d+",LF="["+Wg+"]",em="["+qg+"]",tm="[^"+oo+Zg+Jg+Wg+qg+Yg+"]",cc="\\ud83c[\\udffb-\\udfff]",kF="(?:"+uo+"|"+cc+")",rm="[^"+oo+"]",hc="(?:\\ud83c[\\udde6-\\uddff]){2}",fc="[\\ud800-\\udbff][\\udc00-\\udfff]",Ni="["+Yg+"]",nm="\\u200d",im="(?:"+em+"|"+tm+")",DF="(?:"+Ni+"|"+tm+")",sm="(?:"+lc+"(?:d|ll|m|re|s|t|ve))?",am="(?:"+lc+"(?:D|LL|M|RE|S|T|VE))?",om=kF+"?",um="["+Kg+"]?",BF="(?:"+nm+"(?:"+[rm,hc,fc].join("|")+")"+um+om+")*",UF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$F="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",lm=um+om+BF,GF="(?:"+[LF,hc,fc].join("|")+")"+lm,HF="(?:"+[rm+uo+"?",uo,hc,fc,NF].join("|")+")",zF=RegExp(lc,"g"),VF=RegExp(uo,"g"),dc=RegExp(cc+"(?="+cc+")|"+HF+lm,"g"),jF=RegExp([Ni+"?"+em+"+"+sm+"(?="+[Qg,Ni,"$"].join("|")+")",DF+"+"+am+"(?="+[Qg,Ni+im,"$"].join("|")+")",Ni+"?"+im+"+"+sm,Ni+"+"+am,$F,UF,Jg,GF].join("|"),"g"),XF=RegExp("["+nm+oo+Xg+Kg+"]"),WF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qF=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],YF=-1,it={};it[Ql]=it[Jl]=it[ec]=it[tc]=it[rc]=it[nc]=it[ic]=it[sc]=it[ac]=!0,it[be]=it[Ce]=it[Oi]=it[ze]=it[Fi]=it[Xe]=it[Te]=it[De]=it[we]=it[ge]=it[oe]=it[Ct]=it[ft]=it[nr]=it[Hn]=!1;var rt={};rt[be]=rt[Ce]=rt[Oi]=rt[Fi]=rt[ze]=rt[Xe]=rt[Ql]=rt[Jl]=rt[ec]=rt[tc]=rt[rc]=rt[we]=rt[ge]=rt[oe]=rt[Ct]=rt[ft]=rt[nr]=rt[Mi]=rt[nc]=rt[ic]=rt[sc]=rt[ac]=!0,rt[Te]=rt[De]=rt[Hn]=!1;var KF={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ZF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},QF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},JF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},eN=parseFloat,tN=parseInt,cm=typeof At=="object"&&At&&At.Object===Object&&At,rN=typeof self=="object"&&self&&self.Object===Object&&self,It=cm||rN||Function("return this")(),pc=e&&!e.nodeType&&e,zn=pc&&!0&&t&&!t.nodeType&&t,hm=zn&&zn.exports===pc,gc=hm&&cm.process,ir=function(){try{var P=zn&&zn.require&&zn.require("util").types;return P||gc&&gc.binding&&gc.binding("util")}catch{}}(),fm=ir&&ir.isArrayBuffer,dm=ir&&ir.isDate,pm=ir&&ir.isMap,gm=ir&&ir.isRegExp,mm=ir&&ir.isSet,vm=ir&&ir.isTypedArray;function Yt(P,B,k){switch(k.length){case 0:return P.call(B);case 1:return P.call(B,k[0]);case 2:return P.call(B,k[0],k[1]);case 3:return P.call(B,k[0],k[1],k[2])}return P.apply(B,k)}function nN(P,B,k,J){for(var ve=-1,Ve=P==null?0:P.length;++ve<Ve;){var yt=P[ve];B(J,yt,k(yt),P)}return J}function sr(P,B){for(var k=-1,J=P==null?0:P.length;++k<J&&B(P[k],k,P)!==!1;);return P}function iN(P,B){for(var k=P==null?0:P.length;k--&&B(P[k],k,P)!==!1;);return P}function _m(P,B){for(var k=-1,J=P==null?0:P.length;++k<J;)if(!B(P[k],k,P))return!1;return!0}function fn(P,B){for(var k=-1,J=P==null?0:P.length,ve=0,Ve=[];++k<J;){var yt=P[k];B(yt,k,P)&&(Ve[ve++]=yt)}return Ve}function lo(P,B){var k=P==null?0:P.length;return!!k&&Li(P,B,0)>-1}function mc(P,B,k){for(var J=-1,ve=P==null?0:P.length;++J<ve;)if(k(B,P[J]))return!0;return!1}function at(P,B){for(var k=-1,J=P==null?0:P.length,ve=Array(J);++k<J;)ve[k]=B(P[k],k,P);return ve}function dn(P,B){for(var k=-1,J=B.length,ve=P.length;++k<J;)P[ve+k]=B[k];return P}function vc(P,B,k,J){var ve=-1,Ve=P==null?0:P.length;for(J&&Ve&&(k=P[++ve]);++ve<Ve;)k=B(k,P[ve],ve,P);return k}function sN(P,B,k,J){var ve=P==null?0:P.length;for(J&&ve&&(k=P[--ve]);ve--;)k=B(k,P[ve],ve,P);return k}function _c(P,B){for(var k=-1,J=P==null?0:P.length;++k<J;)if(B(P[k],k,P))return!0;return!1}var aN=yc("length");function oN(P){return P.split("")}function uN(P){return P.match(mF)||[]}function ym(P,B,k){var J;return k(P,function(ve,Ve,yt){if(B(ve,Ve,yt))return J=Ve,!1}),J}function co(P,B,k,J){for(var ve=P.length,Ve=k+(J?1:-1);J?Ve--:++Ve<ve;)if(B(P[Ve],Ve,P))return Ve;return-1}function Li(P,B,k){return B===B?xN(P,B,k):co(P,xm,k)}function lN(P,B,k,J){for(var ve=k-1,Ve=P.length;++ve<Ve;)if(J(P[ve],B))return ve;return-1}function xm(P){return P!==P}function bm(P,B){var k=P==null?0:P.length;return k?bc(P,B)/k:W}function yc(P){return function(B){return B==null?r:B[P]}}function xc(P){return function(B){return P==null?r:P[B]}}function Tm(P,B,k,J,ve){return ve(P,function(Ve,yt,Je){k=J?(J=!1,Ve):B(k,Ve,yt,Je)}),k}function cN(P,B){var k=P.length;for(P.sort(B);k--;)P[k]=P[k].value;return P}function bc(P,B){for(var k,J=-1,ve=P.length;++J<ve;){var Ve=B(P[J]);Ve!==r&&(k=k===r?Ve:k+Ve)}return k}function Tc(P,B){for(var k=-1,J=Array(P);++k<P;)J[k]=B(k);return J}function hN(P,B){return at(B,function(k){return[k,P[k]]})}function wm(P){return P&&P.slice(0,Cm(P)+1).replace(uc,"")}function Kt(P){return function(B){return P(B)}}function wc(P,B){return at(B,function(k){return P[k]})}function Cs(P,B){return P.has(B)}function Sm(P,B){for(var k=-1,J=P.length;++k<J&&Li(B,P[k],0)>-1;);return k}function Am(P,B){for(var k=P.length;k--&&Li(B,P[k],0)>-1;);return k}function fN(P,B){for(var k=P.length,J=0;k--;)P[k]===B&&++J;return J}var dN=xc(KF),pN=xc(ZF);function gN(P){return"\\"+JF[P]}function mN(P,B){return P==null?r:P[B]}function ki(P){return XF.test(P)}function vN(P){return WF.test(P)}function _N(P){for(var B,k=[];!(B=P.next()).done;)k.push(B.value);return k}function Sc(P){var B=-1,k=Array(P.size);return P.forEach(function(J,ve){k[++B]=[ve,J]}),k}function Em(P,B){return function(k){return P(B(k))}}function pn(P,B){for(var k=-1,J=P.length,ve=0,Ve=[];++k<J;){var yt=P[k];(yt===B||yt===g)&&(P[k]=g,Ve[ve++]=k)}return Ve}function ho(P){var B=-1,k=Array(P.size);return P.forEach(function(J){k[++B]=J}),k}function yN(P){var B=-1,k=Array(P.size);return P.forEach(function(J){k[++B]=[J,J]}),k}function xN(P,B,k){for(var J=k-1,ve=P.length;++J<ve;)if(P[J]===B)return J;return-1}function bN(P,B,k){for(var J=k+1;J--;)if(P[J]===B)return J;return J}function Di(P){return ki(P)?wN(P):aN(P)}function Sr(P){return ki(P)?SN(P):oN(P)}function Cm(P){for(var B=P.length;B--&&fF.test(P.charAt(B)););return B}var TN=xc(QF);function wN(P){for(var B=dc.lastIndex=0;dc.test(P);)++B;return B}function SN(P){return P.match(dc)||[]}function AN(P){return P.match(jF)||[]}var EN=function P(B){B=B==null?It:Bi.defaults(It.Object(),B,Bi.pick(It,qF));var k=B.Array,J=B.Date,ve=B.Error,Ve=B.Function,yt=B.Math,Je=B.Object,Ac=B.RegExp,CN=B.String,ar=B.TypeError,fo=k.prototype,IN=Ve.prototype,Ui=Je.prototype,po=B["__core-js_shared__"],go=IN.toString,Ke=Ui.hasOwnProperty,RN=0,Im=function(){var s=/[^.]+$/.exec(po&&po.keys&&po.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),mo=Ui.toString,PN=go.call(Je),MN=It._,ON=Ac("^"+go.call(Ke).replace(oc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vo=hm?B.Buffer:r,gn=B.Symbol,_o=B.Uint8Array,Rm=vo?vo.allocUnsafe:r,yo=Em(Je.getPrototypeOf,Je),Pm=Je.create,Mm=Ui.propertyIsEnumerable,xo=fo.splice,Om=gn?gn.isConcatSpreadable:r,Is=gn?gn.iterator:r,Vn=gn?gn.toStringTag:r,bo=function(){try{var s=Yn(Je,"defineProperty");return s({},"",{}),s}catch{}}(),FN=B.clearTimeout!==It.clearTimeout&&B.clearTimeout,NN=J&&J.now!==It.Date.now&&J.now,LN=B.setTimeout!==It.setTimeout&&B.setTimeout,To=yt.ceil,wo=yt.floor,Ec=Je.getOwnPropertySymbols,kN=vo?vo.isBuffer:r,Fm=B.isFinite,DN=fo.join,BN=Em(Je.keys,Je),xt=yt.max,Nt=yt.min,UN=J.now,$N=B.parseInt,Nm=yt.random,GN=fo.reverse,Cc=Yn(B,"DataView"),Rs=Yn(B,"Map"),Ic=Yn(B,"Promise"),$i=Yn(B,"Set"),Ps=Yn(B,"WeakMap"),Ms=Yn(Je,"create"),So=Ps&&new Ps,Gi={},HN=Kn(Cc),zN=Kn(Rs),VN=Kn(Ic),jN=Kn($i),XN=Kn(Ps),Ao=gn?gn.prototype:r,Os=Ao?Ao.valueOf:r,Lm=Ao?Ao.toString:r;function S(s){if(dt(s)&&!ye(s)&&!(s instanceof Fe)){if(s instanceof or)return s;if(Ke.call(s,"__wrapped__"))return k0(s)}return new or(s)}var Hi=function(){function s(){}return function(o){if(!ct(o))return{};if(Pm)return Pm(o);s.prototype=o;var h=new s;return s.prototype=r,h}}();function Eo(){}function or(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}S.templateSettings={escape:aF,evaluate:oF,interpolate:Vg,variable:"",imports:{_:S}},S.prototype=Eo.prototype,S.prototype.constructor=S,or.prototype=Hi(Eo.prototype),or.prototype.constructor=or;function Fe(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=q,this.__views__=[]}function WN(){var s=new Fe(this.__wrapped__);return s.__actions__=Ht(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ht(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ht(this.__views__),s}function qN(){if(this.__filtered__){var s=new Fe(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function YN(){var s=this.__wrapped__.value(),o=this.__dir__,h=ye(s),v=o<0,T=h?s.length:0,A=oL(0,T,this.__views__),C=A.start,R=A.end,M=R-C,U=v?R:C-1,$=this.__iteratees__,z=$.length,K=0,re=Nt(M,this.__takeCount__);if(!h||!v&&T==M&&re==M)return s0(s,this.__actions__);var le=[];e:for(;M--&&K<re;){U+=o;for(var Se=-1,ce=s[U];++Se<z;){var Pe=$[Se],Le=Pe.iteratee,Jt=Pe.type,$t=Le(ce);if(Jt==ae)ce=$t;else if(!$t){if(Jt==G)continue e;break e}}le[K++]=ce}return le}Fe.prototype=Hi(Eo.prototype),Fe.prototype.constructor=Fe;function jn(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var v=s[o];this.set(v[0],v[1])}}function KN(){this.__data__=Ms?Ms(null):{},this.size=0}function ZN(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function QN(s){var o=this.__data__;if(Ms){var h=o[s];return h===f?r:h}return Ke.call(o,s)?o[s]:r}function JN(s){var o=this.__data__;return Ms?o[s]!==r:Ke.call(o,s)}function e3(s,o){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Ms&&o===r?f:o,this}jn.prototype.clear=KN,jn.prototype.delete=ZN,jn.prototype.get=QN,jn.prototype.has=JN,jn.prototype.set=e3;function jr(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var v=s[o];this.set(v[0],v[1])}}function t3(){this.__data__=[],this.size=0}function r3(s){var o=this.__data__,h=Co(o,s);if(h<0)return!1;var v=o.length-1;return h==v?o.pop():xo.call(o,h,1),--this.size,!0}function n3(s){var o=this.__data__,h=Co(o,s);return h<0?r:o[h][1]}function i3(s){return Co(this.__data__,s)>-1}function s3(s,o){var h=this.__data__,v=Co(h,s);return v<0?(++this.size,h.push([s,o])):h[v][1]=o,this}jr.prototype.clear=t3,jr.prototype.delete=r3,jr.prototype.get=n3,jr.prototype.has=i3,jr.prototype.set=s3;function Xr(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var v=s[o];this.set(v[0],v[1])}}function a3(){this.size=0,this.__data__={hash:new jn,map:new(Rs||jr),string:new jn}}function o3(s){var o=Uo(this,s).delete(s);return this.size-=o?1:0,o}function u3(s){return Uo(this,s).get(s)}function l3(s){return Uo(this,s).has(s)}function c3(s,o){var h=Uo(this,s),v=h.size;return h.set(s,o),this.size+=h.size==v?0:1,this}Xr.prototype.clear=a3,Xr.prototype.delete=o3,Xr.prototype.get=u3,Xr.prototype.has=l3,Xr.prototype.set=c3;function Xn(s){var o=-1,h=s==null?0:s.length;for(this.__data__=new Xr;++o<h;)this.add(s[o])}function h3(s){return this.__data__.set(s,f),this}function f3(s){return this.__data__.has(s)}Xn.prototype.add=Xn.prototype.push=h3,Xn.prototype.has=f3;function Ar(s){var o=this.__data__=new jr(s);this.size=o.size}function d3(){this.__data__=new jr,this.size=0}function p3(s){var o=this.__data__,h=o.delete(s);return this.size=o.size,h}function g3(s){return this.__data__.get(s)}function m3(s){return this.__data__.has(s)}function v3(s,o){var h=this.__data__;if(h instanceof jr){var v=h.__data__;if(!Rs||v.length<i-1)return v.push([s,o]),this.size=++h.size,this;h=this.__data__=new Xr(v)}return h.set(s,o),this.size=h.size,this}Ar.prototype.clear=d3,Ar.prototype.delete=p3,Ar.prototype.get=g3,Ar.prototype.has=m3,Ar.prototype.set=v3;function km(s,o){var h=ye(s),v=!h&&Zn(s),T=!h&&!v&&xn(s),A=!h&&!v&&!T&&Xi(s),C=h||v||T||A,R=C?Tc(s.length,CN):[],M=R.length;for(var U in s)(o||Ke.call(s,U))&&!(C&&(U=="length"||T&&(U=="offset"||U=="parent")||A&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||Kr(U,M)))&&R.push(U);return R}function Dm(s){var o=s.length;return o?s[Uc(0,o-1)]:r}function _3(s,o){return $o(Ht(s),Wn(o,0,s.length))}function y3(s){return $o(Ht(s))}function Rc(s,o,h){(h!==r&&!Er(s[o],h)||h===r&&!(o in s))&&Wr(s,o,h)}function Fs(s,o,h){var v=s[o];(!(Ke.call(s,o)&&Er(v,h))||h===r&&!(o in s))&&Wr(s,o,h)}function Co(s,o){for(var h=s.length;h--;)if(Er(s[h][0],o))return h;return-1}function x3(s,o,h,v){return mn(s,function(T,A,C){o(v,T,h(T),C)}),v}function Bm(s,o){return s&&Dr(o,St(o),s)}function b3(s,o){return s&&Dr(o,Vt(o),s)}function Wr(s,o,h){o=="__proto__"&&bo?bo(s,o,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[o]=h}function Pc(s,o){for(var h=-1,v=o.length,T=k(v),A=s==null;++h<v;)T[h]=A?r:ch(s,o[h]);return T}function Wn(s,o,h){return s===s&&(h!==r&&(s=s<=h?s:h),o!==r&&(s=s>=o?s:o)),s}function ur(s,o,h,v,T,A){var C,R=o&c,M=o&d,U=o&m;if(h&&(C=T?h(s,v,T,A):h(s)),C!==r)return C;if(!ct(s))return s;var $=ye(s);if($){if(C=lL(s),!R)return Ht(s,C)}else{var z=Lt(s),K=z==De||z==Oe;if(xn(s))return u0(s,R);if(z==oe||z==be||K&&!T){if(C=M||K?{}:C0(s),!R)return M?Q3(s,b3(C,s)):Z3(s,Bm(C,s))}else{if(!rt[z])return T?s:{};C=cL(s,z,R)}}A||(A=new Ar);var re=A.get(s);if(re)return re;A.set(s,C),rv(s)?s.forEach(function(ce){C.add(ur(ce,o,h,ce,s,A))}):ev(s)&&s.forEach(function(ce,Pe){C.set(Pe,ur(ce,o,h,Pe,s,A))});var le=U?M?Kc:Yc:M?Vt:St,Se=$?r:le(s);return sr(Se||s,function(ce,Pe){Se&&(Pe=ce,ce=s[Pe]),Fs(C,Pe,ur(ce,o,h,Pe,s,A))}),C}function T3(s){var o=St(s);return function(h){return Um(h,s,o)}}function Um(s,o,h){var v=h.length;if(s==null)return!v;for(s=Je(s);v--;){var T=h[v],A=o[T],C=s[T];if(C===r&&!(T in s)||!A(C))return!1}return!0}function $m(s,o,h){if(typeof s!="function")throw new ar(u);return $s(function(){s.apply(r,h)},o)}function Ns(s,o,h,v){var T=-1,A=lo,C=!0,R=s.length,M=[],U=o.length;if(!R)return M;h&&(o=at(o,Kt(h))),v?(A=mc,C=!1):o.length>=i&&(A=Cs,C=!1,o=new Xn(o));e:for(;++T<R;){var $=s[T],z=h==null?$:h($);if($=v||$!==0?$:0,C&&z===z){for(var K=U;K--;)if(o[K]===z)continue e;M.push($)}else A(o,z,v)||M.push($)}return M}var mn=d0(kr),Gm=d0(Oc,!0);function w3(s,o){var h=!0;return mn(s,function(v,T,A){return h=!!o(v,T,A),h}),h}function Io(s,o,h){for(var v=-1,T=s.length;++v<T;){var A=s[v],C=o(A);if(C!=null&&(R===r?C===C&&!Qt(C):h(C,R)))var R=C,M=A}return M}function S3(s,o,h,v){var T=s.length;for(h=xe(h),h<0&&(h=-h>T?0:T+h),v=v===r||v>T?T:xe(v),v<0&&(v+=T),v=h>v?0:iv(v);h<v;)s[h++]=o;return s}function Hm(s,o){var h=[];return mn(s,function(v,T,A){o(v,T,A)&&h.push(v)}),h}function Rt(s,o,h,v,T){var A=-1,C=s.length;for(h||(h=fL),T||(T=[]);++A<C;){var R=s[A];o>0&&h(R)?o>1?Rt(R,o-1,h,v,T):dn(T,R):v||(T[T.length]=R)}return T}var Mc=p0(),zm=p0(!0);function kr(s,o){return s&&Mc(s,o,St)}function Oc(s,o){return s&&zm(s,o,St)}function Ro(s,o){return fn(o,function(h){return Zr(s[h])})}function qn(s,o){o=_n(o,s);for(var h=0,v=o.length;s!=null&&h<v;)s=s[Br(o[h++])];return h&&h==v?s:r}function Vm(s,o,h){var v=o(s);return ye(s)?v:dn(v,h(s))}function Bt(s){return s==null?s===r?Zl:tt:Vn&&Vn in Je(s)?aL(s):yL(s)}function Fc(s,o){return s>o}function A3(s,o){return s!=null&&Ke.call(s,o)}function E3(s,o){return s!=null&&o in Je(s)}function C3(s,o,h){return s>=Nt(o,h)&&s<xt(o,h)}function Nc(s,o,h){for(var v=h?mc:lo,T=s[0].length,A=s.length,C=A,R=k(A),M=1/0,U=[];C--;){var $=s[C];C&&o&&($=at($,Kt(o))),M=Nt($.length,M),R[C]=!h&&(o||T>=120&&$.length>=120)?new Xn(C&&$):r}$=s[0];var z=-1,K=R[0];e:for(;++z<T&&U.length<M;){var re=$[z],le=o?o(re):re;if(re=h||re!==0?re:0,!(K?Cs(K,le):v(U,le,h))){for(C=A;--C;){var Se=R[C];if(!(Se?Cs(Se,le):v(s[C],le,h)))continue e}K&&K.push(le),U.push(re)}}return U}function I3(s,o,h,v){return kr(s,function(T,A,C){o(v,h(T),A,C)}),v}function Ls(s,o,h){o=_n(o,s),s=M0(s,o);var v=s==null?s:s[Br(cr(o))];return v==null?r:Yt(v,s,h)}function jm(s){return dt(s)&&Bt(s)==be}function R3(s){return dt(s)&&Bt(s)==Oi}function P3(s){return dt(s)&&Bt(s)==Xe}function ks(s,o,h,v,T){return s===o?!0:s==null||o==null||!dt(s)&&!dt(o)?s!==s&&o!==o:M3(s,o,h,v,ks,T)}function M3(s,o,h,v,T,A){var C=ye(s),R=ye(o),M=C?Ce:Lt(s),U=R?Ce:Lt(o);M=M==be?oe:M,U=U==be?oe:U;var $=M==oe,z=U==oe,K=M==U;if(K&&xn(s)){if(!xn(o))return!1;C=!0,$=!1}if(K&&!$)return A||(A=new Ar),C||Xi(s)?S0(s,o,h,v,T,A):iL(s,o,M,h,v,T,A);if(!(h&_)){var re=$&&Ke.call(s,"__wrapped__"),le=z&&Ke.call(o,"__wrapped__");if(re||le){var Se=re?s.value():s,ce=le?o.value():o;return A||(A=new Ar),T(Se,ce,h,v,A)}}return K?(A||(A=new Ar),sL(s,o,h,v,T,A)):!1}function O3(s){return dt(s)&&Lt(s)==we}function Lc(s,o,h,v){var T=h.length,A=T,C=!v;if(s==null)return!A;for(s=Je(s);T--;){var R=h[T];if(C&&R[2]?R[1]!==s[R[0]]:!(R[0]in s))return!1}for(;++T<A;){R=h[T];var M=R[0],U=s[M],$=R[1];if(C&&R[2]){if(U===r&&!(M in s))return!1}else{var z=new Ar;if(v)var K=v(U,$,M,s,o,z);if(!(K===r?ks($,U,_|y,v,z):K))return!1}}return!0}function Xm(s){if(!ct(s)||pL(s))return!1;var o=Zr(s)?ON:TF;return o.test(Kn(s))}function F3(s){return dt(s)&&Bt(s)==Ct}function N3(s){return dt(s)&&Lt(s)==ft}function L3(s){return dt(s)&&Xo(s.length)&&!!it[Bt(s)]}function Wm(s){return typeof s=="function"?s:s==null?jt:typeof s=="object"?ye(s)?Km(s[0],s[1]):Ym(s):gv(s)}function kc(s){if(!Us(s))return BN(s);var o=[];for(var h in Je(s))Ke.call(s,h)&&h!="constructor"&&o.push(h);return o}function k3(s){if(!ct(s))return _L(s);var o=Us(s),h=[];for(var v in s)v=="constructor"&&(o||!Ke.call(s,v))||h.push(v);return h}function Dc(s,o){return s<o}function qm(s,o){var h=-1,v=zt(s)?k(s.length):[];return mn(s,function(T,A,C){v[++h]=o(T,A,C)}),v}function Ym(s){var o=Qc(s);return o.length==1&&o[0][2]?R0(o[0][0],o[0][1]):function(h){return h===s||Lc(h,s,o)}}function Km(s,o){return eh(s)&&I0(o)?R0(Br(s),o):function(h){var v=ch(h,s);return v===r&&v===o?hh(h,s):ks(o,v,_|y)}}function Po(s,o,h,v,T){s!==o&&Mc(o,function(A,C){if(T||(T=new Ar),ct(A))D3(s,o,C,h,Po,v,T);else{var R=v?v(rh(s,C),A,C+"",s,o,T):r;R===r&&(R=A),Rc(s,C,R)}},Vt)}function D3(s,o,h,v,T,A,C){var R=rh(s,h),M=rh(o,h),U=C.get(M);if(U){Rc(s,h,U);return}var $=A?A(R,M,h+"",s,o,C):r,z=$===r;if(z){var K=ye(M),re=!K&&xn(M),le=!K&&!re&&Xi(M);$=M,K||re||le?ye(R)?$=R:gt(R)?$=Ht(R):re?(z=!1,$=u0(M,!0)):le?(z=!1,$=l0(M,!0)):$=[]:Gs(M)||Zn(M)?($=R,Zn(R)?$=sv(R):(!ct(R)||Zr(R))&&($=C0(M))):z=!1}z&&(C.set(M,$),T($,M,v,A,C),C.delete(M)),Rc(s,h,$)}function Zm(s,o){var h=s.length;if(h)return o+=o<0?h:0,Kr(o,h)?s[o]:r}function Qm(s,o,h){o.length?o=at(o,function(A){return ye(A)?function(C){return qn(C,A.length===1?A[0]:A)}:A}):o=[jt];var v=-1;o=at(o,Kt(ue()));var T=qm(s,function(A,C,R){var M=at(o,function(U){return U(A)});return{criteria:M,index:++v,value:A}});return cN(T,function(A,C){return K3(A,C,h)})}function B3(s,o){return Jm(s,o,function(h,v){return hh(s,v)})}function Jm(s,o,h){for(var v=-1,T=o.length,A={};++v<T;){var C=o[v],R=qn(s,C);h(R,C)&&Ds(A,_n(C,s),R)}return A}function U3(s){return function(o){return qn(o,s)}}function Bc(s,o,h,v){var T=v?lN:Li,A=-1,C=o.length,R=s;for(s===o&&(o=Ht(o)),h&&(R=at(s,Kt(h)));++A<C;)for(var M=0,U=o[A],$=h?h(U):U;(M=T(R,$,M,v))>-1;)R!==s&&xo.call(R,M,1),xo.call(s,M,1);return s}function e0(s,o){for(var h=s?o.length:0,v=h-1;h--;){var T=o[h];if(h==v||T!==A){var A=T;Kr(T)?xo.call(s,T,1):Hc(s,T)}}return s}function Uc(s,o){return s+wo(Nm()*(o-s+1))}function $3(s,o,h,v){for(var T=-1,A=xt(To((o-s)/(h||1)),0),C=k(A);A--;)C[v?A:++T]=s,s+=h;return C}function $c(s,o){var h="";if(!s||o<1||o>Q)return h;do o%2&&(h+=s),o=wo(o/2),o&&(s+=s);while(o);return h}function Ee(s,o){return nh(P0(s,o,jt),s+"")}function G3(s){return Dm(Wi(s))}function H3(s,o){var h=Wi(s);return $o(h,Wn(o,0,h.length))}function Ds(s,o,h,v){if(!ct(s))return s;o=_n(o,s);for(var T=-1,A=o.length,C=A-1,R=s;R!=null&&++T<A;){var M=Br(o[T]),U=h;if(M==="__proto__"||M==="constructor"||M==="prototype")return s;if(T!=C){var $=R[M];U=v?v($,M,R):r,U===r&&(U=ct($)?$:Kr(o[T+1])?[]:{})}Fs(R,M,U),R=R[M]}return s}var t0=So?function(s,o){return So.set(s,o),s}:jt,z3=bo?function(s,o){return bo(s,"toString",{configurable:!0,enumerable:!1,value:dh(o),writable:!0})}:jt;function V3(s){return $o(Wi(s))}function lr(s,o,h){var v=-1,T=s.length;o<0&&(o=-o>T?0:T+o),h=h>T?T:h,h<0&&(h+=T),T=o>h?0:h-o>>>0,o>>>=0;for(var A=k(T);++v<T;)A[v]=s[v+o];return A}function j3(s,o){var h;return mn(s,function(v,T,A){return h=o(v,T,A),!h}),!!h}function Mo(s,o,h){var v=0,T=s==null?v:s.length;if(typeof o=="number"&&o===o&&T<=fe){for(;v<T;){var A=v+T>>>1,C=s[A];C!==null&&!Qt(C)&&(h?C<=o:C<o)?v=A+1:T=A}return T}return Gc(s,o,jt,h)}function Gc(s,o,h,v){var T=0,A=s==null?0:s.length;if(A===0)return 0;o=h(o);for(var C=o!==o,R=o===null,M=Qt(o),U=o===r;T<A;){var $=wo((T+A)/2),z=h(s[$]),K=z!==r,re=z===null,le=z===z,Se=Qt(z);if(C)var ce=v||le;else U?ce=le&&(v||K):R?ce=le&&K&&(v||!re):M?ce=le&&K&&!re&&(v||!Se):re||Se?ce=!1:ce=v?z<=o:z<o;ce?T=$+1:A=$}return Nt(A,he)}function r0(s,o){for(var h=-1,v=s.length,T=0,A=[];++h<v;){var C=s[h],R=o?o(C):C;if(!h||!Er(R,M)){var M=R;A[T++]=C===0?0:C}}return A}function n0(s){return typeof s=="number"?s:Qt(s)?W:+s}function Zt(s){if(typeof s=="string")return s;if(ye(s))return at(s,Zt)+"";if(Qt(s))return Lm?Lm.call(s):"";var o=s+"";return o=="0"&&1/s==-H?"-0":o}function vn(s,o,h){var v=-1,T=lo,A=s.length,C=!0,R=[],M=R;if(h)C=!1,T=mc;else if(A>=i){var U=o?null:rL(s);if(U)return ho(U);C=!1,T=Cs,M=new Xn}else M=o?[]:R;e:for(;++v<A;){var $=s[v],z=o?o($):$;if($=h||$!==0?$:0,C&&z===z){for(var K=M.length;K--;)if(M[K]===z)continue e;o&&M.push(z),R.push($)}else T(M,z,h)||(M!==R&&M.push(z),R.push($))}return R}function Hc(s,o){return o=_n(o,s),s=M0(s,o),s==null||delete s[Br(cr(o))]}function i0(s,o,h,v){return Ds(s,o,h(qn(s,o)),v)}function Oo(s,o,h,v){for(var T=s.length,A=v?T:-1;(v?A--:++A<T)&&o(s[A],A,s););return h?lr(s,v?0:A,v?A+1:T):lr(s,v?A+1:0,v?T:A)}function s0(s,o){var h=s;return h instanceof Fe&&(h=h.value()),vc(o,function(v,T){return T.func.apply(T.thisArg,dn([v],T.args))},h)}function zc(s,o,h){var v=s.length;if(v<2)return v?vn(s[0]):[];for(var T=-1,A=k(v);++T<v;)for(var C=s[T],R=-1;++R<v;)R!=T&&(A[T]=Ns(A[T]||C,s[R],o,h));return vn(Rt(A,1),o,h)}function a0(s,o,h){for(var v=-1,T=s.length,A=o.length,C={};++v<T;){var R=v<A?o[v]:r;h(C,s[v],R)}return C}function Vc(s){return gt(s)?s:[]}function jc(s){return typeof s=="function"?s:jt}function _n(s,o){return ye(s)?s:eh(s,o)?[s]:L0(We(s))}var X3=Ee;function yn(s,o,h){var v=s.length;return h=h===r?v:h,!o&&h>=v?s:lr(s,o,h)}var o0=FN||function(s){return It.clearTimeout(s)};function u0(s,o){if(o)return s.slice();var h=s.length,v=Rm?Rm(h):new s.constructor(h);return s.copy(v),v}function Xc(s){var o=new s.constructor(s.byteLength);return new _o(o).set(new _o(s)),o}function W3(s,o){var h=o?Xc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}function q3(s){var o=new s.constructor(s.source,jg.exec(s));return o.lastIndex=s.lastIndex,o}function Y3(s){return Os?Je(Os.call(s)):{}}function l0(s,o){var h=o?Xc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}function c0(s,o){if(s!==o){var h=s!==r,v=s===null,T=s===s,A=Qt(s),C=o!==r,R=o===null,M=o===o,U=Qt(o);if(!R&&!U&&!A&&s>o||A&&C&&M&&!R&&!U||v&&C&&M||!h&&M||!T)return 1;if(!v&&!A&&!U&&s<o||U&&h&&T&&!v&&!A||R&&h&&T||!C&&T||!M)return-1}return 0}function K3(s,o,h){for(var v=-1,T=s.criteria,A=o.criteria,C=T.length,R=h.length;++v<C;){var M=c0(T[v],A[v]);if(M){if(v>=R)return M;var U=h[v];return M*(U=="desc"?-1:1)}}return s.index-o.index}function h0(s,o,h,v){for(var T=-1,A=s.length,C=h.length,R=-1,M=o.length,U=xt(A-C,0),$=k(M+U),z=!v;++R<M;)$[R]=o[R];for(;++T<C;)(z||T<A)&&($[h[T]]=s[T]);for(;U--;)$[R++]=s[T++];return $}function f0(s,o,h,v){for(var T=-1,A=s.length,C=-1,R=h.length,M=-1,U=o.length,$=xt(A-R,0),z=k($+U),K=!v;++T<$;)z[T]=s[T];for(var re=T;++M<U;)z[re+M]=o[M];for(;++C<R;)(K||T<A)&&(z[re+h[C]]=s[T++]);return z}function Ht(s,o){var h=-1,v=s.length;for(o||(o=k(v));++h<v;)o[h]=s[h];return o}function Dr(s,o,h,v){var T=!h;h||(h={});for(var A=-1,C=o.length;++A<C;){var R=o[A],M=v?v(h[R],s[R],R,h,s):r;M===r&&(M=s[R]),T?Wr(h,R,M):Fs(h,R,M)}return h}function Z3(s,o){return Dr(s,Jc(s),o)}function Q3(s,o){return Dr(s,A0(s),o)}function Fo(s,o){return function(h,v){var T=ye(h)?nN:x3,A=o?o():{};return T(h,s,ue(v,2),A)}}function zi(s){return Ee(function(o,h){var v=-1,T=h.length,A=T>1?h[T-1]:r,C=T>2?h[2]:r;for(A=s.length>3&&typeof A=="function"?(T--,A):r,C&&Ut(h[0],h[1],C)&&(A=T<3?r:A,T=1),o=Je(o);++v<T;){var R=h[v];R&&s(o,R,v,A)}return o})}function d0(s,o){return function(h,v){if(h==null)return h;if(!zt(h))return s(h,v);for(var T=h.length,A=o?T:-1,C=Je(h);(o?A--:++A<T)&&v(C[A],A,C)!==!1;);return h}}function p0(s){return function(o,h,v){for(var T=-1,A=Je(o),C=v(o),R=C.length;R--;){var M=C[s?R:++T];if(h(A[M],M,A)===!1)break}return o}}function J3(s,o,h){var v=o&b,T=Bs(s);function A(){var C=this&&this!==It&&this instanceof A?T:s;return C.apply(v?h:this,arguments)}return A}function g0(s){return function(o){o=We(o);var h=ki(o)?Sr(o):r,v=h?h[0]:o.charAt(0),T=h?yn(h,1).join(""):o.slice(1);return v[s]()+T}}function Vi(s){return function(o){return vc(dv(fv(o).replace(zF,"")),s,"")}}function Bs(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var h=Hi(s.prototype),v=s.apply(h,o);return ct(v)?v:h}}function eL(s,o,h){var v=Bs(s);function T(){for(var A=arguments.length,C=k(A),R=A,M=ji(T);R--;)C[R]=arguments[R];var U=A<3&&C[0]!==M&&C[A-1]!==M?[]:pn(C,M);if(A-=U.length,A<h)return x0(s,o,No,T.placeholder,r,C,U,r,r,h-A);var $=this&&this!==It&&this instanceof T?v:s;return Yt($,this,C)}return T}function m0(s){return function(o,h,v){var T=Je(o);if(!zt(o)){var A=ue(h,3);o=St(o),h=function(R){return A(T[R],R,T)}}var C=s(o,h,v);return C>-1?T[A?o[C]:C]:r}}function v0(s){return Yr(function(o){var h=o.length,v=h,T=or.prototype.thru;for(s&&o.reverse();v--;){var A=o[v];if(typeof A!="function")throw new ar(u);if(T&&!C&&Bo(A)=="wrapper")var C=new or([],!0)}for(v=C?v:h;++v<h;){A=o[v];var R=Bo(A),M=R=="wrapper"?Zc(A):r;M&&th(M[0])&&M[1]==(N|w|O|L)&&!M[4].length&&M[9]==1?C=C[Bo(M[0])].apply(C,M[3]):C=A.length==1&&th(A)?C[R]():C.thru(A)}return function(){var U=arguments,$=U[0];if(C&&U.length==1&&ye($))return C.plant($).value();for(var z=0,K=h?o[z].apply(this,U):$;++z<h;)K=o[z].call(this,K);return K}})}function No(s,o,h,v,T,A,C,R,M,U){var $=o&N,z=o&b,K=o&x,re=o&(w|I),le=o&D,Se=K?r:Bs(s);function ce(){for(var Pe=arguments.length,Le=k(Pe),Jt=Pe;Jt--;)Le[Jt]=arguments[Jt];if(re)var $t=ji(ce),er=fN(Le,$t);if(v&&(Le=h0(Le,v,T,re)),A&&(Le=f0(Le,A,C,re)),Pe-=er,re&&Pe<U){var mt=pn(Le,$t);return x0(s,o,No,ce.placeholder,h,Le,mt,R,M,U-Pe)}var Cr=z?h:this,Jr=K?Cr[s]:s;return Pe=Le.length,R?Le=xL(Le,R):le&&Pe>1&&Le.reverse(),$&&M<Pe&&(Le.length=M),this&&this!==It&&this instanceof ce&&(Jr=Se||Bs(Jr)),Jr.apply(Cr,Le)}return ce}function _0(s,o){return function(h,v){return I3(h,s,o(v),{})}}function Lo(s,o){return function(h,v){var T;if(h===r&&v===r)return o;if(h!==r&&(T=h),v!==r){if(T===r)return v;typeof h=="string"||typeof v=="string"?(h=Zt(h),v=Zt(v)):(h=n0(h),v=n0(v)),T=s(h,v)}return T}}function Wc(s){return Yr(function(o){return o=at(o,Kt(ue())),Ee(function(h){var v=this;return s(o,function(T){return Yt(T,v,h)})})})}function ko(s,o){o=o===r?" ":Zt(o);var h=o.length;if(h<2)return h?$c(o,s):o;var v=$c(o,To(s/Di(o)));return ki(o)?yn(Sr(v),0,s).join(""):v.slice(0,s)}function tL(s,o,h,v){var T=o&b,A=Bs(s);function C(){for(var R=-1,M=arguments.length,U=-1,$=v.length,z=k($+M),K=this&&this!==It&&this instanceof C?A:s;++U<$;)z[U]=v[U];for(;M--;)z[U++]=arguments[++R];return Yt(K,T?h:this,z)}return C}function y0(s){return function(o,h,v){return v&&typeof v!="number"&&Ut(o,h,v)&&(h=v=r),o=Qr(o),h===r?(h=o,o=0):h=Qr(h),v=v===r?o<h?1:-1:Qr(v),$3(o,h,v,s)}}function Do(s){return function(o,h){return typeof o=="string"&&typeof h=="string"||(o=hr(o),h=hr(h)),s(o,h)}}function x0(s,o,h,v,T,A,C,R,M,U){var $=o&w,z=$?C:r,K=$?r:C,re=$?A:r,le=$?r:A;o|=$?O:F,o&=~($?F:O),o&E||(o&=~(b|x));var Se=[s,o,T,re,z,le,K,R,M,U],ce=h.apply(r,Se);return th(s)&&O0(ce,Se),ce.placeholder=v,F0(ce,s,o)}function qc(s){var o=yt[s];return function(h,v){if(h=hr(h),v=v==null?0:Nt(xe(v),292),v&&Fm(h)){var T=(We(h)+"e").split("e"),A=o(T[0]+"e"+(+T[1]+v));return T=(We(A)+"e").split("e"),+(T[0]+"e"+(+T[1]-v))}return o(h)}}var rL=$i&&1/ho(new $i([,-0]))[1]==H?function(s){return new $i(s)}:mh;function b0(s){return function(o){var h=Lt(o);return h==we?Sc(o):h==ft?yN(o):hN(o,s(o))}}function qr(s,o,h,v,T,A,C,R){var M=o&x;if(!M&&typeof s!="function")throw new ar(u);var U=v?v.length:0;if(U||(o&=~(O|F),v=T=r),C=C===r?C:xt(xe(C),0),R=R===r?R:xe(R),U-=T?T.length:0,o&F){var $=v,z=T;v=T=r}var K=M?r:Zc(s),re=[s,o,h,v,T,$,z,A,C,R];if(K&&vL(re,K),s=re[0],o=re[1],h=re[2],v=re[3],T=re[4],R=re[9]=re[9]===r?M?0:s.length:xt(re[9]-U,0),!R&&o&(w|I)&&(o&=~(w|I)),!o||o==b)var le=J3(s,o,h);else o==w||o==I?le=eL(s,o,R):(o==O||o==(b|O))&&!T.length?le=tL(s,o,h,v):le=No.apply(r,re);var Se=K?t0:O0;return F0(Se(le,re),s,o)}function T0(s,o,h,v){return s===r||Er(s,Ui[h])&&!Ke.call(v,h)?o:s}function w0(s,o,h,v,T,A){return ct(s)&&ct(o)&&(A.set(o,s),Po(s,o,r,w0,A),A.delete(o)),s}function nL(s){return Gs(s)?r:s}function S0(s,o,h,v,T,A){var C=h&_,R=s.length,M=o.length;if(R!=M&&!(C&&M>R))return!1;var U=A.get(s),$=A.get(o);if(U&&$)return U==o&&$==s;var z=-1,K=!0,re=h&y?new Xn:r;for(A.set(s,o),A.set(o,s);++z<R;){var le=s[z],Se=o[z];if(v)var ce=C?v(Se,le,z,o,s,A):v(le,Se,z,s,o,A);if(ce!==r){if(ce)continue;K=!1;break}if(re){if(!_c(o,function(Pe,Le){if(!Cs(re,Le)&&(le===Pe||T(le,Pe,h,v,A)))return re.push(Le)})){K=!1;break}}else if(!(le===Se||T(le,Se,h,v,A))){K=!1;break}}return A.delete(s),A.delete(o),K}function iL(s,o,h,v,T,A,C){switch(h){case Fi:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Oi:return!(s.byteLength!=o.byteLength||!A(new _o(s),new _o(o)));case ze:case Xe:case ge:return Er(+s,+o);case Te:return s.name==o.name&&s.message==o.message;case Ct:case nr:return s==o+"";case we:var R=Sc;case ft:var M=v&_;if(R||(R=ho),s.size!=o.size&&!M)return!1;var U=C.get(s);if(U)return U==o;v|=y,C.set(s,o);var $=S0(R(s),R(o),v,T,A,C);return C.delete(s),$;case Mi:if(Os)return Os.call(s)==Os.call(o)}return!1}function sL(s,o,h,v,T,A){var C=h&_,R=Yc(s),M=R.length,U=Yc(o),$=U.length;if(M!=$&&!C)return!1;for(var z=M;z--;){var K=R[z];if(!(C?K in o:Ke.call(o,K)))return!1}var re=A.get(s),le=A.get(o);if(re&&le)return re==o&&le==s;var Se=!0;A.set(s,o),A.set(o,s);for(var ce=C;++z<M;){K=R[z];var Pe=s[K],Le=o[K];if(v)var Jt=C?v(Le,Pe,K,o,s,A):v(Pe,Le,K,s,o,A);if(!(Jt===r?Pe===Le||T(Pe,Le,h,v,A):Jt)){Se=!1;break}ce||(ce=K=="constructor")}if(Se&&!ce){var $t=s.constructor,er=o.constructor;$t!=er&&"constructor"in s&&"constructor"in o&&!(typeof $t=="function"&&$t instanceof $t&&typeof er=="function"&&er instanceof er)&&(Se=!1)}return A.delete(s),A.delete(o),Se}function Yr(s){return nh(P0(s,r,U0),s+"")}function Yc(s){return Vm(s,St,Jc)}function Kc(s){return Vm(s,Vt,A0)}var Zc=So?function(s){return So.get(s)}:mh;function Bo(s){for(var o=s.name+"",h=Gi[o],v=Ke.call(Gi,o)?h.length:0;v--;){var T=h[v],A=T.func;if(A==null||A==s)return T.name}return o}function ji(s){var o=Ke.call(S,"placeholder")?S:s;return o.placeholder}function ue(){var s=S.iteratee||ph;return s=s===ph?Wm:s,arguments.length?s(arguments[0],arguments[1]):s}function Uo(s,o){var h=s.__data__;return dL(o)?h[typeof o=="string"?"string":"hash"]:h.map}function Qc(s){for(var o=St(s),h=o.length;h--;){var v=o[h],T=s[v];o[h]=[v,T,I0(T)]}return o}function Yn(s,o){var h=mN(s,o);return Xm(h)?h:r}function aL(s){var o=Ke.call(s,Vn),h=s[Vn];try{s[Vn]=r;var v=!0}catch{}var T=mo.call(s);return v&&(o?s[Vn]=h:delete s[Vn]),T}var Jc=Ec?function(s){return s==null?[]:(s=Je(s),fn(Ec(s),function(o){return Mm.call(s,o)}))}:vh,A0=Ec?function(s){for(var o=[];s;)dn(o,Jc(s)),s=yo(s);return o}:vh,Lt=Bt;(Cc&&Lt(new Cc(new ArrayBuffer(1)))!=Fi||Rs&&Lt(new Rs)!=we||Ic&&Lt(Ic.resolve())!=Ie||$i&&Lt(new $i)!=ft||Ps&&Lt(new Ps)!=Hn)&&(Lt=function(s){var o=Bt(s),h=o==oe?s.constructor:r,v=h?Kn(h):"";if(v)switch(v){case HN:return Fi;case zN:return we;case VN:return Ie;case jN:return ft;case XN:return Hn}return o});function oL(s,o,h){for(var v=-1,T=h.length;++v<T;){var A=h[v],C=A.size;switch(A.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=Nt(o,s+C);break;case"takeRight":s=xt(s,o-C);break}}return{start:s,end:o}}function uL(s){var o=s.match(pF);return o?o[1].split(gF):[]}function E0(s,o,h){o=_n(o,s);for(var v=-1,T=o.length,A=!1;++v<T;){var C=Br(o[v]);if(!(A=s!=null&&h(s,C)))break;s=s[C]}return A||++v!=T?A:(T=s==null?0:s.length,!!T&&Xo(T)&&Kr(C,T)&&(ye(s)||Zn(s)))}function lL(s){var o=s.length,h=new s.constructor(o);return o&&typeof s[0]=="string"&&Ke.call(s,"index")&&(h.index=s.index,h.input=s.input),h}function C0(s){return typeof s.constructor=="function"&&!Us(s)?Hi(yo(s)):{}}function cL(s,o,h){var v=s.constructor;switch(o){case Oi:return Xc(s);case ze:case Xe:return new v(+s);case Fi:return W3(s,h);case Ql:case Jl:case ec:case tc:case rc:case nc:case ic:case sc:case ac:return l0(s,h);case we:return new v;case ge:case nr:return new v(s);case Ct:return q3(s);case ft:return new v;case Mi:return Y3(s)}}function hL(s,o){var h=o.length;if(!h)return s;var v=h-1;return o[v]=(h>1?"& ":"")+o[v],o=o.join(h>2?", ":" "),s.replace(dF,`{
1973
+ */to.exports,function(t,e){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",p=500,g="__lodash_placeholder__",c=1,d=2,m=4,_=1,y=2,b=1,x=2,E=4,w=8,I=16,O=32,F=64,N=128,L=256,B=512,V=30,Y="...",ae=800,j=16,G=1,se=2,ie=3,H=1/0,J=9007199254740991,ge=17976931348623157e292,X=0/0,q=4294967295,ue=q-1,he=q>>>1,me=[["ary",N],["bind",b],["bindKey",x],["curry",w],["curryRight",I],["flip",B],["partial",O],["partialRight",F],["rearg",L]],pe="[object Arguments]",Pe="[object Array]",$e="[object AsyncFunction]",je="[object Boolean]",Ze="[object Date]",be="[object DOMException]",Ce="[object Error]",Ge="[object Function]",et="[object GeneratorFunction]",Ae="[object Map]",_e="[object Number]",st="[object Null]",fe="[object Object]",Fe="[object Promise]",qt="[object Proxy]",$t="[object RegExp]",ft="[object Set]",nr="[object String]",Mi="[object Symbol]",Yl="[object Undefined]",Gn="[object WeakMap]",wr="[object WeakSet]",Oi="[object ArrayBuffer]",Fi="[object DataView]",Kl="[object Float32Array]",Zl="[object Float64Array]",Ql="[object Int8Array]",Jl="[object Int16Array]",ec="[object Int32Array]",tc="[object Uint8Array]",rc="[object Uint8ClampedArray]",nc="[object Uint16Array]",ic="[object Uint32Array]",YO=/\b__p \+= '';/g,KO=/\b(__p \+=) '' \+/g,ZO=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hg=/&(?:amp|lt|gt|quot|#39);/g,zg=/[&<>"']/g,QO=RegExp(Hg.source),JO=RegExp(zg.source),eF=/<%-([\s\S]+?)%>/g,tF=/<%([\s\S]+?)%>/g,Vg=/<%=([\s\S]+?)%>/g,rF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nF=/^\w*$/,iF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sc=/[\\^$.*+?()[\]{}|]/g,sF=RegExp(sc.source),ac=/^\s+/,aF=/\s/,oF=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,uF=/\{\n\/\* \[wrapped with (.+)\] \*/,lF=/,? & /,cF=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hF=/[()=,{}\[\]\/\s]/,fF=/\\(\\)?/g,dF=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jg=/\w*$/,pF=/^[-+]0x[0-9a-f]+$/i,gF=/^0b[01]+$/i,mF=/^\[object .+?Constructor\]$/,vF=/^0o[0-7]+$/i,_F=/^(?:0|[1-9]\d*)$/,yF=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ao=/($^)/,xF=/['\n\r\u2028\u2029\\]/g,oo="\\ud800-\\udfff",bF="\\u0300-\\u036f",TF="\\ufe20-\\ufe2f",wF="\\u20d0-\\u20ff",Xg=bF+TF+wF,Wg="\\u2700-\\u27bf",qg="a-z\\xdf-\\xf6\\xf8-\\xff",SF="\\xac\\xb1\\xd7\\xf7",AF="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",EF="\\u2000-\\u206f",CF=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yg="A-Z\\xc0-\\xd6\\xd8-\\xde",Kg="\\ufe0e\\ufe0f",Zg=SF+AF+EF+CF,oc="['’]",IF="["+oo+"]",Qg="["+Zg+"]",uo="["+Xg+"]",Jg="\\d+",RF="["+Wg+"]",em="["+qg+"]",tm="[^"+oo+Zg+Jg+Wg+qg+Yg+"]",uc="\\ud83c[\\udffb-\\udfff]",PF="(?:"+uo+"|"+uc+")",rm="[^"+oo+"]",lc="(?:\\ud83c[\\udde6-\\uddff]){2}",cc="[\\ud800-\\udbff][\\udc00-\\udfff]",Ni="["+Yg+"]",nm="\\u200d",im="(?:"+em+"|"+tm+")",MF="(?:"+Ni+"|"+tm+")",sm="(?:"+oc+"(?:d|ll|m|re|s|t|ve))?",am="(?:"+oc+"(?:D|LL|M|RE|S|T|VE))?",om=PF+"?",um="["+Kg+"]?",OF="(?:"+nm+"(?:"+[rm,lc,cc].join("|")+")"+um+om+")*",FF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",NF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",lm=um+om+OF,LF="(?:"+[RF,lc,cc].join("|")+")"+lm,kF="(?:"+[rm+uo+"?",uo,lc,cc,IF].join("|")+")",BF=RegExp(oc,"g"),DF=RegExp(uo,"g"),hc=RegExp(uc+"(?="+uc+")|"+kF+lm,"g"),UF=RegExp([Ni+"?"+em+"+"+sm+"(?="+[Qg,Ni,"$"].join("|")+")",MF+"+"+am+"(?="+[Qg,Ni+im,"$"].join("|")+")",Ni+"?"+im+"+"+sm,Ni+"+"+am,NF,FF,Jg,LF].join("|"),"g"),$F=RegExp("["+nm+oo+Xg+Kg+"]"),GF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,HF=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zF=-1,nt={};nt[Kl]=nt[Zl]=nt[Ql]=nt[Jl]=nt[ec]=nt[tc]=nt[rc]=nt[nc]=nt[ic]=!0,nt[pe]=nt[Pe]=nt[Oi]=nt[je]=nt[Fi]=nt[Ze]=nt[Ce]=nt[Ge]=nt[Ae]=nt[_e]=nt[fe]=nt[$t]=nt[ft]=nt[nr]=nt[Gn]=!1;var tt={};tt[pe]=tt[Pe]=tt[Oi]=tt[Fi]=tt[je]=tt[Ze]=tt[Kl]=tt[Zl]=tt[Ql]=tt[Jl]=tt[ec]=tt[Ae]=tt[_e]=tt[fe]=tt[$t]=tt[ft]=tt[nr]=tt[Mi]=tt[tc]=tt[rc]=tt[nc]=tt[ic]=!0,tt[Ce]=tt[Ge]=tt[Gn]=!1;var VF={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},jF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},XF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},WF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qF=parseFloat,YF=parseInt,cm=typeof At=="object"&&At&&At.Object===Object&&At,KF=typeof self=="object"&&self&&self.Object===Object&&self,Ct=cm||KF||Function("return this")(),fc=e&&!e.nodeType&&e,Hn=fc&&!0&&t&&!t.nodeType&&t,hm=Hn&&Hn.exports===fc,dc=hm&&cm.process,ir=function(){try{var P=Hn&&Hn.require&&Hn.require("util").types;return P||dc&&dc.binding&&dc.binding("util")}catch{}}(),fm=ir&&ir.isArrayBuffer,dm=ir&&ir.isDate,pm=ir&&ir.isMap,gm=ir&&ir.isRegExp,mm=ir&&ir.isSet,vm=ir&&ir.isTypedArray;function Yt(P,D,k){switch(k.length){case 0:return P.call(D);case 1:return P.call(D,k[0]);case 2:return P.call(D,k[0],k[1]);case 3:return P.call(D,k[0],k[1],k[2])}return P.apply(D,k)}function ZF(P,D,k,Q){for(var ve=-1,He=P==null?0:P.length;++ve<He;){var yt=P[ve];D(Q,yt,k(yt),P)}return Q}function sr(P,D){for(var k=-1,Q=P==null?0:P.length;++k<Q&&D(P[k],k,P)!==!1;);return P}function QF(P,D){for(var k=P==null?0:P.length;k--&&D(P[k],k,P)!==!1;);return P}function _m(P,D){for(var k=-1,Q=P==null?0:P.length;++k<Q;)if(!D(P[k],k,P))return!1;return!0}function hn(P,D){for(var k=-1,Q=P==null?0:P.length,ve=0,He=[];++k<Q;){var yt=P[k];D(yt,k,P)&&(He[ve++]=yt)}return He}function lo(P,D){var k=P==null?0:P.length;return!!k&&Li(P,D,0)>-1}function pc(P,D,k){for(var Q=-1,ve=P==null?0:P.length;++Q<ve;)if(k(D,P[Q]))return!0;return!1}function at(P,D){for(var k=-1,Q=P==null?0:P.length,ve=Array(Q);++k<Q;)ve[k]=D(P[k],k,P);return ve}function fn(P,D){for(var k=-1,Q=D.length,ve=P.length;++k<Q;)P[ve+k]=D[k];return P}function gc(P,D,k,Q){var ve=-1,He=P==null?0:P.length;for(Q&&He&&(k=P[++ve]);++ve<He;)k=D(k,P[ve],ve,P);return k}function JF(P,D,k,Q){var ve=P==null?0:P.length;for(Q&&ve&&(k=P[--ve]);ve--;)k=D(k,P[ve],ve,P);return k}function mc(P,D){for(var k=-1,Q=P==null?0:P.length;++k<Q;)if(D(P[k],k,P))return!0;return!1}var eN=vc("length");function tN(P){return P.split("")}function rN(P){return P.match(cF)||[]}function ym(P,D,k){var Q;return k(P,function(ve,He,yt){if(D(ve,He,yt))return Q=He,!1}),Q}function co(P,D,k,Q){for(var ve=P.length,He=k+(Q?1:-1);Q?He--:++He<ve;)if(D(P[He],He,P))return He;return-1}function Li(P,D,k){return D===D?pN(P,D,k):co(P,xm,k)}function nN(P,D,k,Q){for(var ve=k-1,He=P.length;++ve<He;)if(Q(P[ve],D))return ve;return-1}function xm(P){return P!==P}function bm(P,D){var k=P==null?0:P.length;return k?yc(P,D)/k:X}function vc(P){return function(D){return D==null?r:D[P]}}function _c(P){return function(D){return P==null?r:P[D]}}function Tm(P,D,k,Q,ve){return ve(P,function(He,yt,Qe){k=Q?(Q=!1,He):D(k,He,yt,Qe)}),k}function iN(P,D){var k=P.length;for(P.sort(D);k--;)P[k]=P[k].value;return P}function yc(P,D){for(var k,Q=-1,ve=P.length;++Q<ve;){var He=D(P[Q]);He!==r&&(k=k===r?He:k+He)}return k}function xc(P,D){for(var k=-1,Q=Array(P);++k<P;)Q[k]=D(k);return Q}function sN(P,D){return at(D,function(k){return[k,P[k]]})}function wm(P){return P&&P.slice(0,Cm(P)+1).replace(ac,"")}function Kt(P){return function(D){return P(D)}}function bc(P,D){return at(D,function(k){return P[k]})}function Cs(P,D){return P.has(D)}function Sm(P,D){for(var k=-1,Q=P.length;++k<Q&&Li(D,P[k],0)>-1;);return k}function Am(P,D){for(var k=P.length;k--&&Li(D,P[k],0)>-1;);return k}function aN(P,D){for(var k=P.length,Q=0;k--;)P[k]===D&&++Q;return Q}var oN=_c(VF),uN=_c(jF);function lN(P){return"\\"+WF[P]}function cN(P,D){return P==null?r:P[D]}function ki(P){return $F.test(P)}function hN(P){return GF.test(P)}function fN(P){for(var D,k=[];!(D=P.next()).done;)k.push(D.value);return k}function Tc(P){var D=-1,k=Array(P.size);return P.forEach(function(Q,ve){k[++D]=[ve,Q]}),k}function Em(P,D){return function(k){return P(D(k))}}function dn(P,D){for(var k=-1,Q=P.length,ve=0,He=[];++k<Q;){var yt=P[k];(yt===D||yt===g)&&(P[k]=g,He[ve++]=k)}return He}function ho(P){var D=-1,k=Array(P.size);return P.forEach(function(Q){k[++D]=Q}),k}function dN(P){var D=-1,k=Array(P.size);return P.forEach(function(Q){k[++D]=[Q,Q]}),k}function pN(P,D,k){for(var Q=k-1,ve=P.length;++Q<ve;)if(P[Q]===D)return Q;return-1}function gN(P,D,k){for(var Q=k+1;Q--;)if(P[Q]===D)return Q;return Q}function Bi(P){return ki(P)?vN(P):eN(P)}function Sr(P){return ki(P)?_N(P):tN(P)}function Cm(P){for(var D=P.length;D--&&aF.test(P.charAt(D)););return D}var mN=_c(XF);function vN(P){for(var D=hc.lastIndex=0;hc.test(P);)++D;return D}function _N(P){return P.match(hc)||[]}function yN(P){return P.match(UF)||[]}var xN=function P(D){D=D==null?Ct:Di.defaults(Ct.Object(),D,Di.pick(Ct,HF));var k=D.Array,Q=D.Date,ve=D.Error,He=D.Function,yt=D.Math,Qe=D.Object,wc=D.RegExp,bN=D.String,ar=D.TypeError,fo=k.prototype,TN=He.prototype,Ui=Qe.prototype,po=D["__core-js_shared__"],go=TN.toString,qe=Ui.hasOwnProperty,wN=0,Im=function(){var s=/[^.]+$/.exec(po&&po.keys&&po.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),mo=Ui.toString,SN=go.call(Qe),AN=Ct._,EN=wc("^"+go.call(qe).replace(sc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vo=hm?D.Buffer:r,pn=D.Symbol,_o=D.Uint8Array,Rm=vo?vo.allocUnsafe:r,yo=Em(Qe.getPrototypeOf,Qe),Pm=Qe.create,Mm=Ui.propertyIsEnumerable,xo=fo.splice,Om=pn?pn.isConcatSpreadable:r,Is=pn?pn.iterator:r,zn=pn?pn.toStringTag:r,bo=function(){try{var s=qn(Qe,"defineProperty");return s({},"",{}),s}catch{}}(),CN=D.clearTimeout!==Ct.clearTimeout&&D.clearTimeout,IN=Q&&Q.now!==Ct.Date.now&&Q.now,RN=D.setTimeout!==Ct.setTimeout&&D.setTimeout,To=yt.ceil,wo=yt.floor,Sc=Qe.getOwnPropertySymbols,PN=vo?vo.isBuffer:r,Fm=D.isFinite,MN=fo.join,ON=Em(Qe.keys,Qe),xt=yt.max,Ot=yt.min,FN=Q.now,NN=D.parseInt,Nm=yt.random,LN=fo.reverse,Ac=qn(D,"DataView"),Rs=qn(D,"Map"),Ec=qn(D,"Promise"),$i=qn(D,"Set"),Ps=qn(D,"WeakMap"),Ms=qn(Qe,"create"),So=Ps&&new Ps,Gi={},kN=Yn(Ac),BN=Yn(Rs),DN=Yn(Ec),UN=Yn($i),$N=Yn(Ps),Ao=pn?pn.prototype:r,Os=Ao?Ao.valueOf:r,Lm=Ao?Ao.toString:r;function S(s){if(dt(s)&&!ye(s)&&!(s instanceof Me)){if(s instanceof or)return s;if(qe.call(s,"__wrapped__"))return k0(s)}return new or(s)}var Hi=function(){function s(){}return function(o){if(!ct(o))return{};if(Pm)return Pm(o);s.prototype=o;var f=new s;return s.prototype=r,f}}();function Eo(){}function or(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}S.templateSettings={escape:eF,evaluate:tF,interpolate:Vg,variable:"",imports:{_:S}},S.prototype=Eo.prototype,S.prototype.constructor=S,or.prototype=Hi(Eo.prototype),or.prototype.constructor=or;function Me(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=q,this.__views__=[]}function GN(){var s=new Me(this.__wrapped__);return s.__actions__=Gt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Gt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Gt(this.__views__),s}function HN(){if(this.__filtered__){var s=new Me(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function zN(){var s=this.__wrapped__.value(),o=this.__dir__,f=ye(s),v=o<0,T=f?s.length:0,A=tL(0,T,this.__views__),C=A.start,R=A.end,M=R-C,U=v?R:C-1,$=this.__iteratees__,z=$.length,K=0,te=Ot(M,this.__takeCount__);if(!f||!v&&T==M&&te==M)return s0(s,this.__actions__);var le=[];e:for(;M--&&K<te;){U+=o;for(var Te=-1,ce=s[U];++Te<z;){var Ie=$[Te],Ne=Ie.iteratee,Jt=Ie.type,Dt=Ne(ce);if(Jt==se)ce=Dt;else if(!Dt){if(Jt==G)continue e;break e}}le[K++]=ce}return le}Me.prototype=Hi(Eo.prototype),Me.prototype.constructor=Me;function Vn(s){var o=-1,f=s==null?0:s.length;for(this.clear();++o<f;){var v=s[o];this.set(v[0],v[1])}}function VN(){this.__data__=Ms?Ms(null):{},this.size=0}function jN(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function XN(s){var o=this.__data__;if(Ms){var f=o[s];return f===h?r:f}return qe.call(o,s)?o[s]:r}function WN(s){var o=this.__data__;return Ms?o[s]!==r:qe.call(o,s)}function qN(s,o){var f=this.__data__;return this.size+=this.has(s)?0:1,f[s]=Ms&&o===r?h:o,this}Vn.prototype.clear=VN,Vn.prototype.delete=jN,Vn.prototype.get=XN,Vn.prototype.has=WN,Vn.prototype.set=qN;function jr(s){var o=-1,f=s==null?0:s.length;for(this.clear();++o<f;){var v=s[o];this.set(v[0],v[1])}}function YN(){this.__data__=[],this.size=0}function KN(s){var o=this.__data__,f=Co(o,s);if(f<0)return!1;var v=o.length-1;return f==v?o.pop():xo.call(o,f,1),--this.size,!0}function ZN(s){var o=this.__data__,f=Co(o,s);return f<0?r:o[f][1]}function QN(s){return Co(this.__data__,s)>-1}function JN(s,o){var f=this.__data__,v=Co(f,s);return v<0?(++this.size,f.push([s,o])):f[v][1]=o,this}jr.prototype.clear=YN,jr.prototype.delete=KN,jr.prototype.get=ZN,jr.prototype.has=QN,jr.prototype.set=JN;function Xr(s){var o=-1,f=s==null?0:s.length;for(this.clear();++o<f;){var v=s[o];this.set(v[0],v[1])}}function e3(){this.size=0,this.__data__={hash:new Vn,map:new(Rs||jr),string:new Vn}}function t3(s){var o=Uo(this,s).delete(s);return this.size-=o?1:0,o}function r3(s){return Uo(this,s).get(s)}function n3(s){return Uo(this,s).has(s)}function i3(s,o){var f=Uo(this,s),v=f.size;return f.set(s,o),this.size+=f.size==v?0:1,this}Xr.prototype.clear=e3,Xr.prototype.delete=t3,Xr.prototype.get=r3,Xr.prototype.has=n3,Xr.prototype.set=i3;function jn(s){var o=-1,f=s==null?0:s.length;for(this.__data__=new Xr;++o<f;)this.add(s[o])}function s3(s){return this.__data__.set(s,h),this}function a3(s){return this.__data__.has(s)}jn.prototype.add=jn.prototype.push=s3,jn.prototype.has=a3;function Ar(s){var o=this.__data__=new jr(s);this.size=o.size}function o3(){this.__data__=new jr,this.size=0}function u3(s){var o=this.__data__,f=o.delete(s);return this.size=o.size,f}function l3(s){return this.__data__.get(s)}function c3(s){return this.__data__.has(s)}function h3(s,o){var f=this.__data__;if(f instanceof jr){var v=f.__data__;if(!Rs||v.length<i-1)return v.push([s,o]),this.size=++f.size,this;f=this.__data__=new Xr(v)}return f.set(s,o),this.size=f.size,this}Ar.prototype.clear=o3,Ar.prototype.delete=u3,Ar.prototype.get=l3,Ar.prototype.has=c3,Ar.prototype.set=h3;function km(s,o){var f=ye(s),v=!f&&Kn(s),T=!f&&!v&&yn(s),A=!f&&!v&&!T&&Xi(s),C=f||v||T||A,R=C?xc(s.length,bN):[],M=R.length;for(var U in s)(o||qe.call(s,U))&&!(C&&(U=="length"||T&&(U=="offset"||U=="parent")||A&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||Kr(U,M)))&&R.push(U);return R}function Bm(s){var o=s.length;return o?s[Bc(0,o-1)]:r}function f3(s,o){return $o(Gt(s),Xn(o,0,s.length))}function d3(s){return $o(Gt(s))}function Cc(s,o,f){(f!==r&&!Er(s[o],f)||f===r&&!(o in s))&&Wr(s,o,f)}function Fs(s,o,f){var v=s[o];(!(qe.call(s,o)&&Er(v,f))||f===r&&!(o in s))&&Wr(s,o,f)}function Co(s,o){for(var f=s.length;f--;)if(Er(s[f][0],o))return f;return-1}function p3(s,o,f,v){return gn(s,function(T,A,C){o(v,T,f(T),C)}),v}function Dm(s,o){return s&&Br(o,St(o),s)}function g3(s,o){return s&&Br(o,zt(o),s)}function Wr(s,o,f){o=="__proto__"&&bo?bo(s,o,{configurable:!0,enumerable:!0,value:f,writable:!0}):s[o]=f}function Ic(s,o){for(var f=-1,v=o.length,T=k(v),A=s==null;++f<v;)T[f]=A?r:uh(s,o[f]);return T}function Xn(s,o,f){return s===s&&(f!==r&&(s=s<=f?s:f),o!==r&&(s=s>=o?s:o)),s}function ur(s,o,f,v,T,A){var C,R=o&c,M=o&d,U=o&m;if(f&&(C=T?f(s,v,T,A):f(s)),C!==r)return C;if(!ct(s))return s;var $=ye(s);if($){if(C=nL(s),!R)return Gt(s,C)}else{var z=Ft(s),K=z==Ge||z==et;if(yn(s))return u0(s,R);if(z==fe||z==pe||K&&!T){if(C=M||K?{}:C0(s),!R)return M?X3(s,g3(C,s)):j3(s,Dm(C,s))}else{if(!tt[z])return T?s:{};C=iL(s,z,R)}}A||(A=new Ar);var te=A.get(s);if(te)return te;A.set(s,C),rv(s)?s.forEach(function(ce){C.add(ur(ce,o,f,ce,s,A))}):ev(s)&&s.forEach(function(ce,Ie){C.set(Ie,ur(ce,o,f,Ie,s,A))});var le=U?M?qc:Wc:M?zt:St,Te=$?r:le(s);return sr(Te||s,function(ce,Ie){Te&&(Ie=ce,ce=s[Ie]),Fs(C,Ie,ur(ce,o,f,Ie,s,A))}),C}function m3(s){var o=St(s);return function(f){return Um(f,s,o)}}function Um(s,o,f){var v=f.length;if(s==null)return!v;for(s=Qe(s);v--;){var T=f[v],A=o[T],C=s[T];if(C===r&&!(T in s)||!A(C))return!1}return!0}function $m(s,o,f){if(typeof s!="function")throw new ar(u);return $s(function(){s.apply(r,f)},o)}function Ns(s,o,f,v){var T=-1,A=lo,C=!0,R=s.length,M=[],U=o.length;if(!R)return M;f&&(o=at(o,Kt(f))),v?(A=pc,C=!1):o.length>=i&&(A=Cs,C=!1,o=new jn(o));e:for(;++T<R;){var $=s[T],z=f==null?$:f($);if($=v||$!==0?$:0,C&&z===z){for(var K=U;K--;)if(o[K]===z)continue e;M.push($)}else A(o,z,v)||M.push($)}return M}var gn=d0(kr),Gm=d0(Pc,!0);function v3(s,o){var f=!0;return gn(s,function(v,T,A){return f=!!o(v,T,A),f}),f}function Io(s,o,f){for(var v=-1,T=s.length;++v<T;){var A=s[v],C=o(A);if(C!=null&&(R===r?C===C&&!Qt(C):f(C,R)))var R=C,M=A}return M}function _3(s,o,f,v){var T=s.length;for(f=xe(f),f<0&&(f=-f>T?0:T+f),v=v===r||v>T?T:xe(v),v<0&&(v+=T),v=f>v?0:iv(v);f<v;)s[f++]=o;return s}function Hm(s,o){var f=[];return gn(s,function(v,T,A){o(v,T,A)&&f.push(v)}),f}function It(s,o,f,v,T){var A=-1,C=s.length;for(f||(f=aL),T||(T=[]);++A<C;){var R=s[A];o>0&&f(R)?o>1?It(R,o-1,f,v,T):fn(T,R):v||(T[T.length]=R)}return T}var Rc=p0(),zm=p0(!0);function kr(s,o){return s&&Rc(s,o,St)}function Pc(s,o){return s&&zm(s,o,St)}function Ro(s,o){return hn(o,function(f){return Zr(s[f])})}function Wn(s,o){o=vn(o,s);for(var f=0,v=o.length;s!=null&&f<v;)s=s[Dr(o[f++])];return f&&f==v?s:r}function Vm(s,o,f){var v=o(s);return ye(s)?v:fn(v,f(s))}function kt(s){return s==null?s===r?Yl:st:zn&&zn in Qe(s)?eL(s):dL(s)}function Mc(s,o){return s>o}function y3(s,o){return s!=null&&qe.call(s,o)}function x3(s,o){return s!=null&&o in Qe(s)}function b3(s,o,f){return s>=Ot(o,f)&&s<xt(o,f)}function Oc(s,o,f){for(var v=f?pc:lo,T=s[0].length,A=s.length,C=A,R=k(A),M=1/0,U=[];C--;){var $=s[C];C&&o&&($=at($,Kt(o))),M=Ot($.length,M),R[C]=!f&&(o||T>=120&&$.length>=120)?new jn(C&&$):r}$=s[0];var z=-1,K=R[0];e:for(;++z<T&&U.length<M;){var te=$[z],le=o?o(te):te;if(te=f||te!==0?te:0,!(K?Cs(K,le):v(U,le,f))){for(C=A;--C;){var Te=R[C];if(!(Te?Cs(Te,le):v(s[C],le,f)))continue e}K&&K.push(le),U.push(te)}}return U}function T3(s,o,f,v){return kr(s,function(T,A,C){o(v,f(T),A,C)}),v}function Ls(s,o,f){o=vn(o,s),s=M0(s,o);var v=s==null?s:s[Dr(cr(o))];return v==null?r:Yt(v,s,f)}function jm(s){return dt(s)&&kt(s)==pe}function w3(s){return dt(s)&&kt(s)==Oi}function S3(s){return dt(s)&&kt(s)==Ze}function ks(s,o,f,v,T){return s===o?!0:s==null||o==null||!dt(s)&&!dt(o)?s!==s&&o!==o:A3(s,o,f,v,ks,T)}function A3(s,o,f,v,T,A){var C=ye(s),R=ye(o),M=C?Pe:Ft(s),U=R?Pe:Ft(o);M=M==pe?fe:M,U=U==pe?fe:U;var $=M==fe,z=U==fe,K=M==U;if(K&&yn(s)){if(!yn(o))return!1;C=!0,$=!1}if(K&&!$)return A||(A=new Ar),C||Xi(s)?S0(s,o,f,v,T,A):Q3(s,o,M,f,v,T,A);if(!(f&_)){var te=$&&qe.call(s,"__wrapped__"),le=z&&qe.call(o,"__wrapped__");if(te||le){var Te=te?s.value():s,ce=le?o.value():o;return A||(A=new Ar),T(Te,ce,f,v,A)}}return K?(A||(A=new Ar),J3(s,o,f,v,T,A)):!1}function E3(s){return dt(s)&&Ft(s)==Ae}function Fc(s,o,f,v){var T=f.length,A=T,C=!v;if(s==null)return!A;for(s=Qe(s);T--;){var R=f[T];if(C&&R[2]?R[1]!==s[R[0]]:!(R[0]in s))return!1}for(;++T<A;){R=f[T];var M=R[0],U=s[M],$=R[1];if(C&&R[2]){if(U===r&&!(M in s))return!1}else{var z=new Ar;if(v)var K=v(U,$,M,s,o,z);if(!(K===r?ks($,U,_|y,v,z):K))return!1}}return!0}function Xm(s){if(!ct(s)||uL(s))return!1;var o=Zr(s)?EN:mF;return o.test(Yn(s))}function C3(s){return dt(s)&&kt(s)==$t}function I3(s){return dt(s)&&Ft(s)==ft}function R3(s){return dt(s)&&Xo(s.length)&&!!nt[kt(s)]}function Wm(s){return typeof s=="function"?s:s==null?Vt:typeof s=="object"?ye(s)?Km(s[0],s[1]):Ym(s):gv(s)}function Nc(s){if(!Us(s))return ON(s);var o=[];for(var f in Qe(s))qe.call(s,f)&&f!="constructor"&&o.push(f);return o}function P3(s){if(!ct(s))return fL(s);var o=Us(s),f=[];for(var v in s)v=="constructor"&&(o||!qe.call(s,v))||f.push(v);return f}function Lc(s,o){return s<o}function qm(s,o){var f=-1,v=Ht(s)?k(s.length):[];return gn(s,function(T,A,C){v[++f]=o(T,A,C)}),v}function Ym(s){var o=Kc(s);return o.length==1&&o[0][2]?R0(o[0][0],o[0][1]):function(f){return f===s||Fc(f,s,o)}}function Km(s,o){return Qc(s)&&I0(o)?R0(Dr(s),o):function(f){var v=uh(f,s);return v===r&&v===o?lh(f,s):ks(o,v,_|y)}}function Po(s,o,f,v,T){s!==o&&Rc(o,function(A,C){if(T||(T=new Ar),ct(A))M3(s,o,C,f,Po,v,T);else{var R=v?v(eh(s,C),A,C+"",s,o,T):r;R===r&&(R=A),Cc(s,C,R)}},zt)}function M3(s,o,f,v,T,A,C){var R=eh(s,f),M=eh(o,f),U=C.get(M);if(U){Cc(s,f,U);return}var $=A?A(R,M,f+"",s,o,C):r,z=$===r;if(z){var K=ye(M),te=!K&&yn(M),le=!K&&!te&&Xi(M);$=M,K||te||le?ye(R)?$=R:gt(R)?$=Gt(R):te?(z=!1,$=u0(M,!0)):le?(z=!1,$=l0(M,!0)):$=[]:Gs(M)||Kn(M)?($=R,Kn(R)?$=sv(R):(!ct(R)||Zr(R))&&($=C0(M))):z=!1}z&&(C.set(M,$),T($,M,v,A,C),C.delete(M)),Cc(s,f,$)}function Zm(s,o){var f=s.length;if(f)return o+=o<0?f:0,Kr(o,f)?s[o]:r}function Qm(s,o,f){o.length?o=at(o,function(A){return ye(A)?function(C){return Wn(C,A.length===1?A[0]:A)}:A}):o=[Vt];var v=-1;o=at(o,Kt(oe()));var T=qm(s,function(A,C,R){var M=at(o,function(U){return U(A)});return{criteria:M,index:++v,value:A}});return iN(T,function(A,C){return V3(A,C,f)})}function O3(s,o){return Jm(s,o,function(f,v){return lh(s,v)})}function Jm(s,o,f){for(var v=-1,T=o.length,A={};++v<T;){var C=o[v],R=Wn(s,C);f(R,C)&&Bs(A,vn(C,s),R)}return A}function F3(s){return function(o){return Wn(o,s)}}function kc(s,o,f,v){var T=v?nN:Li,A=-1,C=o.length,R=s;for(s===o&&(o=Gt(o)),f&&(R=at(s,Kt(f)));++A<C;)for(var M=0,U=o[A],$=f?f(U):U;(M=T(R,$,M,v))>-1;)R!==s&&xo.call(R,M,1),xo.call(s,M,1);return s}function e0(s,o){for(var f=s?o.length:0,v=f-1;f--;){var T=o[f];if(f==v||T!==A){var A=T;Kr(T)?xo.call(s,T,1):$c(s,T)}}return s}function Bc(s,o){return s+wo(Nm()*(o-s+1))}function N3(s,o,f,v){for(var T=-1,A=xt(To((o-s)/(f||1)),0),C=k(A);A--;)C[v?A:++T]=s,s+=f;return C}function Dc(s,o){var f="";if(!s||o<1||o>J)return f;do o%2&&(f+=s),o=wo(o/2),o&&(s+=s);while(o);return f}function Se(s,o){return th(P0(s,o,Vt),s+"")}function L3(s){return Bm(Wi(s))}function k3(s,o){var f=Wi(s);return $o(f,Xn(o,0,f.length))}function Bs(s,o,f,v){if(!ct(s))return s;o=vn(o,s);for(var T=-1,A=o.length,C=A-1,R=s;R!=null&&++T<A;){var M=Dr(o[T]),U=f;if(M==="__proto__"||M==="constructor"||M==="prototype")return s;if(T!=C){var $=R[M];U=v?v($,M,R):r,U===r&&(U=ct($)?$:Kr(o[T+1])?[]:{})}Fs(R,M,U),R=R[M]}return s}var t0=So?function(s,o){return So.set(s,o),s}:Vt,B3=bo?function(s,o){return bo(s,"toString",{configurable:!0,enumerable:!1,value:hh(o),writable:!0})}:Vt;function D3(s){return $o(Wi(s))}function lr(s,o,f){var v=-1,T=s.length;o<0&&(o=-o>T?0:T+o),f=f>T?T:f,f<0&&(f+=T),T=o>f?0:f-o>>>0,o>>>=0;for(var A=k(T);++v<T;)A[v]=s[v+o];return A}function U3(s,o){var f;return gn(s,function(v,T,A){return f=o(v,T,A),!f}),!!f}function Mo(s,o,f){var v=0,T=s==null?v:s.length;if(typeof o=="number"&&o===o&&T<=he){for(;v<T;){var A=v+T>>>1,C=s[A];C!==null&&!Qt(C)&&(f?C<=o:C<o)?v=A+1:T=A}return T}return Uc(s,o,Vt,f)}function Uc(s,o,f,v){var T=0,A=s==null?0:s.length;if(A===0)return 0;o=f(o);for(var C=o!==o,R=o===null,M=Qt(o),U=o===r;T<A;){var $=wo((T+A)/2),z=f(s[$]),K=z!==r,te=z===null,le=z===z,Te=Qt(z);if(C)var ce=v||le;else U?ce=le&&(v||K):R?ce=le&&K&&(v||!te):M?ce=le&&K&&!te&&(v||!Te):te||Te?ce=!1:ce=v?z<=o:z<o;ce?T=$+1:A=$}return Ot(A,ue)}function r0(s,o){for(var f=-1,v=s.length,T=0,A=[];++f<v;){var C=s[f],R=o?o(C):C;if(!f||!Er(R,M)){var M=R;A[T++]=C===0?0:C}}return A}function n0(s){return typeof s=="number"?s:Qt(s)?X:+s}function Zt(s){if(typeof s=="string")return s;if(ye(s))return at(s,Zt)+"";if(Qt(s))return Lm?Lm.call(s):"";var o=s+"";return o=="0"&&1/s==-H?"-0":o}function mn(s,o,f){var v=-1,T=lo,A=s.length,C=!0,R=[],M=R;if(f)C=!1,T=pc;else if(A>=i){var U=o?null:K3(s);if(U)return ho(U);C=!1,T=Cs,M=new jn}else M=o?[]:R;e:for(;++v<A;){var $=s[v],z=o?o($):$;if($=f||$!==0?$:0,C&&z===z){for(var K=M.length;K--;)if(M[K]===z)continue e;o&&M.push(z),R.push($)}else T(M,z,f)||(M!==R&&M.push(z),R.push($))}return R}function $c(s,o){return o=vn(o,s),s=M0(s,o),s==null||delete s[Dr(cr(o))]}function i0(s,o,f,v){return Bs(s,o,f(Wn(s,o)),v)}function Oo(s,o,f,v){for(var T=s.length,A=v?T:-1;(v?A--:++A<T)&&o(s[A],A,s););return f?lr(s,v?0:A,v?A+1:T):lr(s,v?A+1:0,v?T:A)}function s0(s,o){var f=s;return f instanceof Me&&(f=f.value()),gc(o,function(v,T){return T.func.apply(T.thisArg,fn([v],T.args))},f)}function Gc(s,o,f){var v=s.length;if(v<2)return v?mn(s[0]):[];for(var T=-1,A=k(v);++T<v;)for(var C=s[T],R=-1;++R<v;)R!=T&&(A[T]=Ns(A[T]||C,s[R],o,f));return mn(It(A,1),o,f)}function a0(s,o,f){for(var v=-1,T=s.length,A=o.length,C={};++v<T;){var R=v<A?o[v]:r;f(C,s[v],R)}return C}function Hc(s){return gt(s)?s:[]}function zc(s){return typeof s=="function"?s:Vt}function vn(s,o){return ye(s)?s:Qc(s,o)?[s]:L0(Xe(s))}var $3=Se;function _n(s,o,f){var v=s.length;return f=f===r?v:f,!o&&f>=v?s:lr(s,o,f)}var o0=CN||function(s){return Ct.clearTimeout(s)};function u0(s,o){if(o)return s.slice();var f=s.length,v=Rm?Rm(f):new s.constructor(f);return s.copy(v),v}function Vc(s){var o=new s.constructor(s.byteLength);return new _o(o).set(new _o(s)),o}function G3(s,o){var f=o?Vc(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.byteLength)}function H3(s){var o=new s.constructor(s.source,jg.exec(s));return o.lastIndex=s.lastIndex,o}function z3(s){return Os?Qe(Os.call(s)):{}}function l0(s,o){var f=o?Vc(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.length)}function c0(s,o){if(s!==o){var f=s!==r,v=s===null,T=s===s,A=Qt(s),C=o!==r,R=o===null,M=o===o,U=Qt(o);if(!R&&!U&&!A&&s>o||A&&C&&M&&!R&&!U||v&&C&&M||!f&&M||!T)return 1;if(!v&&!A&&!U&&s<o||U&&f&&T&&!v&&!A||R&&f&&T||!C&&T||!M)return-1}return 0}function V3(s,o,f){for(var v=-1,T=s.criteria,A=o.criteria,C=T.length,R=f.length;++v<C;){var M=c0(T[v],A[v]);if(M){if(v>=R)return M;var U=f[v];return M*(U=="desc"?-1:1)}}return s.index-o.index}function h0(s,o,f,v){for(var T=-1,A=s.length,C=f.length,R=-1,M=o.length,U=xt(A-C,0),$=k(M+U),z=!v;++R<M;)$[R]=o[R];for(;++T<C;)(z||T<A)&&($[f[T]]=s[T]);for(;U--;)$[R++]=s[T++];return $}function f0(s,o,f,v){for(var T=-1,A=s.length,C=-1,R=f.length,M=-1,U=o.length,$=xt(A-R,0),z=k($+U),K=!v;++T<$;)z[T]=s[T];for(var te=T;++M<U;)z[te+M]=o[M];for(;++C<R;)(K||T<A)&&(z[te+f[C]]=s[T++]);return z}function Gt(s,o){var f=-1,v=s.length;for(o||(o=k(v));++f<v;)o[f]=s[f];return o}function Br(s,o,f,v){var T=!f;f||(f={});for(var A=-1,C=o.length;++A<C;){var R=o[A],M=v?v(f[R],s[R],R,f,s):r;M===r&&(M=s[R]),T?Wr(f,R,M):Fs(f,R,M)}return f}function j3(s,o){return Br(s,Zc(s),o)}function X3(s,o){return Br(s,A0(s),o)}function Fo(s,o){return function(f,v){var T=ye(f)?ZF:p3,A=o?o():{};return T(f,s,oe(v,2),A)}}function zi(s){return Se(function(o,f){var v=-1,T=f.length,A=T>1?f[T-1]:r,C=T>2?f[2]:r;for(A=s.length>3&&typeof A=="function"?(T--,A):r,C&&Bt(f[0],f[1],C)&&(A=T<3?r:A,T=1),o=Qe(o);++v<T;){var R=f[v];R&&s(o,R,v,A)}return o})}function d0(s,o){return function(f,v){if(f==null)return f;if(!Ht(f))return s(f,v);for(var T=f.length,A=o?T:-1,C=Qe(f);(o?A--:++A<T)&&v(C[A],A,C)!==!1;);return f}}function p0(s){return function(o,f,v){for(var T=-1,A=Qe(o),C=v(o),R=C.length;R--;){var M=C[s?R:++T];if(f(A[M],M,A)===!1)break}return o}}function W3(s,o,f){var v=o&b,T=Ds(s);function A(){var C=this&&this!==Ct&&this instanceof A?T:s;return C.apply(v?f:this,arguments)}return A}function g0(s){return function(o){o=Xe(o);var f=ki(o)?Sr(o):r,v=f?f[0]:o.charAt(0),T=f?_n(f,1).join(""):o.slice(1);return v[s]()+T}}function Vi(s){return function(o){return gc(dv(fv(o).replace(BF,"")),s,"")}}function Ds(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var f=Hi(s.prototype),v=s.apply(f,o);return ct(v)?v:f}}function q3(s,o,f){var v=Ds(s);function T(){for(var A=arguments.length,C=k(A),R=A,M=ji(T);R--;)C[R]=arguments[R];var U=A<3&&C[0]!==M&&C[A-1]!==M?[]:dn(C,M);if(A-=U.length,A<f)return x0(s,o,No,T.placeholder,r,C,U,r,r,f-A);var $=this&&this!==Ct&&this instanceof T?v:s;return Yt($,this,C)}return T}function m0(s){return function(o,f,v){var T=Qe(o);if(!Ht(o)){var A=oe(f,3);o=St(o),f=function(R){return A(T[R],R,T)}}var C=s(o,f,v);return C>-1?T[A?o[C]:C]:r}}function v0(s){return Yr(function(o){var f=o.length,v=f,T=or.prototype.thru;for(s&&o.reverse();v--;){var A=o[v];if(typeof A!="function")throw new ar(u);if(T&&!C&&Do(A)=="wrapper")var C=new or([],!0)}for(v=C?v:f;++v<f;){A=o[v];var R=Do(A),M=R=="wrapper"?Yc(A):r;M&&Jc(M[0])&&M[1]==(N|w|O|L)&&!M[4].length&&M[9]==1?C=C[Do(M[0])].apply(C,M[3]):C=A.length==1&&Jc(A)?C[R]():C.thru(A)}return function(){var U=arguments,$=U[0];if(C&&U.length==1&&ye($))return C.plant($).value();for(var z=0,K=f?o[z].apply(this,U):$;++z<f;)K=o[z].call(this,K);return K}})}function No(s,o,f,v,T,A,C,R,M,U){var $=o&N,z=o&b,K=o&x,te=o&(w|I),le=o&B,Te=K?r:Ds(s);function ce(){for(var Ie=arguments.length,Ne=k(Ie),Jt=Ie;Jt--;)Ne[Jt]=arguments[Jt];if(te)var Dt=ji(ce),er=aN(Ne,Dt);if(v&&(Ne=h0(Ne,v,T,te)),A&&(Ne=f0(Ne,A,C,te)),Ie-=er,te&&Ie<U){var mt=dn(Ne,Dt);return x0(s,o,No,ce.placeholder,f,Ne,mt,R,M,U-Ie)}var Cr=z?f:this,Jr=K?Cr[s]:s;return Ie=Ne.length,R?Ne=pL(Ne,R):le&&Ie>1&&Ne.reverse(),$&&M<Ie&&(Ne.length=M),this&&this!==Ct&&this instanceof ce&&(Jr=Te||Ds(Jr)),Jr.apply(Cr,Ne)}return ce}function _0(s,o){return function(f,v){return T3(f,s,o(v),{})}}function Lo(s,o){return function(f,v){var T;if(f===r&&v===r)return o;if(f!==r&&(T=f),v!==r){if(T===r)return v;typeof f=="string"||typeof v=="string"?(f=Zt(f),v=Zt(v)):(f=n0(f),v=n0(v)),T=s(f,v)}return T}}function jc(s){return Yr(function(o){return o=at(o,Kt(oe())),Se(function(f){var v=this;return s(o,function(T){return Yt(T,v,f)})})})}function ko(s,o){o=o===r?" ":Zt(o);var f=o.length;if(f<2)return f?Dc(o,s):o;var v=Dc(o,To(s/Bi(o)));return ki(o)?_n(Sr(v),0,s).join(""):v.slice(0,s)}function Y3(s,o,f,v){var T=o&b,A=Ds(s);function C(){for(var R=-1,M=arguments.length,U=-1,$=v.length,z=k($+M),K=this&&this!==Ct&&this instanceof C?A:s;++U<$;)z[U]=v[U];for(;M--;)z[U++]=arguments[++R];return Yt(K,T?f:this,z)}return C}function y0(s){return function(o,f,v){return v&&typeof v!="number"&&Bt(o,f,v)&&(f=v=r),o=Qr(o),f===r?(f=o,o=0):f=Qr(f),v=v===r?o<f?1:-1:Qr(v),N3(o,f,v,s)}}function Bo(s){return function(o,f){return typeof o=="string"&&typeof f=="string"||(o=hr(o),f=hr(f)),s(o,f)}}function x0(s,o,f,v,T,A,C,R,M,U){var $=o&w,z=$?C:r,K=$?r:C,te=$?A:r,le=$?r:A;o|=$?O:F,o&=~($?F:O),o&E||(o&=~(b|x));var Te=[s,o,T,te,z,le,K,R,M,U],ce=f.apply(r,Te);return Jc(s)&&O0(ce,Te),ce.placeholder=v,F0(ce,s,o)}function Xc(s){var o=yt[s];return function(f,v){if(f=hr(f),v=v==null?0:Ot(xe(v),292),v&&Fm(f)){var T=(Xe(f)+"e").split("e"),A=o(T[0]+"e"+(+T[1]+v));return T=(Xe(A)+"e").split("e"),+(T[0]+"e"+(+T[1]-v))}return o(f)}}var K3=$i&&1/ho(new $i([,-0]))[1]==H?function(s){return new $i(s)}:ph;function b0(s){return function(o){var f=Ft(o);return f==Ae?Tc(o):f==ft?dN(o):sN(o,s(o))}}function qr(s,o,f,v,T,A,C,R){var M=o&x;if(!M&&typeof s!="function")throw new ar(u);var U=v?v.length:0;if(U||(o&=~(O|F),v=T=r),C=C===r?C:xt(xe(C),0),R=R===r?R:xe(R),U-=T?T.length:0,o&F){var $=v,z=T;v=T=r}var K=M?r:Yc(s),te=[s,o,f,v,T,$,z,A,C,R];if(K&&hL(te,K),s=te[0],o=te[1],f=te[2],v=te[3],T=te[4],R=te[9]=te[9]===r?M?0:s.length:xt(te[9]-U,0),!R&&o&(w|I)&&(o&=~(w|I)),!o||o==b)var le=W3(s,o,f);else o==w||o==I?le=q3(s,o,R):(o==O||o==(b|O))&&!T.length?le=Y3(s,o,f,v):le=No.apply(r,te);var Te=K?t0:O0;return F0(Te(le,te),s,o)}function T0(s,o,f,v){return s===r||Er(s,Ui[f])&&!qe.call(v,f)?o:s}function w0(s,o,f,v,T,A){return ct(s)&&ct(o)&&(A.set(o,s),Po(s,o,r,w0,A),A.delete(o)),s}function Z3(s){return Gs(s)?r:s}function S0(s,o,f,v,T,A){var C=f&_,R=s.length,M=o.length;if(R!=M&&!(C&&M>R))return!1;var U=A.get(s),$=A.get(o);if(U&&$)return U==o&&$==s;var z=-1,K=!0,te=f&y?new jn:r;for(A.set(s,o),A.set(o,s);++z<R;){var le=s[z],Te=o[z];if(v)var ce=C?v(Te,le,z,o,s,A):v(le,Te,z,s,o,A);if(ce!==r){if(ce)continue;K=!1;break}if(te){if(!mc(o,function(Ie,Ne){if(!Cs(te,Ne)&&(le===Ie||T(le,Ie,f,v,A)))return te.push(Ne)})){K=!1;break}}else if(!(le===Te||T(le,Te,f,v,A))){K=!1;break}}return A.delete(s),A.delete(o),K}function Q3(s,o,f,v,T,A,C){switch(f){case Fi:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Oi:return!(s.byteLength!=o.byteLength||!A(new _o(s),new _o(o)));case je:case Ze:case _e:return Er(+s,+o);case Ce:return s.name==o.name&&s.message==o.message;case $t:case nr:return s==o+"";case Ae:var R=Tc;case ft:var M=v&_;if(R||(R=ho),s.size!=o.size&&!M)return!1;var U=C.get(s);if(U)return U==o;v|=y,C.set(s,o);var $=S0(R(s),R(o),v,T,A,C);return C.delete(s),$;case Mi:if(Os)return Os.call(s)==Os.call(o)}return!1}function J3(s,o,f,v,T,A){var C=f&_,R=Wc(s),M=R.length,U=Wc(o),$=U.length;if(M!=$&&!C)return!1;for(var z=M;z--;){var K=R[z];if(!(C?K in o:qe.call(o,K)))return!1}var te=A.get(s),le=A.get(o);if(te&&le)return te==o&&le==s;var Te=!0;A.set(s,o),A.set(o,s);for(var ce=C;++z<M;){K=R[z];var Ie=s[K],Ne=o[K];if(v)var Jt=C?v(Ne,Ie,K,o,s,A):v(Ie,Ne,K,s,o,A);if(!(Jt===r?Ie===Ne||T(Ie,Ne,f,v,A):Jt)){Te=!1;break}ce||(ce=K=="constructor")}if(Te&&!ce){var Dt=s.constructor,er=o.constructor;Dt!=er&&"constructor"in s&&"constructor"in o&&!(typeof Dt=="function"&&Dt instanceof Dt&&typeof er=="function"&&er instanceof er)&&(Te=!1)}return A.delete(s),A.delete(o),Te}function Yr(s){return th(P0(s,r,U0),s+"")}function Wc(s){return Vm(s,St,Zc)}function qc(s){return Vm(s,zt,A0)}var Yc=So?function(s){return So.get(s)}:ph;function Do(s){for(var o=s.name+"",f=Gi[o],v=qe.call(Gi,o)?f.length:0;v--;){var T=f[v],A=T.func;if(A==null||A==s)return T.name}return o}function ji(s){var o=qe.call(S,"placeholder")?S:s;return o.placeholder}function oe(){var s=S.iteratee||fh;return s=s===fh?Wm:s,arguments.length?s(arguments[0],arguments[1]):s}function Uo(s,o){var f=s.__data__;return oL(o)?f[typeof o=="string"?"string":"hash"]:f.map}function Kc(s){for(var o=St(s),f=o.length;f--;){var v=o[f],T=s[v];o[f]=[v,T,I0(T)]}return o}function qn(s,o){var f=cN(s,o);return Xm(f)?f:r}function eL(s){var o=qe.call(s,zn),f=s[zn];try{s[zn]=r;var v=!0}catch{}var T=mo.call(s);return v&&(o?s[zn]=f:delete s[zn]),T}var Zc=Sc?function(s){return s==null?[]:(s=Qe(s),hn(Sc(s),function(o){return Mm.call(s,o)}))}:gh,A0=Sc?function(s){for(var o=[];s;)fn(o,Zc(s)),s=yo(s);return o}:gh,Ft=kt;(Ac&&Ft(new Ac(new ArrayBuffer(1)))!=Fi||Rs&&Ft(new Rs)!=Ae||Ec&&Ft(Ec.resolve())!=Fe||$i&&Ft(new $i)!=ft||Ps&&Ft(new Ps)!=Gn)&&(Ft=function(s){var o=kt(s),f=o==fe?s.constructor:r,v=f?Yn(f):"";if(v)switch(v){case kN:return Fi;case BN:return Ae;case DN:return Fe;case UN:return ft;case $N:return Gn}return o});function tL(s,o,f){for(var v=-1,T=f.length;++v<T;){var A=f[v],C=A.size;switch(A.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=Ot(o,s+C);break;case"takeRight":s=xt(s,o-C);break}}return{start:s,end:o}}function rL(s){var o=s.match(uF);return o?o[1].split(lF):[]}function E0(s,o,f){o=vn(o,s);for(var v=-1,T=o.length,A=!1;++v<T;){var C=Dr(o[v]);if(!(A=s!=null&&f(s,C)))break;s=s[C]}return A||++v!=T?A:(T=s==null?0:s.length,!!T&&Xo(T)&&Kr(C,T)&&(ye(s)||Kn(s)))}function nL(s){var o=s.length,f=new s.constructor(o);return o&&typeof s[0]=="string"&&qe.call(s,"index")&&(f.index=s.index,f.input=s.input),f}function C0(s){return typeof s.constructor=="function"&&!Us(s)?Hi(yo(s)):{}}function iL(s,o,f){var v=s.constructor;switch(o){case Oi:return Vc(s);case je:case Ze:return new v(+s);case Fi:return G3(s,f);case Kl:case Zl:case Ql:case Jl:case ec:case tc:case rc:case nc:case ic:return l0(s,f);case Ae:return new v;case _e:case nr:return new v(s);case $t:return H3(s);case ft:return new v;case Mi:return z3(s)}}function sL(s,o){var f=o.length;if(!f)return s;var v=f-1;return o[v]=(f>1?"& ":"")+o[v],o=o.join(f>2?", ":" "),s.replace(oF,`{
1990
1974
  /* [wrapped with `+o+`] */
1991
- `)}function fL(s){return ye(s)||Zn(s)||!!(Om&&s&&s[Om])}function Kr(s,o){var h=typeof s;return o=o??Q,!!o&&(h=="number"||h!="symbol"&&SF.test(s))&&s>-1&&s%1==0&&s<o}function Ut(s,o,h){if(!ct(h))return!1;var v=typeof o;return(v=="number"?zt(h)&&Kr(o,h.length):v=="string"&&o in h)?Er(h[o],s):!1}function eh(s,o){if(ye(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||Qt(s)?!0:lF.test(s)||!uF.test(s)||o!=null&&s in Je(o)}function dL(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function th(s){var o=Bo(s),h=S[o];if(typeof h!="function"||!(o in Fe.prototype))return!1;if(s===h)return!0;var v=Zc(h);return!!v&&s===v[0]}function pL(s){return!!Im&&Im in s}var gL=po?Zr:_h;function Us(s){var o=s&&s.constructor,h=typeof o=="function"&&o.prototype||Ui;return s===h}function I0(s){return s===s&&!ct(s)}function R0(s,o){return function(h){return h==null?!1:h[s]===o&&(o!==r||s in Je(h))}}function mL(s){var o=Vo(s,function(v){return h.size===p&&h.clear(),v}),h=o.cache;return o}function vL(s,o){var h=s[1],v=o[1],T=h|v,A=T<(b|x|N),C=v==N&&h==w||v==N&&h==L&&s[7].length<=o[8]||v==(N|L)&&o[7].length<=o[8]&&h==w;if(!(A||C))return s;v&b&&(s[2]=o[2],T|=h&b?0:E);var R=o[3];if(R){var M=s[3];s[3]=M?h0(M,R,o[4]):R,s[4]=M?pn(s[3],g):o[4]}return R=o[5],R&&(M=s[5],s[5]=M?f0(M,R,o[6]):R,s[6]=M?pn(s[5],g):o[6]),R=o[7],R&&(s[7]=R),v&N&&(s[8]=s[8]==null?o[8]:Nt(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=T,s}function _L(s){var o=[];if(s!=null)for(var h in Je(s))o.push(h);return o}function yL(s){return mo.call(s)}function P0(s,o,h){return o=xt(o===r?s.length-1:o,0),function(){for(var v=arguments,T=-1,A=xt(v.length-o,0),C=k(A);++T<A;)C[T]=v[o+T];T=-1;for(var R=k(o+1);++T<o;)R[T]=v[T];return R[o]=h(C),Yt(s,this,R)}}function M0(s,o){return o.length<2?s:qn(s,lr(o,0,-1))}function xL(s,o){for(var h=s.length,v=Nt(o.length,h),T=Ht(s);v--;){var A=o[v];s[v]=Kr(A,h)?T[A]:r}return s}function rh(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var O0=N0(t0),$s=LN||function(s,o){return It.setTimeout(s,o)},nh=N0(z3);function F0(s,o,h){var v=o+"";return nh(s,hL(v,bL(uL(v),h)))}function N0(s){var o=0,h=0;return function(){var v=UN(),T=j-(v-h);if(h=v,T>0){if(++o>=ie)return arguments[0]}else o=0;return s.apply(r,arguments)}}function $o(s,o){var h=-1,v=s.length,T=v-1;for(o=o===r?v:o;++h<o;){var A=Uc(h,T),C=s[A];s[A]=s[h],s[h]=C}return s.length=o,s}var L0=mL(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(cF,function(h,v,T,A){o.push(T?A.replace(_F,"$1"):v||h)}),o});function Br(s){if(typeof s=="string"||Qt(s))return s;var o=s+"";return o=="0"&&1/s==-H?"-0":o}function Kn(s){if(s!=null){try{return go.call(s)}catch{}try{return s+""}catch{}}return""}function bL(s,o){return sr(me,function(h){var v="_."+h[0];o&h[1]&&!lo(s,v)&&s.push(v)}),s.sort()}function k0(s){if(s instanceof Fe)return s.clone();var o=new or(s.__wrapped__,s.__chain__);return o.__actions__=Ht(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function TL(s,o,h){(h?Ut(s,o,h):o===r)?o=1:o=xt(xe(o),0);var v=s==null?0:s.length;if(!v||o<1)return[];for(var T=0,A=0,C=k(To(v/o));T<v;)C[A++]=lr(s,T,T+=o);return C}function wL(s){for(var o=-1,h=s==null?0:s.length,v=0,T=[];++o<h;){var A=s[o];A&&(T[v++]=A)}return T}function SL(){var s=arguments.length;if(!s)return[];for(var o=k(s-1),h=arguments[0],v=s;v--;)o[v-1]=arguments[v];return dn(ye(h)?Ht(h):[h],Rt(o,1))}var AL=Ee(function(s,o){return gt(s)?Ns(s,Rt(o,1,gt,!0)):[]}),EL=Ee(function(s,o){var h=cr(o);return gt(h)&&(h=r),gt(s)?Ns(s,Rt(o,1,gt,!0),ue(h,2)):[]}),CL=Ee(function(s,o){var h=cr(o);return gt(h)&&(h=r),gt(s)?Ns(s,Rt(o,1,gt,!0),r,h):[]});function IL(s,o,h){var v=s==null?0:s.length;return v?(o=h||o===r?1:xe(o),lr(s,o<0?0:o,v)):[]}function RL(s,o,h){var v=s==null?0:s.length;return v?(o=h||o===r?1:xe(o),o=v-o,lr(s,0,o<0?0:o)):[]}function PL(s,o){return s&&s.length?Oo(s,ue(o,3),!0,!0):[]}function ML(s,o){return s&&s.length?Oo(s,ue(o,3),!0):[]}function OL(s,o,h,v){var T=s==null?0:s.length;return T?(h&&typeof h!="number"&&Ut(s,o,h)&&(h=0,v=T),S3(s,o,h,v)):[]}function D0(s,o,h){var v=s==null?0:s.length;if(!v)return-1;var T=h==null?0:xe(h);return T<0&&(T=xt(v+T,0)),co(s,ue(o,3),T)}function B0(s,o,h){var v=s==null?0:s.length;if(!v)return-1;var T=v-1;return h!==r&&(T=xe(h),T=h<0?xt(v+T,0):Nt(T,v-1)),co(s,ue(o,3),T,!0)}function U0(s){var o=s==null?0:s.length;return o?Rt(s,1):[]}function FL(s){var o=s==null?0:s.length;return o?Rt(s,H):[]}function NL(s,o){var h=s==null?0:s.length;return h?(o=o===r?1:xe(o),Rt(s,o)):[]}function LL(s){for(var o=-1,h=s==null?0:s.length,v={};++o<h;){var T=s[o];v[T[0]]=T[1]}return v}function $0(s){return s&&s.length?s[0]:r}function kL(s,o,h){var v=s==null?0:s.length;if(!v)return-1;var T=h==null?0:xe(h);return T<0&&(T=xt(v+T,0)),Li(s,o,T)}function DL(s){var o=s==null?0:s.length;return o?lr(s,0,-1):[]}var BL=Ee(function(s){var o=at(s,Vc);return o.length&&o[0]===s[0]?Nc(o):[]}),UL=Ee(function(s){var o=cr(s),h=at(s,Vc);return o===cr(h)?o=r:h.pop(),h.length&&h[0]===s[0]?Nc(h,ue(o,2)):[]}),$L=Ee(function(s){var o=cr(s),h=at(s,Vc);return o=typeof o=="function"?o:r,o&&h.pop(),h.length&&h[0]===s[0]?Nc(h,r,o):[]});function GL(s,o){return s==null?"":DN.call(s,o)}function cr(s){var o=s==null?0:s.length;return o?s[o-1]:r}function HL(s,o,h){var v=s==null?0:s.length;if(!v)return-1;var T=v;return h!==r&&(T=xe(h),T=T<0?xt(v+T,0):Nt(T,v-1)),o===o?bN(s,o,T):co(s,xm,T,!0)}function zL(s,o){return s&&s.length?Zm(s,xe(o)):r}var VL=Ee(G0);function G0(s,o){return s&&s.length&&o&&o.length?Bc(s,o):s}function jL(s,o,h){return s&&s.length&&o&&o.length?Bc(s,o,ue(h,2)):s}function XL(s,o,h){return s&&s.length&&o&&o.length?Bc(s,o,r,h):s}var WL=Yr(function(s,o){var h=s==null?0:s.length,v=Pc(s,o);return e0(s,at(o,function(T){return Kr(T,h)?+T:T}).sort(c0)),v});function qL(s,o){var h=[];if(!(s&&s.length))return h;var v=-1,T=[],A=s.length;for(o=ue(o,3);++v<A;){var C=s[v];o(C,v,s)&&(h.push(C),T.push(v))}return e0(s,T),h}function ih(s){return s==null?s:GN.call(s)}function YL(s,o,h){var v=s==null?0:s.length;return v?(h&&typeof h!="number"&&Ut(s,o,h)?(o=0,h=v):(o=o==null?0:xe(o),h=h===r?v:xe(h)),lr(s,o,h)):[]}function KL(s,o){return Mo(s,o)}function ZL(s,o,h){return Gc(s,o,ue(h,2))}function QL(s,o){var h=s==null?0:s.length;if(h){var v=Mo(s,o);if(v<h&&Er(s[v],o))return v}return-1}function JL(s,o){return Mo(s,o,!0)}function ek(s,o,h){return Gc(s,o,ue(h,2),!0)}function tk(s,o){var h=s==null?0:s.length;if(h){var v=Mo(s,o,!0)-1;if(Er(s[v],o))return v}return-1}function rk(s){return s&&s.length?r0(s):[]}function nk(s,o){return s&&s.length?r0(s,ue(o,2)):[]}function ik(s){var o=s==null?0:s.length;return o?lr(s,1,o):[]}function sk(s,o,h){return s&&s.length?(o=h||o===r?1:xe(o),lr(s,0,o<0?0:o)):[]}function ak(s,o,h){var v=s==null?0:s.length;return v?(o=h||o===r?1:xe(o),o=v-o,lr(s,o<0?0:o,v)):[]}function ok(s,o){return s&&s.length?Oo(s,ue(o,3),!1,!0):[]}function uk(s,o){return s&&s.length?Oo(s,ue(o,3)):[]}var lk=Ee(function(s){return vn(Rt(s,1,gt,!0))}),ck=Ee(function(s){var o=cr(s);return gt(o)&&(o=r),vn(Rt(s,1,gt,!0),ue(o,2))}),hk=Ee(function(s){var o=cr(s);return o=typeof o=="function"?o:r,vn(Rt(s,1,gt,!0),r,o)});function fk(s){return s&&s.length?vn(s):[]}function dk(s,o){return s&&s.length?vn(s,ue(o,2)):[]}function pk(s,o){return o=typeof o=="function"?o:r,s&&s.length?vn(s,r,o):[]}function sh(s){if(!(s&&s.length))return[];var o=0;return s=fn(s,function(h){if(gt(h))return o=xt(h.length,o),!0}),Tc(o,function(h){return at(s,yc(h))})}function H0(s,o){if(!(s&&s.length))return[];var h=sh(s);return o==null?h:at(h,function(v){return Yt(o,r,v)})}var gk=Ee(function(s,o){return gt(s)?Ns(s,o):[]}),mk=Ee(function(s){return zc(fn(s,gt))}),vk=Ee(function(s){var o=cr(s);return gt(o)&&(o=r),zc(fn(s,gt),ue(o,2))}),_k=Ee(function(s){var o=cr(s);return o=typeof o=="function"?o:r,zc(fn(s,gt),r,o)}),yk=Ee(sh);function xk(s,o){return a0(s||[],o||[],Fs)}function bk(s,o){return a0(s||[],o||[],Ds)}var Tk=Ee(function(s){var o=s.length,h=o>1?s[o-1]:r;return h=typeof h=="function"?(s.pop(),h):r,H0(s,h)});function z0(s){var o=S(s);return o.__chain__=!0,o}function wk(s,o){return o(s),s}function Go(s,o){return o(s)}var Sk=Yr(function(s){var o=s.length,h=o?s[0]:0,v=this.__wrapped__,T=function(A){return Pc(A,s)};return o>1||this.__actions__.length||!(v instanceof Fe)||!Kr(h)?this.thru(T):(v=v.slice(h,+h+(o?1:0)),v.__actions__.push({func:Go,args:[T],thisArg:r}),new or(v,this.__chain__).thru(function(A){return o&&!A.length&&A.push(r),A}))});function Ak(){return z0(this)}function Ek(){return new or(this.value(),this.__chain__)}function Ck(){this.__values__===r&&(this.__values__=nv(this.value()));var s=this.__index__>=this.__values__.length,o=s?r:this.__values__[this.__index__++];return{done:s,value:o}}function Ik(){return this}function Rk(s){for(var o,h=this;h instanceof Eo;){var v=k0(h);v.__index__=0,v.__values__=r,o?T.__wrapped__=v:o=v;var T=v;h=h.__wrapped__}return T.__wrapped__=s,o}function Pk(){var s=this.__wrapped__;if(s instanceof Fe){var o=s;return this.__actions__.length&&(o=new Fe(this)),o=o.reverse(),o.__actions__.push({func:Go,args:[ih],thisArg:r}),new or(o,this.__chain__)}return this.thru(ih)}function Mk(){return s0(this.__wrapped__,this.__actions__)}var Ok=Fo(function(s,o,h){Ke.call(s,h)?++s[h]:Wr(s,h,1)});function Fk(s,o,h){var v=ye(s)?_m:w3;return h&&Ut(s,o,h)&&(o=r),v(s,ue(o,3))}function Nk(s,o){var h=ye(s)?fn:Hm;return h(s,ue(o,3))}var Lk=m0(D0),kk=m0(B0);function Dk(s,o){return Rt(Ho(s,o),1)}function Bk(s,o){return Rt(Ho(s,o),H)}function Uk(s,o,h){return h=h===r?1:xe(h),Rt(Ho(s,o),h)}function V0(s,o){var h=ye(s)?sr:mn;return h(s,ue(o,3))}function j0(s,o){var h=ye(s)?iN:Gm;return h(s,ue(o,3))}var $k=Fo(function(s,o,h){Ke.call(s,h)?s[h].push(o):Wr(s,h,[o])});function Gk(s,o,h,v){s=zt(s)?s:Wi(s),h=h&&!v?xe(h):0;var T=s.length;return h<0&&(h=xt(T+h,0)),Wo(s)?h<=T&&s.indexOf(o,h)>-1:!!T&&Li(s,o,h)>-1}var Hk=Ee(function(s,o,h){var v=-1,T=typeof o=="function",A=zt(s)?k(s.length):[];return mn(s,function(C){A[++v]=T?Yt(o,C,h):Ls(C,o,h)}),A}),zk=Fo(function(s,o,h){Wr(s,h,o)});function Ho(s,o){var h=ye(s)?at:qm;return h(s,ue(o,3))}function Vk(s,o,h,v){return s==null?[]:(ye(o)||(o=o==null?[]:[o]),h=v?r:h,ye(h)||(h=h==null?[]:[h]),Qm(s,o,h))}var jk=Fo(function(s,o,h){s[h?0:1].push(o)},function(){return[[],[]]});function Xk(s,o,h){var v=ye(s)?vc:Tm,T=arguments.length<3;return v(s,ue(o,4),h,T,mn)}function Wk(s,o,h){var v=ye(s)?sN:Tm,T=arguments.length<3;return v(s,ue(o,4),h,T,Gm)}function qk(s,o){var h=ye(s)?fn:Hm;return h(s,jo(ue(o,3)))}function Yk(s){var o=ye(s)?Dm:G3;return o(s)}function Kk(s,o,h){(h?Ut(s,o,h):o===r)?o=1:o=xe(o);var v=ye(s)?_3:H3;return v(s,o)}function Zk(s){var o=ye(s)?y3:V3;return o(s)}function Qk(s){if(s==null)return 0;if(zt(s))return Wo(s)?Di(s):s.length;var o=Lt(s);return o==we||o==ft?s.size:kc(s).length}function Jk(s,o,h){var v=ye(s)?_c:j3;return h&&Ut(s,o,h)&&(o=r),v(s,ue(o,3))}var eD=Ee(function(s,o){if(s==null)return[];var h=o.length;return h>1&&Ut(s,o[0],o[1])?o=[]:h>2&&Ut(o[0],o[1],o[2])&&(o=[o[0]]),Qm(s,Rt(o,1),[])}),zo=NN||function(){return It.Date.now()};function tD(s,o){if(typeof o!="function")throw new ar(u);return s=xe(s),function(){if(--s<1)return o.apply(this,arguments)}}function X0(s,o,h){return o=h?r:o,o=s&&o==null?s.length:o,qr(s,N,r,r,r,r,o)}function W0(s,o){var h;if(typeof o!="function")throw new ar(u);return s=xe(s),function(){return--s>0&&(h=o.apply(this,arguments)),s<=1&&(o=r),h}}var ah=Ee(function(s,o,h){var v=b;if(h.length){var T=pn(h,ji(ah));v|=O}return qr(s,v,o,h,T)}),q0=Ee(function(s,o,h){var v=b|x;if(h.length){var T=pn(h,ji(q0));v|=O}return qr(o,v,s,h,T)});function Y0(s,o,h){o=h?r:o;var v=qr(s,w,r,r,r,r,r,o);return v.placeholder=Y0.placeholder,v}function K0(s,o,h){o=h?r:o;var v=qr(s,I,r,r,r,r,r,o);return v.placeholder=K0.placeholder,v}function Z0(s,o,h){var v,T,A,C,R,M,U=0,$=!1,z=!1,K=!0;if(typeof s!="function")throw new ar(u);o=hr(o)||0,ct(h)&&($=!!h.leading,z="maxWait"in h,A=z?xt(hr(h.maxWait)||0,o):A,K="trailing"in h?!!h.trailing:K);function re(mt){var Cr=v,Jr=T;return v=T=r,U=mt,C=s.apply(Jr,Cr),C}function le(mt){return U=mt,R=$s(Pe,o),$?re(mt):C}function Se(mt){var Cr=mt-M,Jr=mt-U,mv=o-Cr;return z?Nt(mv,A-Jr):mv}function ce(mt){var Cr=mt-M,Jr=mt-U;return M===r||Cr>=o||Cr<0||z&&Jr>=A}function Pe(){var mt=zo();if(ce(mt))return Le(mt);R=$s(Pe,Se(mt))}function Le(mt){return R=r,K&&v?re(mt):(v=T=r,C)}function Jt(){R!==r&&o0(R),U=0,v=M=T=R=r}function $t(){return R===r?C:Le(zo())}function er(){var mt=zo(),Cr=ce(mt);if(v=arguments,T=this,M=mt,Cr){if(R===r)return le(M);if(z)return o0(R),R=$s(Pe,o),re(M)}return R===r&&(R=$s(Pe,o)),C}return er.cancel=Jt,er.flush=$t,er}var rD=Ee(function(s,o){return $m(s,1,o)}),nD=Ee(function(s,o,h){return $m(s,hr(o)||0,h)});function iD(s){return qr(s,D)}function Vo(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new ar(u);var h=function(){var v=arguments,T=o?o.apply(this,v):v[0],A=h.cache;if(A.has(T))return A.get(T);var C=s.apply(this,v);return h.cache=A.set(T,C)||A,C};return h.cache=new(Vo.Cache||Xr),h}Vo.Cache=Xr;function jo(s){if(typeof s!="function")throw new ar(u);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function sD(s){return W0(2,s)}var aD=X3(function(s,o){o=o.length==1&&ye(o[0])?at(o[0],Kt(ue())):at(Rt(o,1),Kt(ue()));var h=o.length;return Ee(function(v){for(var T=-1,A=Nt(v.length,h);++T<A;)v[T]=o[T].call(this,v[T]);return Yt(s,this,v)})}),oh=Ee(function(s,o){var h=pn(o,ji(oh));return qr(s,O,r,o,h)}),Q0=Ee(function(s,o){var h=pn(o,ji(Q0));return qr(s,F,r,o,h)}),oD=Yr(function(s,o){return qr(s,L,r,r,r,o)});function uD(s,o){if(typeof s!="function")throw new ar(u);return o=o===r?o:xe(o),Ee(s,o)}function lD(s,o){if(typeof s!="function")throw new ar(u);return o=o==null?0:xt(xe(o),0),Ee(function(h){var v=h[o],T=yn(h,0,o);return v&&dn(T,v),Yt(s,this,T)})}function cD(s,o,h){var v=!0,T=!0;if(typeof s!="function")throw new ar(u);return ct(h)&&(v="leading"in h?!!h.leading:v,T="trailing"in h?!!h.trailing:T),Z0(s,o,{leading:v,maxWait:o,trailing:T})}function hD(s){return X0(s,1)}function fD(s,o){return oh(jc(o),s)}function dD(){if(!arguments.length)return[];var s=arguments[0];return ye(s)?s:[s]}function pD(s){return ur(s,m)}function gD(s,o){return o=typeof o=="function"?o:r,ur(s,m,o)}function mD(s){return ur(s,c|m)}function vD(s,o){return o=typeof o=="function"?o:r,ur(s,c|m,o)}function _D(s,o){return o==null||Um(s,o,St(o))}function Er(s,o){return s===o||s!==s&&o!==o}var yD=Do(Fc),xD=Do(function(s,o){return s>=o}),Zn=jm(function(){return arguments}())?jm:function(s){return dt(s)&&Ke.call(s,"callee")&&!Mm.call(s,"callee")},ye=k.isArray,bD=fm?Kt(fm):R3;function zt(s){return s!=null&&Xo(s.length)&&!Zr(s)}function gt(s){return dt(s)&&zt(s)}function TD(s){return s===!0||s===!1||dt(s)&&Bt(s)==ze}var xn=kN||_h,wD=dm?Kt(dm):P3;function SD(s){return dt(s)&&s.nodeType===1&&!Gs(s)}function AD(s){if(s==null)return!0;if(zt(s)&&(ye(s)||typeof s=="string"||typeof s.splice=="function"||xn(s)||Xi(s)||Zn(s)))return!s.length;var o=Lt(s);if(o==we||o==ft)return!s.size;if(Us(s))return!kc(s).length;for(var h in s)if(Ke.call(s,h))return!1;return!0}function ED(s,o){return ks(s,o)}function CD(s,o,h){h=typeof h=="function"?h:r;var v=h?h(s,o):r;return v===r?ks(s,o,r,h):!!v}function uh(s){if(!dt(s))return!1;var o=Bt(s);return o==Te||o==_e||typeof s.message=="string"&&typeof s.name=="string"&&!Gs(s)}function ID(s){return typeof s=="number"&&Fm(s)}function Zr(s){if(!ct(s))return!1;var o=Bt(s);return o==De||o==Oe||o==$e||o==Ft}function J0(s){return typeof s=="number"&&s==xe(s)}function Xo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Q}function ct(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function dt(s){return s!=null&&typeof s=="object"}var ev=pm?Kt(pm):O3;function RD(s,o){return s===o||Lc(s,o,Qc(o))}function PD(s,o,h){return h=typeof h=="function"?h:r,Lc(s,o,Qc(o),h)}function MD(s){return tv(s)&&s!=+s}function OD(s){if(gL(s))throw new ve(a);return Xm(s)}function FD(s){return s===null}function ND(s){return s==null}function tv(s){return typeof s=="number"||dt(s)&&Bt(s)==ge}function Gs(s){if(!dt(s)||Bt(s)!=oe)return!1;var o=yo(s);if(o===null)return!0;var h=Ke.call(o,"constructor")&&o.constructor;return typeof h=="function"&&h instanceof h&&go.call(h)==PN}var lh=gm?Kt(gm):F3;function LD(s){return J0(s)&&s>=-Q&&s<=Q}var rv=mm?Kt(mm):N3;function Wo(s){return typeof s=="string"||!ye(s)&&dt(s)&&Bt(s)==nr}function Qt(s){return typeof s=="symbol"||dt(s)&&Bt(s)==Mi}var Xi=vm?Kt(vm):L3;function kD(s){return s===r}function DD(s){return dt(s)&&Lt(s)==Hn}function BD(s){return dt(s)&&Bt(s)==wr}var UD=Do(Dc),$D=Do(function(s,o){return s<=o});function nv(s){if(!s)return[];if(zt(s))return Wo(s)?Sr(s):Ht(s);if(Is&&s[Is])return _N(s[Is]());var o=Lt(s),h=o==we?Sc:o==ft?ho:Wi;return h(s)}function Qr(s){if(!s)return s===0?s:0;if(s=hr(s),s===H||s===-H){var o=s<0?-1:1;return o*pe}return s===s?s:0}function xe(s){var o=Qr(s),h=o%1;return o===o?h?o-h:o:0}function iv(s){return s?Wn(xe(s),0,q):0}function hr(s){if(typeof s=="number")return s;if(Qt(s))return W;if(ct(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=ct(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=wm(s);var h=bF.test(s);return h||wF.test(s)?tN(s.slice(2),h?2:8):xF.test(s)?W:+s}function sv(s){return Dr(s,Vt(s))}function GD(s){return s?Wn(xe(s),-Q,Q):s===0?s:0}function We(s){return s==null?"":Zt(s)}var HD=zi(function(s,o){if(Us(o)||zt(o)){Dr(o,St(o),s);return}for(var h in o)Ke.call(o,h)&&Fs(s,h,o[h])}),av=zi(function(s,o){Dr(o,Vt(o),s)}),qo=zi(function(s,o,h,v){Dr(o,Vt(o),s,v)}),zD=zi(function(s,o,h,v){Dr(o,St(o),s,v)}),VD=Yr(Pc);function jD(s,o){var h=Hi(s);return o==null?h:Bm(h,o)}var XD=Ee(function(s,o){s=Je(s);var h=-1,v=o.length,T=v>2?o[2]:r;for(T&&Ut(o[0],o[1],T)&&(v=1);++h<v;)for(var A=o[h],C=Vt(A),R=-1,M=C.length;++R<M;){var U=C[R],$=s[U];($===r||Er($,Ui[U])&&!Ke.call(s,U))&&(s[U]=A[U])}return s}),WD=Ee(function(s){return s.push(r,w0),Yt(ov,r,s)});function qD(s,o){return ym(s,ue(o,3),kr)}function YD(s,o){return ym(s,ue(o,3),Oc)}function KD(s,o){return s==null?s:Mc(s,ue(o,3),Vt)}function ZD(s,o){return s==null?s:zm(s,ue(o,3),Vt)}function QD(s,o){return s&&kr(s,ue(o,3))}function JD(s,o){return s&&Oc(s,ue(o,3))}function eB(s){return s==null?[]:Ro(s,St(s))}function tB(s){return s==null?[]:Ro(s,Vt(s))}function ch(s,o,h){var v=s==null?r:qn(s,o);return v===r?h:v}function rB(s,o){return s!=null&&E0(s,o,A3)}function hh(s,o){return s!=null&&E0(s,o,E3)}var nB=_0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=mo.call(o)),s[o]=h},dh(jt)),iB=_0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=mo.call(o)),Ke.call(s,o)?s[o].push(h):s[o]=[h]},ue),sB=Ee(Ls);function St(s){return zt(s)?km(s):kc(s)}function Vt(s){return zt(s)?km(s,!0):k3(s)}function aB(s,o){var h={};return o=ue(o,3),kr(s,function(v,T,A){Wr(h,o(v,T,A),v)}),h}function oB(s,o){var h={};return o=ue(o,3),kr(s,function(v,T,A){Wr(h,T,o(v,T,A))}),h}var uB=zi(function(s,o,h){Po(s,o,h)}),ov=zi(function(s,o,h,v){Po(s,o,h,v)}),lB=Yr(function(s,o){var h={};if(s==null)return h;var v=!1;o=at(o,function(A){return A=_n(A,s),v||(v=A.length>1),A}),Dr(s,Kc(s),h),v&&(h=ur(h,c|d|m,nL));for(var T=o.length;T--;)Hc(h,o[T]);return h});function cB(s,o){return uv(s,jo(ue(o)))}var hB=Yr(function(s,o){return s==null?{}:B3(s,o)});function uv(s,o){if(s==null)return{};var h=at(Kc(s),function(v){return[v]});return o=ue(o),Jm(s,h,function(v,T){return o(v,T[0])})}function fB(s,o,h){o=_n(o,s);var v=-1,T=o.length;for(T||(T=1,s=r);++v<T;){var A=s==null?r:s[Br(o[v])];A===r&&(v=T,A=h),s=Zr(A)?A.call(s):A}return s}function dB(s,o,h){return s==null?s:Ds(s,o,h)}function pB(s,o,h,v){return v=typeof v=="function"?v:r,s==null?s:Ds(s,o,h,v)}var lv=b0(St),cv=b0(Vt);function gB(s,o,h){var v=ye(s),T=v||xn(s)||Xi(s);if(o=ue(o,4),h==null){var A=s&&s.constructor;T?h=v?new A:[]:ct(s)?h=Zr(A)?Hi(yo(s)):{}:h={}}return(T?sr:kr)(s,function(C,R,M){return o(h,C,R,M)}),h}function mB(s,o){return s==null?!0:Hc(s,o)}function vB(s,o,h){return s==null?s:i0(s,o,jc(h))}function _B(s,o,h,v){return v=typeof v=="function"?v:r,s==null?s:i0(s,o,jc(h),v)}function Wi(s){return s==null?[]:wc(s,St(s))}function yB(s){return s==null?[]:wc(s,Vt(s))}function xB(s,o,h){return h===r&&(h=o,o=r),h!==r&&(h=hr(h),h=h===h?h:0),o!==r&&(o=hr(o),o=o===o?o:0),Wn(hr(s),o,h)}function bB(s,o,h){return o=Qr(o),h===r?(h=o,o=0):h=Qr(h),s=hr(s),C3(s,o,h)}function TB(s,o,h){if(h&&typeof h!="boolean"&&Ut(s,o,h)&&(o=h=r),h===r&&(typeof o=="boolean"?(h=o,o=r):typeof s=="boolean"&&(h=s,s=r)),s===r&&o===r?(s=0,o=1):(s=Qr(s),o===r?(o=s,s=0):o=Qr(o)),s>o){var v=s;s=o,o=v}if(h||s%1||o%1){var T=Nm();return Nt(s+T*(o-s+eN("1e-"+((T+"").length-1))),o)}return Uc(s,o)}var wB=Vi(function(s,o,h){return o=o.toLowerCase(),s+(h?hv(o):o)});function hv(s){return fh(We(s).toLowerCase())}function fv(s){return s=We(s),s&&s.replace(AF,dN).replace(VF,"")}function SB(s,o,h){s=We(s),o=Zt(o);var v=s.length;h=h===r?v:Wn(xe(h),0,v);var T=h;return h-=o.length,h>=0&&s.slice(h,T)==o}function AB(s){return s=We(s),s&&sF.test(s)?s.replace(zg,pN):s}function EB(s){return s=We(s),s&&hF.test(s)?s.replace(oc,"\\$&"):s}var CB=Vi(function(s,o,h){return s+(h?"-":"")+o.toLowerCase()}),IB=Vi(function(s,o,h){return s+(h?" ":"")+o.toLowerCase()}),RB=g0("toLowerCase");function PB(s,o,h){s=We(s),o=xe(o);var v=o?Di(s):0;if(!o||v>=o)return s;var T=(o-v)/2;return ko(wo(T),h)+s+ko(To(T),h)}function MB(s,o,h){s=We(s),o=xe(o);var v=o?Di(s):0;return o&&v<o?s+ko(o-v,h):s}function OB(s,o,h){s=We(s),o=xe(o);var v=o?Di(s):0;return o&&v<o?ko(o-v,h)+s:s}function FB(s,o,h){return h||o==null?o=0:o&&(o=+o),$N(We(s).replace(uc,""),o||0)}function NB(s,o,h){return(h?Ut(s,o,h):o===r)?o=1:o=xe(o),$c(We(s),o)}function LB(){var s=arguments,o=We(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var kB=Vi(function(s,o,h){return s+(h?"_":"")+o.toLowerCase()});function DB(s,o,h){return h&&typeof h!="number"&&Ut(s,o,h)&&(o=h=r),h=h===r?q:h>>>0,h?(s=We(s),s&&(typeof o=="string"||o!=null&&!lh(o))&&(o=Zt(o),!o&&ki(s))?yn(Sr(s),0,h):s.split(o,h)):[]}var BB=Vi(function(s,o,h){return s+(h?" ":"")+fh(o)});function UB(s,o,h){return s=We(s),h=h==null?0:Wn(xe(h),0,s.length),o=Zt(o),s.slice(h,h+o.length)==o}function $B(s,o,h){var v=S.templateSettings;h&&Ut(s,o,h)&&(o=r),s=We(s),o=qo({},o,v,T0);var T=qo({},o.imports,v.imports,T0),A=St(T),C=wc(T,A),R,M,U=0,$=o.interpolate||ao,z="__p += '",K=Ac((o.escape||ao).source+"|"+$.source+"|"+($===Vg?yF:ao).source+"|"+(o.evaluate||ao).source+"|$","g"),re="//# sourceURL="+(Ke.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++YF+"]")+`
1992
- `;s.replace(K,function(ce,Pe,Le,Jt,$t,er){return Le||(Le=Jt),z+=s.slice(U,er).replace(EF,gN),Pe&&(R=!0,z+=`' +
1993
- __e(`+Pe+`) +
1994
- '`),$t&&(M=!0,z+=`';
1995
- `+$t+`;
1996
- __p += '`),Le&&(z+=`' +
1997
- ((__t = (`+Le+`)) == null ? '' : __t) +
1975
+ `)}function aL(s){return ye(s)||Kn(s)||!!(Om&&s&&s[Om])}function Kr(s,o){var f=typeof s;return o=o??J,!!o&&(f=="number"||f!="symbol"&&_F.test(s))&&s>-1&&s%1==0&&s<o}function Bt(s,o,f){if(!ct(f))return!1;var v=typeof o;return(v=="number"?Ht(f)&&Kr(o,f.length):v=="string"&&o in f)?Er(f[o],s):!1}function Qc(s,o){if(ye(s))return!1;var f=typeof s;return f=="number"||f=="symbol"||f=="boolean"||s==null||Qt(s)?!0:nF.test(s)||!rF.test(s)||o!=null&&s in Qe(o)}function oL(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function Jc(s){var o=Do(s),f=S[o];if(typeof f!="function"||!(o in Me.prototype))return!1;if(s===f)return!0;var v=Yc(f);return!!v&&s===v[0]}function uL(s){return!!Im&&Im in s}var lL=po?Zr:mh;function Us(s){var o=s&&s.constructor,f=typeof o=="function"&&o.prototype||Ui;return s===f}function I0(s){return s===s&&!ct(s)}function R0(s,o){return function(f){return f==null?!1:f[s]===o&&(o!==r||s in Qe(f))}}function cL(s){var o=Vo(s,function(v){return f.size===p&&f.clear(),v}),f=o.cache;return o}function hL(s,o){var f=s[1],v=o[1],T=f|v,A=T<(b|x|N),C=v==N&&f==w||v==N&&f==L&&s[7].length<=o[8]||v==(N|L)&&o[7].length<=o[8]&&f==w;if(!(A||C))return s;v&b&&(s[2]=o[2],T|=f&b?0:E);var R=o[3];if(R){var M=s[3];s[3]=M?h0(M,R,o[4]):R,s[4]=M?dn(s[3],g):o[4]}return R=o[5],R&&(M=s[5],s[5]=M?f0(M,R,o[6]):R,s[6]=M?dn(s[5],g):o[6]),R=o[7],R&&(s[7]=R),v&N&&(s[8]=s[8]==null?o[8]:Ot(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=T,s}function fL(s){var o=[];if(s!=null)for(var f in Qe(s))o.push(f);return o}function dL(s){return mo.call(s)}function P0(s,o,f){return o=xt(o===r?s.length-1:o,0),function(){for(var v=arguments,T=-1,A=xt(v.length-o,0),C=k(A);++T<A;)C[T]=v[o+T];T=-1;for(var R=k(o+1);++T<o;)R[T]=v[T];return R[o]=f(C),Yt(s,this,R)}}function M0(s,o){return o.length<2?s:Wn(s,lr(o,0,-1))}function pL(s,o){for(var f=s.length,v=Ot(o.length,f),T=Gt(s);v--;){var A=o[v];s[v]=Kr(A,f)?T[A]:r}return s}function eh(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var O0=N0(t0),$s=RN||function(s,o){return Ct.setTimeout(s,o)},th=N0(B3);function F0(s,o,f){var v=o+"";return th(s,sL(v,gL(rL(v),f)))}function N0(s){var o=0,f=0;return function(){var v=FN(),T=j-(v-f);if(f=v,T>0){if(++o>=ae)return arguments[0]}else o=0;return s.apply(r,arguments)}}function $o(s,o){var f=-1,v=s.length,T=v-1;for(o=o===r?v:o;++f<o;){var A=Bc(f,T),C=s[A];s[A]=s[f],s[f]=C}return s.length=o,s}var L0=cL(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(iF,function(f,v,T,A){o.push(T?A.replace(fF,"$1"):v||f)}),o});function Dr(s){if(typeof s=="string"||Qt(s))return s;var o=s+"";return o=="0"&&1/s==-H?"-0":o}function Yn(s){if(s!=null){try{return go.call(s)}catch{}try{return s+""}catch{}}return""}function gL(s,o){return sr(me,function(f){var v="_."+f[0];o&f[1]&&!lo(s,v)&&s.push(v)}),s.sort()}function k0(s){if(s instanceof Me)return s.clone();var o=new or(s.__wrapped__,s.__chain__);return o.__actions__=Gt(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function mL(s,o,f){(f?Bt(s,o,f):o===r)?o=1:o=xt(xe(o),0);var v=s==null?0:s.length;if(!v||o<1)return[];for(var T=0,A=0,C=k(To(v/o));T<v;)C[A++]=lr(s,T,T+=o);return C}function vL(s){for(var o=-1,f=s==null?0:s.length,v=0,T=[];++o<f;){var A=s[o];A&&(T[v++]=A)}return T}function _L(){var s=arguments.length;if(!s)return[];for(var o=k(s-1),f=arguments[0],v=s;v--;)o[v-1]=arguments[v];return fn(ye(f)?Gt(f):[f],It(o,1))}var yL=Se(function(s,o){return gt(s)?Ns(s,It(o,1,gt,!0)):[]}),xL=Se(function(s,o){var f=cr(o);return gt(f)&&(f=r),gt(s)?Ns(s,It(o,1,gt,!0),oe(f,2)):[]}),bL=Se(function(s,o){var f=cr(o);return gt(f)&&(f=r),gt(s)?Ns(s,It(o,1,gt,!0),r,f):[]});function TL(s,o,f){var v=s==null?0:s.length;return v?(o=f||o===r?1:xe(o),lr(s,o<0?0:o,v)):[]}function wL(s,o,f){var v=s==null?0:s.length;return v?(o=f||o===r?1:xe(o),o=v-o,lr(s,0,o<0?0:o)):[]}function SL(s,o){return s&&s.length?Oo(s,oe(o,3),!0,!0):[]}function AL(s,o){return s&&s.length?Oo(s,oe(o,3),!0):[]}function EL(s,o,f,v){var T=s==null?0:s.length;return T?(f&&typeof f!="number"&&Bt(s,o,f)&&(f=0,v=T),_3(s,o,f,v)):[]}function B0(s,o,f){var v=s==null?0:s.length;if(!v)return-1;var T=f==null?0:xe(f);return T<0&&(T=xt(v+T,0)),co(s,oe(o,3),T)}function D0(s,o,f){var v=s==null?0:s.length;if(!v)return-1;var T=v-1;return f!==r&&(T=xe(f),T=f<0?xt(v+T,0):Ot(T,v-1)),co(s,oe(o,3),T,!0)}function U0(s){var o=s==null?0:s.length;return o?It(s,1):[]}function CL(s){var o=s==null?0:s.length;return o?It(s,H):[]}function IL(s,o){var f=s==null?0:s.length;return f?(o=o===r?1:xe(o),It(s,o)):[]}function RL(s){for(var o=-1,f=s==null?0:s.length,v={};++o<f;){var T=s[o];v[T[0]]=T[1]}return v}function $0(s){return s&&s.length?s[0]:r}function PL(s,o,f){var v=s==null?0:s.length;if(!v)return-1;var T=f==null?0:xe(f);return T<0&&(T=xt(v+T,0)),Li(s,o,T)}function ML(s){var o=s==null?0:s.length;return o?lr(s,0,-1):[]}var OL=Se(function(s){var o=at(s,Hc);return o.length&&o[0]===s[0]?Oc(o):[]}),FL=Se(function(s){var o=cr(s),f=at(s,Hc);return o===cr(f)?o=r:f.pop(),f.length&&f[0]===s[0]?Oc(f,oe(o,2)):[]}),NL=Se(function(s){var o=cr(s),f=at(s,Hc);return o=typeof o=="function"?o:r,o&&f.pop(),f.length&&f[0]===s[0]?Oc(f,r,o):[]});function LL(s,o){return s==null?"":MN.call(s,o)}function cr(s){var o=s==null?0:s.length;return o?s[o-1]:r}function kL(s,o,f){var v=s==null?0:s.length;if(!v)return-1;var T=v;return f!==r&&(T=xe(f),T=T<0?xt(v+T,0):Ot(T,v-1)),o===o?gN(s,o,T):co(s,xm,T,!0)}function BL(s,o){return s&&s.length?Zm(s,xe(o)):r}var DL=Se(G0);function G0(s,o){return s&&s.length&&o&&o.length?kc(s,o):s}function UL(s,o,f){return s&&s.length&&o&&o.length?kc(s,o,oe(f,2)):s}function $L(s,o,f){return s&&s.length&&o&&o.length?kc(s,o,r,f):s}var GL=Yr(function(s,o){var f=s==null?0:s.length,v=Ic(s,o);return e0(s,at(o,function(T){return Kr(T,f)?+T:T}).sort(c0)),v});function HL(s,o){var f=[];if(!(s&&s.length))return f;var v=-1,T=[],A=s.length;for(o=oe(o,3);++v<A;){var C=s[v];o(C,v,s)&&(f.push(C),T.push(v))}return e0(s,T),f}function rh(s){return s==null?s:LN.call(s)}function zL(s,o,f){var v=s==null?0:s.length;return v?(f&&typeof f!="number"&&Bt(s,o,f)?(o=0,f=v):(o=o==null?0:xe(o),f=f===r?v:xe(f)),lr(s,o,f)):[]}function VL(s,o){return Mo(s,o)}function jL(s,o,f){return Uc(s,o,oe(f,2))}function XL(s,o){var f=s==null?0:s.length;if(f){var v=Mo(s,o);if(v<f&&Er(s[v],o))return v}return-1}function WL(s,o){return Mo(s,o,!0)}function qL(s,o,f){return Uc(s,o,oe(f,2),!0)}function YL(s,o){var f=s==null?0:s.length;if(f){var v=Mo(s,o,!0)-1;if(Er(s[v],o))return v}return-1}function KL(s){return s&&s.length?r0(s):[]}function ZL(s,o){return s&&s.length?r0(s,oe(o,2)):[]}function QL(s){var o=s==null?0:s.length;return o?lr(s,1,o):[]}function JL(s,o,f){return s&&s.length?(o=f||o===r?1:xe(o),lr(s,0,o<0?0:o)):[]}function ek(s,o,f){var v=s==null?0:s.length;return v?(o=f||o===r?1:xe(o),o=v-o,lr(s,o<0?0:o,v)):[]}function tk(s,o){return s&&s.length?Oo(s,oe(o,3),!1,!0):[]}function rk(s,o){return s&&s.length?Oo(s,oe(o,3)):[]}var nk=Se(function(s){return mn(It(s,1,gt,!0))}),ik=Se(function(s){var o=cr(s);return gt(o)&&(o=r),mn(It(s,1,gt,!0),oe(o,2))}),sk=Se(function(s){var o=cr(s);return o=typeof o=="function"?o:r,mn(It(s,1,gt,!0),r,o)});function ak(s){return s&&s.length?mn(s):[]}function ok(s,o){return s&&s.length?mn(s,oe(o,2)):[]}function uk(s,o){return o=typeof o=="function"?o:r,s&&s.length?mn(s,r,o):[]}function nh(s){if(!(s&&s.length))return[];var o=0;return s=hn(s,function(f){if(gt(f))return o=xt(f.length,o),!0}),xc(o,function(f){return at(s,vc(f))})}function H0(s,o){if(!(s&&s.length))return[];var f=nh(s);return o==null?f:at(f,function(v){return Yt(o,r,v)})}var lk=Se(function(s,o){return gt(s)?Ns(s,o):[]}),ck=Se(function(s){return Gc(hn(s,gt))}),hk=Se(function(s){var o=cr(s);return gt(o)&&(o=r),Gc(hn(s,gt),oe(o,2))}),fk=Se(function(s){var o=cr(s);return o=typeof o=="function"?o:r,Gc(hn(s,gt),r,o)}),dk=Se(nh);function pk(s,o){return a0(s||[],o||[],Fs)}function gk(s,o){return a0(s||[],o||[],Bs)}var mk=Se(function(s){var o=s.length,f=o>1?s[o-1]:r;return f=typeof f=="function"?(s.pop(),f):r,H0(s,f)});function z0(s){var o=S(s);return o.__chain__=!0,o}function vk(s,o){return o(s),s}function Go(s,o){return o(s)}var _k=Yr(function(s){var o=s.length,f=o?s[0]:0,v=this.__wrapped__,T=function(A){return Ic(A,s)};return o>1||this.__actions__.length||!(v instanceof Me)||!Kr(f)?this.thru(T):(v=v.slice(f,+f+(o?1:0)),v.__actions__.push({func:Go,args:[T],thisArg:r}),new or(v,this.__chain__).thru(function(A){return o&&!A.length&&A.push(r),A}))});function yk(){return z0(this)}function xk(){return new or(this.value(),this.__chain__)}function bk(){this.__values__===r&&(this.__values__=nv(this.value()));var s=this.__index__>=this.__values__.length,o=s?r:this.__values__[this.__index__++];return{done:s,value:o}}function Tk(){return this}function wk(s){for(var o,f=this;f instanceof Eo;){var v=k0(f);v.__index__=0,v.__values__=r,o?T.__wrapped__=v:o=v;var T=v;f=f.__wrapped__}return T.__wrapped__=s,o}function Sk(){var s=this.__wrapped__;if(s instanceof Me){var o=s;return this.__actions__.length&&(o=new Me(this)),o=o.reverse(),o.__actions__.push({func:Go,args:[rh],thisArg:r}),new or(o,this.__chain__)}return this.thru(rh)}function Ak(){return s0(this.__wrapped__,this.__actions__)}var Ek=Fo(function(s,o,f){qe.call(s,f)?++s[f]:Wr(s,f,1)});function Ck(s,o,f){var v=ye(s)?_m:v3;return f&&Bt(s,o,f)&&(o=r),v(s,oe(o,3))}function Ik(s,o){var f=ye(s)?hn:Hm;return f(s,oe(o,3))}var Rk=m0(B0),Pk=m0(D0);function Mk(s,o){return It(Ho(s,o),1)}function Ok(s,o){return It(Ho(s,o),H)}function Fk(s,o,f){return f=f===r?1:xe(f),It(Ho(s,o),f)}function V0(s,o){var f=ye(s)?sr:gn;return f(s,oe(o,3))}function j0(s,o){var f=ye(s)?QF:Gm;return f(s,oe(o,3))}var Nk=Fo(function(s,o,f){qe.call(s,f)?s[f].push(o):Wr(s,f,[o])});function Lk(s,o,f,v){s=Ht(s)?s:Wi(s),f=f&&!v?xe(f):0;var T=s.length;return f<0&&(f=xt(T+f,0)),Wo(s)?f<=T&&s.indexOf(o,f)>-1:!!T&&Li(s,o,f)>-1}var kk=Se(function(s,o,f){var v=-1,T=typeof o=="function",A=Ht(s)?k(s.length):[];return gn(s,function(C){A[++v]=T?Yt(o,C,f):Ls(C,o,f)}),A}),Bk=Fo(function(s,o,f){Wr(s,f,o)});function Ho(s,o){var f=ye(s)?at:qm;return f(s,oe(o,3))}function Dk(s,o,f,v){return s==null?[]:(ye(o)||(o=o==null?[]:[o]),f=v?r:f,ye(f)||(f=f==null?[]:[f]),Qm(s,o,f))}var Uk=Fo(function(s,o,f){s[f?0:1].push(o)},function(){return[[],[]]});function $k(s,o,f){var v=ye(s)?gc:Tm,T=arguments.length<3;return v(s,oe(o,4),f,T,gn)}function Gk(s,o,f){var v=ye(s)?JF:Tm,T=arguments.length<3;return v(s,oe(o,4),f,T,Gm)}function Hk(s,o){var f=ye(s)?hn:Hm;return f(s,jo(oe(o,3)))}function zk(s){var o=ye(s)?Bm:L3;return o(s)}function Vk(s,o,f){(f?Bt(s,o,f):o===r)?o=1:o=xe(o);var v=ye(s)?f3:k3;return v(s,o)}function jk(s){var o=ye(s)?d3:D3;return o(s)}function Xk(s){if(s==null)return 0;if(Ht(s))return Wo(s)?Bi(s):s.length;var o=Ft(s);return o==Ae||o==ft?s.size:Nc(s).length}function Wk(s,o,f){var v=ye(s)?mc:U3;return f&&Bt(s,o,f)&&(o=r),v(s,oe(o,3))}var qk=Se(function(s,o){if(s==null)return[];var f=o.length;return f>1&&Bt(s,o[0],o[1])?o=[]:f>2&&Bt(o[0],o[1],o[2])&&(o=[o[0]]),Qm(s,It(o,1),[])}),zo=IN||function(){return Ct.Date.now()};function Yk(s,o){if(typeof o!="function")throw new ar(u);return s=xe(s),function(){if(--s<1)return o.apply(this,arguments)}}function X0(s,o,f){return o=f?r:o,o=s&&o==null?s.length:o,qr(s,N,r,r,r,r,o)}function W0(s,o){var f;if(typeof o!="function")throw new ar(u);return s=xe(s),function(){return--s>0&&(f=o.apply(this,arguments)),s<=1&&(o=r),f}}var ih=Se(function(s,o,f){var v=b;if(f.length){var T=dn(f,ji(ih));v|=O}return qr(s,v,o,f,T)}),q0=Se(function(s,o,f){var v=b|x;if(f.length){var T=dn(f,ji(q0));v|=O}return qr(o,v,s,f,T)});function Y0(s,o,f){o=f?r:o;var v=qr(s,w,r,r,r,r,r,o);return v.placeholder=Y0.placeholder,v}function K0(s,o,f){o=f?r:o;var v=qr(s,I,r,r,r,r,r,o);return v.placeholder=K0.placeholder,v}function Z0(s,o,f){var v,T,A,C,R,M,U=0,$=!1,z=!1,K=!0;if(typeof s!="function")throw new ar(u);o=hr(o)||0,ct(f)&&($=!!f.leading,z="maxWait"in f,A=z?xt(hr(f.maxWait)||0,o):A,K="trailing"in f?!!f.trailing:K);function te(mt){var Cr=v,Jr=T;return v=T=r,U=mt,C=s.apply(Jr,Cr),C}function le(mt){return U=mt,R=$s(Ie,o),$?te(mt):C}function Te(mt){var Cr=mt-M,Jr=mt-U,mv=o-Cr;return z?Ot(mv,A-Jr):mv}function ce(mt){var Cr=mt-M,Jr=mt-U;return M===r||Cr>=o||Cr<0||z&&Jr>=A}function Ie(){var mt=zo();if(ce(mt))return Ne(mt);R=$s(Ie,Te(mt))}function Ne(mt){return R=r,K&&v?te(mt):(v=T=r,C)}function Jt(){R!==r&&o0(R),U=0,v=M=T=R=r}function Dt(){return R===r?C:Ne(zo())}function er(){var mt=zo(),Cr=ce(mt);if(v=arguments,T=this,M=mt,Cr){if(R===r)return le(M);if(z)return o0(R),R=$s(Ie,o),te(M)}return R===r&&(R=$s(Ie,o)),C}return er.cancel=Jt,er.flush=Dt,er}var Kk=Se(function(s,o){return $m(s,1,o)}),Zk=Se(function(s,o,f){return $m(s,hr(o)||0,f)});function Qk(s){return qr(s,B)}function Vo(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new ar(u);var f=function(){var v=arguments,T=o?o.apply(this,v):v[0],A=f.cache;if(A.has(T))return A.get(T);var C=s.apply(this,v);return f.cache=A.set(T,C)||A,C};return f.cache=new(Vo.Cache||Xr),f}Vo.Cache=Xr;function jo(s){if(typeof s!="function")throw new ar(u);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function Jk(s){return W0(2,s)}var eB=$3(function(s,o){o=o.length==1&&ye(o[0])?at(o[0],Kt(oe())):at(It(o,1),Kt(oe()));var f=o.length;return Se(function(v){for(var T=-1,A=Ot(v.length,f);++T<A;)v[T]=o[T].call(this,v[T]);return Yt(s,this,v)})}),sh=Se(function(s,o){var f=dn(o,ji(sh));return qr(s,O,r,o,f)}),Q0=Se(function(s,o){var f=dn(o,ji(Q0));return qr(s,F,r,o,f)}),tB=Yr(function(s,o){return qr(s,L,r,r,r,o)});function rB(s,o){if(typeof s!="function")throw new ar(u);return o=o===r?o:xe(o),Se(s,o)}function nB(s,o){if(typeof s!="function")throw new ar(u);return o=o==null?0:xt(xe(o),0),Se(function(f){var v=f[o],T=_n(f,0,o);return v&&fn(T,v),Yt(s,this,T)})}function iB(s,o,f){var v=!0,T=!0;if(typeof s!="function")throw new ar(u);return ct(f)&&(v="leading"in f?!!f.leading:v,T="trailing"in f?!!f.trailing:T),Z0(s,o,{leading:v,maxWait:o,trailing:T})}function sB(s){return X0(s,1)}function aB(s,o){return sh(zc(o),s)}function oB(){if(!arguments.length)return[];var s=arguments[0];return ye(s)?s:[s]}function uB(s){return ur(s,m)}function lB(s,o){return o=typeof o=="function"?o:r,ur(s,m,o)}function cB(s){return ur(s,c|m)}function hB(s,o){return o=typeof o=="function"?o:r,ur(s,c|m,o)}function fB(s,o){return o==null||Um(s,o,St(o))}function Er(s,o){return s===o||s!==s&&o!==o}var dB=Bo(Mc),pB=Bo(function(s,o){return s>=o}),Kn=jm(function(){return arguments}())?jm:function(s){return dt(s)&&qe.call(s,"callee")&&!Mm.call(s,"callee")},ye=k.isArray,gB=fm?Kt(fm):w3;function Ht(s){return s!=null&&Xo(s.length)&&!Zr(s)}function gt(s){return dt(s)&&Ht(s)}function mB(s){return s===!0||s===!1||dt(s)&&kt(s)==je}var yn=PN||mh,vB=dm?Kt(dm):S3;function _B(s){return dt(s)&&s.nodeType===1&&!Gs(s)}function yB(s){if(s==null)return!0;if(Ht(s)&&(ye(s)||typeof s=="string"||typeof s.splice=="function"||yn(s)||Xi(s)||Kn(s)))return!s.length;var o=Ft(s);if(o==Ae||o==ft)return!s.size;if(Us(s))return!Nc(s).length;for(var f in s)if(qe.call(s,f))return!1;return!0}function xB(s,o){return ks(s,o)}function bB(s,o,f){f=typeof f=="function"?f:r;var v=f?f(s,o):r;return v===r?ks(s,o,r,f):!!v}function ah(s){if(!dt(s))return!1;var o=kt(s);return o==Ce||o==be||typeof s.message=="string"&&typeof s.name=="string"&&!Gs(s)}function TB(s){return typeof s=="number"&&Fm(s)}function Zr(s){if(!ct(s))return!1;var o=kt(s);return o==Ge||o==et||o==$e||o==qt}function J0(s){return typeof s=="number"&&s==xe(s)}function Xo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=J}function ct(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function dt(s){return s!=null&&typeof s=="object"}var ev=pm?Kt(pm):E3;function wB(s,o){return s===o||Fc(s,o,Kc(o))}function SB(s,o,f){return f=typeof f=="function"?f:r,Fc(s,o,Kc(o),f)}function AB(s){return tv(s)&&s!=+s}function EB(s){if(lL(s))throw new ve(a);return Xm(s)}function CB(s){return s===null}function IB(s){return s==null}function tv(s){return typeof s=="number"||dt(s)&&kt(s)==_e}function Gs(s){if(!dt(s)||kt(s)!=fe)return!1;var o=yo(s);if(o===null)return!0;var f=qe.call(o,"constructor")&&o.constructor;return typeof f=="function"&&f instanceof f&&go.call(f)==SN}var oh=gm?Kt(gm):C3;function RB(s){return J0(s)&&s>=-J&&s<=J}var rv=mm?Kt(mm):I3;function Wo(s){return typeof s=="string"||!ye(s)&&dt(s)&&kt(s)==nr}function Qt(s){return typeof s=="symbol"||dt(s)&&kt(s)==Mi}var Xi=vm?Kt(vm):R3;function PB(s){return s===r}function MB(s){return dt(s)&&Ft(s)==Gn}function OB(s){return dt(s)&&kt(s)==wr}var FB=Bo(Lc),NB=Bo(function(s,o){return s<=o});function nv(s){if(!s)return[];if(Ht(s))return Wo(s)?Sr(s):Gt(s);if(Is&&s[Is])return fN(s[Is]());var o=Ft(s),f=o==Ae?Tc:o==ft?ho:Wi;return f(s)}function Qr(s){if(!s)return s===0?s:0;if(s=hr(s),s===H||s===-H){var o=s<0?-1:1;return o*ge}return s===s?s:0}function xe(s){var o=Qr(s),f=o%1;return o===o?f?o-f:o:0}function iv(s){return s?Xn(xe(s),0,q):0}function hr(s){if(typeof s=="number")return s;if(Qt(s))return X;if(ct(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=ct(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=wm(s);var f=gF.test(s);return f||vF.test(s)?YF(s.slice(2),f?2:8):pF.test(s)?X:+s}function sv(s){return Br(s,zt(s))}function LB(s){return s?Xn(xe(s),-J,J):s===0?s:0}function Xe(s){return s==null?"":Zt(s)}var kB=zi(function(s,o){if(Us(o)||Ht(o)){Br(o,St(o),s);return}for(var f in o)qe.call(o,f)&&Fs(s,f,o[f])}),av=zi(function(s,o){Br(o,zt(o),s)}),qo=zi(function(s,o,f,v){Br(o,zt(o),s,v)}),BB=zi(function(s,o,f,v){Br(o,St(o),s,v)}),DB=Yr(Ic);function UB(s,o){var f=Hi(s);return o==null?f:Dm(f,o)}var $B=Se(function(s,o){s=Qe(s);var f=-1,v=o.length,T=v>2?o[2]:r;for(T&&Bt(o[0],o[1],T)&&(v=1);++f<v;)for(var A=o[f],C=zt(A),R=-1,M=C.length;++R<M;){var U=C[R],$=s[U];($===r||Er($,Ui[U])&&!qe.call(s,U))&&(s[U]=A[U])}return s}),GB=Se(function(s){return s.push(r,w0),Yt(ov,r,s)});function HB(s,o){return ym(s,oe(o,3),kr)}function zB(s,o){return ym(s,oe(o,3),Pc)}function VB(s,o){return s==null?s:Rc(s,oe(o,3),zt)}function jB(s,o){return s==null?s:zm(s,oe(o,3),zt)}function XB(s,o){return s&&kr(s,oe(o,3))}function WB(s,o){return s&&Pc(s,oe(o,3))}function qB(s){return s==null?[]:Ro(s,St(s))}function YB(s){return s==null?[]:Ro(s,zt(s))}function uh(s,o,f){var v=s==null?r:Wn(s,o);return v===r?f:v}function KB(s,o){return s!=null&&E0(s,o,y3)}function lh(s,o){return s!=null&&E0(s,o,x3)}var ZB=_0(function(s,o,f){o!=null&&typeof o.toString!="function"&&(o=mo.call(o)),s[o]=f},hh(Vt)),QB=_0(function(s,o,f){o!=null&&typeof o.toString!="function"&&(o=mo.call(o)),qe.call(s,o)?s[o].push(f):s[o]=[f]},oe),JB=Se(Ls);function St(s){return Ht(s)?km(s):Nc(s)}function zt(s){return Ht(s)?km(s,!0):P3(s)}function eD(s,o){var f={};return o=oe(o,3),kr(s,function(v,T,A){Wr(f,o(v,T,A),v)}),f}function tD(s,o){var f={};return o=oe(o,3),kr(s,function(v,T,A){Wr(f,T,o(v,T,A))}),f}var rD=zi(function(s,o,f){Po(s,o,f)}),ov=zi(function(s,o,f,v){Po(s,o,f,v)}),nD=Yr(function(s,o){var f={};if(s==null)return f;var v=!1;o=at(o,function(A){return A=vn(A,s),v||(v=A.length>1),A}),Br(s,qc(s),f),v&&(f=ur(f,c|d|m,Z3));for(var T=o.length;T--;)$c(f,o[T]);return f});function iD(s,o){return uv(s,jo(oe(o)))}var sD=Yr(function(s,o){return s==null?{}:O3(s,o)});function uv(s,o){if(s==null)return{};var f=at(qc(s),function(v){return[v]});return o=oe(o),Jm(s,f,function(v,T){return o(v,T[0])})}function aD(s,o,f){o=vn(o,s);var v=-1,T=o.length;for(T||(T=1,s=r);++v<T;){var A=s==null?r:s[Dr(o[v])];A===r&&(v=T,A=f),s=Zr(A)?A.call(s):A}return s}function oD(s,o,f){return s==null?s:Bs(s,o,f)}function uD(s,o,f,v){return v=typeof v=="function"?v:r,s==null?s:Bs(s,o,f,v)}var lv=b0(St),cv=b0(zt);function lD(s,o,f){var v=ye(s),T=v||yn(s)||Xi(s);if(o=oe(o,4),f==null){var A=s&&s.constructor;T?f=v?new A:[]:ct(s)?f=Zr(A)?Hi(yo(s)):{}:f={}}return(T?sr:kr)(s,function(C,R,M){return o(f,C,R,M)}),f}function cD(s,o){return s==null?!0:$c(s,o)}function hD(s,o,f){return s==null?s:i0(s,o,zc(f))}function fD(s,o,f,v){return v=typeof v=="function"?v:r,s==null?s:i0(s,o,zc(f),v)}function Wi(s){return s==null?[]:bc(s,St(s))}function dD(s){return s==null?[]:bc(s,zt(s))}function pD(s,o,f){return f===r&&(f=o,o=r),f!==r&&(f=hr(f),f=f===f?f:0),o!==r&&(o=hr(o),o=o===o?o:0),Xn(hr(s),o,f)}function gD(s,o,f){return o=Qr(o),f===r?(f=o,o=0):f=Qr(f),s=hr(s),b3(s,o,f)}function mD(s,o,f){if(f&&typeof f!="boolean"&&Bt(s,o,f)&&(o=f=r),f===r&&(typeof o=="boolean"?(f=o,o=r):typeof s=="boolean"&&(f=s,s=r)),s===r&&o===r?(s=0,o=1):(s=Qr(s),o===r?(o=s,s=0):o=Qr(o)),s>o){var v=s;s=o,o=v}if(f||s%1||o%1){var T=Nm();return Ot(s+T*(o-s+qF("1e-"+((T+"").length-1))),o)}return Bc(s,o)}var vD=Vi(function(s,o,f){return o=o.toLowerCase(),s+(f?hv(o):o)});function hv(s){return ch(Xe(s).toLowerCase())}function fv(s){return s=Xe(s),s&&s.replace(yF,oN).replace(DF,"")}function _D(s,o,f){s=Xe(s),o=Zt(o);var v=s.length;f=f===r?v:Xn(xe(f),0,v);var T=f;return f-=o.length,f>=0&&s.slice(f,T)==o}function yD(s){return s=Xe(s),s&&JO.test(s)?s.replace(zg,uN):s}function xD(s){return s=Xe(s),s&&sF.test(s)?s.replace(sc,"\\$&"):s}var bD=Vi(function(s,o,f){return s+(f?"-":"")+o.toLowerCase()}),TD=Vi(function(s,o,f){return s+(f?" ":"")+o.toLowerCase()}),wD=g0("toLowerCase");function SD(s,o,f){s=Xe(s),o=xe(o);var v=o?Bi(s):0;if(!o||v>=o)return s;var T=(o-v)/2;return ko(wo(T),f)+s+ko(To(T),f)}function AD(s,o,f){s=Xe(s),o=xe(o);var v=o?Bi(s):0;return o&&v<o?s+ko(o-v,f):s}function ED(s,o,f){s=Xe(s),o=xe(o);var v=o?Bi(s):0;return o&&v<o?ko(o-v,f)+s:s}function CD(s,o,f){return f||o==null?o=0:o&&(o=+o),NN(Xe(s).replace(ac,""),o||0)}function ID(s,o,f){return(f?Bt(s,o,f):o===r)?o=1:o=xe(o),Dc(Xe(s),o)}function RD(){var s=arguments,o=Xe(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var PD=Vi(function(s,o,f){return s+(f?"_":"")+o.toLowerCase()});function MD(s,o,f){return f&&typeof f!="number"&&Bt(s,o,f)&&(o=f=r),f=f===r?q:f>>>0,f?(s=Xe(s),s&&(typeof o=="string"||o!=null&&!oh(o))&&(o=Zt(o),!o&&ki(s))?_n(Sr(s),0,f):s.split(o,f)):[]}var OD=Vi(function(s,o,f){return s+(f?" ":"")+ch(o)});function FD(s,o,f){return s=Xe(s),f=f==null?0:Xn(xe(f),0,s.length),o=Zt(o),s.slice(f,f+o.length)==o}function ND(s,o,f){var v=S.templateSettings;f&&Bt(s,o,f)&&(o=r),s=Xe(s),o=qo({},o,v,T0);var T=qo({},o.imports,v.imports,T0),A=St(T),C=bc(T,A),R,M,U=0,$=o.interpolate||ao,z="__p += '",K=wc((o.escape||ao).source+"|"+$.source+"|"+($===Vg?dF:ao).source+"|"+(o.evaluate||ao).source+"|$","g"),te="//# sourceURL="+(qe.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zF+"]")+`
1976
+ `;s.replace(K,function(ce,Ie,Ne,Jt,Dt,er){return Ne||(Ne=Jt),z+=s.slice(U,er).replace(xF,lN),Ie&&(R=!0,z+=`' +
1977
+ __e(`+Ie+`) +
1978
+ '`),Dt&&(M=!0,z+=`';
1979
+ `+Dt+`;
1980
+ __p += '`),Ne&&(z+=`' +
1981
+ ((__t = (`+Ne+`)) == null ? '' : __t) +
1998
1982
  '`),U=er+ce.length,ce}),z+=`';
1999
- `;var le=Ke.call(o,"variable")&&o.variable;if(!le)z=`with (obj) {
1983
+ `;var le=qe.call(o,"variable")&&o.variable;if(!le)z=`with (obj) {
2000
1984
  `+z+`
2001
1985
  }
2002
- `;else if(vF.test(le))throw new ve(l);z=(M?z.replace(tF,""):z).replace(rF,"$1").replace(nF,"$1;"),z="function("+(le||"obj")+`) {
1986
+ `;else if(hF.test(le))throw new ve(l);z=(M?z.replace(YO,""):z).replace(KO,"$1").replace(ZO,"$1;"),z="function("+(le||"obj")+`) {
2003
1987
  `+(le?"":`obj || (obj = {});
2004
1988
  `)+"var __t, __p = ''"+(R?", __e = _.escape":"")+(M?`, __j = Array.prototype.join;
2005
1989
  function print() { __p += __j.call(arguments, '') }
2006
1990
  `:`;
2007
1991
  `)+z+`return __p
2008
- }`;var Se=pv(function(){return Ve(A,re+"return "+z).apply(r,C)});if(Se.source=z,uh(Se))throw Se;return Se}function GB(s){return We(s).toLowerCase()}function HB(s){return We(s).toUpperCase()}function zB(s,o,h){if(s=We(s),s&&(h||o===r))return wm(s);if(!s||!(o=Zt(o)))return s;var v=Sr(s),T=Sr(o),A=Sm(v,T),C=Am(v,T)+1;return yn(v,A,C).join("")}function VB(s,o,h){if(s=We(s),s&&(h||o===r))return s.slice(0,Cm(s)+1);if(!s||!(o=Zt(o)))return s;var v=Sr(s),T=Am(v,Sr(o))+1;return yn(v,0,T).join("")}function jB(s,o,h){if(s=We(s),s&&(h||o===r))return s.replace(uc,"");if(!s||!(o=Zt(o)))return s;var v=Sr(s),T=Sm(v,Sr(o));return yn(v,T).join("")}function XB(s,o){var h=V,v=Y;if(ct(o)){var T="separator"in o?o.separator:T;h="length"in o?xe(o.length):h,v="omission"in o?Zt(o.omission):v}s=We(s);var A=s.length;if(ki(s)){var C=Sr(s);A=C.length}if(h>=A)return s;var R=h-Di(v);if(R<1)return v;var M=C?yn(C,0,R).join(""):s.slice(0,R);if(T===r)return M+v;if(C&&(R+=M.length-R),lh(T)){if(s.slice(R).search(T)){var U,$=M;for(T.global||(T=Ac(T.source,We(jg.exec(T))+"g")),T.lastIndex=0;U=T.exec($);)var z=U.index;M=M.slice(0,z===r?R:z)}}else if(s.indexOf(Zt(T),R)!=R){var K=M.lastIndexOf(T);K>-1&&(M=M.slice(0,K))}return M+v}function WB(s){return s=We(s),s&&iF.test(s)?s.replace(Hg,TN):s}var qB=Vi(function(s,o,h){return s+(h?" ":"")+o.toUpperCase()}),fh=g0("toUpperCase");function dv(s,o,h){return s=We(s),o=h?r:o,o===r?vN(s)?AN(s):uN(s):s.match(o)||[]}var pv=Ee(function(s,o){try{return Yt(s,r,o)}catch(h){return uh(h)?h:new ve(h)}}),YB=Yr(function(s,o){return sr(o,function(h){h=Br(h),Wr(s,h,ah(s[h],s))}),s});function KB(s){var o=s==null?0:s.length,h=ue();return s=o?at(s,function(v){if(typeof v[1]!="function")throw new ar(u);return[h(v[0]),v[1]]}):[],Ee(function(v){for(var T=-1;++T<o;){var A=s[T];if(Yt(A[0],this,v))return Yt(A[1],this,v)}})}function ZB(s){return T3(ur(s,c))}function dh(s){return function(){return s}}function QB(s,o){return s==null||s!==s?o:s}var JB=v0(),e5=v0(!0);function jt(s){return s}function ph(s){return Wm(typeof s=="function"?s:ur(s,c))}function t5(s){return Ym(ur(s,c))}function r5(s,o){return Km(s,ur(o,c))}var n5=Ee(function(s,o){return function(h){return Ls(h,s,o)}}),i5=Ee(function(s,o){return function(h){return Ls(s,h,o)}});function gh(s,o,h){var v=St(o),T=Ro(o,v);h==null&&!(ct(o)&&(T.length||!v.length))&&(h=o,o=s,s=this,T=Ro(o,St(o)));var A=!(ct(h)&&"chain"in h)||!!h.chain,C=Zr(s);return sr(T,function(R){var M=o[R];s[R]=M,C&&(s.prototype[R]=function(){var U=this.__chain__;if(A||U){var $=s(this.__wrapped__),z=$.__actions__=Ht(this.__actions__);return z.push({func:M,args:arguments,thisArg:s}),$.__chain__=U,$}return M.apply(s,dn([this.value()],arguments))})}),s}function s5(){return It._===this&&(It._=MN),this}function mh(){}function a5(s){return s=xe(s),Ee(function(o){return Zm(o,s)})}var o5=Wc(at),u5=Wc(_m),l5=Wc(_c);function gv(s){return eh(s)?yc(Br(s)):U3(s)}function c5(s){return function(o){return s==null?r:qn(s,o)}}var h5=y0(),f5=y0(!0);function vh(){return[]}function _h(){return!1}function d5(){return{}}function p5(){return""}function g5(){return!0}function m5(s,o){if(s=xe(s),s<1||s>Q)return[];var h=q,v=Nt(s,q);o=ue(o),s-=q;for(var T=Tc(v,o);++h<s;)o(h);return T}function v5(s){return ye(s)?at(s,Br):Qt(s)?[s]:Ht(L0(We(s)))}function _5(s){var o=++RN;return We(s)+o}var y5=Lo(function(s,o){return s+o},0),x5=qc("ceil"),b5=Lo(function(s,o){return s/o},1),T5=qc("floor");function w5(s){return s&&s.length?Io(s,jt,Fc):r}function S5(s,o){return s&&s.length?Io(s,ue(o,2),Fc):r}function A5(s){return bm(s,jt)}function E5(s,o){return bm(s,ue(o,2))}function C5(s){return s&&s.length?Io(s,jt,Dc):r}function I5(s,o){return s&&s.length?Io(s,ue(o,2),Dc):r}var R5=Lo(function(s,o){return s*o},1),P5=qc("round"),M5=Lo(function(s,o){return s-o},0);function O5(s){return s&&s.length?bc(s,jt):0}function F5(s,o){return s&&s.length?bc(s,ue(o,2)):0}return S.after=tD,S.ary=X0,S.assign=HD,S.assignIn=av,S.assignInWith=qo,S.assignWith=zD,S.at=VD,S.before=W0,S.bind=ah,S.bindAll=YB,S.bindKey=q0,S.castArray=dD,S.chain=z0,S.chunk=TL,S.compact=wL,S.concat=SL,S.cond=KB,S.conforms=ZB,S.constant=dh,S.countBy=Ok,S.create=jD,S.curry=Y0,S.curryRight=K0,S.debounce=Z0,S.defaults=XD,S.defaultsDeep=WD,S.defer=rD,S.delay=nD,S.difference=AL,S.differenceBy=EL,S.differenceWith=CL,S.drop=IL,S.dropRight=RL,S.dropRightWhile=PL,S.dropWhile=ML,S.fill=OL,S.filter=Nk,S.flatMap=Dk,S.flatMapDeep=Bk,S.flatMapDepth=Uk,S.flatten=U0,S.flattenDeep=FL,S.flattenDepth=NL,S.flip=iD,S.flow=JB,S.flowRight=e5,S.fromPairs=LL,S.functions=eB,S.functionsIn=tB,S.groupBy=$k,S.initial=DL,S.intersection=BL,S.intersectionBy=UL,S.intersectionWith=$L,S.invert=nB,S.invertBy=iB,S.invokeMap=Hk,S.iteratee=ph,S.keyBy=zk,S.keys=St,S.keysIn=Vt,S.map=Ho,S.mapKeys=aB,S.mapValues=oB,S.matches=t5,S.matchesProperty=r5,S.memoize=Vo,S.merge=uB,S.mergeWith=ov,S.method=n5,S.methodOf=i5,S.mixin=gh,S.negate=jo,S.nthArg=a5,S.omit=lB,S.omitBy=cB,S.once=sD,S.orderBy=Vk,S.over=o5,S.overArgs=aD,S.overEvery=u5,S.overSome=l5,S.partial=oh,S.partialRight=Q0,S.partition=jk,S.pick=hB,S.pickBy=uv,S.property=gv,S.propertyOf=c5,S.pull=VL,S.pullAll=G0,S.pullAllBy=jL,S.pullAllWith=XL,S.pullAt=WL,S.range=h5,S.rangeRight=f5,S.rearg=oD,S.reject=qk,S.remove=qL,S.rest=uD,S.reverse=ih,S.sampleSize=Kk,S.set=dB,S.setWith=pB,S.shuffle=Zk,S.slice=YL,S.sortBy=eD,S.sortedUniq=rk,S.sortedUniqBy=nk,S.split=DB,S.spread=lD,S.tail=ik,S.take=sk,S.takeRight=ak,S.takeRightWhile=ok,S.takeWhile=uk,S.tap=wk,S.throttle=cD,S.thru=Go,S.toArray=nv,S.toPairs=lv,S.toPairsIn=cv,S.toPath=v5,S.toPlainObject=sv,S.transform=gB,S.unary=hD,S.union=lk,S.unionBy=ck,S.unionWith=hk,S.uniq=fk,S.uniqBy=dk,S.uniqWith=pk,S.unset=mB,S.unzip=sh,S.unzipWith=H0,S.update=vB,S.updateWith=_B,S.values=Wi,S.valuesIn=yB,S.without=gk,S.words=dv,S.wrap=fD,S.xor=mk,S.xorBy=vk,S.xorWith=_k,S.zip=yk,S.zipObject=xk,S.zipObjectDeep=bk,S.zipWith=Tk,S.entries=lv,S.entriesIn=cv,S.extend=av,S.extendWith=qo,gh(S,S),S.add=y5,S.attempt=pv,S.camelCase=wB,S.capitalize=hv,S.ceil=x5,S.clamp=xB,S.clone=pD,S.cloneDeep=mD,S.cloneDeepWith=vD,S.cloneWith=gD,S.conformsTo=_D,S.deburr=fv,S.defaultTo=QB,S.divide=b5,S.endsWith=SB,S.eq=Er,S.escape=AB,S.escapeRegExp=EB,S.every=Fk,S.find=Lk,S.findIndex=D0,S.findKey=qD,S.findLast=kk,S.findLastIndex=B0,S.findLastKey=YD,S.floor=T5,S.forEach=V0,S.forEachRight=j0,S.forIn=KD,S.forInRight=ZD,S.forOwn=QD,S.forOwnRight=JD,S.get=ch,S.gt=yD,S.gte=xD,S.has=rB,S.hasIn=hh,S.head=$0,S.identity=jt,S.includes=Gk,S.indexOf=kL,S.inRange=bB,S.invoke=sB,S.isArguments=Zn,S.isArray=ye,S.isArrayBuffer=bD,S.isArrayLike=zt,S.isArrayLikeObject=gt,S.isBoolean=TD,S.isBuffer=xn,S.isDate=wD,S.isElement=SD,S.isEmpty=AD,S.isEqual=ED,S.isEqualWith=CD,S.isError=uh,S.isFinite=ID,S.isFunction=Zr,S.isInteger=J0,S.isLength=Xo,S.isMap=ev,S.isMatch=RD,S.isMatchWith=PD,S.isNaN=MD,S.isNative=OD,S.isNil=ND,S.isNull=FD,S.isNumber=tv,S.isObject=ct,S.isObjectLike=dt,S.isPlainObject=Gs,S.isRegExp=lh,S.isSafeInteger=LD,S.isSet=rv,S.isString=Wo,S.isSymbol=Qt,S.isTypedArray=Xi,S.isUndefined=kD,S.isWeakMap=DD,S.isWeakSet=BD,S.join=GL,S.kebabCase=CB,S.last=cr,S.lastIndexOf=HL,S.lowerCase=IB,S.lowerFirst=RB,S.lt=UD,S.lte=$D,S.max=w5,S.maxBy=S5,S.mean=A5,S.meanBy=E5,S.min=C5,S.minBy=I5,S.stubArray=vh,S.stubFalse=_h,S.stubObject=d5,S.stubString=p5,S.stubTrue=g5,S.multiply=R5,S.nth=zL,S.noConflict=s5,S.noop=mh,S.now=zo,S.pad=PB,S.padEnd=MB,S.padStart=OB,S.parseInt=FB,S.random=TB,S.reduce=Xk,S.reduceRight=Wk,S.repeat=NB,S.replace=LB,S.result=fB,S.round=P5,S.runInContext=P,S.sample=Yk,S.size=Qk,S.snakeCase=kB,S.some=Jk,S.sortedIndex=KL,S.sortedIndexBy=ZL,S.sortedIndexOf=QL,S.sortedLastIndex=JL,S.sortedLastIndexBy=ek,S.sortedLastIndexOf=tk,S.startCase=BB,S.startsWith=UB,S.subtract=M5,S.sum=O5,S.sumBy=F5,S.template=$B,S.times=m5,S.toFinite=Qr,S.toInteger=xe,S.toLength=iv,S.toLower=GB,S.toNumber=hr,S.toSafeInteger=GD,S.toString=We,S.toUpper=HB,S.trim=zB,S.trimEnd=VB,S.trimStart=jB,S.truncate=XB,S.unescape=WB,S.uniqueId=_5,S.upperCase=qB,S.upperFirst=fh,S.each=V0,S.eachRight=j0,S.first=$0,gh(S,function(){var s={};return kr(S,function(o,h){Ke.call(S.prototype,h)||(s[h]=o)}),s}(),{chain:!1}),S.VERSION=n,sr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){S[s].placeholder=S}),sr(["drop","take"],function(s,o){Fe.prototype[s]=function(h){h=h===r?1:xt(xe(h),0);var v=this.__filtered__&&!o?new Fe(this):this.clone();return v.__filtered__?v.__takeCount__=Nt(h,v.__takeCount__):v.__views__.push({size:Nt(h,q),type:s+(v.__dir__<0?"Right":"")}),v},Fe.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),sr(["filter","map","takeWhile"],function(s,o){var h=o+1,v=h==G||h==se;Fe.prototype[s]=function(T){var A=this.clone();return A.__iteratees__.push({iteratee:ue(T,3),type:h}),A.__filtered__=A.__filtered__||v,A}}),sr(["head","last"],function(s,o){var h="take"+(o?"Right":"");Fe.prototype[s]=function(){return this[h](1).value()[0]}}),sr(["initial","tail"],function(s,o){var h="drop"+(o?"":"Right");Fe.prototype[s]=function(){return this.__filtered__?new Fe(this):this[h](1)}}),Fe.prototype.compact=function(){return this.filter(jt)},Fe.prototype.find=function(s){return this.filter(s).head()},Fe.prototype.findLast=function(s){return this.reverse().find(s)},Fe.prototype.invokeMap=Ee(function(s,o){return typeof s=="function"?new Fe(this):this.map(function(h){return Ls(h,s,o)})}),Fe.prototype.reject=function(s){return this.filter(jo(ue(s)))},Fe.prototype.slice=function(s,o){s=xe(s);var h=this;return h.__filtered__&&(s>0||o<0)?new Fe(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),o!==r&&(o=xe(o),h=o<0?h.dropRight(-o):h.take(o-s)),h)},Fe.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Fe.prototype.toArray=function(){return this.take(q)},kr(Fe.prototype,function(s,o){var h=/^(?:filter|find|map|reject)|While$/.test(o),v=/^(?:head|last)$/.test(o),T=S[v?"take"+(o=="last"?"Right":""):o],A=v||/^find/.test(o);T&&(S.prototype[o]=function(){var C=this.__wrapped__,R=v?[1]:arguments,M=C instanceof Fe,U=R[0],$=M||ye(C),z=function(Pe){var Le=T.apply(S,dn([Pe],R));return v&&K?Le[0]:Le};$&&h&&typeof U=="function"&&U.length!=1&&(M=$=!1);var K=this.__chain__,re=!!this.__actions__.length,le=A&&!K,Se=M&&!re;if(!A&&$){C=Se?C:new Fe(this);var ce=s.apply(C,R);return ce.__actions__.push({func:Go,args:[z],thisArg:r}),new or(ce,K)}return le&&Se?s.apply(this,R):(ce=this.thru(z),le?v?ce.value()[0]:ce.value():ce)})}),sr(["pop","push","shift","sort","splice","unshift"],function(s){var o=fo[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",v=/^(?:pop|shift)$/.test(s);S.prototype[s]=function(){var T=arguments;if(v&&!this.__chain__){var A=this.value();return o.apply(ye(A)?A:[],T)}return this[h](function(C){return o.apply(ye(C)?C:[],T)})}}),kr(Fe.prototype,function(s,o){var h=S[o];if(h){var v=h.name+"";Ke.call(Gi,v)||(Gi[v]=[]),Gi[v].push({name:o,func:h})}}),Gi[No(r,x).name]=[{name:"wrapper",func:r}],Fe.prototype.clone=WN,Fe.prototype.reverse=qN,Fe.prototype.value=YN,S.prototype.at=Sk,S.prototype.chain=Ak,S.prototype.commit=Ek,S.prototype.next=Ck,S.prototype.plant=Rk,S.prototype.reverse=Pk,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=Mk,S.prototype.first=S.prototype.head,Is&&(S.prototype[Is]=Ik),S},Bi=EN();zn?((zn.exports=Bi)._=Bi,pc._=Bi):It._=Bi}).call(At)}(io,io.exports);var Lg=io.exports;const SO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},kg=te.forwardRef((t,e)=>{const[r,n]=te.useState([]),[,i]=te.useState(0),[a,u]=te.useState([]),[,l]=X.useState(!1),[f,p]=pO({autoPlay:!1}),g=X.useRef(null),c=X.useRef(null),d=X.useRef(SO),m=X.useRef(),{tl:_,dragModeRef:y}=X.useContext(en),{frames:b,delays:x}=f,{src:E,startAt:w,endAt:I,frameStartAt:O,frameEndAt:F,loop:N,visible:L,disabled:D,transformation:{width:V=0,height:Y=0,x:ie,y:j,colorCorrection:G={}},pointerdown:ae}=t,{temperatureFilter:se,sharpnessFilter:H,hueFilter:Q,blurFilter:pe,adjustmentFilter:W,vignetteFilter:q,noiseFilter:he}=Bn(G),{blurRadius:fe=0,vignette:me=0,noise:be=0}=G,Ce=.1;TO(E,p),ht(Ze.PAUSE,()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)}),ht(Ze.SEEK_END,()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)}),ht(Ze.SCRUBBER_CLICKED,()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)}),te.useEffect(()=>{d.current&&g.current&&(y.current?(g.current.stop(),d.current.isPlaying=!1,d.current.isDragging=!0):d.current.isDragging=!1)},[y]),te.useEffect(()=>{if(!Qi(b)){const we=VM(b,oe=>{const{data:Ie,width:Ft,height:Ct}=oe,ft=new Uint8Array(Ie);return Xt.Texture.fromBuffer(ft,Ft,Ct)}),ge=we.map((oe,Ie)=>({texture:oe,time:x[Ie]}));n(we),u(ge);let tt=0;x.forEach(oe=>{tt+=oe*10}),i(tt),d.current.totalDuration=tt,d.current.totalFrames=b.length}},[b,x]);const $e=Lg.debounce(we=>{if(g.current){let ge=we===0?0:we/Ce;ge=isNaN(ge)?0:ge;const tt=d.current.totalFrames;ge=ge>tt?tt:ge,ge>=tt?(g.current.gotoAndStop(0),d.current.isPlaying=!1):(g.current.gotoAndPlay(ge||0),d.current.isPlaying=!0)}},20),ze=Lg.debounce(()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)},50),Xe=we=>{if(g.current){let ge=we===0?0:we/Ce;ge=isNaN(ge)?0:ge;const tt=d.current.totalFrames;ge=ge>tt?tt:ge,ge>=tt?(g.current.gotoAndStop(0),d.current.isPlaying=!1):(g.current.gotoAndPlay(ge||0),d.current.isPlaying=!0)}},_e=()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)},Te=()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)},De=we=>{var tt;const ge=we+((tt=m.current)==null?void 0:tt.time());g.current&&y.current?($e(ge),ze(),d.current.isPlaying=!1):m.current&&g.current&&!d.current.isPlaying&&m.current.isActive()&&_.current.isActive()&&($e(ge),d.current.isPlaying=!0)},Oe=()=>{l(!0)};return X.useEffect(()=>{let we=ee.context(()=>{});if(c.current&&_.current){const ge={duration:Number(F)-Number(O),onStart:Xe,onComplete:_e,onStartParams:[O,F],onCompleteParams:[],onInterrupt:Te,onUpdate:De,onUpdateParams:[O,F]};m.current&&m.current.kill(),we=ee.context(()=>{m.current=ee.from(c.current,ge,O),_.current.add(m.current,w)})}return()=>{m.current&&(m.current.kill(),ee.killTweensOf(m.current)),we.revert()}},[w,I,O,F]),Ae.jsx(rn,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:Ae.jsx(Be.Container,{ref:c,children:r&&r.length>0&&Ae.jsx(Ng,{x:ie,y:j,width:V,height:Y,animationSpeed:1,alpha:L?1:0,loop:N,textures:a,onComplete:Oe,anchor:.5,forwardRef:g,...!D&&L&&{interactive:!0,pointerdown:ae},filters:[se,H,Q,W,...fe>0?[pe]:[],...me>0?[q]:[],...be>0?[he]:[]]})})})});kg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const AO=te.forwardRef((t,e)=>{const n=X.useRef(null),i=X.useRef(0),a=X.useRef(null),u=X.useRef(null),l=X.useRef(16),f=X.useRef(null),{visible:p,text:g,disabled:c,transformation:d,pointerdown:m,onDobuleClick:_}=t,{x:y,y:b,fontFamily:x="Arial",fontWeight:E="normal",fontStyle:w="normal",fontSize:I=16,fontVariant:O="normal",fill:F="black",stroke:N,strokeThickness:L=0,blurRadius:D=0,blurEnabled:V=!1,dropShadowColor:Y=null,dropShadow:ie=!1,dropShadowBlur:j=0,wordWrapWidth:G=5e7,leading:ae=0,letterSpacing:se,colorCorrection:H={}}=d,{temperatureFilter:Q,sharpnessFilter:pe,hueFilter:W,blurFilter:q,adjustmentFilter:he}=Bn(H),{blurRadius:fe=0}=H;te.useEffect(()=>{l.current=Number(I)},[I]);const me=["italic","oblique"].includes(w)?w:void 0,be=["small-caps"].includes(O),Ce=["bold","bolder","lighter","100","200","300"].includes(E)?E:void 0,$e=Number(se)>0?se:void 0,ze=te.useMemo(()=>new Xt.TextStyle({fontFamily:x,fontSize:I,fill:F||"white",...N&&L>0&&{stroke:N,strokeThickness:L},...me&&{fontStyle:me},...be&&{fontVariant:be},...Ce&&{fontWeight:Ce},...$e&&{letterSpacing:$e},...V&&{dropShadow:!0,dropShadowBlur:Number(D),dropShadowColor:(Y==null?void 0:Y.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...ie&&{dropShadow:!0,dropShadowBlur:Number(j),dropShadowColor:(Y==null?void 0:Y.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:G||500,leading:ae||0}),[V,D,F,x,I,w,ae,me,Ce,be,$e,Y,N,L,G,ie,j]);te.useEffect(()=>{f.current={...d}},[d]);const Xe=()=>{const Te=new Date().getTime();Te-i.current<300&&_?_():m&&m(),i.current=Te},_e=()=>{!c&&_&&_()};return Ae.jsx(rn,{...t,ref:e,isText:!0,onDoubleClick:_e,children:Ae.jsx(Be.Container,{ref:n,children:Ae.jsx(Be.Container,{alpha:1,ref:u,children:Ae.jsx(Be.Text,{style:ze,x:y,y:b,anchor:.5,text:g,alpha:p?1:0,...p&&!c&&{interactive:!0,buttonMode:!0,pointerdown:Xe},ref:a,filters:[Q,pe,W,he,...fe>0?[q]:[]]})})})})});var EO=Ir,CO=function(){return EO.Date.now()},IO=CO,RO=/\s/;function PO(t){for(var e=t.length;e--&&RO.test(t.charAt(e)););return e}var MO=PO,OO=MO,FO=/^\s+/;function NO(t){return t&&t.slice(0,OO(t)+1).replace(FO,"")}var LO=NO,kO=LO,Dg=Ki,DO=Ja,Bg=0/0,BO=/^[-+]0x[0-9a-f]+$/i,UO=/^0b[01]+$/i,$O=/^0o[0-7]+$/i,GO=parseInt;function HO(t){if(typeof t=="number")return t;if(DO(t))return Bg;if(Dg(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Dg(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=kO(t);var r=UO.test(t);return r||$O.test(t)?GO(t.slice(2),r?2:8):BO.test(t)?Bg:+t}var zO=HO,VO=Ki,Yl=IO,Ug=zO,jO="Expected a function",XO=Math.max,WO=Math.min;function qO(t,e,r){var n,i,a,u,l,f,p=0,g=!1,c=!1,d=!0;if(typeof t!="function")throw new TypeError(jO);e=Ug(e)||0,VO(r)&&(g=!!r.leading,c="maxWait"in r,a=c?XO(Ug(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d);function m(F){var N=n,L=i;return n=i=void 0,p=F,u=t.apply(L,N),u}function _(F){return p=F,l=setTimeout(x,e),g?m(F):u}function y(F){var N=F-f,L=F-p,D=e-N;return c?WO(D,a-L):D}function b(F){var N=F-f,L=F-p;return f===void 0||N>=e||N<0||c&&L>=a}function x(){var F=Yl();if(b(F))return E(F);l=setTimeout(x,y(F))}function E(F){return l=void 0,d&&n?m(F):(n=i=void 0,u)}function w(){l!==void 0&&clearTimeout(l),p=0,n=f=i=l=void 0}function I(){return l===void 0?u:E(Yl())}function O(){var F=Yl(),N=b(F);if(n=arguments,i=this,f=F,N){if(l===void 0)return _(f);if(c)return clearTimeout(l),l=setTimeout(x,e),m(f)}return l===void 0&&(l=setTimeout(x,e)),u}return O.cancel=w,O.flush=I,O}var YO=qO;const so=bn(YO),Kl=(t,e,r,n)=>{const i=X.useCallback(so(t,n),[t,n]),a=X.useCallback(so(e,n),[e,n]),u=X.useCallback(so(r,n),[r,n]),l=X.useCallback(()=>{i()},[i]),f=X.useCallback(()=>{a()},[a]),p=X.useCallback(()=>{u()},[u]);return{onPointerOver:l,onPointerDown:f,onPointerOut:p}},KO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},$g=te.forwardRef((t,e)=>{const[r,n]=te.useState(0),[i,a]=te.useState(),u=X.useRef(null),l=X.useRef(null),f=X.useRef(null),p=X.useRef(KO),g=X.useRef(),{uniqueId:c,mute:d=!1,src:m,startAt:_,endAt:y,frameStartAt:b,frameEndAt:x,visible:E,disabled:w,transformation:{x:I,y:O,width:F,height:N,animation:L,colorCorrection:D={}},pointerdown:V=()=>{},pointerout:Y=()=>{},pointerover:ie=()=>{},fps:j=0}=t,{tl:G,dragModeRef:ae,isRemotion:se}=X.useContext(en),{onPointerDown:H,onPointerOut:Q,onPointerOver:pe}=Kl(ie,V,Y,1),{blurRadius:W=0,vignette:q=0,noise:he=0}=D,{temperatureFilter:fe,sharpnessFilter:me,hueFilter:be,blurFilter:Ce,adjustmentFilter:$e,vignetteFilter:ze,noiseFilter:Xe}=Bn(D),_e=m||"",Te=te.useMemo(()=>{const oe=document.createElement("video");return oe.src=m,oe.crossOrigin="Anonymus",oe.autoplay=!1,oe.currentTime=b===0?.001:b,oe},[m,b]);ht(Ze.PAUSE,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),ht(Ze.SCRUBBER_CLICKED,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),ht(Ze.REVERSE_MODE_END,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)});const De=te.useCallback(so(()=>{if(f.current){const oe=f.current;oe.currentTime>0&&!oe.paused&&!oe.ended&&oe.readyState>oe.HAVE_CURRENT_DATA&&f.current.pause(),p.current.isPlaying=!1}},400),[f]);te.useEffect(()=>{f.current&&!se?(ae.current?(De(),p.current.isPlaying=!1,p.current.isDragging=!0):p.current.isDragging=!1,f.current.muted=d):p.current.isDragging=!1},[d,ae,De,f]);const Oe=oe=>{if(f.current){if(f.current.currentTime=Number(oe),!ae.current){const Ie=f.current,Ft=Ie.currentTime>0&&!Ie.paused&&!Ie.ended&&Ie.readyState>Ie.HAVE_CURRENT_DATA;G.current&&G.current.isActive()&&g.current&&g.current.isActive()&&(Ft||f.current.play(),p.current.isPlaying=!0,n(Ct=>Ct+1))}p.current.progress=0}},we=()=>{if(f.current){const oe=f.current;oe.currentTime>0&&!oe.paused&&!oe.ended&&oe.readyState>oe.HAVE_CURRENT_DATA&&f.current.pause(),p.current.isPlaying=!1,g.current&&(p.current.progress=g.current.progress())}},ge=()=>{},tt=()=>{var oe,Ie;if(g.current&&(p.current.progress=g.current.progress()),f.current&&g.current){const Ft=b+((oe=g==null?void 0:g.current)==null?void 0:oe.time()),Ct=Math.abs(f.current.currentTime-Ft),ft=f.current,nr=ft.currentTime>0&&!ft.paused&&!ft.ended&&ft.readyState>ft.HAVE_CURRENT_DATA;ae.current?(f.current.currentTime=Ft,setTimeout(()=>{f.current&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},100),p.current.isPlaying=!1):(nr!==p.current.isPlaying||!nr)&&p.current.progress>.01&&p.current.progress<.99?(Ie=G.current)!=null&&Ie.isActive()&&g.current&&g.current.isActive()&&(nr||f.current.play(),p.current.isPlaying=!0):Ct>.3&&p.current.progress>.01&&p.current.progress<.99&&(f.current.currentTime=Ft)}};return X.useEffect(()=>{let oe=ee.context(()=>{});if(l.current&&G.current){const Ie={duration:Number(x)-Number(b),onStart:Oe,onComplete:we,onStartParams:[b,x],onCompleteParams:[],onInterrupt:ge,onUpdate:tt,onUpdateParams:[b,x],onPause:()=>{console.log("onPause video sprite pause",c)},onResume:()=>{console.log("onResume video sprite resume",c)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",c)},onKill:()=>{console.log("onKill video sprite kill",c)}};oe=ee.context(()=>{g.current=ee.from(l.current,Ie,b),G.current.add(g.current,_)})}return()=>{g.current&&(g.current.kill(),ee.killTweensOf(g.current)),oe.revert()}},[L,_,y,b,x]),te.useEffect(()=>{f.current&&(f.current.muted=d)},[d]),te.useEffect(()=>{const oe=Math.round((Number(b)+Number.EPSILON)*100)/100,Ie=function(){f.current&&(f.current.currentTime=oe)},Ft=function(){if(f.current){const wr=f.current;wr.currentTime>0&&!wr.paused&&!wr.ended&&wr.readyState>wr.HAVE_CURRENT_DATA&&f.current.pause()}p.current.isWaiting=!1,p.current.isStalled=!1},Ct=function(){f.current&&f.current.pause(),p.current.isWaiting=!0,p.current.isStalled=!1},ft=function(){p.current.isWaiting=!1,p.current.isStalled=!1},nr=function(){p.current.isWaiting=!1,p.current.isStalled=!0},Mi=Math.round((Number(b)+Number.EPSILON)*100)/100,Zl=Math.round((Number(x)+Number.EPSILON)*100)/100,Hn=`${_e}#t=${Mi},${Zl}`;return Xt.Texture.fromLoader(Te,Hn,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:j?Math.max(120,Number(j)):30}}).then(wr=>{wr&&(a(wr),f.current=wr.baseTexture.resource.source,f.current.id=c,f.current.addEventListener("loadedmetadata",Ie),f.current.addEventListener("ended",Ft),f.current.addEventListener("loadstart",Ct),f.current.addEventListener("canplaythrough",ft),f.current.addEventListener("stalled",nr))}),()=>{f.current&&(f.current.pause(),f.current.removeEventListener("loadedmetadata",Ie),f.current.removeEventListener("ended",Ft),f.current.removeEventListener("loadstart",Ct),f.current.removeEventListener("canplaythrough",ft),f.current.removeEventListener("stalled",nr))}},[_e,c,b,x,Te]),te.useEffect(()=>{const oe=setTimeout(()=>{i&&g.current&&G.current&&g.current.progress()<.1&&f.current&&!g.current.isActive()&&!se&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},30);return()=>{clearTimeout(oe)}},[i]),te.useEffect(()=>{G.current&&!G.current.isActive()&&!se&&(p.current.isPlaying=!1,f.current&&f.current.pause());const oe=setTimeout(()=>{if(i&&G.current&&r>0&&!se){G.current.isActive()||(p.current.isPlaying=!1,f.current&&f.current.pause());const Ie=f.current;Ie&&G.current.isActive()&&g.current&&g.current.isActive()&&(Ie.currentTime>0&&!Ie.paused&&!Ie.ended&&Ie.readyState>Ie.HAVE_CURRENT_DATA||f.current.play(),p.current.isPlaying=!0)}},10);return()=>{clearTimeout(oe)}},[r,i]),Ae.jsx(rn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:H,pointerover:pe,pointerout:Q,children:Ae.jsx(Be.Container,{ref:l,children:i&&Ae.jsx(Be.Sprite,{texture:i,width:F,height:N,anchor:.5,x:I,y:O,ref:u,alpha:E?1:0,...!w&&E&&{interactive:!0,pointerdown:V},filters:[fe,me,be,$e,...W>0?[Ce]:[],...q>0?[ze]:[],...he>0?[Xe]:[]]})})})});$g.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const ZO=te.forwardRef((t,e)=>{const[r,n]=te.useState(),i=X.useRef(null),a=X.useRef(null),{visible:u,disabled:l,transformation:{x:f,y:p,width:g,height:c,colorCorrection:d={}},pointerdown:m=()=>{},pointerout:_=()=>{},pointerover:y=()=>{},canvasImageRef:b}=t,x=b&&(b==null?void 0:b.getCanvas()),E=Be.useApp(),{onPointerDown:w,onPointerOut:I,onPointerOver:O}=Kl(y,m,_,1),{blurRadius:F=0,vignette:N=0,noise:L=0}=d,{temperatureFilter:D,sharpnessFilter:V,hueFilter:Y,blurFilter:ie,adjustmentFilter:j,vignetteFilter:G,noiseFilter:ae}=Bn(d);return Be.useTick(()=>{if(i.current&&i.current.texture){const se=i.current.texture.baseTexture;se&&se.update(),a.current&&E.renderer.render(a.current)}}),te.useEffect(()=>{if(!Qi(x)){const se=Xt.Texture.from(x);n(se)}},[x]),Ae.jsx(rn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:w,pointerover:O,pointerout:I,children:Ae.jsx(Be.Container,{ref:a,children:r&&Ae.jsx(Be.Sprite,{texture:r,width:g,height:c,anchor:.5,x:f,y:p,ref:i,alpha:u?1:0,...!l&&u&&{interactive:!0,pointerdown:m},filters:[D,V,Y,j,...F>0?[ie]:[],...N>0?[G]:[],...L>0?[ae]:[]]})})})}),QO=t=>{const{startAt:e,endAt:r,uniqueId:n}=t,i=X.useRef(null),a=X.useRef(null),u=X.useRef(null),l=X.useRef(null),f=X.useRef(!1),{tl:p,totalDuration:g=0,reverseModeRef:c}=X.useContext(en),d=e<.2?"static":"none",m=X.useRef(1);ht(Ze.COMPLETE,()=>{i.current&&(i.current.eventMode=d)}),ht(Ze.REVERSE_MODE_END,()=>{if(p.current){const y=p.current.time();y>e&&y<r?(a.current&&(a.current.alpha=1),i.current&&(i.current.alpha=1,i.current.eventMode="static")):(a.current&&(a.current.alpha=0),i.current&&(i.current.alpha=0,i.current.eventMode="none"))}});const _=()=>{if(c.current&&l.current&&p.current){f.current=!0;const y=p.current.time();y>e&&y<r?(a.current&&(a.current.alpha=1),i.current&&(i.current.alpha=1)):(a.current&&(a.current.alpha=0),i.current&&(i.current.alpha=0))}};return ht(Ze.COMPLETE,()=>{}),te.useEffect(()=>{const y=ee.context(()=>{if(i.current&&p.current){const b=ee.to(i.current,{alpha:1,duration:.1});l.current=ee.to(a.current,{alpha:1,duration:Number(r)-Number(e),onStart:()=>{i.current&&(i.current.alpha=1,i.current.eventMode="static",m.current=1)},onUpdate:_,onComplete:()=>{i.current&&(i.current.alpha=0,i.current.eventMode="none",m.current=0)}}),p.current.add([b,l.current],e)}});return()=>{l.current&&(p.current.remove(l.current),l.current.progress(0).kill()),y.revert()}},[e,r,g,n]),Ae.jsx(Be.Container,{ref:i,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:Ae.jsx(Be.Container,{ref:u,children:Ae.jsx(Be.Container,{ref:a,alpha:1,children:t.children})})})},JO=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:n}=X.useContext(en);return te.useEffect(()=>{n&&n(Number(r)+.2)},[e,r]),t.children},eF=te.forwardRef((t,e)=>{const[r,n]=te.useState(),i=X.useRef(null),a=X.useRef(null),{visible:u,disabled:l,transformation:{x:f,y:p,width:g,height:c,colorCorrection:d={}},pointerdown:m=()=>{},pointerout:_=()=>{},pointerover:y=()=>{},canvasImageRef:b}=t,x=b&&(b==null?void 0:b.getCanvas()),E=Be.useApp(),{onPointerDown:w,onPointerOut:I,onPointerOver:O}=Kl(y,m,_,1),{blurRadius:F=0,vignette:N=0,noise:L=0}=d,{temperatureFilter:D,sharpnessFilter:V,hueFilter:Y,blurFilter:ie,adjustmentFilter:j,vignetteFilter:G,noiseFilter:ae}=Bn(d);return Be.useTick(()=>{if(i.current&&i.current.texture){const se=i.current.texture.baseTexture;se&&se.update(),a.current&&E.renderer.render(a.current)}}),te.useEffect(()=>{if(!Qi(x)){const se=Xt.Texture.from(x);n(se)}},[x]),Ae.jsx(rn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:w,pointerover:O,pointerout:I,children:Ae.jsx(Be.Container,{ref:a,children:r&&Ae.jsx(Be.Sprite,{texture:r,width:g,height:c,anchor:.5,x:f,y:p,ref:i,alpha:u?1:0,...!l&&u&&{interactive:!0,pointerdown:m},filters:[D,V,Y,j,...F>0?[ie]:[],...N>0?[G]:[],...L>0?[ae]:[]]})})})});var Gg=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t))(Gg||{});qe.Animations=du,qe.BlendModes=Gg,qe.Events=Ze,qe.GsapPixieContext=en,qe.GsapPixieContextProvider=Rv,qe.PixiAnimatedSprite=Ng,qe.PixiAudioSprite=yR,qe.PixiGifSprite=kg,qe.PixiImageSprite=Zp,qe.PixiRemotionSprite=eF,qe.PixiSequence=QO,qe.PixiSequenceWrapper=JO,qe.PixiSvgPathSprite=_R,qe.PixiTextSprite=AO,qe.PixiVideoCanvasSyncSprite=ZO,qe.PixiVideoSprite=$g,qe.emitCustomEvent=Qn,qe.newCustomEventEmitter=Iv,qe.useCustomEventListener=ht,Object.defineProperty(qe,Symbol.toStringTag,{value:"Module"})});
1992
+ }`;var Te=pv(function(){return He(A,te+"return "+z).apply(r,C)});if(Te.source=z,ah(Te))throw Te;return Te}function LD(s){return Xe(s).toLowerCase()}function kD(s){return Xe(s).toUpperCase()}function BD(s,o,f){if(s=Xe(s),s&&(f||o===r))return wm(s);if(!s||!(o=Zt(o)))return s;var v=Sr(s),T=Sr(o),A=Sm(v,T),C=Am(v,T)+1;return _n(v,A,C).join("")}function DD(s,o,f){if(s=Xe(s),s&&(f||o===r))return s.slice(0,Cm(s)+1);if(!s||!(o=Zt(o)))return s;var v=Sr(s),T=Am(v,Sr(o))+1;return _n(v,0,T).join("")}function UD(s,o,f){if(s=Xe(s),s&&(f||o===r))return s.replace(ac,"");if(!s||!(o=Zt(o)))return s;var v=Sr(s),T=Sm(v,Sr(o));return _n(v,T).join("")}function $D(s,o){var f=V,v=Y;if(ct(o)){var T="separator"in o?o.separator:T;f="length"in o?xe(o.length):f,v="omission"in o?Zt(o.omission):v}s=Xe(s);var A=s.length;if(ki(s)){var C=Sr(s);A=C.length}if(f>=A)return s;var R=f-Bi(v);if(R<1)return v;var M=C?_n(C,0,R).join(""):s.slice(0,R);if(T===r)return M+v;if(C&&(R+=M.length-R),oh(T)){if(s.slice(R).search(T)){var U,$=M;for(T.global||(T=wc(T.source,Xe(jg.exec(T))+"g")),T.lastIndex=0;U=T.exec($);)var z=U.index;M=M.slice(0,z===r?R:z)}}else if(s.indexOf(Zt(T),R)!=R){var K=M.lastIndexOf(T);K>-1&&(M=M.slice(0,K))}return M+v}function GD(s){return s=Xe(s),s&&QO.test(s)?s.replace(Hg,mN):s}var HD=Vi(function(s,o,f){return s+(f?" ":"")+o.toUpperCase()}),ch=g0("toUpperCase");function dv(s,o,f){return s=Xe(s),o=f?r:o,o===r?hN(s)?yN(s):rN(s):s.match(o)||[]}var pv=Se(function(s,o){try{return Yt(s,r,o)}catch(f){return ah(f)?f:new ve(f)}}),zD=Yr(function(s,o){return sr(o,function(f){f=Dr(f),Wr(s,f,ih(s[f],s))}),s});function VD(s){var o=s==null?0:s.length,f=oe();return s=o?at(s,function(v){if(typeof v[1]!="function")throw new ar(u);return[f(v[0]),v[1]]}):[],Se(function(v){for(var T=-1;++T<o;){var A=s[T];if(Yt(A[0],this,v))return Yt(A[1],this,v)}})}function jD(s){return m3(ur(s,c))}function hh(s){return function(){return s}}function XD(s,o){return s==null||s!==s?o:s}var WD=v0(),qD=v0(!0);function Vt(s){return s}function fh(s){return Wm(typeof s=="function"?s:ur(s,c))}function YD(s){return Ym(ur(s,c))}function KD(s,o){return Km(s,ur(o,c))}var ZD=Se(function(s,o){return function(f){return Ls(f,s,o)}}),QD=Se(function(s,o){return function(f){return Ls(s,f,o)}});function dh(s,o,f){var v=St(o),T=Ro(o,v);f==null&&!(ct(o)&&(T.length||!v.length))&&(f=o,o=s,s=this,T=Ro(o,St(o)));var A=!(ct(f)&&"chain"in f)||!!f.chain,C=Zr(s);return sr(T,function(R){var M=o[R];s[R]=M,C&&(s.prototype[R]=function(){var U=this.__chain__;if(A||U){var $=s(this.__wrapped__),z=$.__actions__=Gt(this.__actions__);return z.push({func:M,args:arguments,thisArg:s}),$.__chain__=U,$}return M.apply(s,fn([this.value()],arguments))})}),s}function JD(){return Ct._===this&&(Ct._=AN),this}function ph(){}function e5(s){return s=xe(s),Se(function(o){return Zm(o,s)})}var t5=jc(at),r5=jc(_m),n5=jc(mc);function gv(s){return Qc(s)?vc(Dr(s)):F3(s)}function i5(s){return function(o){return s==null?r:Wn(s,o)}}var s5=y0(),a5=y0(!0);function gh(){return[]}function mh(){return!1}function o5(){return{}}function u5(){return""}function l5(){return!0}function c5(s,o){if(s=xe(s),s<1||s>J)return[];var f=q,v=Ot(s,q);o=oe(o),s-=q;for(var T=xc(v,o);++f<s;)o(f);return T}function h5(s){return ye(s)?at(s,Dr):Qt(s)?[s]:Gt(L0(Xe(s)))}function f5(s){var o=++wN;return Xe(s)+o}var d5=Lo(function(s,o){return s+o},0),p5=Xc("ceil"),g5=Lo(function(s,o){return s/o},1),m5=Xc("floor");function v5(s){return s&&s.length?Io(s,Vt,Mc):r}function _5(s,o){return s&&s.length?Io(s,oe(o,2),Mc):r}function y5(s){return bm(s,Vt)}function x5(s,o){return bm(s,oe(o,2))}function b5(s){return s&&s.length?Io(s,Vt,Lc):r}function T5(s,o){return s&&s.length?Io(s,oe(o,2),Lc):r}var w5=Lo(function(s,o){return s*o},1),S5=Xc("round"),A5=Lo(function(s,o){return s-o},0);function E5(s){return s&&s.length?yc(s,Vt):0}function C5(s,o){return s&&s.length?yc(s,oe(o,2)):0}return S.after=Yk,S.ary=X0,S.assign=kB,S.assignIn=av,S.assignInWith=qo,S.assignWith=BB,S.at=DB,S.before=W0,S.bind=ih,S.bindAll=zD,S.bindKey=q0,S.castArray=oB,S.chain=z0,S.chunk=mL,S.compact=vL,S.concat=_L,S.cond=VD,S.conforms=jD,S.constant=hh,S.countBy=Ek,S.create=UB,S.curry=Y0,S.curryRight=K0,S.debounce=Z0,S.defaults=$B,S.defaultsDeep=GB,S.defer=Kk,S.delay=Zk,S.difference=yL,S.differenceBy=xL,S.differenceWith=bL,S.drop=TL,S.dropRight=wL,S.dropRightWhile=SL,S.dropWhile=AL,S.fill=EL,S.filter=Ik,S.flatMap=Mk,S.flatMapDeep=Ok,S.flatMapDepth=Fk,S.flatten=U0,S.flattenDeep=CL,S.flattenDepth=IL,S.flip=Qk,S.flow=WD,S.flowRight=qD,S.fromPairs=RL,S.functions=qB,S.functionsIn=YB,S.groupBy=Nk,S.initial=ML,S.intersection=OL,S.intersectionBy=FL,S.intersectionWith=NL,S.invert=ZB,S.invertBy=QB,S.invokeMap=kk,S.iteratee=fh,S.keyBy=Bk,S.keys=St,S.keysIn=zt,S.map=Ho,S.mapKeys=eD,S.mapValues=tD,S.matches=YD,S.matchesProperty=KD,S.memoize=Vo,S.merge=rD,S.mergeWith=ov,S.method=ZD,S.methodOf=QD,S.mixin=dh,S.negate=jo,S.nthArg=e5,S.omit=nD,S.omitBy=iD,S.once=Jk,S.orderBy=Dk,S.over=t5,S.overArgs=eB,S.overEvery=r5,S.overSome=n5,S.partial=sh,S.partialRight=Q0,S.partition=Uk,S.pick=sD,S.pickBy=uv,S.property=gv,S.propertyOf=i5,S.pull=DL,S.pullAll=G0,S.pullAllBy=UL,S.pullAllWith=$L,S.pullAt=GL,S.range=s5,S.rangeRight=a5,S.rearg=tB,S.reject=Hk,S.remove=HL,S.rest=rB,S.reverse=rh,S.sampleSize=Vk,S.set=oD,S.setWith=uD,S.shuffle=jk,S.slice=zL,S.sortBy=qk,S.sortedUniq=KL,S.sortedUniqBy=ZL,S.split=MD,S.spread=nB,S.tail=QL,S.take=JL,S.takeRight=ek,S.takeRightWhile=tk,S.takeWhile=rk,S.tap=vk,S.throttle=iB,S.thru=Go,S.toArray=nv,S.toPairs=lv,S.toPairsIn=cv,S.toPath=h5,S.toPlainObject=sv,S.transform=lD,S.unary=sB,S.union=nk,S.unionBy=ik,S.unionWith=sk,S.uniq=ak,S.uniqBy=ok,S.uniqWith=uk,S.unset=cD,S.unzip=nh,S.unzipWith=H0,S.update=hD,S.updateWith=fD,S.values=Wi,S.valuesIn=dD,S.without=lk,S.words=dv,S.wrap=aB,S.xor=ck,S.xorBy=hk,S.xorWith=fk,S.zip=dk,S.zipObject=pk,S.zipObjectDeep=gk,S.zipWith=mk,S.entries=lv,S.entriesIn=cv,S.extend=av,S.extendWith=qo,dh(S,S),S.add=d5,S.attempt=pv,S.camelCase=vD,S.capitalize=hv,S.ceil=p5,S.clamp=pD,S.clone=uB,S.cloneDeep=cB,S.cloneDeepWith=hB,S.cloneWith=lB,S.conformsTo=fB,S.deburr=fv,S.defaultTo=XD,S.divide=g5,S.endsWith=_D,S.eq=Er,S.escape=yD,S.escapeRegExp=xD,S.every=Ck,S.find=Rk,S.findIndex=B0,S.findKey=HB,S.findLast=Pk,S.findLastIndex=D0,S.findLastKey=zB,S.floor=m5,S.forEach=V0,S.forEachRight=j0,S.forIn=VB,S.forInRight=jB,S.forOwn=XB,S.forOwnRight=WB,S.get=uh,S.gt=dB,S.gte=pB,S.has=KB,S.hasIn=lh,S.head=$0,S.identity=Vt,S.includes=Lk,S.indexOf=PL,S.inRange=gD,S.invoke=JB,S.isArguments=Kn,S.isArray=ye,S.isArrayBuffer=gB,S.isArrayLike=Ht,S.isArrayLikeObject=gt,S.isBoolean=mB,S.isBuffer=yn,S.isDate=vB,S.isElement=_B,S.isEmpty=yB,S.isEqual=xB,S.isEqualWith=bB,S.isError=ah,S.isFinite=TB,S.isFunction=Zr,S.isInteger=J0,S.isLength=Xo,S.isMap=ev,S.isMatch=wB,S.isMatchWith=SB,S.isNaN=AB,S.isNative=EB,S.isNil=IB,S.isNull=CB,S.isNumber=tv,S.isObject=ct,S.isObjectLike=dt,S.isPlainObject=Gs,S.isRegExp=oh,S.isSafeInteger=RB,S.isSet=rv,S.isString=Wo,S.isSymbol=Qt,S.isTypedArray=Xi,S.isUndefined=PB,S.isWeakMap=MB,S.isWeakSet=OB,S.join=LL,S.kebabCase=bD,S.last=cr,S.lastIndexOf=kL,S.lowerCase=TD,S.lowerFirst=wD,S.lt=FB,S.lte=NB,S.max=v5,S.maxBy=_5,S.mean=y5,S.meanBy=x5,S.min=b5,S.minBy=T5,S.stubArray=gh,S.stubFalse=mh,S.stubObject=o5,S.stubString=u5,S.stubTrue=l5,S.multiply=w5,S.nth=BL,S.noConflict=JD,S.noop=ph,S.now=zo,S.pad=SD,S.padEnd=AD,S.padStart=ED,S.parseInt=CD,S.random=mD,S.reduce=$k,S.reduceRight=Gk,S.repeat=ID,S.replace=RD,S.result=aD,S.round=S5,S.runInContext=P,S.sample=zk,S.size=Xk,S.snakeCase=PD,S.some=Wk,S.sortedIndex=VL,S.sortedIndexBy=jL,S.sortedIndexOf=XL,S.sortedLastIndex=WL,S.sortedLastIndexBy=qL,S.sortedLastIndexOf=YL,S.startCase=OD,S.startsWith=FD,S.subtract=A5,S.sum=E5,S.sumBy=C5,S.template=ND,S.times=c5,S.toFinite=Qr,S.toInteger=xe,S.toLength=iv,S.toLower=LD,S.toNumber=hr,S.toSafeInteger=LB,S.toString=Xe,S.toUpper=kD,S.trim=BD,S.trimEnd=DD,S.trimStart=UD,S.truncate=$D,S.unescape=GD,S.uniqueId=f5,S.upperCase=HD,S.upperFirst=ch,S.each=V0,S.eachRight=j0,S.first=$0,dh(S,function(){var s={};return kr(S,function(o,f){qe.call(S.prototype,f)||(s[f]=o)}),s}(),{chain:!1}),S.VERSION=n,sr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){S[s].placeholder=S}),sr(["drop","take"],function(s,o){Me.prototype[s]=function(f){f=f===r?1:xt(xe(f),0);var v=this.__filtered__&&!o?new Me(this):this.clone();return v.__filtered__?v.__takeCount__=Ot(f,v.__takeCount__):v.__views__.push({size:Ot(f,q),type:s+(v.__dir__<0?"Right":"")}),v},Me.prototype[s+"Right"]=function(f){return this.reverse()[s](f).reverse()}}),sr(["filter","map","takeWhile"],function(s,o){var f=o+1,v=f==G||f==ie;Me.prototype[s]=function(T){var A=this.clone();return A.__iteratees__.push({iteratee:oe(T,3),type:f}),A.__filtered__=A.__filtered__||v,A}}),sr(["head","last"],function(s,o){var f="take"+(o?"Right":"");Me.prototype[s]=function(){return this[f](1).value()[0]}}),sr(["initial","tail"],function(s,o){var f="drop"+(o?"":"Right");Me.prototype[s]=function(){return this.__filtered__?new Me(this):this[f](1)}}),Me.prototype.compact=function(){return this.filter(Vt)},Me.prototype.find=function(s){return this.filter(s).head()},Me.prototype.findLast=function(s){return this.reverse().find(s)},Me.prototype.invokeMap=Se(function(s,o){return typeof s=="function"?new Me(this):this.map(function(f){return Ls(f,s,o)})}),Me.prototype.reject=function(s){return this.filter(jo(oe(s)))},Me.prototype.slice=function(s,o){s=xe(s);var f=this;return f.__filtered__&&(s>0||o<0)?new Me(f):(s<0?f=f.takeRight(-s):s&&(f=f.drop(s)),o!==r&&(o=xe(o),f=o<0?f.dropRight(-o):f.take(o-s)),f)},Me.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Me.prototype.toArray=function(){return this.take(q)},kr(Me.prototype,function(s,o){var f=/^(?:filter|find|map|reject)|While$/.test(o),v=/^(?:head|last)$/.test(o),T=S[v?"take"+(o=="last"?"Right":""):o],A=v||/^find/.test(o);T&&(S.prototype[o]=function(){var C=this.__wrapped__,R=v?[1]:arguments,M=C instanceof Me,U=R[0],$=M||ye(C),z=function(Ie){var Ne=T.apply(S,fn([Ie],R));return v&&K?Ne[0]:Ne};$&&f&&typeof U=="function"&&U.length!=1&&(M=$=!1);var K=this.__chain__,te=!!this.__actions__.length,le=A&&!K,Te=M&&!te;if(!A&&$){C=Te?C:new Me(this);var ce=s.apply(C,R);return ce.__actions__.push({func:Go,args:[z],thisArg:r}),new or(ce,K)}return le&&Te?s.apply(this,R):(ce=this.thru(z),le?v?ce.value()[0]:ce.value():ce)})}),sr(["pop","push","shift","sort","splice","unshift"],function(s){var o=fo[s],f=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",v=/^(?:pop|shift)$/.test(s);S.prototype[s]=function(){var T=arguments;if(v&&!this.__chain__){var A=this.value();return o.apply(ye(A)?A:[],T)}return this[f](function(C){return o.apply(ye(C)?C:[],T)})}}),kr(Me.prototype,function(s,o){var f=S[o];if(f){var v=f.name+"";qe.call(Gi,v)||(Gi[v]=[]),Gi[v].push({name:o,func:f})}}),Gi[No(r,x).name]=[{name:"wrapper",func:r}],Me.prototype.clone=GN,Me.prototype.reverse=HN,Me.prototype.value=zN,S.prototype.at=_k,S.prototype.chain=yk,S.prototype.commit=xk,S.prototype.next=bk,S.prototype.plant=wk,S.prototype.reverse=Sk,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=Ak,S.prototype.first=S.prototype.head,Is&&(S.prototype[Is]=Tk),S},Di=xN();Hn?((Hn.exports=Di)._=Di,fc._=Di):Ct._=Di}).call(At)}(to,to.exports);var Pg=to.exports;const nO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},Mg=re.forwardRef((t,e)=>{const[r,n]=re.useState([]),[,i]=re.useState(0),[a,u]=re.useState([]),[,l]=W.useState(!1),[h,p]=WM({autoPlay:!1}),g=W.useRef(null),c=W.useRef(null),d=W.useRef(nO),m=W.useRef(),{tl:_,dragModeRef:y}=W.useContext(bn),{frames:b,delays:x}=h,{src:E,startAt:w,endAt:I,frameStartAt:O,frameEndAt:F,loop:N,visible:L,disabled:B,transformation:{width:V=0,height:Y=0,x:ae,y:j,colorCorrection:G={}},pointerdown:se}=t,{temperatureFilter:ie,sharpnessFilter:H,hueFilter:J,blurFilter:ge,adjustmentFilter:X,vignetteFilter:q,noiseFilter:ue}=Bn(G),{blurRadius:he=0,vignette:me=0,noise:pe=0}=G,Pe=.1;tO(E,p),ht(Ye.PAUSE,()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)}),ht(Ye.SEEK_END,()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)}),ht(Ye.SCRUBBER_CLICKED,()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)}),re.useEffect(()=>{d.current&&g.current&&(y.current?(g.current.stop(),d.current.isPlaying=!1,d.current.isDragging=!0):d.current.isDragging=!1)},[y]),re.useEffect(()=>{if(!Qi(b)){const Ae=wM(b,fe=>{const{data:Fe,width:qt,height:$t}=fe,ft=new Uint8Array(Fe);return jt.Texture.fromBuffer(ft,qt,$t)}),_e=Ae.map((fe,Fe)=>({texture:fe,time:x[Fe]}));n(Ae),u(_e);let st=0;x.forEach(fe=>{st+=fe*10}),i(st),d.current.totalDuration=st,d.current.totalFrames=b.length}},[b,x]);const $e=Pg.debounce(Ae=>{if(g.current){let _e=Ae===0?0:Ae/Pe;_e=isNaN(_e)?0:_e;const st=d.current.totalFrames;_e=_e>st?st:_e,_e>=st?(g.current.gotoAndStop(0),d.current.isPlaying=!1):(g.current.gotoAndPlay(_e||0),d.current.isPlaying=!0)}},20),je=Pg.debounce(()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)},50),Ze=Ae=>{if(g.current){let _e=Ae===0?0:Ae/Pe;_e=isNaN(_e)?0:_e;const st=d.current.totalFrames;_e=_e>st?st:_e,_e>=st?(g.current.gotoAndStop(0),d.current.isPlaying=!1):(g.current.gotoAndPlay(_e||0),d.current.isPlaying=!0)}},be=()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)},Ce=()=>{g.current&&(g.current.stop(),d.current.isPlaying=!1)},Ge=Ae=>{var st;const _e=Ae+((st=m.current)==null?void 0:st.time());g.current&&y.current?($e(_e),je(),d.current.isPlaying=!1):m.current&&g.current&&!d.current.isPlaying&&m.current.isActive()&&_.current.isActive()&&($e(_e),d.current.isPlaying=!0)},et=()=>{l(!0)};return W.useEffect(()=>{let Ae=ee.context(()=>{});if(c.current&&_.current){const _e={duration:Number(F)-Number(O),onStart:Ze,onComplete:be,onStartParams:[O,F],onCompleteParams:[],onInterrupt:Ce,onUpdate:Ge,onUpdateParams:[O,F]};m.current&&m.current.kill(),Ae=ee.context(()=>{m.current=ee.from(c.current,_e,O),_.current.add(m.current,w)})}return()=>{m.current&&(m.current.kill(),ee.killTweensOf(m.current)),Ae.revert()}},[w,I,O,F]),we.jsx(en,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:we.jsx(ke.Container,{ref:c,children:r&&r.length>0&&we.jsx(Rg,{x:ae,y:j,width:V,height:Y,animationSpeed:1,alpha:L?1:0,loop:N,textures:a,onComplete:et,anchor:.5,forwardRef:g,...!B&&L&&{interactive:!0,pointerdown:se},filters:[ie,H,J,X,...he>0?[ge]:[],...me>0?[q]:[],...pe>0?[ue]:[]]})})})});Mg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const iO=re.forwardRef((t,e)=>{const n=W.useRef(null),i=W.useRef(0),a=W.useRef(null),u=W.useRef(null),l=W.useRef(16),h=W.useRef(null),{visible:p,text:g,disabled:c,transformation:d,pointerdown:m,onDobuleClick:_}=t,{x:y,y:b,fontFamily:x="Arial",fontWeight:E="normal",fontStyle:w="normal",fontSize:I=16,fontVariant:O="normal",fill:F="black",stroke:N,strokeThickness:L=0,blurRadius:B=0,blurEnabled:V=!1,dropShadowColor:Y=null,dropShadow:ae=!1,dropShadowBlur:j=0,wordWrapWidth:G=5e7,leading:se=0,letterSpacing:ie,colorCorrection:H={}}=d,{temperatureFilter:J,sharpnessFilter:ge,hueFilter:X,blurFilter:q,adjustmentFilter:ue}=Bn(H),{blurRadius:he=0}=H;re.useEffect(()=>{l.current=Number(I)},[I]);const me=["italic","oblique"].includes(w)?w:void 0,pe=["small-caps"].includes(O),Pe=["bold","bolder","lighter","100","200","300"].includes(E)?E:void 0,$e=Number(ie)>0?ie:void 0,je=re.useMemo(()=>new jt.TextStyle({fontFamily:x,fontSize:I,fill:F||"white",...N&&L>0&&{stroke:N,strokeThickness:L},...me&&{fontStyle:me},...pe&&{fontVariant:pe},...Pe&&{fontWeight:Pe},...$e&&{letterSpacing:$e},...V&&{dropShadow:!0,dropShadowBlur:Number(B),dropShadowColor:(Y==null?void 0:Y.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...ae&&{dropShadow:!0,dropShadowBlur:Number(j),dropShadowColor:(Y==null?void 0:Y.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:G||500,leading:se||0}),[V,B,F,x,I,w,se,me,Pe,pe,$e,Y,N,L,G,ae,j]);re.useEffect(()=>{h.current={...d}},[d]);const Ze=()=>{const Ce=new Date().getTime();Ce-i.current<300&&_?_():m&&m(),i.current=Ce},be=()=>{!c&&_&&_()};return we.jsx(en,{...t,ref:e,isText:!0,onDoubleClick:be,children:we.jsx(ke.Container,{ref:n,children:we.jsx(ke.Container,{alpha:1,ref:u,children:we.jsx(ke.Text,{style:je,x:y,y:b,anchor:.5,text:g,alpha:p?1:0,...p&&!c&&{interactive:!0,buttonMode:!0,pointerdown:Ze},ref:a,filters:[J,ge,X,ue,...he>0?[q]:[]]})})})})});var sO=Ir,aO=function(){return sO.Date.now()},oO=aO,uO=/\s/;function lO(t){for(var e=t.length;e--&&uO.test(t.charAt(e)););return e}var cO=lO,hO=cO,fO=/^\s+/;function dO(t){return t&&t.slice(0,hO(t)+1).replace(fO,"")}var pO=dO,gO=pO,Og=Ki,mO=Ka,Fg=0/0,vO=/^[-+]0x[0-9a-f]+$/i,_O=/^0b[01]+$/i,yO=/^0o[0-7]+$/i,xO=parseInt;function bO(t){if(typeof t=="number")return t;if(mO(t))return Fg;if(Og(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Og(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=gO(t);var r=_O.test(t);return r||yO.test(t)?xO(t.slice(2),r?2:8):vO.test(t)?Fg:+t}var TO=bO,wO=Ki,Wl=oO,Ng=TO,SO="Expected a function",AO=Math.max,EO=Math.min;function CO(t,e,r){var n,i,a,u,l,h,p=0,g=!1,c=!1,d=!0;if(typeof t!="function")throw new TypeError(SO);e=Ng(e)||0,wO(r)&&(g=!!r.leading,c="maxWait"in r,a=c?AO(Ng(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d);function m(F){var N=n,L=i;return n=i=void 0,p=F,u=t.apply(L,N),u}function _(F){return p=F,l=setTimeout(x,e),g?m(F):u}function y(F){var N=F-h,L=F-p,B=e-N;return c?EO(B,a-L):B}function b(F){var N=F-h,L=F-p;return h===void 0||N>=e||N<0||c&&L>=a}function x(){var F=Wl();if(b(F))return E(F);l=setTimeout(x,y(F))}function E(F){return l=void 0,d&&n?m(F):(n=i=void 0,u)}function w(){l!==void 0&&clearTimeout(l),p=0,n=h=i=l=void 0}function I(){return l===void 0?u:E(Wl())}function O(){var F=Wl(),N=b(F);if(n=arguments,i=this,h=F,N){if(l===void 0)return _(h);if(c)return clearTimeout(l),l=setTimeout(x,e),m(h)}return l===void 0&&(l=setTimeout(x,e)),u}return O.cancel=w,O.flush=I,O}var IO=CO;const ro=Zn(IO),ql=(t,e,r,n)=>{const i=W.useCallback(ro(t,n),[t,n]),a=W.useCallback(ro(e,n),[e,n]),u=W.useCallback(ro(r,n),[r,n]),l=W.useCallback(()=>{i()},[i]),h=W.useCallback(()=>{a()},[a]),p=W.useCallback(()=>{u()},[u]);return{onPointerOver:l,onPointerDown:h,onPointerOut:p}},RO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Lg=re.forwardRef((t,e)=>{const[r,n]=re.useState(0),[i,a]=re.useState(),u=W.useRef(null),l=W.useRef(null),h=W.useRef(null),p=W.useRef(RO),g=W.useRef(),{uniqueId:c,mute:d=!1,src:m,startAt:_,endAt:y,frameStartAt:b,frameEndAt:x,visible:E,disabled:w,transformation:{x:I,y:O,width:F,height:N,animation:L,colorCorrection:B={}},pointerdown:V=()=>{},pointerout:Y=()=>{},pointerover:ae=()=>{},fps:j=0}=t,{tl:G,dragModeRef:se,isRemotion:ie}=W.useContext(bn),{onPointerDown:H,onPointerOut:J,onPointerOver:ge}=ql(ae,V,Y,1),{blurRadius:X=0,vignette:q=0,noise:ue=0}=B,{temperatureFilter:he,sharpnessFilter:me,hueFilter:pe,blurFilter:Pe,adjustmentFilter:$e,vignetteFilter:je,noiseFilter:Ze}=Bn(B),be=m||"",Ce=re.useMemo(()=>{const fe=document.createElement("video");return fe.src=m,fe.crossOrigin="Anonymus",fe.autoplay=!1,fe.currentTime=b===0?.001:b,fe},[m,b]);ht(Ye.PAUSE,()=>{h.current&&(h.current.pause(),p.current.isPlaying=!1)}),ht(Ye.SCRUBBER_CLICKED,()=>{h.current&&(h.current.pause(),p.current.isPlaying=!1)}),ht(Ye.REVERSE_MODE_END,()=>{h.current&&(h.current.pause(),p.current.isPlaying=!1)});const Ge=re.useCallback(ro(()=>{if(h.current){const fe=h.current;fe.currentTime>0&&!fe.paused&&!fe.ended&&fe.readyState>fe.HAVE_CURRENT_DATA&&h.current.pause(),p.current.isPlaying=!1}},400),[h]);re.useEffect(()=>{h.current&&!ie?(se.current?(Ge(),p.current.isPlaying=!1,p.current.isDragging=!0):p.current.isDragging=!1,h.current.muted=d):p.current.isDragging=!1},[d,se,Ge,h]);const et=fe=>{if(h.current){if(h.current.currentTime=Number(fe),!se.current){const Fe=h.current,qt=Fe.currentTime>0&&!Fe.paused&&!Fe.ended&&Fe.readyState>Fe.HAVE_CURRENT_DATA;G.current&&G.current.isActive()&&g.current&&g.current.isActive()&&(qt||h.current.play(),p.current.isPlaying=!0,n($t=>$t+1))}p.current.progress=0}},Ae=()=>{if(h.current){const fe=h.current;fe.currentTime>0&&!fe.paused&&!fe.ended&&fe.readyState>fe.HAVE_CURRENT_DATA&&h.current.pause(),p.current.isPlaying=!1,g.current&&(p.current.progress=g.current.progress())}},_e=()=>{},st=()=>{var fe,Fe;if(g.current&&(p.current.progress=g.current.progress()),h.current&&g.current){const qt=b+((fe=g==null?void 0:g.current)==null?void 0:fe.time()),$t=Math.abs(h.current.currentTime-qt),ft=h.current,nr=ft.currentTime>0&&!ft.paused&&!ft.ended&&ft.readyState>ft.HAVE_CURRENT_DATA;se.current?(h.current.currentTime=qt,setTimeout(()=>{h.current&&h.current.play().then(()=>{p.current.isPlaying=!1,h.current&&h.current.pause()})},100),p.current.isPlaying=!1):(nr!==p.current.isPlaying||!nr)&&p.current.progress>.01&&p.current.progress<.99?(Fe=G.current)!=null&&Fe.isActive()&&g.current&&g.current.isActive()&&(nr||h.current.play(),p.current.isPlaying=!0):$t>.3&&p.current.progress>.01&&p.current.progress<.99&&(h.current.currentTime=qt)}};return W.useEffect(()=>{let fe=ee.context(()=>{});if(l.current&&G.current){const Fe={duration:Number(x)-Number(b),onStart:et,onComplete:Ae,onStartParams:[b,x],onCompleteParams:[],onInterrupt:_e,onUpdate:st,onUpdateParams:[b,x],onPause:()=>{console.log("onPause video sprite pause",c)},onResume:()=>{console.log("onResume video sprite resume",c)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",c)},onKill:()=>{console.log("onKill video sprite kill",c)}};fe=ee.context(()=>{g.current=ee.from(l.current,Fe,b),G.current.add(g.current,_)})}return()=>{g.current&&(g.current.kill(),ee.killTweensOf(g.current)),fe.revert()}},[L,_,y,b,x]),re.useEffect(()=>{h.current&&(h.current.muted=d)},[d]),re.useEffect(()=>{const fe=Math.round((Number(b)+Number.EPSILON)*100)/100,Fe=function(){h.current&&(h.current.currentTime=fe)},qt=function(){if(h.current){const wr=h.current;wr.currentTime>0&&!wr.paused&&!wr.ended&&wr.readyState>wr.HAVE_CURRENT_DATA&&h.current.pause()}p.current.isWaiting=!1,p.current.isStalled=!1},$t=function(){h.current&&h.current.pause(),p.current.isWaiting=!0,p.current.isStalled=!1},ft=function(){p.current.isWaiting=!1,p.current.isStalled=!1},nr=function(){p.current.isWaiting=!1,p.current.isStalled=!0},Mi=Math.round((Number(b)+Number.EPSILON)*100)/100,Yl=Math.round((Number(x)+Number.EPSILON)*100)/100,Gn=`${be}#t=${Mi},${Yl}`;return jt.Texture.fromLoader(Ce,Gn,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:j?Math.max(120,Number(j)):30}}).then(wr=>{wr&&(a(wr),h.current=wr.baseTexture.resource.source,h.current.id=c,h.current.addEventListener("loadedmetadata",Fe),h.current.addEventListener("ended",qt),h.current.addEventListener("loadstart",$t),h.current.addEventListener("canplaythrough",ft),h.current.addEventListener("stalled",nr))}),()=>{h.current&&(h.current.pause(),h.current.removeEventListener("loadedmetadata",Fe),h.current.removeEventListener("ended",qt),h.current.removeEventListener("loadstart",$t),h.current.removeEventListener("canplaythrough",ft),h.current.removeEventListener("stalled",nr))}},[be,c,b,x,Ce]),re.useEffect(()=>{const fe=setTimeout(()=>{i&&g.current&&G.current&&g.current.progress()<.1&&h.current&&!g.current.isActive()&&!ie&&h.current.play().then(()=>{p.current.isPlaying=!1,h.current&&h.current.pause()})},30);return()=>{clearTimeout(fe)}},[i]),re.useEffect(()=>{G.current&&!G.current.isActive()&&!ie&&(p.current.isPlaying=!1,h.current&&h.current.pause());const fe=setTimeout(()=>{if(i&&G.current&&r>0&&!ie){G.current.isActive()||(p.current.isPlaying=!1,h.current&&h.current.pause());const Fe=h.current;Fe&&G.current.isActive()&&g.current&&g.current.isActive()&&(Fe.currentTime>0&&!Fe.paused&&!Fe.ended&&Fe.readyState>Fe.HAVE_CURRENT_DATA||h.current.play(),p.current.isPlaying=!0)}},10);return()=>{clearTimeout(fe)}},[r,i]),we.jsx(en,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:H,pointerover:ge,pointerout:J,children:we.jsx(ke.Container,{ref:l,children:i&&we.jsx(ke.Sprite,{texture:i,width:F,height:N,anchor:.5,x:I,y:O,ref:u,alpha:E?1:0,...!w&&E&&{interactive:!0,pointerdown:V},filters:[he,me,pe,$e,...X>0?[Pe]:[],...q>0?[je]:[],...ue>0?[Ze]:[]]})})})});Lg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const PO=re.forwardRef((t,e)=>{const[r,n]=re.useState(),i=W.useRef(null),a=W.useRef(null),{visible:u,disabled:l,transformation:{x:h,y:p,width:g,height:c,colorCorrection:d={}},pointerdown:m=()=>{},pointerout:_=()=>{},pointerover:y=()=>{},canvasImageRef:b}=t,x=b&&(b==null?void 0:b.getCanvas()),E=ke.useApp(),{onPointerDown:w,onPointerOut:I,onPointerOver:O}=ql(y,m,_,1),{blurRadius:F=0,vignette:N=0,noise:L=0}=d,{temperatureFilter:B,sharpnessFilter:V,hueFilter:Y,blurFilter:ae,adjustmentFilter:j,vignetteFilter:G,noiseFilter:se}=Bn(d);return ke.useTick(()=>{if(i.current&&i.current.texture){const ie=i.current.texture.baseTexture;ie&&ie.update(),a.current&&E.renderer.render(a.current)}}),re.useEffect(()=>{if(!Qi(x)){const ie=jt.Texture.from(x);n(ie)}},[x]),we.jsx(en,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:w,pointerover:O,pointerout:I,children:we.jsx(ke.Container,{ref:a,children:r&&we.jsx(ke.Sprite,{texture:r,width:g,height:c,anchor:.5,x:h,y:p,ref:i,alpha:u?1:0,...!l&&u&&{interactive:!0,pointerdown:m},filters:[B,V,Y,j,...F>0?[ae]:[],...N>0?[G]:[],...L>0?[se]:[]]})})})}),MO=t=>{const{startAt:e,endAt:r,uniqueId:n}=t,i=W.useRef(null),a=W.useRef(null),u=W.useRef(null),l=W.useRef(null),h=W.useRef(!1),{tl:p,totalDuration:g=0,reverseModeRef:c}=W.useContext(bn),d=e<.2?"static":"none",m=W.useRef(1);ht(Ye.COMPLETE,()=>{i.current&&(i.current.eventMode=d)}),ht(Ye.REVERSE_MODE_END,()=>{if(p.current){const y=p.current.time();y>e&&y<r?(a.current&&(a.current.alpha=1),i.current&&(i.current.alpha=1,i.current.eventMode="static")):(a.current&&(a.current.alpha=0),i.current&&(i.current.alpha=0,i.current.eventMode="none"))}});const _=()=>{if(c.current&&l.current&&p.current){h.current=!0;const y=p.current.time();y>e&&y<r?(a.current&&(a.current.alpha=1),i.current&&(i.current.alpha=1)):(a.current&&(a.current.alpha=0),i.current&&(i.current.alpha=0))}};return ht(Ye.COMPLETE,()=>{}),re.useEffect(()=>{const y=ee.context(()=>{if(i.current&&p.current){const b=ee.to(i.current,{alpha:1,duration:.1});l.current=ee.to(a.current,{alpha:1,duration:Number(r)-Number(e),onStart:()=>{i.current&&(i.current.alpha=1,i.current.eventMode="static",m.current=1)},onUpdate:_,onComplete:()=>{i.current&&(i.current.alpha=0,i.current.eventMode="none",m.current=0)}}),p.current.add([b,l.current],e)}});return()=>{l.current&&(p.current.remove(l.current),l.current.progress(0).kill()),y.revert()}},[e,r,g,n]),we.jsx(ke.Container,{ref:i,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:we.jsx(ke.Container,{ref:u,children:we.jsx(ke.Container,{ref:a,alpha:1,children:t.children})})})},OO=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:n}=W.useContext(bn);return re.useEffect(()=>{n&&n(Number(r)+.2)},[e,r]),t.children},FO=re.forwardRef((t,e)=>{const[r,n]=re.useState(),i=W.useRef(null),a=W.useRef(null),{visible:u,disabled:l,transformation:{x:h,y:p,width:g,height:c,colorCorrection:d={}},pointerdown:m=()=>{},pointerout:_=()=>{},pointerover:y=()=>{},canvasImageRef:b}=t,x=b&&(b==null?void 0:b.getCanvas()),E=ke.useApp(),{onPointerDown:w,onPointerOut:I,onPointerOver:O}=ql(y,m,_,1),{blurRadius:F=0,vignette:N=0,noise:L=0}=d,{temperatureFilter:B,sharpnessFilter:V,hueFilter:Y,blurFilter:ae,adjustmentFilter:j,vignetteFilter:G,noiseFilter:se}=Bn(d);return ke.useTick(()=>{if(i.current&&i.current.texture){const ie=i.current.texture.baseTexture;ie&&ie.update(),a.current&&E.renderer.render(a.current)}}),re.useEffect(()=>{if(!Qi(x)){const ie=jt.Texture.from(x);n(ie)}},[x]),we.jsx(en,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:w,pointerover:O,pointerout:I,children:we.jsx(ke.Container,{ref:a,children:r&&we.jsx(ke.Sprite,{texture:r,width:g,height:c,anchor:.5,x:h,y:p,ref:i,alpha:u?1:0,...!l&&u&&{interactive:!0,pointerdown:m},filters:[B,V,Y,j,...F>0?[ae]:[],...N>0?[G]:[],...L>0?[se]:[]]})})})});var kg=(t=>(t.NONE="NONE",t.FLASH="FLASH",t.PULSE="PULSE",t.SHAKE="SHAKE",t.SWING="SWING",t.JELLO="JELLO",t.WOOBLE="WOOBLE",t.FADE_IN="FADE_IN",t.FADE_OUT="FADE_OUT",t.FADE_IN_OUT="FADE_IN_OUT",t.SLIDE_IN_LEFT="SLIDE_IN_LEFT",t.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",t.SLIDE_IN_TOP="SLIDE_IN_TOP",t.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",t.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",t.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",t.SLIDE_OUT_TOP="SLIDE_OUT_TOP",t.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",t.ZOOM_IN="ZOOM_IN",t.ZOOM_OUT="ZOOM_OUT",t.ZOOM_IN_OUT="ZOOM_IN_OUT",t.BOUNCE_IN="BOUNCE_IN",t.BOUNCE_OUT="BOUNCE_OUT",t.BOUNCE_IN_OUT="BOUNCE_IN_OUT",t.BOUNCE_IN_DOWN="BOUNCE_IN_DOWN",t.BOUNCE_IN_LEFT="BOUNCE_IN_LEFT",t.BOUNCE_IN_RIGHT="BOUNCE_IN_RIGHT",t.BOUNCE_IN_UP="BOUNCE_IN_UP",t.BOUNCE_OUT_DOWN="BOUNCE_OUT_DOWN",t.BOUNCE_OUT_LEFT="BOUNCE_OUT_LEFT",t.BOUNCE_OUT_RIGHT="BOUNCE_OUT_RIGHT",t.BOUNCE_OUT_UP="BOUNCE_OUT_UP",t.FADE_IN_DOWN="FADE_IN_DOWN",t.FADE_IN_LEFT="FADE_IN_LEFT",t.FADE_IN_RIGHT="FADE_IN_RIGHT",t.FADE_IN_UP="FADE_IN_UP",t.FADE_OUT_DOWN="FADE_OUT_DOWN",t.FADE_OUT_LEFT="FADE_OUT_LEFT",t.FADE_OUT_RIGHT="FADE_OUT_RIGHT",t.FADE_OUT_UP="FADE_OUT_UP",t.ELASTIC_IN="ELASTIC_IN",t.ELASTIC_OUT="ELASTIC_OUT",t.ELASTIC_IN_OUT="ELASTIC_IN_OUT",t.BACK_IN="BACK_IN",t.BACK_OUT="BACK_OUT",t.BACK_IN_OUT="BACK_IN_OUT",t.CIRCULAR_IN="CIRCULAR_IN",t.CIRCULAR_OUT="CIRCULAR_OUT",t.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",t.EXPO_IN="EXPO_IN",t.EXPO_OUT="EXPO_OUT",t.EXPO_IN_OUT="EXPO_IN_OUT",t.SINE_IN="SINE_IN",t.SINE_OUT="SINE_OUT",t.SINE_IN_OUT="SINE_IN_OUT",t.BOUNCE="BOUNCE",t.ELASTIC="ELASTIC",t.BACK="BACK",t.CIRCULAR="CIRCULAR",t.EXPO="EXPO",t.SINE="SINE",t))(kg||{}),Bg=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t))(Bg||{});/*!
1993
+ * paths 3.11.5
1994
+ * https://greensock.com
1995
+ *
1996
+ * Copyright 2008-2023, GreenSock. All rights reserved.
1997
+ * Subject to the terms at https://greensock.com/standard-license or for
1998
+ * Club GreenSock members, the agreement issued with that membership.
1999
+ * @author: Jack Doyle, jack@greensock.com
2000
+ */var NO=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,LO=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,kO=Math.PI/180,no=Math.sin,io=Math.cos,Ss=Math.abs,As=Math.sqrt,BO=function(e){return typeof e=="number"},Dg=1e5,cn=function(e){return Math.round(e*Dg)/Dg||0};function DO(t,e,r,n,i,a,u){for(var l=t.length,h,p,g,c,d;--l>-1;)for(h=t[l],p=h.length,g=0;g<p;g+=2)c=h[g],d=h[g+1],h[g]=c*e+d*n+a,h[g+1]=c*r+d*i+u;return t._dirty=1,t}function UO(t,e,r,n,i,a,u,l,h){if(!(t===l&&e===h)){r=Ss(r),n=Ss(n);var p=i%360*kO,g=io(p),c=no(p),d=Math.PI,m=d*2,_=(t-l)/2,y=(e-h)/2,b=g*_+c*y,x=-c*_+g*y,E=b*b,w=x*x,I=E/(r*r)+w/(n*n);I>1&&(r=As(I)*r,n=As(I)*n);var O=r*r,F=n*n,N=(O*F-O*w-F*E)/(O*w+F*E);N<0&&(N=0);var L=(a===u?-1:1)*As(N),B=L*(r*x/n),V=L*-(n*b/r),Y=(t+l)/2,ae=(e+h)/2,j=Y+(g*B-c*V),G=ae+(c*B+g*V),se=(b-B)/r,ie=(x-V)/n,H=(-b-B)/r,J=(-x-V)/n,ge=se*se+ie*ie,X=(ie<0?-1:1)*Math.acos(se/As(ge)),q=(se*J-ie*H<0?-1:1)*Math.acos((se*H+ie*J)/As(ge*(H*H+J*J)));isNaN(q)&&(q=d),!u&&q>0?q-=m:u&&q<0&&(q+=m),X%=m,q%=m;var ue=Math.ceil(Ss(q)/(m/4)),he=[],me=q/ue,pe=4/3*no(me/2)/(1+io(me/2)),Pe=g*r,$e=c*r,je=c*-n,Ze=g*n,be;for(be=0;be<ue;be++)i=X+be*me,b=io(i),x=no(i),se=io(i+=me),ie=no(i),he.push(b-pe*x,x+pe*b,se+pe*ie,ie-pe*se,se,ie);for(be=0;be<he.length;be+=2)b=he[be],x=he[be+1],he[be]=b*Pe+x*je+j,he[be+1]=b*$e+x*Ze+G;return he[be-2]=l,he[be-1]=h,he}}function $O(t){var e=(t+"").replace(LO,function(B){var V=+B;return V<1e-4&&V>-1e-4?0:V}).match(NO)||[],r=[],n=0,i=0,a=2/3,u=e.length,l=0,h="ERROR: malformed path: "+t,p,g,c,d,m,_,y,b,x,E,w,I,O,F,N,L=function(V,Y,ae,j){E=(ae-V)/3,w=(j-Y)/3,y.push(V+E,Y+w,ae-E,j-w,ae,j)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(h),r;for(p=0;p<u;p++)if(O=m,isNaN(e[p])?(m=e[p].toUpperCase(),_=m!==e[p]):p--,c=+e[p+1],d=+e[p+2],_&&(c+=n,d+=i),p||(b=c,x=d),m==="M")y&&(y.length<8?r.length-=1:l+=y.length),n=b=c,i=x=d,y=[c,d],r.push(y),p+=2,m="L";else if(m==="C")y||(y=[0,0]),_||(n=i=0),y.push(c,d,n+e[p+3]*1,i+e[p+4]*1,n+=e[p+5]*1,i+=e[p+6]*1),p+=6;else if(m==="S")E=n,w=i,(O==="C"||O==="S")&&(E+=n-y[y.length-4],w+=i-y[y.length-3]),_||(n=i=0),y.push(E,w,c,d,n+=e[p+3]*1,i+=e[p+4]*1),p+=4;else if(m==="Q")E=n+(c-n)*a,w=i+(d-i)*a,_||(n=i=0),n+=e[p+3]*1,i+=e[p+4]*1,y.push(E,w,n+(c-n)*a,i+(d-i)*a,n,i),p+=4;else if(m==="T")E=n-y[y.length-4],w=i-y[y.length-3],y.push(n+E,i+w,c+(n+E*1.5-c)*a,d+(i+w*1.5-d)*a,n=c,i=d),p+=2;else if(m==="H")L(n,i,n=c,i),p+=1;else if(m==="V")L(n,i,n,i=c+(_?i-n:0)),p+=1;else if(m==="L"||m==="Z")m==="Z"&&(c=b,d=x,y.closed=!0),(m==="L"||Ss(n-c)>.5||Ss(i-d)>.5)&&(L(n,i,c,d),m==="L"&&(p+=2)),n=c,i=d;else if(m==="A"){if(F=e[p+4],N=e[p+5],E=e[p+6],w=e[p+7],g=7,F.length>1&&(F.length<3?(w=E,E=N,g--):(w=N,E=F.substr(2),g-=2),N=F.charAt(1),F=F.charAt(0)),I=UO(n,i,+e[p+1],+e[p+2],+e[p+3],+F,+N,(_?n:0)+E*1,(_?i:0)+w*1),p+=g,I)for(g=0;g<I.length;g++)y.push(I[g]);n=y[y.length-2],i=y[y.length-1]}else console.log(h);return p=y.length,p<6?(r.pop(),p=0):y[0]===y[p-2]&&y[1]===y[p-1]&&(y.closed=!0),r.totalPoints=l+p,r}function GO(t){BO(t[0])&&(t=[t]);var e="",r=t.length,n,i,a,u;for(i=0;i<r;i++){for(u=t[i],e+="M"+cn(u[0])+","+cn(u[1])+" C",n=u.length,a=2;a<n;a++)e+=cn(u[a++])+","+cn(u[a++])+" "+cn(u[a++])+","+cn(u[a++])+" "+cn(u[a++])+","+cn(u[a])+" ";u.closed&&(e+="z")}return e}/*!
2001
+ * CustomEase 3.11.5
2002
+ * https://greensock.com
2003
+ *
2004
+ * @license Copyright 2008-2023, GreenSock. All rights reserved.
2005
+ * Subject to the terms at https://greensock.com/standard-license or for
2006
+ * Club GreenSock members, the agreement issued with that membership.
2007
+ * @author: Jack Doyle, jack@greensock.com
2008
+ */var Ut,Ug,$g=function(){return Ut||typeof window<"u"&&(Ut=window.gsap)&&Ut.registerPlugin&&Ut},Gg=function(){Ut=$g(),Ut?(Ut.registerEase("_CE",Es.create),Ug=1):console.warn("Please gsap.registerPlugin(CustomEase)")},HO=1e20,so=function(e){return~~(e*1e3+(e<0?-.5:.5))/1e3},zO=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,VO=/[cLlsSaAhHvVtTqQ]/g,jO=function(e){var r=e.length,n=HO,i;for(i=1;i<r;i+=6)+e[i]<n&&(n=+e[i]);return n},XO=function(e,r,n){!n&&n!==0&&(n=Math.max(+e[e.length-1],+e[1]));var i=+e[0]*-1,a=-n,u=e.length,l=1/(+e[u-2]+i),h=-r||(Math.abs(+e[u-1]-+e[1])<.01*(+e[u-2]-+e[0])?jO(e)+a:+e[u-1]+a),p;for(h?h=1/h:h=-l,p=0;p<u;p+=2)e[p]=(+e[p]+i)*l,e[p+1]=(+e[p+1]+a)*h},WO=function t(e,r,n,i,a,u,l,h,p,g,c){var d=(e+n)/2,m=(r+i)/2,_=(n+a)/2,y=(i+u)/2,b=(a+l)/2,x=(u+h)/2,E=(d+_)/2,w=(m+y)/2,I=(_+b)/2,O=(y+x)/2,F=(E+I)/2,N=(w+O)/2,L=l-e,B=h-r,V=Math.abs((n-l)*B-(i-h)*L),Y=Math.abs((a-l)*B-(u-h)*L),ae;return g||(g=[{x:e,y:r},{x:l,y:h}],c=1),g.splice(c||g.length-1,0,{x:F,y:N}),(V+Y)*(V+Y)>p*(L*L+B*B)&&(ae=g.length,t(e,r,d,m,E,w,F,N,p,g,c),t(F,N,I,O,b,x,l,h,p,g,c+1+(g.length-ae))),g},Es=function(){function t(r,n,i){Ug||Gg(),this.id=r,this.setData(n,i)}var e=t.prototype;return e.setData=function(n,i){i=i||{},n=n||"0,0,1,1";var a=n.match(zO),u=1,l=[],h=[],p=i.precision||1,g=p<=1,c,d,m,_,y,b,x,E,w;if(this.data=n,(VO.test(n)||~n.indexOf("M")&&n.indexOf("C")<0)&&(a=$O(n)[0]),c=a.length,c===4)a.unshift(0,0),a.push(1,1),c=8;else if((c-2)%6)throw"Invalid CustomEase";for((+a[0]!=0||+a[c-2]!=1)&&XO(a,i.height,i.originY),this.segment=a,_=2;_<c;_+=6)d={x:+a[_-2],y:+a[_-1]},m={x:+a[_+4],y:+a[_+5]},l.push(d,m),WO(d.x,d.y,+a[_],+a[_+1],+a[_+2],+a[_+3],m.x,m.y,1/(p*2e5),l,l.length-1);for(c=l.length,_=0;_<c;_++)x=l[_],E=l[_-1]||x,(x.x>E.x||E.y!==x.y&&E.x===x.x||x===E)&&x.x<=1?(E.cx=x.x-E.x,E.cy=x.y-E.y,E.n=x,E.nx=x.x,g&&_>1&&Math.abs(E.cy/E.cx-l[_-2].cy/l[_-2].cx)>2&&(g=0),E.cx<u&&(E.cx?u=E.cx:(E.cx=.001,_===c-1&&(E.x-=.001,u=Math.min(u,.001),g=0)))):(l.splice(_--,1),c--);if(c=1/u+1|0,y=1/c,b=0,x=l[0],g){for(_=0;_<c;_++)w=_*y,x.nx<w&&(x=l[++b]),d=x.y+(w-x.x)/x.cx*x.cy,h[_]={x:w,cx:y,y:d,cy:0,nx:9},_&&(h[_-1].cy=d-h[_-1].y);h[c-1].cy=l[l.length-1].y-d}else{for(_=0;_<c;_++)x.nx<_*y&&(x=l[++b]),h[_]=x;b<l.length-1&&(h[_-1]=l[l.length-2])}return this.ease=function(I){var O=h[I*c|0]||h[c-1];return O.nx<I&&(O=O.n),O.y+(I-O.x)/O.cx*O.cy},this.ease.custom=this,this.id&&Ut&&Ut.registerEase(this.id,this.ease),this},e.getSVGData=function(n){return t.getSVGData(this,n)},t.create=function(n,i,a){return new t(n,i,a).ease},t.register=function(n){Ut=n,Gg()},t.get=function(n){return Ut.parseEase(n)},t.getSVGData=function(n,i){i=i||{};var a=i.width||100,u=i.height||100,l=i.x||0,h=(i.y||0)+u,p=Ut.utils.toArray(i.path)[0],g,c,d,m,_,y,b,x,E,w;if(i.invert&&(u=-u,h=0),typeof n=="string"&&(n=Ut.parseEase(n)),n.custom&&(n=n.custom),n instanceof t)g=GO(DO([n.segment],a,0,0,-u,l,h));else{for(g=[l,h],b=Math.max(5,(i.precision||1)*200),m=1/b,b+=2,x=5/b,E=so(l+m*a),w=so(h+n(m)*-u),c=(w-h)/(E-l),d=2;d<b;d++)_=so(l+d*m*a),y=so(h+n(d*m)*-u),(Math.abs((y-w)/(_-E)-c)>x||d===b-1)&&(g.push(E,w),c=(y-w)/(_-E)),E=_,w=y;g="M"+g.join(",")}return p&&p.setAttribute("d",g),g},t}();$g()&&Ut.registerPlugin(Es),Es.version="3.11.5",ee.registerPlugin(Es),Es.create("springBounce","0.32, 1.06, 0.61, 0.93"),ee.registerEffect({name:"PULSE",effect(t,e){return ee.timeline().fromTo(t,{width:(e==null?void 0:e.width)*.9,height:(e==null?void 0:e.height)*.9},{width:(e==null?void 0:e.width)*1.1,height:(e==null?void 0:e.height)*1.1,duration:.5,ease:"slow"}).to(t,{...e,duration:.5})}}),ee.registerEffect({name:"SHAKE",effect(t,e){return ee.timeline().to(t,{duration:.1,x:"+=5"}).to(t,{duration:.1,x:"-=10"}).to(t,{duration:.1,x:"+=10"}).to(t,{duration:.1,x:"-=10"}).to(t,{duration:.1,x:"+=5"}).to(t,{...e,duration:.5})}}),ee.registerEffect({name:"SWING",effect(t,e){return ee.timeline().to(t,{duration:.5,rotation:1}).to(t,{duration:.5,rotation:-1}).to(t,{rotation:0,...e,duration:.5})}}),ee.registerEffect({name:"JELLO",effect(t,e){return ee.timeline().to(t,{duration:.3,width:e.width*.5,rotation:-1}).to(t,{duration:.4,width:e.width*1.2,rotation:1}).to(t,{duration:.3,width:e.width,rotation:0}).to(t,{rotation:0,...e,duration:.5})}}),ee.registerEffect({name:"WOOBLE",effect(t,e){return ee.timeline().to(t,{duration:.3,width:e.width*.5,x:e.x*-.5}).to(t,{duration:.3,width:e.width*1.5,x:e.x*1.5}).to(t,{duration:.3,width:e.width*.5,x:e.x*-.01}).to(t,{duration:.3,width:e.width,x:e.x}).to(t,{rotation:0,...e,duration:.5})}}),ee.registerEffect({name:"NONE",effect(t,e){return ee.to(t,{duration:0})}}),ee.registerEffect({name:"FLASH",effect(t,e){return ee.timeline().to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1}).to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1}).to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1,...e})}}),ee.registerEffect({name:"BOUNCE_IN",effect(t,e){return ee.timeline().fromTo(t,{width:(e==null?void 0:e.width)*1.5,height:(e==null?void 0:e.height)*1.5},{...e,duration:2,ease:"bounce.out"})}}),ee.registerEffect({name:"BOUNCE_IN_DOWN",effect(t,e){return ee.from(t,{...e,duration:2,ease:"bounce.out",y:-1500,alpha:0})}}),ee.registerEffect({name:"BOUNCE_IN_LEFT",effect(t,e){return ee.from(t,{...e,ease:"bounce.out",x:-1500,duration:2,alpha:0})}}),ee.registerEffect({name:"BOUNCE_IN_RIGHT",effect(t,e){return ee.from(t,{...e,ease:"bounce.out",x:1500,duration:2})}}),ee.registerEffect({name:"BOUNCE_IN_UP",effect(t,e){return ee.from(t,{...e,ease:"bounce.out",y:1500,duration:2})}}),ee.registerEffect({name:"BOUNCE_OUT",effect(t,e){return ee.from(t,{...e,ease:"bounce.in",y:2e3,duration:1.5})}}),ee.registerEffect({name:"FADE_IN",effect(t,e){return ee.fromTo(t,{alpha:0},{ease:"power4.in",alpha:1,duration:1,...e})}}),ee.registerEffect({name:"FADE_IN_DOWN",effect(t,e){return ee.fromTo(t,{y:-1e3,alpha:0},{ease:"power4.in",y:0,alpha:1,duration:1,...e})}}),ee.registerEffect({name:"FADE_IN_LEFT",effect(t,e){return ee.fromTo(t,{x:-1e3,alpha:0},{ease:"power4.in",x:0,alpha:1,duration:1,...e})}}),ee.registerEffect({name:"FADE_IN_RIGHT",effect(t,e){return ee.fromTo(t,{x:2e3,alpha:0},{ease:"power4.in",x:0,alpha:1,duration:1,...e})}}),ee.registerEffect({name:"FADE_IN_UP",effect(t,e){return ee.fromTo(t,{y:2e3,alpha:0},{ease:"power4.in",y:0,alpha:1,duration:.8,...e})}}),ee.registerEffect({name:"SPIN",effect(t){return ee.to(t,{rotation:(e,r)=>ee.utils.snap(360,Number(ee.getProperty(r,"rotation"))+360)})}});function qO(){return{updateEffect:W.useCallback((e,r,n)=>(console.log("useGsapEffect useEffect",r,n),ee.effects[r]&&e?ee.effects[r](e,n):ee.effects.NONE(e,n)),[])}}ze.Animations=kg,ze.BlendModes=Bg,ze.Events=Ye,ze.GsapPixieContext=bn,ze.GsapPixieContextProvider=Rv,ze.PixiAnimatedSprite=Rg,ze.PixiAudioSprite=_E,ze.PixiGifSprite=Mg,ze.PixiImageSprite=Ep,ze.PixiRemotionSprite=FO,ze.PixiSequence=MO,ze.PixiSequenceWrapper=OO,ze.PixiSvgPathSprite=vE,ze.PixiTextSprite=iO,ze.PixiVideoCanvasSyncSprite=PO,ze.PixiVideoSprite=Lg,ze.emitCustomEvent=Qn,ze.newCustomEventEmitter=Iv,ze.useCustomEventListener=ht,ze.useGsapEffect=qO,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});