reacthub-pixitweenjs 0.2.107-alpha.21 → 0.2.107-alpha.24

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
@@ -6,18 +6,18 @@
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 cv=W,hv=Symbol.for("react.element"),fv=Symbol.for("react.fragment"),dv=Object.prototype.hasOwnProperty,pv=cv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gv={key:!0,ref:!0,__self:!0,__source:!0};function lh(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)dv.call(e,n)&&!gv.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:hv,type:t,key:a,ref:u,props:i,_owner:pv.current}}Ls.Fragment=fv,Ls.jsx=lh,Ls.jsxs=lh,uh.exports=Ls;var Ee=uh.exports,vn=(t=>(t.BlackAndWhite="BlackAndWhite",t.Sepia="Sepia",t.RetroVintage="RetroVintage",t.NightVision="NightVision",t.Normal="Normal",t.Vignette="Vignette",t.None="Normal",t))(vn||{});let ch;function hh(){return ch=document.body,ch}function ct(t,e,r){let n;return W.useEffect(()=>{n=n||hh();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=hh(),n=new CustomEvent(t,{detail:e});r.dispatchEvent(n)}function mv(){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 _n=ne.createContext({}),je={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"},vv=({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),[f,p]=W.useState(!1);W.useLayoutEffect(()=>(i.current=xt.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&xt.killTweensOf(n.current),n.current=xt.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&n.current.revert(),i.current.revert()}),[]);const v=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 A=n.current;A.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){A.pause(),v()}).eventCallback("onUpdate",function(){v()}).eventCallback("onRepeat",function(){console.log("onrepeat",A.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",A.progress())}).eventCallback("onComplete",function(){A.pause(),A.revert(),qn(je.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),v()})}},[]);const c=W.useCallback(()=>{n.current&&n.current.revert()},[]),d=W.useCallback(()=>{n.current&&n.current.restart()},[]),m=W.useCallback(()=>{if(n.current){const A=n.current;A.repeat(1),A.restart()}},[]),_=W.useCallback(A=>{n.current&&n.current.seek(A)},[]),x=W.useCallback(()=>{n.current&&n.current.seek(4)},[]),b=W.useCallback(()=>{const A=n.current;return A?A.totalDuration():0},[]),w=()=>{n.current&&(n.current.pause(),qn(je.PAUSE))},E=()=>{n.current&&(n.current.resume(),qn(je.RESUME))};return ct(je.SEEK_START,()=>{l.current=!0}),ct(je.SCRUBBER_PLAY,()=>{E()}),ct(je.SCRUBBER_PAUSE,()=>{w()}),ct(je.SCRUBBER_SEEK,A=>{_(A)}),ct(je.SEEK_END,()=>{l.current=!1}),ct(je.REVERSE_MODE_START,()=>{u.current=!0}),ct(je.REVERSE_MODE_END,()=>{u.current=!1}),ct(je.SCRUBBER_PROGRESS_UPDATE,A=>{}),Ee.jsx(_n.Provider,{value:{gsapCtx:i,tl:n,handlePlay:E,handlePause:w,handleReset:c,handleSeek:_,handleSeekTest:x,handleRestart:d,handleRepeat:m,playerTimeRef:a,getTimelineDuration:b,totalDuration:e,setTotalDuration:r,reverseModeRef:u,dragModeRef:l,isRemotion:f,setIsRemotion:p},children:t})},_v=({pixiTransformerRef:t,imageRef:e,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:f=!1})=>{const p=Jt.utils.string2hex("#F3C409"),v=Jt.utils.string2hex("#F3C409"),c=ne.useRef({isDragging:!1}),d=300,m=ne.useRef(0),_=ne.useCallback(()=>{a&&!c.current.isDragging&&a(!0)},[a]),x=ne.useCallback(()=>{a&&!c.current.isDragging&&a(!1)},[a]),b=ne.useCallback(()=>{c.current.isDragging=!0;const A=new Date().getTime();A-m.current<d&&u&&u(),m.current=A},[]),w=ne.useCallback(A=>{c.current.isDragging=!0,i&&i(A),qn(je.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),E=ne.useCallback(()=>{if(e.current===null)return;const A=e.current.x,I=e.current.y,O=e.current.width,N=e.current.height,L=e.current.rotation,k=[e.current.scale.x,e.current.scale.y],D=k[0]<0?-1:1,j=k[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(A),y:Math.round(I),width:Math.round(Math.max(5,O)),height:Math.round(Math.max(5,N)),rotation:L,scale:f?k:[D,j]}}),qn(je.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),c.current.isDragging=!1},[n]);return ne.useEffect(()=>(t.current&&(t.current.on("mouseover",_),t.current.on("mouseout",x),t.current.on("mousedown",b)),()=>{t.current&&(t.current.off("mouseover",_),t.current.off("mouseout",x),t.current.off("mousedown",b))}),[]),Ee.jsx(uv.Transformer,{ref:t,group:r?[e.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:v},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:p,shape:"circle",radius:10},transformchange:w,transformcommit:E})};var yv=Object.prototype;function xv(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||yv;return t===r}var fh=xv;function bv(t,e){return function(r){return t(e(r))}}var wv=bv,Tv=wv,Sv=Tv(Object.keys,Object),Av=Sv,Ev=fh,Cv=Av,Iv=Object.prototype,Rv=Iv.hasOwnProperty;function Pv(t){if(!Ev(t))return Cv(t);var e=[];for(var r in Object(t))Rv.call(t,r)&&r!="constructor"&&e.push(r);return e}var dh=Pv,Mv=typeof At=="object"&&At&&At.Object===Object&&At,ph=Mv,Ov=ph,Fv=typeof self=="object"&&self&&self.Object===Object&&self,Nv=Ov||Fv||Function("return this")(),Er=Nv,Lv=Er,kv=Lv.Symbol,ks=kv,gh=ks,mh=Object.prototype,Bv=mh.hasOwnProperty,Dv=mh.toString,Vi=gh?gh.toStringTag:void 0;function Uv(t){var e=Bv.call(t,Vi),r=t[Vi];try{t[Vi]=void 0;var n=!0}catch{}var i=Dv.call(t);return n&&(e?t[Vi]=r:delete t[Vi]),i}var $v=Uv,Gv=Object.prototype,zv=Gv.toString;function Hv(t){return zv.call(t)}var Vv=Hv,vh=ks,Xv=$v,jv=Vv,Wv="[object Null]",qv="[object Undefined]",_h=vh?vh.toStringTag:void 0;function Yv(t){return t==null?t===void 0?qv:Wv:_h&&_h in Object(t)?Xv(t):jv(t)}var Xi=Yv;function Kv(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ji=Kv,Zv=Xi,Qv=ji,Jv="[object AsyncFunction]",e_="[object Function]",t_="[object GeneratorFunction]",r_="[object Proxy]";function n_(t){if(!Qv(t))return!1;var e=Zv(t);return e==e_||e==t_||e==Jv||e==r_}var yh=n_,i_=Er,s_=i_["__core-js_shared__"],a_=s_,Go=a_,xh=function(){var t=/[^.]+$/.exec(Go&&Go.keys&&Go.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function o_(t){return!!xh&&xh in t}var u_=o_,l_=Function.prototype,c_=l_.toString;function h_(t){if(t!=null){try{return c_.call(t)}catch{}try{return t+""}catch{}}return""}var bh=h_,f_=yh,d_=u_,p_=ji,g_=bh,m_=/[\\^$.*+?()[\]{}|]/g,v_=/^\[object .+?Constructor\]$/,__=Function.prototype,y_=Object.prototype,x_=__.toString,b_=y_.hasOwnProperty,w_=RegExp("^"+x_.call(b_).replace(m_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T_(t){if(!p_(t)||d_(t))return!1;var e=f_(t)?w_:v_;return e.test(g_(t))}var S_=T_;function A_(t,e){return t==null?void 0:t[e]}var E_=A_,C_=S_,I_=E_;function R_(t,e){var r=I_(t,e);return C_(r)?r:void 0}var Yn=R_,P_=Yn,M_=Er,O_=P_(M_,"DataView"),F_=O_,N_=Yn,L_=Er,k_=N_(L_,"Map"),zo=k_,B_=Yn,D_=Er,U_=B_(D_,"Promise"),$_=U_,G_=Yn,z_=Er,H_=G_(z_,"Set"),V_=H_,X_=Yn,j_=Er,W_=X_(j_,"WeakMap"),q_=W_,Ho=F_,Vo=zo,Xo=$_,jo=V_,Wo=q_,wh=Xi,Kn=bh,Th="[object Map]",Y_="[object Object]",Sh="[object Promise]",Ah="[object Set]",Eh="[object WeakMap]",Ch="[object DataView]",K_=Kn(Ho),Z_=Kn(Vo),Q_=Kn(Xo),J_=Kn(jo),ey=Kn(Wo),yn=wh;(Ho&&yn(new Ho(new ArrayBuffer(1)))!=Ch||Vo&&yn(new Vo)!=Th||Xo&&yn(Xo.resolve())!=Sh||jo&&yn(new jo)!=Ah||Wo&&yn(new Wo)!=Eh)&&(yn=function(t){var e=wh(t),r=e==Y_?t.constructor:void 0,n=r?Kn(r):"";if(n)switch(n){case K_:return Ch;case Z_:return Th;case Q_:return Sh;case J_:return Ah;case ey:return Eh}return e});var Ih=yn;function ty(t){return t!=null&&typeof t=="object"}var Wi=ty,ry=Xi,ny=Wi,iy="[object Arguments]";function sy(t){return ny(t)&&ry(t)==iy}var ay=sy,Rh=ay,oy=Wi,Ph=Object.prototype,uy=Ph.hasOwnProperty,ly=Ph.propertyIsEnumerable,cy=Rh(function(){return arguments}())?Rh:function(t){return oy(t)&&uy.call(t,"callee")&&!ly.call(t,"callee")},qo=cy,hy=Array.isArray,Cr=hy,fy=9007199254740991;function dy(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=fy}var Yo=dy,py=yh,gy=Yo;function my(t){return t!=null&&gy(t.length)&&!py(t)}var Bs=my,Ds={exports:{}};function vy(){return!1}var _y=vy;Ds.exports,function(t,e){var r=Er,n=_y,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}(Ds,Ds.exports);var Ko=Ds.exports,yy=Xi,xy=Yo,by=Wi,wy="[object Arguments]",Ty="[object Array]",Sy="[object Boolean]",Ay="[object Date]",Ey="[object Error]",Cy="[object Function]",Iy="[object Map]",Ry="[object Number]",Py="[object Object]",My="[object RegExp]",Oy="[object Set]",Fy="[object String]",Ny="[object WeakMap]",Ly="[object ArrayBuffer]",ky="[object DataView]",By="[object Float32Array]",Dy="[object Float64Array]",Uy="[object Int8Array]",$y="[object Int16Array]",Gy="[object Int32Array]",zy="[object Uint8Array]",Hy="[object Uint8ClampedArray]",Vy="[object Uint16Array]",Xy="[object Uint32Array]",tt={};tt[By]=tt[Dy]=tt[Uy]=tt[$y]=tt[Gy]=tt[zy]=tt[Hy]=tt[Vy]=tt[Xy]=!0,tt[wy]=tt[Ty]=tt[Ly]=tt[Sy]=tt[ky]=tt[Ay]=tt[Ey]=tt[Cy]=tt[Iy]=tt[Ry]=tt[Py]=tt[My]=tt[Oy]=tt[Fy]=tt[Ny]=!1;function jy(t){return by(t)&&xy(t.length)&&!!tt[yy(t)]}var Wy=jy;function qy(t){return function(e){return t(e)}}var Yy=qy,Us={exports:{}};Us.exports,function(t,e){var r=ph,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}(Us,Us.exports);var Ky=Us.exports,Zy=Wy,Qy=Yy,Mh=Ky,Oh=Mh&&Mh.isTypedArray,Jy=Oh?Qy(Oh):Zy,Zo=Jy,ex=dh,tx=Ih,rx=qo,nx=Cr,ix=Bs,sx=Ko,ax=fh,ox=Zo,ux="[object Map]",lx="[object Set]",cx=Object.prototype,hx=cx.hasOwnProperty;function fx(t){if(t==null)return!0;if(ix(t)&&(nx(t)||typeof t=="string"||typeof t.splice=="function"||sx(t)||ox(t)||rx(t)))return!t.length;var e=tx(t);if(e==ux||e==lx)return!t.size;if(ax(t))return!ex(t).length;for(var r in t)if(hx.call(t,r))return!1;return!0}var dx=fx;const $s=Wn(dx);var Qo=(t=>(t.NONE="none",t.NORMAL="normal",t.LENSFLARE="lensflare",t.FILMSTRIP="filmstrip",t.GRUNGE="grunge",t.BRICKS="bricks",t))(Qo||{});const Fh={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}},px=t=>{const{overlay:e,width:r,height:n,x:i,y:a}=t,{src:u,blendmode:l}=Fh[e]||Fh.normal;return Ee.jsx(Xe.TilingSprite,{image:u,width:r,height:n,x:i,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},gx=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],xn=ne.forwardRef((t,e)=>{const[r,n]=ne.useState(!1),[i,a]=W.useState(!1),[u,l]=W.useState(!1),f=W.useRef(null),p=W.useRef(null),v=W.useRef(null),c=W.useRef(null),{uniqueId:d,visible:m,transformation:{x:_,y:x,width:b,height:w,scale:E=[1,1],rotation:A=0,effect:I,overlay:O},applyTransformer:N,disabled:L,pointerdown:k,pointerout:D,pointerover:j,isText:Q,isDragging:fe,isGif:H,onDoubleClick:V,isTextEditMode:le}=t;ct(je.COMPLETE,()=>{f.current}),ne.useImperativeHandle(e,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>u}),[i,u]),ne.useEffect(()=>{f.current&&n(!0)},[]);const ve=ne.useCallback(()=>{l(!0),j&&j()},[]),z=ne.useCallback(()=>{a(!0)},[]),ee=ne.useCallback(X=>{t.onAnchorTransformationEnd&&t.onAnchorTransformationEnd(X),a(!1)},[]),pe=Xe.withFilters(Xe.Container,{matrix:Jt.filters.ColorMatrixFilter});return Ee.jsxs(Xe.Container,{ref:p,children:[Ee.jsxs(Xe.Container,{ref:f,position:[_,x],pivot:[_,x],width:b,height:w,scale:E,rotation:A,...!L&&m&&!i&&!fe&&{interactive:!0,buttonMode:!0,pointerdown:k,pointerover:j,pointerout:D},children:[!H&&Ee.jsx(pe,{scale:1,apply:({matrix:X})=>{I===vn.BlackAndWhite?X.desaturate():I===vn.Sepia?X.sepia():I===vn.RetroVintage||I===vn.NightVision?X.negative():I===vn.Normal&&X.reset()},matrix:{enabled:!0,matrix:gx},children:Ee.jsx(Xe.Container,{ref:v,children:t.children})}),H&&Ee.jsx(Xe.Container,{ref:v,children:t.children}),!$s(O)&&O!==Qo.NONE&&O!==Qo.NORMAL&&Ee.jsx(px,{overlay:O,width:b,height:w,x:_,y:x})]}),N&&m&&!le&&Ee.jsx(_v,{pixiTransformerRef:c,imageRef:f,isMounted:r,transformCommit:ee,transformChange:z,mouseoverEvent:ve,uniqueId:d,isText:Q,onDoubleClick:V})]})});xn.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var bn=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))(bn||{}),Nh=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(Nh||{}),Jo=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(Jo||{}),ue=(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))(ue||{}),Jr=(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))(Jr||{}),K=(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))(K||{}),Zn=(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))(Zn||{}),Fe=(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))(Fe||{}),eu=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(eu||{}),Ir=(t=>(t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR",t))(Ir||{}),qi=(t=>(t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t))(qi||{}),wn=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(wn||{}),en=(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))(en||{}),Tn=(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))(Tn||{}),tu=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(tu||{}),er=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(er||{}),vt=(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))(vt||{}),gt=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(gt||{}),Rr=(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))(Rr||{});const ye={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 ru=/iPhone/i,Lh=/iPod/i,kh=/iPad/i,Bh=/\biOS-universal(?:.+)Mac\b/i,nu=/\bAndroid(?:.+)Mobile\b/i,Dh=/Android/i,Qn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Gs=/Silk/i,Br=/Windows Phone/i,Uh=/\bWindows(?:.+)ARM\b/i,$h=/BlackBerry/i,Gh=/BB10/i,zh=/Opera Mini/i,Hh=/\b(CriOS|Chrome)(?:.+)Mobile/i,Vh=/Mobile(?:.+)Firefox\b/i,Xh=function(t){return typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream>"u"};function mx(t){return function(e){return e.test(t)}}function jh(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=mx(r),a={apple:{phone:i(ru)&&!i(Br),ipod:i(Lh),tablet:!i(ru)&&(i(kh)||Xh(e))&&!i(Br),universal:i(Bh),device:(i(ru)||i(Lh)||i(kh)||i(Bh)||Xh(e))&&!i(Br)},amazon:{phone:i(Qn),tablet:!i(Qn)&&i(Gs),device:i(Qn)||i(Gs)},android:{phone:!i(Br)&&i(Qn)||!i(Br)&&i(nu),tablet:!i(Br)&&!i(Qn)&&!i(nu)&&(i(Gs)||i(Dh)),device:!i(Br)&&(i(Qn)||i(Gs)||i(nu)||i(Dh))||i(/\bokhttp\b/i)},windows:{phone:i(Br),tablet:i(Uh),device:i(Br)||i(Uh)},other:{blackberry:i($h),blackberry10:i(Gh),opera:i(zh),firefox:i(Vh),chrome:i(Hh),device:i($h)||i(Gh)||i(zh)||i(Vh)||i(Hh)},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 Jn=(jh.default??jh)(globalThis.navigator);ye.RETINA_PREFIX=/@([0-9\.]+)x/,ye.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Wh={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,v){this.fn=f,this.context=p,this.once=v||!1}function a(f,p,v,c,d){if(typeof v!="function")throw new TypeError("The listener must be a function");var m=new i(v,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=[],v,c;if(this._eventsCount===0)return p;for(c in v=this._events)e.call(v,c)&&p.push(r?c.slice(1):c);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(v)):p},l.prototype.listeners=function(p){var v=r?r+p:p,c=this._events[v];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 v=r?r+p:p,c=this._events[v];return c?c.fn?1:c.length:0},l.prototype.emit=function(p,v,c,d,m,_){var x=r?r+p:p;if(!this._events[x])return!1;var b=this._events[x],w=arguments.length,E,A;if(b.fn){switch(b.once&&this.removeListener(p,b.fn,void 0,!0),w){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,v),!0;case 3:return b.fn.call(b.context,v,c),!0;case 4:return b.fn.call(b.context,v,c,d),!0;case 5:return b.fn.call(b.context,v,c,d,m),!0;case 6:return b.fn.call(b.context,v,c,d,m,_),!0}for(A=1,E=new Array(w-1);A<w;A++)E[A-1]=arguments[A];b.fn.apply(b.context,E)}else{var I=b.length,O;for(A=0;A<I;A++)switch(b[A].once&&this.removeListener(p,b[A].fn,void 0,!0),w){case 1:b[A].fn.call(b[A].context);break;case 2:b[A].fn.call(b[A].context,v);break;case 3:b[A].fn.call(b[A].context,v,c);break;case 4:b[A].fn.call(b[A].context,v,c,d);break;default:if(!E)for(O=1,E=new Array(w-1);O<w;O++)E[O-1]=arguments[O];b[A].fn.apply(b[A].context,E)}}return!0},l.prototype.on=function(p,v,c){return a(this,p,v,c,!1)},l.prototype.once=function(p,v,c){return a(this,p,v,c,!0)},l.prototype.removeListener=function(p,v,c,d){var m=r?r+p:p;if(!this._events[m])return this;if(!v)return u(this,m),this;var _=this._events[m];if(_.fn)_.fn===v&&(!d||_.once)&&(!c||_.context===c)&&u(this,m);else{for(var x=0,b=[],w=_.length;x<w;x++)(_[x].fn!==v||d&&!_[x].once||c&&_[x].context!==c)&&b.push(_[x]);b.length?this._events[m]=b.length===1?b[0]:b:u(this,m)}return this},l.prototype.removeAllListeners=function(p){var v;return p?(v=r?r+p:p,this._events[v]&&u(this,v)):(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})(Wh);var vx=Wh.exports;const zs=Wn(vx);var iu={exports:{}};iu.exports=Hs,iu.exports.default=Hs;function Hs(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,a=qh(t,0,i,r,!0),u=[];if(!a||a.next===a.prev)return u;var l,f,p,v,c,d,m;if(n&&(a=wx(t,e,a,r)),t.length>80*r){l=p=t[0],f=v=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>v&&(v=d);m=Math.max(p-l,v-f),m=m!==0?32767/m:0}return Yi(a,u,r,l,f,m,0),u}function qh(t,e,r,n,i){var a,u;if(i===ou(t,e,r,n)>0)for(a=e;a<r;a+=n)u=Zh(a,t[a],t[a+1],u);else for(a=r-n;a>=e;a-=n)u=Zh(a,t[a],t[a+1],u);return u&&Vs(u,u.next)&&(Zi(u),u=u.next),u}function Sn(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(Vs(r,r.next)||st(r.prev,r,r.next)===0)){if(Zi(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function Yi(t,e,r,n,i,a,u){if(t){!u&&a&&Cx(t,n,i,a);for(var l=t,f,p;t.prev!==t.next;){if(f=t.prev,p=t.next,a?yx(t,n,i,a):_x(t)){e.push(f.i/r|0),e.push(t.i/r|0),e.push(p.i/r|0),Zi(t),t=p.next,l=p.next;continue}if(t=p,t===l){u?u===1?(t=xx(Sn(t),e,r),Yi(t,e,r,n,i,a,2)):u===2&&bx(t,e,r,n,i,a):Yi(Sn(t),e,r,n,i,a,1);break}}}}function _x(t){var e=t.prev,r=t,n=t.next;if(st(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,v=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>=v&&_.x<=d&&_.y>=c&&_.y<=m&&ei(i,l,a,f,u,p,_.x,_.y)&&st(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function yx(t,e,r,n){var i=t.prev,a=t,u=t.next;if(st(i,a,u)>=0)return!1;for(var l=i.x,f=a.x,p=u.x,v=i.y,c=a.y,d=u.y,m=l<f?l<p?l:p:f<p?f:p,_=v<c?v<d?v:d:c<d?c:d,x=l>f?l>p?l:p:f>p?f:p,b=v>c?v>d?v:d:c>d?c:d,w=su(m,_,e,r,n),E=su(x,b,e,r,n),A=t.prevZ,I=t.nextZ;A&&A.z>=w&&I&&I.z<=E;){if(A.x>=m&&A.x<=x&&A.y>=_&&A.y<=b&&A!==i&&A!==u&&ei(l,v,f,c,p,d,A.x,A.y)&&st(A.prev,A,A.next)>=0||(A=A.prevZ,I.x>=m&&I.x<=x&&I.y>=_&&I.y<=b&&I!==i&&I!==u&&ei(l,v,f,c,p,d,I.x,I.y)&&st(I.prev,I,I.next)>=0))return!1;I=I.nextZ}for(;A&&A.z>=w;){if(A.x>=m&&A.x<=x&&A.y>=_&&A.y<=b&&A!==i&&A!==u&&ei(l,v,f,c,p,d,A.x,A.y)&&st(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;I&&I.z<=E;){if(I.x>=m&&I.x<=x&&I.y>=_&&I.y<=b&&I!==i&&I!==u&&ei(l,v,f,c,p,d,I.x,I.y)&&st(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function xx(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!Vs(i,a)&&Yh(i,n,n.next,a)&&Ki(i,a)&&Ki(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),Zi(n),Zi(n.next),n=t=a),n=n.next}while(n!==t);return Sn(n)}function bx(t,e,r,n,i,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&Px(u,l)){var f=Kh(u,l);u=Sn(u,u.next),f=Sn(f,f.next),Yi(u,e,r,n,i,a,0),Yi(f,e,r,n,i,a,0);return}l=l.next}u=u.next}while(u!==t)}function wx(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=qh(t,l,f,n,!1),p===p.next&&(p.steiner=!0),i.push(Rx(p));for(i.sort(Tx),a=0;a<i.length;a++)r=Sx(i[a],r);return r}function Tx(t,e){return t.x-e.x}function Sx(t,e){var r=Ax(t,e);if(!r)return e;var n=Kh(r,t);return Sn(n,n.next),Sn(r,r.next)}function Ax(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,v=u.y,c=1/0,d;r=u;do n>=r.x&&r.x>=p&&n!==r.x&&ei(i<v?n:a,i,p,v,i<v?a:n,i,r.x,r.y)&&(d=Math.abs(i-r.y)/(n-r.x),Ki(r,t)&&(d<c||d===c&&(r.x>u.x||r.x===u.x&&Ex(u,r)))&&(u=r,c=d)),r=r.next;while(r!==f);return u}function Ex(t,e){return st(t.prev,t,e.prev)<0&&st(e.next,t,t.next)<0}function Cx(t,e,r,n){var i=t;do i.z===0&&(i.z=su(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,Ix(i)}function Ix(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 su(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 Rx(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 ei(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 Px(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Mx(t,e)&&(Ki(t,e)&&Ki(e,t)&&Ox(t,e)&&(st(t.prev,t,e.prev)||st(t,e.prev,e))||Vs(t,e)&&st(t.prev,t,t.next)>0&&st(e.prev,e,e.next)>0)}function st(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Vs(t,e){return t.x===e.x&&t.y===e.y}function Yh(t,e,r,n){var i=js(st(t,e,r)),a=js(st(t,e,n)),u=js(st(r,n,t)),l=js(st(r,n,e));return!!(i!==a&&u!==l||i===0&&Xs(t,r,e)||a===0&&Xs(t,n,e)||u===0&&Xs(r,t,n)||l===0&&Xs(r,e,n))}function Xs(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 js(t){return t>0?1:t<0?-1:0}function Mx(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&&Yh(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function Ki(t,e){return st(t.prev,t,t.next)<0?st(t,e,t.next)>=0&&st(t,t.prev,e)>=0:st(t,e,t.prev)<0||st(t,t.next,e)<0}function Ox(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 Kh(t,e){var r=new au(t.i,t.x,t.y),n=new au(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 Zh(t,e,r,n){var i=new au(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 Zi(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 au(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}Hs.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,u=Math.abs(ou(t,0,a,r));if(i)for(var l=0,f=e.length;l<f;l++){var p=e[l]*r,v=l<f-1?e[l+1]*r:t.length;u-=Math.abs(ou(t,p,v,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 ou(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}Hs.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 Fx=iu.exports;const Nx=Wn(Fx);var Ws={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Ws.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,v=26,c=38,d=700,m=72,_=128,x="-",b=/^xn--/,w=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,A={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,N=String.fromCharCode,L;function k(X){throw new RangeError(A[X])}function D(X,Y){for(var ce=X.length,Se=[];ce--;)Se[ce]=Y(X[ce]);return Se}function j(X,Y){var ce=X.split("@"),Se="";ce.length>1&&(Se=ce[0]+"@",X=ce[1]),X=X.replace(E,".");var xe=X.split("."),Me=D(xe,Y).join(".");return Se+Me}function Q(X){for(var Y=[],ce=0,Se=X.length,xe,Me;ce<Se;)xe=X.charCodeAt(ce++),xe>=55296&&xe<=56319&&ce<Se?(Me=X.charCodeAt(ce++),(Me&64512)==56320?Y.push(((xe&1023)<<10)+(Me&1023)+65536):(Y.push(xe),ce--)):Y.push(xe);return Y}function fe(X){return D(X,function(Y){var ce="";return Y>65535&&(Y-=65536,ce+=N(Y>>>10&1023|55296),Y=56320|Y&1023),ce+=N(Y),ce}).join("")}function H(X){return X-48<10?X-22:X-65<26?X-65:X-97<26?X-97:f}function V(X,Y){return X+22+75*(X<26)-((Y!=0)<<5)}function le(X,Y,ce){var Se=0;for(X=ce?O(X/d):X>>1,X+=O(X/Y);X>I*v>>1;Se+=f)X=O(X/I);return O(Se+(I+1)*X/(X+c))}function ve(X){var Y=[],ce=X.length,Se,xe=0,Me=_,Oe=m,Ge,ze,Ke,Ze,be,De,Qe,Je,Le;for(Ge=X.lastIndexOf(x),Ge<0&&(Ge=0),ze=0;ze<Ge;++ze)X.charCodeAt(ze)>=128&&k("not-basic"),Y.push(X.charCodeAt(ze));for(Ke=Ge>0?Ge+1:0;Ke<ce;){for(Ze=xe,be=1,De=f;Ke>=ce&&k("invalid-input"),Qe=H(X.charCodeAt(Ke++)),(Qe>=f||Qe>O((l-xe)/be))&&k("overflow"),xe+=Qe*be,Je=De<=Oe?p:De>=Oe+v?v:De-Oe,!(Qe<Je);De+=f)Le=f-Je,be>O(l/Le)&&k("overflow"),be*=Le;Se=Y.length+1,Oe=le(xe-Ze,Se,Ze==0),O(xe/Se)>l-Me&&k("overflow"),Me+=O(xe/Se),xe%=Se,Y.splice(xe++,0,Me)}return fe(Y)}function z(X){var Y,ce,Se,xe,Me,Oe,Ge,ze,Ke,Ze,be,De=[],Qe,Je,Le,J;for(X=Q(X),Qe=X.length,Y=_,ce=0,Me=m,Oe=0;Oe<Qe;++Oe)be=X[Oe],be<128&&De.push(N(be));for(Se=xe=De.length,xe&&De.push(x);Se<Qe;){for(Ge=l,Oe=0;Oe<Qe;++Oe)be=X[Oe],be>=Y&&be<Ge&&(Ge=be);for(Je=Se+1,Ge-Y>O((l-ce)/Je)&&k("overflow"),ce+=(Ge-Y)*Je,Y=Ge,Oe=0;Oe<Qe;++Oe)if(be=X[Oe],be<Y&&++ce>l&&k("overflow"),be==Y){for(ze=ce,Ke=f;Ze=Ke<=Me?p:Ke>=Me+v?v:Ke-Me,!(ze<Ze);Ke+=f)J=ze-Ze,Le=f-Ze,De.push(N(V(Ze+J%Le,0))),ze=O(J/Le);De.push(N(V(ze,0))),Me=le(ce,Je,Se==xe),ce=0,++Se}++ce,++Y}return De.join("")}function ee(X){return j(X,function(Y){return b.test(Y)?ve(Y.slice(4).toLowerCase()):Y})}function pe(X){return j(X,function(Y){return w.test(Y)?"xn--"+z(Y):Y})}if(u={version:"1.4.1",ucs2:{decode:Q,encode:fe},decode:ve,encode:z,toASCII:pe,toUnicode:ee},n&&i)if(t.exports==n)i.exports=u;else for(L in u)u.hasOwnProperty(L)&&(n[L]=u[L]);else r.punycode=u})(At)}(Ws,Ws.exports);var Lx=Ws.exports,kx=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},Qh=typeof Symbol<"u"&&Symbol,Bx=kx,Dx=function(){return typeof Qh!="function"||typeof Symbol!="function"||typeof Qh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bx()},Jh={foo:{}},Ux=Object,$x=function(){return{__proto__:Jh}.foo===Jh.foo&&!({__proto__:null}instanceof Ux)},Gx="Function.prototype.bind called on incompatible ",uu=Array.prototype.slice,zx=Object.prototype.toString,Hx="[object Function]",Vx=function(e){var r=this;if(typeof r!="function"||zx.call(r)!==Hx)throw new TypeError(Gx+r);for(var n=uu.call(arguments,1),i,a=function(){if(this instanceof i){var v=r.apply(this,n.concat(uu.call(arguments)));return Object(v)===v?v:this}else return r.apply(e,n.concat(uu.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},Xx=Vx,lu=Function.prototype.bind||Xx,jx=lu,Wx=jx.call(Function.call,Object.prototype.hasOwnProperty),Te,ti=SyntaxError,ef=Function,ri=TypeError,cu=function(t){try{return ef('"use strict"; return ('+t+").constructor;")()}catch{}},An=Object.getOwnPropertyDescriptor;if(An)try{An({},"")}catch{An=null}var hu=function(){throw new ri},qx=An?function(){try{return arguments.callee,hu}catch{try{return An(arguments,"callee").get}catch{return hu}}}():hu,ni=Dx(),Yx=$x(),bt=Object.getPrototypeOf||(Yx?function(t){return t.__proto__}:null),ii={},Kx=typeof Uint8Array>"u"||!bt?Te:bt(Uint8Array),En={"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":ni&&bt?bt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":ii,"%AsyncGenerator%":ii,"%AsyncGeneratorFunction%":ii,"%AsyncIteratorPrototype%":ii,"%Atomics%":typeof Atomics>"u"?Te:Atomics,"%BigInt%":typeof BigInt>"u"?Te:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Te:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Te:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Te:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":ef,"%GeneratorFunction%":ii,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ni&&bt?bt(bt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ni||!bt?Te:bt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Te:Promise,"%Proxy%":typeof Proxy>"u"?Te:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ni||!bt?Te:bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ni&&bt?bt(""[Symbol.iterator]()):Te,"%Symbol%":ni?Symbol:Te,"%SyntaxError%":ti,"%ThrowTypeError%":qx,"%TypedArray%":Kx,"%TypeError%":ri,"%Uint8Array%":typeof Uint8Array>"u"?Te:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Te:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Te:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Te:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet};if(bt)try{null.error}catch(t){var Zx=bt(bt(t));En["%Error.prototype%"]=Zx}var Qx=function t(e){var r;if(e==="%AsyncFunction%")r=cu("async function () {}");else if(e==="%GeneratorFunction%")r=cu("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=cu("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 En[e]=r,r},tf={"%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"]},Qi=lu,qs=Wx,Jx=Qi.call(Function.call,Array.prototype.concat),e1=Qi.call(Function.apply,Array.prototype.splice),rf=Qi.call(Function.call,String.prototype.replace),Ys=Qi.call(Function.call,String.prototype.slice),t1=Qi.call(Function.call,RegExp.prototype.exec),r1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,n1=/\\(\\)?/g,i1=function(e){var r=Ys(e,0,1),n=Ys(e,-1);if(r==="%"&&n!=="%")throw new ti("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ti("invalid intrinsic syntax, expected opening `%`");var i=[];return rf(e,r1,function(a,u,l,f){i[i.length]=l?rf(f,n1,"$1"):u||a}),i},s1=function(e,r){var n=e,i;if(qs(tf,n)&&(i=tf[n],n="%"+i[0]+"%"),qs(En,n)){var a=En[n];if(a===ii&&(a=Qx(n)),typeof a>"u"&&!r)throw new ri("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new ti("intrinsic "+e+" does not exist!")},fu=function(e,r){if(typeof e!="string"||e.length===0)throw new ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ri('"allowMissing" argument must be a boolean');if(t1(/^%?[^%]*%?$/,e)===null)throw new ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=i1(e),i=n.length>0?n[0]:"",a=s1("%"+i+"%",r),u=a.name,l=a.value,f=!1,p=a.alias;p&&(i=p[0],e1(n,Jx([0,1],p)));for(var v=1,c=!0;v<n.length;v+=1){var d=n[v],m=Ys(d,0,1),_=Ys(d,-1);if((m==='"'||m==="'"||m==="`"||_==='"'||_==="'"||_==="`")&&m!==_)throw new ti("property names with quotes must have matching quotes");if((d==="constructor"||!c)&&(f=!0),i+="."+d,u="%"+i+"%",qs(En,u))l=En[u];else if(l!=null){if(!(d in l)){if(!r)throw new ri("base intrinsic for "+e+" exists, but the property is not available.");return}if(An&&v+1>=n.length){var x=An(l,d);c=!!x,c&&"get"in x&&!("originalValue"in x.get)?l=x.get:l=l[d]}else c=qs(l,d),l=l[d];c&&!f&&(En[u]=l)}}return l},nf={exports:{}};(function(t){var e=lu,r=fu,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})(nf);var a1=nf.exports,sf=fu,af=a1,o1=af(sf("String.prototype.indexOf")),u1=function(e,r){var n=sf(e,!!r);return typeof n=="function"&&o1(e,".prototype.")>-1?af(n):n};const l1=lv(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var du=typeof Map=="function"&&Map.prototype,pu=Object.getOwnPropertyDescriptor&&du?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ks=du&&pu&&typeof pu.get=="function"?pu.get:null,of=du&&Map.prototype.forEach,gu=typeof Set=="function"&&Set.prototype,mu=Object.getOwnPropertyDescriptor&&gu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Zs=gu&&mu&&typeof mu.get=="function"?mu.get:null,uf=gu&&Set.prototype.forEach,c1=typeof WeakMap=="function"&&WeakMap.prototype,Ji=c1?WeakMap.prototype.has:null,h1=typeof WeakSet=="function"&&WeakSet.prototype,es=h1?WeakSet.prototype.has:null,f1=typeof WeakRef=="function"&&WeakRef.prototype,lf=f1?WeakRef.prototype.deref:null,d1=Boolean.prototype.valueOf,p1=Object.prototype.toString,g1=Function.prototype.toString,m1=String.prototype.match,vu=String.prototype.slice,tn=String.prototype.replace,v1=String.prototype.toUpperCase,cf=String.prototype.toLowerCase,hf=RegExp.prototype.test,ff=Array.prototype.concat,Pr=Array.prototype.join,_1=Array.prototype.slice,df=Math.floor,_u=typeof BigInt=="function"?BigInt.prototype.valueOf:null,yu=Object.getOwnPropertySymbols,xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,si=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Rt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===si||"symbol")?Symbol.toStringTag:null,pf=Object.prototype.propertyIsEnumerable,gf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function mf(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||hf.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-df(-t):df(t);if(n!==t){var i=String(n),a=vu.call(e,i.length+1);return tn.call(i,r,"$&_")+"."+tn.call(tn.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return tn.call(e,r,"$&_")}var bu=l1,vf=bu.custom,_f=bf(vf)?vf:null,y1=function t(e,r,n,i){var a=r||{};if(rn(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(rn(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=rn(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(rn(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(rn(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 Tf(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return l?mf(e,f):f}if(typeof e=="bigint"){var p=String(e)+"n";return l?mf(e,p):p}var v=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=v&&v>0&&typeof e=="object")return wu(e)?"[Array]":"[Object]";var c=B1(a,n);if(typeof i>"u")i=[];else if(wf(i,e)>=0)return"[Circular]";function d(H,V,le){if(V&&(i=_1.call(i),i.push(V)),le){var ve={depth:a.depth};return rn(a,"quoteStyle")&&(ve.quoteStyle=a.quoteStyle),t(H,ve,n+1,i)}return t(H,a,n+1,i)}if(typeof e=="function"&&!xf(e)){var m=I1(e),_=Qs(e,d);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(_.length>0?" { "+Pr.call(_,", ")+" }":"")}if(bf(e)){var x=si?tn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):xu.call(e);return typeof e=="object"&&!si?ts(x):x}if(N1(e)){for(var b="<"+cf.call(String(e.nodeName)),w=e.attributes||[],E=0;E<w.length;E++)b+=" "+w[E].name+"="+yf(x1(w[E].value),"double",a);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+="</"+cf.call(String(e.nodeName))+">",b}if(wu(e)){if(e.length===0)return"[]";var A=Qs(e,d);return c&&!k1(A)?"["+Su(A,c)+"]":"[ "+Pr.call(A,", ")+" ]"}if(w1(e)){var I=Qs(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!pf.call(e,"cause")?"{ ["+String(e)+"] "+Pr.call(ff.call("[cause]: "+d(e.cause),I),", ")+" }":I.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Pr.call(I,", ")+" }"}if(typeof e=="object"&&u){if(_f&&typeof e[_f]=="function"&&bu)return bu(e,{depth:v-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(R1(e)){var O=[];return of&&of.call(e,function(H,V){O.push(d(V,e,!0)+" => "+d(H,e))}),Sf("Map",Ks.call(e),O,c)}if(O1(e)){var N=[];return uf&&uf.call(e,function(H){N.push(d(H,e))}),Sf("Set",Zs.call(e),N,c)}if(P1(e))return Tu("WeakMap");if(F1(e))return Tu("WeakSet");if(M1(e))return Tu("WeakRef");if(S1(e))return ts(d(Number(e)));if(E1(e))return ts(d(_u.call(e)));if(A1(e))return ts(d1.call(e));if(T1(e))return ts(d(String(e)));if(!b1(e)&&!xf(e)){var L=Qs(e,d),k=gf?gf(e)===Object.prototype:e instanceof Object||e.constructor===Object,D=e instanceof Object?"":"null prototype",j=!k&&Rt&&Object(e)===e&&Rt in e?vu.call(nn(e),8,-1):D?"Object":"",Q=k||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",fe=Q+(j||D?"["+Pr.call(ff.call([],j||[],D||[]),": ")+"] ":"");return L.length===0?fe+"{}":c?fe+"{"+Su(L,c)+"}":fe+"{ "+Pr.call(L,", ")+" }"}return String(e)};function yf(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function x1(t){return tn.call(String(t),/"/g,"&quot;")}function wu(t){return nn(t)==="[object Array]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function b1(t){return nn(t)==="[object Date]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function xf(t){return nn(t)==="[object RegExp]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function w1(t){return nn(t)==="[object Error]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function T1(t){return nn(t)==="[object String]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function S1(t){return nn(t)==="[object Number]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function A1(t){return nn(t)==="[object Boolean]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function bf(t){if(si)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!xu)return!1;try{return xu.call(t),!0}catch{}return!1}function E1(t){if(!t||typeof t!="object"||!_u)return!1;try{return _u.call(t),!0}catch{}return!1}var C1=Object.prototype.hasOwnProperty||function(t){return t in this};function rn(t,e){return C1.call(t,e)}function nn(t){return p1.call(t)}function I1(t){if(t.name)return t.name;var e=m1.call(g1.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function wf(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 R1(t){if(!Ks||!t||typeof t!="object")return!1;try{Ks.call(t);try{Zs.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function P1(t){if(!Ji||!t||typeof t!="object")return!1;try{Ji.call(t,Ji);try{es.call(t,es)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function M1(t){if(!lf||!t||typeof t!="object")return!1;try{return lf.call(t),!0}catch{}return!1}function O1(t){if(!Zs||!t||typeof t!="object")return!1;try{Zs.call(t);try{Ks.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function F1(t){if(!es||!t||typeof t!="object")return!1;try{es.call(t,es);try{Ji.call(t,Ji)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function N1(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Tf(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Tf(vu.call(t,0,e.maxStringLength),e)+n}var i=tn.call(tn.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,L1);return yf(i,"single",e)}function L1(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":"")+v1.call(e.toString(16))}function ts(t){return"Object("+t+")"}function Tu(t){return t+" { ? }"}function Sf(t,e,r,n){var i=n?Su(r,n):Pr.call(r,", ");return t+" ("+e+") {"+i+"}"}function k1(t){for(var e=0;e<t.length;e++)if(wf(t[e],`
9
+ */var cv=W,hv=Symbol.for("react.element"),fv=Symbol.for("react.fragment"),dv=Object.prototype.hasOwnProperty,pv=cv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gv={key:!0,ref:!0,__self:!0,__source:!0};function lh(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)dv.call(e,n)&&!gv.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:hv,type:t,key:a,ref:u,props:i,_owner:pv.current}}Ls.Fragment=fv,Ls.jsx=lh,Ls.jsxs=lh,uh.exports=Ls;var Ee=uh.exports,vn=(t=>(t.BlackAndWhite="BlackAndWhite",t.Sepia="Sepia",t.RetroVintage="RetroVintage",t.NightVision="NightVision",t.Normal="Normal",t.Vignette="Vignette",t.None="Normal",t))(vn||{});let ch;function hh(){return ch=document.body,ch}function ct(t,e,r){let n;return W.useEffect(()=>{n=n||hh();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=hh(),n=new CustomEvent(t,{detail:e});r.dispatchEvent(n)}function mv(){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 _n=ne.createContext({}),je={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"},vv=({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),[f,p]=W.useState(!1);W.useLayoutEffect(()=>(i.current=xt.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&xt.killTweensOf(n.current),n.current=xt.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&n.current.revert(),i.current.revert()}),[]);const v=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 A=n.current;A.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){A.pause(),v()}).eventCallback("onUpdate",function(){v()}).eventCallback("onRepeat",function(){console.log("onrepeat",A.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",A.progress())}).eventCallback("onComplete",function(){A.pause(),A.revert(),qn(je.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),v()})}},[]);const c=W.useCallback(()=>{n.current&&n.current.revert()},[]),d=W.useCallback(()=>{n.current&&n.current.restart()},[]),m=W.useCallback(()=>{if(n.current){const A=n.current;A.repeat(1),A.restart()}},[]),_=W.useCallback(A=>{n.current&&n.current.seek(A)},[]),b=W.useCallback(()=>{n.current&&n.current.seek(4)},[]),x=W.useCallback(()=>{const A=n.current;return A?A.totalDuration():0},[]),w=()=>{n.current&&(n.current.pause(),qn(je.PAUSE))},E=()=>{n.current&&(n.current.resume(),qn(je.RESUME))};return ct(je.SEEK_START,()=>{l.current=!0}),ct(je.SCRUBBER_PLAY,()=>{E()}),ct(je.SCRUBBER_PAUSE,()=>{w()}),ct(je.SCRUBBER_SEEK,A=>{_(A)}),ct(je.SEEK_END,()=>{l.current=!1}),ct(je.REVERSE_MODE_START,()=>{u.current=!0}),ct(je.REVERSE_MODE_END,()=>{u.current=!1}),ct(je.SCRUBBER_PROGRESS_UPDATE,A=>{}),Ee.jsx(_n.Provider,{value:{gsapCtx:i,tl:n,handlePlay:E,handlePause:w,handleReset:c,handleSeek:_,handleSeekTest:b,handleRestart:d,handleRepeat:m,playerTimeRef:a,getTimelineDuration:x,totalDuration:e,setTotalDuration:r,reverseModeRef:u,dragModeRef:l,isRemotion:f,setIsRemotion:p},children:t})},_v=({pixiTransformerRef:t,imageRef:e,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:f=!1})=>{const p=Jt.utils.string2hex("#F3C409"),v=Jt.utils.string2hex("#F3C409"),c=ne.useRef({isDragging:!1}),d=300,m=ne.useRef(0),_=ne.useCallback(()=>{a&&!c.current.isDragging&&a(!0)},[a]),b=ne.useCallback(()=>{a&&!c.current.isDragging&&a(!1)},[a]),x=ne.useCallback(()=>{c.current.isDragging=!0;const A=new Date().getTime();A-m.current<d&&u&&u(),m.current=A},[]),w=ne.useCallback(A=>{c.current.isDragging=!0,i&&i(A),qn(je.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),E=ne.useCallback(()=>{if(e.current===null)return;const A=e.current.x,I=e.current.y,O=e.current.width,N=e.current.height,L=e.current.rotation,k=[e.current.scale.x,e.current.scale.y],D=k[0]<0?-1:1,j=k[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(A),y:Math.round(I),width:Math.round(Math.max(5,O)),height:Math.round(Math.max(5,N)),rotation:L,scale:f?k:[D,j]}}),qn(je.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),c.current.isDragging=!1},[n]);return ne.useEffect(()=>(t.current&&(t.current.on("mouseover",_),t.current.on("mouseout",b),t.current.on("mousedown",x)),()=>{t.current&&(t.current.off("mouseover",_),t.current.off("mouseout",b),t.current.off("mousedown",x))}),[]),Ee.jsx(uv.Transformer,{ref:t,group:r?[e.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:v},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:p,shape:"circle",radius:10},transformchange:w,transformcommit:E})};var yv=Object.prototype;function xv(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||yv;return t===r}var fh=xv;function bv(t,e){return function(r){return t(e(r))}}var wv=bv,Tv=wv,Sv=Tv(Object.keys,Object),Av=Sv,Ev=fh,Cv=Av,Iv=Object.prototype,Rv=Iv.hasOwnProperty;function Pv(t){if(!Ev(t))return Cv(t);var e=[];for(var r in Object(t))Rv.call(t,r)&&r!="constructor"&&e.push(r);return e}var dh=Pv,Mv=typeof At=="object"&&At&&At.Object===Object&&At,ph=Mv,Ov=ph,Fv=typeof self=="object"&&self&&self.Object===Object&&self,Nv=Ov||Fv||Function("return this")(),Er=Nv,Lv=Er,kv=Lv.Symbol,ks=kv,gh=ks,mh=Object.prototype,Bv=mh.hasOwnProperty,Dv=mh.toString,Vi=gh?gh.toStringTag:void 0;function Uv(t){var e=Bv.call(t,Vi),r=t[Vi];try{t[Vi]=void 0;var n=!0}catch{}var i=Dv.call(t);return n&&(e?t[Vi]=r:delete t[Vi]),i}var $v=Uv,Gv=Object.prototype,zv=Gv.toString;function Hv(t){return zv.call(t)}var Vv=Hv,vh=ks,Xv=$v,jv=Vv,Wv="[object Null]",qv="[object Undefined]",_h=vh?vh.toStringTag:void 0;function Yv(t){return t==null?t===void 0?qv:Wv:_h&&_h in Object(t)?Xv(t):jv(t)}var Xi=Yv;function Kv(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ji=Kv,Zv=Xi,Qv=ji,Jv="[object AsyncFunction]",e_="[object Function]",t_="[object GeneratorFunction]",r_="[object Proxy]";function n_(t){if(!Qv(t))return!1;var e=Zv(t);return e==e_||e==t_||e==Jv||e==r_}var yh=n_,i_=Er,s_=i_["__core-js_shared__"],a_=s_,Go=a_,xh=function(){var t=/[^.]+$/.exec(Go&&Go.keys&&Go.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function o_(t){return!!xh&&xh in t}var u_=o_,l_=Function.prototype,c_=l_.toString;function h_(t){if(t!=null){try{return c_.call(t)}catch{}try{return t+""}catch{}}return""}var bh=h_,f_=yh,d_=u_,p_=ji,g_=bh,m_=/[\\^$.*+?()[\]{}|]/g,v_=/^\[object .+?Constructor\]$/,__=Function.prototype,y_=Object.prototype,x_=__.toString,b_=y_.hasOwnProperty,w_=RegExp("^"+x_.call(b_).replace(m_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T_(t){if(!p_(t)||d_(t))return!1;var e=f_(t)?w_:v_;return e.test(g_(t))}var S_=T_;function A_(t,e){return t==null?void 0:t[e]}var E_=A_,C_=S_,I_=E_;function R_(t,e){var r=I_(t,e);return C_(r)?r:void 0}var Yn=R_,P_=Yn,M_=Er,O_=P_(M_,"DataView"),F_=O_,N_=Yn,L_=Er,k_=N_(L_,"Map"),zo=k_,B_=Yn,D_=Er,U_=B_(D_,"Promise"),$_=U_,G_=Yn,z_=Er,H_=G_(z_,"Set"),V_=H_,X_=Yn,j_=Er,W_=X_(j_,"WeakMap"),q_=W_,Ho=F_,Vo=zo,Xo=$_,jo=V_,Wo=q_,wh=Xi,Kn=bh,Th="[object Map]",Y_="[object Object]",Sh="[object Promise]",Ah="[object Set]",Eh="[object WeakMap]",Ch="[object DataView]",K_=Kn(Ho),Z_=Kn(Vo),Q_=Kn(Xo),J_=Kn(jo),ey=Kn(Wo),yn=wh;(Ho&&yn(new Ho(new ArrayBuffer(1)))!=Ch||Vo&&yn(new Vo)!=Th||Xo&&yn(Xo.resolve())!=Sh||jo&&yn(new jo)!=Ah||Wo&&yn(new Wo)!=Eh)&&(yn=function(t){var e=wh(t),r=e==Y_?t.constructor:void 0,n=r?Kn(r):"";if(n)switch(n){case K_:return Ch;case Z_:return Th;case Q_:return Sh;case J_:return Ah;case ey:return Eh}return e});var Ih=yn;function ty(t){return t!=null&&typeof t=="object"}var Wi=ty,ry=Xi,ny=Wi,iy="[object Arguments]";function sy(t){return ny(t)&&ry(t)==iy}var ay=sy,Rh=ay,oy=Wi,Ph=Object.prototype,uy=Ph.hasOwnProperty,ly=Ph.propertyIsEnumerable,cy=Rh(function(){return arguments}())?Rh:function(t){return oy(t)&&uy.call(t,"callee")&&!ly.call(t,"callee")},qo=cy,hy=Array.isArray,Cr=hy,fy=9007199254740991;function dy(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=fy}var Yo=dy,py=yh,gy=Yo;function my(t){return t!=null&&gy(t.length)&&!py(t)}var Bs=my,Ds={exports:{}};function vy(){return!1}var _y=vy;Ds.exports,function(t,e){var r=Er,n=_y,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}(Ds,Ds.exports);var Ko=Ds.exports,yy=Xi,xy=Yo,by=Wi,wy="[object Arguments]",Ty="[object Array]",Sy="[object Boolean]",Ay="[object Date]",Ey="[object Error]",Cy="[object Function]",Iy="[object Map]",Ry="[object Number]",Py="[object Object]",My="[object RegExp]",Oy="[object Set]",Fy="[object String]",Ny="[object WeakMap]",Ly="[object ArrayBuffer]",ky="[object DataView]",By="[object Float32Array]",Dy="[object Float64Array]",Uy="[object Int8Array]",$y="[object Int16Array]",Gy="[object Int32Array]",zy="[object Uint8Array]",Hy="[object Uint8ClampedArray]",Vy="[object Uint16Array]",Xy="[object Uint32Array]",tt={};tt[By]=tt[Dy]=tt[Uy]=tt[$y]=tt[Gy]=tt[zy]=tt[Hy]=tt[Vy]=tt[Xy]=!0,tt[wy]=tt[Ty]=tt[Ly]=tt[Sy]=tt[ky]=tt[Ay]=tt[Ey]=tt[Cy]=tt[Iy]=tt[Ry]=tt[Py]=tt[My]=tt[Oy]=tt[Fy]=tt[Ny]=!1;function jy(t){return by(t)&&xy(t.length)&&!!tt[yy(t)]}var Wy=jy;function qy(t){return function(e){return t(e)}}var Yy=qy,Us={exports:{}};Us.exports,function(t,e){var r=ph,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}(Us,Us.exports);var Ky=Us.exports,Zy=Wy,Qy=Yy,Mh=Ky,Oh=Mh&&Mh.isTypedArray,Jy=Oh?Qy(Oh):Zy,Zo=Jy,ex=dh,tx=Ih,rx=qo,nx=Cr,ix=Bs,sx=Ko,ax=fh,ox=Zo,ux="[object Map]",lx="[object Set]",cx=Object.prototype,hx=cx.hasOwnProperty;function fx(t){if(t==null)return!0;if(ix(t)&&(nx(t)||typeof t=="string"||typeof t.splice=="function"||sx(t)||ox(t)||rx(t)))return!t.length;var e=tx(t);if(e==ux||e==lx)return!t.size;if(ax(t))return!ex(t).length;for(var r in t)if(hx.call(t,r))return!1;return!0}var dx=fx;const $s=Wn(dx);var Qo=(t=>(t.NONE="none",t.NORMAL="normal",t.LENSFLARE="lensflare",t.FILMSTRIP="filmstrip",t.GRUNGE="grunge",t.BRICKS="bricks",t))(Qo||{});const Fh={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}},px=t=>{const{overlay:e,width:r,height:n,x:i,y:a}=t,{src:u,blendmode:l}=Fh[e]||Fh.normal;return Ee.jsx(Xe.TilingSprite,{image:u,width:r,height:n,x:i,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},gx=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],xn=ne.forwardRef((t,e)=>{const[r,n]=ne.useState(!1),[i,a]=W.useState(!1),[u,l]=W.useState(!1),f=W.useRef(null),p=W.useRef(null),v=W.useRef(null),c=W.useRef(null),{uniqueId:d,visible:m,transformation:{x:_,y:b,width:x,height:w,scale:E=[1,1],rotation:A=0,effect:I,overlay:O},applyTransformer:N,disabled:L,pointerdown:k,pointerout:D,pointerover:j,isText:Q,isDragging:fe,isGif:H,onDoubleClick:V,isTextEditMode:le}=t;ct(je.COMPLETE,()=>{f.current}),ne.useImperativeHandle(e,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>u}),[i,u]),ne.useEffect(()=>{f.current&&n(!0)},[]);const ve=ne.useCallback(()=>{l(!0),j&&j()},[]),z=ne.useCallback(()=>{a(!0)},[]),ee=ne.useCallback(X=>{t.onAnchorTransformationEnd&&t.onAnchorTransformationEnd(X),a(!1)},[]),pe=Xe.withFilters(Xe.Container,{matrix:Jt.filters.ColorMatrixFilter});return Ee.jsxs(Xe.Container,{ref:p,children:[Ee.jsxs(Xe.Container,{ref:f,position:[_,b],pivot:[_,b],width:x,height:w,scale:E,rotation:A,...!L&&m&&!i&&!fe&&{interactive:!0,buttonMode:!0,pointerdown:k,pointerover:j,pointerout:D},children:[!H&&Ee.jsx(pe,{scale:1,apply:({matrix:X})=>{I===vn.BlackAndWhite?X.desaturate():I===vn.Sepia?X.sepia():I===vn.RetroVintage||I===vn.NightVision?X.negative():I===vn.Normal&&X.reset()},matrix:{enabled:!0,matrix:gx},children:Ee.jsx(Xe.Container,{ref:v,children:t.children})}),H&&Ee.jsx(Xe.Container,{ref:v,children:t.children}),!$s(O)&&O!==Qo.NONE&&O!==Qo.NORMAL&&Ee.jsx(px,{overlay:O,width:x,height:w,x:_,y:b})]}),N&&m&&!le&&Ee.jsx(_v,{pixiTransformerRef:c,imageRef:f,isMounted:r,transformCommit:ee,transformChange:z,mouseoverEvent:ve,uniqueId:d,isText:Q,onDoubleClick:V})]})});xn.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var bn=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))(bn||{}),Nh=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(Nh||{}),Jo=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(Jo||{}),ue=(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))(ue||{}),Jr=(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))(Jr||{}),K=(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))(K||{}),Zn=(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))(Zn||{}),Fe=(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))(Fe||{}),eu=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(eu||{}),Ir=(t=>(t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR",t))(Ir||{}),qi=(t=>(t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t))(qi||{}),wn=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(wn||{}),en=(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))(en||{}),Tn=(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))(Tn||{}),tu=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(tu||{}),er=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(er||{}),vt=(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))(vt||{}),gt=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(gt||{}),Rr=(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))(Rr||{});const ye={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 ru=/iPhone/i,Lh=/iPod/i,kh=/iPad/i,Bh=/\biOS-universal(?:.+)Mac\b/i,nu=/\bAndroid(?:.+)Mobile\b/i,Dh=/Android/i,Qn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Gs=/Silk/i,Br=/Windows Phone/i,Uh=/\bWindows(?:.+)ARM\b/i,$h=/BlackBerry/i,Gh=/BB10/i,zh=/Opera Mini/i,Hh=/\b(CriOS|Chrome)(?:.+)Mobile/i,Vh=/Mobile(?:.+)Firefox\b/i,Xh=function(t){return typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream>"u"};function mx(t){return function(e){return e.test(t)}}function jh(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=mx(r),a={apple:{phone:i(ru)&&!i(Br),ipod:i(Lh),tablet:!i(ru)&&(i(kh)||Xh(e))&&!i(Br),universal:i(Bh),device:(i(ru)||i(Lh)||i(kh)||i(Bh)||Xh(e))&&!i(Br)},amazon:{phone:i(Qn),tablet:!i(Qn)&&i(Gs),device:i(Qn)||i(Gs)},android:{phone:!i(Br)&&i(Qn)||!i(Br)&&i(nu),tablet:!i(Br)&&!i(Qn)&&!i(nu)&&(i(Gs)||i(Dh)),device:!i(Br)&&(i(Qn)||i(Gs)||i(nu)||i(Dh))||i(/\bokhttp\b/i)},windows:{phone:i(Br),tablet:i(Uh),device:i(Br)||i(Uh)},other:{blackberry:i($h),blackberry10:i(Gh),opera:i(zh),firefox:i(Vh),chrome:i(Hh),device:i($h)||i(Gh)||i(zh)||i(Vh)||i(Hh)},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 Jn=(jh.default??jh)(globalThis.navigator);ye.RETINA_PREFIX=/@([0-9\.]+)x/,ye.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Wh={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,v){this.fn=f,this.context=p,this.once=v||!1}function a(f,p,v,c,d){if(typeof v!="function")throw new TypeError("The listener must be a function");var m=new i(v,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=[],v,c;if(this._eventsCount===0)return p;for(c in v=this._events)e.call(v,c)&&p.push(r?c.slice(1):c);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(v)):p},l.prototype.listeners=function(p){var v=r?r+p:p,c=this._events[v];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 v=r?r+p:p,c=this._events[v];return c?c.fn?1:c.length:0},l.prototype.emit=function(p,v,c,d,m,_){var b=r?r+p:p;if(!this._events[b])return!1;var x=this._events[b],w=arguments.length,E,A;if(x.fn){switch(x.once&&this.removeListener(p,x.fn,void 0,!0),w){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,v),!0;case 3:return x.fn.call(x.context,v,c),!0;case 4:return x.fn.call(x.context,v,c,d),!0;case 5:return x.fn.call(x.context,v,c,d,m),!0;case 6:return x.fn.call(x.context,v,c,d,m,_),!0}for(A=1,E=new Array(w-1);A<w;A++)E[A-1]=arguments[A];x.fn.apply(x.context,E)}else{var I=x.length,O;for(A=0;A<I;A++)switch(x[A].once&&this.removeListener(p,x[A].fn,void 0,!0),w){case 1:x[A].fn.call(x[A].context);break;case 2:x[A].fn.call(x[A].context,v);break;case 3:x[A].fn.call(x[A].context,v,c);break;case 4:x[A].fn.call(x[A].context,v,c,d);break;default:if(!E)for(O=1,E=new Array(w-1);O<w;O++)E[O-1]=arguments[O];x[A].fn.apply(x[A].context,E)}}return!0},l.prototype.on=function(p,v,c){return a(this,p,v,c,!1)},l.prototype.once=function(p,v,c){return a(this,p,v,c,!0)},l.prototype.removeListener=function(p,v,c,d){var m=r?r+p:p;if(!this._events[m])return this;if(!v)return u(this,m),this;var _=this._events[m];if(_.fn)_.fn===v&&(!d||_.once)&&(!c||_.context===c)&&u(this,m);else{for(var b=0,x=[],w=_.length;b<w;b++)(_[b].fn!==v||d&&!_[b].once||c&&_[b].context!==c)&&x.push(_[b]);x.length?this._events[m]=x.length===1?x[0]:x:u(this,m)}return this},l.prototype.removeAllListeners=function(p){var v;return p?(v=r?r+p:p,this._events[v]&&u(this,v)):(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})(Wh);var vx=Wh.exports;const zs=Wn(vx);var iu={exports:{}};iu.exports=Hs,iu.exports.default=Hs;function Hs(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,a=qh(t,0,i,r,!0),u=[];if(!a||a.next===a.prev)return u;var l,f,p,v,c,d,m;if(n&&(a=wx(t,e,a,r)),t.length>80*r){l=p=t[0],f=v=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>v&&(v=d);m=Math.max(p-l,v-f),m=m!==0?32767/m:0}return Yi(a,u,r,l,f,m,0),u}function qh(t,e,r,n,i){var a,u;if(i===ou(t,e,r,n)>0)for(a=e;a<r;a+=n)u=Zh(a,t[a],t[a+1],u);else for(a=r-n;a>=e;a-=n)u=Zh(a,t[a],t[a+1],u);return u&&Vs(u,u.next)&&(Zi(u),u=u.next),u}function Sn(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(Vs(r,r.next)||st(r.prev,r,r.next)===0)){if(Zi(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function Yi(t,e,r,n,i,a,u){if(t){!u&&a&&Cx(t,n,i,a);for(var l=t,f,p;t.prev!==t.next;){if(f=t.prev,p=t.next,a?yx(t,n,i,a):_x(t)){e.push(f.i/r|0),e.push(t.i/r|0),e.push(p.i/r|0),Zi(t),t=p.next,l=p.next;continue}if(t=p,t===l){u?u===1?(t=xx(Sn(t),e,r),Yi(t,e,r,n,i,a,2)):u===2&&bx(t,e,r,n,i,a):Yi(Sn(t),e,r,n,i,a,1);break}}}}function _x(t){var e=t.prev,r=t,n=t.next;if(st(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,v=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>=v&&_.x<=d&&_.y>=c&&_.y<=m&&ei(i,l,a,f,u,p,_.x,_.y)&&st(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function yx(t,e,r,n){var i=t.prev,a=t,u=t.next;if(st(i,a,u)>=0)return!1;for(var l=i.x,f=a.x,p=u.x,v=i.y,c=a.y,d=u.y,m=l<f?l<p?l:p:f<p?f:p,_=v<c?v<d?v:d:c<d?c:d,b=l>f?l>p?l:p:f>p?f:p,x=v>c?v>d?v:d:c>d?c:d,w=su(m,_,e,r,n),E=su(b,x,e,r,n),A=t.prevZ,I=t.nextZ;A&&A.z>=w&&I&&I.z<=E;){if(A.x>=m&&A.x<=b&&A.y>=_&&A.y<=x&&A!==i&&A!==u&&ei(l,v,f,c,p,d,A.x,A.y)&&st(A.prev,A,A.next)>=0||(A=A.prevZ,I.x>=m&&I.x<=b&&I.y>=_&&I.y<=x&&I!==i&&I!==u&&ei(l,v,f,c,p,d,I.x,I.y)&&st(I.prev,I,I.next)>=0))return!1;I=I.nextZ}for(;A&&A.z>=w;){if(A.x>=m&&A.x<=b&&A.y>=_&&A.y<=x&&A!==i&&A!==u&&ei(l,v,f,c,p,d,A.x,A.y)&&st(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;I&&I.z<=E;){if(I.x>=m&&I.x<=b&&I.y>=_&&I.y<=x&&I!==i&&I!==u&&ei(l,v,f,c,p,d,I.x,I.y)&&st(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function xx(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!Vs(i,a)&&Yh(i,n,n.next,a)&&Ki(i,a)&&Ki(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),Zi(n),Zi(n.next),n=t=a),n=n.next}while(n!==t);return Sn(n)}function bx(t,e,r,n,i,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&Px(u,l)){var f=Kh(u,l);u=Sn(u,u.next),f=Sn(f,f.next),Yi(u,e,r,n,i,a,0),Yi(f,e,r,n,i,a,0);return}l=l.next}u=u.next}while(u!==t)}function wx(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=qh(t,l,f,n,!1),p===p.next&&(p.steiner=!0),i.push(Rx(p));for(i.sort(Tx),a=0;a<i.length;a++)r=Sx(i[a],r);return r}function Tx(t,e){return t.x-e.x}function Sx(t,e){var r=Ax(t,e);if(!r)return e;var n=Kh(r,t);return Sn(n,n.next),Sn(r,r.next)}function Ax(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,v=u.y,c=1/0,d;r=u;do n>=r.x&&r.x>=p&&n!==r.x&&ei(i<v?n:a,i,p,v,i<v?a:n,i,r.x,r.y)&&(d=Math.abs(i-r.y)/(n-r.x),Ki(r,t)&&(d<c||d===c&&(r.x>u.x||r.x===u.x&&Ex(u,r)))&&(u=r,c=d)),r=r.next;while(r!==f);return u}function Ex(t,e){return st(t.prev,t,e.prev)<0&&st(e.next,t,t.next)<0}function Cx(t,e,r,n){var i=t;do i.z===0&&(i.z=su(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,Ix(i)}function Ix(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 su(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 Rx(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 ei(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 Px(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Mx(t,e)&&(Ki(t,e)&&Ki(e,t)&&Ox(t,e)&&(st(t.prev,t,e.prev)||st(t,e.prev,e))||Vs(t,e)&&st(t.prev,t,t.next)>0&&st(e.prev,e,e.next)>0)}function st(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Vs(t,e){return t.x===e.x&&t.y===e.y}function Yh(t,e,r,n){var i=js(st(t,e,r)),a=js(st(t,e,n)),u=js(st(r,n,t)),l=js(st(r,n,e));return!!(i!==a&&u!==l||i===0&&Xs(t,r,e)||a===0&&Xs(t,n,e)||u===0&&Xs(r,t,n)||l===0&&Xs(r,e,n))}function Xs(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 js(t){return t>0?1:t<0?-1:0}function Mx(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&&Yh(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function Ki(t,e){return st(t.prev,t,t.next)<0?st(t,e,t.next)>=0&&st(t,t.prev,e)>=0:st(t,e,t.prev)<0||st(t,t.next,e)<0}function Ox(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 Kh(t,e){var r=new au(t.i,t.x,t.y),n=new au(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 Zh(t,e,r,n){var i=new au(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 Zi(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 au(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}Hs.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,u=Math.abs(ou(t,0,a,r));if(i)for(var l=0,f=e.length;l<f;l++){var p=e[l]*r,v=l<f-1?e[l+1]*r:t.length;u-=Math.abs(ou(t,p,v,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 ou(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}Hs.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 Fx=iu.exports;const Nx=Wn(Fx);var Ws={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Ws.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,v=26,c=38,d=700,m=72,_=128,b="-",x=/^xn--/,w=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,A={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,N=String.fromCharCode,L;function k(X){throw new RangeError(A[X])}function D(X,Y){for(var ce=X.length,Se=[];ce--;)Se[ce]=Y(X[ce]);return Se}function j(X,Y){var ce=X.split("@"),Se="";ce.length>1&&(Se=ce[0]+"@",X=ce[1]),X=X.replace(E,".");var xe=X.split("."),Me=D(xe,Y).join(".");return Se+Me}function Q(X){for(var Y=[],ce=0,Se=X.length,xe,Me;ce<Se;)xe=X.charCodeAt(ce++),xe>=55296&&xe<=56319&&ce<Se?(Me=X.charCodeAt(ce++),(Me&64512)==56320?Y.push(((xe&1023)<<10)+(Me&1023)+65536):(Y.push(xe),ce--)):Y.push(xe);return Y}function fe(X){return D(X,function(Y){var ce="";return Y>65535&&(Y-=65536,ce+=N(Y>>>10&1023|55296),Y=56320|Y&1023),ce+=N(Y),ce}).join("")}function H(X){return X-48<10?X-22:X-65<26?X-65:X-97<26?X-97:f}function V(X,Y){return X+22+75*(X<26)-((Y!=0)<<5)}function le(X,Y,ce){var Se=0;for(X=ce?O(X/d):X>>1,X+=O(X/Y);X>I*v>>1;Se+=f)X=O(X/I);return O(Se+(I+1)*X/(X+c))}function ve(X){var Y=[],ce=X.length,Se,xe=0,Me=_,Oe=m,Ge,ze,Ke,Ze,be,De,Qe,Je,Le;for(Ge=X.lastIndexOf(b),Ge<0&&(Ge=0),ze=0;ze<Ge;++ze)X.charCodeAt(ze)>=128&&k("not-basic"),Y.push(X.charCodeAt(ze));for(Ke=Ge>0?Ge+1:0;Ke<ce;){for(Ze=xe,be=1,De=f;Ke>=ce&&k("invalid-input"),Qe=H(X.charCodeAt(Ke++)),(Qe>=f||Qe>O((l-xe)/be))&&k("overflow"),xe+=Qe*be,Je=De<=Oe?p:De>=Oe+v?v:De-Oe,!(Qe<Je);De+=f)Le=f-Je,be>O(l/Le)&&k("overflow"),be*=Le;Se=Y.length+1,Oe=le(xe-Ze,Se,Ze==0),O(xe/Se)>l-Me&&k("overflow"),Me+=O(xe/Se),xe%=Se,Y.splice(xe++,0,Me)}return fe(Y)}function z(X){var Y,ce,Se,xe,Me,Oe,Ge,ze,Ke,Ze,be,De=[],Qe,Je,Le,J;for(X=Q(X),Qe=X.length,Y=_,ce=0,Me=m,Oe=0;Oe<Qe;++Oe)be=X[Oe],be<128&&De.push(N(be));for(Se=xe=De.length,xe&&De.push(b);Se<Qe;){for(Ge=l,Oe=0;Oe<Qe;++Oe)be=X[Oe],be>=Y&&be<Ge&&(Ge=be);for(Je=Se+1,Ge-Y>O((l-ce)/Je)&&k("overflow"),ce+=(Ge-Y)*Je,Y=Ge,Oe=0;Oe<Qe;++Oe)if(be=X[Oe],be<Y&&++ce>l&&k("overflow"),be==Y){for(ze=ce,Ke=f;Ze=Ke<=Me?p:Ke>=Me+v?v:Ke-Me,!(ze<Ze);Ke+=f)J=ze-Ze,Le=f-Ze,De.push(N(V(Ze+J%Le,0))),ze=O(J/Le);De.push(N(V(ze,0))),Me=le(ce,Je,Se==xe),ce=0,++Se}++ce,++Y}return De.join("")}function ee(X){return j(X,function(Y){return x.test(Y)?ve(Y.slice(4).toLowerCase()):Y})}function pe(X){return j(X,function(Y){return w.test(Y)?"xn--"+z(Y):Y})}if(u={version:"1.4.1",ucs2:{decode:Q,encode:fe},decode:ve,encode:z,toASCII:pe,toUnicode:ee},n&&i)if(t.exports==n)i.exports=u;else for(L in u)u.hasOwnProperty(L)&&(n[L]=u[L]);else r.punycode=u})(At)}(Ws,Ws.exports);var Lx=Ws.exports,kx=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},Qh=typeof Symbol<"u"&&Symbol,Bx=kx,Dx=function(){return typeof Qh!="function"||typeof Symbol!="function"||typeof Qh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bx()},Jh={foo:{}},Ux=Object,$x=function(){return{__proto__:Jh}.foo===Jh.foo&&!({__proto__:null}instanceof Ux)},Gx="Function.prototype.bind called on incompatible ",uu=Array.prototype.slice,zx=Object.prototype.toString,Hx="[object Function]",Vx=function(e){var r=this;if(typeof r!="function"||zx.call(r)!==Hx)throw new TypeError(Gx+r);for(var n=uu.call(arguments,1),i,a=function(){if(this instanceof i){var v=r.apply(this,n.concat(uu.call(arguments)));return Object(v)===v?v:this}else return r.apply(e,n.concat(uu.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},Xx=Vx,lu=Function.prototype.bind||Xx,jx=lu,Wx=jx.call(Function.call,Object.prototype.hasOwnProperty),Te,ti=SyntaxError,ef=Function,ri=TypeError,cu=function(t){try{return ef('"use strict"; return ('+t+").constructor;")()}catch{}},An=Object.getOwnPropertyDescriptor;if(An)try{An({},"")}catch{An=null}var hu=function(){throw new ri},qx=An?function(){try{return arguments.callee,hu}catch{try{return An(arguments,"callee").get}catch{return hu}}}():hu,ni=Dx(),Yx=$x(),bt=Object.getPrototypeOf||(Yx?function(t){return t.__proto__}:null),ii={},Kx=typeof Uint8Array>"u"||!bt?Te:bt(Uint8Array),En={"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":ni&&bt?bt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":ii,"%AsyncGenerator%":ii,"%AsyncGeneratorFunction%":ii,"%AsyncIteratorPrototype%":ii,"%Atomics%":typeof Atomics>"u"?Te:Atomics,"%BigInt%":typeof BigInt>"u"?Te:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Te:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Te:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Te:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":ef,"%GeneratorFunction%":ii,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ni&&bt?bt(bt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ni||!bt?Te:bt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Te:Promise,"%Proxy%":typeof Proxy>"u"?Te:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ni||!bt?Te:bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ni&&bt?bt(""[Symbol.iterator]()):Te,"%Symbol%":ni?Symbol:Te,"%SyntaxError%":ti,"%ThrowTypeError%":qx,"%TypedArray%":Kx,"%TypeError%":ri,"%Uint8Array%":typeof Uint8Array>"u"?Te:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Te:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Te:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Te:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet};if(bt)try{null.error}catch(t){var Zx=bt(bt(t));En["%Error.prototype%"]=Zx}var Qx=function t(e){var r;if(e==="%AsyncFunction%")r=cu("async function () {}");else if(e==="%GeneratorFunction%")r=cu("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=cu("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 En[e]=r,r},tf={"%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"]},Qi=lu,qs=Wx,Jx=Qi.call(Function.call,Array.prototype.concat),e1=Qi.call(Function.apply,Array.prototype.splice),rf=Qi.call(Function.call,String.prototype.replace),Ys=Qi.call(Function.call,String.prototype.slice),t1=Qi.call(Function.call,RegExp.prototype.exec),r1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,n1=/\\(\\)?/g,i1=function(e){var r=Ys(e,0,1),n=Ys(e,-1);if(r==="%"&&n!=="%")throw new ti("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ti("invalid intrinsic syntax, expected opening `%`");var i=[];return rf(e,r1,function(a,u,l,f){i[i.length]=l?rf(f,n1,"$1"):u||a}),i},s1=function(e,r){var n=e,i;if(qs(tf,n)&&(i=tf[n],n="%"+i[0]+"%"),qs(En,n)){var a=En[n];if(a===ii&&(a=Qx(n)),typeof a>"u"&&!r)throw new ri("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new ti("intrinsic "+e+" does not exist!")},fu=function(e,r){if(typeof e!="string"||e.length===0)throw new ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ri('"allowMissing" argument must be a boolean');if(t1(/^%?[^%]*%?$/,e)===null)throw new ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=i1(e),i=n.length>0?n[0]:"",a=s1("%"+i+"%",r),u=a.name,l=a.value,f=!1,p=a.alias;p&&(i=p[0],e1(n,Jx([0,1],p)));for(var v=1,c=!0;v<n.length;v+=1){var d=n[v],m=Ys(d,0,1),_=Ys(d,-1);if((m==='"'||m==="'"||m==="`"||_==='"'||_==="'"||_==="`")&&m!==_)throw new ti("property names with quotes must have matching quotes");if((d==="constructor"||!c)&&(f=!0),i+="."+d,u="%"+i+"%",qs(En,u))l=En[u];else if(l!=null){if(!(d in l)){if(!r)throw new ri("base intrinsic for "+e+" exists, but the property is not available.");return}if(An&&v+1>=n.length){var b=An(l,d);c=!!b,c&&"get"in b&&!("originalValue"in b.get)?l=b.get:l=l[d]}else c=qs(l,d),l=l[d];c&&!f&&(En[u]=l)}}return l},nf={exports:{}};(function(t){var e=lu,r=fu,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})(nf);var a1=nf.exports,sf=fu,af=a1,o1=af(sf("String.prototype.indexOf")),u1=function(e,r){var n=sf(e,!!r);return typeof n=="function"&&o1(e,".prototype.")>-1?af(n):n};const l1=lv(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var du=typeof Map=="function"&&Map.prototype,pu=Object.getOwnPropertyDescriptor&&du?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ks=du&&pu&&typeof pu.get=="function"?pu.get:null,of=du&&Map.prototype.forEach,gu=typeof Set=="function"&&Set.prototype,mu=Object.getOwnPropertyDescriptor&&gu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Zs=gu&&mu&&typeof mu.get=="function"?mu.get:null,uf=gu&&Set.prototype.forEach,c1=typeof WeakMap=="function"&&WeakMap.prototype,Ji=c1?WeakMap.prototype.has:null,h1=typeof WeakSet=="function"&&WeakSet.prototype,es=h1?WeakSet.prototype.has:null,f1=typeof WeakRef=="function"&&WeakRef.prototype,lf=f1?WeakRef.prototype.deref:null,d1=Boolean.prototype.valueOf,p1=Object.prototype.toString,g1=Function.prototype.toString,m1=String.prototype.match,vu=String.prototype.slice,tn=String.prototype.replace,v1=String.prototype.toUpperCase,cf=String.prototype.toLowerCase,hf=RegExp.prototype.test,ff=Array.prototype.concat,Pr=Array.prototype.join,_1=Array.prototype.slice,df=Math.floor,_u=typeof BigInt=="function"?BigInt.prototype.valueOf:null,yu=Object.getOwnPropertySymbols,xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,si=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Rt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===si||"symbol")?Symbol.toStringTag:null,pf=Object.prototype.propertyIsEnumerable,gf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function mf(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||hf.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-df(-t):df(t);if(n!==t){var i=String(n),a=vu.call(e,i.length+1);return tn.call(i,r,"$&_")+"."+tn.call(tn.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return tn.call(e,r,"$&_")}var bu=l1,vf=bu.custom,_f=bf(vf)?vf:null,y1=function t(e,r,n,i){var a=r||{};if(rn(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(rn(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=rn(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(rn(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(rn(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 Tf(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return l?mf(e,f):f}if(typeof e=="bigint"){var p=String(e)+"n";return l?mf(e,p):p}var v=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=v&&v>0&&typeof e=="object")return wu(e)?"[Array]":"[Object]";var c=B1(a,n);if(typeof i>"u")i=[];else if(wf(i,e)>=0)return"[Circular]";function d(H,V,le){if(V&&(i=_1.call(i),i.push(V)),le){var ve={depth:a.depth};return rn(a,"quoteStyle")&&(ve.quoteStyle=a.quoteStyle),t(H,ve,n+1,i)}return t(H,a,n+1,i)}if(typeof e=="function"&&!xf(e)){var m=I1(e),_=Qs(e,d);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(_.length>0?" { "+Pr.call(_,", ")+" }":"")}if(bf(e)){var b=si?tn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):xu.call(e);return typeof e=="object"&&!si?ts(b):b}if(N1(e)){for(var x="<"+cf.call(String(e.nodeName)),w=e.attributes||[],E=0;E<w.length;E++)x+=" "+w[E].name+"="+yf(x1(w[E].value),"double",a);return x+=">",e.childNodes&&e.childNodes.length&&(x+="..."),x+="</"+cf.call(String(e.nodeName))+">",x}if(wu(e)){if(e.length===0)return"[]";var A=Qs(e,d);return c&&!k1(A)?"["+Su(A,c)+"]":"[ "+Pr.call(A,", ")+" ]"}if(w1(e)){var I=Qs(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!pf.call(e,"cause")?"{ ["+String(e)+"] "+Pr.call(ff.call("[cause]: "+d(e.cause),I),", ")+" }":I.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Pr.call(I,", ")+" }"}if(typeof e=="object"&&u){if(_f&&typeof e[_f]=="function"&&bu)return bu(e,{depth:v-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(R1(e)){var O=[];return of&&of.call(e,function(H,V){O.push(d(V,e,!0)+" => "+d(H,e))}),Sf("Map",Ks.call(e),O,c)}if(O1(e)){var N=[];return uf&&uf.call(e,function(H){N.push(d(H,e))}),Sf("Set",Zs.call(e),N,c)}if(P1(e))return Tu("WeakMap");if(F1(e))return Tu("WeakSet");if(M1(e))return Tu("WeakRef");if(S1(e))return ts(d(Number(e)));if(E1(e))return ts(d(_u.call(e)));if(A1(e))return ts(d1.call(e));if(T1(e))return ts(d(String(e)));if(!b1(e)&&!xf(e)){var L=Qs(e,d),k=gf?gf(e)===Object.prototype:e instanceof Object||e.constructor===Object,D=e instanceof Object?"":"null prototype",j=!k&&Rt&&Object(e)===e&&Rt in e?vu.call(nn(e),8,-1):D?"Object":"",Q=k||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",fe=Q+(j||D?"["+Pr.call(ff.call([],j||[],D||[]),": ")+"] ":"");return L.length===0?fe+"{}":c?fe+"{"+Su(L,c)+"}":fe+"{ "+Pr.call(L,", ")+" }"}return String(e)};function yf(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function x1(t){return tn.call(String(t),/"/g,"&quot;")}function wu(t){return nn(t)==="[object Array]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function b1(t){return nn(t)==="[object Date]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function xf(t){return nn(t)==="[object RegExp]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function w1(t){return nn(t)==="[object Error]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function T1(t){return nn(t)==="[object String]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function S1(t){return nn(t)==="[object Number]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function A1(t){return nn(t)==="[object Boolean]"&&(!Rt||!(typeof t=="object"&&Rt in t))}function bf(t){if(si)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!xu)return!1;try{return xu.call(t),!0}catch{}return!1}function E1(t){if(!t||typeof t!="object"||!_u)return!1;try{return _u.call(t),!0}catch{}return!1}var C1=Object.prototype.hasOwnProperty||function(t){return t in this};function rn(t,e){return C1.call(t,e)}function nn(t){return p1.call(t)}function I1(t){if(t.name)return t.name;var e=m1.call(g1.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function wf(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 R1(t){if(!Ks||!t||typeof t!="object")return!1;try{Ks.call(t);try{Zs.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function P1(t){if(!Ji||!t||typeof t!="object")return!1;try{Ji.call(t,Ji);try{es.call(t,es)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function M1(t){if(!lf||!t||typeof t!="object")return!1;try{return lf.call(t),!0}catch{}return!1}function O1(t){if(!Zs||!t||typeof t!="object")return!1;try{Zs.call(t);try{Ks.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function F1(t){if(!es||!t||typeof t!="object")return!1;try{es.call(t,es);try{Ji.call(t,Ji)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function N1(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Tf(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Tf(vu.call(t,0,e.maxStringLength),e)+n}var i=tn.call(tn.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,L1);return yf(i,"single",e)}function L1(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":"")+v1.call(e.toString(16))}function ts(t){return"Object("+t+")"}function Tu(t){return t+" { ? }"}function Sf(t,e,r,n){var i=n?Su(r,n):Pr.call(r,", ");return t+" ("+e+") {"+i+"}"}function k1(t){for(var e=0;e<t.length;e++)if(wf(t[e],`
10
10
  `)>=0)return!1;return!0}function B1(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Pr.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Pr.call(Array(e+1),r)}}function Su(t,e){if(t.length===0)return"";var r=`
11
11
  `+e.prev+e.base;return r+Pr.call(t,","+r)+`
12
- `+e.prev}function Qs(t,e){var r=wu(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=rn(t,i)?e(t[i],t):""}var a=typeof yu=="function"?yu(t):[],u;if(si){u={};for(var l=0;l<a.length;l++)u["$"+a[l]]=a[l]}for(var f in t)rn(t,f)&&(r&&String(Number(f))===f&&f<t.length||si&&u["$"+f]instanceof Symbol||(hf.call(/[^\w$]/,f)?n.push(e(f,t)+": "+e(t[f],t)):n.push(f+": "+e(t[f],t))));if(typeof yu=="function")for(var p=0;p<a.length;p++)pf.call(t,a[p])&&n.push("["+e(a[p])+"]: "+e(t[a[p]],t));return n}var Au=fu,ai=u1,D1=y1,U1=Au("%TypeError%"),Js=Au("%WeakMap%",!0),ea=Au("%Map%",!0),$1=ai("WeakMap.prototype.get",!0),G1=ai("WeakMap.prototype.set",!0),z1=ai("WeakMap.prototype.has",!0),H1=ai("Map.prototype.get",!0),V1=ai("Map.prototype.set",!0),X1=ai("Map.prototype.has",!0),Eu=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},j1=function(t,e){var r=Eu(t,e);return r&&r.value},W1=function(t,e,r){var n=Eu(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},q1=function(t,e){return!!Eu(t,e)},Y1=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new U1("Side channel does not contain "+D1(a))},get:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(e)return $1(e,a)}else if(ea){if(r)return H1(r,a)}else if(n)return j1(n,a)},has:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(e)return z1(e,a)}else if(ea){if(r)return X1(r,a)}else if(n)return q1(n,a);return!1},set:function(a,u){Js&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Js),G1(e,a,u)):ea?(r||(r=new ea),V1(r,a,u)):(n||(n={key:{},next:null}),W1(n,a,u))}};return i},K1=String.prototype.replace,Z1=/%20/g,Cu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Iu={default:Cu.RFC3986,formatters:{RFC1738:function(t){return K1.call(t,Z1,"+")},RFC3986:function(t){return String(t)}},RFC1738:Cu.RFC1738,RFC3986:Cu.RFC3986},Q1=Iu,Ru=Object.prototype.hasOwnProperty,Cn=Array.isArray,Mr=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),J1=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Cn(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},Af=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},eb=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Cn(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ru.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 Cn(e)&&!Cn(r)&&(i=Af(e,n)),Cn(e)&&Cn(r)?(r.forEach(function(a,u){if(Ru.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 Ru.call(a,u)?a[u]=t(a[u],l,n):a[u]=l,a},i)},tb=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},rb=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}},nb=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(v){return"%26%23"+parseInt(v.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===Q1.RFC1738&&(p===40||p===41)){l+=u.charAt(f);continue}if(p<128){l=l+Mr[p];continue}if(p<2048){l=l+(Mr[192|p>>6]+Mr[128|p&63]);continue}if(p<55296||p>=57344){l=l+(Mr[224|p>>12]+Mr[128|p>>6&63]+Mr[128|p&63]);continue}f+=1,p=65536+((p&1023)<<10|u.charCodeAt(f)&1023),l+=Mr[240|p>>18]+Mr[128|p>>12&63]+Mr[128|p>>6&63]+Mr[128|p&63]}return l},ib=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],v=u[p];typeof v=="object"&&v!==null&&n.indexOf(v)===-1&&(r.push({obj:u,prop:p}),n.push(v))}return J1(r),e},sb=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},ab=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},ob=function(e,r){return[].concat(e,r)},ub=function(e,r){if(Cn(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},Ef={arrayToObject:Af,assign:tb,combine:ob,compact:ib,decode:rb,encode:nb,isBuffer:ab,isRegExp:sb,maybeMap:ub,merge:eb},Cf=Y1,ta=Ef,rs=Iu,lb=Object.prototype.hasOwnProperty,If={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},Dr=Array.isArray,cb=Array.prototype.push,Rf=function(t,e){cb.apply(t,Dr(e)?e:[e])},hb=Date.prototype.toISOString,Pf=rs.default,Pt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ta.encode,encodeValuesOnly:!1,format:Pf,formatter:rs.formatters[Pf],indices:!1,serializeDate:function(e){return hb.call(e)},skipNulls:!1,strictNullHandling:!1},fb=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Pu={},db=function t(e,r,n,i,a,u,l,f,p,v,c,d,m,_,x,b){for(var w=e,E=b,A=0,I=!1;(E=E.get(Pu))!==void 0&&!I;){var O=E.get(e);if(A+=1,typeof O<"u"){if(O===A)throw new RangeError("Cyclic object value");I=!0}typeof E.get(Pu)>"u"&&(A=0)}if(typeof f=="function"?w=f(r,w):w instanceof Date?w=c(w):n==="comma"&&Dr(w)&&(w=ta.maybeMap(w,function(ve){return ve instanceof Date?c(ve):ve})),w===null){if(a)return l&&!_?l(r,Pt.encoder,x,"key",d):r;w=""}if(fb(w)||ta.isBuffer(w)){if(l){var N=_?r:l(r,Pt.encoder,x,"key",d);return[m(N)+"="+m(l(w,Pt.encoder,x,"value",d))]}return[m(r)+"="+m(String(w))]}var L=[];if(typeof w>"u")return L;var k;if(n==="comma"&&Dr(w))_&&l&&(w=ta.maybeMap(w,l)),k=[{value:w.length>0?w.join(",")||null:void 0}];else if(Dr(f))k=f;else{var D=Object.keys(w);k=p?D.sort(p):D}for(var j=i&&Dr(w)&&w.length===1?r+"[]":r,Q=0;Q<k.length;++Q){var fe=k[Q],H=typeof fe=="object"&&typeof fe.value<"u"?fe.value:w[fe];if(!(u&&H===null)){var V=Dr(w)?typeof n=="function"?n(j,fe):j:j+(v?"."+fe:"["+fe+"]");b.set(e,A);var le=Cf();le.set(Pu,b),Rf(L,t(H,V,n,i,a,u,n==="comma"&&_&&Dr(w)?null:l,f,p,v,c,d,m,_,x,le))}}return L},pb=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=rs.default;if(typeof e.format<"u"){if(!lb.call(rs.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=rs.formatters[n],a=Pt.filter;return(typeof e.filter=="function"||Dr(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}},gb=function(t,e){var r=t,n=pb(e),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Dr(n.filter)&&(a=n.filter,i=a);var u=[];if(typeof r!="object"||r===null)return"";var l;e&&e.arrayFormat in If?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var f=If[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 v=Cf(),c=0;c<i.length;++c){var d=i[c];n.skipNulls&&r[d]===null||Rf(u,db(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,v))}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:""},oi=Ef,Mu=Object.prototype.hasOwnProperty,mb=Array.isArray,wt={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:oi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vb=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Mf=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},_b="utf8=%26%2310003%3B",yb="utf8=%E2%9C%93",xb=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]===yb?p="utf-8":u[f]===_b&&(p="iso-8859-1"),l=f,f=u.length);for(f=0;f<u.length;++f)if(f!==l){var v=u[f],c=v.indexOf("]="),d=c===-1?v.indexOf("="):c+1,m,_;d===-1?(m=r.decoder(v,wt.decoder,p,"key"),_=r.strictNullHandling?null:""):(m=r.decoder(v.slice(0,d),wt.decoder,p,"key"),_=oi.maybeMap(Mf(v.slice(d+1),r),function(x){return r.decoder(x,wt.decoder,p,"value")})),_&&r.interpretNumericEntities&&p==="iso-8859-1"&&(_=vb(_)),v.indexOf("[]=")>-1&&(_=mb(_)?[_]:_),Mu.call(n,m)?n[m]=oi.combine(n[m],_):n[m]=_}return n},bb=function(t,e,r,n){for(var i=n?e:Mf(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},wb=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,v=[];if(p){if(!n.plainObjects&&Mu.call(Object.prototype,p)&&!n.allowPrototypes)return;v.push(p)}for(var c=0;n.depth>0&&(f=l.exec(a))!==null&&c<n.depth;){if(c+=1,!n.plainObjects&&Mu.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;v.push(f[1])}return f&&v.push("["+a.slice(f.index)+"]"),bb(v,r,n,i)}},Tb=function(e){if(!e)return wt;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"?wt.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?wt.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:wt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:wt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:wt.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:wt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:wt.comma,decoder:typeof e.decoder=="function"?e.decoder:wt.decoder,delimiter:typeof e.delimiter=="string"||oi.isRegExp(e.delimiter)?e.delimiter:wt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:wt.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:wt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:wt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:wt.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:wt.strictNullHandling}},Sb=function(t,e){var r=Tb(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?xb(t,r):t,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],f=wb(l,n[l],r,typeof t=="string");i=oi.merge(i,f,r)}return r.allowSparse===!0?i:oi.compact(i)},Ab=gb,Eb=Sb,Cb=Iu,Ib={formats:Cb,parse:Eb,stringify:Ab},Rb=Lx;function hr(){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 Pb=/^([a-z0-9.+-]+:)/i,Mb=/:[0-9]*$/,Ob=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Fb=["<",">",'"',"`"," ","\r",`
13
- `," "],Nb=["{","}","|","\\","^","`"].concat(Fb),Ou=["'"].concat(Nb),Of=["%","/","?",";","#"].concat(Ou),Ff=["/","?","#"],Lb=255,Nf=/^[+a-z0-9A-Z_-]{0,63}$/,kb=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bb={javascript:!0,"javascript:":!0},Fu={javascript:!0,"javascript:":!0},ui={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Nu=Ib;function ra(t,e,r){if(t&&typeof t=="object"&&t instanceof hr)return t;var n=new hr;return n.parse(t,e,r),n}hr.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=Ob.exec(l);if(f)return this.path=l,this.href=l,this.pathname=f[1],f[2]?(this.search=f[2],e?this.query=Nu.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=Pb.exec(l);if(p){p=p[0];var v=p.toLowerCase();this.protocol=v,l=l.substr(p.length)}if(r||p||l.match(/^\/\/[^@/]+@[^@/]+/)){var c=l.substr(0,2)==="//";c&&!(p&&Fu[p])&&(l=l.substr(2),this.slashes=!0)}if(!Fu[p]&&(c||p&&!ui[p])){for(var d=-1,m=0;m<Ff.length;m++){var _=l.indexOf(Ff[m]);_!==-1&&(d===-1||_<d)&&(d=_)}var x,b;d===-1?b=l.lastIndexOf("@"):b=l.lastIndexOf("@",d),b!==-1&&(x=l.slice(0,b),l=l.slice(b+1),this.auth=decodeURIComponent(x)),d=-1;for(var m=0;m<Of.length;m++){var _=l.indexOf(Of[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 w=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!w)for(var E=this.hostname.split(/\./),m=0,A=E.length;m<A;m++){var I=E[m];if(I&&!I.match(Nf)){for(var O="",N=0,L=I.length;N<L;N++)I.charCodeAt(N)>127?O+="x":O+=I[N];if(!O.match(Nf)){var k=E.slice(0,m),D=E.slice(m+1),j=I.match(kb);j&&(k.push(j[1]),D.unshift(j[2])),D.length&&(l="/"+D.join(".")+l),this.hostname=k.join(".");break}}}this.hostname.length>Lb?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=Rb.toASCII(this.hostname));var Q=this.port?":"+this.port:"",fe=this.hostname||"";this.host=fe+Q,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!Bb[v])for(var m=0,A=Ou.length;m<A;m++){var H=Ou[m];if(l.indexOf(H)!==-1){var V=encodeURIComponent(H);V===H&&(V=escape(H)),l=l.split(H).join(V)}}var le=l.indexOf("#");le!==-1&&(this.hash=l.substr(le),l=l.slice(0,le));var ve=l.indexOf("?");if(ve!==-1?(this.search=l.substr(ve),this.query=l.substr(ve+1),e&&(this.query=Nu.parse(this.query)),l=l.slice(0,ve)):e&&(this.search="",this.query={}),l&&(this.pathname=l),ui[v]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Q=this.pathname||"",z=this.search||"";this.path=Q+z}return this.href=this.format(),this};function Db(t){return typeof t=="string"&&(t=ra(t)),t instanceof hr?t.format():hr.prototype.format.call(t)}hr.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=Nu.stringify(this.query));var u=this.search||a&&"?"+a||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||ui[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 Ub(t,e){return ra(t,!1,!0).resolve(e)}hr.prototype.resolve=function(t){return this.resolveObject(ra(t,!1,!0)).format()},hr.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new hr;e.parse(t,!1,!0),t=e}for(var r=new hr,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 ui[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(!ui[t.protocol]){for(var p=Object.keys(t),v=0;v<p.length;v++){var c=p[v];r[c]=t[c]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!Fu[t.protocol]){for(var A=(t.pathname||"").split("/");A.length&&!(t.host=A.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),A[0]!==""&&A.unshift(""),A.length<2&&A.unshift(""),r.pathname=A.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)==="/",x=t.host||t.pathname&&t.pathname.charAt(0)==="/",b=x||_||r.host&&t.pathname,w=b,E=r.pathname&&r.pathname.split("/")||[],A=t.pathname&&t.pathname.split("/")||[],I=r.protocol&&!ui[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&&(A[0]===""?A[0]=t.host:A.unshift(t.host)),t.host=null),b=b&&(A[0]===""||E[0]==="")),x)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=A;else if(A.length)E||(E=[]),E.pop(),E=E.concat(A),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 N=E.slice(-1)[0],L=(r.host||t.host||E.length>1)&&(N==="."||N==="..")||N==="",k=0,D=E.length;D>=0;D--)N=E[D],N==="."?E.splice(D,1):N===".."?(E.splice(D,1),k++):k&&(E.splice(D,1),k--);if(!b&&!w)for(;k--;k)E.unshift("..");b&&E[0]!==""&&(!E[0]||E[0].charAt(0)!=="/")&&E.unshift(""),L&&E.join("/").substr(-1)!=="/"&&E.push("");var j=E[0]===""||E[0]&&E[0].charAt(0)==="/";if(I){r.hostname=j?"":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&&!j&&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},hr.prototype.parseHost=function(){var t=this.host,e=Mb.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 $b=ra,Gb=Ub,zb=Db;const Hb={parse:$b,format:zb,resolve:Gb},Lf={};function Re(t,e,r=3){if(Lf[e])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
12
+ `+e.prev}function Qs(t,e){var r=wu(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=rn(t,i)?e(t[i],t):""}var a=typeof yu=="function"?yu(t):[],u;if(si){u={};for(var l=0;l<a.length;l++)u["$"+a[l]]=a[l]}for(var f in t)rn(t,f)&&(r&&String(Number(f))===f&&f<t.length||si&&u["$"+f]instanceof Symbol||(hf.call(/[^\w$]/,f)?n.push(e(f,t)+": "+e(t[f],t)):n.push(f+": "+e(t[f],t))));if(typeof yu=="function")for(var p=0;p<a.length;p++)pf.call(t,a[p])&&n.push("["+e(a[p])+"]: "+e(t[a[p]],t));return n}var Au=fu,ai=u1,D1=y1,U1=Au("%TypeError%"),Js=Au("%WeakMap%",!0),ea=Au("%Map%",!0),$1=ai("WeakMap.prototype.get",!0),G1=ai("WeakMap.prototype.set",!0),z1=ai("WeakMap.prototype.has",!0),H1=ai("Map.prototype.get",!0),V1=ai("Map.prototype.set",!0),X1=ai("Map.prototype.has",!0),Eu=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},j1=function(t,e){var r=Eu(t,e);return r&&r.value},W1=function(t,e,r){var n=Eu(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},q1=function(t,e){return!!Eu(t,e)},Y1=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new U1("Side channel does not contain "+D1(a))},get:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(e)return $1(e,a)}else if(ea){if(r)return H1(r,a)}else if(n)return j1(n,a)},has:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(e)return z1(e,a)}else if(ea){if(r)return X1(r,a)}else if(n)return q1(n,a);return!1},set:function(a,u){Js&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Js),G1(e,a,u)):ea?(r||(r=new ea),V1(r,a,u)):(n||(n={key:{},next:null}),W1(n,a,u))}};return i},K1=String.prototype.replace,Z1=/%20/g,Cu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Iu={default:Cu.RFC3986,formatters:{RFC1738:function(t){return K1.call(t,Z1,"+")},RFC3986:function(t){return String(t)}},RFC1738:Cu.RFC1738,RFC3986:Cu.RFC3986},Q1=Iu,Ru=Object.prototype.hasOwnProperty,Cn=Array.isArray,Mr=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),J1=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Cn(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},Af=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},eb=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Cn(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ru.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 Cn(e)&&!Cn(r)&&(i=Af(e,n)),Cn(e)&&Cn(r)?(r.forEach(function(a,u){if(Ru.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 Ru.call(a,u)?a[u]=t(a[u],l,n):a[u]=l,a},i)},tb=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},rb=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}},nb=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(v){return"%26%23"+parseInt(v.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===Q1.RFC1738&&(p===40||p===41)){l+=u.charAt(f);continue}if(p<128){l=l+Mr[p];continue}if(p<2048){l=l+(Mr[192|p>>6]+Mr[128|p&63]);continue}if(p<55296||p>=57344){l=l+(Mr[224|p>>12]+Mr[128|p>>6&63]+Mr[128|p&63]);continue}f+=1,p=65536+((p&1023)<<10|u.charCodeAt(f)&1023),l+=Mr[240|p>>18]+Mr[128|p>>12&63]+Mr[128|p>>6&63]+Mr[128|p&63]}return l},ib=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],v=u[p];typeof v=="object"&&v!==null&&n.indexOf(v)===-1&&(r.push({obj:u,prop:p}),n.push(v))}return J1(r),e},sb=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},ab=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},ob=function(e,r){return[].concat(e,r)},ub=function(e,r){if(Cn(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},Ef={arrayToObject:Af,assign:tb,combine:ob,compact:ib,decode:rb,encode:nb,isBuffer:ab,isRegExp:sb,maybeMap:ub,merge:eb},Cf=Y1,ta=Ef,rs=Iu,lb=Object.prototype.hasOwnProperty,If={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},Dr=Array.isArray,cb=Array.prototype.push,Rf=function(t,e){cb.apply(t,Dr(e)?e:[e])},hb=Date.prototype.toISOString,Pf=rs.default,Pt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ta.encode,encodeValuesOnly:!1,format:Pf,formatter:rs.formatters[Pf],indices:!1,serializeDate:function(e){return hb.call(e)},skipNulls:!1,strictNullHandling:!1},fb=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Pu={},db=function t(e,r,n,i,a,u,l,f,p,v,c,d,m,_,b,x){for(var w=e,E=x,A=0,I=!1;(E=E.get(Pu))!==void 0&&!I;){var O=E.get(e);if(A+=1,typeof O<"u"){if(O===A)throw new RangeError("Cyclic object value");I=!0}typeof E.get(Pu)>"u"&&(A=0)}if(typeof f=="function"?w=f(r,w):w instanceof Date?w=c(w):n==="comma"&&Dr(w)&&(w=ta.maybeMap(w,function(ve){return ve instanceof Date?c(ve):ve})),w===null){if(a)return l&&!_?l(r,Pt.encoder,b,"key",d):r;w=""}if(fb(w)||ta.isBuffer(w)){if(l){var N=_?r:l(r,Pt.encoder,b,"key",d);return[m(N)+"="+m(l(w,Pt.encoder,b,"value",d))]}return[m(r)+"="+m(String(w))]}var L=[];if(typeof w>"u")return L;var k;if(n==="comma"&&Dr(w))_&&l&&(w=ta.maybeMap(w,l)),k=[{value:w.length>0?w.join(",")||null:void 0}];else if(Dr(f))k=f;else{var D=Object.keys(w);k=p?D.sort(p):D}for(var j=i&&Dr(w)&&w.length===1?r+"[]":r,Q=0;Q<k.length;++Q){var fe=k[Q],H=typeof fe=="object"&&typeof fe.value<"u"?fe.value:w[fe];if(!(u&&H===null)){var V=Dr(w)?typeof n=="function"?n(j,fe):j:j+(v?"."+fe:"["+fe+"]");x.set(e,A);var le=Cf();le.set(Pu,x),Rf(L,t(H,V,n,i,a,u,n==="comma"&&_&&Dr(w)?null:l,f,p,v,c,d,m,_,b,le))}}return L},pb=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=rs.default;if(typeof e.format<"u"){if(!lb.call(rs.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=rs.formatters[n],a=Pt.filter;return(typeof e.filter=="function"||Dr(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}},gb=function(t,e){var r=t,n=pb(e),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Dr(n.filter)&&(a=n.filter,i=a);var u=[];if(typeof r!="object"||r===null)return"";var l;e&&e.arrayFormat in If?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var f=If[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 v=Cf(),c=0;c<i.length;++c){var d=i[c];n.skipNulls&&r[d]===null||Rf(u,db(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,v))}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:""},oi=Ef,Mu=Object.prototype.hasOwnProperty,mb=Array.isArray,wt={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:oi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vb=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Mf=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},_b="utf8=%26%2310003%3B",yb="utf8=%E2%9C%93",xb=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]===yb?p="utf-8":u[f]===_b&&(p="iso-8859-1"),l=f,f=u.length);for(f=0;f<u.length;++f)if(f!==l){var v=u[f],c=v.indexOf("]="),d=c===-1?v.indexOf("="):c+1,m,_;d===-1?(m=r.decoder(v,wt.decoder,p,"key"),_=r.strictNullHandling?null:""):(m=r.decoder(v.slice(0,d),wt.decoder,p,"key"),_=oi.maybeMap(Mf(v.slice(d+1),r),function(b){return r.decoder(b,wt.decoder,p,"value")})),_&&r.interpretNumericEntities&&p==="iso-8859-1"&&(_=vb(_)),v.indexOf("[]=")>-1&&(_=mb(_)?[_]:_),Mu.call(n,m)?n[m]=oi.combine(n[m],_):n[m]=_}return n},bb=function(t,e,r,n){for(var i=n?e:Mf(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},wb=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,v=[];if(p){if(!n.plainObjects&&Mu.call(Object.prototype,p)&&!n.allowPrototypes)return;v.push(p)}for(var c=0;n.depth>0&&(f=l.exec(a))!==null&&c<n.depth;){if(c+=1,!n.plainObjects&&Mu.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;v.push(f[1])}return f&&v.push("["+a.slice(f.index)+"]"),bb(v,r,n,i)}},Tb=function(e){if(!e)return wt;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"?wt.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?wt.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:wt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:wt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:wt.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:wt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:wt.comma,decoder:typeof e.decoder=="function"?e.decoder:wt.decoder,delimiter:typeof e.delimiter=="string"||oi.isRegExp(e.delimiter)?e.delimiter:wt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:wt.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:wt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:wt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:wt.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:wt.strictNullHandling}},Sb=function(t,e){var r=Tb(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?xb(t,r):t,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],f=wb(l,n[l],r,typeof t=="string");i=oi.merge(i,f,r)}return r.allowSparse===!0?i:oi.compact(i)},Ab=gb,Eb=Sb,Cb=Iu,Ib={formats:Cb,parse:Eb,stringify:Ab},Rb=Lx;function hr(){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 Pb=/^([a-z0-9.+-]+:)/i,Mb=/:[0-9]*$/,Ob=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Fb=["<",">",'"',"`"," ","\r",`
13
+ `," "],Nb=["{","}","|","\\","^","`"].concat(Fb),Ou=["'"].concat(Nb),Of=["%","/","?",";","#"].concat(Ou),Ff=["/","?","#"],Lb=255,Nf=/^[+a-z0-9A-Z_-]{0,63}$/,kb=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bb={javascript:!0,"javascript:":!0},Fu={javascript:!0,"javascript:":!0},ui={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Nu=Ib;function ra(t,e,r){if(t&&typeof t=="object"&&t instanceof hr)return t;var n=new hr;return n.parse(t,e,r),n}hr.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=Ob.exec(l);if(f)return this.path=l,this.href=l,this.pathname=f[1],f[2]?(this.search=f[2],e?this.query=Nu.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=Pb.exec(l);if(p){p=p[0];var v=p.toLowerCase();this.protocol=v,l=l.substr(p.length)}if(r||p||l.match(/^\/\/[^@/]+@[^@/]+/)){var c=l.substr(0,2)==="//";c&&!(p&&Fu[p])&&(l=l.substr(2),this.slashes=!0)}if(!Fu[p]&&(c||p&&!ui[p])){for(var d=-1,m=0;m<Ff.length;m++){var _=l.indexOf(Ff[m]);_!==-1&&(d===-1||_<d)&&(d=_)}var b,x;d===-1?x=l.lastIndexOf("@"):x=l.lastIndexOf("@",d),x!==-1&&(b=l.slice(0,x),l=l.slice(x+1),this.auth=decodeURIComponent(b)),d=-1;for(var m=0;m<Of.length;m++){var _=l.indexOf(Of[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 w=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!w)for(var E=this.hostname.split(/\./),m=0,A=E.length;m<A;m++){var I=E[m];if(I&&!I.match(Nf)){for(var O="",N=0,L=I.length;N<L;N++)I.charCodeAt(N)>127?O+="x":O+=I[N];if(!O.match(Nf)){var k=E.slice(0,m),D=E.slice(m+1),j=I.match(kb);j&&(k.push(j[1]),D.unshift(j[2])),D.length&&(l="/"+D.join(".")+l),this.hostname=k.join(".");break}}}this.hostname.length>Lb?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=Rb.toASCII(this.hostname));var Q=this.port?":"+this.port:"",fe=this.hostname||"";this.host=fe+Q,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!Bb[v])for(var m=0,A=Ou.length;m<A;m++){var H=Ou[m];if(l.indexOf(H)!==-1){var V=encodeURIComponent(H);V===H&&(V=escape(H)),l=l.split(H).join(V)}}var le=l.indexOf("#");le!==-1&&(this.hash=l.substr(le),l=l.slice(0,le));var ve=l.indexOf("?");if(ve!==-1?(this.search=l.substr(ve),this.query=l.substr(ve+1),e&&(this.query=Nu.parse(this.query)),l=l.slice(0,ve)):e&&(this.search="",this.query={}),l&&(this.pathname=l),ui[v]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Q=this.pathname||"",z=this.search||"";this.path=Q+z}return this.href=this.format(),this};function Db(t){return typeof t=="string"&&(t=ra(t)),t instanceof hr?t.format():hr.prototype.format.call(t)}hr.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=Nu.stringify(this.query));var u=this.search||a&&"?"+a||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||ui[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 Ub(t,e){return ra(t,!1,!0).resolve(e)}hr.prototype.resolve=function(t){return this.resolveObject(ra(t,!1,!0)).format()},hr.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new hr;e.parse(t,!1,!0),t=e}for(var r=new hr,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 ui[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(!ui[t.protocol]){for(var p=Object.keys(t),v=0;v<p.length;v++){var c=p[v];r[c]=t[c]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!Fu[t.protocol]){for(var A=(t.pathname||"").split("/");A.length&&!(t.host=A.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),A[0]!==""&&A.unshift(""),A.length<2&&A.unshift(""),r.pathname=A.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)==="/",b=t.host||t.pathname&&t.pathname.charAt(0)==="/",x=b||_||r.host&&t.pathname,w=x,E=r.pathname&&r.pathname.split("/")||[],A=t.pathname&&t.pathname.split("/")||[],I=r.protocol&&!ui[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&&(A[0]===""?A[0]=t.host:A.unshift(t.host)),t.host=null),x=x&&(A[0]===""||E[0]==="")),b)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=A;else if(A.length)E||(E=[]),E.pop(),E=E.concat(A),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 N=E.slice(-1)[0],L=(r.host||t.host||E.length>1)&&(N==="."||N==="..")||N==="",k=0,D=E.length;D>=0;D--)N=E[D],N==="."?E.splice(D,1):N===".."?(E.splice(D,1),k++):k&&(E.splice(D,1),k--);if(!x&&!w)for(;k--;k)E.unshift("..");x&&E[0]!==""&&(!E[0]||E[0].charAt(0)!=="/")&&E.unshift(""),L&&E.join("/").substr(-1)!=="/"&&E.push("");var j=E[0]===""||E[0]&&E[0].charAt(0)==="/";if(I){r.hostname=j?"":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 x=x||r.host&&E.length,x&&!j&&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},hr.prototype.parseHost=function(){var t=this.host,e=Mb.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 $b=ra,Gb=Ub,zb=Db;const Hb={parse:$b,format:zb,resolve:Gb},Lf={};function Re(t,e,r=3){if(Lf[e])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
14
14
  Deprecated since v${t}`):(n=n.split(`
15
15
  `).splice(r).join(`
16
16
  `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
17
17
  Deprecated since v${t}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
18
- Deprecated since v${t}`),console.warn(n))),Lf[e]=!0}let Lu;function Vb(){return typeof Lu>"u"&&(Lu=function(){var r;const e={stencil:!0,failIfMajorPerformanceCaveat:ye.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!ye.ADAPTER.getWebGLRenderingContext())return!1;const n=ye.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}}()),Lu}var Xb={grad:.9,turn:360,rad:360/(2*Math.PI)},Ur=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},Tt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},tr=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},kf=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Bf=function(t){return{r:tr(t.r,0,255),g:tr(t.g,0,255),b:tr(t.b,0,255),a:tr(t.a)}},ku=function(t){return{r:Tt(t.r),g:Tt(t.g),b:Tt(t.b),a:Tt(t.a,3)}},jb=/^#([0-9a-f]{3,8})$/i,na=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Df=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}},Uf=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}},$f=function(t){return{h:kf(t.h),s:tr(t.s,0,100),l:tr(t.l,0,100),a:tr(t.a)}},Gf=function(t){return{h:Tt(t.h),s:Tt(t.s),l:Tt(t.l),a:Tt(t.a,3)}},zf=function(t){return Uf((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},ns=function(t){return{h:(e=Df(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},Wb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bu={string:[[function(t){var e=jb.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?Tt(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?Tt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Yb.exec(t)||Kb.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Bf({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=Wb.exec(t)||qb.exec(t);if(!e)return null;var r,n,i=$f({h:(r=e[1],n=e[2],n===void 0&&(n="deg"),Number(r)*(Xb[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return zf(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 Ur(e)&&Ur(r)&&Ur(n)?Bf({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(!Ur(e)||!Ur(r)||!Ur(n))return null;var u=$f({h:Number(e),s:Number(r),l:Number(n),a:Number(a)});return zf(u)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,i=t.a,a=i===void 0?1:i;if(!Ur(e)||!Ur(r)||!Ur(n))return null;var u=function(l){return{h:kf(l.h),s:tr(l.s,0,100),v:tr(l.v,0,100),a:tr(l.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(a)});return Uf(u)},"hsv"]]},Hf=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]},Zb=function(t){return typeof t=="string"?Hf(t.trim(),Bu.string):typeof t=="object"&&t!==null?Hf(t,Bu.object):[null,void 0]},Du=function(t,e){var r=ns(t);return{h:r.h,s:tr(r.s+100*e,0,100),l:r.l,a:r.a}},Uu=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Vf=function(t,e){var r=ns(t);return{h:r.h,s:r.s,l:tr(r.l+100*e,0,100),a:r.a}},$u=function(){function t(e){this.parsed=Zb(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 Tt(Uu(this.rgba),2)},t.prototype.isDark=function(){return Uu(this.rgba)<.5},t.prototype.isLight=function(){return Uu(this.rgba)>=.5},t.prototype.toHex=function(){return e=ku(this.rgba),r=e.r,n=e.g,i=e.b,u=(a=e.a)<1?na(Tt(255*a)):"","#"+na(r)+na(n)+na(i)+u;var e,r,n,i,a,u},t.prototype.toRgb=function(){return ku(this.rgba)},t.prototype.toRgbString=function(){return e=ku(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 Gf(ns(this.rgba))},t.prototype.toHslString=function(){return e=Gf(ns(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=Df(this.rgba),{h:Tt(e.h),s:Tt(e.s),v:Tt(e.v),a:Tt(e.a,3)};var e},t.prototype.invert=function(){return Or({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),Or(Du(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Or(Du(this.rgba,-e))},t.prototype.grayscale=function(){return Or(Du(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Or(Vf(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Or(Vf(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"?Or({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):Tt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=ns(this.rgba);return typeof e=="number"?Or({h:e,s:r.s,l:r.l,a:r.a}):Tt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Or(e).toHex()},t}(),Or=function(t){return t instanceof $u?t:new $u(t)},Xf=[],Qb=function(t){t.forEach(function(e){Xf.indexOf(e)<0&&(e($u,Bu),Xf.push(e))})};function Jb(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 v=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 x=(l=v,f=a[_],Math.pow(l.r-f.r,2)+Math.pow(l.g-f.g,2)+Math.pow(l.b-f.b,2));x<c&&(c=x,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"])}Qb([Jb]);const li=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 li)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]=li.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=li.HEX_PATTERN.exec(t);n&&(t=`#${n[2]}`)}const r=Or(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=li;Mt.shared=new li,Mt.temp=new li,Mt.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function ia(t,e=[]){return Re("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Mt.shared.setValue(t).toRgbArray(e)}function Gu(t){return Re("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Mt.shared.setValue(t).toNumber()}function ew(){const t=[],e=[];for(let n=0;n<32;n++)t[n]=n,e[n]=n;t[ue.NORMAL_NPM]=ue.NORMAL,t[ue.ADD_NPM]=ue.ADD,t[ue.SCREEN_NPM]=ue.SCREEN,e[ue.NORMAL]=ue.NORMAL_NPM,e[ue.ADD]=ue.ADD_NPM,e[ue.SCREEN]=ue.SCREEN_NPM;const r=[];return r.push(e),r.push(t),r}const tw=ew();function jf(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 sa(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 Wf(t){return!(t&t-1)&&!!t}function qf(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 aa(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 rw=0;function is(){return++rw}const Yf={},Fr=Object.create(null),sn=Object.create(null);let oa;function nw(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location,oa||(oa=document.createElement("a")),oa.href=t;const r=Hb.parse(oa.href),n=!r.port&&e.port===""||r.port===e.port;return r.hostname!==e.hostname||!n||r.protocol!==e.protocol?"anonymous":""}function Kf(t,e=1){var n;const r=(n=ye.RETINA_PREFIX)==null?void 0:n.exec(t);return r?parseFloat(r[1]):e}var Ce=(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))(Ce||{});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},Zf=(t,e)=>zu(t).priority??e,$e={_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)=>Zf(a,r)-Zf(i,r)))},n=>{const i=e.indexOf(n.ref);i!==-1&&e.splice(i,1)})}};class iw{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 sw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
18
+ Deprecated since v${t}`),console.warn(n))),Lf[e]=!0}let Lu;function Vb(){return typeof Lu>"u"&&(Lu=function(){var r;const e={stencil:!0,failIfMajorPerformanceCaveat:ye.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!ye.ADAPTER.getWebGLRenderingContext())return!1;const n=ye.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}}()),Lu}var Xb={grad:.9,turn:360,rad:360/(2*Math.PI)},Ur=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},Tt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},tr=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},kf=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Bf=function(t){return{r:tr(t.r,0,255),g:tr(t.g,0,255),b:tr(t.b,0,255),a:tr(t.a)}},ku=function(t){return{r:Tt(t.r),g:Tt(t.g),b:Tt(t.b),a:Tt(t.a,3)}},jb=/^#([0-9a-f]{3,8})$/i,na=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Df=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}},Uf=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}},$f=function(t){return{h:kf(t.h),s:tr(t.s,0,100),l:tr(t.l,0,100),a:tr(t.a)}},Gf=function(t){return{h:Tt(t.h),s:Tt(t.s),l:Tt(t.l),a:Tt(t.a,3)}},zf=function(t){return Uf((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},ns=function(t){return{h:(e=Df(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},Wb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bu={string:[[function(t){var e=jb.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?Tt(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?Tt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Yb.exec(t)||Kb.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Bf({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=Wb.exec(t)||qb.exec(t);if(!e)return null;var r,n,i=$f({h:(r=e[1],n=e[2],n===void 0&&(n="deg"),Number(r)*(Xb[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return zf(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 Ur(e)&&Ur(r)&&Ur(n)?Bf({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(!Ur(e)||!Ur(r)||!Ur(n))return null;var u=$f({h:Number(e),s:Number(r),l:Number(n),a:Number(a)});return zf(u)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,i=t.a,a=i===void 0?1:i;if(!Ur(e)||!Ur(r)||!Ur(n))return null;var u=function(l){return{h:kf(l.h),s:tr(l.s,0,100),v:tr(l.v,0,100),a:tr(l.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(a)});return Uf(u)},"hsv"]]},Hf=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]},Zb=function(t){return typeof t=="string"?Hf(t.trim(),Bu.string):typeof t=="object"&&t!==null?Hf(t,Bu.object):[null,void 0]},Du=function(t,e){var r=ns(t);return{h:r.h,s:tr(r.s+100*e,0,100),l:r.l,a:r.a}},Uu=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Vf=function(t,e){var r=ns(t);return{h:r.h,s:r.s,l:tr(r.l+100*e,0,100),a:r.a}},$u=function(){function t(e){this.parsed=Zb(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 Tt(Uu(this.rgba),2)},t.prototype.isDark=function(){return Uu(this.rgba)<.5},t.prototype.isLight=function(){return Uu(this.rgba)>=.5},t.prototype.toHex=function(){return e=ku(this.rgba),r=e.r,n=e.g,i=e.b,u=(a=e.a)<1?na(Tt(255*a)):"","#"+na(r)+na(n)+na(i)+u;var e,r,n,i,a,u},t.prototype.toRgb=function(){return ku(this.rgba)},t.prototype.toRgbString=function(){return e=ku(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 Gf(ns(this.rgba))},t.prototype.toHslString=function(){return e=Gf(ns(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=Df(this.rgba),{h:Tt(e.h),s:Tt(e.s),v:Tt(e.v),a:Tt(e.a,3)};var e},t.prototype.invert=function(){return Or({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),Or(Du(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Or(Du(this.rgba,-e))},t.prototype.grayscale=function(){return Or(Du(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Or(Vf(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Or(Vf(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"?Or({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):Tt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=ns(this.rgba);return typeof e=="number"?Or({h:e,s:r.s,l:r.l,a:r.a}):Tt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Or(e).toHex()},t}(),Or=function(t){return t instanceof $u?t:new $u(t)},Xf=[],Qb=function(t){t.forEach(function(e){Xf.indexOf(e)<0&&(e($u,Bu),Xf.push(e))})};function Jb(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 v=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 b=(l=v,f=a[_],Math.pow(l.r-f.r,2)+Math.pow(l.g-f.g,2)+Math.pow(l.b-f.b,2));b<c&&(c=b,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"])}Qb([Jb]);const li=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 li)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]=li.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=li.HEX_PATTERN.exec(t);n&&(t=`#${n[2]}`)}const r=Or(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=li;Mt.shared=new li,Mt.temp=new li,Mt.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function ia(t,e=[]){return Re("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Mt.shared.setValue(t).toRgbArray(e)}function Gu(t){return Re("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Mt.shared.setValue(t).toNumber()}function ew(){const t=[],e=[];for(let n=0;n<32;n++)t[n]=n,e[n]=n;t[ue.NORMAL_NPM]=ue.NORMAL,t[ue.ADD_NPM]=ue.ADD,t[ue.SCREEN_NPM]=ue.SCREEN,e[ue.NORMAL]=ue.NORMAL_NPM,e[ue.ADD]=ue.ADD_NPM,e[ue.SCREEN]=ue.SCREEN_NPM;const r=[];return r.push(e),r.push(t),r}const tw=ew();function jf(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 sa(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 Wf(t){return!(t&t-1)&&!!t}function qf(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 aa(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 rw=0;function is(){return++rw}const Yf={},Fr=Object.create(null),sn=Object.create(null);let oa;function nw(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location,oa||(oa=document.createElement("a")),oa.href=t;const r=Hb.parse(oa.href),n=!r.port&&e.port===""||r.port===e.port;return r.hostname!==e.hostname||!n||r.protocol!==e.protocol?"anonymous":""}function Kf(t,e=1){var n;const r=(n=ye.RETINA_PREFIX)==null?void 0:n.exec(t);return r?parseFloat(r[1]):e}var Ce=(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))(Ce||{});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},Zf=(t,e)=>zu(t).priority??e,$e={_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)=>Zf(a,r)-Zf(i,r)))},n=>{const i=e.indexOf(n.ref);i!==-1&&e.splice(i,1)})}};class iw{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 sw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
19
  `);function aw(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 ow(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=sw.replace(/%forloop%/gi,aw(t));if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}const Hu=0,Vu=1,Xu=2,ju=3,Wu=4,qu=5;let ua=class sv{constructor(){this.data=0,this.blendMode=ue.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Hu)}set blend(e){!!(this.data&1<<Hu)!==e&&(this.data^=1<<Hu)}get offsets(){return!!(this.data&1<<Vu)}set offsets(e){!!(this.data&1<<Vu)!==e&&(this.data^=1<<Vu)}get culling(){return!!(this.data&1<<Xu)}set culling(e){!!(this.data&1<<Xu)!==e&&(this.data^=1<<Xu)}get depthTest(){return!!(this.data&1<<ju)}set depthTest(e){!!(this.data&1<<ju)!==e&&(this.data^=1<<ju)}get depthMask(){return!!(this.data&1<<qu)}set depthMask(e){!!(this.data&1<<qu)!==e&&(this.data^=1<<qu)}get clockwiseFrontFace(){return!!(this.data&1<<Wu)}set clockwiseFrontFace(e){!!(this.data&1<<Wu)!==e&&(this.data^=1<<Wu)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==ue.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 sv;return e.depthTest=!1,e.blend=!0,e}};const Yu=[];function Qf(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=Yu.length-1;n>=0;--n){const i=Yu[n];if(i.test&&i.test(t,r))return new i(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class fr{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:v}=this;this._aliasCount++;for(let c=0,d=v.length;c<d;c++)v[c][p](e,r,n,i,a,u,l,f);return v===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(fr.prototype,{dispatch:{value:fr.prototype.emit},run:{value:fr.prototype.emit}});class ss{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new fr("setRealSize"),this.onUpdate=new fr("update"),this.onError=new fr("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 Ku extends ss{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===en.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 uw={scaleMode:Ir.NEAREST,format:K.RGBA,alphaMode:en.NPM},ci=class extends zs{constructor(t=null,e=null){super(),e=Object.assign({},ci.defaultOptions,e);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:a,width:u,height:l,wrapMode:f,format:p,type:v,target:c,resolution:d,resourceOptions:m}=e;t&&!(t instanceof ss)&&(t=Qf(t,m),t.internal=!0),this.resolution=d||ye.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=v,this.target=c,this.alphaMode=r,this.uid=is(),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=Wf(this.realWidth)&&Wf(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 sn[this.cacheId],delete Fr[this.cacheId],this.cacheId=null),this.dispose(),ci.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(t,e,r=ye.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}_${is()}`}i=t._pixiId}let a=sn[i];if(n&&r&&!a)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return a||(a=new ci(t,e),a.cacheId=i,ci.addToCache(a,i)),a}static fromBuffer(t,e,r,n){t=t||new Float32Array(e*r*4);const i=new Ku(t,{width:e,height:r}),a=t instanceof Float32Array?Fe.FLOAT:Fe.UNSIGNED_BYTE;return new ci(i,Object.assign({},uw,n||{width:e,height:r,type:a}))}static addToCache(t,e){e&&(t.textureCacheIds.includes(e)||t.textureCacheIds.push(e),sn[e]&&sn[e]!==t&&console.warn(`BaseTexture added to the cache with an id [${e}] that already had an entry`),sn[e]=t)}static removeFromCache(t){if(typeof t=="string"){const e=sn[t];if(e){const r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete sn[t],e}}else if(t!=null&&t.textureCacheIds){for(let e=0;e<t.textureCacheIds.length;++e)delete sn[t.textureCacheIds[e]];return t.textureCacheIds.length=0,t}return null}};let Ne=ci;Ne.defaultOptions={mipmap:wn.POW2,anisotropicLevel:0,scaleMode:Ir.LINEAR,wrapMode:qi.CLAMP,alphaMode:en.UNPACK,target:Zn.TEXTURE_2D,format:K.RGBA,type:Fe.UNSIGNED_BYTE},Ne._globalBatch=0;class Zu{constructor(){this.texArray=null,this.blend=0,this.type=Jr.TRIANGLES,this.start=0,this.size=0,this.data=null}}let lw=0;class Lt{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=lw++,this.disposeRunner=new fr("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?Rr.ELEMENT_ARRAY_BUFFER:Rr.ARRAY_BUFFER}get index(){return this.type===Rr.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new Lt(e)}}class la{constructor(e,r=0,n=!1,i=Fe.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 la(e,r,n,i,a)}}const cw={Float32Array,Uint32Array,Int32Array,Uint8Array};function hw(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],v=t[f],c=jf(v);i[c]||(i[c]=new cw[c](a)),u=i[c];for(let d=0;d<v.length;d++){const m=(d/p|0)*n+l,_=d%p;u[m+_]=v[d]}l+=p}return new Float32Array(a)}const Jf={5126:4,5123:2,5121:1};let fw=0;const dw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class hi{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=fw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new fr("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 Lt||(r instanceof Array&&(r=new Float32Array(r)),r=new Lt(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 v=this.buffers.indexOf(r);return v===-1&&(this.buffers.push(r),v=this.buffers.length-1),this.attributes[e]=new la(v,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 Lt||(e instanceof Array&&(e=new Uint16Array(e)),e=new Lt(e)),e.type=Rr.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 Lt;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*Jf[a.type]/4),a.buffer=0}for(n.data=hw(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 hi;for(let r=0;r<this.buffers.length;r++)e.buffers[r]=new Lt(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];e.attributes[r]=new la(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=Rr.ELEMENT_ARRAY_BUFFER),e}static merge(e){const r=new hi,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 dw[jf(u.buffers[l].data)](i[l]),r.buffers[l]=new Lt(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=Rr.ELEMENT_ARRAY_BUFFER;let l=0,f=0,p=0,v=0;for(let c=0;c<u.buffers.length;c++)if(u.buffers[c]!==u.indexBuffer){v=c;break}for(const c in u.attributes){const d=u.attributes[c];(d.buffer|0)===v&&(f+=d.size*Jf[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[v].data.length/f,p+=d.length}}return r}}class ed extends hi{constructor(e=!1){super(),this._buffer=new Lt(null,e,!1),this._indexBuffer=new Lt(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Fe.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Fe.FLOAT).addAttribute("aColor",this._buffer,4,!0,Fe.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Fe.FLOAT).addIndex(this._indexBuffer)}}const ca=Math.PI*2,pw=180/Math.PI,as=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 Ye{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new Ye(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 ha=[new Ye,new Ye,new Ye,new Ye];class We{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 We(0,0,0,0)}clone(){return new We(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 k=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=k)return!1;const j=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>j}const n=this.left,i=this.right,a=this.top,u=this.bottom;if(i<=n||u<=a)return!1;const l=ha[0].set(e.left,e.top),f=ha[1].set(e.left,e.bottom),p=ha[2].set(e.right,e.top),v=ha[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(v,v),Math.max(l.x,f.x,p.x,v.x)<=n||Math.min(l.x,f.x,p.x,v.x)>=i||Math.max(l.y,f.y,p.y,v.y)<=a||Math.min(l.y,f.y,p.y,v.y)>=u))return!1;const d=c*(f.y-l.y),m=c*(l.x-f.x),_=d*n+m*a,x=d*i+m*a,b=d*n+m*u,w=d*i+m*u;if(Math.max(_,x,b,w)<=d*l.x+m*l.y||Math.min(_,x,b,w)>=d*v.x+m*v.y)return!1;const E=c*(l.y-p.y),A=c*(p.x-l.x),I=E*n+A*a,O=E*i+A*a,N=E*n+A*u,L=E*i+A*u;return!(Math.max(I,O,N,L)<=E*l.x+A*l.y||Math.min(I,O,N,L)>=E*v.x+A*v.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 Qu{constructor(e=0,r=0,n=0){this.x=e,this.y=r,this.radius=n,this.type=Et.CIRC}clone(){return new Qu(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 We(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 gw=class av{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 av(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 We(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 os{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 os(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],v=this.points[u*2+1];f>r!=v>r&&e<(p-l)*((r-f)/(v-f))+l&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((e,r)=>`${e}, ${r}`,"")}]`}}class Ju{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 Ju(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 kt=class $o{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 Ye;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 Ye;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(ca-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 $o;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 $o}static get TEMP_MATRIX(){return new $o}};const In=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Rn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Pn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Mn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],el=[],td=[],fa=Math.sign;function mw(){for(let t=0;t<16;t++){const e=[];el.push(e);for(let r=0;r<16;r++){const n=fa(In[t]*In[r]+Pn[t]*Rn[r]),i=fa(Rn[t]*In[r]+Mn[t]*Rn[r]),a=fa(In[t]*Pn[r]+Pn[t]*Mn[r]),u=fa(Rn[t]*Pn[r]+Mn[t]*Mn[r]);for(let l=0;l<16;l++)if(In[l]===n&&Rn[l]===i&&Pn[l]===a&&Mn[l]===u){e.push(l);break}}}for(let t=0;t<16;t++){const e=new kt;e.set(In[t],Rn[t],Pn[t],Mn[t],0,0),td.push(e)}}mw();const at={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=>In[t],uY:t=>Rn[t],vX:t=>Pn[t],vY:t=>Mn[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>el[t][e],sub:(t,e)=>el[t][at.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?at.S:at.N:Math.abs(e)*2<=Math.abs(t)?t>0?at.E:at.W:e>0?t>0?at.SE:at.SW:t>0?at.NE:at.NW,matrixAppendRotationInv:(t,e,r=0,n=0)=>{const i=td[at.inv(e)];i.tx=r,i.ty=n,t.append(i)}};class On{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 On(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 rd=class{constructor(){this.worldTransform=new kt,this.localTransform=new kt,this.position=new On(this.onChange,this,0,0),this.scale=new On(this.onChange,this,1,1),this.pivot=new On(this.onChange,this,0,0),this.skew=new On(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 tl=rd;tl.IDENTITY=new rd;var vw=`varying vec2 vTextureCoord;
20
+ else `),r<t-1&&(e+=`if(test == ${r}.0){}`);return e}function ow(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=sw.replace(/%forloop%/gi,aw(t));if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}const Hu=0,Vu=1,Xu=2,ju=3,Wu=4,qu=5;let ua=class sv{constructor(){this.data=0,this.blendMode=ue.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Hu)}set blend(e){!!(this.data&1<<Hu)!==e&&(this.data^=1<<Hu)}get offsets(){return!!(this.data&1<<Vu)}set offsets(e){!!(this.data&1<<Vu)!==e&&(this.data^=1<<Vu)}get culling(){return!!(this.data&1<<Xu)}set culling(e){!!(this.data&1<<Xu)!==e&&(this.data^=1<<Xu)}get depthTest(){return!!(this.data&1<<ju)}set depthTest(e){!!(this.data&1<<ju)!==e&&(this.data^=1<<ju)}get depthMask(){return!!(this.data&1<<qu)}set depthMask(e){!!(this.data&1<<qu)!==e&&(this.data^=1<<qu)}get clockwiseFrontFace(){return!!(this.data&1<<Wu)}set clockwiseFrontFace(e){!!(this.data&1<<Wu)!==e&&(this.data^=1<<Wu)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==ue.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 sv;return e.depthTest=!1,e.blend=!0,e}};const Yu=[];function Qf(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=Yu.length-1;n>=0;--n){const i=Yu[n];if(i.test&&i.test(t,r))return new i(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class fr{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:v}=this;this._aliasCount++;for(let c=0,d=v.length;c<d;c++)v[c][p](e,r,n,i,a,u,l,f);return v===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(fr.prototype,{dispatch:{value:fr.prototype.emit},run:{value:fr.prototype.emit}});class ss{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new fr("setRealSize"),this.onUpdate=new fr("update"),this.onError=new fr("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 Ku extends ss{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===en.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 uw={scaleMode:Ir.NEAREST,format:K.RGBA,alphaMode:en.NPM},ci=class extends zs{constructor(t=null,e=null){super(),e=Object.assign({},ci.defaultOptions,e);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:a,width:u,height:l,wrapMode:f,format:p,type:v,target:c,resolution:d,resourceOptions:m}=e;t&&!(t instanceof ss)&&(t=Qf(t,m),t.internal=!0),this.resolution=d||ye.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=v,this.target=c,this.alphaMode=r,this.uid=is(),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=Wf(this.realWidth)&&Wf(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 sn[this.cacheId],delete Fr[this.cacheId],this.cacheId=null),this.dispose(),ci.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(t,e,r=ye.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}_${is()}`}i=t._pixiId}let a=sn[i];if(n&&r&&!a)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return a||(a=new ci(t,e),a.cacheId=i,ci.addToCache(a,i)),a}static fromBuffer(t,e,r,n){t=t||new Float32Array(e*r*4);const i=new Ku(t,{width:e,height:r}),a=t instanceof Float32Array?Fe.FLOAT:Fe.UNSIGNED_BYTE;return new ci(i,Object.assign({},uw,n||{width:e,height:r,type:a}))}static addToCache(t,e){e&&(t.textureCacheIds.includes(e)||t.textureCacheIds.push(e),sn[e]&&sn[e]!==t&&console.warn(`BaseTexture added to the cache with an id [${e}] that already had an entry`),sn[e]=t)}static removeFromCache(t){if(typeof t=="string"){const e=sn[t];if(e){const r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete sn[t],e}}else if(t!=null&&t.textureCacheIds){for(let e=0;e<t.textureCacheIds.length;++e)delete sn[t.textureCacheIds[e]];return t.textureCacheIds.length=0,t}return null}};let Ne=ci;Ne.defaultOptions={mipmap:wn.POW2,anisotropicLevel:0,scaleMode:Ir.LINEAR,wrapMode:qi.CLAMP,alphaMode:en.UNPACK,target:Zn.TEXTURE_2D,format:K.RGBA,type:Fe.UNSIGNED_BYTE},Ne._globalBatch=0;class Zu{constructor(){this.texArray=null,this.blend=0,this.type=Jr.TRIANGLES,this.start=0,this.size=0,this.data=null}}let lw=0;class Lt{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=lw++,this.disposeRunner=new fr("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?Rr.ELEMENT_ARRAY_BUFFER:Rr.ARRAY_BUFFER}get index(){return this.type===Rr.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new Lt(e)}}class la{constructor(e,r=0,n=!1,i=Fe.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 la(e,r,n,i,a)}}const cw={Float32Array,Uint32Array,Int32Array,Uint8Array};function hw(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],v=t[f],c=jf(v);i[c]||(i[c]=new cw[c](a)),u=i[c];for(let d=0;d<v.length;d++){const m=(d/p|0)*n+l,_=d%p;u[m+_]=v[d]}l+=p}return new Float32Array(a)}const Jf={5126:4,5123:2,5121:1};let fw=0;const dw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class hi{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=fw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new fr("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 Lt||(r instanceof Array&&(r=new Float32Array(r)),r=new Lt(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 v=this.buffers.indexOf(r);return v===-1&&(this.buffers.push(r),v=this.buffers.length-1),this.attributes[e]=new la(v,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 Lt||(e instanceof Array&&(e=new Uint16Array(e)),e=new Lt(e)),e.type=Rr.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 Lt;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*Jf[a.type]/4),a.buffer=0}for(n.data=hw(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 hi;for(let r=0;r<this.buffers.length;r++)e.buffers[r]=new Lt(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];e.attributes[r]=new la(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=Rr.ELEMENT_ARRAY_BUFFER),e}static merge(e){const r=new hi,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 dw[jf(u.buffers[l].data)](i[l]),r.buffers[l]=new Lt(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=Rr.ELEMENT_ARRAY_BUFFER;let l=0,f=0,p=0,v=0;for(let c=0;c<u.buffers.length;c++)if(u.buffers[c]!==u.indexBuffer){v=c;break}for(const c in u.attributes){const d=u.attributes[c];(d.buffer|0)===v&&(f+=d.size*Jf[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[v].data.length/f,p+=d.length}}return r}}class ed extends hi{constructor(e=!1){super(),this._buffer=new Lt(null,e,!1),this._indexBuffer=new Lt(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Fe.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Fe.FLOAT).addAttribute("aColor",this._buffer,4,!0,Fe.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Fe.FLOAT).addIndex(this._indexBuffer)}}const ca=Math.PI*2,pw=180/Math.PI,as=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 Ye{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new Ye(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 ha=[new Ye,new Ye,new Ye,new Ye];class We{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 We(0,0,0,0)}clone(){return new We(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 k=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=k)return!1;const j=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>j}const n=this.left,i=this.right,a=this.top,u=this.bottom;if(i<=n||u<=a)return!1;const l=ha[0].set(e.left,e.top),f=ha[1].set(e.left,e.bottom),p=ha[2].set(e.right,e.top),v=ha[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(v,v),Math.max(l.x,f.x,p.x,v.x)<=n||Math.min(l.x,f.x,p.x,v.x)>=i||Math.max(l.y,f.y,p.y,v.y)<=a||Math.min(l.y,f.y,p.y,v.y)>=u))return!1;const d=c*(f.y-l.y),m=c*(l.x-f.x),_=d*n+m*a,b=d*i+m*a,x=d*n+m*u,w=d*i+m*u;if(Math.max(_,b,x,w)<=d*l.x+m*l.y||Math.min(_,b,x,w)>=d*v.x+m*v.y)return!1;const E=c*(l.y-p.y),A=c*(p.x-l.x),I=E*n+A*a,O=E*i+A*a,N=E*n+A*u,L=E*i+A*u;return!(Math.max(I,O,N,L)<=E*l.x+A*l.y||Math.min(I,O,N,L)>=E*v.x+A*v.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 Qu{constructor(e=0,r=0,n=0){this.x=e,this.y=r,this.radius=n,this.type=Et.CIRC}clone(){return new Qu(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 We(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 gw=class av{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 av(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 We(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 os{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 os(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],v=this.points[u*2+1];f>r!=v>r&&e<(p-l)*((r-f)/(v-f))+l&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((e,r)=>`${e}, ${r}`,"")}]`}}class Ju{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 Ju(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 kt=class $o{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 Ye;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 Ye;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(ca-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 $o;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 $o}static get TEMP_MATRIX(){return new $o}};const In=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Rn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Pn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Mn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],el=[],td=[],fa=Math.sign;function mw(){for(let t=0;t<16;t++){const e=[];el.push(e);for(let r=0;r<16;r++){const n=fa(In[t]*In[r]+Pn[t]*Rn[r]),i=fa(Rn[t]*In[r]+Mn[t]*Rn[r]),a=fa(In[t]*Pn[r]+Pn[t]*Mn[r]),u=fa(Rn[t]*Pn[r]+Mn[t]*Mn[r]);for(let l=0;l<16;l++)if(In[l]===n&&Rn[l]===i&&Pn[l]===a&&Mn[l]===u){e.push(l);break}}}for(let t=0;t<16;t++){const e=new kt;e.set(In[t],Rn[t],Pn[t],Mn[t],0,0),td.push(e)}}mw();const at={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=>In[t],uY:t=>Rn[t],vX:t=>Pn[t],vY:t=>Mn[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>el[t][e],sub:(t,e)=>el[t][at.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?at.S:at.N:Math.abs(e)*2<=Math.abs(t)?t>0?at.E:at.W:e>0?t>0?at.SE:at.SW:t>0?at.NE:at.NW,matrixAppendRotationInv:(t,e,r=0,n=0)=>{const i=td[at.inv(e)];i.tx=r,i.ty=n,t.append(i)}};class On{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 On(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 rd=class{constructor(){this.worldTransform=new kt,this.localTransform=new kt,this.position=new On(this.onChange,this,0,0),this.scale=new On(this.onChange,this,1,1),this.pivot=new On(this.onChange,this,0,0),this.skew=new On(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 tl=rd;tl.IDENTITY=new rd;var vw=`varying vec2 vTextureCoord;
21
21
 
22
22
  uniform sampler2D uSampler;
23
23
 
@@ -350,7 +350,7 @@ void main(void){
350
350
  vTextureId = aTextureId;
351
351
  vColor = aColor * tint;
352
352
  }
353
- `;const pr=class extends hd{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=ed,this.vertexSize=6,this.state=ua.for2d(),this.size=pr.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??Mw(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Pw(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return Re("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Fw}static get defaultFragmentTemplate(){return Ow}setShaderGenerator({vertex:t=pr.defaultVertexSrc,fragment:e=pr.defaultFragmentTemplate}={}){this.shaderGenerator=new Rw(t,e)}contextChange(){const t=this.renderer.gl;ye.PREFER_ENV===bn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),pr.defaultMaxTextures),this.maxTextures=ow(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}=pr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;t.length<r;)t.push(new Zu);for(;e.length<n;)e.push(new nl);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=pr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,a=this.renderer.textureGC.count;let u=++Ne._globalBatch,l=0,f=r[0],p=0;n.copyBoundTextures(i,e);for(let v=0;v<this._bufferSize;++v){const c=t[v];t[v]=null,c._batchEnabled!==u&&(f.count>=e&&(n.boundArray(f,i,u,e),this.buildDrawCalls(f,p,v),p=v,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 v=0;v<i.length;v++)i[v]=null;Ne._globalBatch=u}buildDrawCalls(t,e,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:a,vertexSize:u}=this,l=pr._drawCallPool;let f=this._dcIndex,p=this._aIndex,v=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,x=tw[_.alphaMode?1:0][m.blendMode];n[d]=null,e<d&&c.blend!==x&&(c.size=v-c.start,e=d,c=l[++f],c.texArray=t,c.start=v),this.packInterleavedGeometry(m,i,a,p,v),p+=m.vertexData.length/2*u,v+=m.indices.length,c.blend=x}e<r&&(c.size=v-c.start,++f),this._dcIndex=f,this._aIndex=p,this._iIndex=v}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;pr.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=pr._drawCallPool;let i=null;for(let a=0;a<t;a++){const{texArray:u,type:l,size:f,start:p,blend:v}=n[a];i!==u&&(i=u,this.bindAndClearTexArray(u)),this.state.blendMode=v,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),pr.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=sa(Math.ceil(t/8)),r=qf(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 iw(n*this.vertexSize*4)),i}getIndexBuffer(t){const e=sa(Math.ceil(t/12)),r=qf(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,v=t.vertexData,c=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),m=Mt.shared.setValue(t._tintRGB).toPremultiplied(d);for(let _=0;_<v.length;_+=2)u[n++]=v[_],u[n++]=v[_+1],u[n++]=f[_],u[n++]=f[_+1],a[n++]=m,u[n++]=c;for(let _=0;_<p.length;_++)r[i++]=l+p[_]}};let gr=pr;gr.defaultBatchSize=4096,gr.extension={name:"batch",type:Ce.RendererPlugin},gr._drawCallPool=[],gr._textureArrayPool=[],$e.add(gr);var Nw=`varying vec2 vTextureCoord;
353
+ `;const pr=class extends hd{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=ed,this.vertexSize=6,this.state=ua.for2d(),this.size=pr.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??Mw(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Pw(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return Re("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Fw}static get defaultFragmentTemplate(){return Ow}setShaderGenerator({vertex:t=pr.defaultVertexSrc,fragment:e=pr.defaultFragmentTemplate}={}){this.shaderGenerator=new Rw(t,e)}contextChange(){const t=this.renderer.gl;ye.PREFER_ENV===bn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),pr.defaultMaxTextures),this.maxTextures=ow(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}=pr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;t.length<r;)t.push(new Zu);for(;e.length<n;)e.push(new nl);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=pr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,a=this.renderer.textureGC.count;let u=++Ne._globalBatch,l=0,f=r[0],p=0;n.copyBoundTextures(i,e);for(let v=0;v<this._bufferSize;++v){const c=t[v];t[v]=null,c._batchEnabled!==u&&(f.count>=e&&(n.boundArray(f,i,u,e),this.buildDrawCalls(f,p,v),p=v,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 v=0;v<i.length;v++)i[v]=null;Ne._globalBatch=u}buildDrawCalls(t,e,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:a,vertexSize:u}=this,l=pr._drawCallPool;let f=this._dcIndex,p=this._aIndex,v=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,b=tw[_.alphaMode?1:0][m.blendMode];n[d]=null,e<d&&c.blend!==b&&(c.size=v-c.start,e=d,c=l[++f],c.texArray=t,c.start=v),this.packInterleavedGeometry(m,i,a,p,v),p+=m.vertexData.length/2*u,v+=m.indices.length,c.blend=b}e<r&&(c.size=v-c.start,++f),this._dcIndex=f,this._aIndex=p,this._iIndex=v}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;pr.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=pr._drawCallPool;let i=null;for(let a=0;a<t;a++){const{texArray:u,type:l,size:f,start:p,blend:v}=n[a];i!==u&&(i=u,this.bindAndClearTexArray(u)),this.state.blendMode=v,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),pr.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=sa(Math.ceil(t/8)),r=qf(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 iw(n*this.vertexSize*4)),i}getIndexBuffer(t){const e=sa(Math.ceil(t/12)),r=qf(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,v=t.vertexData,c=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),m=Mt.shared.setValue(t._tintRGB).toPremultiplied(d);for(let _=0;_<v.length;_+=2)u[n++]=v[_],u[n++]=v[_+1],u[n++]=f[_],u[n++]=f[_+1],a[n++]=m,u[n++]=c;for(let _=0;_<p.length;_++)r[i++]=l+p[_]}};let gr=pr;gr.defaultBatchSize=4096,gr.extension={name:"batch",type:Ce.RendererPlugin},gr._drawCallPool=[],gr._textureArrayPool=[],$e.add(gr);var Nw=`varying vec2 vTextureCoord;
354
354
 
355
355
  uniform sampler2D uSampler;
356
356
 
@@ -383,7 +383,7 @@ void main(void)
383
383
  gl_Position = filterVertexPosition();
384
384
  vTextureCoord = filterTextureCoord();
385
385
  }
386
- `;const cs=class extends ls{constructor(t,e,r){const n=$r.from(t||cs.defaultVertexSrc,e||cs.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=cs.defaultResolution,this.multisample=cs.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new ua}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 Lw}static get defaultFragmentSrc(){return Nw}};let Be=cs;Be.defaultResolution=1,Be.defaultMultisample=gt.NONE;class ma{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(){}}ma.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},ma.extension={type:[Ce.RendererSystem,Ce.CanvasRendererSystem],name:"background"},$e.add(ma);class fd{constructor(e){this.renderer=e,this.emptyRenderer=new hd(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 v=a[p],c=v._batchLocation;if(c>=0&&c<i&&r[c]===v){u[p]=c;continue}for(;f<i;){const d=r[f];if(d&&d._batchEnabled===n&&d._batchLocation===f){f++;continue}u[p]=f,v._batchLocation=f,r[f]=v;break}}}destroy(){this.renderer=null}}fd.extension={type:Ce.RendererSystem,name:"batch"},$e.add(fd);let dd=0;class va{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=dd++}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=dd++,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(ye.PREFER_ENV>=bn.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")}}va.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},va.extension={type:Ce.RendererSystem,name:"context"},$e.add(va);class kw extends Ku{upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===en.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 il{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 fr("disposeFramebuffer"),this.multisample=gt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new Ne(null,{scaleMode:Ir.NEAREST,resolution:1,mipmap:wn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Ne(new kw(null,{width:this.width,height:this.height}),{scaleMode:Ir.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:wn.OFF,format:K.DEPTH_COMPONENT,type:Fe.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 pd extends Ne{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=gt.NONE),super(null,e),this.mipmap=wn.OFF,this.valid=!0,this._clear=new Mt([0,0,0,0]),this.framebuffer=new il(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 an extends ss{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=nw(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===en.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 gd extends an{constructor(e,r){if(r=r||{},typeof e=="string"){const n=new Image;an.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??ye.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===en.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 md{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=at.add(n,at.NW),this.x0=f+u*at.uX(n),this.y0=p+l*at.uY(n),n=at.add(n,2),this.x1=f+u*at.uX(n),this.y1=p+l*at.uY(n),n=at.add(n,2),this.x2=f+u*at.uX(n),this.y2=p+l*at.uY(n),n=at.add(n,2),this.x3=f+u*at.uX(n),this.y3=p+l*at.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 vd=new md;function _a(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}class Pe extends zs{constructor(e,r,n,i,a,u,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new We(0,0,1,1)),e instanceof Pe&&(e=e.baseTexture),this.baseTexture=e,this._frame=r,this.trim=i,this.valid=!1,this._uvs=vd,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 Ye(u.x,u.y):new Ye(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&&Fr[r.url]&&Pe.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,Pe.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const e=this._frame.clone(),r=this._frame===this.orig?e:this.orig.clone(),n=new Pe(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===vd&&(this._uvs=new md),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,r={},n=ye.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let a=null;if(i)a=e;else if(e instanceof Ne){if(!e.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${l}-${is()}`,Ne.addToCache(e,e.cacheId)}a=e.cacheId}else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${is()}`}a=e._pixiId}let u=Fr[a];if(i&&n&&!u)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!u&&!(e instanceof Ne)?(r.resolution||(r.resolution=Kf(e)),u=new Pe(new Ne(e,r)),u.baseTexture.cacheId=a,Ne.addToCache(u.baseTexture,a),Pe.addToCache(u,a)):!u&&e instanceof Ne&&(u=new Pe(e),Pe.addToCache(u,a)),u}static fromURL(e,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Pe.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 Pe(Ne.fromBuffer(e,r,n,i))}static fromLoader(e,r,n,i){const a=new Ne(e,Object.assign({scaleMode:Ne.defaultOptions.scaleMode,resolution:Kf(r)},i)),{resource:u}=a;u instanceof gd&&(u.url=r);const l=new Pe(a);return n||(n=r),Ne.addToCache(l.baseTexture,n),Pe.addToCache(l,n),n!==r&&(Ne.addToCache(l.baseTexture,r),Pe.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),Fr[r]&&Fr[r]!==e&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Fr[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=Fr[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete Fr[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)Fr[e.textureCacheIds[r]]===e&&delete Fr[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}`,v=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${p} ${f} ${v}`)}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 Pe._EMPTY||(Pe._EMPTY=new Pe(new Ne),_a(Pe._EMPTY),_a(Pe._EMPTY.baseTexture)),Pe._EMPTY}static get WHITE(){if(!Pe._WHITE){const e=ye.ADAPTER.createCanvas(16,16),r=e.getContext("2d");e.width=16,e.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Pe._WHITE=new Pe(Ne.from(e)),_a(Pe._WHITE),_a(Pe._WHITE.baseTexture)}return Pe._WHITE}}class ya extends Pe{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 ya(new pd(e))}}class _d{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,r,n=gt.NONE){const i=new pd(Object.assign({width:e,height:r,resolution:1,multisample:n},this.textureOptions));return new ya(i)}getOptimalTexture(e,r,n=1,i=gt.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=sa(e),r=sa(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||gt.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}}}_d.SCREEN_KEY=-1;class Bw extends hi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Dw extends hi{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 Lt(this.vertices),this.uvBuffer=new Lt(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 Uw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=gt.NONE,this.sourceFrame=new We,this.destinationFrame=new We,this.bindingSourceFrame=new We,this.bindingDestinationFrame=new We,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const xa=[new Ye,new Ye,new Ye,new Ye],sl=new kt;class yd{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new _d,this.statePool=[],this.quad=new Bw,this.quadUv=new Dw,this.tempRect=new We,this.activeState={},this.globalUniforms=new dr({outputFrame:new We,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 Uw,u=this.renderer.renderTexture;let l=r[0].resolution,f=r[0].multisample,p=r[0].padding,v=r[0].autoFit,c=r[0].legacy??!0;for(let _=1;_<r.length;_++){const x=r[_];l=Math.min(l,x.resolution),f=Math.min(f,x.multisample),p=this.useMaxPadding?Math.max(p,x.padding):p+x.padding,v=v&&x.autoFit,c=c||(x.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(sl.copyFrom(n.projection.transform).invert(),d),v?(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,Tn.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let p=r.renderTexture,v=this.getOptimalFilterTexture(p.width,p.height,r.resolution);v.filterFrame=p.filterFrame;let c=0;for(c=0;c<n.length-1;++c){c===1&&r.multisample>1&&(v=this.getOptimalFilterTexture(p.width,p.height,r.resolution),v.filterFrame=p.filterFrame),n[c].apply(this,p,v,Tn.CLEAR,r);const d=p;p=v,v=d}n[c].apply(this,p,f.renderTexture,Tn.BLEND,r),c>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(p),this.returnFilterTexture(v)}r.clear(),this.statePool.push(r)}bindAndClear(e,r=Tn.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===Tn.CLEAR||r===Tn.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(Jr.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Jr.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(kt.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=gt.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||gt.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=xa[0],i=xa[1],a=xa[2],u=xa[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),v=Math.max(n.y,i.y,a.y,u.y);r.x=l,r.y=f,r.width=p-l,r.height=v-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?sl.copyFrom(a):sl.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)}}}yd.extension={type:Ce.RendererSystem,name:"filter"},$e.add(yd);class $w{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=gt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Gw=new We;class xd{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new il(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 We,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;ye.PREFER_ENV===bn.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=Jo.COLOR|Jo.DEPTH){const{gl:u}=this;u.clearColor(e,r,n,i),u.clear(a)}initFramebuffer(e){const{gl:r}=this,n=new $w(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],v=p.parentTextureArray||p;this.renderer.texture.bind(v,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,v._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,v._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=gt.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=gt.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 v=i.colorTextures[0];if(!v)return;f.blitFramebuffer||(f.blitFramebuffer=new il(i.width,i.height),f.blitFramebuffer.addColorTexture(0,v)),e=f.blitFramebuffer,e.colorTextures[0]!==v&&(e.colorTextures[0]=v,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=Gw,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 We}destroy(){this.renderer=null}}xd.extension={type:Ce.RendererSystem,name:"framebuffer"},$e.add(xd);const al={5126:4,5123:2,5121:1};class bd{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;ye.PREFER_ENV===bn.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 v=p[f];if(v)return p[l.id]=v,v;const c=e.buffers,d=e.attributes,m={},_={};for(const x in c)m[x]=0,_[x]=0;for(const x in d)!d[x].size&&l.attributeData[x]?d[x].size=l.attributeData[x].size:d[x].size||console.warn(`PIXI Geometry attribute '${x}' size cannot be determined (likely the bound shader does not have the attribute)`),m[d[x].buffer]+=d[x].size*al[d[x].type];for(const x in d){const b=d[x],w=b.size;b.stride===void 0&&(m[b.buffer]===w*al[b.type]?b.stride=0:b.stride=m[b.buffer]),b.start===void 0&&(b.start=_[b.buffer],_[b.buffer]+=w*al[b.type])}v=i.createVertexArray(),i.bindVertexArray(v);for(let x=0;x<c.length;x++){const b=c[x];u.bind(b),n&&b._glBuffers[a].refCount++}return this.activateVao(e,l),p[l.id]=v,p[f]=v,i.bindVertexArray(null),u.unbind(Rr.ARRAY_BUFFER),v}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 v=l[p],c=u[v.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,v.size,v.type||n.FLOAT,v.normalized,v.stride,v.start),v.instance)if(this.hasInstance)n.vertexAttribDivisor(m,v.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}}bd.extension={type:Ce.RendererSystem,name:"geometry"},$e.add(bd);const wd=new kt;class zw{constructor(e,r){this._texture=e,this.mapCoord=new kt,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&&(wd.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(wd));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 Hw=`varying vec2 vMaskCoord;
386
+ `;const cs=class extends ls{constructor(t,e,r){const n=$r.from(t||cs.defaultVertexSrc,e||cs.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=cs.defaultResolution,this.multisample=cs.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new ua}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 Lw}static get defaultFragmentSrc(){return Nw}};let Be=cs;Be.defaultResolution=1,Be.defaultMultisample=gt.NONE;class ma{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(){}}ma.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},ma.extension={type:[Ce.RendererSystem,Ce.CanvasRendererSystem],name:"background"},$e.add(ma);class fd{constructor(e){this.renderer=e,this.emptyRenderer=new hd(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 v=a[p],c=v._batchLocation;if(c>=0&&c<i&&r[c]===v){u[p]=c;continue}for(;f<i;){const d=r[f];if(d&&d._batchEnabled===n&&d._batchLocation===f){f++;continue}u[p]=f,v._batchLocation=f,r[f]=v;break}}}destroy(){this.renderer=null}}fd.extension={type:Ce.RendererSystem,name:"batch"},$e.add(fd);let dd=0;class va{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=dd++}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=dd++,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(ye.PREFER_ENV>=bn.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")}}va.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},va.extension={type:Ce.RendererSystem,name:"context"},$e.add(va);class kw extends Ku{upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===en.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 il{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 fr("disposeFramebuffer"),this.multisample=gt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new Ne(null,{scaleMode:Ir.NEAREST,resolution:1,mipmap:wn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Ne(new kw(null,{width:this.width,height:this.height}),{scaleMode:Ir.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:wn.OFF,format:K.DEPTH_COMPONENT,type:Fe.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 pd extends Ne{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=gt.NONE),super(null,e),this.mipmap=wn.OFF,this.valid=!0,this._clear=new Mt([0,0,0,0]),this.framebuffer=new il(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 an extends ss{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=nw(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===en.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 gd extends an{constructor(e,r){if(r=r||{},typeof e=="string"){const n=new Image;an.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??ye.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===en.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 md{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=at.add(n,at.NW),this.x0=f+u*at.uX(n),this.y0=p+l*at.uY(n),n=at.add(n,2),this.x1=f+u*at.uX(n),this.y1=p+l*at.uY(n),n=at.add(n,2),this.x2=f+u*at.uX(n),this.y2=p+l*at.uY(n),n=at.add(n,2),this.x3=f+u*at.uX(n),this.y3=p+l*at.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 vd=new md;function _a(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}class Pe extends zs{constructor(e,r,n,i,a,u,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new We(0,0,1,1)),e instanceof Pe&&(e=e.baseTexture),this.baseTexture=e,this._frame=r,this.trim=i,this.valid=!1,this._uvs=vd,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 Ye(u.x,u.y):new Ye(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&&Fr[r.url]&&Pe.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,Pe.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const e=this._frame.clone(),r=this._frame===this.orig?e:this.orig.clone(),n=new Pe(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===vd&&(this._uvs=new md),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,r={},n=ye.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let a=null;if(i)a=e;else if(e instanceof Ne){if(!e.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${l}-${is()}`,Ne.addToCache(e,e.cacheId)}a=e.cacheId}else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${is()}`}a=e._pixiId}let u=Fr[a];if(i&&n&&!u)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!u&&!(e instanceof Ne)?(r.resolution||(r.resolution=Kf(e)),u=new Pe(new Ne(e,r)),u.baseTexture.cacheId=a,Ne.addToCache(u.baseTexture,a),Pe.addToCache(u,a)):!u&&e instanceof Ne&&(u=new Pe(e),Pe.addToCache(u,a)),u}static fromURL(e,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Pe.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 Pe(Ne.fromBuffer(e,r,n,i))}static fromLoader(e,r,n,i){const a=new Ne(e,Object.assign({scaleMode:Ne.defaultOptions.scaleMode,resolution:Kf(r)},i)),{resource:u}=a;u instanceof gd&&(u.url=r);const l=new Pe(a);return n||(n=r),Ne.addToCache(l.baseTexture,n),Pe.addToCache(l,n),n!==r&&(Ne.addToCache(l.baseTexture,r),Pe.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),Fr[r]&&Fr[r]!==e&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Fr[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=Fr[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete Fr[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)Fr[e.textureCacheIds[r]]===e&&delete Fr[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}`,v=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${p} ${f} ${v}`)}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 Pe._EMPTY||(Pe._EMPTY=new Pe(new Ne),_a(Pe._EMPTY),_a(Pe._EMPTY.baseTexture)),Pe._EMPTY}static get WHITE(){if(!Pe._WHITE){const e=ye.ADAPTER.createCanvas(16,16),r=e.getContext("2d");e.width=16,e.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Pe._WHITE=new Pe(Ne.from(e)),_a(Pe._WHITE),_a(Pe._WHITE.baseTexture)}return Pe._WHITE}}class ya extends Pe{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 ya(new pd(e))}}class _d{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,r,n=gt.NONE){const i=new pd(Object.assign({width:e,height:r,resolution:1,multisample:n},this.textureOptions));return new ya(i)}getOptimalTexture(e,r,n=1,i=gt.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=sa(e),r=sa(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||gt.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}}}_d.SCREEN_KEY=-1;class Bw extends hi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Dw extends hi{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 Lt(this.vertices),this.uvBuffer=new Lt(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 Uw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=gt.NONE,this.sourceFrame=new We,this.destinationFrame=new We,this.bindingSourceFrame=new We,this.bindingDestinationFrame=new We,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const xa=[new Ye,new Ye,new Ye,new Ye],sl=new kt;class yd{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new _d,this.statePool=[],this.quad=new Bw,this.quadUv=new Dw,this.tempRect=new We,this.activeState={},this.globalUniforms=new dr({outputFrame:new We,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 Uw,u=this.renderer.renderTexture;let l=r[0].resolution,f=r[0].multisample,p=r[0].padding,v=r[0].autoFit,c=r[0].legacy??!0;for(let _=1;_<r.length;_++){const b=r[_];l=Math.min(l,b.resolution),f=Math.min(f,b.multisample),p=this.useMaxPadding?Math.max(p,b.padding):p+b.padding,v=v&&b.autoFit,c=c||(b.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(sl.copyFrom(n.projection.transform).invert(),d),v?(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,Tn.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let p=r.renderTexture,v=this.getOptimalFilterTexture(p.width,p.height,r.resolution);v.filterFrame=p.filterFrame;let c=0;for(c=0;c<n.length-1;++c){c===1&&r.multisample>1&&(v=this.getOptimalFilterTexture(p.width,p.height,r.resolution),v.filterFrame=p.filterFrame),n[c].apply(this,p,v,Tn.CLEAR,r);const d=p;p=v,v=d}n[c].apply(this,p,f.renderTexture,Tn.BLEND,r),c>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(p),this.returnFilterTexture(v)}r.clear(),this.statePool.push(r)}bindAndClear(e,r=Tn.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===Tn.CLEAR||r===Tn.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(Jr.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Jr.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(kt.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=gt.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||gt.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=xa[0],i=xa[1],a=xa[2],u=xa[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),v=Math.max(n.y,i.y,a.y,u.y);r.x=l,r.y=f,r.width=p-l,r.height=v-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?sl.copyFrom(a):sl.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)}}}yd.extension={type:Ce.RendererSystem,name:"filter"},$e.add(yd);class $w{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=gt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Gw=new We;class xd{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new il(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 We,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;ye.PREFER_ENV===bn.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=Jo.COLOR|Jo.DEPTH){const{gl:u}=this;u.clearColor(e,r,n,i),u.clear(a)}initFramebuffer(e){const{gl:r}=this,n=new $w(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],v=p.parentTextureArray||p;this.renderer.texture.bind(v,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,v._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,v._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=gt.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=gt.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 v=i.colorTextures[0];if(!v)return;f.blitFramebuffer||(f.blitFramebuffer=new il(i.width,i.height),f.blitFramebuffer.addColorTexture(0,v)),e=f.blitFramebuffer,e.colorTextures[0]!==v&&(e.colorTextures[0]=v,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=Gw,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 We}destroy(){this.renderer=null}}xd.extension={type:Ce.RendererSystem,name:"framebuffer"},$e.add(xd);const al={5126:4,5123:2,5121:1};class bd{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;ye.PREFER_ENV===bn.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 v=p[f];if(v)return p[l.id]=v,v;const c=e.buffers,d=e.attributes,m={},_={};for(const b in c)m[b]=0,_[b]=0;for(const b in d)!d[b].size&&l.attributeData[b]?d[b].size=l.attributeData[b].size:d[b].size||console.warn(`PIXI Geometry attribute '${b}' size cannot be determined (likely the bound shader does not have the attribute)`),m[d[b].buffer]+=d[b].size*al[d[b].type];for(const b in d){const x=d[b],w=x.size;x.stride===void 0&&(m[x.buffer]===w*al[x.type]?x.stride=0:x.stride=m[x.buffer]),x.start===void 0&&(x.start=_[x.buffer],_[x.buffer]+=w*al[x.type])}v=i.createVertexArray(),i.bindVertexArray(v);for(let b=0;b<c.length;b++){const x=c[b];u.bind(x),n&&x._glBuffers[a].refCount++}return this.activateVao(e,l),p[l.id]=v,p[f]=v,i.bindVertexArray(null),u.unbind(Rr.ARRAY_BUFFER),v}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 v=l[p],c=u[v.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,v.size,v.type||n.FLOAT,v.normalized,v.stride,v.start),v.instance)if(this.hasInstance)n.vertexAttribDivisor(m,v.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}}bd.extension={type:Ce.RendererSystem,name:"geometry"},$e.add(bd);const wd=new kt;class zw{constructor(e,r){this._texture=e,this.mapCoord=new kt,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&&(wd.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(wd));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 Hw=`varying vec2 vMaskCoord;
387
387
  varying vec2 vTextureCoord;
388
388
 
389
389
  uniform sampler2D uSampler;
@@ -834,7 +834,7 @@ void main(void)
834
834
  vTextureCoord = aTextureCoord;
835
835
  vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw;
836
836
  }
837
- `,Nn=Nn||{};Nn.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 Nn=Nn||{};Nn.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(z){var ee=new Error(e+": "+z);throw ee.source=e,ee}function n(){var z=i();return e.length>0&&r("Invalid input not EOF"),z}function i(){return A(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(z,ee,pe){return l(ee,function(X){var Y=pe();return Y&&(le(t.comma)||r("Missing comma before color stops")),{type:z,orientation:Y,colorStops:A(I)}})}function l(z,ee){var pe=le(z);if(pe){le(t.startCall)||r("Missing (");var X=ee(pe);return le(t.endCall)||r("Missing )"),X}}function f(){return p()||v()}function p(){return V("directional",t.sideOrCorner,1)}function v(){return V("angular",t.angleValue,1)}function c(){var z,ee=d(),pe;return ee&&(z=[],z.push(ee),pe=e,le(t.comma)&&(ee=d(),ee?z.push(ee):e=pe)),z}function d(){var z=m()||_();if(z)z.at=b();else{var ee=x();if(ee){z=ee;var pe=b();pe&&(z.at=pe)}else{var X=w();X&&(z={type:"default-radial",at:X})}}return z}function m(){var z=V("shape",/^(circle)/i,0);return z&&(z.style=H()||x()),z}function _(){var z=V("shape",/^(ellipse)/i,0);return z&&(z.style=Q()||x()),z}function x(){return V("extent-keyword",t.extentKeywords,1)}function b(){if(V("position",/^at/,0)){var z=w();return z||r("Missing positioning value"),z}}function w(){var z=E();if(z.x||z.y)return{type:"position",value:z}}function E(){return{x:Q(),y:Q()}}function A(z){var ee=z(),pe=[];if(ee)for(pe.push(ee);le(t.comma);)ee=z(),ee?pe.push(ee):r("One extra comma");return pe}function I(){var z=O();return z||r("Expected color definition"),z.length=Q(),z}function O(){return L()||D()||k()||N()}function N(){return V("literal",t.literalColor,0)}function L(){return V("hex",t.hexColor,1)}function k(){return l(t.rgbColor,function(){return{type:"rgb",value:A(j)}})}function D(){return l(t.rgbaColor,function(){return{type:"rgba",value:A(j)}})}function j(){return le(t.number)[1]}function Q(){return V("%",t.percentageValue,1)||fe()||H()}function fe(){return V("position-keyword",t.positionKeywords,1)}function H(){return V("px",t.pixelValue,1)||V("em",t.emValue,1)}function V(z,ee,pe){var X=le(ee);if(X)return{type:z,value:X[pe]}}function le(z){var ee,pe;return pe=/^[\n\r\t\s]+/.exec(e),pe&&ve(pe[0].length),ee=z.exec(e),ee&&ve(ee[0].length),ee}function ve(z){e=e.substr(z)}return function(z){return e=z.toString(),n()}}();var OT=Nn.parse;Nn.stringify;var Wd={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]},qd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function FT(t){var e,r=[],n=1,i;if(typeof t=="string")if(Wd[t])r=Wd[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(qd[d]!==void 0)return qd[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(v){return parseFloat(v)}),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 pl={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},gl={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}};pl.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 NT(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments));var e,r=FT(t);if(!r.space)return[];const n=r.space[0]==="h"?gl.min:pl.min,i=r.space[0]==="h"?gl.max:pl.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=gl.rgb(e)),e.push(Math.min(Math.max(r.alpha,0),1)),e}function Yd(t){switch(typeof t){case"string":return LT(t);case"number":return ia(t);default:return t}}function LT(t){const e=NT(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 kT(t){const e=OT(XT(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=BT(r.type),i=DT(r.colorStops),a=HT(r.orientation);return{type:n,stops:i,angle:a}}function BT(t){const e={"linear-gradient":0,"radial-gradient":1};if(!(t in e))throw new Error(`Unsupported gradient type "${t}"`);return e[t]}function DT(t){const e=GT(t),r=[];for(let n=0;n<t.length;n++){const i=UT(t[n]);r.push({offset:e[n],color:i.slice(0,3),alpha:i[3]})}return r}function UT(t){return Yd($T(t))}function $T(t){switch(t.type){case"hex":return`#${t.value}`;case"literal":return t.value;default:return`${t.type}(${t.value.join(",")})`}}function GT(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(zT)}function zT(t){return t.toString().length>6?parseFloat(t.toString().substring(0,6)):t}function HT(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 VT(t.value)}return 0}function VT(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 XT(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 jT=Object.defineProperty,WT=Object.defineProperties,qT=Object.getOwnPropertyDescriptors,Kd=Object.getOwnPropertySymbols,YT=Object.prototype.hasOwnProperty,KT=Object.prototype.propertyIsEnumerable,Zd=(t,e,r)=>e in t?jT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ml=(t,e)=>{for(var r in e||(e={}))YT.call(e,r)&&Zd(t,r,e[r]);if(Kd)for(var r of Kd(e))KT.call(e,r)&&Zd(t,r,e[r]);return t},ZT=(t,e)=>WT(t,qT(e));const Qd=90;function QT(t){return[...t].sort((e,r)=>e.offset-r.offset)}const vl=class extends Be{constructor(e){e&&"css"in e&&(e=ZT(ml({},kT(e.css||"")),{alpha:e.alpha,maxColors:e.maxColors}));const r=ml(ml({},vl.defaults),e);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(MT,PT),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(e){const r=QT(e),n=new Float32Array(r.length*3),i=0,a=1,u=2;for(let l=0;l<r.length;l++){const f=Yd(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-Qd}get angle(){return this.uniforms.uAngle+Qd}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 Ia=vl;Ia.LINEAR=0,Ia.RADIAL=1,Ia.CONIC=2,Ia.defaults={type:vl.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var JT=`attribute vec2 aVertexPosition;
837
+ `,Nn=Nn||{};Nn.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 Nn=Nn||{};Nn.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(z){var ee=new Error(e+": "+z);throw ee.source=e,ee}function n(){var z=i();return e.length>0&&r("Invalid input not EOF"),z}function i(){return A(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(z,ee,pe){return l(ee,function(X){var Y=pe();return Y&&(le(t.comma)||r("Missing comma before color stops")),{type:z,orientation:Y,colorStops:A(I)}})}function l(z,ee){var pe=le(z);if(pe){le(t.startCall)||r("Missing (");var X=ee(pe);return le(t.endCall)||r("Missing )"),X}}function f(){return p()||v()}function p(){return V("directional",t.sideOrCorner,1)}function v(){return V("angular",t.angleValue,1)}function c(){var z,ee=d(),pe;return ee&&(z=[],z.push(ee),pe=e,le(t.comma)&&(ee=d(),ee?z.push(ee):e=pe)),z}function d(){var z=m()||_();if(z)z.at=x();else{var ee=b();if(ee){z=ee;var pe=x();pe&&(z.at=pe)}else{var X=w();X&&(z={type:"default-radial",at:X})}}return z}function m(){var z=V("shape",/^(circle)/i,0);return z&&(z.style=H()||b()),z}function _(){var z=V("shape",/^(ellipse)/i,0);return z&&(z.style=Q()||b()),z}function b(){return V("extent-keyword",t.extentKeywords,1)}function x(){if(V("position",/^at/,0)){var z=w();return z||r("Missing positioning value"),z}}function w(){var z=E();if(z.x||z.y)return{type:"position",value:z}}function E(){return{x:Q(),y:Q()}}function A(z){var ee=z(),pe=[];if(ee)for(pe.push(ee);le(t.comma);)ee=z(),ee?pe.push(ee):r("One extra comma");return pe}function I(){var z=O();return z||r("Expected color definition"),z.length=Q(),z}function O(){return L()||D()||k()||N()}function N(){return V("literal",t.literalColor,0)}function L(){return V("hex",t.hexColor,1)}function k(){return l(t.rgbColor,function(){return{type:"rgb",value:A(j)}})}function D(){return l(t.rgbaColor,function(){return{type:"rgba",value:A(j)}})}function j(){return le(t.number)[1]}function Q(){return V("%",t.percentageValue,1)||fe()||H()}function fe(){return V("position-keyword",t.positionKeywords,1)}function H(){return V("px",t.pixelValue,1)||V("em",t.emValue,1)}function V(z,ee,pe){var X=le(ee);if(X)return{type:z,value:X[pe]}}function le(z){var ee,pe;return pe=/^[\n\r\t\s]+/.exec(e),pe&&ve(pe[0].length),ee=z.exec(e),ee&&ve(ee[0].length),ee}function ve(z){e=e.substr(z)}return function(z){return e=z.toString(),n()}}();var OT=Nn.parse;Nn.stringify;var Wd={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]},qd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function FT(t){var e,r=[],n=1,i;if(typeof t=="string")if(Wd[t])r=Wd[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(qd[d]!==void 0)return qd[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(v){return parseFloat(v)}),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 pl={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},gl={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}};pl.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 NT(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments));var e,r=FT(t);if(!r.space)return[];const n=r.space[0]==="h"?gl.min:pl.min,i=r.space[0]==="h"?gl.max:pl.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=gl.rgb(e)),e.push(Math.min(Math.max(r.alpha,0),1)),e}function Yd(t){switch(typeof t){case"string":return LT(t);case"number":return ia(t);default:return t}}function LT(t){const e=NT(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 kT(t){const e=OT(XT(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=BT(r.type),i=DT(r.colorStops),a=HT(r.orientation);return{type:n,stops:i,angle:a}}function BT(t){const e={"linear-gradient":0,"radial-gradient":1};if(!(t in e))throw new Error(`Unsupported gradient type "${t}"`);return e[t]}function DT(t){const e=GT(t),r=[];for(let n=0;n<t.length;n++){const i=UT(t[n]);r.push({offset:e[n],color:i.slice(0,3),alpha:i[3]})}return r}function UT(t){return Yd($T(t))}function $T(t){switch(t.type){case"hex":return`#${t.value}`;case"literal":return t.value;default:return`${t.type}(${t.value.join(",")})`}}function GT(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(zT)}function zT(t){return t.toString().length>6?parseFloat(t.toString().substring(0,6)):t}function HT(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 VT(t.value)}return 0}function VT(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 XT(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 jT=Object.defineProperty,WT=Object.defineProperties,qT=Object.getOwnPropertyDescriptors,Kd=Object.getOwnPropertySymbols,YT=Object.prototype.hasOwnProperty,KT=Object.prototype.propertyIsEnumerable,Zd=(t,e,r)=>e in t?jT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ml=(t,e)=>{for(var r in e||(e={}))YT.call(e,r)&&Zd(t,r,e[r]);if(Kd)for(var r of Kd(e))KT.call(e,r)&&Zd(t,r,e[r]);return t},ZT=(t,e)=>WT(t,qT(e));const Qd=90;function QT(t){return[...t].sort((e,r)=>e.offset-r.offset)}const vl=class extends Be{constructor(e){e&&"css"in e&&(e=ZT(ml({},kT(e.css||"")),{alpha:e.alpha,maxColors:e.maxColors}));const r=ml(ml({},vl.defaults),e);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(MT,PT),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(e){const r=QT(e),n=new Float32Array(r.length*3),i=0,a=1,u=2;for(let l=0;l<r.length;l++){const f=Yd(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-Qd}get angle(){return this.uniforms.uAngle+Qd}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 Ia=vl;Ia.LINEAR=0,Ia.RADIAL=1,Ia.CONIC=2,Ia.defaults={type:vl.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var JT=`attribute vec2 aVertexPosition;
838
838
  attribute vec2 aTextureCoord;
839
839
 
840
840
  uniform mat3 projectionMatrix;
@@ -1897,7 +1897,7 @@ void main() {
1897
1897
 
1898
1898
  gl_FragColor = color;
1899
1899
  }
1900
- `,pp=Object.getOwnPropertySymbols,HS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,XS=(t,e)=>{var r={};for(var n in t)HS.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&pp)for(var n of pp(t))e.indexOf(n)<0&&VS.call(t,n)&&(r[n]=t[n]);return r};const gp=class extends Be{constructor(t){const e=Object.assign(gp.defaults,t),{maxKernelSize:r}=e,n=XS(e,["maxKernelSize"]);super(GS,zS.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 jS=gp;jS.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const _i=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:v=0,hue:c=0,sharpness:d=0,vignette:m=0,noise:_=0}=t||{},x=new Jt.Filter(null,`
1900
+ `,pp=Object.getOwnPropertySymbols,HS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,XS=(t,e)=>{var r={};for(var n in t)HS.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&pp)for(var n of pp(t))e.indexOf(n)<0&&VS.call(t,n)&&(r[n]=t[n]);return r};const gp=class extends Be{constructor(t){const e=Object.assign(gp.defaults,t),{maxKernelSize:r}=e,n=XS(e,["maxKernelSize"]);super(GS,zS.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 jS=gp;jS.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const _i=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:v=0,hue:c=0,sharpness:d=0,vignette:m=0,noise:_=0}=t||{},b=new Jt.Filter(null,`
1901
1901
  precision mediump float;
1902
1902
  varying vec2 vTextureCoord;
1903
1903
  uniform sampler2D uSampler;
@@ -1909,7 +1909,7 @@ void main() {
1909
1909
  color.b = color.b - (temperature / 100.0);
1910
1910
  gl_FragColor = color;
1911
1911
  }
1912
- `);x.uniforms.temperature=v;const b=new tS([0,-d,0,-d,1+4*d,-d,0,-d,0]),w=new Jt.filters.ColorMatrixFilter;w.hue(c,!1);const E=new ds(p,1,!0),A=new op({vignetting:m}),I=new Jt.filters.NoiseFilter(_);return{adjustmentFilter:new yT({...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:w,sharpnessFilter:b,temperatureFilter:x,vignetteFilter:A,noiseFilter:I}},WS=()=>{const t=new Jt.Filter(null,`
1912
+ `);b.uniforms.temperature=v;const x=new tS([0,-d,0,-d,1+4*d,-d,0,-d,0]),w=new Jt.filters.ColorMatrixFilter;w.hue(c,!1);const E=new ds(p,1,!0),A=new op({vignetting:m}),I=new Jt.filters.NoiseFilter(_);return{adjustmentFilter:new yT({...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:w,sharpnessFilter:x,temperatureFilter:b,vignetteFilter:A,noiseFilter:I}},WS=()=>{const t=new Jt.Filter(null,`
1913
1913
  precision mediump float;
1914
1914
  uniform mat3 uNightVisionMatrix;
1915
1915
  varying vec2 vTextureCoord;
@@ -1934,7 +1934,7 @@ void main() {
1934
1934
  float vignette = 1.0 - smoothstep(vignetteSize, 0.5, length(delta));
1935
1935
  gl_FragColor = texColor * vignetteColor * vignetteStrength * vignette;
1936
1936
  }
1937
- `);return r.uniforms.vignetteColor=[0,0,0,1],r.uniforms.vignetteSize=.7,r.uniforms.vignetteStrength=.6,{nightVisionFilter:t,vignetteFilter:r}},mp=ne.forwardRef((t,e)=>{const r=W.useRef(null),n=W.useRef(null),{src:i,visible:a,disabled:u,transformation:{x:l,y:f,width:p,height:v,anchor:c,colorCorrection:d={},effect:m},pointerdown:_}=t,{blurRadius:x=0,vignette:b=0,noise:w=0}=d,{temperatureFilter:E,sharpnessFilter:A,hueFilter:I,blurFilter:O,adjustmentFilter:N,vignetteFilter:L,noiseFilter:k}=_i(d),{nightVisionFilter:D}=WS();return ne.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Ee.jsx(xn,{...t,ref:e,children:Ee.jsx(Xe.Container,{ref:n,children:Ee.jsx(Xe.Sprite,{image:i,width:p,height:v,anchor:c,ref:r,alpha:a?1:0,x:l,y:f,...!u&&a&&{interactive:!0,pointerdown:_},filters:[E,A,I,N,...x>0?[O]:[],...m===vn.NightVision?[D]:[],...b>0?[L]:[],...w>0?[k]:[]]})})})});mp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Pa={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,x=_.width/2,b=_.height/2;r=_.x+x,n=_.y+b,u=l=Math.max(0,Math.min(_.radius,Math.min(x,b))),i=x-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 v=0,c=f*4+(i?2:0)+2,d=c,m=p;{const _=i+u,x=a,b=r+_,w=r-_,E=n+x;if(e[v++]=b,e[v++]=E,e[--c]=E,e[--c]=w,a){const A=n-x;e[d++]=w,e[d++]=A,e[--m]=A,e[--m]=b}}for(let _=1;_<f;_++){const x=Math.PI/2*(_/f),b=i+Math.cos(x)*u,w=a+Math.sin(x)*l,E=r+b,A=r-b,I=n+w,O=n-w;e[v++]=E,e[v++]=I,e[--c]=I,e[--c]=A,e[d++]=A,e[d++]=O,e[--m]=O,e[--m]=E}{const _=i,x=a+l,b=r+_,w=r-_,E=n+x,A=n-x;e[v++]=b,e[v++]=E,e[--m]=A,e[--m]=b,i&&(e[v++]=w,e[v++]=E,e[--m]=A,e[--m]=w)}},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 v=t.shape;l=v.x,f=v.y}else{const v=t.shape;l=v.x+v.width/2,f=v.y+v.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 v=2;v<r.length;v+=2)n.push(r[v],r[v+1]),i.push(a++,u,a);i.push(u+1,u,a)}};function vp(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 _p={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){vp(r,!1);const u=[];for(let p=0;p<n.length;p++){const v=n[p];vp(v.points,!0),u.push(r.length/2),r=r.concat(v.points)}const l=Nx(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])}}},qS={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)}},YS={build(t){Pa.build(t)},triangulate(t,e){Pa.triangulate(t,e)}};var _r=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(_r||{}),Ln=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(Ln||{});const yi={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 yp{static curveTo(e,r,n,i,a,u){const l=u[u.length-2],p=u[u.length-1]-r,v=l-e,c=i-r,d=n-e,m=Math.abs(p*d-v*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+v*v,x=c*c+d*d,b=p*c+v*d,w=a*Math.sqrt(_)/m,E=a*Math.sqrt(x)/m,A=w*b/_,I=E*b/x,O=w*d+E*v,N=w*c+E*p,L=v*(E+A),k=p*(E+A),D=d*(w+I),j=c*(w+I),Q=Math.atan2(k-N,L-O),fe=Math.atan2(j-N,D-O);return{cx:O+e,cy:N+r,radius:a,startAngle:Q,endAngle:fe,anticlockwise:v*c>d*p}}static arc(e,r,n,i,a,u,l,f,p){const v=l-u,c=yi._segmentsCount(Math.abs(v)*a,Math.ceil(Math.abs(v)/ca)*40),d=v/(c*2),m=d*2,_=Math.cos(d),x=Math.sin(d),b=c-1,w=b%1/b;for(let E=0;E<=b;++E){const A=E+w*E,I=d+u+m*A,O=Math.cos(I),N=-Math.sin(I);p.push((_*O+x*N)*a+n,(_*-N+x*O)*a+i)}}}class KS{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 xl{static curveLength(e,r,n,i,a,u,l,f){let v=0,c=0,d=0,m=0,_=0,x=0,b=0,w=0,E=0,A=0,I=0,O=e,N=r;for(let L=1;L<=10;++L)c=L/10,d=c*c,m=d*c,_=1-c,x=_*_,b=x*_,w=b*e+3*x*c*n+3*_*d*a+m*l,E=b*r+3*x*c*i+3*_*d*u+m*f,A=O-w,I=N-E,O=w,N=E,v+=Math.sqrt(A*A+I*I);return v}static curveTo(e,r,n,i,a,u,l){const f=l[l.length-2],p=l[l.length-1];l.length-=2;const v=yi._segmentsCount(xl.curveLength(f,p,e,r,n,i,a,u));let c=0,d=0,m=0,_=0,x=0;l.push(f,p);for(let b=1,w=0;b<=v;++b)w=b/v,c=1-w,d=c*c,m=d*c,_=w*w,x=_*w,l.push(m*f+3*d*w*e+3*c*_*n+x*a,m*p+3*d*w*r+3*c*_*i+x*u)}}function xp(t,e,r,n,i,a,u,l){const f=t-r*i,p=e-n*i,v=t+r*a,c=e+n*a;let d,m;u?(d=n,m=-r):(d=-n,m=r);const _=f+d,x=p+m,b=v+d,w=c+m;return l.push(_,x,b,w),2}function kn(t,e,r,n,i,a,u,l){const f=r-t,p=n-e;let v=Math.atan2(f,p),c=Math.atan2(i-t,a-e);l&&v<c?v+=Math.PI*2:!l&&v>c&&(c+=Math.PI*2);let d=v;const m=c-v,_=Math.abs(m),x=Math.sqrt(f*f+p*p),b=(15*_*Math.sqrt(x)/Math.PI>>0)+1,w=m/b;if(d+=w,l){u.push(t,e,r,n);for(let E=1,A=d;E<b;E++,A+=w)u.push(t,e,t+Math.sin(A)*x,e+Math.cos(A)*x);u.push(t,e,i,a)}else{u.push(r,n,t,e);for(let E=1,A=d;E<b;E++,A+=w)u.push(t+Math.sin(A)*x,e+Math.cos(A)*x,t,e);u.push(i,a,t,e)}return b*2}function ZS(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 Ye(n[0],n[1]),l=new Ye(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 z=(u.x+l.x)*.5,ee=(l.y+u.y)*.5;n.unshift(z,ee),n.push(z,ee)}const v=e.points,c=n.length/2;let d=n.length;const m=v.length/2,_=a.width/2,x=_*_,b=a.miterLimit*a.miterLimit;let w=n[0],E=n[1],A=n[2],I=n[3],O=0,N=0,L=-(E-I),k=w-A,D=0,j=0,Q=Math.sqrt(L*L+k*k);L/=Q,k/=Q,L*=_,k*=_;const fe=a.alignment,H=(1-fe)*2,V=fe*2;f||(a.cap===Ln.ROUND?d+=kn(w-L*(H-V)*.5,E-k*(H-V)*.5,w-L*H,E-k*H,w+L*V,E+k*V,v,!0)+2:a.cap===Ln.SQUARE&&(d+=xp(w,E,L,k,H,V,!0,v))),v.push(w-L*H,E-k*H,w+L*V,E+k*V);for(let z=1;z<c-1;++z){w=n[(z-1)*2],E=n[(z-1)*2+1],A=n[z*2],I=n[z*2+1],O=n[(z+1)*2],N=n[(z+1)*2+1],L=-(E-I),k=w-A,Q=Math.sqrt(L*L+k*k),L/=Q,k/=Q,L*=_,k*=_,D=-(I-N),j=A-O,Q=Math.sqrt(D*D+j*j),D/=Q,j/=Q,D*=_,j*=_;const ee=A-w,pe=E-I,X=A-O,Y=N-I,ce=ee*X+pe*Y,Se=pe*X-Y*ee,xe=Se<0;if(Math.abs(Se)<.001*Math.abs(ce)){v.push(A-L*H,I-k*H,A+L*V,I+k*V),ce>=0&&(a.join===_r.ROUND?d+=kn(A,I,A-L*H,I-k*H,A-D*H,I-j*H,v,!1)+4:d+=2,v.push(A-D*V,I-j*V,A+D*H,I+j*H));continue}const Me=(-L+w)*(-k+I)-(-L+A)*(-k+E),Oe=(-D+O)*(-j+I)-(-D+A)*(-j+N),Ge=(ee*Oe-X*Me)/Se,ze=(Y*Me-pe*Oe)/Se,Ke=(Ge-A)*(Ge-A)+(ze-I)*(ze-I),Ze=A+(Ge-A)*H,be=I+(ze-I)*H,De=A-(Ge-A)*V,Qe=I-(ze-I)*V,Je=Math.min(ee*ee+pe*pe,X*X+Y*Y),Le=xe?H:V,J=Je+Le*Le*x,se=Ke<=J;let ut=a.join;if(ut===_r.MITER&&Ke/x>b&&(ut=_r.BEVEL),se)switch(ut){case _r.MITER:{v.push(Ze,be,De,Qe);break}case _r.BEVEL:{xe?v.push(Ze,be,A+L*V,I+k*V,Ze,be,A+D*V,I+j*V):v.push(A-L*H,I-k*H,De,Qe,A-D*H,I-j*H,De,Qe),d+=2;break}case _r.ROUND:{xe?(v.push(Ze,be,A+L*V,I+k*V),d+=kn(A,I,A+L*V,I+k*V,A+D*V,I+j*V,v,!0)+4,v.push(Ze,be,A+D*V,I+j*V)):(v.push(A-L*H,I-k*H,De,Qe),d+=kn(A,I,A-L*H,I-k*H,A-D*H,I-j*H,v,!1)+4,v.push(A-D*H,I-j*H,De,Qe));break}}else{switch(v.push(A-L*H,I-k*H,A+L*V,I+k*V),ut){case _r.MITER:{xe?v.push(De,Qe,De,Qe):v.push(Ze,be,Ze,be),d+=2;break}case _r.ROUND:{xe?d+=kn(A,I,A+L*V,I+k*V,A+D*V,I+j*V,v,!0)+2:d+=kn(A,I,A-L*H,I-k*H,A-D*H,I-j*H,v,!1)+2;break}}v.push(A-D*H,I-j*H,A+D*V,I+j*V),d+=2}}w=n[(c-2)*2],E=n[(c-2)*2+1],A=n[(c-1)*2],I=n[(c-1)*2+1],L=-(E-I),k=w-A,Q=Math.sqrt(L*L+k*k),L/=Q,k/=Q,L*=_,k*=_,v.push(A-L*H,I-k*H,A+L*V,I+k*V),f||(a.cap===Ln.ROUND?d+=kn(A-L*(H-V)*.5,I-k*(H-V)*.5,A-L*H,I-k*H,A+L*V,I+k*V,v,!1)+2:a.cap===Ln.SQUARE&&(d+=xp(A,I,L,k,H,V,!1,v)));const le=e.indices,ve=yi.epsilon*yi.epsilon;for(let z=m;z<d+m-2;++z)w=v[z*2],E=v[z*2+1],A=v[(z+1)*2],I=v[(z+1)*2+1],O=v[(z+2)*2],N=v[(z+2)*2+1],!(Math.abs(w*(I-N)+A*(N-E)+O*(E-I))<ve)&&le.push(z,z+1,z+2)}function QS(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 v=p;for(u.push(i[0],i[1]),r=1;r<f;r++)u.push(i[r*2],i[r*2+1]),l.push(v,v+1),v++;a&&l.push(v,p)}function bp(t,e){t.lineStyle.native?QS(t,e):ZS(t,e)}class bl{static curveLength(e,r,n,i,a,u){const l=e-2*n+a,f=r-2*i+u,p=2*n-2*e,v=2*i-2*r,c=4*(l*l+f*f),d=4*(l*p+f*v),m=p*p+v*v,_=2*Math.sqrt(c+d+m),x=Math.sqrt(c),b=2*c*x,w=2*Math.sqrt(m),E=d/x;return(b*_+x*d*(_-w)+(4*m*c-d*d)*Math.log((2*x+E+_)/(E+w)))/(4*b)}static curveTo(e,r,n,i,a){const u=a[a.length-2],l=a[a.length-1],f=yi._segmentsCount(bl.curveLength(u,l,e,r,n,i));let p=0,v=0;for(let c=1;c<=f;++c){const d=c/f;p=u+(e-u)*d,v=l+(r-l)*d,a.push(p+(e+(n-e)*d-p)*d,v+(r+(i-r)*d-v)*d)}}}const wl={[Et.POLY]:_p,[Et.CIRC]:Pa,[Et.ELIP]:Pa,[Et.RECT]:qS,[Et.RREC]:YS},wp=[],Ma=[];class Tl{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?We.EMPTY:(e=e||new We(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,v=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,v),this.maxY=Math.max(this.maxY,v)}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,v=e.tx,c=e.ty;let d=this.minX,m=this.minY,_=this.maxX,x=this.maxY,b=u*r+f*n+v,w=l*r+p*n+c;d=b<d?b:d,m=w<m?w:m,_=b>_?b:_,x=w>x?w:x,b=u*i+f*n+v,w=l*i+p*n+c,d=b<d?b:d,m=w<m?w:m,_=b>_?b:_,x=w>x?w:x,b=u*r+f*a+v,w=l*r+p*a+c,d=b<d?b:d,m=w<m?w:m,_=b>_?b:_,x=w>x?w:x,b=u*i+f*a+v,w=l*i+p*a+c,d=b<d?b:d,m=w<m?w:m,_=b>_?b:_,x=w>x?w:x,this.minX=d,this.minY=m,this.maxX=_,this.maxY=x}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],v=e[f+1];i=p<i?p:i,a=v<a?v:a,u=p>u?p:u,l=v>l?v: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,v=e.d,c=e.tx,d=e.ty;let m=this.minX,_=this.minY,x=this.maxX,b=this.maxY;for(let w=n;w<i;w+=2){const E=r[w],A=r[w+1],I=l*E+p*A+c,O=v*A+f*E+d;m=Math.min(m,I-a),x=Math.max(x,I+a),_=Math.min(_,O-u),b=Math.max(b,O+u)}this.minX=m,this.minY=_,this.maxX=x,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,v=this.maxY;this.minX=n<l?n:l,this.minY=i<f?i:f,this.maxX=a>p?a:p,this.maxY=u>v?u:v}}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,v=this.maxY;this.minX=n<l?n:l,this.minY=i<f?i:f,this.maxX=a>p?a:p,this.maxY=u>v?u:v}}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 xi extends zs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new tl,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 Tl,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(xi.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 We),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new We),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Tl);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 JS),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*pw}set angle(e){this.transform.rotation=e*as}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 JS extends xi{constructor(){super(...arguments),this.sortDirty=null}}xi.prototype.displayObjectUpdateTransform=xi.prototype.updateTransform;const eA=new kt;function tA(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const Sl=class extends xi{constructor(){super(),this.children=[],this.sortableChildren=Sl.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);aa(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,aa(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,aa(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(tA),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!==Sl.prototype._render&&(r=this.getBounds(!0));const i=t.projection.transform;if(i&&(n?(n=eA.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!==vt.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 bi=Sl;bi.defaultSortableChildren=!1,bi.prototype.containerUpdateTransform=bi.prototype.updateTransform,Object.defineProperties(ye,{SORTABLE_CHILDREN:{get(){return bi.defaultSortableChildren},set(t){Re("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),bi.defaultSortableChildren=t}}});class Oa{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 Oa(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 wi=new Ye,Tp=class extends ed{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 Tl,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(),Ma.push(this.drawCalls[t]);this.drawCalls.length=0;for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e.reset(),wp.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 Oa(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 Oa(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,wi):wi.copyFrom(t),n.shape.contains(wi.x,wi.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(wi.x,wi.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,v=f.lineStyle;wl[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(p.visible||v.visible)&&this.processHoles(f.holes);for(let d=0;d<2;d++){const m=d===0?p:v;if(!m.visible)continue;const _=m.texture.baseTexture,x=this.indices.length,b=this.points.length/2;_.wrapMode=qi.REPEAT,d===0?this.processFill(f):this.processLine(f);const w=this.points.length/2-b;w!==0&&(r&&!this._compareStyles(n,m)&&(r.end(x,b),r=null),r||(r=wp.pop()||new KS,r.begin(m,x,b),this.batches.push(r),n=m),this.addUvs(this.points,t,m.texture,b,w,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<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let t=++Ne._globalBatch;for(let v=0;v<this.drawCalls.length;v++)this.drawCalls[v].texArray.clear(),Ma.push(this.drawCalls[v]);this.drawCalls.length=0;const e=this.colors,r=this.textureIds;let n=Ma.pop();n||(n=new Zu,n.texArray=new nl),n.texArray.count=0,n.start=0,n.size=0,n.type=Jr.TRIANGLES;let i=0,a=null,u=0,l=!1,f=Jr.TRIANGLES,p=0;this.drawCalls.push(n);for(let v=0;v<this.batches.length;v++){const c=this.batches[v],d=8,m=c.style,_=m.texture.baseTexture;l!==!!m.native&&(l=!!m.native,f=l?Jr.LINES:Jr.TRIANGLES,a=null,i=d,t++),a!==_&&(a=_,_._batchEnabled!==t&&(i===d&&(t++,i=0,n.size>0&&(n=Ma.pop(),n||(n=new Zu,n.texArray=new nl),this.drawCalls.push(n)),n.start=p,n.size=0,n.texArray.count=0,n.type=f),_.touched=1,_._batchEnabled=t,_._batchLocation=i,_.wrapMode=qi.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)}Ne._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?_p.triangulate(t,this):wl[t.type].triangulate(t,this)}processLine(t){bp(t,this);for(let e=0;e<t.holes.length;e++)bp(t.holes[e],this)}processHoles(t){for(let e=0;e<t.length;e++){const r=t[e];wl[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,f=r.frame;for(;u<i;){let v=t[(n+u)*2],c=t[(n+u)*2+1];if(a){const d=a.a*v+a.c*c+a.tx;c=a.b*v+a.d*c+a.ty,v=d}u++,e.push(v/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 v=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));v-=d,c-=m;for(let _=r;_<u;_+=2)t[_]=(t[_]+v)*f,t[_+1]=(t[_+1]+c)*p}};let Sp=Tp;Sp.BATCHABLE_SIZE=100;class Fa{constructor(){this.color=16777215,this.alpha=1,this.texture=Pe.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new Fa;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=Pe.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Al extends Fa{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Ln.BUTT,this.join=_r.MITER,this.miterLimit=10}clone(){const e=new Al;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 El={},Na=class extends bi{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 Fa,this._lineStyle=new Al,this._matrix=null,this._holeMode=!1,this.state=ua.for2d(),this._geometry=t||new Sp,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Mt(16777215),this.blendMode=ue.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Na(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:Pe.WHITE,color:t!=null&&t.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Ln.BUTT,join:_r.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 os,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new os,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),bl.curveTo(t,e,r,n,i),this}bezierCurveTo(t,e,r,n,i,a){return this._initCurve(),xl.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=yp.curveTo(t,e,r,n,i,a);if(u){const{cx:l,cy:f,radius:p,startAngle:v,endAngle:c,anticlockwise:d}=u;this.arc(l,f,p,v,c,d)}return this}arc(t,e,r,n,i,a=!1){if(n===i)return this;if(!a&&i<=n?i+=ca:a&&n<=i&&(n+=ca),i-n===0)return this;const l=t+Math.cos(n)*r,f=e+Math.sin(n)*r,p=this._geometry.closePointEps;let v=this.currentPath?this.currentPath.points:null;if(v){const c=Math.abs(v[v.length-2]-l),d=Math.abs(v[v.length-1]-f);c<p&&d<p||v.push(l,f)}else this.moveTo(l,f),v=this.currentPath.points;return yp.arc(l,f,t,e,r,n,i,a,v),this}beginFill(t=0,e){return this.beginTextureFill({texture:Pe.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:Pe.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 We(t,e,r,n))}drawRoundedRect(t,e,r,n,i){return this.drawShape(new Ju(t,e,r,n,i))}drawCircle(t,e,r){return this.drawShape(new Qu(t,e,r))}drawEllipse(t,e,r,n){return this.drawShape(new gw(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 os(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: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(!El[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 kt,default:dr.from({uSamplers:i},!0)},u=t.plugins[r]._shader.program;El[r]=new ls(u,a)}e=El[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,Na._TEMP_POINT),this._geometry.containsPoint(Na._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,f=this._geometry.points,p=this.vertexData;let v=0;for(let c=0;c<f.length;c+=2){const d=f[c],m=f[c+1];p[v++]=r*d+i*m+u,p[v++]=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 Cl=Na;Cl.curves=yi,Cl._TEMP_POINT=new Ye;var rA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Il={},nA={get exports(){return Il},set exports(t){Il=t}};/*!
1937
+ `);return r.uniforms.vignetteColor=[0,0,0,1],r.uniforms.vignetteSize=.7,r.uniforms.vignetteStrength=.6,{nightVisionFilter:t,vignetteFilter:r}},mp=ne.forwardRef((t,e)=>{const r=W.useRef(null),n=W.useRef(null),{src:i,visible:a,disabled:u,transformation:{x:l,y:f,width:p,height:v,anchor:c,colorCorrection:d={},effect:m},pointerdown:_}=t,{blurRadius:b=0,vignette:x=0,noise:w=0}=d,{temperatureFilter:E,sharpnessFilter:A,hueFilter:I,blurFilter:O,adjustmentFilter:N,vignetteFilter:L,noiseFilter:k}=_i(d),{nightVisionFilter:D}=WS();return ne.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Ee.jsx(xn,{...t,ref:e,children:Ee.jsx(Xe.Container,{ref:n,children:Ee.jsx(Xe.Sprite,{image:i,width:p,height:v,anchor:c,ref:r,alpha:a?1:0,x:l,y:f,...!u&&a&&{interactive:!0,pointerdown:_},filters:[E,A,I,N,...b>0?[O]:[],...m===vn.NightVision?[D]:[],...x>0?[L]:[],...w>0?[k]:[]]})})})});mp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Pa={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,b=_.width/2,x=_.height/2;r=_.x+b,n=_.y+x,u=l=Math.max(0,Math.min(_.radius,Math.min(b,x))),i=b-u,a=x-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 v=0,c=f*4+(i?2:0)+2,d=c,m=p;{const _=i+u,b=a,x=r+_,w=r-_,E=n+b;if(e[v++]=x,e[v++]=E,e[--c]=E,e[--c]=w,a){const A=n-b;e[d++]=w,e[d++]=A,e[--m]=A,e[--m]=x}}for(let _=1;_<f;_++){const b=Math.PI/2*(_/f),x=i+Math.cos(b)*u,w=a+Math.sin(b)*l,E=r+x,A=r-x,I=n+w,O=n-w;e[v++]=E,e[v++]=I,e[--c]=I,e[--c]=A,e[d++]=A,e[d++]=O,e[--m]=O,e[--m]=E}{const _=i,b=a+l,x=r+_,w=r-_,E=n+b,A=n-b;e[v++]=x,e[v++]=E,e[--m]=A,e[--m]=x,i&&(e[v++]=w,e[v++]=E,e[--m]=A,e[--m]=w)}},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 v=t.shape;l=v.x,f=v.y}else{const v=t.shape;l=v.x+v.width/2,f=v.y+v.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 v=2;v<r.length;v+=2)n.push(r[v],r[v+1]),i.push(a++,u,a);i.push(u+1,u,a)}};function vp(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 _p={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){vp(r,!1);const u=[];for(let p=0;p<n.length;p++){const v=n[p];vp(v.points,!0),u.push(r.length/2),r=r.concat(v.points)}const l=Nx(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])}}},qS={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)}},YS={build(t){Pa.build(t)},triangulate(t,e){Pa.triangulate(t,e)}};var _r=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(_r||{}),Ln=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(Ln||{});const yi={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 yp{static curveTo(e,r,n,i,a,u){const l=u[u.length-2],p=u[u.length-1]-r,v=l-e,c=i-r,d=n-e,m=Math.abs(p*d-v*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+v*v,b=c*c+d*d,x=p*c+v*d,w=a*Math.sqrt(_)/m,E=a*Math.sqrt(b)/m,A=w*x/_,I=E*x/b,O=w*d+E*v,N=w*c+E*p,L=v*(E+A),k=p*(E+A),D=d*(w+I),j=c*(w+I),Q=Math.atan2(k-N,L-O),fe=Math.atan2(j-N,D-O);return{cx:O+e,cy:N+r,radius:a,startAngle:Q,endAngle:fe,anticlockwise:v*c>d*p}}static arc(e,r,n,i,a,u,l,f,p){const v=l-u,c=yi._segmentsCount(Math.abs(v)*a,Math.ceil(Math.abs(v)/ca)*40),d=v/(c*2),m=d*2,_=Math.cos(d),b=Math.sin(d),x=c-1,w=x%1/x;for(let E=0;E<=x;++E){const A=E+w*E,I=d+u+m*A,O=Math.cos(I),N=-Math.sin(I);p.push((_*O+b*N)*a+n,(_*-N+b*O)*a+i)}}}class KS{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 xl{static curveLength(e,r,n,i,a,u,l,f){let v=0,c=0,d=0,m=0,_=0,b=0,x=0,w=0,E=0,A=0,I=0,O=e,N=r;for(let L=1;L<=10;++L)c=L/10,d=c*c,m=d*c,_=1-c,b=_*_,x=b*_,w=x*e+3*b*c*n+3*_*d*a+m*l,E=x*r+3*b*c*i+3*_*d*u+m*f,A=O-w,I=N-E,O=w,N=E,v+=Math.sqrt(A*A+I*I);return v}static curveTo(e,r,n,i,a,u,l){const f=l[l.length-2],p=l[l.length-1];l.length-=2;const v=yi._segmentsCount(xl.curveLength(f,p,e,r,n,i,a,u));let c=0,d=0,m=0,_=0,b=0;l.push(f,p);for(let x=1,w=0;x<=v;++x)w=x/v,c=1-w,d=c*c,m=d*c,_=w*w,b=_*w,l.push(m*f+3*d*w*e+3*c*_*n+b*a,m*p+3*d*w*r+3*c*_*i+b*u)}}function xp(t,e,r,n,i,a,u,l){const f=t-r*i,p=e-n*i,v=t+r*a,c=e+n*a;let d,m;u?(d=n,m=-r):(d=-n,m=r);const _=f+d,b=p+m,x=v+d,w=c+m;return l.push(_,b,x,w),2}function kn(t,e,r,n,i,a,u,l){const f=r-t,p=n-e;let v=Math.atan2(f,p),c=Math.atan2(i-t,a-e);l&&v<c?v+=Math.PI*2:!l&&v>c&&(c+=Math.PI*2);let d=v;const m=c-v,_=Math.abs(m),b=Math.sqrt(f*f+p*p),x=(15*_*Math.sqrt(b)/Math.PI>>0)+1,w=m/x;if(d+=w,l){u.push(t,e,r,n);for(let E=1,A=d;E<x;E++,A+=w)u.push(t,e,t+Math.sin(A)*b,e+Math.cos(A)*b);u.push(t,e,i,a)}else{u.push(r,n,t,e);for(let E=1,A=d;E<x;E++,A+=w)u.push(t+Math.sin(A)*b,e+Math.cos(A)*b,t,e);u.push(i,a,t,e)}return x*2}function ZS(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 Ye(n[0],n[1]),l=new Ye(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 z=(u.x+l.x)*.5,ee=(l.y+u.y)*.5;n.unshift(z,ee),n.push(z,ee)}const v=e.points,c=n.length/2;let d=n.length;const m=v.length/2,_=a.width/2,b=_*_,x=a.miterLimit*a.miterLimit;let w=n[0],E=n[1],A=n[2],I=n[3],O=0,N=0,L=-(E-I),k=w-A,D=0,j=0,Q=Math.sqrt(L*L+k*k);L/=Q,k/=Q,L*=_,k*=_;const fe=a.alignment,H=(1-fe)*2,V=fe*2;f||(a.cap===Ln.ROUND?d+=kn(w-L*(H-V)*.5,E-k*(H-V)*.5,w-L*H,E-k*H,w+L*V,E+k*V,v,!0)+2:a.cap===Ln.SQUARE&&(d+=xp(w,E,L,k,H,V,!0,v))),v.push(w-L*H,E-k*H,w+L*V,E+k*V);for(let z=1;z<c-1;++z){w=n[(z-1)*2],E=n[(z-1)*2+1],A=n[z*2],I=n[z*2+1],O=n[(z+1)*2],N=n[(z+1)*2+1],L=-(E-I),k=w-A,Q=Math.sqrt(L*L+k*k),L/=Q,k/=Q,L*=_,k*=_,D=-(I-N),j=A-O,Q=Math.sqrt(D*D+j*j),D/=Q,j/=Q,D*=_,j*=_;const ee=A-w,pe=E-I,X=A-O,Y=N-I,ce=ee*X+pe*Y,Se=pe*X-Y*ee,xe=Se<0;if(Math.abs(Se)<.001*Math.abs(ce)){v.push(A-L*H,I-k*H,A+L*V,I+k*V),ce>=0&&(a.join===_r.ROUND?d+=kn(A,I,A-L*H,I-k*H,A-D*H,I-j*H,v,!1)+4:d+=2,v.push(A-D*V,I-j*V,A+D*H,I+j*H));continue}const Me=(-L+w)*(-k+I)-(-L+A)*(-k+E),Oe=(-D+O)*(-j+I)-(-D+A)*(-j+N),Ge=(ee*Oe-X*Me)/Se,ze=(Y*Me-pe*Oe)/Se,Ke=(Ge-A)*(Ge-A)+(ze-I)*(ze-I),Ze=A+(Ge-A)*H,be=I+(ze-I)*H,De=A-(Ge-A)*V,Qe=I-(ze-I)*V,Je=Math.min(ee*ee+pe*pe,X*X+Y*Y),Le=xe?H:V,J=Je+Le*Le*b,se=Ke<=J;let ut=a.join;if(ut===_r.MITER&&Ke/b>x&&(ut=_r.BEVEL),se)switch(ut){case _r.MITER:{v.push(Ze,be,De,Qe);break}case _r.BEVEL:{xe?v.push(Ze,be,A+L*V,I+k*V,Ze,be,A+D*V,I+j*V):v.push(A-L*H,I-k*H,De,Qe,A-D*H,I-j*H,De,Qe),d+=2;break}case _r.ROUND:{xe?(v.push(Ze,be,A+L*V,I+k*V),d+=kn(A,I,A+L*V,I+k*V,A+D*V,I+j*V,v,!0)+4,v.push(Ze,be,A+D*V,I+j*V)):(v.push(A-L*H,I-k*H,De,Qe),d+=kn(A,I,A-L*H,I-k*H,A-D*H,I-j*H,v,!1)+4,v.push(A-D*H,I-j*H,De,Qe));break}}else{switch(v.push(A-L*H,I-k*H,A+L*V,I+k*V),ut){case _r.MITER:{xe?v.push(De,Qe,De,Qe):v.push(Ze,be,Ze,be),d+=2;break}case _r.ROUND:{xe?d+=kn(A,I,A+L*V,I+k*V,A+D*V,I+j*V,v,!0)+2:d+=kn(A,I,A-L*H,I-k*H,A-D*H,I-j*H,v,!1)+2;break}}v.push(A-D*H,I-j*H,A+D*V,I+j*V),d+=2}}w=n[(c-2)*2],E=n[(c-2)*2+1],A=n[(c-1)*2],I=n[(c-1)*2+1],L=-(E-I),k=w-A,Q=Math.sqrt(L*L+k*k),L/=Q,k/=Q,L*=_,k*=_,v.push(A-L*H,I-k*H,A+L*V,I+k*V),f||(a.cap===Ln.ROUND?d+=kn(A-L*(H-V)*.5,I-k*(H-V)*.5,A-L*H,I-k*H,A+L*V,I+k*V,v,!1)+2:a.cap===Ln.SQUARE&&(d+=xp(A,I,L,k,H,V,!1,v)));const le=e.indices,ve=yi.epsilon*yi.epsilon;for(let z=m;z<d+m-2;++z)w=v[z*2],E=v[z*2+1],A=v[(z+1)*2],I=v[(z+1)*2+1],O=v[(z+2)*2],N=v[(z+2)*2+1],!(Math.abs(w*(I-N)+A*(N-E)+O*(E-I))<ve)&&le.push(z,z+1,z+2)}function QS(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 v=p;for(u.push(i[0],i[1]),r=1;r<f;r++)u.push(i[r*2],i[r*2+1]),l.push(v,v+1),v++;a&&l.push(v,p)}function bp(t,e){t.lineStyle.native?QS(t,e):ZS(t,e)}class bl{static curveLength(e,r,n,i,a,u){const l=e-2*n+a,f=r-2*i+u,p=2*n-2*e,v=2*i-2*r,c=4*(l*l+f*f),d=4*(l*p+f*v),m=p*p+v*v,_=2*Math.sqrt(c+d+m),b=Math.sqrt(c),x=2*c*b,w=2*Math.sqrt(m),E=d/b;return(x*_+b*d*(_-w)+(4*m*c-d*d)*Math.log((2*b+E+_)/(E+w)))/(4*x)}static curveTo(e,r,n,i,a){const u=a[a.length-2],l=a[a.length-1],f=yi._segmentsCount(bl.curveLength(u,l,e,r,n,i));let p=0,v=0;for(let c=1;c<=f;++c){const d=c/f;p=u+(e-u)*d,v=l+(r-l)*d,a.push(p+(e+(n-e)*d-p)*d,v+(r+(i-r)*d-v)*d)}}}const wl={[Et.POLY]:_p,[Et.CIRC]:Pa,[Et.ELIP]:Pa,[Et.RECT]:qS,[Et.RREC]:YS},wp=[],Ma=[];class Tl{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?We.EMPTY:(e=e||new We(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,v=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,v),this.maxY=Math.max(this.maxY,v)}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,v=e.tx,c=e.ty;let d=this.minX,m=this.minY,_=this.maxX,b=this.maxY,x=u*r+f*n+v,w=l*r+p*n+c;d=x<d?x:d,m=w<m?w:m,_=x>_?x:_,b=w>b?w:b,x=u*i+f*n+v,w=l*i+p*n+c,d=x<d?x:d,m=w<m?w:m,_=x>_?x:_,b=w>b?w:b,x=u*r+f*a+v,w=l*r+p*a+c,d=x<d?x:d,m=w<m?w:m,_=x>_?x:_,b=w>b?w:b,x=u*i+f*a+v,w=l*i+p*a+c,d=x<d?x:d,m=w<m?w:m,_=x>_?x:_,b=w>b?w:b,this.minX=d,this.minY=m,this.maxX=_,this.maxY=b}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],v=e[f+1];i=p<i?p:i,a=v<a?v:a,u=p>u?p:u,l=v>l?v: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,v=e.d,c=e.tx,d=e.ty;let m=this.minX,_=this.minY,b=this.maxX,x=this.maxY;for(let w=n;w<i;w+=2){const E=r[w],A=r[w+1],I=l*E+p*A+c,O=v*A+f*E+d;m=Math.min(m,I-a),b=Math.max(b,I+a),_=Math.min(_,O-u),x=Math.max(x,O+u)}this.minX=m,this.minY=_,this.maxX=b,this.maxY=x}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,v=this.maxY;this.minX=n<l?n:l,this.minY=i<f?i:f,this.maxX=a>p?a:p,this.maxY=u>v?u:v}}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,v=this.maxY;this.minX=n<l?n:l,this.minY=i<f?i:f,this.maxX=a>p?a:p,this.maxY=u>v?u:v}}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 xi extends zs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new tl,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 Tl,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(xi.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 We),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new We),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Tl);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 JS),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*pw}set angle(e){this.transform.rotation=e*as}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 JS extends xi{constructor(){super(...arguments),this.sortDirty=null}}xi.prototype.displayObjectUpdateTransform=xi.prototype.updateTransform;const eA=new kt;function tA(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const Sl=class extends xi{constructor(){super(),this.children=[],this.sortableChildren=Sl.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);aa(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,aa(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,aa(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(tA),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!==Sl.prototype._render&&(r=this.getBounds(!0));const i=t.projection.transform;if(i&&(n?(n=eA.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!==vt.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 bi=Sl;bi.defaultSortableChildren=!1,bi.prototype.containerUpdateTransform=bi.prototype.updateTransform,Object.defineProperties(ye,{SORTABLE_CHILDREN:{get(){return bi.defaultSortableChildren},set(t){Re("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),bi.defaultSortableChildren=t}}});class Oa{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 Oa(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 wi=new Ye,Tp=class extends ed{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 Tl,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(),Ma.push(this.drawCalls[t]);this.drawCalls.length=0;for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e.reset(),wp.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 Oa(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 Oa(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,wi):wi.copyFrom(t),n.shape.contains(wi.x,wi.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(wi.x,wi.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,v=f.lineStyle;wl[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(p.visible||v.visible)&&this.processHoles(f.holes);for(let d=0;d<2;d++){const m=d===0?p:v;if(!m.visible)continue;const _=m.texture.baseTexture,b=this.indices.length,x=this.points.length/2;_.wrapMode=qi.REPEAT,d===0?this.processFill(f):this.processLine(f);const w=this.points.length/2-x;w!==0&&(r&&!this._compareStyles(n,m)&&(r.end(b,x),r=null),r||(r=wp.pop()||new KS,r.begin(m,b,x),this.batches.push(r),n=m),this.addUvs(this.points,t,m.texture,x,w,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<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let t=++Ne._globalBatch;for(let v=0;v<this.drawCalls.length;v++)this.drawCalls[v].texArray.clear(),Ma.push(this.drawCalls[v]);this.drawCalls.length=0;const e=this.colors,r=this.textureIds;let n=Ma.pop();n||(n=new Zu,n.texArray=new nl),n.texArray.count=0,n.start=0,n.size=0,n.type=Jr.TRIANGLES;let i=0,a=null,u=0,l=!1,f=Jr.TRIANGLES,p=0;this.drawCalls.push(n);for(let v=0;v<this.batches.length;v++){const c=this.batches[v],d=8,m=c.style,_=m.texture.baseTexture;l!==!!m.native&&(l=!!m.native,f=l?Jr.LINES:Jr.TRIANGLES,a=null,i=d,t++),a!==_&&(a=_,_._batchEnabled!==t&&(i===d&&(t++,i=0,n.size>0&&(n=Ma.pop(),n||(n=new Zu,n.texArray=new nl),this.drawCalls.push(n)),n.start=p,n.size=0,n.texArray.count=0,n.type=f),_.touched=1,_._batchEnabled=t,_._batchLocation=i,_.wrapMode=qi.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)}Ne._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?_p.triangulate(t,this):wl[t.type].triangulate(t,this)}processLine(t){bp(t,this);for(let e=0;e<t.holes.length;e++)bp(t.holes[e],this)}processHoles(t){for(let e=0;e<t.length;e++){const r=t[e];wl[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,f=r.frame;for(;u<i;){let v=t[(n+u)*2],c=t[(n+u)*2+1];if(a){const d=a.a*v+a.c*c+a.tx;c=a.b*v+a.d*c+a.ty,v=d}u++,e.push(v/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 v=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));v-=d,c-=m;for(let _=r;_<u;_+=2)t[_]=(t[_]+v)*f,t[_+1]=(t[_+1]+c)*p}};let Sp=Tp;Sp.BATCHABLE_SIZE=100;class Fa{constructor(){this.color=16777215,this.alpha=1,this.texture=Pe.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new Fa;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=Pe.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Al extends Fa{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Ln.BUTT,this.join=_r.MITER,this.miterLimit=10}clone(){const e=new Al;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 El={},Na=class extends bi{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 Fa,this._lineStyle=new Al,this._matrix=null,this._holeMode=!1,this.state=ua.for2d(),this._geometry=t||new Sp,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Mt(16777215),this.blendMode=ue.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Na(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:Pe.WHITE,color:t!=null&&t.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Ln.BUTT,join:_r.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 os,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new os,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),bl.curveTo(t,e,r,n,i),this}bezierCurveTo(t,e,r,n,i,a){return this._initCurve(),xl.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=yp.curveTo(t,e,r,n,i,a);if(u){const{cx:l,cy:f,radius:p,startAngle:v,endAngle:c,anticlockwise:d}=u;this.arc(l,f,p,v,c,d)}return this}arc(t,e,r,n,i,a=!1){if(n===i)return this;if(!a&&i<=n?i+=ca:a&&n<=i&&(n+=ca),i-n===0)return this;const l=t+Math.cos(n)*r,f=e+Math.sin(n)*r,p=this._geometry.closePointEps;let v=this.currentPath?this.currentPath.points:null;if(v){const c=Math.abs(v[v.length-2]-l),d=Math.abs(v[v.length-1]-f);c<p&&d<p||v.push(l,f)}else this.moveTo(l,f),v=this.currentPath.points;return yp.arc(l,f,t,e,r,n,i,a,v),this}beginFill(t=0,e){return this.beginTextureFill({texture:Pe.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:Pe.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 We(t,e,r,n))}drawRoundedRect(t,e,r,n,i){return this.drawShape(new Ju(t,e,r,n,i))}drawCircle(t,e,r){return this.drawShape(new Qu(t,e,r))}drawEllipse(t,e,r,n){return this.drawShape(new gw(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 os(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: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(!El[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 kt,default:dr.from({uSamplers:i},!0)},u=t.plugins[r]._shader.program;El[r]=new ls(u,a)}e=El[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,Na._TEMP_POINT),this._geometry.containsPoint(Na._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,f=this._geometry.points,p=this.vertexData;let v=0;for(let c=0;c<f.length;c+=2){const d=f[c],m=f[c+1];p[v++]=r*d+i*m+u,p[v++]=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 Cl=Na;Cl.curves=yi,Cl._TEMP_POINT=new Ye;var rA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Il={},nA={get exports(){return Il},set exports(t){Il=t}};/*!
1938
1938
  * d-path-parser - v1.0.0
1939
1939
  * by Massimo Artizzu (MaxArt2501)
1940
1940
  *
@@ -1942,10 +1942,10 @@ void main() {
1942
1942
  *
1943
1943
  * Licensed under the MIT License
1944
1944
  * See LICENSE for details
1945
- */(function(t,e){(function(r,n){t.exports=n()})(rA,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(x){return+m("number",x)},"coordinate pair":function(x){var b=m("number",x);if(b===null&&!x)return null;m("comma");var w=m("number",!0);return{x:+b,y:+w}},"arc definition":function(x){var b=a["coordinate pair"](x);if(!b&&!x)return null;m("comma");var w=+m("number",!0);m("comma",!0);var E=!!+m("flag",!0);m("comma");var A=!!+m("flag",!0);m("comma");var I=a["coordinate pair"](!0);return{radii:b,rotation:w,large:E,clockwise:A,end:I}}},u=0,l=[];u<n.length;){var f=m("command"),p=f.toUpperCase(),v=f!==p,c;switch(p){case"M":c=_("coordinate pair").map(function(x,b){return b===1&&(f=v?"l":"L"),d({end:x})});break;case"L":case"T":c=_("coordinate pair").map(function(x){return d({end:x})});break;case"C":if(c=_("coordinate pair"),c.length%3)throw Error("Expected coordinate pair triplet at position "+u);c=c.reduce(function(x,b,w){var E=w%3;if(!E)x.push(d({cp1:b}));else{var A=x[x.length-1];A[E===1?"cp2":"end"]=b}return x},[]);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(x,b,w){var E=w&1;if(!E)x.push(d({cp:b}));else{var A=x[x.length-1];A.end=b}return x},[]);break;case"H":case"V":c=_("number").map(function(x){return d({value:x})});break;case"A":c=_("arc definition").map(d);break;case"Z":c=[{code:"Z"}];break}l.push.apply(l,c)}return l;function d(x){return x.code=f,x.relative=v,x}function m(x,b){i[x].lastIndex=u;var w=i[x].exec(n);if(!w||w.index!==u){if(!b)return null;throw Error("Expected "+x+" at position "+u)}return u=i[x].lastIndex,w[1]}function _(x){for(var b=[],w,E=!0;w=a[x](E);)b.push(w),E=!!m("comma");return b}}})})(nA);const iA=/^\s+/,sA=/\s+$/;function re(t,e){if(t=t||"",e=e||{},t instanceof re)return t;if(!(this instanceof re))return new re(t,e);var r=aA(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}re.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=Pp(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Ep(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Ep(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=Ap(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Ap(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 Cp(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return cA(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(nt(this._r,255)*100)+"%",g:Math.round(nt(this._g,255)*100)+"%",b:Math.round(nt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(nt(this._r,255)*100)+"%, "+Math.round(nt(this._g,255)*100)+"%, "+Math.round(nt(this._b,255)*100)+"%)":"rgba("+Math.round(nt(this._r,255)*100)+"%, "+Math.round(nt(this._g,255)*100)+"%, "+Math.round(nt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:wA[Cp(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+Ip(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=re(t);r="#"+Ip(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 re(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(pA,arguments)},brighten:function(){return this._applyModification(gA,arguments)},darken:function(){return this._applyModification(mA,arguments)},desaturate:function(){return this._applyModification(hA,arguments)},saturate:function(){return this._applyModification(fA,arguments)},greyscale:function(){return this._applyModification(dA,arguments)},spin:function(){return this._applyModification(vA,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(xA,arguments)},complement:function(){return this._applyCombination(_A,arguments)},monochromatic:function(){return this._applyCombination(bA,arguments)},splitcomplement:function(){return this._applyCombination(yA,arguments)},triad:function(){return this._applyCombination(Rp,[3])},tetrad:function(){return this._applyCombination(Rp,[4])}},re.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]=ps(t[n]));t=r}return re(t,e)};function aA(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=EA(t)),typeof t=="object"&&(Gr(t.r)&&Gr(t.g)&&Gr(t.b)?(e=oA(t.r,t.g,t.b),u=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Gr(t.h)&&Gr(t.s)&&Gr(t.v)?(n=ps(t.s),i=ps(t.v),e=lA(t.h,n,i),u=!0,l="hsv"):Gr(t.h)&&Gr(t.s)&&Gr(t.l)&&(n=ps(t.s),a=ps(t.l),e=uA(t.h,n,a),u=!0,l="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=Pp(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 oA(t,e,r){return{r:nt(t,255)*255,g:nt(e,255)*255,b:nt(r,255)*255}}function Ap(t,e,r){t=nt(t,255),e=nt(e,255),r=nt(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 uA(t,e,r){var n,i,a;t=nt(t,360),e=nt(e,100),r=nt(r,100);function u(p,v,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?p+(v-p)*6*c:c<1/2?v:c<2/3?p+(v-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 Ep(t,e,r){t=nt(t,255),e=nt(e,255),r=nt(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 lA(t,e,r){t=nt(t,360)*6,e=nt(e,100),r=nt(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],v=[l,r,r,u,a,a][f],c=[a,a,l,r,r,u][f];return{r:p*255,g:v*255,b:c*255}}function Cp(t,e,r,n){var i=[yr(Math.round(t).toString(16)),yr(Math.round(e).toString(16)),yr(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 cA(t,e,r,n,i){var a=[yr(Math.round(t).toString(16)),yr(Math.round(e).toString(16)),yr(Math.round(r).toString(16)),yr(Mp(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 Ip(t,e,r,n){var i=[yr(Mp(n)),yr(Math.round(t).toString(16)),yr(Math.round(e).toString(16)),yr(Math.round(r).toString(16))];return i.join("")}re.equals=function(t,e){return!t||!e?!1:re(t).toRgbString()==re(e).toRgbString()},re.random=function(){return re.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function hA(t,e){e=e===0?0:e||10;var r=re(t).toHsl();return r.s-=e/100,r.s=La(r.s),re(r)}function fA(t,e){e=e===0?0:e||10;var r=re(t).toHsl();return r.s+=e/100,r.s=La(r.s),re(r)}function dA(t){return re(t).desaturate(100)}function pA(t,e){e=e===0?0:e||10;var r=re(t).toHsl();return r.l+=e/100,r.l=La(r.l),re(r)}function gA(t,e){e=e===0?0:e||10;var r=re(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)))),re(r)}function mA(t,e){e=e===0?0:e||10;var r=re(t).toHsl();return r.l-=e/100,r.l=La(r.l),re(r)}function vA(t,e){var r=re(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,re(r)}function _A(t){var e=re(t).toHsl();return e.h=(e.h+180)%360,re(e)}function Rp(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=re(t).toHsl(),n=[re(t)],i=360/e,a=1;a<e;a++)n.push(re({h:(r.h+a*i)%360,s:r.s,l:r.l}));return n}function yA(t){var e=re(t).toHsl(),r=e.h;return[re(t),re({h:(r+72)%360,s:e.s,l:e.l}),re({h:(r+216)%360,s:e.s,l:e.l})]}function xA(t,e,r){e=e||6,r=r||30;var n=re(t).toHsl(),i=360/r,a=[re(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(re(n));return a}function bA(t,e){e=e||6;for(var r=re(t).toHsv(),n=r.h,i=r.s,a=r.v,u=[],l=1/e;e--;)u.push(re({h:n,s:i,v:a})),a=(a+l)%1;return u}re.mix=function(t,e,r){r=r===0?0:r||50;var n=re(t).toRgb(),i=re(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 re(u)},re.readability=function(t,e){var r=re(t),n=re(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},re.isReadable=function(t,e,r){var n=re.readability(t,e),i,a;switch(a=!1,i=CA(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},re.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=re.readability(t,e[p]),a>i&&(i=a,n=re(e[p]));return re.isReadable(t,n,{level:l,size:f})||!u?n:(r.includeFallbackColors=!1,re.mostReadable(t,["#fff","#000"],r))};var Rl=re.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"},wA=re.hexNames=TA(Rl);function TA(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function Pp(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function nt(t,e){SA(t)&&(t="100%");var r=AA(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 La(t){return Math.min(1,Math.max(0,t))}function jt(t){return parseInt(t,16)}function SA(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function AA(t){return typeof t=="string"&&t.indexOf("%")!=-1}function yr(t){return t.length==1?"0"+t:""+t}function ps(t){return t<=1&&(t=t*100+"%"),t}function Mp(t){return Math.round(parseFloat(t)*255).toString(16)}function Op(t){return jt(t)/255}var xr=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 Gr(t){return!!xr.CSS_UNIT.exec(t)}function EA(t){t=t.replace(iA,"").replace(sA,"").toLowerCase();var e=!1;if(Rl[t])t=Rl[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=xr.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=xr.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=xr.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=xr.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=xr.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=xr.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=xr.hex8.exec(t))?{r:jt(r[1]),g:jt(r[2]),b:jt(r[3]),a:Op(r[4]),format:e?"name":"hex8"}:(r=xr.hex6.exec(t))?{r:jt(r[1]),g:jt(r[2]),b:jt(r[3]),format:e?"name":"hex"}:(r=xr.hex4.exec(t))?{r:jt(r[1]+""+r[1]),g:jt(r[2]+""+r[2]),b:jt(r[3]+""+r[3]),a:Op(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=xr.hex3.exec(t))?{r:jt(r[1]+""+r[1]),g:jt(r[2]+""+r[2]),b:jt(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function CA(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 IA=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")}}(),gs=Math.PI*2,Pl=function(e,r,n,i,a,u,l){var f=e.x,p=e.y;f*=r,p*=n;var v=i*f-a*p,c=a*f+i*p;return{x:v+u,y:c+l}},RA=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}]},Fp=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)},PA=function(e,r,n,i,a,u,l,f,p,v,c,d){var m=Math.pow(a,2),_=Math.pow(u,2),x=Math.pow(c,2),b=Math.pow(d,2),w=m*_-m*b-_*x;w<0&&(w=0),w/=m*b+_*x,w=Math.sqrt(w)*(l===f?-1:1);var E=w*a/u*d,A=w*-u/a*c,I=v*E-p*A+(e+n)/2,O=p*E+v*A+(r+i)/2,N=(c-E)/a,L=(d-A)/u,k=(-c-E)/a,D=(-d-A)/u,j=Fp(1,0,N,L),Q=Fp(N,L,k,D);return f===0&&Q>0&&(Q-=gs),f===1&&Q<0&&(Q+=gs),[I,O,j,Q]},Np=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,v=e.largeArcFlag,c=v===void 0?0:v,d=e.sweepFlag,m=d===void 0?0:d,_=[];if(u===0||l===0)return[];var x=Math.sin(p*gs/360),b=Math.cos(p*gs/360),w=b*(r-i)/2+x*(n-a)/2,E=-x*(r-i)/2+b*(n-a)/2;if(w===0&&E===0)return[];u=Math.abs(u),l=Math.abs(l);var A=Math.pow(w,2)/Math.pow(u,2)+Math.pow(E,2)/Math.pow(l,2);A>1&&(u*=Math.sqrt(A),l*=Math.sqrt(A));var I=PA(r,n,i,a,u,l,c,m,x,b,w,E),O=IA(I,4),N=O[0],L=O[1],k=O[2],D=O[3],j=Math.abs(D)/(gs/4);Math.abs(1-j)<1e-7&&(j=1);var Q=Math.max(Math.ceil(j),1);D/=Q;for(var fe=0;fe<Q;fe++)_.push(RA(k,D)),k+=D;return _.map(function(H){var V=Pl(H[0],u,l,b,x,N,L),le=V.x,ve=V.y,z=Pl(H[1],u,l,b,x,N,L),ee=z.x,pe=z.y,X=Pl(H[2],u,l,b,x,N,L),Y=X.x,ce=X.y;return{x1:le,y1:ve,x2:ee,y2:pe,x:Y,y:ce}})};class MA extends Cl{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}=re(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,v=0;l!==null&&(p=parseFloat(l)),f!==null&&(v=parseFloat(f)),i?this.drawEllipse(p,v,a,u):this.drawCircle(p,v,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:v}=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:v===null&&r?this.line.miterLimit:parseFloat(v)}),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=Il(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":{Np({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:v,y2:c,x:d,y:m})=>this.bezierCurveTo(f,p,v,c,d,m));break}case"A":{Np({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:v,y2:c,x:d,y:m})=>this.bezierCurveTo(f,p,v,c,d,m));break}default:{console.info("[PIXI.SVG] Draw command not supported:",l.code,l);break}}}}}var ka={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},OA=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function FA(t){return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&OA.indexOf(t)>=0}function NA(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 LA(t){return(t|32)===97}function Ti(t){return t>=48&&t<=57}function kA(t){return t>=48&&t<=57||t===43||t===45||t===46}function BA(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function Ba(t){for(;t.index<t.max&&FA(t.path.charCodeAt(t.index));)t.index++}function DA(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 UA(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),!Ti(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&&Ti(f)){t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+e+")";return}for(;r<n&&Ti(t.path.charCodeAt(r));)r++,a=!0;f=r<n?t.path.charCodeAt(r):0}if(f===46){for(l=!0,r++;Ti(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&&Ti(t.path.charCodeAt(r)))for(;r<n&&Ti(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 Ml(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>=ka[r]&&(t.result.push([e].concat(n.splice(0,ka[r]))),!!ka[r]););}function $A(t){var e=t.max,r,n,i,a,u;if(t.segmentStart=t.index,r=t.path.charCodeAt(t.index),n=LA(r),!NA(r)){t.err="SvgPath: bad command "+t.path[t.index]+" (at pos "+t.index+")";return}if(a=ka[t.path[t.index].toLowerCase()],t.index++,Ba(t),t.data=[],!a){Ml(t);return}for(i=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?DA(t):UA(t),t.err.length){Ml(t);return}t.data.push(t.param),Ba(t),i=!1,t.index<e&&t.path.charCodeAt(t.index)===44&&(t.index++,Ba(t),i=!0)}if(!i&&(t.index>=t.max||!kA(t.path.charCodeAt(t.index))))break}Ml(t)}var GA=function(e){var r=new BA(e),n=r.max;for(Ba(r);r.index<n&&!r.err.length;)$A(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 zA(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 br(){if(!(this instanceof br))return new br;this.queue=[],this.cache=null}br.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)},br.prototype.translate=function(t,e){return(t!==0||e!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},br.prototype.scale=function(t,e){return(t!==1||e!==1)&&(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},br.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},br.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},br.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},br.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=zA(this.cache,this.queue[t]);return this.cache},br.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 Lp=br,HA=Lp,VA={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},XA=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,jA=/[\s,]+/,WA=function(e){var r=new HA,n,i;return e.split(XA).forEach(function(a){if(a.length){if(typeof VA[a]<"u"){n=a;return}switch(i=a.split(jA).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},ms=Math.PI*2;function kp(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 qA(t,e,r,n,i,a,u,l,f,p){var v=p*(t-r)/2+f*(e-n)/2,c=-f*(t-r)/2+p*(e-n)/2,d=u*u,m=l*l,_=v*v,x=c*c,b=d*m-d*x-m*_;b<0&&(b=0),b/=d*x+m*_,b=Math.sqrt(b)*(i===a?-1:1);var w=b*u/l*c,E=b*-l/u*v,A=p*w-f*E+(t+r)/2,I=f*w+p*E+(e+n)/2,O=(v-w)/u,N=(c-E)/l,L=(-v-w)/u,k=(-c-E)/l,D=kp(1,0,O,N),j=kp(O,N,L,k);return a===0&&j>0&&(j-=ms),a===1&&j<0&&(j+=ms),[A,I,D,j]}function YA(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 KA=function(e,r,n,i,a,u,l,f,p){var v=Math.sin(p*ms/360),c=Math.cos(p*ms/360),d=c*(e-n)/2+v*(r-i)/2,m=-v*(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 x=qA(e,r,n,i,a,u,l,f,v,c),b=[],w=x[2],E=x[3],A=Math.max(Math.ceil(Math.abs(E)/(ms/4)),1);E/=A;for(var I=0;I<A;I++)b.push(YA(w,E)),w+=E;return b.map(function(O){for(var N=0;N<O.length;N+=2){var L=O[N+0],k=O[N+1];L*=l,k*=f;var D=c*L-v*k,j=v*L+c*k;O[N+0]=D+x[0],O[N+1]=j+x[1]}return O})},vs=1e-10,Bp=Math.PI/180;function _s(t,e,r){if(!(this instanceof _s))return new _s(t,e,r);this.rx=t,this.ry=e,this.ax=r}_s.prototype.transform=function(t){var e=Math.cos(this.ax*Bp),r=Math.sin(this.ax*Bp),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<vs*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,v=l-u/2;return this.ax=Math.abs(f)<vs&&Math.abs(p-a)<vs?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(v)):(this.ax+=90,this.rx=Math.sqrt(v),this.ry=Math.sqrt(p)),this},_s.prototype.isDegenerate=function(){return this.rx<vs*this.ry||this.ry<vs*this.rx};var ZA=_s,QA=GA,JA=WA,on=Lp,eE=KA,tE=ZA;function ot(t){if(!(this instanceof ot))return new ot(t);var e=QA(t);this.segments=e.segments,this.err=e.err,this.__stack=[]}ot.from=function(t){if(typeof t=="string")return new ot(t);if(t instanceof ot){var e=new ot("");return e.err=t.err,e.segments=t.segments.map(function(r){return r.slice()}),e.__stack=t.__stack.map(function(r){return on().matrix(r.toArray())}),e}throw new Error("SvgPath.from: invalid param type "+t)},ot.prototype.__matrix=function(t){var e=this,r;t.queue.length&&this.iterate(function(n,i,a,u){var l,f,p,v;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=tE(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":v=i>0,l=t.calc(n[1],n[2],v),f=["m",l[0],l[1]];break;default:for(p=n[0],f=[p],v=p.toLowerCase()===p,r=1;r<n.length;r+=2)l=t.calc(n[r],n[r+1],v),f.push(l[0],l[1])}e.segments[i]=f},!0)},ot.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=on(),e=this.__stack.length;--e>=0;)t.matrix(this.__stack[e].toArray());this.__matrix(t),this.__stack=[]}},ot.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},ot.prototype.translate=function(t,e){return this.__stack.push(on().translate(t,e||0)),this},ot.prototype.scale=function(t,e){return this.__stack.push(on().scale(t,!e&&e!==0?t:e)),this},ot.prototype.rotate=function(t,e,r){return this.__stack.push(on().rotate(t,e||0,r||0)),this},ot.prototype.skewX=function(t){return this.__stack.push(on().skewX(t)),this},ot.prototype.skewY=function(t){return this.__stack.push(on().skewY(t)),this},ot.prototype.matrix=function(t){return this.__stack.push(on().matrix(t)),this},ot.prototype.transform=function(t){return t.trim()?(this.__stack.push(JA(t)),this):this},ot.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},ot.prototype.iterate=function(t,e){var r=this.segments,n={},i=!1,a=0,u=0,l=0,f=0,p,v,c;if(e||this.__evaluateStack(),r.forEach(function(d,m){var _=t(d,m,a,u);Array.isArray(_)&&(n[m]=_,i=!0);var x=d[0]===d[0].toLowerCase();switch(d[0]){case"m":case"M":a=d[1]+(x?a:0),u=d[2]+(x?u:0),l=a,f=u;return;case"h":case"H":a=d[1]+(x?a:0);return;case"v":case"V":u=d[1]+(x?u:0);return;case"z":case"Z":a=l,u=f;return;default:a=d[d.length-2]+(x?a:0),u=d[d.length-1]+(x?u:0)}}),!i)return this;for(c=[],p=0;p<r.length;p++)if(typeof n[p]<"u")for(v=0;v<n[p].length;v++)c.push(n[p][v]);else c.push(r[p]);return this.segments=c,this},ot.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},ot.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},ot.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=eE(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},ot.prototype.unshort=function(){var t=this.segments,e,r,n,i,a;return this.iterate(function(u,l,f,p){var v=u[0],c=v.toUpperCase(),d;l&&(c==="T"?(d=v==="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=v==="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 rE=ot,nE=rE;const iE=Wn(nE),sE=ne.forwardRef((t,e)=>{const[r,n]=ne.useState(null),i=W.useRef(null),a=W.useRef(null),u=W.useRef(null),{path:l,visible:f,disabled:p,transformation:{x:v,y:c,width:d,height:m,anchor:_,hexColor:x,fill:b,stroke:w="none",strokeWidth:E=0,colorCorrection:A={}},pointerdown:I,pointerup:O}=t,N=Xe.useApp(),{temperatureFilter:L,sharpnessFilter:k,hueFilter:D,blurFilter:j,adjustmentFilter:Q,vignetteFilter:fe,noiseFilter:H}=_i(A),{blurRadius:V=0,vignette:le=0,noise:ve=0}=A;return ne.useEffect(()=>{const z=iE(l).scale(5).translate(0,0).toString(),ee=`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${m}">
1946
- <path stroke="${w}" stroke-width="${E}" fill="${x||b}" d="${z}">
1945
+ */(function(t,e){(function(r,n){t.exports=n()})(rA,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(b){return+m("number",b)},"coordinate pair":function(b){var x=m("number",b);if(x===null&&!b)return null;m("comma");var w=m("number",!0);return{x:+x,y:+w}},"arc definition":function(b){var x=a["coordinate pair"](b);if(!x&&!b)return null;m("comma");var w=+m("number",!0);m("comma",!0);var E=!!+m("flag",!0);m("comma");var A=!!+m("flag",!0);m("comma");var I=a["coordinate pair"](!0);return{radii:x,rotation:w,large:E,clockwise:A,end:I}}},u=0,l=[];u<n.length;){var f=m("command"),p=f.toUpperCase(),v=f!==p,c;switch(p){case"M":c=_("coordinate pair").map(function(b,x){return x===1&&(f=v?"l":"L"),d({end:b})});break;case"L":case"T":c=_("coordinate pair").map(function(b){return d({end:b})});break;case"C":if(c=_("coordinate pair"),c.length%3)throw Error("Expected coordinate pair triplet at position "+u);c=c.reduce(function(b,x,w){var E=w%3;if(!E)b.push(d({cp1:x}));else{var A=b[b.length-1];A[E===1?"cp2":"end"]=x}return b},[]);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(b,x,w){var E=w&1;if(!E)b.push(d({cp:x}));else{var A=b[b.length-1];A.end=x}return b},[]);break;case"H":case"V":c=_("number").map(function(b){return d({value:b})});break;case"A":c=_("arc definition").map(d);break;case"Z":c=[{code:"Z"}];break}l.push.apply(l,c)}return l;function d(b){return b.code=f,b.relative=v,b}function m(b,x){i[b].lastIndex=u;var w=i[b].exec(n);if(!w||w.index!==u){if(!x)return null;throw Error("Expected "+b+" at position "+u)}return u=i[b].lastIndex,w[1]}function _(b){for(var x=[],w,E=!0;w=a[b](E);)x.push(w),E=!!m("comma");return x}}})})(nA);const iA=/^\s+/,sA=/\s+$/;function re(t,e){if(t=t||"",e=e||{},t instanceof re)return t;if(!(this instanceof re))return new re(t,e);var r=aA(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}re.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=Pp(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Ep(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Ep(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=Ap(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Ap(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 Cp(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return cA(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(nt(this._r,255)*100)+"%",g:Math.round(nt(this._g,255)*100)+"%",b:Math.round(nt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(nt(this._r,255)*100)+"%, "+Math.round(nt(this._g,255)*100)+"%, "+Math.round(nt(this._b,255)*100)+"%)":"rgba("+Math.round(nt(this._r,255)*100)+"%, "+Math.round(nt(this._g,255)*100)+"%, "+Math.round(nt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:wA[Cp(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+Ip(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=re(t);r="#"+Ip(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 re(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(pA,arguments)},brighten:function(){return this._applyModification(gA,arguments)},darken:function(){return this._applyModification(mA,arguments)},desaturate:function(){return this._applyModification(hA,arguments)},saturate:function(){return this._applyModification(fA,arguments)},greyscale:function(){return this._applyModification(dA,arguments)},spin:function(){return this._applyModification(vA,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(xA,arguments)},complement:function(){return this._applyCombination(_A,arguments)},monochromatic:function(){return this._applyCombination(bA,arguments)},splitcomplement:function(){return this._applyCombination(yA,arguments)},triad:function(){return this._applyCombination(Rp,[3])},tetrad:function(){return this._applyCombination(Rp,[4])}},re.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]=ps(t[n]));t=r}return re(t,e)};function aA(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=EA(t)),typeof t=="object"&&(Gr(t.r)&&Gr(t.g)&&Gr(t.b)?(e=oA(t.r,t.g,t.b),u=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Gr(t.h)&&Gr(t.s)&&Gr(t.v)?(n=ps(t.s),i=ps(t.v),e=lA(t.h,n,i),u=!0,l="hsv"):Gr(t.h)&&Gr(t.s)&&Gr(t.l)&&(n=ps(t.s),a=ps(t.l),e=uA(t.h,n,a),u=!0,l="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=Pp(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 oA(t,e,r){return{r:nt(t,255)*255,g:nt(e,255)*255,b:nt(r,255)*255}}function Ap(t,e,r){t=nt(t,255),e=nt(e,255),r=nt(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 uA(t,e,r){var n,i,a;t=nt(t,360),e=nt(e,100),r=nt(r,100);function u(p,v,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?p+(v-p)*6*c:c<1/2?v:c<2/3?p+(v-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 Ep(t,e,r){t=nt(t,255),e=nt(e,255),r=nt(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 lA(t,e,r){t=nt(t,360)*6,e=nt(e,100),r=nt(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],v=[l,r,r,u,a,a][f],c=[a,a,l,r,r,u][f];return{r:p*255,g:v*255,b:c*255}}function Cp(t,e,r,n){var i=[yr(Math.round(t).toString(16)),yr(Math.round(e).toString(16)),yr(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 cA(t,e,r,n,i){var a=[yr(Math.round(t).toString(16)),yr(Math.round(e).toString(16)),yr(Math.round(r).toString(16)),yr(Mp(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 Ip(t,e,r,n){var i=[yr(Mp(n)),yr(Math.round(t).toString(16)),yr(Math.round(e).toString(16)),yr(Math.round(r).toString(16))];return i.join("")}re.equals=function(t,e){return!t||!e?!1:re(t).toRgbString()==re(e).toRgbString()},re.random=function(){return re.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function hA(t,e){e=e===0?0:e||10;var r=re(t).toHsl();return r.s-=e/100,r.s=La(r.s),re(r)}function fA(t,e){e=e===0?0:e||10;var r=re(t).toHsl();return r.s+=e/100,r.s=La(r.s),re(r)}function dA(t){return re(t).desaturate(100)}function pA(t,e){e=e===0?0:e||10;var r=re(t).toHsl();return r.l+=e/100,r.l=La(r.l),re(r)}function gA(t,e){e=e===0?0:e||10;var r=re(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)))),re(r)}function mA(t,e){e=e===0?0:e||10;var r=re(t).toHsl();return r.l-=e/100,r.l=La(r.l),re(r)}function vA(t,e){var r=re(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,re(r)}function _A(t){var e=re(t).toHsl();return e.h=(e.h+180)%360,re(e)}function Rp(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=re(t).toHsl(),n=[re(t)],i=360/e,a=1;a<e;a++)n.push(re({h:(r.h+a*i)%360,s:r.s,l:r.l}));return n}function yA(t){var e=re(t).toHsl(),r=e.h;return[re(t),re({h:(r+72)%360,s:e.s,l:e.l}),re({h:(r+216)%360,s:e.s,l:e.l})]}function xA(t,e,r){e=e||6,r=r||30;var n=re(t).toHsl(),i=360/r,a=[re(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(re(n));return a}function bA(t,e){e=e||6;for(var r=re(t).toHsv(),n=r.h,i=r.s,a=r.v,u=[],l=1/e;e--;)u.push(re({h:n,s:i,v:a})),a=(a+l)%1;return u}re.mix=function(t,e,r){r=r===0?0:r||50;var n=re(t).toRgb(),i=re(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 re(u)},re.readability=function(t,e){var r=re(t),n=re(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},re.isReadable=function(t,e,r){var n=re.readability(t,e),i,a;switch(a=!1,i=CA(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},re.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=re.readability(t,e[p]),a>i&&(i=a,n=re(e[p]));return re.isReadable(t,n,{level:l,size:f})||!u?n:(r.includeFallbackColors=!1,re.mostReadable(t,["#fff","#000"],r))};var Rl=re.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"},wA=re.hexNames=TA(Rl);function TA(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function Pp(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function nt(t,e){SA(t)&&(t="100%");var r=AA(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 La(t){return Math.min(1,Math.max(0,t))}function jt(t){return parseInt(t,16)}function SA(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function AA(t){return typeof t=="string"&&t.indexOf("%")!=-1}function yr(t){return t.length==1?"0"+t:""+t}function ps(t){return t<=1&&(t=t*100+"%"),t}function Mp(t){return Math.round(parseFloat(t)*255).toString(16)}function Op(t){return jt(t)/255}var xr=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 Gr(t){return!!xr.CSS_UNIT.exec(t)}function EA(t){t=t.replace(iA,"").replace(sA,"").toLowerCase();var e=!1;if(Rl[t])t=Rl[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=xr.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=xr.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=xr.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=xr.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=xr.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=xr.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=xr.hex8.exec(t))?{r:jt(r[1]),g:jt(r[2]),b:jt(r[3]),a:Op(r[4]),format:e?"name":"hex8"}:(r=xr.hex6.exec(t))?{r:jt(r[1]),g:jt(r[2]),b:jt(r[3]),format:e?"name":"hex"}:(r=xr.hex4.exec(t))?{r:jt(r[1]+""+r[1]),g:jt(r[2]+""+r[2]),b:jt(r[3]+""+r[3]),a:Op(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=xr.hex3.exec(t))?{r:jt(r[1]+""+r[1]),g:jt(r[2]+""+r[2]),b:jt(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function CA(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 IA=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")}}(),gs=Math.PI*2,Pl=function(e,r,n,i,a,u,l){var f=e.x,p=e.y;f*=r,p*=n;var v=i*f-a*p,c=a*f+i*p;return{x:v+u,y:c+l}},RA=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}]},Fp=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)},PA=function(e,r,n,i,a,u,l,f,p,v,c,d){var m=Math.pow(a,2),_=Math.pow(u,2),b=Math.pow(c,2),x=Math.pow(d,2),w=m*_-m*x-_*b;w<0&&(w=0),w/=m*x+_*b,w=Math.sqrt(w)*(l===f?-1:1);var E=w*a/u*d,A=w*-u/a*c,I=v*E-p*A+(e+n)/2,O=p*E+v*A+(r+i)/2,N=(c-E)/a,L=(d-A)/u,k=(-c-E)/a,D=(-d-A)/u,j=Fp(1,0,N,L),Q=Fp(N,L,k,D);return f===0&&Q>0&&(Q-=gs),f===1&&Q<0&&(Q+=gs),[I,O,j,Q]},Np=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,v=e.largeArcFlag,c=v===void 0?0:v,d=e.sweepFlag,m=d===void 0?0:d,_=[];if(u===0||l===0)return[];var b=Math.sin(p*gs/360),x=Math.cos(p*gs/360),w=x*(r-i)/2+b*(n-a)/2,E=-b*(r-i)/2+x*(n-a)/2;if(w===0&&E===0)return[];u=Math.abs(u),l=Math.abs(l);var A=Math.pow(w,2)/Math.pow(u,2)+Math.pow(E,2)/Math.pow(l,2);A>1&&(u*=Math.sqrt(A),l*=Math.sqrt(A));var I=PA(r,n,i,a,u,l,c,m,b,x,w,E),O=IA(I,4),N=O[0],L=O[1],k=O[2],D=O[3],j=Math.abs(D)/(gs/4);Math.abs(1-j)<1e-7&&(j=1);var Q=Math.max(Math.ceil(j),1);D/=Q;for(var fe=0;fe<Q;fe++)_.push(RA(k,D)),k+=D;return _.map(function(H){var V=Pl(H[0],u,l,x,b,N,L),le=V.x,ve=V.y,z=Pl(H[1],u,l,x,b,N,L),ee=z.x,pe=z.y,X=Pl(H[2],u,l,x,b,N,L),Y=X.x,ce=X.y;return{x1:le,y1:ve,x2:ee,y2:pe,x:Y,y:ce}})};class MA extends Cl{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}=re(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,v=0;l!==null&&(p=parseFloat(l)),f!==null&&(v=parseFloat(f)),i?this.drawEllipse(p,v,a,u):this.drawCircle(p,v,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:v}=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:v===null&&r?this.line.miterLimit:parseFloat(v)}),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=Il(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":{Np({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:v,y2:c,x:d,y:m})=>this.bezierCurveTo(f,p,v,c,d,m));break}case"A":{Np({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:v,y2:c,x:d,y:m})=>this.bezierCurveTo(f,p,v,c,d,m));break}default:{console.info("[PIXI.SVG] Draw command not supported:",l.code,l);break}}}}}var ka={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},OA=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function FA(t){return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&OA.indexOf(t)>=0}function NA(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 LA(t){return(t|32)===97}function Ti(t){return t>=48&&t<=57}function kA(t){return t>=48&&t<=57||t===43||t===45||t===46}function BA(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function Ba(t){for(;t.index<t.max&&FA(t.path.charCodeAt(t.index));)t.index++}function DA(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 UA(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),!Ti(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&&Ti(f)){t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+e+")";return}for(;r<n&&Ti(t.path.charCodeAt(r));)r++,a=!0;f=r<n?t.path.charCodeAt(r):0}if(f===46){for(l=!0,r++;Ti(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&&Ti(t.path.charCodeAt(r)))for(;r<n&&Ti(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 Ml(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>=ka[r]&&(t.result.push([e].concat(n.splice(0,ka[r]))),!!ka[r]););}function $A(t){var e=t.max,r,n,i,a,u;if(t.segmentStart=t.index,r=t.path.charCodeAt(t.index),n=LA(r),!NA(r)){t.err="SvgPath: bad command "+t.path[t.index]+" (at pos "+t.index+")";return}if(a=ka[t.path[t.index].toLowerCase()],t.index++,Ba(t),t.data=[],!a){Ml(t);return}for(i=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?DA(t):UA(t),t.err.length){Ml(t);return}t.data.push(t.param),Ba(t),i=!1,t.index<e&&t.path.charCodeAt(t.index)===44&&(t.index++,Ba(t),i=!0)}if(!i&&(t.index>=t.max||!kA(t.path.charCodeAt(t.index))))break}Ml(t)}var GA=function(e){var r=new BA(e),n=r.max;for(Ba(r);r.index<n&&!r.err.length;)$A(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 zA(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 br(){if(!(this instanceof br))return new br;this.queue=[],this.cache=null}br.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)},br.prototype.translate=function(t,e){return(t!==0||e!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},br.prototype.scale=function(t,e){return(t!==1||e!==1)&&(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},br.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},br.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},br.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},br.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=zA(this.cache,this.queue[t]);return this.cache},br.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 Lp=br,HA=Lp,VA={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},XA=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,jA=/[\s,]+/,WA=function(e){var r=new HA,n,i;return e.split(XA).forEach(function(a){if(a.length){if(typeof VA[a]<"u"){n=a;return}switch(i=a.split(jA).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},ms=Math.PI*2;function kp(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 qA(t,e,r,n,i,a,u,l,f,p){var v=p*(t-r)/2+f*(e-n)/2,c=-f*(t-r)/2+p*(e-n)/2,d=u*u,m=l*l,_=v*v,b=c*c,x=d*m-d*b-m*_;x<0&&(x=0),x/=d*b+m*_,x=Math.sqrt(x)*(i===a?-1:1);var w=x*u/l*c,E=x*-l/u*v,A=p*w-f*E+(t+r)/2,I=f*w+p*E+(e+n)/2,O=(v-w)/u,N=(c-E)/l,L=(-v-w)/u,k=(-c-E)/l,D=kp(1,0,O,N),j=kp(O,N,L,k);return a===0&&j>0&&(j-=ms),a===1&&j<0&&(j+=ms),[A,I,D,j]}function YA(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 KA=function(e,r,n,i,a,u,l,f,p){var v=Math.sin(p*ms/360),c=Math.cos(p*ms/360),d=c*(e-n)/2+v*(r-i)/2,m=-v*(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 b=qA(e,r,n,i,a,u,l,f,v,c),x=[],w=b[2],E=b[3],A=Math.max(Math.ceil(Math.abs(E)/(ms/4)),1);E/=A;for(var I=0;I<A;I++)x.push(YA(w,E)),w+=E;return x.map(function(O){for(var N=0;N<O.length;N+=2){var L=O[N+0],k=O[N+1];L*=l,k*=f;var D=c*L-v*k,j=v*L+c*k;O[N+0]=D+b[0],O[N+1]=j+b[1]}return O})},vs=1e-10,Bp=Math.PI/180;function _s(t,e,r){if(!(this instanceof _s))return new _s(t,e,r);this.rx=t,this.ry=e,this.ax=r}_s.prototype.transform=function(t){var e=Math.cos(this.ax*Bp),r=Math.sin(this.ax*Bp),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<vs*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,v=l-u/2;return this.ax=Math.abs(f)<vs&&Math.abs(p-a)<vs?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(v)):(this.ax+=90,this.rx=Math.sqrt(v),this.ry=Math.sqrt(p)),this},_s.prototype.isDegenerate=function(){return this.rx<vs*this.ry||this.ry<vs*this.rx};var ZA=_s,QA=GA,JA=WA,on=Lp,eE=KA,tE=ZA;function ot(t){if(!(this instanceof ot))return new ot(t);var e=QA(t);this.segments=e.segments,this.err=e.err,this.__stack=[]}ot.from=function(t){if(typeof t=="string")return new ot(t);if(t instanceof ot){var e=new ot("");return e.err=t.err,e.segments=t.segments.map(function(r){return r.slice()}),e.__stack=t.__stack.map(function(r){return on().matrix(r.toArray())}),e}throw new Error("SvgPath.from: invalid param type "+t)},ot.prototype.__matrix=function(t){var e=this,r;t.queue.length&&this.iterate(function(n,i,a,u){var l,f,p,v;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=tE(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":v=i>0,l=t.calc(n[1],n[2],v),f=["m",l[0],l[1]];break;default:for(p=n[0],f=[p],v=p.toLowerCase()===p,r=1;r<n.length;r+=2)l=t.calc(n[r],n[r+1],v),f.push(l[0],l[1])}e.segments[i]=f},!0)},ot.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=on(),e=this.__stack.length;--e>=0;)t.matrix(this.__stack[e].toArray());this.__matrix(t),this.__stack=[]}},ot.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},ot.prototype.translate=function(t,e){return this.__stack.push(on().translate(t,e||0)),this},ot.prototype.scale=function(t,e){return this.__stack.push(on().scale(t,!e&&e!==0?t:e)),this},ot.prototype.rotate=function(t,e,r){return this.__stack.push(on().rotate(t,e||0,r||0)),this},ot.prototype.skewX=function(t){return this.__stack.push(on().skewX(t)),this},ot.prototype.skewY=function(t){return this.__stack.push(on().skewY(t)),this},ot.prototype.matrix=function(t){return this.__stack.push(on().matrix(t)),this},ot.prototype.transform=function(t){return t.trim()?(this.__stack.push(JA(t)),this):this},ot.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},ot.prototype.iterate=function(t,e){var r=this.segments,n={},i=!1,a=0,u=0,l=0,f=0,p,v,c;if(e||this.__evaluateStack(),r.forEach(function(d,m){var _=t(d,m,a,u);Array.isArray(_)&&(n[m]=_,i=!0);var b=d[0]===d[0].toLowerCase();switch(d[0]){case"m":case"M":a=d[1]+(b?a:0),u=d[2]+(b?u:0),l=a,f=u;return;case"h":case"H":a=d[1]+(b?a:0);return;case"v":case"V":u=d[1]+(b?u:0);return;case"z":case"Z":a=l,u=f;return;default:a=d[d.length-2]+(b?a:0),u=d[d.length-1]+(b?u:0)}}),!i)return this;for(c=[],p=0;p<r.length;p++)if(typeof n[p]<"u")for(v=0;v<n[p].length;v++)c.push(n[p][v]);else c.push(r[p]);return this.segments=c,this},ot.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},ot.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},ot.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=eE(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},ot.prototype.unshort=function(){var t=this.segments,e,r,n,i,a;return this.iterate(function(u,l,f,p){var v=u[0],c=v.toUpperCase(),d;l&&(c==="T"?(d=v==="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=v==="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 rE=ot,nE=rE;const iE=Wn(nE),sE=ne.forwardRef((t,e)=>{const[r,n]=ne.useState(null),i=W.useRef(null),a=W.useRef(null),u=W.useRef(null),{path:l,visible:f,disabled:p,transformation:{x:v,y:c,width:d,height:m,anchor:_,hexColor:b,fill:x,stroke:w="none",strokeWidth:E=0,colorCorrection:A={}},pointerdown:I,pointerup:O}=t,N=Xe.useApp(),{temperatureFilter:L,sharpnessFilter:k,hueFilter:D,blurFilter:j,adjustmentFilter:Q,vignetteFilter:fe,noiseFilter:H}=_i(A),{blurRadius:V=0,vignette:le=0,noise:ve=0}=A;return ne.useEffect(()=>{const z=iE(l).scale(5).translate(0,0).toString(),ee=`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${m}">
1946
+ <path stroke="${w}" stroke-width="${E}" fill="${b||x}" d="${z}">
1947
1947
  </path>
1948
- </svg>`,pe=new MA(ee),X=N.renderer.generateTexture(pe);return n(X),()=>{}},[N,l,w,E,x,b]),Ee.jsx(xn,{...t,ref:e,children:Ee.jsx(Xe.Container,{ref:a,children:Ee.jsx(Xe.Container,{ref:u,children:r&&Ee.jsx(Xe.Sprite,{texture:r,width:d,height:m,anchor:_,ref:i,x:v,y:c,alpha:f?1:0,...!p&&f&&{interactive:!0,pointerdown:I,pointerup:O},filters:[L,k,D,Q,...V>0?[j]:[],...le>0?[fe]:[],...ve>0?[H]:[]]})})})})});var Dp={};/*!
1948
+ </svg>`,pe=new MA(ee),X=N.renderer.generateTexture(pe);return n(X),()=>{}},[N,l,w,E,b,x]),Ee.jsx(xn,{...t,ref:e,children:Ee.jsx(Xe.Container,{ref:a,children:Ee.jsx(Xe.Container,{ref:u,children:r&&Ee.jsx(Xe.Sprite,{texture:r,width:d,height:m,anchor:_,ref:i,x:v,y:c,alpha:f?1:0,...!p&&f&&{interactive:!0,pointerdown:I,pointerup:O},filters:[L,k,D,Q,...V>0?[j]:[],...le>0?[fe]:[],...ve>0?[H]:[]]})})})})});var Dp={};/*!
1949
1949
  * howler.js v2.2.3
1950
1950
  * howlerjs.com
1951
1951
  *
@@ -1953,7 +1953,7 @@ void main() {
1953
1953
  * goldfirestudios.com
1954
1954
  *
1955
1955
  * MIT License
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||v(),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(),x=0;x<_.length;x++){var b=d._howls[m]._soundById(_[x]);b&&b._node&&(b._node.volume=b._volume*c)}return d}return d._volume},mute:function(c){var d=this||r;d.ctx||v(),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(),x=0;x<_.length;x++){var b=d._howls[m]._soundById(_[x]);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,v()),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:"",x=_.match(/OPR\/([0-6].)/g),b=x&&parseInt(x[0].split("/")[1],10)<33,w=_.indexOf("Safari")!==-1&&_.indexOf("Chrome")===-1,E=_.match(/Version\/(.*?) /),A=w&&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:!!(!A&&d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!A&&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 x=0;x<c._howls.length;x++)if(!c._howls[x]._webAudio)for(var b=c._howls[x]._getSoundIds(),w=0;w<b.length;w++){var E=c._howls[x]._soundById(b[w]);E&&E._node&&!E._node._unlocked&&(E._node._unlocked=!0,E._node.load())}c._autoResume();var A=c.ctx.createBufferSource();A.buffer=c._scratchBuffer,A.connect(c.ctx.destination),typeof A.start>"u"?A.noteOn(0):A.start(0),typeof c.ctx.resume=="function"&&c.ctx.resume(),A.onended=function(){A.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||v(),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 _,x;if(c._format&&c._format[m])_=c._format[m];else{if(x=c._src[m],typeof x!="string"){c._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}_=/^data:audio\/([^;,]+);/i.exec(x),_||(_=/\.([^.]+)$/.exec(x.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 x=0,b=0;b<m._sounds.length;b++)m._sounds[b]._paused&&!m._sounds[b]._ended&&(x++,_=m._sounds[b]._id);x===1?c=null:_=null}}var w=_?m._soundById(_):m._inactiveSound();if(!w)return null;if(_&&!c&&(c=w._sprite||"__default"),m._state!=="loaded"){w._sprite=c,w._ended=!1;var E=w._id;return m._queue.push({event:"play",action:function(){m.play(E)}}),E}if(_&&!w._paused)return d||m._loadQueue("play"),w._id;m._webAudio&&r._autoResume();var A=Math.max(0,w._seek>0?w._seek:m._sprite[c][0]/1e3),I=Math.max(0,(m._sprite[c][0]+m._sprite[c][1])/1e3-A),O=I*1e3/Math.abs(w._rate),N=m._sprite[c][0]/1e3,L=(m._sprite[c][0]+m._sprite[c][1])/1e3;w._sprite=c,w._ended=!1;var k=function(){w._paused=!1,w._seek=A,w._start=N,w._stop=L,w._loop=!!(w._loop||m._sprite[c][2])};if(A>=L){m._ended(w);return}var D=w._node;if(m._webAudio){var j=function(){m._playLock=!1,k(),m._refreshBuffer(w);var V=w._muted||m._muted?0:w._volume;D.gain.setValueAtTime(V,r.ctx.currentTime),w._playStart=r.ctx.currentTime,typeof D.bufferSource.start>"u"?w._loop?D.bufferSource.noteGrainOn(0,A,86400):D.bufferSource.noteGrainOn(0,A,I):w._loop?D.bufferSource.start(0,A,86400):D.bufferSource.start(0,A,I),O!==1/0&&(m._endTimers[w._id]=setTimeout(m._ended.bind(m,w),O)),d||setTimeout(function(){m._emit("play",w._id),m._loadQueue()},0)};r.state==="running"&&r.ctx.state!=="interrupted"?j():(m._playLock=!0,m.once("resume",j),m._clearTimer(w._id))}else{var Q=function(){D.currentTime=A,D.muted=w._muted||m._muted||r._muted||D.muted,D.volume=w._volume*r.volume(),D.playbackRate=w._rate;try{var V=D.play();if(V&&typeof Promise<"u"&&(V instanceof Promise||typeof V.then=="function")?(m._playLock=!0,k(),V.then(function(){m._playLock=!1,D._unlocked=!0,d?m._loadQueue():m._emit("play",w._id)}).catch(function(){m._playLock=!1,m._emit("playerror",w._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."),w._ended=!0,w._paused=!0})):d||(m._playLock=!1,k(),m._emit("play",w._id)),D.playbackRate=w._rate,D.paused){m._emit("playerror",w._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"||w._loop?m._endTimers[w._id]=setTimeout(m._ended.bind(m,w),O):(m._endTimers[w._id]=function(){m._ended(w),D.removeEventListener("ended",m._endTimers[w._id],!1)},D.addEventListener("ended",m._endTimers[w._id],!1))}catch(le){m._emit("playerror",w._id,le)}};D.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(D.src=m._src,D.load());var fe=window&&window.ejecta||!D.readyState&&r._navigator.isCocoonJS;if(D.readyState>=3||fe)Q();else{m._playLock=!0,m._state="loading";var H=function(){m._state="loaded",Q(),D.removeEventListener(r._canPlayEvent,H,!1)};D.addEventListener(r._canPlayEvent,H,!1),m._clearTimer(w._id)}}return w._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 x=d._soundById(m[_]);if(x&&!x._paused&&(x._seek=d.seek(m[_]),x._rateSeek=0,x._paused=!0,d._stopFade(m[_]),x._node))if(d._webAudio){if(!x._node.bufferSource)continue;typeof x._node.bufferSource.stop>"u"?x._node.bufferSource.noteOff(0):x._node.bufferSource.stop(0),d._cleanBuffer(x._node)}else(!isNaN(x._node.duration)||x._node.duration===1/0)&&x._node.pause();arguments[1]||d._emit("pause",x?x._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),x=0;x<_.length;x++){m._clearTimer(_[x]);var b=m._soundById(_[x]);b&&(b._seek=b._start||0,b._rateSeek=0,b._paused=!0,b._ended=!0,m._stopFade(_[x]),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),x=0;x<_.length;x++){var b=m._soundById(_[x]);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 x=c._getSoundIds(),b=x.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 w;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++)w=c._soundById(_[E]),w&&(w._volume=m,d[2]||c._stopFade(_[E]),c._webAudio&&w._node&&!w._muted?w._node.gain.setValueAtTime(m,r.ctx.currentTime):w._node&&!w._muted&&(w._node.volume=m*r.volume()),c._emit("volume",w._id))}else return w=_?c._soundById(_):c._sounds[0],w?w._volume:0;return c},fade:function(c,d,m,_){var x=this;if(x._state!=="loaded"||x._playLock)return x._queue.push({event:"fade",action:function(){x.fade(c,d,m,_)}}),x;c=Math.min(Math.max(0,parseFloat(c)),1),d=Math.min(Math.max(0,parseFloat(d)),1),m=parseFloat(m),x.volume(c,_);for(var b=x._getSoundIds(_),w=0;w<b.length;w++){var E=x._soundById(b[w]);if(E){if(_||x._stopFade(b[w]),x._webAudio&&!E._muted){var A=r.ctx.currentTime,I=A+m/1e3;E._volume=c,E._node.gain.setValueAtTime(c,A),E._node.gain.linearRampToValueAtTime(d,I)}x._startFadeInterval(E,c,d,m,b[w],typeof _>"u")}}return x},_startFadeInterval:function(c,d,m,_,x,b){var w=this,E=d,A=m-d,I=Math.abs(A/.01),O=Math.max(4,I>0?_/I:_),N=Date.now();c._fadeTo=m,c._interval=setInterval(function(){var L=(Date.now()-N)/_;N=Date.now(),E+=A*L,E=Math.round(E*100)/100,A<0?E=Math.max(m,E):E=Math.min(m,E),w._webAudio?c._volume=E:w.volume(E,c._id,!0),b&&(w._volume=E),(m<d&&E<=m||m>d&&E>=m)&&(clearInterval(c._interval),c._interval=null,c._fadeTo=null,w.volume(m,c._id),w._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,_,x;if(d.length===0)return c._loop;if(d.length===1)if(typeof d[0]=="boolean")m=d[0],c._loop=m;else return x=c._soundById(parseInt(d[0],10)),x?x._loop:!1;else d.length===2&&(m=d[0],_=parseInt(d[1],10));for(var b=c._getSoundIds(_),w=0;w<b.length;w++)x=c._soundById(b[w]),x&&(x._loop=m,c._webAudio&&x._node&&x._node.bufferSource&&(x._node.bufferSource.loop=m,m&&(x._node.bufferSource.loopStart=x._start||0,x._node.bufferSource.loopEnd=x._stop,c.playing(b[w])&&(c.pause(b[w],!0),c.play(b[w],!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 x=c._getSoundIds(),b=x.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 w;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(w=c._soundById(_[E]),w){c.playing(_[E])&&(w._rateSeek=c.seek(_[E]),w._playStart=c._webAudio?r.ctx.currentTime:w._playStart),w._rate=m,c._webAudio&&w._node&&w._node.bufferSource?w._node.bufferSource.playbackRate.setValueAtTime(m,r.ctx.currentTime):w._node&&(w._node.playbackRate=m);var A=c.seek(_[E]),I=(c._sprite[w._sprite][0]+c._sprite[w._sprite][1])/1e3-A,O=I*1e3/Math.abs(w._rate);(c._endTimers[_[E]]||!w._paused)&&(c._clearTimer(_[E]),c._endTimers[_[E]]=setTimeout(c._ended.bind(c,w),O)),c._emit("rate",w._id)}}else return w=c._soundById(_),w?w._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 x=c._getSoundIds(),b=x.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 w=c._soundById(_);if(w)if(typeof m=="number"&&m>=0){var E=c.playing(_);E&&c.pause(_,!0),w._seek=m,w._ended=!1,c._clearTimer(_),!c._webAudio&&w._node&&!isNaN(w._node.duration)&&(w._node.currentTime=m);var A=function(){E&&c.play(_,!0),c._emit("seek",_)};if(E&&!c._webAudio){var I=function(){c._playLock?setTimeout(I,0):A()};setTimeout(I,0)}else A()}else if(c._webAudio){var O=c.playing(_)?r.ctx.currentTime-w._playStart:0,N=w._rateSeek?w._rateSeek-w._seek:0;return w._seek+(N+O*Math.abs(w._rate))}else return w._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 x=!0;for(m=0;m<r._howls.length;m++)if(r._howls[m]._src===c._src||c._src.indexOf(r._howls[m]._src)>=0){x=!1;break}return a&&x&&delete a[c._src],r.noAudio=!1,c._state="unloaded",c._sounds=[],c=null,null},on:function(c,d,m,_){var x=this,b=x["_on"+c];return typeof d=="function"&&b.push(_?{id:m,fn:d,once:_}:{id:m,fn:d}),x},off:function(c,d,m){var _=this,x=_["_on"+c],b=0;if(typeof d=="number"&&(m=d,d=null),d||m)for(b=0;b<x.length;b++){var w=m===x[b].id;if(d===x[b].fn&&w||!d&&w){x.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,x=_["_on"+c],b=x.length-1;b>=0;b--)(!x[b].id||x[b].id===d||c==="load")&&(setTimeout((function(w){w.call(this,d,m)}).bind(_,x[b].fn),0),x[b].once&&_.off(c,x[b].fn,x[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 x=(c._stop-c._start)*1e3/Math.abs(c._rate);d._endTimers[c._id]=setTimeout(d._ended.bind(d,c),x)}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),x=0;x<m.length;++x)_[x]=m.charCodeAt(x);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(w){b.setRequestHeader(w,c._xhr.headers[w])}),b.onload=function(){var w=(b.status+"")[0];if(w!=="0"&&w!=="2"&&w!=="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(x){x&&d._sounds.length>0?(a[d._src]=x,p(d,x)):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())},v=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||v(),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(),b=0;b<_.length;b++){var x=d._howls[m]._soundById(_[b]);x&&x._node&&(x._node.volume=x._volume*c)}return d}return d._volume},mute:function(c){var d=this||r;d.ctx||v(),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(),b=0;b<_.length;b++){var x=d._howls[m]._soundById(_[b]);x&&x._node&&(x._node.muted=c?!0:x._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,v()),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:"",b=_.match(/OPR\/([0-6].)/g),x=b&&parseInt(b[0].split("/")[1],10)<33,w=_.indexOf("Safari")!==-1&&_.indexOf("Chrome")===-1,E=_.match(/Version\/(.*?) /),A=w&&E&&parseInt(E[1],10)<15;return c._codecs={mp3:!!(!x&&(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:!!(!A&&d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!A&&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 b=0;b<c._howls.length;b++)if(!c._howls[b]._webAudio)for(var x=c._howls[b]._getSoundIds(),w=0;w<x.length;w++){var E=c._howls[b]._soundById(x[w]);E&&E._node&&!E._node._unlocked&&(E._node._unlocked=!0,E._node.load())}c._autoResume();var A=c.ctx.createBufferSource();A.buffer=c._scratchBuffer,A.connect(c.ctx.destination),typeof A.start>"u"?A.noteOn(0):A.start(0),typeof c.ctx.resume=="function"&&c.ctx.resume(),A.onended=function(){A.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||v(),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 _,b;if(c._format&&c._format[m])_=c._format[m];else{if(b=c._src[m],typeof b!="string"){c._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}_=/^data:audio\/([^;,]+);/i.exec(b),_||(_=/\.([^.]+)$/.exec(b.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 b=0,x=0;x<m._sounds.length;x++)m._sounds[x]._paused&&!m._sounds[x]._ended&&(b++,_=m._sounds[x]._id);b===1?c=null:_=null}}var w=_?m._soundById(_):m._inactiveSound();if(!w)return null;if(_&&!c&&(c=w._sprite||"__default"),m._state!=="loaded"){w._sprite=c,w._ended=!1;var E=w._id;return m._queue.push({event:"play",action:function(){m.play(E)}}),E}if(_&&!w._paused)return d||m._loadQueue("play"),w._id;m._webAudio&&r._autoResume();var A=Math.max(0,w._seek>0?w._seek:m._sprite[c][0]/1e3),I=Math.max(0,(m._sprite[c][0]+m._sprite[c][1])/1e3-A),O=I*1e3/Math.abs(w._rate),N=m._sprite[c][0]/1e3,L=(m._sprite[c][0]+m._sprite[c][1])/1e3;w._sprite=c,w._ended=!1;var k=function(){w._paused=!1,w._seek=A,w._start=N,w._stop=L,w._loop=!!(w._loop||m._sprite[c][2])};if(A>=L){m._ended(w);return}var D=w._node;if(m._webAudio){var j=function(){m._playLock=!1,k(),m._refreshBuffer(w);var V=w._muted||m._muted?0:w._volume;D.gain.setValueAtTime(V,r.ctx.currentTime),w._playStart=r.ctx.currentTime,typeof D.bufferSource.start>"u"?w._loop?D.bufferSource.noteGrainOn(0,A,86400):D.bufferSource.noteGrainOn(0,A,I):w._loop?D.bufferSource.start(0,A,86400):D.bufferSource.start(0,A,I),O!==1/0&&(m._endTimers[w._id]=setTimeout(m._ended.bind(m,w),O)),d||setTimeout(function(){m._emit("play",w._id),m._loadQueue()},0)};r.state==="running"&&r.ctx.state!=="interrupted"?j():(m._playLock=!0,m.once("resume",j),m._clearTimer(w._id))}else{var Q=function(){D.currentTime=A,D.muted=w._muted||m._muted||r._muted||D.muted,D.volume=w._volume*r.volume(),D.playbackRate=w._rate;try{var V=D.play();if(V&&typeof Promise<"u"&&(V instanceof Promise||typeof V.then=="function")?(m._playLock=!0,k(),V.then(function(){m._playLock=!1,D._unlocked=!0,d?m._loadQueue():m._emit("play",w._id)}).catch(function(){m._playLock=!1,m._emit("playerror",w._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."),w._ended=!0,w._paused=!0})):d||(m._playLock=!1,k(),m._emit("play",w._id)),D.playbackRate=w._rate,D.paused){m._emit("playerror",w._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"||w._loop?m._endTimers[w._id]=setTimeout(m._ended.bind(m,w),O):(m._endTimers[w._id]=function(){m._ended(w),D.removeEventListener("ended",m._endTimers[w._id],!1)},D.addEventListener("ended",m._endTimers[w._id],!1))}catch(le){m._emit("playerror",w._id,le)}};D.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(D.src=m._src,D.load());var fe=window&&window.ejecta||!D.readyState&&r._navigator.isCocoonJS;if(D.readyState>=3||fe)Q();else{m._playLock=!0,m._state="loading";var H=function(){m._state="loaded",Q(),D.removeEventListener(r._canPlayEvent,H,!1)};D.addEventListener(r._canPlayEvent,H,!1),m._clearTimer(w._id)}}return w._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 b=d._soundById(m[_]);if(b&&!b._paused&&(b._seek=d.seek(m[_]),b._rateSeek=0,b._paused=!0,d._stopFade(m[_]),b._node))if(d._webAudio){if(!b._node.bufferSource)continue;typeof b._node.bufferSource.stop>"u"?b._node.bufferSource.noteOff(0):b._node.bufferSource.stop(0),d._cleanBuffer(b._node)}else(!isNaN(b._node.duration)||b._node.duration===1/0)&&b._node.pause();arguments[1]||d._emit("pause",b?b._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),b=0;b<_.length;b++){m._clearTimer(_[b]);var x=m._soundById(_[b]);x&&(x._seek=x._start||0,x._rateSeek=0,x._paused=!0,x._ended=!0,m._stopFade(_[b]),x._node&&(m._webAudio?x._node.bufferSource&&(typeof x._node.bufferSource.stop>"u"?x._node.bufferSource.noteOff(0):x._node.bufferSource.stop(0),m._cleanBuffer(x._node)):(!isNaN(x._node.duration)||x._node.duration===1/0)&&(x._node.currentTime=x._start||0,x._node.pause(),x._node.duration===1/0&&m._clearSound(x._node))),d||m._emit("stop",x._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),b=0;b<_.length;b++){var x=m._soundById(_[b]);x&&(x._muted=c,x._interval&&m._stopFade(x._id),m._webAudio&&x._node?x._node.gain.setValueAtTime(c?0:x._volume,r.ctx.currentTime):x._node&&(x._node.muted=r._muted?!0:c),m._emit("mute",x._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 b=c._getSoundIds(),x=b.indexOf(d[0]);x>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length>=2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var w;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++)w=c._soundById(_[E]),w&&(w._volume=m,d[2]||c._stopFade(_[E]),c._webAudio&&w._node&&!w._muted?w._node.gain.setValueAtTime(m,r.ctx.currentTime):w._node&&!w._muted&&(w._node.volume=m*r.volume()),c._emit("volume",w._id))}else return w=_?c._soundById(_):c._sounds[0],w?w._volume:0;return c},fade:function(c,d,m,_){var b=this;if(b._state!=="loaded"||b._playLock)return b._queue.push({event:"fade",action:function(){b.fade(c,d,m,_)}}),b;c=Math.min(Math.max(0,parseFloat(c)),1),d=Math.min(Math.max(0,parseFloat(d)),1),m=parseFloat(m),b.volume(c,_);for(var x=b._getSoundIds(_),w=0;w<x.length;w++){var E=b._soundById(x[w]);if(E){if(_||b._stopFade(x[w]),b._webAudio&&!E._muted){var A=r.ctx.currentTime,I=A+m/1e3;E._volume=c,E._node.gain.setValueAtTime(c,A),E._node.gain.linearRampToValueAtTime(d,I)}b._startFadeInterval(E,c,d,m,x[w],typeof _>"u")}}return b},_startFadeInterval:function(c,d,m,_,b,x){var w=this,E=d,A=m-d,I=Math.abs(A/.01),O=Math.max(4,I>0?_/I:_),N=Date.now();c._fadeTo=m,c._interval=setInterval(function(){var L=(Date.now()-N)/_;N=Date.now(),E+=A*L,E=Math.round(E*100)/100,A<0?E=Math.max(m,E):E=Math.min(m,E),w._webAudio?c._volume=E:w.volume(E,c._id,!0),x&&(w._volume=E),(m<d&&E<=m||m>d&&E>=m)&&(clearInterval(c._interval),c._interval=null,c._fadeTo=null,w.volume(m,c._id),w._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,_,b;if(d.length===0)return c._loop;if(d.length===1)if(typeof d[0]=="boolean")m=d[0],c._loop=m;else return b=c._soundById(parseInt(d[0],10)),b?b._loop:!1;else d.length===2&&(m=d[0],_=parseInt(d[1],10));for(var x=c._getSoundIds(_),w=0;w<x.length;w++)b=c._soundById(x[w]),b&&(b._loop=m,c._webAudio&&b._node&&b._node.bufferSource&&(b._node.bufferSource.loop=m,m&&(b._node.bufferSource.loopStart=b._start||0,b._node.bufferSource.loopEnd=b._stop,c.playing(x[w])&&(c.pause(x[w],!0),c.play(x[w],!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 b=c._getSoundIds(),x=b.indexOf(d[0]);x>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var w;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(w=c._soundById(_[E]),w){c.playing(_[E])&&(w._rateSeek=c.seek(_[E]),w._playStart=c._webAudio?r.ctx.currentTime:w._playStart),w._rate=m,c._webAudio&&w._node&&w._node.bufferSource?w._node.bufferSource.playbackRate.setValueAtTime(m,r.ctx.currentTime):w._node&&(w._node.playbackRate=m);var A=c.seek(_[E]),I=(c._sprite[w._sprite][0]+c._sprite[w._sprite][1])/1e3-A,O=I*1e3/Math.abs(w._rate);(c._endTimers[_[E]]||!w._paused)&&(c._clearTimer(_[E]),c._endTimers[_[E]]=setTimeout(c._ended.bind(c,w),O)),c._emit("rate",w._id)}}else return w=c._soundById(_),w?w._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 b=c._getSoundIds(),x=b.indexOf(d[0]);x>=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 w=c._soundById(_);if(w)if(typeof m=="number"&&m>=0){var E=c.playing(_);E&&c.pause(_,!0),w._seek=m,w._ended=!1,c._clearTimer(_),!c._webAudio&&w._node&&!isNaN(w._node.duration)&&(w._node.currentTime=m);var A=function(){E&&c.play(_,!0),c._emit("seek",_)};if(E&&!c._webAudio){var I=function(){c._playLock?setTimeout(I,0):A()};setTimeout(I,0)}else A()}else if(c._webAudio){var O=c.playing(_)?r.ctx.currentTime-w._playStart:0,N=w._rateSeek?w._rateSeek-w._seek:0;return w._seek+(N+O*Math.abs(w._rate))}else return w._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 b=!0;for(m=0;m<r._howls.length;m++)if(r._howls[m]._src===c._src||c._src.indexOf(r._howls[m]._src)>=0){b=!1;break}return a&&b&&delete a[c._src],r.noAudio=!1,c._state="unloaded",c._sounds=[],c=null,null},on:function(c,d,m,_){var b=this,x=b["_on"+c];return typeof d=="function"&&x.push(_?{id:m,fn:d,once:_}:{id:m,fn:d}),b},off:function(c,d,m){var _=this,b=_["_on"+c],x=0;if(typeof d=="number"&&(m=d,d=null),d||m)for(x=0;x<b.length;x++){var w=m===b[x].id;if(d===b[x].fn&&w||!d&&w){b.splice(x,1);break}}else if(c)_["_on"+c]=[];else{var E=Object.keys(_);for(x=0;x<E.length;x++)E[x].indexOf("_on")===0&&Array.isArray(_[E[x]])&&(_[E[x]]=[])}return _},once:function(c,d,m){var _=this;return _.on(c,d,m,1),_},_emit:function(c,d,m){for(var _=this,b=_["_on"+c],x=b.length-1;x>=0;x--)(!b[x].id||b[x].id===d||c==="load")&&(setTimeout((function(w){w.call(this,d,m)}).bind(_,b[x].fn),0),b[x].once&&_.off(c,b[x].fn,b[x].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 b=(c._stop-c._start)*1e3/Math.abs(c._rate);d._endTimers[c._id]=setTimeout(d._ended.bind(d,c),b)}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),b=0;b<m.length;++b)_[b]=m.charCodeAt(b);f(_.buffer,c)}else{var x=new XMLHttpRequest;x.open(c._xhr.method,d,!0),x.withCredentials=c._xhr.withCredentials,x.responseType="arraybuffer",c._xhr.headers&&Object.keys(c._xhr.headers).forEach(function(w){x.setRequestHeader(w,c._xhr.headers[w])}),x.onload=function(){var w=(x.status+"")[0];if(w!=="0"&&w!=="2"&&w!=="3"){c._emit("loaderror",null,"Failed loading audio file with status: "+x.status+".");return}f(x.response,c)},x.onerror=function(){c._webAudio&&(c._html5=!0,c._webAudio=!1,c._sounds=[],delete a[d],c.load())},l(x)}},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(b){b&&d._sounds.length>0?(a[d._src]=b,p(d,b)):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())},v=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)})();/*!
1957
1957
  * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
1958
1958
  *
1959
1959
  * howler.js v2.2.3
@@ -1963,16 +1963,16 @@ void main() {
1963
1963
  * goldfirestudios.com
1964
1964
  *
1965
1965
  * MIT License
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 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 v=u._panner;v?(v.coneInnerAngle=p.coneInnerAngle,v.coneOuterAngle=p.coneOuterAngle,v.coneOuterGain=p.coneOuterGain,v.distanceModel=p.distanceModel,v.maxDistance=p.maxDistance,v.refDistance=p.refDistance,v.rolloffFactor=p.rolloffFactor,v.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)}})()})(Dp);const aE=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=ne.useState(!1),n=W.useRef(null),i=W.useRef(e),a=W.useRef(null),u=ne.useRef(null),{tl:l,dragModeRef:f}=W.useContext(_n),{uniqueId:p,src:v,startAt:c,endAt:d,mute:m,speed:_,audioStartAt:x,audioEndAt:b,visible:w}=t;ct(je.PAUSE,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),ct(je.COMPLETE,()=>{x>0&&u.current&&u.current.seek(x)}),ct(je.SCRUBBER_CLICKED,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),ne.useEffect(()=>{u.current&&(f.current?(u.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[f]);const E=(N,L)=>{l.current&&l.current.isActive()&&a.current&&a.current.isActive()&&!f.current&&u.current&&(console.log("gsap on start 0020",p,N,L),u.current.play(),i.current.isPlaying=!0)},A=()=>{var N;n.current&&((N=u.current)==null||N.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=N=>{var k,D;const L=N+((k=a.current)==null?void 0:k.time());u.current&&f.current?(u.current.seek(L),u.current.pause(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&((D=l.current)!=null&&D.isActive())&&u.current&&(u.current.seek(L),u.current.play(),i.current.isPlaying=!0)},O=()=>{};return W.useEffect(()=>{let N=xt.context(()=>{});if(n.current&&l.current){const L={duration:Number(b)-Number(x),onStart:E,onComplete:A,onStartParams:[x,b],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[x,b]};N=xt.context(()=>{a.current=xt.from(n.current,L,x),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(),xt.killTweensOf(a.current)),N.revert()}},[c,d,x,b]),ne.useEffect(()=>{n.current&&r(!0)},[]),ne.useEffect(()=>($s(v)||(u.current=new Dp.Howl({src:[v],autoplay:!1,loop:!1,rate:_||1,volume:!m&&w?1:0,onload:()=>{console.log("loaded audio sprite"+p),i.current.loaded=!0,u.current&&(x>0&&u.current.seek(x),u.current.volume(!m&&w?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,v,c,d,x,b,m,w,_]),ne.useEffect(()=>{u.current&&(console.log("running updateEffect 2002",p,b),u.current.volume(!m&&w?1:0),u.current.rate(_||1),i.current.isPlaying=!0)},[m,w,_]),Ee.jsx(Xe.Container,{ref:n})};function oE(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 Up=oE;function uE(){this.__data__=[],this.size=0}var lE=uE;function cE(t,e){return t===e||t!==t&&e!==e}var $p=cE,hE=$p;function fE(t,e){for(var r=t.length;r--;)if(hE(t[r][0],e))return r;return-1}var Da=fE,dE=Da,pE=Array.prototype,gE=pE.splice;function mE(t){var e=this.__data__,r=dE(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():gE.call(e,r,1),--this.size,!0}var vE=mE,_E=Da;function yE(t){var e=this.__data__,r=_E(e,t);return r<0?void 0:e[r][1]}var xE=yE,bE=Da;function wE(t){return bE(this.__data__,t)>-1}var TE=wE,SE=Da;function AE(t,e){var r=this.__data__,n=SE(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var EE=AE,CE=lE,IE=vE,RE=xE,PE=TE,ME=EE;function Si(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])}}Si.prototype.clear=CE,Si.prototype.delete=IE,Si.prototype.get=RE,Si.prototype.has=PE,Si.prototype.set=ME;var Ua=Si,OE=Ua;function FE(){this.__data__=new OE,this.size=0}var NE=FE;function LE(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var kE=LE;function BE(t){return this.__data__.get(t)}var DE=BE;function UE(t){return this.__data__.has(t)}var $E=UE,GE=Yn,zE=GE(Object,"create"),$a=zE,Gp=$a;function HE(){this.__data__=Gp?Gp(null):{},this.size=0}var VE=HE;function XE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var jE=XE,WE=$a,qE="__lodash_hash_undefined__",YE=Object.prototype,KE=YE.hasOwnProperty;function ZE(t){var e=this.__data__;if(WE){var r=e[t];return r===qE?void 0:r}return KE.call(e,t)?e[t]:void 0}var QE=ZE,JE=$a,eC=Object.prototype,tC=eC.hasOwnProperty;function rC(t){var e=this.__data__;return JE?e[t]!==void 0:tC.call(e,t)}var nC=rC,iC=$a,sC="__lodash_hash_undefined__";function aC(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=iC&&e===void 0?sC:e,this}var oC=aC,uC=VE,lC=jE,cC=QE,hC=nC,fC=oC;function Ai(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])}}Ai.prototype.clear=uC,Ai.prototype.delete=lC,Ai.prototype.get=cC,Ai.prototype.has=hC,Ai.prototype.set=fC;var dC=Ai,zp=dC,pC=Ua,gC=zo;function mC(){this.size=0,this.__data__={hash:new zp,map:new(gC||pC),string:new zp}}var vC=mC;function _C(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var yC=_C,xC=yC;function bC(t,e){var r=t.__data__;return xC(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ga=bC,wC=Ga;function TC(t){var e=wC(this,t).delete(t);return this.size-=e?1:0,e}var SC=TC,AC=Ga;function EC(t){return AC(this,t).get(t)}var CC=EC,IC=Ga;function RC(t){return IC(this,t).has(t)}var PC=RC,MC=Ga;function OC(t,e){var r=MC(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var FC=OC,NC=vC,LC=SC,kC=CC,BC=PC,DC=FC;function Ei(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])}}Ei.prototype.clear=NC,Ei.prototype.delete=LC,Ei.prototype.get=kC,Ei.prototype.has=BC,Ei.prototype.set=DC;var Ol=Ei,UC=Ua,$C=zo,GC=Ol,zC=200;function HC(t,e){var r=this.__data__;if(r instanceof UC){var n=r.__data__;if(!$C||n.length<zC-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new GC(n)}return r.set(t,e),this.size=r.size,this}var VC=HC,XC=Ua,jC=NE,WC=kE,qC=DE,YC=$E,KC=VC;function Ci(t){var e=this.__data__=new XC(t);this.size=e.size}Ci.prototype.clear=jC,Ci.prototype.delete=WC,Ci.prototype.get=qC,Ci.prototype.has=YC,Ci.prototype.set=KC;var Hp=Ci,ZC="__lodash_hash_undefined__";function QC(t){return this.__data__.set(t,ZC),this}var JC=QC;function e2(t){return this.__data__.has(t)}var t2=e2,r2=Ol,n2=JC,i2=t2;function za(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new r2;++e<r;)this.add(t[e])}za.prototype.add=za.prototype.push=n2,za.prototype.has=i2;var s2=za;function a2(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 o2=a2;function u2(t,e){return t.has(e)}var l2=u2,c2=s2,h2=o2,f2=l2,d2=1,p2=2;function g2(t,e,r,n,i,a){var u=r&d2,l=t.length,f=e.length;if(l!=f&&!(u&&f>l))return!1;var p=a.get(t),v=a.get(e);if(p&&v)return p==e&&v==t;var c=-1,d=!0,m=r&p2?new c2:void 0;for(a.set(t,e),a.set(e,t);++c<l;){var _=t[c],x=e[c];if(n)var b=u?n(x,_,c,e,t,a):n(_,x,c,t,e,a);if(b!==void 0){if(b)continue;d=!1;break}if(m){if(!h2(e,function(w,E){if(!f2(m,E)&&(_===w||i(_,w,r,n,a)))return m.push(E)})){d=!1;break}}else if(!(_===x||i(_,x,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var Vp=g2,m2=Er,v2=m2.Uint8Array,_2=v2;function y2(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var x2=y2;function b2(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var w2=b2,Xp=ks,jp=_2,T2=$p,S2=Vp,A2=x2,E2=w2,C2=1,I2=2,R2="[object Boolean]",P2="[object Date]",M2="[object Error]",O2="[object Map]",F2="[object Number]",N2="[object RegExp]",L2="[object Set]",k2="[object String]",B2="[object Symbol]",D2="[object ArrayBuffer]",U2="[object DataView]",Wp=Xp?Xp.prototype:void 0,Fl=Wp?Wp.valueOf:void 0;function $2(t,e,r,n,i,a,u){switch(r){case U2:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case D2:return!(t.byteLength!=e.byteLength||!a(new jp(t),new jp(e)));case R2:case P2:case F2:return T2(+t,+e);case M2:return t.name==e.name&&t.message==e.message;case N2:case k2:return t==e+"";case O2:var l=A2;case L2:var f=n&C2;if(l||(l=E2),t.size!=e.size&&!f)return!1;var p=u.get(t);if(p)return p==e;n|=I2,u.set(t,e);var v=S2(l(t),l(e),n,i,a,u);return u.delete(t),v;case B2:if(Fl)return Fl.call(t)==Fl.call(e)}return!1}var G2=$2;function z2(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var H2=z2,V2=H2,X2=Cr;function j2(t,e,r){var n=e(t);return X2(t)?n:V2(n,r(t))}var W2=j2;function q2(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 Y2=q2;function K2(){return[]}var Z2=K2,Q2=Y2,J2=Z2,eI=Object.prototype,tI=eI.propertyIsEnumerable,qp=Object.getOwnPropertySymbols,rI=qp?function(t){return t==null?[]:(t=Object(t),Q2(qp(t),function(e){return tI.call(t,e)}))}:J2,nI=rI;function iI(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var sI=iI,aI=9007199254740991,oI=/^(?:0|[1-9]\d*)$/;function uI(t,e){var r=typeof t;return e=e??aI,!!e&&(r=="number"||r!="symbol"&&oI.test(t))&&t>-1&&t%1==0&&t<e}var Yp=uI,lI=sI,cI=qo,hI=Cr,fI=Ko,dI=Yp,pI=Zo,gI=Object.prototype,mI=gI.hasOwnProperty;function vI(t,e){var r=hI(t),n=!r&&cI(t),i=!r&&!n&&fI(t),a=!r&&!n&&!i&&pI(t),u=r||n||i||a,l=u?lI(t.length,String):[],f=l.length;for(var p in t)(e||mI.call(t,p))&&!(u&&(p=="length"||i&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||dI(p,f)))&&l.push(p);return l}var _I=vI,yI=_I,xI=dh,bI=Bs;function wI(t){return bI(t)?yI(t):xI(t)}var Nl=wI,TI=W2,SI=nI,AI=Nl;function EI(t){return TI(t,AI,SI)}var CI=EI,Kp=CI,II=1,RI=Object.prototype,PI=RI.hasOwnProperty;function MI(t,e,r,n,i,a){var u=r&II,l=Kp(t),f=l.length,p=Kp(e),v=p.length;if(f!=v&&!u)return!1;for(var c=f;c--;){var d=l[c];if(!(u?d in e:PI.call(e,d)))return!1}var m=a.get(t),_=a.get(e);if(m&&_)return m==e&&_==t;var x=!0;a.set(t,e),a.set(e,t);for(var b=u;++c<f;){d=l[c];var w=t[d],E=e[d];if(n)var A=u?n(E,w,d,e,t,a):n(w,E,d,t,e,a);if(!(A===void 0?w===E||i(w,E,r,n,a):A)){x=!1;break}b||(b=d=="constructor")}if(x&&!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)&&(x=!1)}return a.delete(t),a.delete(e),x}var OI=MI,Ll=Hp,FI=Vp,NI=G2,LI=OI,Zp=Ih,Qp=Cr,Jp=Ko,kI=Zo,BI=1,eg="[object Arguments]",tg="[object Array]",Ha="[object Object]",DI=Object.prototype,rg=DI.hasOwnProperty;function UI(t,e,r,n,i,a){var u=Qp(t),l=Qp(e),f=u?tg:Zp(t),p=l?tg:Zp(e);f=f==eg?Ha:f,p=p==eg?Ha:p;var v=f==Ha,c=p==Ha,d=f==p;if(d&&Jp(t)){if(!Jp(e))return!1;u=!0,v=!1}if(d&&!v)return a||(a=new Ll),u||kI(t)?FI(t,e,r,n,i,a):NI(t,e,f,r,n,i,a);if(!(r&BI)){var m=v&&rg.call(t,"__wrapped__"),_=c&&rg.call(e,"__wrapped__");if(m||_){var x=m?t.value():t,b=_?e.value():e;return a||(a=new Ll),i(x,b,r,n,a)}}return d?(a||(a=new Ll),LI(t,e,r,n,i,a)):!1}var $I=UI,GI=$I,ng=Wi;function ig(t,e,r,n,i){return t===e?!0:t==null||e==null||!ng(t)&&!ng(e)?t!==t&&e!==e:GI(t,e,r,n,ig,i)}var sg=ig,zI=Hp,HI=sg,VI=1,XI=2;function jI(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],v=l[1];if(u&&l[2]){if(p===void 0&&!(f in t))return!1}else{var c=new zI;if(n)var d=n(p,v,f,t,e,c);if(!(d===void 0?HI(v,p,VI|XI,n,c):d))return!1}}return!0}var WI=jI,qI=ji;function YI(t){return t===t&&!qI(t)}var ag=YI,KI=ag,ZI=Nl;function QI(t){for(var e=ZI(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,KI(i)]}return e}var JI=QI;function eR(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var og=eR,tR=WI,rR=JI,nR=og;function iR(t){var e=rR(t);return e.length==1&&e[0][2]?nR(e[0][0],e[0][1]):function(r){return r===t||tR(r,t,e)}}var sR=iR,aR=Xi,oR=Wi,uR="[object Symbol]";function lR(t){return typeof t=="symbol"||oR(t)&&aR(t)==uR}var Va=lR,cR=Cr,hR=Va,fR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dR=/^\w*$/;function pR(t,e){if(cR(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||hR(t)?!0:dR.test(t)||!fR.test(t)||e!=null&&t in Object(e)}var kl=pR,ug=Ol,gR="Expected a function";function Bl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(gR);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(Bl.Cache||ug),r}Bl.Cache=ug;var mR=Bl,vR=mR,_R=500;function yR(t){var e=vR(t,function(n){return r.size===_R&&r.clear(),n}),r=e.cache;return e}var xR=yR,bR=xR,wR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,TR=/\\(\\)?/g,SR=bR(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(wR,function(r,n,i,a){e.push(i?a.replace(TR,"$1"):n||r)}),e}),AR=SR,lg=ks,ER=Up,CR=Cr,IR=Va,RR=1/0,cg=lg?lg.prototype:void 0,hg=cg?cg.toString:void 0;function fg(t){if(typeof t=="string")return t;if(CR(t))return ER(t,fg)+"";if(IR(t))return hg?hg.call(t):"";var e=t+"";return e=="0"&&1/t==-RR?"-0":e}var PR=fg,MR=PR;function OR(t){return t==null?"":MR(t)}var FR=OR,NR=Cr,LR=kl,kR=AR,BR=FR;function DR(t,e){return NR(t)?t:LR(t,e)?[t]:kR(BR(t))}var dg=DR,UR=Va,$R=1/0;function GR(t){if(typeof t=="string"||UR(t))return t;var e=t+"";return e=="0"&&1/t==-$R?"-0":e}var Xa=GR,zR=dg,HR=Xa;function VR(t,e){e=zR(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[HR(e[r++])];return r&&r==n?t:void 0}var pg=VR,XR=pg;function jR(t,e,r){var n=t==null?void 0:XR(t,e);return n===void 0?r:n}var WR=jR;function qR(t,e){return t!=null&&e in Object(t)}var YR=qR,KR=dg,ZR=qo,QR=Cr,JR=Yp,eP=Yo,tP=Xa;function rP(t,e,r){e=KR(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var u=tP(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&&eP(i)&&JR(u,i)&&(QR(t)||ZR(t)))}var nP=rP,iP=YR,sP=nP;function aP(t,e){return t!=null&&sP(t,e,iP)}var oP=aP,uP=sg,lP=WR,cP=oP,hP=kl,fP=ag,dP=og,pP=Xa,gP=1,mP=2;function vP(t,e){return hP(t)&&fP(e)?dP(pP(t),e):function(r){var n=lP(r,t);return n===void 0&&n===e?cP(r,t):uP(e,n,gP|mP)}}var _P=vP;function yP(t){return t}var xP=yP;function bP(t){return function(e){return e==null?void 0:e[t]}}var wP=bP,TP=pg;function SP(t){return function(e){return TP(e,t)}}var AP=SP,EP=wP,CP=AP,IP=kl,RP=Xa;function PP(t){return IP(t)?EP(RP(t)):CP(t)}var MP=PP,OP=sR,FP=_P,NP=xP,LP=Cr,kP=MP;function BP(t){return typeof t=="function"?t:t==null?NP:typeof t=="object"?LP(t)?FP(t[0],t[1]):OP(t):kP(t)}var DP=BP;function UP(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 $P=UP,GP=$P,zP=GP(),HP=zP,VP=HP,XP=Nl;function jP(t,e){return t&&VP(t,e,XP)}var WP=jP,qP=Bs;function YP(t,e){return function(r,n){if(r==null)return r;if(!qP(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 KP=YP,ZP=WP,QP=KP,JP=QP(ZP),eM=JP,tM=eM,rM=Bs;function nM(t,e){var r=-1,n=rM(t)?Array(t.length):[];return tM(t,function(i,a,u){n[++r]=e(i,a,u)}),n}var iM=nM,sM=Up,aM=DP,oM=iM,uM=Cr;function lM(t,e){var r=uM(t)?sM:oM;return r(t,aM(e))}var cM=lM;const hM=Wn(cM);var Bn={},gg={},zr={};Object.defineProperty(zr,"__esModule",{value:!0}),zr.loop=zr.conditional=zr.parse=void 0;var fM=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};zr.parse=fM;var dM=function(e,r){return function(n,i,a,u){r(n,i,a)&&u(n,e,i,a)}};zr.conditional=dM;var pM=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}};zr.loop=pM;var ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.readBits=ft.readArray=ft.readUnsigned=ft.readString=ft.peekBytes=ft.readBytes=ft.peekByte=ft.readByte=ft.buildStream=void 0;var gM=function(e){return{data:e,pos:0}};ft.buildStream=gM;var mg=function(){return function(e){return e.data[e.pos++]}};ft.readByte=mg;var mM=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};ft.peekByte=mM;var ja=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};ft.readBytes=ja;var vM=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};ft.peekBytes=vM;var _M=function(e){return function(r){return Array.from(ja(e)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};ft.readString=_M;var yM=function(e){return function(r){var n=ja(2)(r);return e?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};ft.readUnsigned=yM;var xM=function(e,r){return function(n,i,a){for(var u=typeof r=="function"?r(n,i,a):r,l=ja(e),f=new Array(u),p=0;p<u;p++)f[p]=l(n);return f}};ft.readArray=xM;var bM=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},wM=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]=bM(i,f.index,f.length):u[l]=i[f.index],u},{})}};ft.readBits=wM,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=zr,r=ft,n={blocks:function(d){for(var m=0,_=[],x=d.data.length,b=0,w=(0,r.readByte)()(d);w!==m&&w;w=(0,r.readByte)()(d)){if(d.pos+w>=x){var E=x-d.pos;_.push((0,r.readBytes)(E)(d)),b+=E;break}_.push((0,r.readBytes)(w)(d)),b+=w}for(var A=new Uint8Array(b),I=0,O=0;O<_.length;O++)A.set(_[O],I),I+=_[O].length;return A}},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})}],v=p;t.default=v}(gg);var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.deinterlace=void 0;var TM=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 v=u[p];v<i;v+=l[p])a(v,f),f++;return n};Wa.deinterlace=TM;var qa={};Object.defineProperty(qa,"__esModule",{value:!0}),qa.lzw=void 0;var SM=function(e,r,n){var i=4096,a=-1,u=n,l,f,p,v,c,d,m,N,_,x,O,b,L,k,j,D,w=new Array(n),E=new Array(i),A=new Array(i),I=new Array(i+1);for(b=e,f=1<<b,c=f+1,l=f+2,m=a,v=b+1,p=(1<<v)-1,_=0;_<f;_++)E[_]=0,A[_]=_;var O,N,L,k,D,j;for(O=N=L=k=D=j=0,x=0;x<u;){if(k===0){if(N<v){O+=r[j]<<N,N+=8,j++;continue}if(_=O&p,O>>=v,N-=v,_>l||_==c)break;if(_==f){v=b+1,p=(1<<v)-1,l=f+2,m=a;continue}if(m==a){I[k++]=A[_],m=_,L=_;continue}for(d=_,_==l&&(I[k++]=L,_=m);_>f;)I[k++]=A[_],_=E[_];L=A[_]&255,I[k++]=L,l<i&&(E[l]=m,A[l]=L,l++,!(l&p)&&l<i&&(v++,p+=l)),m=d}k--,w[D++]=I[k],x++}for(x=D;x<u;x++)w[x]=0;return w};qa.lzw=SM,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.decompressFrames=Bn.decompressFrame=Bn.parseGIF=void 0;var AM=PM(gg),EM=zr,CM=ft,IM=Wa,RM=qa;function PM(t){return t&&t.__esModule?t:{default:t}}var MM=function(e){var r=new Uint8Array(e);return(0,EM.parse)((0,CM.buildStream)(r),AM.default)};Bn.parseGIF=MM;var OM=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},vg=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,RM.lzw)(i.data.minCodeSize,i.data.blocks,a);i.descriptor.lct.interlaced&&(u=(0,IM.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=OM(l)),l};Bn.decompressFrame=vg;var FM=function(e,r){return e.frames.filter(function(n){return n.image}).map(function(n){return vg(n,e.gct,r)})};Bn.decompressFrames=FM;const _g=(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},NM=t=>_g({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),LM=t=>W.useReducer(_g,t,NM);var kM='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 BM(t){const e=new Blob([kM],{type:"application/javascript"}),r=URL.createObjectURL(e),n=new Worker(r,t);return URL.revokeObjectURL(r),n}const DM=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),UM=(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)},$M=t=>{const e=W.useRef(t);return W.useEffect(()=>{e.current=t},[t]),e},GM=t=>{const e=$M(t);return W.useCallback(r=>e.current&&e.current(r),[])},zM=UM(()=>new BM,t=>t.terminate()),HM=(t,e)=>{const r=GM(e),n=zM();W.useEffect(()=>{if(typeof t=="string"){const i=a=>{const u=a.data||a;if(u.src===t){const l=u.error?u:DM(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])},VM=({isPlaying:t,forwardRef:e,...r})=>{const n=ne.useRef(null);return ne.useImperativeHandle(e,()=>n.current,[n]),ne.useEffect(()=>{if(n.current===null)return;const i=n.current;i[t?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[t]),Ee.jsx(Xe.AnimatedSprite,{ref:n,...r,isPlaying:t})},yg=ne.memo(VM);var Ya={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 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 v=u._panner;v?(v.coneInnerAngle=p.coneInnerAngle,v.coneOuterAngle=p.coneOuterAngle,v.coneOuterGain=p.coneOuterGain,v.distanceModel=p.distanceModel,v.maxDistance=p.maxDistance,v.refDistance=p.refDistance,v.rolloffFactor=p.rolloffFactor,v.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)}})()})(Dp);const aE=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=ne.useState(!1),n=W.useRef(null),i=W.useRef(e),a=W.useRef(null),u=ne.useRef(null),{tl:l,dragModeRef:f}=W.useContext(_n),{uniqueId:p,src:v,startAt:c,endAt:d,mute:m,speed:_,audioStartAt:b,audioEndAt:x,visible:w}=t;ct(je.PAUSE,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),ct(je.COMPLETE,()=>{b>0&&u.current&&u.current.seek(b)}),ct(je.SCRUBBER_CLICKED,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),ne.useEffect(()=>{u.current&&(f.current?(u.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[f]);const E=(N,L)=>{l.current&&l.current.isActive()&&a.current&&a.current.isActive()&&!f.current&&u.current&&(console.log("gsap on start 0020",p,N,L),u.current.play(),i.current.isPlaying=!0)},A=()=>{var N;n.current&&((N=u.current)==null||N.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=N=>{var k,D;const L=N+((k=a.current)==null?void 0:k.time());u.current&&f.current?(u.current.seek(L),u.current.pause(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&((D=l.current)!=null&&D.isActive())&&u.current&&(u.current.seek(L),u.current.play(),i.current.isPlaying=!0)},O=()=>{};return W.useEffect(()=>{let N=xt.context(()=>{});if(n.current&&l.current){const L={duration:Number(x)-Number(b),onStart:E,onComplete:A,onStartParams:[b,x],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[b,x]};N=xt.context(()=>{a.current=xt.from(n.current,L,b),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(),xt.killTweensOf(a.current)),N.revert()}},[c,d,b,x]),ne.useEffect(()=>{n.current&&r(!0)},[]),ne.useEffect(()=>($s(v)||(u.current=new Dp.Howl({src:[v],autoplay:!1,loop:!1,rate:_||1,volume:!m&&w?1:0,onload:()=>{console.log("loaded audio sprite"+p),i.current.loaded=!0,u.current&&(b>0&&u.current.seek(b),u.current.volume(!m&&w?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,v,c,d,b,x,m,w,_]),ne.useEffect(()=>{u.current&&(console.log("running updateEffect 2002",p,x),u.current.volume(!m&&w?1:0),u.current.rate(_||1),i.current.isPlaying=!0)},[m,w,_]),Ee.jsx(Xe.Container,{ref:n})};function oE(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 Up=oE;function uE(){this.__data__=[],this.size=0}var lE=uE;function cE(t,e){return t===e||t!==t&&e!==e}var $p=cE,hE=$p;function fE(t,e){for(var r=t.length;r--;)if(hE(t[r][0],e))return r;return-1}var Da=fE,dE=Da,pE=Array.prototype,gE=pE.splice;function mE(t){var e=this.__data__,r=dE(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():gE.call(e,r,1),--this.size,!0}var vE=mE,_E=Da;function yE(t){var e=this.__data__,r=_E(e,t);return r<0?void 0:e[r][1]}var xE=yE,bE=Da;function wE(t){return bE(this.__data__,t)>-1}var TE=wE,SE=Da;function AE(t,e){var r=this.__data__,n=SE(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var EE=AE,CE=lE,IE=vE,RE=xE,PE=TE,ME=EE;function Si(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])}}Si.prototype.clear=CE,Si.prototype.delete=IE,Si.prototype.get=RE,Si.prototype.has=PE,Si.prototype.set=ME;var Ua=Si,OE=Ua;function FE(){this.__data__=new OE,this.size=0}var NE=FE;function LE(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var kE=LE;function BE(t){return this.__data__.get(t)}var DE=BE;function UE(t){return this.__data__.has(t)}var $E=UE,GE=Yn,zE=GE(Object,"create"),$a=zE,Gp=$a;function HE(){this.__data__=Gp?Gp(null):{},this.size=0}var VE=HE;function XE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var jE=XE,WE=$a,qE="__lodash_hash_undefined__",YE=Object.prototype,KE=YE.hasOwnProperty;function ZE(t){var e=this.__data__;if(WE){var r=e[t];return r===qE?void 0:r}return KE.call(e,t)?e[t]:void 0}var QE=ZE,JE=$a,eC=Object.prototype,tC=eC.hasOwnProperty;function rC(t){var e=this.__data__;return JE?e[t]!==void 0:tC.call(e,t)}var nC=rC,iC=$a,sC="__lodash_hash_undefined__";function aC(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=iC&&e===void 0?sC:e,this}var oC=aC,uC=VE,lC=jE,cC=QE,hC=nC,fC=oC;function Ai(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])}}Ai.prototype.clear=uC,Ai.prototype.delete=lC,Ai.prototype.get=cC,Ai.prototype.has=hC,Ai.prototype.set=fC;var dC=Ai,zp=dC,pC=Ua,gC=zo;function mC(){this.size=0,this.__data__={hash:new zp,map:new(gC||pC),string:new zp}}var vC=mC;function _C(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var yC=_C,xC=yC;function bC(t,e){var r=t.__data__;return xC(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ga=bC,wC=Ga;function TC(t){var e=wC(this,t).delete(t);return this.size-=e?1:0,e}var SC=TC,AC=Ga;function EC(t){return AC(this,t).get(t)}var CC=EC,IC=Ga;function RC(t){return IC(this,t).has(t)}var PC=RC,MC=Ga;function OC(t,e){var r=MC(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var FC=OC,NC=vC,LC=SC,kC=CC,BC=PC,DC=FC;function Ei(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])}}Ei.prototype.clear=NC,Ei.prototype.delete=LC,Ei.prototype.get=kC,Ei.prototype.has=BC,Ei.prototype.set=DC;var Ol=Ei,UC=Ua,$C=zo,GC=Ol,zC=200;function HC(t,e){var r=this.__data__;if(r instanceof UC){var n=r.__data__;if(!$C||n.length<zC-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new GC(n)}return r.set(t,e),this.size=r.size,this}var VC=HC,XC=Ua,jC=NE,WC=kE,qC=DE,YC=$E,KC=VC;function Ci(t){var e=this.__data__=new XC(t);this.size=e.size}Ci.prototype.clear=jC,Ci.prototype.delete=WC,Ci.prototype.get=qC,Ci.prototype.has=YC,Ci.prototype.set=KC;var Hp=Ci,ZC="__lodash_hash_undefined__";function QC(t){return this.__data__.set(t,ZC),this}var JC=QC;function e2(t){return this.__data__.has(t)}var t2=e2,r2=Ol,n2=JC,i2=t2;function za(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new r2;++e<r;)this.add(t[e])}za.prototype.add=za.prototype.push=n2,za.prototype.has=i2;var s2=za;function a2(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 o2=a2;function u2(t,e){return t.has(e)}var l2=u2,c2=s2,h2=o2,f2=l2,d2=1,p2=2;function g2(t,e,r,n,i,a){var u=r&d2,l=t.length,f=e.length;if(l!=f&&!(u&&f>l))return!1;var p=a.get(t),v=a.get(e);if(p&&v)return p==e&&v==t;var c=-1,d=!0,m=r&p2?new c2:void 0;for(a.set(t,e),a.set(e,t);++c<l;){var _=t[c],b=e[c];if(n)var x=u?n(b,_,c,e,t,a):n(_,b,c,t,e,a);if(x!==void 0){if(x)continue;d=!1;break}if(m){if(!h2(e,function(w,E){if(!f2(m,E)&&(_===w||i(_,w,r,n,a)))return m.push(E)})){d=!1;break}}else if(!(_===b||i(_,b,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var Vp=g2,m2=Er,v2=m2.Uint8Array,_2=v2;function y2(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var x2=y2;function b2(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var w2=b2,Xp=ks,jp=_2,T2=$p,S2=Vp,A2=x2,E2=w2,C2=1,I2=2,R2="[object Boolean]",P2="[object Date]",M2="[object Error]",O2="[object Map]",F2="[object Number]",N2="[object RegExp]",L2="[object Set]",k2="[object String]",B2="[object Symbol]",D2="[object ArrayBuffer]",U2="[object DataView]",Wp=Xp?Xp.prototype:void 0,Fl=Wp?Wp.valueOf:void 0;function $2(t,e,r,n,i,a,u){switch(r){case U2:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case D2:return!(t.byteLength!=e.byteLength||!a(new jp(t),new jp(e)));case R2:case P2:case F2:return T2(+t,+e);case M2:return t.name==e.name&&t.message==e.message;case N2:case k2:return t==e+"";case O2:var l=A2;case L2:var f=n&C2;if(l||(l=E2),t.size!=e.size&&!f)return!1;var p=u.get(t);if(p)return p==e;n|=I2,u.set(t,e);var v=S2(l(t),l(e),n,i,a,u);return u.delete(t),v;case B2:if(Fl)return Fl.call(t)==Fl.call(e)}return!1}var G2=$2;function z2(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var H2=z2,V2=H2,X2=Cr;function j2(t,e,r){var n=e(t);return X2(t)?n:V2(n,r(t))}var W2=j2;function q2(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 Y2=q2;function K2(){return[]}var Z2=K2,Q2=Y2,J2=Z2,eI=Object.prototype,tI=eI.propertyIsEnumerable,qp=Object.getOwnPropertySymbols,rI=qp?function(t){return t==null?[]:(t=Object(t),Q2(qp(t),function(e){return tI.call(t,e)}))}:J2,nI=rI;function iI(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var sI=iI,aI=9007199254740991,oI=/^(?:0|[1-9]\d*)$/;function uI(t,e){var r=typeof t;return e=e??aI,!!e&&(r=="number"||r!="symbol"&&oI.test(t))&&t>-1&&t%1==0&&t<e}var Yp=uI,lI=sI,cI=qo,hI=Cr,fI=Ko,dI=Yp,pI=Zo,gI=Object.prototype,mI=gI.hasOwnProperty;function vI(t,e){var r=hI(t),n=!r&&cI(t),i=!r&&!n&&fI(t),a=!r&&!n&&!i&&pI(t),u=r||n||i||a,l=u?lI(t.length,String):[],f=l.length;for(var p in t)(e||mI.call(t,p))&&!(u&&(p=="length"||i&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||dI(p,f)))&&l.push(p);return l}var _I=vI,yI=_I,xI=dh,bI=Bs;function wI(t){return bI(t)?yI(t):xI(t)}var Nl=wI,TI=W2,SI=nI,AI=Nl;function EI(t){return TI(t,AI,SI)}var CI=EI,Kp=CI,II=1,RI=Object.prototype,PI=RI.hasOwnProperty;function MI(t,e,r,n,i,a){var u=r&II,l=Kp(t),f=l.length,p=Kp(e),v=p.length;if(f!=v&&!u)return!1;for(var c=f;c--;){var d=l[c];if(!(u?d in e:PI.call(e,d)))return!1}var m=a.get(t),_=a.get(e);if(m&&_)return m==e&&_==t;var b=!0;a.set(t,e),a.set(e,t);for(var x=u;++c<f;){d=l[c];var w=t[d],E=e[d];if(n)var A=u?n(E,w,d,e,t,a):n(w,E,d,t,e,a);if(!(A===void 0?w===E||i(w,E,r,n,a):A)){b=!1;break}x||(x=d=="constructor")}if(b&&!x){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)&&(b=!1)}return a.delete(t),a.delete(e),b}var OI=MI,Ll=Hp,FI=Vp,NI=G2,LI=OI,Zp=Ih,Qp=Cr,Jp=Ko,kI=Zo,BI=1,eg="[object Arguments]",tg="[object Array]",Ha="[object Object]",DI=Object.prototype,rg=DI.hasOwnProperty;function UI(t,e,r,n,i,a){var u=Qp(t),l=Qp(e),f=u?tg:Zp(t),p=l?tg:Zp(e);f=f==eg?Ha:f,p=p==eg?Ha:p;var v=f==Ha,c=p==Ha,d=f==p;if(d&&Jp(t)){if(!Jp(e))return!1;u=!0,v=!1}if(d&&!v)return a||(a=new Ll),u||kI(t)?FI(t,e,r,n,i,a):NI(t,e,f,r,n,i,a);if(!(r&BI)){var m=v&&rg.call(t,"__wrapped__"),_=c&&rg.call(e,"__wrapped__");if(m||_){var b=m?t.value():t,x=_?e.value():e;return a||(a=new Ll),i(b,x,r,n,a)}}return d?(a||(a=new Ll),LI(t,e,r,n,i,a)):!1}var $I=UI,GI=$I,ng=Wi;function ig(t,e,r,n,i){return t===e?!0:t==null||e==null||!ng(t)&&!ng(e)?t!==t&&e!==e:GI(t,e,r,n,ig,i)}var sg=ig,zI=Hp,HI=sg,VI=1,XI=2;function jI(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],v=l[1];if(u&&l[2]){if(p===void 0&&!(f in t))return!1}else{var c=new zI;if(n)var d=n(p,v,f,t,e,c);if(!(d===void 0?HI(v,p,VI|XI,n,c):d))return!1}}return!0}var WI=jI,qI=ji;function YI(t){return t===t&&!qI(t)}var ag=YI,KI=ag,ZI=Nl;function QI(t){for(var e=ZI(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,KI(i)]}return e}var JI=QI;function eR(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var og=eR,tR=WI,rR=JI,nR=og;function iR(t){var e=rR(t);return e.length==1&&e[0][2]?nR(e[0][0],e[0][1]):function(r){return r===t||tR(r,t,e)}}var sR=iR,aR=Xi,oR=Wi,uR="[object Symbol]";function lR(t){return typeof t=="symbol"||oR(t)&&aR(t)==uR}var Va=lR,cR=Cr,hR=Va,fR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dR=/^\w*$/;function pR(t,e){if(cR(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||hR(t)?!0:dR.test(t)||!fR.test(t)||e!=null&&t in Object(e)}var kl=pR,ug=Ol,gR="Expected a function";function Bl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(gR);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(Bl.Cache||ug),r}Bl.Cache=ug;var mR=Bl,vR=mR,_R=500;function yR(t){var e=vR(t,function(n){return r.size===_R&&r.clear(),n}),r=e.cache;return e}var xR=yR,bR=xR,wR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,TR=/\\(\\)?/g,SR=bR(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(wR,function(r,n,i,a){e.push(i?a.replace(TR,"$1"):n||r)}),e}),AR=SR,lg=ks,ER=Up,CR=Cr,IR=Va,RR=1/0,cg=lg?lg.prototype:void 0,hg=cg?cg.toString:void 0;function fg(t){if(typeof t=="string")return t;if(CR(t))return ER(t,fg)+"";if(IR(t))return hg?hg.call(t):"";var e=t+"";return e=="0"&&1/t==-RR?"-0":e}var PR=fg,MR=PR;function OR(t){return t==null?"":MR(t)}var FR=OR,NR=Cr,LR=kl,kR=AR,BR=FR;function DR(t,e){return NR(t)?t:LR(t,e)?[t]:kR(BR(t))}var dg=DR,UR=Va,$R=1/0;function GR(t){if(typeof t=="string"||UR(t))return t;var e=t+"";return e=="0"&&1/t==-$R?"-0":e}var Xa=GR,zR=dg,HR=Xa;function VR(t,e){e=zR(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[HR(e[r++])];return r&&r==n?t:void 0}var pg=VR,XR=pg;function jR(t,e,r){var n=t==null?void 0:XR(t,e);return n===void 0?r:n}var WR=jR;function qR(t,e){return t!=null&&e in Object(t)}var YR=qR,KR=dg,ZR=qo,QR=Cr,JR=Yp,eP=Yo,tP=Xa;function rP(t,e,r){e=KR(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var u=tP(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&&eP(i)&&JR(u,i)&&(QR(t)||ZR(t)))}var nP=rP,iP=YR,sP=nP;function aP(t,e){return t!=null&&sP(t,e,iP)}var oP=aP,uP=sg,lP=WR,cP=oP,hP=kl,fP=ag,dP=og,pP=Xa,gP=1,mP=2;function vP(t,e){return hP(t)&&fP(e)?dP(pP(t),e):function(r){var n=lP(r,t);return n===void 0&&n===e?cP(r,t):uP(e,n,gP|mP)}}var _P=vP;function yP(t){return t}var xP=yP;function bP(t){return function(e){return e==null?void 0:e[t]}}var wP=bP,TP=pg;function SP(t){return function(e){return TP(e,t)}}var AP=SP,EP=wP,CP=AP,IP=kl,RP=Xa;function PP(t){return IP(t)?EP(RP(t)):CP(t)}var MP=PP,OP=sR,FP=_P,NP=xP,LP=Cr,kP=MP;function BP(t){return typeof t=="function"?t:t==null?NP:typeof t=="object"?LP(t)?FP(t[0],t[1]):OP(t):kP(t)}var DP=BP;function UP(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 $P=UP,GP=$P,zP=GP(),HP=zP,VP=HP,XP=Nl;function jP(t,e){return t&&VP(t,e,XP)}var WP=jP,qP=Bs;function YP(t,e){return function(r,n){if(r==null)return r;if(!qP(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 KP=YP,ZP=WP,QP=KP,JP=QP(ZP),eM=JP,tM=eM,rM=Bs;function nM(t,e){var r=-1,n=rM(t)?Array(t.length):[];return tM(t,function(i,a,u){n[++r]=e(i,a,u)}),n}var iM=nM,sM=Up,aM=DP,oM=iM,uM=Cr;function lM(t,e){var r=uM(t)?sM:oM;return r(t,aM(e))}var cM=lM;const hM=Wn(cM);var Bn={},gg={},zr={};Object.defineProperty(zr,"__esModule",{value:!0}),zr.loop=zr.conditional=zr.parse=void 0;var fM=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};zr.parse=fM;var dM=function(e,r){return function(n,i,a,u){r(n,i,a)&&u(n,e,i,a)}};zr.conditional=dM;var pM=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}};zr.loop=pM;var ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.readBits=ft.readArray=ft.readUnsigned=ft.readString=ft.peekBytes=ft.readBytes=ft.peekByte=ft.readByte=ft.buildStream=void 0;var gM=function(e){return{data:e,pos:0}};ft.buildStream=gM;var mg=function(){return function(e){return e.data[e.pos++]}};ft.readByte=mg;var mM=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};ft.peekByte=mM;var ja=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};ft.readBytes=ja;var vM=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};ft.peekBytes=vM;var _M=function(e){return function(r){return Array.from(ja(e)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};ft.readString=_M;var yM=function(e){return function(r){var n=ja(2)(r);return e?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};ft.readUnsigned=yM;var xM=function(e,r){return function(n,i,a){for(var u=typeof r=="function"?r(n,i,a):r,l=ja(e),f=new Array(u),p=0;p<u;p++)f[p]=l(n);return f}};ft.readArray=xM;var bM=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},wM=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]=bM(i,f.index,f.length):u[l]=i[f.index],u},{})}};ft.readBits=wM,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=zr,r=ft,n={blocks:function(d){for(var m=0,_=[],b=d.data.length,x=0,w=(0,r.readByte)()(d);w!==m&&w;w=(0,r.readByte)()(d)){if(d.pos+w>=b){var E=b-d.pos;_.push((0,r.readBytes)(E)(d)),x+=E;break}_.push((0,r.readBytes)(w)(d)),x+=w}for(var A=new Uint8Array(x),I=0,O=0;O<_.length;O++)A.set(_[O],I),I+=_[O].length;return A}},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})}],v=p;t.default=v}(gg);var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.deinterlace=void 0;var TM=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 v=u[p];v<i;v+=l[p])a(v,f),f++;return n};Wa.deinterlace=TM;var qa={};Object.defineProperty(qa,"__esModule",{value:!0}),qa.lzw=void 0;var SM=function(e,r,n){var i=4096,a=-1,u=n,l,f,p,v,c,d,m,N,_,b,O,x,L,k,j,D,w=new Array(n),E=new Array(i),A=new Array(i),I=new Array(i+1);for(x=e,f=1<<x,c=f+1,l=f+2,m=a,v=x+1,p=(1<<v)-1,_=0;_<f;_++)E[_]=0,A[_]=_;var O,N,L,k,D,j;for(O=N=L=k=D=j=0,b=0;b<u;){if(k===0){if(N<v){O+=r[j]<<N,N+=8,j++;continue}if(_=O&p,O>>=v,N-=v,_>l||_==c)break;if(_==f){v=x+1,p=(1<<v)-1,l=f+2,m=a;continue}if(m==a){I[k++]=A[_],m=_,L=_;continue}for(d=_,_==l&&(I[k++]=L,_=m);_>f;)I[k++]=A[_],_=E[_];L=A[_]&255,I[k++]=L,l<i&&(E[l]=m,A[l]=L,l++,!(l&p)&&l<i&&(v++,p+=l)),m=d}k--,w[D++]=I[k],b++}for(b=D;b<u;b++)w[b]=0;return w};qa.lzw=SM,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.decompressFrames=Bn.decompressFrame=Bn.parseGIF=void 0;var AM=PM(gg),EM=zr,CM=ft,IM=Wa,RM=qa;function PM(t){return t&&t.__esModule?t:{default:t}}var MM=function(e){var r=new Uint8Array(e);return(0,EM.parse)((0,CM.buildStream)(r),AM.default)};Bn.parseGIF=MM;var OM=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},vg=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,RM.lzw)(i.data.minCodeSize,i.data.blocks,a);i.descriptor.lct.interlaced&&(u=(0,IM.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=OM(l)),l};Bn.decompressFrame=vg;var FM=function(e,r){return e.frames.filter(function(n){return n.image}).map(function(n){return vg(n,e.gct,r)})};Bn.decompressFrames=FM;const _g=(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},NM=t=>_g({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),LM=t=>W.useReducer(_g,t,NM);var kM='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 BM(t){const e=new Blob([kM],{type:"application/javascript"}),r=URL.createObjectURL(e),n=new Worker(r,t);return URL.revokeObjectURL(r),n}const DM=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),UM=(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)},$M=t=>{const e=W.useRef(t);return W.useEffect(()=>{e.current=t},[t]),e},GM=t=>{const e=$M(t);return W.useCallback(r=>e.current&&e.current(r),[])},zM=UM(()=>new BM,t=>t.terminate()),HM=(t,e)=>{const r=GM(e),n=zM();W.useEffect(()=>{if(typeof t=="string"){const i=a=>{const u=a.data||a;if(u.src===t){const l=u.error?u:DM(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])},VM=({isPlaying:t,forwardRef:e,...r})=>{const n=ne.useRef(null);return ne.useImperativeHandle(e,()=>n.current,[n]),ne.useEffect(()=>{if(n.current===null)return;const i=n.current;i[t?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[t]),Ee.jsx(Xe.AnimatedSprite,{ref:n,...r,isPlaying:t})},yg=ne.memo(VM);var Ya={exports:{}};/**
1967
1967
  * @license
1968
1968
  * Lodash <https://lodash.com/>
1969
1969
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1970
1970
  * Released under MIT license <https://lodash.com/license>
1971
1971
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1972
1972
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1973
- */Ya.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,v="__lodash_placeholder__",c=1,d=2,m=4,_=1,x=2,b=1,w=2,E=4,A=8,I=16,O=32,N=64,L=128,k=256,D=512,j=30,Q="...",fe=800,H=16,V=1,le=2,ve=3,z=1/0,ee=9007199254740991,pe=17976931348623157e292,X=0/0,Y=4294967295,ce=Y-1,Se=Y>>>1,xe=[["ary",L],["bind",b],["bindKey",w],["curry",A],["curryRight",I],["flip",D],["partial",O],["partialRight",N],["rearg",k]],Me="[object Arguments]",Oe="[object Array]",Ge="[object AsyncFunction]",ze="[object Boolean]",Ke="[object Date]",Ze="[object DOMException]",be="[object Error]",De="[object Function]",Qe="[object GeneratorFunction]",Je="[object Map]",Le="[object Number]",J="[object Null]",se="[object Object]",ut="[object Promise]",rr="[object Proxy]",Ot="[object RegExp]",mt="[object Set]",Hr="[object String]",Ii="[object Symbol]",Ul="[object Undefined]",Bt="[object WeakMap]",Rg="[object WeakSet]",ys="[object ArrayBuffer]",Ri="[object DataView]",$l="[object Float32Array]",Gl="[object Float64Array]",zl="[object Int8Array]",Hl="[object Int16Array]",Vl="[object Int32Array]",Xl="[object Uint8Array]",jl="[object Uint8ClampedArray]",Wl="[object Uint16Array]",ql="[object Uint32Array]",bO=/\b__p \+= '';/g,wO=/\b(__p \+=) '' \+/g,TO=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Pg=/&(?:amp|lt|gt|quot|#39);/g,Mg=/[&<>"']/g,SO=RegExp(Pg.source),AO=RegExp(Mg.source),EO=/<%-([\s\S]+?)%>/g,CO=/<%([\s\S]+?)%>/g,Og=/<%=([\s\S]+?)%>/g,IO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,RO=/^\w*$/,PO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yl=/[\\^$.*+?()[\]{}|]/g,MO=RegExp(Yl.source),Kl=/^\s+/,OO=/\s/,FO=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,NO=/\{\n\/\* \[wrapped with (.+)\] \*/,LO=/,? & /,kO=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BO=/[()=,{}\[\]\/\s]/,DO=/\\(\\)?/g,UO=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fg=/\w*$/,$O=/^[-+]0x[0-9a-f]+$/i,GO=/^0b[01]+$/i,zO=/^\[object .+?Constructor\]$/,HO=/^0o[0-7]+$/i,VO=/^(?:0|[1-9]\d*)$/,XO=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Za=/($^)/,jO=/['\n\r\u2028\u2029\\]/g,Qa="\\ud800-\\udfff",WO="\\u0300-\\u036f",qO="\\ufe20-\\ufe2f",YO="\\u20d0-\\u20ff",Ng=WO+qO+YO,Lg="\\u2700-\\u27bf",kg="a-z\\xdf-\\xf6\\xf8-\\xff",KO="\\xac\\xb1\\xd7\\xf7",ZO="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",QO="\\u2000-\\u206f",JO=" \\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",Bg="A-Z\\xc0-\\xd6\\xd8-\\xde",Dg="\\ufe0e\\ufe0f",Ug=KO+ZO+QO+JO,Zl="['’]",eF="["+Qa+"]",$g="["+Ug+"]",Ja="["+Ng+"]",Gg="\\d+",tF="["+Lg+"]",zg="["+kg+"]",Hg="[^"+Qa+Ug+Gg+Lg+kg+Bg+"]",Ql="\\ud83c[\\udffb-\\udfff]",rF="(?:"+Ja+"|"+Ql+")",Vg="[^"+Qa+"]",Jl="(?:\\ud83c[\\udde6-\\uddff]){2}",ec="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+Bg+"]",Xg="\\u200d",jg="(?:"+zg+"|"+Hg+")",nF="(?:"+Pi+"|"+Hg+")",Wg="(?:"+Zl+"(?:d|ll|m|re|s|t|ve))?",qg="(?:"+Zl+"(?:D|LL|M|RE|S|T|VE))?",Yg=rF+"?",Kg="["+Dg+"]?",iF="(?:"+Xg+"(?:"+[Vg,Jl,ec].join("|")+")"+Kg+Yg+")*",sF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",aF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zg=Kg+Yg+iF,oF="(?:"+[tF,Jl,ec].join("|")+")"+Zg,uF="(?:"+[Vg+Ja+"?",Ja,Jl,ec,eF].join("|")+")",lF=RegExp(Zl,"g"),cF=RegExp(Ja,"g"),tc=RegExp(Ql+"(?="+Ql+")|"+uF+Zg,"g"),hF=RegExp([Pi+"?"+zg+"+"+Wg+"(?="+[$g,Pi,"$"].join("|")+")",nF+"+"+qg+"(?="+[$g,Pi+jg,"$"].join("|")+")",Pi+"?"+jg+"+"+Wg,Pi+"+"+qg,aF,sF,Gg,oF].join("|"),"g"),fF=RegExp("["+Xg+Qa+Ng+Dg+"]"),dF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pF=["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"],gF=-1,rt={};rt[$l]=rt[Gl]=rt[zl]=rt[Hl]=rt[Vl]=rt[Xl]=rt[jl]=rt[Wl]=rt[ql]=!0,rt[Me]=rt[Oe]=rt[ys]=rt[ze]=rt[Ri]=rt[Ke]=rt[be]=rt[De]=rt[Je]=rt[Le]=rt[se]=rt[Ot]=rt[mt]=rt[Hr]=rt[Bt]=!1;var et={};et[Me]=et[Oe]=et[ys]=et[Ri]=et[ze]=et[Ke]=et[$l]=et[Gl]=et[zl]=et[Hl]=et[Vl]=et[Je]=et[Le]=et[se]=et[Ot]=et[mt]=et[Hr]=et[Ii]=et[Xl]=et[jl]=et[Wl]=et[ql]=!0,et[be]=et[De]=et[Bt]=!1;var mF={À:"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"},vF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_F={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xF=parseFloat,bF=parseInt,Qg=typeof At=="object"&&At&&At.Object===Object&&At,wF=typeof self=="object"&&self&&self.Object===Object&&self,Ct=Qg||wF||Function("return this")(),rc=e&&!e.nodeType&&e,Dn=rc&&!0&&t&&!t.nodeType&&t,Jg=Dn&&Dn.exports===rc,nc=Jg&&Qg.process,nr=function(){try{var P=Dn&&Dn.require&&Dn.require("util").types;return P||nc&&nc.binding&&nc.binding("util")}catch{}}(),em=nr&&nr.isArrayBuffer,tm=nr&&nr.isDate,rm=nr&&nr.isMap,nm=nr&&nr.isRegExp,im=nr&&nr.isSet,sm=nr&&nr.isTypedArray;function Wt(P,B,F){switch(F.length){case 0:return P.call(B);case 1:return P.call(B,F[0]);case 2:return P.call(B,F[0],F[1]);case 3:return P.call(B,F[0],F[1],F[2])}return P.apply(B,F)}function TF(P,B,F,Z){for(var he=-1,ke=P==null?0:P.length;++he<ke;){var _t=P[he];B(Z,_t,F(_t),P)}return Z}function ir(P,B){for(var F=-1,Z=P==null?0:P.length;++F<Z&&B(P[F],F,P)!==!1;);return P}function SF(P,B){for(var F=P==null?0:P.length;F--&&B(P[F],F,P)!==!1;);return P}function am(P,B){for(var F=-1,Z=P==null?0:P.length;++F<Z;)if(!B(P[F],F,P))return!1;return!0}function un(P,B){for(var F=-1,Z=P==null?0:P.length,he=0,ke=[];++F<Z;){var _t=P[F];B(_t,F,P)&&(ke[he++]=_t)}return ke}function eo(P,B){var F=P==null?0:P.length;return!!F&&Mi(P,B,0)>-1}function ic(P,B,F){for(var Z=-1,he=P==null?0:P.length;++Z<he;)if(F(B,P[Z]))return!0;return!1}function it(P,B){for(var F=-1,Z=P==null?0:P.length,he=Array(Z);++F<Z;)he[F]=B(P[F],F,P);return he}function ln(P,B){for(var F=-1,Z=B.length,he=P.length;++F<Z;)P[he+F]=B[F];return P}function sc(P,B,F,Z){var he=-1,ke=P==null?0:P.length;for(Z&&ke&&(F=P[++he]);++he<ke;)F=B(F,P[he],he,P);return F}function AF(P,B,F,Z){var he=P==null?0:P.length;for(Z&&he&&(F=P[--he]);he--;)F=B(F,P[he],he,P);return F}function ac(P,B){for(var F=-1,Z=P==null?0:P.length;++F<Z;)if(B(P[F],F,P))return!0;return!1}var EF=oc("length");function CF(P){return P.split("")}function IF(P){return P.match(kO)||[]}function om(P,B,F){var Z;return F(P,function(he,ke,_t){if(B(he,ke,_t))return Z=ke,!1}),Z}function to(P,B,F,Z){for(var he=P.length,ke=F+(Z?1:-1);Z?ke--:++ke<he;)if(B(P[ke],ke,P))return ke;return-1}function Mi(P,B,F){return B===B?$F(P,B,F):to(P,um,F)}function RF(P,B,F,Z){for(var he=F-1,ke=P.length;++he<ke;)if(Z(P[he],B))return he;return-1}function um(P){return P!==P}function lm(P,B){var F=P==null?0:P.length;return F?lc(P,B)/F:X}function oc(P){return function(B){return B==null?r:B[P]}}function uc(P){return function(B){return P==null?r:P[B]}}function cm(P,B,F,Z,he){return he(P,function(ke,_t,qe){F=Z?(Z=!1,ke):B(F,ke,_t,qe)}),F}function PF(P,B){var F=P.length;for(P.sort(B);F--;)P[F]=P[F].value;return P}function lc(P,B){for(var F,Z=-1,he=P.length;++Z<he;){var ke=B(P[Z]);ke!==r&&(F=F===r?ke:F+ke)}return F}function cc(P,B){for(var F=-1,Z=Array(P);++F<P;)Z[F]=B(F);return Z}function MF(P,B){return it(B,function(F){return[F,P[F]]})}function hm(P){return P&&P.slice(0,gm(P)+1).replace(Kl,"")}function qt(P){return function(B){return P(B)}}function hc(P,B){return it(B,function(F){return P[F]})}function xs(P,B){return P.has(B)}function fm(P,B){for(var F=-1,Z=P.length;++F<Z&&Mi(B,P[F],0)>-1;);return F}function dm(P,B){for(var F=P.length;F--&&Mi(B,P[F],0)>-1;);return F}function OF(P,B){for(var F=P.length,Z=0;F--;)P[F]===B&&++Z;return Z}var FF=uc(mF),NF=uc(vF);function LF(P){return"\\"+yF[P]}function kF(P,B){return P==null?r:P[B]}function Oi(P){return fF.test(P)}function BF(P){return dF.test(P)}function DF(P){for(var B,F=[];!(B=P.next()).done;)F.push(B.value);return F}function fc(P){var B=-1,F=Array(P.size);return P.forEach(function(Z,he){F[++B]=[he,Z]}),F}function pm(P,B){return function(F){return P(B(F))}}function cn(P,B){for(var F=-1,Z=P.length,he=0,ke=[];++F<Z;){var _t=P[F];(_t===B||_t===v)&&(P[F]=v,ke[he++]=F)}return ke}function ro(P){var B=-1,F=Array(P.size);return P.forEach(function(Z){F[++B]=Z}),F}function UF(P){var B=-1,F=Array(P.size);return P.forEach(function(Z){F[++B]=[Z,Z]}),F}function $F(P,B,F){for(var Z=F-1,he=P.length;++Z<he;)if(P[Z]===B)return Z;return-1}function GF(P,B,F){for(var Z=F+1;Z--;)if(P[Z]===B)return Z;return Z}function Fi(P){return Oi(P)?HF(P):EF(P)}function wr(P){return Oi(P)?VF(P):CF(P)}function gm(P){for(var B=P.length;B--&&OO.test(P.charAt(B)););return B}var zF=uc(_F);function HF(P){for(var B=tc.lastIndex=0;tc.test(P);)++B;return B}function VF(P){return P.match(tc)||[]}function XF(P){return P.match(hF)||[]}var jF=function P(B){B=B==null?Ct:Ni.defaults(Ct.Object(),B,Ni.pick(Ct,pF));var F=B.Array,Z=B.Date,he=B.Error,ke=B.Function,_t=B.Math,qe=B.Object,dc=B.RegExp,WF=B.String,sr=B.TypeError,no=F.prototype,qF=ke.prototype,Li=qe.prototype,io=B["__core-js_shared__"],so=qF.toString,He=Li.hasOwnProperty,YF=0,mm=function(){var s=/[^.]+$/.exec(io&&io.keys&&io.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ao=Li.toString,KF=so.call(qe),ZF=Ct._,QF=dc("^"+so.call(He).replace(Yl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oo=Jg?B.Buffer:r,hn=B.Symbol,uo=B.Uint8Array,vm=oo?oo.allocUnsafe:r,lo=pm(qe.getPrototypeOf,qe),_m=qe.create,ym=Li.propertyIsEnumerable,co=no.splice,xm=hn?hn.isConcatSpreadable:r,bs=hn?hn.iterator:r,Un=hn?hn.toStringTag:r,ho=function(){try{var s=Vn(qe,"defineProperty");return s({},"",{}),s}catch{}}(),JF=B.clearTimeout!==Ct.clearTimeout&&B.clearTimeout,e3=Z&&Z.now!==Ct.Date.now&&Z.now,t3=B.setTimeout!==Ct.setTimeout&&B.setTimeout,fo=_t.ceil,po=_t.floor,pc=qe.getOwnPropertySymbols,r3=oo?oo.isBuffer:r,bm=B.isFinite,n3=no.join,i3=pm(qe.keys,qe),yt=_t.max,Ft=_t.min,s3=Z.now,a3=B.parseInt,wm=_t.random,o3=no.reverse,gc=Vn(B,"DataView"),ws=Vn(B,"Map"),mc=Vn(B,"Promise"),ki=Vn(B,"Set"),Ts=Vn(B,"WeakMap"),Ss=Vn(qe,"create"),go=Ts&&new Ts,Bi={},u3=Xn(gc),l3=Xn(ws),c3=Xn(mc),h3=Xn(ki),f3=Xn(Ts),mo=hn?hn.prototype:r,As=mo?mo.valueOf:r,Tm=mo?mo.toString:r;function T(s){if(ht(s)&&!de(s)&&!(s instanceof Ae)){if(s instanceof ar)return s;if(He.call(s,"__wrapped__"))return S0(s)}return new ar(s)}var Di=function(){function s(){}return function(o){if(!lt(o))return{};if(_m)return _m(o);s.prototype=o;var h=new s;return s.prototype=r,h}}();function vo(){}function ar(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}T.templateSettings={escape:EO,evaluate:CO,interpolate:Og,variable:"",imports:{_:T}},T.prototype=vo.prototype,T.prototype.constructor=T,ar.prototype=Di(vo.prototype),ar.prototype.constructor=ar;function Ae(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Y,this.__views__=[]}function d3(){var s=new Ae(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 p3(){if(this.__filtered__){var s=new Ae(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function g3(){var s=this.__wrapped__.value(),o=this.__dir__,h=de(s),g=o<0,y=h?s.length:0,S=CN(0,y,this.__views__),C=S.start,R=S.end,M=R-C,U=g?R:C-1,$=this.__iteratees__,G=$.length,q=0,te=Ft(M,this.__takeCount__);if(!h||!g&&y==M&&te==M)return Wm(s,this.__actions__);var ae=[];e:for(;M--&&q<te;){U+=o;for(var me=-1,oe=s[U];++me<G;){var we=$[me],Ie=we.iteratee,Zt=we.type,$t=Ie(oe);if(Zt==le)oe=$t;else if(!$t){if(Zt==V)continue e;break e}}ae[q++]=oe}return ae}Ae.prototype=Di(vo.prototype),Ae.prototype.constructor=Ae;function $n(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var g=s[o];this.set(g[0],g[1])}}function m3(){this.__data__=Ss?Ss(null):{},this.size=0}function v3(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function _3(s){var o=this.__data__;if(Ss){var h=o[s];return h===f?r:h}return He.call(o,s)?o[s]:r}function y3(s){var o=this.__data__;return Ss?o[s]!==r:He.call(o,s)}function x3(s,o){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Ss&&o===r?f:o,this}$n.prototype.clear=m3,$n.prototype.delete=v3,$n.prototype.get=_3,$n.prototype.has=y3,$n.prototype.set=x3;function Vr(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var g=s[o];this.set(g[0],g[1])}}function b3(){this.__data__=[],this.size=0}function w3(s){var o=this.__data__,h=_o(o,s);if(h<0)return!1;var g=o.length-1;return h==g?o.pop():co.call(o,h,1),--this.size,!0}function T3(s){var o=this.__data__,h=_o(o,s);return h<0?r:o[h][1]}function S3(s){return _o(this.__data__,s)>-1}function A3(s,o){var h=this.__data__,g=_o(h,s);return g<0?(++this.size,h.push([s,o])):h[g][1]=o,this}Vr.prototype.clear=b3,Vr.prototype.delete=w3,Vr.prototype.get=T3,Vr.prototype.has=S3,Vr.prototype.set=A3;function Xr(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var g=s[o];this.set(g[0],g[1])}}function E3(){this.size=0,this.__data__={hash:new $n,map:new(ws||Vr),string:new $n}}function C3(s){var o=Po(this,s).delete(s);return this.size-=o?1:0,o}function I3(s){return Po(this,s).get(s)}function R3(s){return Po(this,s).has(s)}function P3(s,o){var h=Po(this,s),g=h.size;return h.set(s,o),this.size+=h.size==g?0:1,this}Xr.prototype.clear=E3,Xr.prototype.delete=C3,Xr.prototype.get=I3,Xr.prototype.has=R3,Xr.prototype.set=P3;function Gn(s){var o=-1,h=s==null?0:s.length;for(this.__data__=new Xr;++o<h;)this.add(s[o])}function M3(s){return this.__data__.set(s,f),this}function O3(s){return this.__data__.has(s)}Gn.prototype.add=Gn.prototype.push=M3,Gn.prototype.has=O3;function Tr(s){var o=this.__data__=new Vr(s);this.size=o.size}function F3(){this.__data__=new Vr,this.size=0}function N3(s){var o=this.__data__,h=o.delete(s);return this.size=o.size,h}function L3(s){return this.__data__.get(s)}function k3(s){return this.__data__.has(s)}function B3(s,o){var h=this.__data__;if(h instanceof Vr){var g=h.__data__;if(!ws||g.length<i-1)return g.push([s,o]),this.size=++h.size,this;h=this.__data__=new Xr(g)}return h.set(s,o),this.size=h.size,this}Tr.prototype.clear=F3,Tr.prototype.delete=N3,Tr.prototype.get=L3,Tr.prototype.has=k3,Tr.prototype.set=B3;function Sm(s,o){var h=de(s),g=!h&&jn(s),y=!h&&!g&&mn(s),S=!h&&!g&&!y&&zi(s),C=h||g||y||S,R=C?cc(s.length,WF):[],M=R.length;for(var U in s)(o||He.call(s,U))&&!(C&&(U=="length"||y&&(U=="offset"||U=="parent")||S&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||Yr(U,M)))&&R.push(U);return R}function Am(s){var o=s.length;return o?s[Cc(0,o-1)]:r}function D3(s,o){return Mo(Gt(s),zn(o,0,s.length))}function U3(s){return Mo(Gt(s))}function vc(s,o,h){(h!==r&&!Sr(s[o],h)||h===r&&!(o in s))&&jr(s,o,h)}function Es(s,o,h){var g=s[o];(!(He.call(s,o)&&Sr(g,h))||h===r&&!(o in s))&&jr(s,o,h)}function _o(s,o){for(var h=s.length;h--;)if(Sr(s[h][0],o))return h;return-1}function $3(s,o,h,g){return fn(s,function(y,S,C){o(g,y,h(y),C)}),g}function Em(s,o){return s&&Lr(o,St(o),s)}function G3(s,o){return s&&Lr(o,Ht(o),s)}function jr(s,o,h){o=="__proto__"&&ho?ho(s,o,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[o]=h}function _c(s,o){for(var h=-1,g=o.length,y=F(g),S=s==null;++h<g;)y[h]=S?r:Qc(s,o[h]);return y}function zn(s,o,h){return s===s&&(h!==r&&(s=s<=h?s:h),o!==r&&(s=s>=o?s:o)),s}function or(s,o,h,g,y,S){var C,R=o&c,M=o&d,U=o&m;if(h&&(C=y?h(s,g,y,S):h(s)),C!==r)return C;if(!lt(s))return s;var $=de(s);if($){if(C=RN(s),!R)return Gt(s,C)}else{var G=Nt(s),q=G==De||G==Qe;if(mn(s))return Km(s,R);if(G==se||G==Me||q&&!y){if(C=M||q?{}:g0(s),!R)return M?_N(s,G3(C,s)):vN(s,Em(C,s))}else{if(!et[G])return y?s:{};C=PN(s,G,R)}}S||(S=new Tr);var te=S.get(s);if(te)return te;S.set(s,C),V0(s)?s.forEach(function(oe){C.add(or(oe,o,h,oe,s,S))}):z0(s)&&s.forEach(function(oe,we){C.set(we,or(oe,o,h,we,s,S))});var ae=U?M?Dc:Bc:M?Ht:St,me=$?r:ae(s);return ir(me||s,function(oe,we){me&&(we=oe,oe=s[we]),Es(C,we,or(oe,o,h,we,s,S))}),C}function z3(s){var o=St(s);return function(h){return Cm(h,s,o)}}function Cm(s,o,h){var g=h.length;if(s==null)return!g;for(s=qe(s);g--;){var y=h[g],S=o[y],C=s[y];if(C===r&&!(y in s)||!S(C))return!1}return!0}function Im(s,o,h){if(typeof s!="function")throw new sr(u);return Fs(function(){s.apply(r,h)},o)}function Cs(s,o,h,g){var y=-1,S=eo,C=!0,R=s.length,M=[],U=o.length;if(!R)return M;h&&(o=it(o,qt(h))),g?(S=ic,C=!1):o.length>=i&&(S=xs,C=!1,o=new Gn(o));e:for(;++y<R;){var $=s[y],G=h==null?$:h($);if($=g||$!==0?$:0,C&&G===G){for(var q=U;q--;)if(o[q]===G)continue e;M.push($)}else S(o,G,g)||M.push($)}return M}var fn=t0(Nr),Rm=t0(xc,!0);function H3(s,o){var h=!0;return fn(s,function(g,y,S){return h=!!o(g,y,S),h}),h}function yo(s,o,h){for(var g=-1,y=s.length;++g<y;){var S=s[g],C=o(S);if(C!=null&&(R===r?C===C&&!Kt(C):h(C,R)))var R=C,M=S}return M}function V3(s,o,h,g){var y=s.length;for(h=ge(h),h<0&&(h=-h>y?0:y+h),g=g===r||g>y?y:ge(g),g<0&&(g+=y),g=h>g?0:j0(g);h<g;)s[h++]=o;return s}function Pm(s,o){var h=[];return fn(s,function(g,y,S){o(g,y,S)&&h.push(g)}),h}function It(s,o,h,g,y){var S=-1,C=s.length;for(h||(h=ON),y||(y=[]);++S<C;){var R=s[S];o>0&&h(R)?o>1?It(R,o-1,h,g,y):ln(y,R):g||(y[y.length]=R)}return y}var yc=r0(),Mm=r0(!0);function Nr(s,o){return s&&yc(s,o,St)}function xc(s,o){return s&&Mm(s,o,St)}function xo(s,o){return un(o,function(h){return Kr(s[h])})}function Hn(s,o){o=pn(o,s);for(var h=0,g=o.length;s!=null&&h<g;)s=s[kr(o[h++])];return h&&h==g?s:r}function Om(s,o,h){var g=o(s);return de(s)?g:ln(g,h(s))}function Dt(s){return s==null?s===r?Ul:J:Un&&Un in qe(s)?EN(s):UN(s)}function bc(s,o){return s>o}function X3(s,o){return s!=null&&He.call(s,o)}function j3(s,o){return s!=null&&o in qe(s)}function W3(s,o,h){return s>=Ft(o,h)&&s<yt(o,h)}function wc(s,o,h){for(var g=h?ic:eo,y=s[0].length,S=s.length,C=S,R=F(S),M=1/0,U=[];C--;){var $=s[C];C&&o&&($=it($,qt(o))),M=Ft($.length,M),R[C]=!h&&(o||y>=120&&$.length>=120)?new Gn(C&&$):r}$=s[0];var G=-1,q=R[0];e:for(;++G<y&&U.length<M;){var te=$[G],ae=o?o(te):te;if(te=h||te!==0?te:0,!(q?xs(q,ae):g(U,ae,h))){for(C=S;--C;){var me=R[C];if(!(me?xs(me,ae):g(s[C],ae,h)))continue e}q&&q.push(ae),U.push(te)}}return U}function q3(s,o,h,g){return Nr(s,function(y,S,C){o(g,h(y),S,C)}),g}function Is(s,o,h){o=pn(o,s),s=y0(s,o);var g=s==null?s:s[kr(lr(o))];return g==null?r:Wt(g,s,h)}function Fm(s){return ht(s)&&Dt(s)==Me}function Y3(s){return ht(s)&&Dt(s)==ys}function K3(s){return ht(s)&&Dt(s)==Ke}function Rs(s,o,h,g,y){return s===o?!0:s==null||o==null||!ht(s)&&!ht(o)?s!==s&&o!==o:Z3(s,o,h,g,Rs,y)}function Z3(s,o,h,g,y,S){var C=de(s),R=de(o),M=C?Oe:Nt(s),U=R?Oe:Nt(o);M=M==Me?se:M,U=U==Me?se:U;var $=M==se,G=U==se,q=M==U;if(q&&mn(s)){if(!mn(o))return!1;C=!0,$=!1}if(q&&!$)return S||(S=new Tr),C||zi(s)?f0(s,o,h,g,y,S):SN(s,o,M,h,g,y,S);if(!(h&_)){var te=$&&He.call(s,"__wrapped__"),ae=G&&He.call(o,"__wrapped__");if(te||ae){var me=te?s.value():s,oe=ae?o.value():o;return S||(S=new Tr),y(me,oe,h,g,S)}}return q?(S||(S=new Tr),AN(s,o,h,g,y,S)):!1}function Q3(s){return ht(s)&&Nt(s)==Je}function Tc(s,o,h,g){var y=h.length,S=y,C=!g;if(s==null)return!S;for(s=qe(s);y--;){var R=h[y];if(C&&R[2]?R[1]!==s[R[0]]:!(R[0]in s))return!1}for(;++y<S;){R=h[y];var M=R[0],U=s[M],$=R[1];if(C&&R[2]){if(U===r&&!(M in s))return!1}else{var G=new Tr;if(g)var q=g(U,$,M,s,o,G);if(!(q===r?Rs($,U,_|x,g,G):q))return!1}}return!0}function Nm(s){if(!lt(s)||NN(s))return!1;var o=Kr(s)?QF:zO;return o.test(Xn(s))}function J3(s){return ht(s)&&Dt(s)==Ot}function eN(s){return ht(s)&&Nt(s)==mt}function tN(s){return ht(s)&&Bo(s.length)&&!!rt[Dt(s)]}function Lm(s){return typeof s=="function"?s:s==null?Vt:typeof s=="object"?de(s)?Dm(s[0],s[1]):Bm(s):nv(s)}function Sc(s){if(!Os(s))return i3(s);var o=[];for(var h in qe(s))He.call(s,h)&&h!="constructor"&&o.push(h);return o}function rN(s){if(!lt(s))return DN(s);var o=Os(s),h=[];for(var g in s)g=="constructor"&&(o||!He.call(s,g))||h.push(g);return h}function Ac(s,o){return s<o}function km(s,o){var h=-1,g=zt(s)?F(s.length):[];return fn(s,function(y,S,C){g[++h]=o(y,S,C)}),g}function Bm(s){var o=$c(s);return o.length==1&&o[0][2]?v0(o[0][0],o[0][1]):function(h){return h===s||Tc(h,s,o)}}function Dm(s,o){return zc(s)&&m0(o)?v0(kr(s),o):function(h){var g=Qc(h,s);return g===r&&g===o?Jc(h,s):Rs(o,g,_|x)}}function bo(s,o,h,g,y){s!==o&&yc(o,function(S,C){if(y||(y=new Tr),lt(S))nN(s,o,C,h,bo,g,y);else{var R=g?g(Vc(s,C),S,C+"",s,o,y):r;R===r&&(R=S),vc(s,C,R)}},Ht)}function nN(s,o,h,g,y,S,C){var R=Vc(s,h),M=Vc(o,h),U=C.get(M);if(U){vc(s,h,U);return}var $=S?S(R,M,h+"",s,o,C):r,G=$===r;if(G){var q=de(M),te=!q&&mn(M),ae=!q&&!te&&zi(M);$=M,q||te||ae?de(R)?$=R:dt(R)?$=Gt(R):te?(G=!1,$=Km(M,!0)):ae?(G=!1,$=Zm(M,!0)):$=[]:Ns(M)||jn(M)?($=R,jn(R)?$=W0(R):(!lt(R)||Kr(R))&&($=g0(M))):G=!1}G&&(C.set(M,$),y($,M,g,S,C),C.delete(M)),vc(s,h,$)}function Um(s,o){var h=s.length;if(h)return o+=o<0?h:0,Yr(o,h)?s[o]:r}function $m(s,o,h){o.length?o=it(o,function(S){return de(S)?function(C){return Hn(C,S.length===1?S[0]:S)}:S}):o=[Vt];var g=-1;o=it(o,qt(ie()));var y=km(s,function(S,C,R){var M=it(o,function(U){return U(S)});return{criteria:M,index:++g,value:S}});return PF(y,function(S,C){return mN(S,C,h)})}function iN(s,o){return Gm(s,o,function(h,g){return Jc(s,g)})}function Gm(s,o,h){for(var g=-1,y=o.length,S={};++g<y;){var C=o[g],R=Hn(s,C);h(R,C)&&Ps(S,pn(C,s),R)}return S}function sN(s){return function(o){return Hn(o,s)}}function Ec(s,o,h,g){var y=g?RF:Mi,S=-1,C=o.length,R=s;for(s===o&&(o=Gt(o)),h&&(R=it(s,qt(h)));++S<C;)for(var M=0,U=o[S],$=h?h(U):U;(M=y(R,$,M,g))>-1;)R!==s&&co.call(R,M,1),co.call(s,M,1);return s}function zm(s,o){for(var h=s?o.length:0,g=h-1;h--;){var y=o[h];if(h==g||y!==S){var S=y;Yr(y)?co.call(s,y,1):Pc(s,y)}}return s}function Cc(s,o){return s+po(wm()*(o-s+1))}function aN(s,o,h,g){for(var y=-1,S=yt(fo((o-s)/(h||1)),0),C=F(S);S--;)C[g?S:++y]=s,s+=h;return C}function Ic(s,o){var h="";if(!s||o<1||o>ee)return h;do o%2&&(h+=s),o=po(o/2),o&&(s+=s);while(o);return h}function _e(s,o){return Xc(_0(s,o,Vt),s+"")}function oN(s){return Am(Hi(s))}function uN(s,o){var h=Hi(s);return Mo(h,zn(o,0,h.length))}function Ps(s,o,h,g){if(!lt(s))return s;o=pn(o,s);for(var y=-1,S=o.length,C=S-1,R=s;R!=null&&++y<S;){var M=kr(o[y]),U=h;if(M==="__proto__"||M==="constructor"||M==="prototype")return s;if(y!=C){var $=R[M];U=g?g($,M,R):r,U===r&&(U=lt($)?$:Yr(o[y+1])?[]:{})}Es(R,M,U),R=R[M]}return s}var Hm=go?function(s,o){return go.set(s,o),s}:Vt,lN=ho?function(s,o){return ho(s,"toString",{configurable:!0,enumerable:!1,value:th(o),writable:!0})}:Vt;function cN(s){return Mo(Hi(s))}function ur(s,o,h){var g=-1,y=s.length;o<0&&(o=-o>y?0:y+o),h=h>y?y:h,h<0&&(h+=y),y=o>h?0:h-o>>>0,o>>>=0;for(var S=F(y);++g<y;)S[g]=s[g+o];return S}function hN(s,o){var h;return fn(s,function(g,y,S){return h=o(g,y,S),!h}),!!h}function wo(s,o,h){var g=0,y=s==null?g:s.length;if(typeof o=="number"&&o===o&&y<=Se){for(;g<y;){var S=g+y>>>1,C=s[S];C!==null&&!Kt(C)&&(h?C<=o:C<o)?g=S+1:y=S}return y}return Rc(s,o,Vt,h)}function Rc(s,o,h,g){var y=0,S=s==null?0:s.length;if(S===0)return 0;o=h(o);for(var C=o!==o,R=o===null,M=Kt(o),U=o===r;y<S;){var $=po((y+S)/2),G=h(s[$]),q=G!==r,te=G===null,ae=G===G,me=Kt(G);if(C)var oe=g||ae;else U?oe=ae&&(g||q):R?oe=ae&&q&&(g||!te):M?oe=ae&&q&&!te&&(g||!me):te||me?oe=!1:oe=g?G<=o:G<o;oe?y=$+1:S=$}return Ft(S,ce)}function Vm(s,o){for(var h=-1,g=s.length,y=0,S=[];++h<g;){var C=s[h],R=o?o(C):C;if(!h||!Sr(R,M)){var M=R;S[y++]=C===0?0:C}}return S}function Xm(s){return typeof s=="number"?s:Kt(s)?X:+s}function Yt(s){if(typeof s=="string")return s;if(de(s))return it(s,Yt)+"";if(Kt(s))return Tm?Tm.call(s):"";var o=s+"";return o=="0"&&1/s==-z?"-0":o}function dn(s,o,h){var g=-1,y=eo,S=s.length,C=!0,R=[],M=R;if(h)C=!1,y=ic;else if(S>=i){var U=o?null:wN(s);if(U)return ro(U);C=!1,y=xs,M=new Gn}else M=o?[]:R;e:for(;++g<S;){var $=s[g],G=o?o($):$;if($=h||$!==0?$:0,C&&G===G){for(var q=M.length;q--;)if(M[q]===G)continue e;o&&M.push(G),R.push($)}else y(M,G,h)||(M!==R&&M.push(G),R.push($))}return R}function Pc(s,o){return o=pn(o,s),s=y0(s,o),s==null||delete s[kr(lr(o))]}function jm(s,o,h,g){return Ps(s,o,h(Hn(s,o)),g)}function To(s,o,h,g){for(var y=s.length,S=g?y:-1;(g?S--:++S<y)&&o(s[S],S,s););return h?ur(s,g?0:S,g?S+1:y):ur(s,g?S+1:0,g?y:S)}function Wm(s,o){var h=s;return h instanceof Ae&&(h=h.value()),sc(o,function(g,y){return y.func.apply(y.thisArg,ln([g],y.args))},h)}function Mc(s,o,h){var g=s.length;if(g<2)return g?dn(s[0]):[];for(var y=-1,S=F(g);++y<g;)for(var C=s[y],R=-1;++R<g;)R!=y&&(S[y]=Cs(S[y]||C,s[R],o,h));return dn(It(S,1),o,h)}function qm(s,o,h){for(var g=-1,y=s.length,S=o.length,C={};++g<y;){var R=g<S?o[g]:r;h(C,s[g],R)}return C}function Oc(s){return dt(s)?s:[]}function Fc(s){return typeof s=="function"?s:Vt}function pn(s,o){return de(s)?s:zc(s,o)?[s]:T0(Ue(s))}var fN=_e;function gn(s,o,h){var g=s.length;return h=h===r?g:h,!o&&h>=g?s:ur(s,o,h)}var Ym=JF||function(s){return Ct.clearTimeout(s)};function Km(s,o){if(o)return s.slice();var h=s.length,g=vm?vm(h):new s.constructor(h);return s.copy(g),g}function Nc(s){var o=new s.constructor(s.byteLength);return new uo(o).set(new uo(s)),o}function dN(s,o){var h=o?Nc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}function pN(s){var o=new s.constructor(s.source,Fg.exec(s));return o.lastIndex=s.lastIndex,o}function gN(s){return As?qe(As.call(s)):{}}function Zm(s,o){var h=o?Nc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}function Qm(s,o){if(s!==o){var h=s!==r,g=s===null,y=s===s,S=Kt(s),C=o!==r,R=o===null,M=o===o,U=Kt(o);if(!R&&!U&&!S&&s>o||S&&C&&M&&!R&&!U||g&&C&&M||!h&&M||!y)return 1;if(!g&&!S&&!U&&s<o||U&&h&&y&&!g&&!S||R&&h&&y||!C&&y||!M)return-1}return 0}function mN(s,o,h){for(var g=-1,y=s.criteria,S=o.criteria,C=y.length,R=h.length;++g<C;){var M=Qm(y[g],S[g]);if(M){if(g>=R)return M;var U=h[g];return M*(U=="desc"?-1:1)}}return s.index-o.index}function Jm(s,o,h,g){for(var y=-1,S=s.length,C=h.length,R=-1,M=o.length,U=yt(S-C,0),$=F(M+U),G=!g;++R<M;)$[R]=o[R];for(;++y<C;)(G||y<S)&&($[h[y]]=s[y]);for(;U--;)$[R++]=s[y++];return $}function e0(s,o,h,g){for(var y=-1,S=s.length,C=-1,R=h.length,M=-1,U=o.length,$=yt(S-R,0),G=F($+U),q=!g;++y<$;)G[y]=s[y];for(var te=y;++M<U;)G[te+M]=o[M];for(;++C<R;)(q||y<S)&&(G[te+h[C]]=s[y++]);return G}function Gt(s,o){var h=-1,g=s.length;for(o||(o=F(g));++h<g;)o[h]=s[h];return o}function Lr(s,o,h,g){var y=!h;h||(h={});for(var S=-1,C=o.length;++S<C;){var R=o[S],M=g?g(h[R],s[R],R,h,s):r;M===r&&(M=s[R]),y?jr(h,R,M):Es(h,R,M)}return h}function vN(s,o){return Lr(s,Gc(s),o)}function _N(s,o){return Lr(s,d0(s),o)}function So(s,o){return function(h,g){var y=de(h)?TF:$3,S=o?o():{};return y(h,s,ie(g,2),S)}}function Ui(s){return _e(function(o,h){var g=-1,y=h.length,S=y>1?h[y-1]:r,C=y>2?h[2]:r;for(S=s.length>3&&typeof S=="function"?(y--,S):r,C&&Ut(h[0],h[1],C)&&(S=y<3?r:S,y=1),o=qe(o);++g<y;){var R=h[g];R&&s(o,R,g,S)}return o})}function t0(s,o){return function(h,g){if(h==null)return h;if(!zt(h))return s(h,g);for(var y=h.length,S=o?y:-1,C=qe(h);(o?S--:++S<y)&&g(C[S],S,C)!==!1;);return h}}function r0(s){return function(o,h,g){for(var y=-1,S=qe(o),C=g(o),R=C.length;R--;){var M=C[s?R:++y];if(h(S[M],M,S)===!1)break}return o}}function yN(s,o,h){var g=o&b,y=Ms(s);function S(){var C=this&&this!==Ct&&this instanceof S?y:s;return C.apply(g?h:this,arguments)}return S}function n0(s){return function(o){o=Ue(o);var h=Oi(o)?wr(o):r,g=h?h[0]:o.charAt(0),y=h?gn(h,1).join(""):o.slice(1);return g[s]()+y}}function $i(s){return function(o){return sc(tv(ev(o).replace(lF,"")),s,"")}}function Ms(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=Di(s.prototype),g=s.apply(h,o);return lt(g)?g:h}}function xN(s,o,h){var g=Ms(s);function y(){for(var S=arguments.length,C=F(S),R=S,M=Gi(y);R--;)C[R]=arguments[R];var U=S<3&&C[0]!==M&&C[S-1]!==M?[]:cn(C,M);if(S-=U.length,S<h)return u0(s,o,Ao,y.placeholder,r,C,U,r,r,h-S);var $=this&&this!==Ct&&this instanceof y?g:s;return Wt($,this,C)}return y}function i0(s){return function(o,h,g){var y=qe(o);if(!zt(o)){var S=ie(h,3);o=St(o),h=function(R){return S(y[R],R,y)}}var C=s(o,h,g);return C>-1?y[S?o[C]:C]:r}}function s0(s){return qr(function(o){var h=o.length,g=h,y=ar.prototype.thru;for(s&&o.reverse();g--;){var S=o[g];if(typeof S!="function")throw new sr(u);if(y&&!C&&Ro(S)=="wrapper")var C=new ar([],!0)}for(g=C?g:h;++g<h;){S=o[g];var R=Ro(S),M=R=="wrapper"?Uc(S):r;M&&Hc(M[0])&&M[1]==(L|A|O|k)&&!M[4].length&&M[9]==1?C=C[Ro(M[0])].apply(C,M[3]):C=S.length==1&&Hc(S)?C[R]():C.thru(S)}return function(){var U=arguments,$=U[0];if(C&&U.length==1&&de($))return C.plant($).value();for(var G=0,q=h?o[G].apply(this,U):$;++G<h;)q=o[G].call(this,q);return q}})}function Ao(s,o,h,g,y,S,C,R,M,U){var $=o&L,G=o&b,q=o&w,te=o&(A|I),ae=o&D,me=q?r:Ms(s);function oe(){for(var we=arguments.length,Ie=F(we),Zt=we;Zt--;)Ie[Zt]=arguments[Zt];if(te)var $t=Gi(oe),Qt=OF(Ie,$t);if(g&&(Ie=Jm(Ie,g,y,te)),S&&(Ie=e0(Ie,S,C,te)),we-=Qt,te&&we<U){var pt=cn(Ie,$t);return u0(s,o,Ao,oe.placeholder,h,Ie,pt,R,M,U-we)}var Ar=G?h:this,Qr=q?Ar[s]:s;return we=Ie.length,R?Ie=$N(Ie,R):ae&&we>1&&Ie.reverse(),$&&M<we&&(Ie.length=M),this&&this!==Ct&&this instanceof oe&&(Qr=me||Ms(Qr)),Qr.apply(Ar,Ie)}return oe}function a0(s,o){return function(h,g){return q3(h,s,o(g),{})}}function Eo(s,o){return function(h,g){var y;if(h===r&&g===r)return o;if(h!==r&&(y=h),g!==r){if(y===r)return g;typeof h=="string"||typeof g=="string"?(h=Yt(h),g=Yt(g)):(h=Xm(h),g=Xm(g)),y=s(h,g)}return y}}function Lc(s){return qr(function(o){return o=it(o,qt(ie())),_e(function(h){var g=this;return s(o,function(y){return Wt(y,g,h)})})})}function Co(s,o){o=o===r?" ":Yt(o);var h=o.length;if(h<2)return h?Ic(o,s):o;var g=Ic(o,fo(s/Fi(o)));return Oi(o)?gn(wr(g),0,s).join(""):g.slice(0,s)}function bN(s,o,h,g){var y=o&b,S=Ms(s);function C(){for(var R=-1,M=arguments.length,U=-1,$=g.length,G=F($+M),q=this&&this!==Ct&&this instanceof C?S:s;++U<$;)G[U]=g[U];for(;M--;)G[U++]=arguments[++R];return Wt(q,y?h:this,G)}return C}function o0(s){return function(o,h,g){return g&&typeof g!="number"&&Ut(o,h,g)&&(h=g=r),o=Zr(o),h===r?(h=o,o=0):h=Zr(h),g=g===r?o<h?1:-1:Zr(g),aN(o,h,g,s)}}function Io(s){return function(o,h){return typeof o=="string"&&typeof h=="string"||(o=cr(o),h=cr(h)),s(o,h)}}function u0(s,o,h,g,y,S,C,R,M,U){var $=o&A,G=$?C:r,q=$?r:C,te=$?S:r,ae=$?r:S;o|=$?O:N,o&=~($?N:O),o&E||(o&=~(b|w));var me=[s,o,y,te,G,ae,q,R,M,U],oe=h.apply(r,me);return Hc(s)&&x0(oe,me),oe.placeholder=g,b0(oe,s,o)}function kc(s){var o=_t[s];return function(h,g){if(h=cr(h),g=g==null?0:Ft(ge(g),292),g&&bm(h)){var y=(Ue(h)+"e").split("e"),S=o(y[0]+"e"+(+y[1]+g));return y=(Ue(S)+"e").split("e"),+(y[0]+"e"+(+y[1]-g))}return o(h)}}var wN=ki&&1/ro(new ki([,-0]))[1]==z?function(s){return new ki(s)}:ih;function l0(s){return function(o){var h=Nt(o);return h==Je?fc(o):h==mt?UF(o):MF(o,s(o))}}function Wr(s,o,h,g,y,S,C,R){var M=o&w;if(!M&&typeof s!="function")throw new sr(u);var U=g?g.length:0;if(U||(o&=~(O|N),g=y=r),C=C===r?C:yt(ge(C),0),R=R===r?R:ge(R),U-=y?y.length:0,o&N){var $=g,G=y;g=y=r}var q=M?r:Uc(s),te=[s,o,h,g,y,$,G,S,C,R];if(q&&BN(te,q),s=te[0],o=te[1],h=te[2],g=te[3],y=te[4],R=te[9]=te[9]===r?M?0:s.length:yt(te[9]-U,0),!R&&o&(A|I)&&(o&=~(A|I)),!o||o==b)var ae=yN(s,o,h);else o==A||o==I?ae=xN(s,o,R):(o==O||o==(b|O))&&!y.length?ae=bN(s,o,h,g):ae=Ao.apply(r,te);var me=q?Hm:x0;return b0(me(ae,te),s,o)}function c0(s,o,h,g){return s===r||Sr(s,Li[h])&&!He.call(g,h)?o:s}function h0(s,o,h,g,y,S){return lt(s)&&lt(o)&&(S.set(o,s),bo(s,o,r,h0,S),S.delete(o)),s}function TN(s){return Ns(s)?r:s}function f0(s,o,h,g,y,S){var C=h&_,R=s.length,M=o.length;if(R!=M&&!(C&&M>R))return!1;var U=S.get(s),$=S.get(o);if(U&&$)return U==o&&$==s;var G=-1,q=!0,te=h&x?new Gn:r;for(S.set(s,o),S.set(o,s);++G<R;){var ae=s[G],me=o[G];if(g)var oe=C?g(me,ae,G,o,s,S):g(ae,me,G,s,o,S);if(oe!==r){if(oe)continue;q=!1;break}if(te){if(!ac(o,function(we,Ie){if(!xs(te,Ie)&&(ae===we||y(ae,we,h,g,S)))return te.push(Ie)})){q=!1;break}}else if(!(ae===me||y(ae,me,h,g,S))){q=!1;break}}return S.delete(s),S.delete(o),q}function SN(s,o,h,g,y,S,C){switch(h){case Ri:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case ys:return!(s.byteLength!=o.byteLength||!S(new uo(s),new uo(o)));case ze:case Ke:case Le:return Sr(+s,+o);case be:return s.name==o.name&&s.message==o.message;case Ot:case Hr:return s==o+"";case Je:var R=fc;case mt:var M=g&_;if(R||(R=ro),s.size!=o.size&&!M)return!1;var U=C.get(s);if(U)return U==o;g|=x,C.set(s,o);var $=f0(R(s),R(o),g,y,S,C);return C.delete(s),$;case Ii:if(As)return As.call(s)==As.call(o)}return!1}function AN(s,o,h,g,y,S){var C=h&_,R=Bc(s),M=R.length,U=Bc(o),$=U.length;if(M!=$&&!C)return!1;for(var G=M;G--;){var q=R[G];if(!(C?q in o:He.call(o,q)))return!1}var te=S.get(s),ae=S.get(o);if(te&&ae)return te==o&&ae==s;var me=!0;S.set(s,o),S.set(o,s);for(var oe=C;++G<M;){q=R[G];var we=s[q],Ie=o[q];if(g)var Zt=C?g(Ie,we,q,o,s,S):g(we,Ie,q,s,o,S);if(!(Zt===r?we===Ie||y(we,Ie,h,g,S):Zt)){me=!1;break}oe||(oe=q=="constructor")}if(me&&!oe){var $t=s.constructor,Qt=o.constructor;$t!=Qt&&"constructor"in s&&"constructor"in o&&!(typeof $t=="function"&&$t instanceof $t&&typeof Qt=="function"&&Qt instanceof Qt)&&(me=!1)}return S.delete(s),S.delete(o),me}function qr(s){return Xc(_0(s,r,C0),s+"")}function Bc(s){return Om(s,St,Gc)}function Dc(s){return Om(s,Ht,d0)}var Uc=go?function(s){return go.get(s)}:ih;function Ro(s){for(var o=s.name+"",h=Bi[o],g=He.call(Bi,o)?h.length:0;g--;){var y=h[g],S=y.func;if(S==null||S==s)return y.name}return o}function Gi(s){var o=He.call(T,"placeholder")?T:s;return o.placeholder}function ie(){var s=T.iteratee||rh;return s=s===rh?Lm:s,arguments.length?s(arguments[0],arguments[1]):s}function Po(s,o){var h=s.__data__;return FN(o)?h[typeof o=="string"?"string":"hash"]:h.map}function $c(s){for(var o=St(s),h=o.length;h--;){var g=o[h],y=s[g];o[h]=[g,y,m0(y)]}return o}function Vn(s,o){var h=kF(s,o);return Nm(h)?h:r}function EN(s){var o=He.call(s,Un),h=s[Un];try{s[Un]=r;var g=!0}catch{}var y=ao.call(s);return g&&(o?s[Un]=h:delete s[Un]),y}var Gc=pc?function(s){return s==null?[]:(s=qe(s),un(pc(s),function(o){return ym.call(s,o)}))}:sh,d0=pc?function(s){for(var o=[];s;)ln(o,Gc(s)),s=lo(s);return o}:sh,Nt=Dt;(gc&&Nt(new gc(new ArrayBuffer(1)))!=Ri||ws&&Nt(new ws)!=Je||mc&&Nt(mc.resolve())!=ut||ki&&Nt(new ki)!=mt||Ts&&Nt(new Ts)!=Bt)&&(Nt=function(s){var o=Dt(s),h=o==se?s.constructor:r,g=h?Xn(h):"";if(g)switch(g){case u3:return Ri;case l3:return Je;case c3:return ut;case h3:return mt;case f3:return Bt}return o});function CN(s,o,h){for(var g=-1,y=h.length;++g<y;){var S=h[g],C=S.size;switch(S.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=Ft(o,s+C);break;case"takeRight":s=yt(s,o-C);break}}return{start:s,end:o}}function IN(s){var o=s.match(NO);return o?o[1].split(LO):[]}function p0(s,o,h){o=pn(o,s);for(var g=-1,y=o.length,S=!1;++g<y;){var C=kr(o[g]);if(!(S=s!=null&&h(s,C)))break;s=s[C]}return S||++g!=y?S:(y=s==null?0:s.length,!!y&&Bo(y)&&Yr(C,y)&&(de(s)||jn(s)))}function RN(s){var o=s.length,h=new s.constructor(o);return o&&typeof s[0]=="string"&&He.call(s,"index")&&(h.index=s.index,h.input=s.input),h}function g0(s){return typeof s.constructor=="function"&&!Os(s)?Di(lo(s)):{}}function PN(s,o,h){var g=s.constructor;switch(o){case ys:return Nc(s);case ze:case Ke:return new g(+s);case Ri:return dN(s,h);case $l:case Gl:case zl:case Hl:case Vl:case Xl:case jl:case Wl:case ql:return Zm(s,h);case Je:return new g;case Le:case Hr:return new g(s);case Ot:return pN(s);case mt:return new g;case Ii:return gN(s)}}function MN(s,o){var h=o.length;if(!h)return s;var g=h-1;return o[g]=(h>1?"& ":"")+o[g],o=o.join(h>2?", ":" "),s.replace(FO,`{
1973
+ */Ya.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,v="__lodash_placeholder__",c=1,d=2,m=4,_=1,b=2,x=1,w=2,E=4,A=8,I=16,O=32,N=64,L=128,k=256,D=512,j=30,Q="...",fe=800,H=16,V=1,le=2,ve=3,z=1/0,ee=9007199254740991,pe=17976931348623157e292,X=0/0,Y=4294967295,ce=Y-1,Se=Y>>>1,xe=[["ary",L],["bind",x],["bindKey",w],["curry",A],["curryRight",I],["flip",D],["partial",O],["partialRight",N],["rearg",k]],Me="[object Arguments]",Oe="[object Array]",Ge="[object AsyncFunction]",ze="[object Boolean]",Ke="[object Date]",Ze="[object DOMException]",be="[object Error]",De="[object Function]",Qe="[object GeneratorFunction]",Je="[object Map]",Le="[object Number]",J="[object Null]",se="[object Object]",ut="[object Promise]",rr="[object Proxy]",Ot="[object RegExp]",mt="[object Set]",Hr="[object String]",Ii="[object Symbol]",Ul="[object Undefined]",Bt="[object WeakMap]",Rg="[object WeakSet]",ys="[object ArrayBuffer]",Ri="[object DataView]",$l="[object Float32Array]",Gl="[object Float64Array]",zl="[object Int8Array]",Hl="[object Int16Array]",Vl="[object Int32Array]",Xl="[object Uint8Array]",jl="[object Uint8ClampedArray]",Wl="[object Uint16Array]",ql="[object Uint32Array]",bO=/\b__p \+= '';/g,wO=/\b(__p \+=) '' \+/g,TO=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Pg=/&(?:amp|lt|gt|quot|#39);/g,Mg=/[&<>"']/g,SO=RegExp(Pg.source),AO=RegExp(Mg.source),EO=/<%-([\s\S]+?)%>/g,CO=/<%([\s\S]+?)%>/g,Og=/<%=([\s\S]+?)%>/g,IO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,RO=/^\w*$/,PO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yl=/[\\^$.*+?()[\]{}|]/g,MO=RegExp(Yl.source),Kl=/^\s+/,OO=/\s/,FO=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,NO=/\{\n\/\* \[wrapped with (.+)\] \*/,LO=/,? & /,kO=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,BO=/[()=,{}\[\]\/\s]/,DO=/\\(\\)?/g,UO=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fg=/\w*$/,$O=/^[-+]0x[0-9a-f]+$/i,GO=/^0b[01]+$/i,zO=/^\[object .+?Constructor\]$/,HO=/^0o[0-7]+$/i,VO=/^(?:0|[1-9]\d*)$/,XO=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Za=/($^)/,jO=/['\n\r\u2028\u2029\\]/g,Qa="\\ud800-\\udfff",WO="\\u0300-\\u036f",qO="\\ufe20-\\ufe2f",YO="\\u20d0-\\u20ff",Ng=WO+qO+YO,Lg="\\u2700-\\u27bf",kg="a-z\\xdf-\\xf6\\xf8-\\xff",KO="\\xac\\xb1\\xd7\\xf7",ZO="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",QO="\\u2000-\\u206f",JO=" \\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",Bg="A-Z\\xc0-\\xd6\\xd8-\\xde",Dg="\\ufe0e\\ufe0f",Ug=KO+ZO+QO+JO,Zl="['’]",eF="["+Qa+"]",$g="["+Ug+"]",Ja="["+Ng+"]",Gg="\\d+",tF="["+Lg+"]",zg="["+kg+"]",Hg="[^"+Qa+Ug+Gg+Lg+kg+Bg+"]",Ql="\\ud83c[\\udffb-\\udfff]",rF="(?:"+Ja+"|"+Ql+")",Vg="[^"+Qa+"]",Jl="(?:\\ud83c[\\udde6-\\uddff]){2}",ec="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+Bg+"]",Xg="\\u200d",jg="(?:"+zg+"|"+Hg+")",nF="(?:"+Pi+"|"+Hg+")",Wg="(?:"+Zl+"(?:d|ll|m|re|s|t|ve))?",qg="(?:"+Zl+"(?:D|LL|M|RE|S|T|VE))?",Yg=rF+"?",Kg="["+Dg+"]?",iF="(?:"+Xg+"(?:"+[Vg,Jl,ec].join("|")+")"+Kg+Yg+")*",sF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",aF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zg=Kg+Yg+iF,oF="(?:"+[tF,Jl,ec].join("|")+")"+Zg,uF="(?:"+[Vg+Ja+"?",Ja,Jl,ec,eF].join("|")+")",lF=RegExp(Zl,"g"),cF=RegExp(Ja,"g"),tc=RegExp(Ql+"(?="+Ql+")|"+uF+Zg,"g"),hF=RegExp([Pi+"?"+zg+"+"+Wg+"(?="+[$g,Pi,"$"].join("|")+")",nF+"+"+qg+"(?="+[$g,Pi+jg,"$"].join("|")+")",Pi+"?"+jg+"+"+Wg,Pi+"+"+qg,aF,sF,Gg,oF].join("|"),"g"),fF=RegExp("["+Xg+Qa+Ng+Dg+"]"),dF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pF=["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"],gF=-1,rt={};rt[$l]=rt[Gl]=rt[zl]=rt[Hl]=rt[Vl]=rt[Xl]=rt[jl]=rt[Wl]=rt[ql]=!0,rt[Me]=rt[Oe]=rt[ys]=rt[ze]=rt[Ri]=rt[Ke]=rt[be]=rt[De]=rt[Je]=rt[Le]=rt[se]=rt[Ot]=rt[mt]=rt[Hr]=rt[Bt]=!1;var et={};et[Me]=et[Oe]=et[ys]=et[Ri]=et[ze]=et[Ke]=et[$l]=et[Gl]=et[zl]=et[Hl]=et[Vl]=et[Je]=et[Le]=et[se]=et[Ot]=et[mt]=et[Hr]=et[Ii]=et[Xl]=et[jl]=et[Wl]=et[ql]=!0,et[be]=et[De]=et[Bt]=!1;var mF={À:"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"},vF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_F={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xF=parseFloat,bF=parseInt,Qg=typeof At=="object"&&At&&At.Object===Object&&At,wF=typeof self=="object"&&self&&self.Object===Object&&self,Ct=Qg||wF||Function("return this")(),rc=e&&!e.nodeType&&e,Dn=rc&&!0&&t&&!t.nodeType&&t,Jg=Dn&&Dn.exports===rc,nc=Jg&&Qg.process,nr=function(){try{var P=Dn&&Dn.require&&Dn.require("util").types;return P||nc&&nc.binding&&nc.binding("util")}catch{}}(),em=nr&&nr.isArrayBuffer,tm=nr&&nr.isDate,rm=nr&&nr.isMap,nm=nr&&nr.isRegExp,im=nr&&nr.isSet,sm=nr&&nr.isTypedArray;function Wt(P,B,F){switch(F.length){case 0:return P.call(B);case 1:return P.call(B,F[0]);case 2:return P.call(B,F[0],F[1]);case 3:return P.call(B,F[0],F[1],F[2])}return P.apply(B,F)}function TF(P,B,F,Z){for(var he=-1,ke=P==null?0:P.length;++he<ke;){var _t=P[he];B(Z,_t,F(_t),P)}return Z}function ir(P,B){for(var F=-1,Z=P==null?0:P.length;++F<Z&&B(P[F],F,P)!==!1;);return P}function SF(P,B){for(var F=P==null?0:P.length;F--&&B(P[F],F,P)!==!1;);return P}function am(P,B){for(var F=-1,Z=P==null?0:P.length;++F<Z;)if(!B(P[F],F,P))return!1;return!0}function un(P,B){for(var F=-1,Z=P==null?0:P.length,he=0,ke=[];++F<Z;){var _t=P[F];B(_t,F,P)&&(ke[he++]=_t)}return ke}function eo(P,B){var F=P==null?0:P.length;return!!F&&Mi(P,B,0)>-1}function ic(P,B,F){for(var Z=-1,he=P==null?0:P.length;++Z<he;)if(F(B,P[Z]))return!0;return!1}function it(P,B){for(var F=-1,Z=P==null?0:P.length,he=Array(Z);++F<Z;)he[F]=B(P[F],F,P);return he}function ln(P,B){for(var F=-1,Z=B.length,he=P.length;++F<Z;)P[he+F]=B[F];return P}function sc(P,B,F,Z){var he=-1,ke=P==null?0:P.length;for(Z&&ke&&(F=P[++he]);++he<ke;)F=B(F,P[he],he,P);return F}function AF(P,B,F,Z){var he=P==null?0:P.length;for(Z&&he&&(F=P[--he]);he--;)F=B(F,P[he],he,P);return F}function ac(P,B){for(var F=-1,Z=P==null?0:P.length;++F<Z;)if(B(P[F],F,P))return!0;return!1}var EF=oc("length");function CF(P){return P.split("")}function IF(P){return P.match(kO)||[]}function om(P,B,F){var Z;return F(P,function(he,ke,_t){if(B(he,ke,_t))return Z=ke,!1}),Z}function to(P,B,F,Z){for(var he=P.length,ke=F+(Z?1:-1);Z?ke--:++ke<he;)if(B(P[ke],ke,P))return ke;return-1}function Mi(P,B,F){return B===B?$F(P,B,F):to(P,um,F)}function RF(P,B,F,Z){for(var he=F-1,ke=P.length;++he<ke;)if(Z(P[he],B))return he;return-1}function um(P){return P!==P}function lm(P,B){var F=P==null?0:P.length;return F?lc(P,B)/F:X}function oc(P){return function(B){return B==null?r:B[P]}}function uc(P){return function(B){return P==null?r:P[B]}}function cm(P,B,F,Z,he){return he(P,function(ke,_t,qe){F=Z?(Z=!1,ke):B(F,ke,_t,qe)}),F}function PF(P,B){var F=P.length;for(P.sort(B);F--;)P[F]=P[F].value;return P}function lc(P,B){for(var F,Z=-1,he=P.length;++Z<he;){var ke=B(P[Z]);ke!==r&&(F=F===r?ke:F+ke)}return F}function cc(P,B){for(var F=-1,Z=Array(P);++F<P;)Z[F]=B(F);return Z}function MF(P,B){return it(B,function(F){return[F,P[F]]})}function hm(P){return P&&P.slice(0,gm(P)+1).replace(Kl,"")}function qt(P){return function(B){return P(B)}}function hc(P,B){return it(B,function(F){return P[F]})}function xs(P,B){return P.has(B)}function fm(P,B){for(var F=-1,Z=P.length;++F<Z&&Mi(B,P[F],0)>-1;);return F}function dm(P,B){for(var F=P.length;F--&&Mi(B,P[F],0)>-1;);return F}function OF(P,B){for(var F=P.length,Z=0;F--;)P[F]===B&&++Z;return Z}var FF=uc(mF),NF=uc(vF);function LF(P){return"\\"+yF[P]}function kF(P,B){return P==null?r:P[B]}function Oi(P){return fF.test(P)}function BF(P){return dF.test(P)}function DF(P){for(var B,F=[];!(B=P.next()).done;)F.push(B.value);return F}function fc(P){var B=-1,F=Array(P.size);return P.forEach(function(Z,he){F[++B]=[he,Z]}),F}function pm(P,B){return function(F){return P(B(F))}}function cn(P,B){for(var F=-1,Z=P.length,he=0,ke=[];++F<Z;){var _t=P[F];(_t===B||_t===v)&&(P[F]=v,ke[he++]=F)}return ke}function ro(P){var B=-1,F=Array(P.size);return P.forEach(function(Z){F[++B]=Z}),F}function UF(P){var B=-1,F=Array(P.size);return P.forEach(function(Z){F[++B]=[Z,Z]}),F}function $F(P,B,F){for(var Z=F-1,he=P.length;++Z<he;)if(P[Z]===B)return Z;return-1}function GF(P,B,F){for(var Z=F+1;Z--;)if(P[Z]===B)return Z;return Z}function Fi(P){return Oi(P)?HF(P):EF(P)}function wr(P){return Oi(P)?VF(P):CF(P)}function gm(P){for(var B=P.length;B--&&OO.test(P.charAt(B)););return B}var zF=uc(_F);function HF(P){for(var B=tc.lastIndex=0;tc.test(P);)++B;return B}function VF(P){return P.match(tc)||[]}function XF(P){return P.match(hF)||[]}var jF=function P(B){B=B==null?Ct:Ni.defaults(Ct.Object(),B,Ni.pick(Ct,pF));var F=B.Array,Z=B.Date,he=B.Error,ke=B.Function,_t=B.Math,qe=B.Object,dc=B.RegExp,WF=B.String,sr=B.TypeError,no=F.prototype,qF=ke.prototype,Li=qe.prototype,io=B["__core-js_shared__"],so=qF.toString,He=Li.hasOwnProperty,YF=0,mm=function(){var s=/[^.]+$/.exec(io&&io.keys&&io.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ao=Li.toString,KF=so.call(qe),ZF=Ct._,QF=dc("^"+so.call(He).replace(Yl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oo=Jg?B.Buffer:r,hn=B.Symbol,uo=B.Uint8Array,vm=oo?oo.allocUnsafe:r,lo=pm(qe.getPrototypeOf,qe),_m=qe.create,ym=Li.propertyIsEnumerable,co=no.splice,xm=hn?hn.isConcatSpreadable:r,bs=hn?hn.iterator:r,Un=hn?hn.toStringTag:r,ho=function(){try{var s=Vn(qe,"defineProperty");return s({},"",{}),s}catch{}}(),JF=B.clearTimeout!==Ct.clearTimeout&&B.clearTimeout,e3=Z&&Z.now!==Ct.Date.now&&Z.now,t3=B.setTimeout!==Ct.setTimeout&&B.setTimeout,fo=_t.ceil,po=_t.floor,pc=qe.getOwnPropertySymbols,r3=oo?oo.isBuffer:r,bm=B.isFinite,n3=no.join,i3=pm(qe.keys,qe),yt=_t.max,Ft=_t.min,s3=Z.now,a3=B.parseInt,wm=_t.random,o3=no.reverse,gc=Vn(B,"DataView"),ws=Vn(B,"Map"),mc=Vn(B,"Promise"),ki=Vn(B,"Set"),Ts=Vn(B,"WeakMap"),Ss=Vn(qe,"create"),go=Ts&&new Ts,Bi={},u3=Xn(gc),l3=Xn(ws),c3=Xn(mc),h3=Xn(ki),f3=Xn(Ts),mo=hn?hn.prototype:r,As=mo?mo.valueOf:r,Tm=mo?mo.toString:r;function T(s){if(ht(s)&&!de(s)&&!(s instanceof Ae)){if(s instanceof ar)return s;if(He.call(s,"__wrapped__"))return S0(s)}return new ar(s)}var Di=function(){function s(){}return function(o){if(!lt(o))return{};if(_m)return _m(o);s.prototype=o;var h=new s;return s.prototype=r,h}}();function vo(){}function ar(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}T.templateSettings={escape:EO,evaluate:CO,interpolate:Og,variable:"",imports:{_:T}},T.prototype=vo.prototype,T.prototype.constructor=T,ar.prototype=Di(vo.prototype),ar.prototype.constructor=ar;function Ae(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Y,this.__views__=[]}function d3(){var s=new Ae(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 p3(){if(this.__filtered__){var s=new Ae(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function g3(){var s=this.__wrapped__.value(),o=this.__dir__,h=de(s),g=o<0,y=h?s.length:0,S=CN(0,y,this.__views__),C=S.start,R=S.end,M=R-C,U=g?R:C-1,$=this.__iteratees__,G=$.length,q=0,te=Ft(M,this.__takeCount__);if(!h||!g&&y==M&&te==M)return Wm(s,this.__actions__);var ae=[];e:for(;M--&&q<te;){U+=o;for(var me=-1,oe=s[U];++me<G;){var we=$[me],Ie=we.iteratee,Zt=we.type,$t=Ie(oe);if(Zt==le)oe=$t;else if(!$t){if(Zt==V)continue e;break e}}ae[q++]=oe}return ae}Ae.prototype=Di(vo.prototype),Ae.prototype.constructor=Ae;function $n(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var g=s[o];this.set(g[0],g[1])}}function m3(){this.__data__=Ss?Ss(null):{},this.size=0}function v3(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function _3(s){var o=this.__data__;if(Ss){var h=o[s];return h===f?r:h}return He.call(o,s)?o[s]:r}function y3(s){var o=this.__data__;return Ss?o[s]!==r:He.call(o,s)}function x3(s,o){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Ss&&o===r?f:o,this}$n.prototype.clear=m3,$n.prototype.delete=v3,$n.prototype.get=_3,$n.prototype.has=y3,$n.prototype.set=x3;function Vr(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var g=s[o];this.set(g[0],g[1])}}function b3(){this.__data__=[],this.size=0}function w3(s){var o=this.__data__,h=_o(o,s);if(h<0)return!1;var g=o.length-1;return h==g?o.pop():co.call(o,h,1),--this.size,!0}function T3(s){var o=this.__data__,h=_o(o,s);return h<0?r:o[h][1]}function S3(s){return _o(this.__data__,s)>-1}function A3(s,o){var h=this.__data__,g=_o(h,s);return g<0?(++this.size,h.push([s,o])):h[g][1]=o,this}Vr.prototype.clear=b3,Vr.prototype.delete=w3,Vr.prototype.get=T3,Vr.prototype.has=S3,Vr.prototype.set=A3;function Xr(s){var o=-1,h=s==null?0:s.length;for(this.clear();++o<h;){var g=s[o];this.set(g[0],g[1])}}function E3(){this.size=0,this.__data__={hash:new $n,map:new(ws||Vr),string:new $n}}function C3(s){var o=Po(this,s).delete(s);return this.size-=o?1:0,o}function I3(s){return Po(this,s).get(s)}function R3(s){return Po(this,s).has(s)}function P3(s,o){var h=Po(this,s),g=h.size;return h.set(s,o),this.size+=h.size==g?0:1,this}Xr.prototype.clear=E3,Xr.prototype.delete=C3,Xr.prototype.get=I3,Xr.prototype.has=R3,Xr.prototype.set=P3;function Gn(s){var o=-1,h=s==null?0:s.length;for(this.__data__=new Xr;++o<h;)this.add(s[o])}function M3(s){return this.__data__.set(s,f),this}function O3(s){return this.__data__.has(s)}Gn.prototype.add=Gn.prototype.push=M3,Gn.prototype.has=O3;function Tr(s){var o=this.__data__=new Vr(s);this.size=o.size}function F3(){this.__data__=new Vr,this.size=0}function N3(s){var o=this.__data__,h=o.delete(s);return this.size=o.size,h}function L3(s){return this.__data__.get(s)}function k3(s){return this.__data__.has(s)}function B3(s,o){var h=this.__data__;if(h instanceof Vr){var g=h.__data__;if(!ws||g.length<i-1)return g.push([s,o]),this.size=++h.size,this;h=this.__data__=new Xr(g)}return h.set(s,o),this.size=h.size,this}Tr.prototype.clear=F3,Tr.prototype.delete=N3,Tr.prototype.get=L3,Tr.prototype.has=k3,Tr.prototype.set=B3;function Sm(s,o){var h=de(s),g=!h&&jn(s),y=!h&&!g&&mn(s),S=!h&&!g&&!y&&zi(s),C=h||g||y||S,R=C?cc(s.length,WF):[],M=R.length;for(var U in s)(o||He.call(s,U))&&!(C&&(U=="length"||y&&(U=="offset"||U=="parent")||S&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||Yr(U,M)))&&R.push(U);return R}function Am(s){var o=s.length;return o?s[Cc(0,o-1)]:r}function D3(s,o){return Mo(Gt(s),zn(o,0,s.length))}function U3(s){return Mo(Gt(s))}function vc(s,o,h){(h!==r&&!Sr(s[o],h)||h===r&&!(o in s))&&jr(s,o,h)}function Es(s,o,h){var g=s[o];(!(He.call(s,o)&&Sr(g,h))||h===r&&!(o in s))&&jr(s,o,h)}function _o(s,o){for(var h=s.length;h--;)if(Sr(s[h][0],o))return h;return-1}function $3(s,o,h,g){return fn(s,function(y,S,C){o(g,y,h(y),C)}),g}function Em(s,o){return s&&Lr(o,St(o),s)}function G3(s,o){return s&&Lr(o,Ht(o),s)}function jr(s,o,h){o=="__proto__"&&ho?ho(s,o,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[o]=h}function _c(s,o){for(var h=-1,g=o.length,y=F(g),S=s==null;++h<g;)y[h]=S?r:Qc(s,o[h]);return y}function zn(s,o,h){return s===s&&(h!==r&&(s=s<=h?s:h),o!==r&&(s=s>=o?s:o)),s}function or(s,o,h,g,y,S){var C,R=o&c,M=o&d,U=o&m;if(h&&(C=y?h(s,g,y,S):h(s)),C!==r)return C;if(!lt(s))return s;var $=de(s);if($){if(C=RN(s),!R)return Gt(s,C)}else{var G=Nt(s),q=G==De||G==Qe;if(mn(s))return Km(s,R);if(G==se||G==Me||q&&!y){if(C=M||q?{}:g0(s),!R)return M?_N(s,G3(C,s)):vN(s,Em(C,s))}else{if(!et[G])return y?s:{};C=PN(s,G,R)}}S||(S=new Tr);var te=S.get(s);if(te)return te;S.set(s,C),V0(s)?s.forEach(function(oe){C.add(or(oe,o,h,oe,s,S))}):z0(s)&&s.forEach(function(oe,we){C.set(we,or(oe,o,h,we,s,S))});var ae=U?M?Dc:Bc:M?Ht:St,me=$?r:ae(s);return ir(me||s,function(oe,we){me&&(we=oe,oe=s[we]),Es(C,we,or(oe,o,h,we,s,S))}),C}function z3(s){var o=St(s);return function(h){return Cm(h,s,o)}}function Cm(s,o,h){var g=h.length;if(s==null)return!g;for(s=qe(s);g--;){var y=h[g],S=o[y],C=s[y];if(C===r&&!(y in s)||!S(C))return!1}return!0}function Im(s,o,h){if(typeof s!="function")throw new sr(u);return Fs(function(){s.apply(r,h)},o)}function Cs(s,o,h,g){var y=-1,S=eo,C=!0,R=s.length,M=[],U=o.length;if(!R)return M;h&&(o=it(o,qt(h))),g?(S=ic,C=!1):o.length>=i&&(S=xs,C=!1,o=new Gn(o));e:for(;++y<R;){var $=s[y],G=h==null?$:h($);if($=g||$!==0?$:0,C&&G===G){for(var q=U;q--;)if(o[q]===G)continue e;M.push($)}else S(o,G,g)||M.push($)}return M}var fn=t0(Nr),Rm=t0(xc,!0);function H3(s,o){var h=!0;return fn(s,function(g,y,S){return h=!!o(g,y,S),h}),h}function yo(s,o,h){for(var g=-1,y=s.length;++g<y;){var S=s[g],C=o(S);if(C!=null&&(R===r?C===C&&!Kt(C):h(C,R)))var R=C,M=S}return M}function V3(s,o,h,g){var y=s.length;for(h=ge(h),h<0&&(h=-h>y?0:y+h),g=g===r||g>y?y:ge(g),g<0&&(g+=y),g=h>g?0:j0(g);h<g;)s[h++]=o;return s}function Pm(s,o){var h=[];return fn(s,function(g,y,S){o(g,y,S)&&h.push(g)}),h}function It(s,o,h,g,y){var S=-1,C=s.length;for(h||(h=ON),y||(y=[]);++S<C;){var R=s[S];o>0&&h(R)?o>1?It(R,o-1,h,g,y):ln(y,R):g||(y[y.length]=R)}return y}var yc=r0(),Mm=r0(!0);function Nr(s,o){return s&&yc(s,o,St)}function xc(s,o){return s&&Mm(s,o,St)}function xo(s,o){return un(o,function(h){return Kr(s[h])})}function Hn(s,o){o=pn(o,s);for(var h=0,g=o.length;s!=null&&h<g;)s=s[kr(o[h++])];return h&&h==g?s:r}function Om(s,o,h){var g=o(s);return de(s)?g:ln(g,h(s))}function Dt(s){return s==null?s===r?Ul:J:Un&&Un in qe(s)?EN(s):UN(s)}function bc(s,o){return s>o}function X3(s,o){return s!=null&&He.call(s,o)}function j3(s,o){return s!=null&&o in qe(s)}function W3(s,o,h){return s>=Ft(o,h)&&s<yt(o,h)}function wc(s,o,h){for(var g=h?ic:eo,y=s[0].length,S=s.length,C=S,R=F(S),M=1/0,U=[];C--;){var $=s[C];C&&o&&($=it($,qt(o))),M=Ft($.length,M),R[C]=!h&&(o||y>=120&&$.length>=120)?new Gn(C&&$):r}$=s[0];var G=-1,q=R[0];e:for(;++G<y&&U.length<M;){var te=$[G],ae=o?o(te):te;if(te=h||te!==0?te:0,!(q?xs(q,ae):g(U,ae,h))){for(C=S;--C;){var me=R[C];if(!(me?xs(me,ae):g(s[C],ae,h)))continue e}q&&q.push(ae),U.push(te)}}return U}function q3(s,o,h,g){return Nr(s,function(y,S,C){o(g,h(y),S,C)}),g}function Is(s,o,h){o=pn(o,s),s=y0(s,o);var g=s==null?s:s[kr(lr(o))];return g==null?r:Wt(g,s,h)}function Fm(s){return ht(s)&&Dt(s)==Me}function Y3(s){return ht(s)&&Dt(s)==ys}function K3(s){return ht(s)&&Dt(s)==Ke}function Rs(s,o,h,g,y){return s===o?!0:s==null||o==null||!ht(s)&&!ht(o)?s!==s&&o!==o:Z3(s,o,h,g,Rs,y)}function Z3(s,o,h,g,y,S){var C=de(s),R=de(o),M=C?Oe:Nt(s),U=R?Oe:Nt(o);M=M==Me?se:M,U=U==Me?se:U;var $=M==se,G=U==se,q=M==U;if(q&&mn(s)){if(!mn(o))return!1;C=!0,$=!1}if(q&&!$)return S||(S=new Tr),C||zi(s)?f0(s,o,h,g,y,S):SN(s,o,M,h,g,y,S);if(!(h&_)){var te=$&&He.call(s,"__wrapped__"),ae=G&&He.call(o,"__wrapped__");if(te||ae){var me=te?s.value():s,oe=ae?o.value():o;return S||(S=new Tr),y(me,oe,h,g,S)}}return q?(S||(S=new Tr),AN(s,o,h,g,y,S)):!1}function Q3(s){return ht(s)&&Nt(s)==Je}function Tc(s,o,h,g){var y=h.length,S=y,C=!g;if(s==null)return!S;for(s=qe(s);y--;){var R=h[y];if(C&&R[2]?R[1]!==s[R[0]]:!(R[0]in s))return!1}for(;++y<S;){R=h[y];var M=R[0],U=s[M],$=R[1];if(C&&R[2]){if(U===r&&!(M in s))return!1}else{var G=new Tr;if(g)var q=g(U,$,M,s,o,G);if(!(q===r?Rs($,U,_|b,g,G):q))return!1}}return!0}function Nm(s){if(!lt(s)||NN(s))return!1;var o=Kr(s)?QF:zO;return o.test(Xn(s))}function J3(s){return ht(s)&&Dt(s)==Ot}function eN(s){return ht(s)&&Nt(s)==mt}function tN(s){return ht(s)&&Bo(s.length)&&!!rt[Dt(s)]}function Lm(s){return typeof s=="function"?s:s==null?Vt:typeof s=="object"?de(s)?Dm(s[0],s[1]):Bm(s):nv(s)}function Sc(s){if(!Os(s))return i3(s);var o=[];for(var h in qe(s))He.call(s,h)&&h!="constructor"&&o.push(h);return o}function rN(s){if(!lt(s))return DN(s);var o=Os(s),h=[];for(var g in s)g=="constructor"&&(o||!He.call(s,g))||h.push(g);return h}function Ac(s,o){return s<o}function km(s,o){var h=-1,g=zt(s)?F(s.length):[];return fn(s,function(y,S,C){g[++h]=o(y,S,C)}),g}function Bm(s){var o=$c(s);return o.length==1&&o[0][2]?v0(o[0][0],o[0][1]):function(h){return h===s||Tc(h,s,o)}}function Dm(s,o){return zc(s)&&m0(o)?v0(kr(s),o):function(h){var g=Qc(h,s);return g===r&&g===o?Jc(h,s):Rs(o,g,_|b)}}function bo(s,o,h,g,y){s!==o&&yc(o,function(S,C){if(y||(y=new Tr),lt(S))nN(s,o,C,h,bo,g,y);else{var R=g?g(Vc(s,C),S,C+"",s,o,y):r;R===r&&(R=S),vc(s,C,R)}},Ht)}function nN(s,o,h,g,y,S,C){var R=Vc(s,h),M=Vc(o,h),U=C.get(M);if(U){vc(s,h,U);return}var $=S?S(R,M,h+"",s,o,C):r,G=$===r;if(G){var q=de(M),te=!q&&mn(M),ae=!q&&!te&&zi(M);$=M,q||te||ae?de(R)?$=R:dt(R)?$=Gt(R):te?(G=!1,$=Km(M,!0)):ae?(G=!1,$=Zm(M,!0)):$=[]:Ns(M)||jn(M)?($=R,jn(R)?$=W0(R):(!lt(R)||Kr(R))&&($=g0(M))):G=!1}G&&(C.set(M,$),y($,M,g,S,C),C.delete(M)),vc(s,h,$)}function Um(s,o){var h=s.length;if(h)return o+=o<0?h:0,Yr(o,h)?s[o]:r}function $m(s,o,h){o.length?o=it(o,function(S){return de(S)?function(C){return Hn(C,S.length===1?S[0]:S)}:S}):o=[Vt];var g=-1;o=it(o,qt(ie()));var y=km(s,function(S,C,R){var M=it(o,function(U){return U(S)});return{criteria:M,index:++g,value:S}});return PF(y,function(S,C){return mN(S,C,h)})}function iN(s,o){return Gm(s,o,function(h,g){return Jc(s,g)})}function Gm(s,o,h){for(var g=-1,y=o.length,S={};++g<y;){var C=o[g],R=Hn(s,C);h(R,C)&&Ps(S,pn(C,s),R)}return S}function sN(s){return function(o){return Hn(o,s)}}function Ec(s,o,h,g){var y=g?RF:Mi,S=-1,C=o.length,R=s;for(s===o&&(o=Gt(o)),h&&(R=it(s,qt(h)));++S<C;)for(var M=0,U=o[S],$=h?h(U):U;(M=y(R,$,M,g))>-1;)R!==s&&co.call(R,M,1),co.call(s,M,1);return s}function zm(s,o){for(var h=s?o.length:0,g=h-1;h--;){var y=o[h];if(h==g||y!==S){var S=y;Yr(y)?co.call(s,y,1):Pc(s,y)}}return s}function Cc(s,o){return s+po(wm()*(o-s+1))}function aN(s,o,h,g){for(var y=-1,S=yt(fo((o-s)/(h||1)),0),C=F(S);S--;)C[g?S:++y]=s,s+=h;return C}function Ic(s,o){var h="";if(!s||o<1||o>ee)return h;do o%2&&(h+=s),o=po(o/2),o&&(s+=s);while(o);return h}function _e(s,o){return Xc(_0(s,o,Vt),s+"")}function oN(s){return Am(Hi(s))}function uN(s,o){var h=Hi(s);return Mo(h,zn(o,0,h.length))}function Ps(s,o,h,g){if(!lt(s))return s;o=pn(o,s);for(var y=-1,S=o.length,C=S-1,R=s;R!=null&&++y<S;){var M=kr(o[y]),U=h;if(M==="__proto__"||M==="constructor"||M==="prototype")return s;if(y!=C){var $=R[M];U=g?g($,M,R):r,U===r&&(U=lt($)?$:Yr(o[y+1])?[]:{})}Es(R,M,U),R=R[M]}return s}var Hm=go?function(s,o){return go.set(s,o),s}:Vt,lN=ho?function(s,o){return ho(s,"toString",{configurable:!0,enumerable:!1,value:th(o),writable:!0})}:Vt;function cN(s){return Mo(Hi(s))}function ur(s,o,h){var g=-1,y=s.length;o<0&&(o=-o>y?0:y+o),h=h>y?y:h,h<0&&(h+=y),y=o>h?0:h-o>>>0,o>>>=0;for(var S=F(y);++g<y;)S[g]=s[g+o];return S}function hN(s,o){var h;return fn(s,function(g,y,S){return h=o(g,y,S),!h}),!!h}function wo(s,o,h){var g=0,y=s==null?g:s.length;if(typeof o=="number"&&o===o&&y<=Se){for(;g<y;){var S=g+y>>>1,C=s[S];C!==null&&!Kt(C)&&(h?C<=o:C<o)?g=S+1:y=S}return y}return Rc(s,o,Vt,h)}function Rc(s,o,h,g){var y=0,S=s==null?0:s.length;if(S===0)return 0;o=h(o);for(var C=o!==o,R=o===null,M=Kt(o),U=o===r;y<S;){var $=po((y+S)/2),G=h(s[$]),q=G!==r,te=G===null,ae=G===G,me=Kt(G);if(C)var oe=g||ae;else U?oe=ae&&(g||q):R?oe=ae&&q&&(g||!te):M?oe=ae&&q&&!te&&(g||!me):te||me?oe=!1:oe=g?G<=o:G<o;oe?y=$+1:S=$}return Ft(S,ce)}function Vm(s,o){for(var h=-1,g=s.length,y=0,S=[];++h<g;){var C=s[h],R=o?o(C):C;if(!h||!Sr(R,M)){var M=R;S[y++]=C===0?0:C}}return S}function Xm(s){return typeof s=="number"?s:Kt(s)?X:+s}function Yt(s){if(typeof s=="string")return s;if(de(s))return it(s,Yt)+"";if(Kt(s))return Tm?Tm.call(s):"";var o=s+"";return o=="0"&&1/s==-z?"-0":o}function dn(s,o,h){var g=-1,y=eo,S=s.length,C=!0,R=[],M=R;if(h)C=!1,y=ic;else if(S>=i){var U=o?null:wN(s);if(U)return ro(U);C=!1,y=xs,M=new Gn}else M=o?[]:R;e:for(;++g<S;){var $=s[g],G=o?o($):$;if($=h||$!==0?$:0,C&&G===G){for(var q=M.length;q--;)if(M[q]===G)continue e;o&&M.push(G),R.push($)}else y(M,G,h)||(M!==R&&M.push(G),R.push($))}return R}function Pc(s,o){return o=pn(o,s),s=y0(s,o),s==null||delete s[kr(lr(o))]}function jm(s,o,h,g){return Ps(s,o,h(Hn(s,o)),g)}function To(s,o,h,g){for(var y=s.length,S=g?y:-1;(g?S--:++S<y)&&o(s[S],S,s););return h?ur(s,g?0:S,g?S+1:y):ur(s,g?S+1:0,g?y:S)}function Wm(s,o){var h=s;return h instanceof Ae&&(h=h.value()),sc(o,function(g,y){return y.func.apply(y.thisArg,ln([g],y.args))},h)}function Mc(s,o,h){var g=s.length;if(g<2)return g?dn(s[0]):[];for(var y=-1,S=F(g);++y<g;)for(var C=s[y],R=-1;++R<g;)R!=y&&(S[y]=Cs(S[y]||C,s[R],o,h));return dn(It(S,1),o,h)}function qm(s,o,h){for(var g=-1,y=s.length,S=o.length,C={};++g<y;){var R=g<S?o[g]:r;h(C,s[g],R)}return C}function Oc(s){return dt(s)?s:[]}function Fc(s){return typeof s=="function"?s:Vt}function pn(s,o){return de(s)?s:zc(s,o)?[s]:T0(Ue(s))}var fN=_e;function gn(s,o,h){var g=s.length;return h=h===r?g:h,!o&&h>=g?s:ur(s,o,h)}var Ym=JF||function(s){return Ct.clearTimeout(s)};function Km(s,o){if(o)return s.slice();var h=s.length,g=vm?vm(h):new s.constructor(h);return s.copy(g),g}function Nc(s){var o=new s.constructor(s.byteLength);return new uo(o).set(new uo(s)),o}function dN(s,o){var h=o?Nc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}function pN(s){var o=new s.constructor(s.source,Fg.exec(s));return o.lastIndex=s.lastIndex,o}function gN(s){return As?qe(As.call(s)):{}}function Zm(s,o){var h=o?Nc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}function Qm(s,o){if(s!==o){var h=s!==r,g=s===null,y=s===s,S=Kt(s),C=o!==r,R=o===null,M=o===o,U=Kt(o);if(!R&&!U&&!S&&s>o||S&&C&&M&&!R&&!U||g&&C&&M||!h&&M||!y)return 1;if(!g&&!S&&!U&&s<o||U&&h&&y&&!g&&!S||R&&h&&y||!C&&y||!M)return-1}return 0}function mN(s,o,h){for(var g=-1,y=s.criteria,S=o.criteria,C=y.length,R=h.length;++g<C;){var M=Qm(y[g],S[g]);if(M){if(g>=R)return M;var U=h[g];return M*(U=="desc"?-1:1)}}return s.index-o.index}function Jm(s,o,h,g){for(var y=-1,S=s.length,C=h.length,R=-1,M=o.length,U=yt(S-C,0),$=F(M+U),G=!g;++R<M;)$[R]=o[R];for(;++y<C;)(G||y<S)&&($[h[y]]=s[y]);for(;U--;)$[R++]=s[y++];return $}function e0(s,o,h,g){for(var y=-1,S=s.length,C=-1,R=h.length,M=-1,U=o.length,$=yt(S-R,0),G=F($+U),q=!g;++y<$;)G[y]=s[y];for(var te=y;++M<U;)G[te+M]=o[M];for(;++C<R;)(q||y<S)&&(G[te+h[C]]=s[y++]);return G}function Gt(s,o){var h=-1,g=s.length;for(o||(o=F(g));++h<g;)o[h]=s[h];return o}function Lr(s,o,h,g){var y=!h;h||(h={});for(var S=-1,C=o.length;++S<C;){var R=o[S],M=g?g(h[R],s[R],R,h,s):r;M===r&&(M=s[R]),y?jr(h,R,M):Es(h,R,M)}return h}function vN(s,o){return Lr(s,Gc(s),o)}function _N(s,o){return Lr(s,d0(s),o)}function So(s,o){return function(h,g){var y=de(h)?TF:$3,S=o?o():{};return y(h,s,ie(g,2),S)}}function Ui(s){return _e(function(o,h){var g=-1,y=h.length,S=y>1?h[y-1]:r,C=y>2?h[2]:r;for(S=s.length>3&&typeof S=="function"?(y--,S):r,C&&Ut(h[0],h[1],C)&&(S=y<3?r:S,y=1),o=qe(o);++g<y;){var R=h[g];R&&s(o,R,g,S)}return o})}function t0(s,o){return function(h,g){if(h==null)return h;if(!zt(h))return s(h,g);for(var y=h.length,S=o?y:-1,C=qe(h);(o?S--:++S<y)&&g(C[S],S,C)!==!1;);return h}}function r0(s){return function(o,h,g){for(var y=-1,S=qe(o),C=g(o),R=C.length;R--;){var M=C[s?R:++y];if(h(S[M],M,S)===!1)break}return o}}function yN(s,o,h){var g=o&x,y=Ms(s);function S(){var C=this&&this!==Ct&&this instanceof S?y:s;return C.apply(g?h:this,arguments)}return S}function n0(s){return function(o){o=Ue(o);var h=Oi(o)?wr(o):r,g=h?h[0]:o.charAt(0),y=h?gn(h,1).join(""):o.slice(1);return g[s]()+y}}function $i(s){return function(o){return sc(tv(ev(o).replace(lF,"")),s,"")}}function Ms(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=Di(s.prototype),g=s.apply(h,o);return lt(g)?g:h}}function xN(s,o,h){var g=Ms(s);function y(){for(var S=arguments.length,C=F(S),R=S,M=Gi(y);R--;)C[R]=arguments[R];var U=S<3&&C[0]!==M&&C[S-1]!==M?[]:cn(C,M);if(S-=U.length,S<h)return u0(s,o,Ao,y.placeholder,r,C,U,r,r,h-S);var $=this&&this!==Ct&&this instanceof y?g:s;return Wt($,this,C)}return y}function i0(s){return function(o,h,g){var y=qe(o);if(!zt(o)){var S=ie(h,3);o=St(o),h=function(R){return S(y[R],R,y)}}var C=s(o,h,g);return C>-1?y[S?o[C]:C]:r}}function s0(s){return qr(function(o){var h=o.length,g=h,y=ar.prototype.thru;for(s&&o.reverse();g--;){var S=o[g];if(typeof S!="function")throw new sr(u);if(y&&!C&&Ro(S)=="wrapper")var C=new ar([],!0)}for(g=C?g:h;++g<h;){S=o[g];var R=Ro(S),M=R=="wrapper"?Uc(S):r;M&&Hc(M[0])&&M[1]==(L|A|O|k)&&!M[4].length&&M[9]==1?C=C[Ro(M[0])].apply(C,M[3]):C=S.length==1&&Hc(S)?C[R]():C.thru(S)}return function(){var U=arguments,$=U[0];if(C&&U.length==1&&de($))return C.plant($).value();for(var G=0,q=h?o[G].apply(this,U):$;++G<h;)q=o[G].call(this,q);return q}})}function Ao(s,o,h,g,y,S,C,R,M,U){var $=o&L,G=o&x,q=o&w,te=o&(A|I),ae=o&D,me=q?r:Ms(s);function oe(){for(var we=arguments.length,Ie=F(we),Zt=we;Zt--;)Ie[Zt]=arguments[Zt];if(te)var $t=Gi(oe),Qt=OF(Ie,$t);if(g&&(Ie=Jm(Ie,g,y,te)),S&&(Ie=e0(Ie,S,C,te)),we-=Qt,te&&we<U){var pt=cn(Ie,$t);return u0(s,o,Ao,oe.placeholder,h,Ie,pt,R,M,U-we)}var Ar=G?h:this,Qr=q?Ar[s]:s;return we=Ie.length,R?Ie=$N(Ie,R):ae&&we>1&&Ie.reverse(),$&&M<we&&(Ie.length=M),this&&this!==Ct&&this instanceof oe&&(Qr=me||Ms(Qr)),Qr.apply(Ar,Ie)}return oe}function a0(s,o){return function(h,g){return q3(h,s,o(g),{})}}function Eo(s,o){return function(h,g){var y;if(h===r&&g===r)return o;if(h!==r&&(y=h),g!==r){if(y===r)return g;typeof h=="string"||typeof g=="string"?(h=Yt(h),g=Yt(g)):(h=Xm(h),g=Xm(g)),y=s(h,g)}return y}}function Lc(s){return qr(function(o){return o=it(o,qt(ie())),_e(function(h){var g=this;return s(o,function(y){return Wt(y,g,h)})})})}function Co(s,o){o=o===r?" ":Yt(o);var h=o.length;if(h<2)return h?Ic(o,s):o;var g=Ic(o,fo(s/Fi(o)));return Oi(o)?gn(wr(g),0,s).join(""):g.slice(0,s)}function bN(s,o,h,g){var y=o&x,S=Ms(s);function C(){for(var R=-1,M=arguments.length,U=-1,$=g.length,G=F($+M),q=this&&this!==Ct&&this instanceof C?S:s;++U<$;)G[U]=g[U];for(;M--;)G[U++]=arguments[++R];return Wt(q,y?h:this,G)}return C}function o0(s){return function(o,h,g){return g&&typeof g!="number"&&Ut(o,h,g)&&(h=g=r),o=Zr(o),h===r?(h=o,o=0):h=Zr(h),g=g===r?o<h?1:-1:Zr(g),aN(o,h,g,s)}}function Io(s){return function(o,h){return typeof o=="string"&&typeof h=="string"||(o=cr(o),h=cr(h)),s(o,h)}}function u0(s,o,h,g,y,S,C,R,M,U){var $=o&A,G=$?C:r,q=$?r:C,te=$?S:r,ae=$?r:S;o|=$?O:N,o&=~($?N:O),o&E||(o&=~(x|w));var me=[s,o,y,te,G,ae,q,R,M,U],oe=h.apply(r,me);return Hc(s)&&x0(oe,me),oe.placeholder=g,b0(oe,s,o)}function kc(s){var o=_t[s];return function(h,g){if(h=cr(h),g=g==null?0:Ft(ge(g),292),g&&bm(h)){var y=(Ue(h)+"e").split("e"),S=o(y[0]+"e"+(+y[1]+g));return y=(Ue(S)+"e").split("e"),+(y[0]+"e"+(+y[1]-g))}return o(h)}}var wN=ki&&1/ro(new ki([,-0]))[1]==z?function(s){return new ki(s)}:ih;function l0(s){return function(o){var h=Nt(o);return h==Je?fc(o):h==mt?UF(o):MF(o,s(o))}}function Wr(s,o,h,g,y,S,C,R){var M=o&w;if(!M&&typeof s!="function")throw new sr(u);var U=g?g.length:0;if(U||(o&=~(O|N),g=y=r),C=C===r?C:yt(ge(C),0),R=R===r?R:ge(R),U-=y?y.length:0,o&N){var $=g,G=y;g=y=r}var q=M?r:Uc(s),te=[s,o,h,g,y,$,G,S,C,R];if(q&&BN(te,q),s=te[0],o=te[1],h=te[2],g=te[3],y=te[4],R=te[9]=te[9]===r?M?0:s.length:yt(te[9]-U,0),!R&&o&(A|I)&&(o&=~(A|I)),!o||o==x)var ae=yN(s,o,h);else o==A||o==I?ae=xN(s,o,R):(o==O||o==(x|O))&&!y.length?ae=bN(s,o,h,g):ae=Ao.apply(r,te);var me=q?Hm:x0;return b0(me(ae,te),s,o)}function c0(s,o,h,g){return s===r||Sr(s,Li[h])&&!He.call(g,h)?o:s}function h0(s,o,h,g,y,S){return lt(s)&&lt(o)&&(S.set(o,s),bo(s,o,r,h0,S),S.delete(o)),s}function TN(s){return Ns(s)?r:s}function f0(s,o,h,g,y,S){var C=h&_,R=s.length,M=o.length;if(R!=M&&!(C&&M>R))return!1;var U=S.get(s),$=S.get(o);if(U&&$)return U==o&&$==s;var G=-1,q=!0,te=h&b?new Gn:r;for(S.set(s,o),S.set(o,s);++G<R;){var ae=s[G],me=o[G];if(g)var oe=C?g(me,ae,G,o,s,S):g(ae,me,G,s,o,S);if(oe!==r){if(oe)continue;q=!1;break}if(te){if(!ac(o,function(we,Ie){if(!xs(te,Ie)&&(ae===we||y(ae,we,h,g,S)))return te.push(Ie)})){q=!1;break}}else if(!(ae===me||y(ae,me,h,g,S))){q=!1;break}}return S.delete(s),S.delete(o),q}function SN(s,o,h,g,y,S,C){switch(h){case Ri:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case ys:return!(s.byteLength!=o.byteLength||!S(new uo(s),new uo(o)));case ze:case Ke:case Le:return Sr(+s,+o);case be:return s.name==o.name&&s.message==o.message;case Ot:case Hr:return s==o+"";case Je:var R=fc;case mt:var M=g&_;if(R||(R=ro),s.size!=o.size&&!M)return!1;var U=C.get(s);if(U)return U==o;g|=b,C.set(s,o);var $=f0(R(s),R(o),g,y,S,C);return C.delete(s),$;case Ii:if(As)return As.call(s)==As.call(o)}return!1}function AN(s,o,h,g,y,S){var C=h&_,R=Bc(s),M=R.length,U=Bc(o),$=U.length;if(M!=$&&!C)return!1;for(var G=M;G--;){var q=R[G];if(!(C?q in o:He.call(o,q)))return!1}var te=S.get(s),ae=S.get(o);if(te&&ae)return te==o&&ae==s;var me=!0;S.set(s,o),S.set(o,s);for(var oe=C;++G<M;){q=R[G];var we=s[q],Ie=o[q];if(g)var Zt=C?g(Ie,we,q,o,s,S):g(we,Ie,q,s,o,S);if(!(Zt===r?we===Ie||y(we,Ie,h,g,S):Zt)){me=!1;break}oe||(oe=q=="constructor")}if(me&&!oe){var $t=s.constructor,Qt=o.constructor;$t!=Qt&&"constructor"in s&&"constructor"in o&&!(typeof $t=="function"&&$t instanceof $t&&typeof Qt=="function"&&Qt instanceof Qt)&&(me=!1)}return S.delete(s),S.delete(o),me}function qr(s){return Xc(_0(s,r,C0),s+"")}function Bc(s){return Om(s,St,Gc)}function Dc(s){return Om(s,Ht,d0)}var Uc=go?function(s){return go.get(s)}:ih;function Ro(s){for(var o=s.name+"",h=Bi[o],g=He.call(Bi,o)?h.length:0;g--;){var y=h[g],S=y.func;if(S==null||S==s)return y.name}return o}function Gi(s){var o=He.call(T,"placeholder")?T:s;return o.placeholder}function ie(){var s=T.iteratee||rh;return s=s===rh?Lm:s,arguments.length?s(arguments[0],arguments[1]):s}function Po(s,o){var h=s.__data__;return FN(o)?h[typeof o=="string"?"string":"hash"]:h.map}function $c(s){for(var o=St(s),h=o.length;h--;){var g=o[h],y=s[g];o[h]=[g,y,m0(y)]}return o}function Vn(s,o){var h=kF(s,o);return Nm(h)?h:r}function EN(s){var o=He.call(s,Un),h=s[Un];try{s[Un]=r;var g=!0}catch{}var y=ao.call(s);return g&&(o?s[Un]=h:delete s[Un]),y}var Gc=pc?function(s){return s==null?[]:(s=qe(s),un(pc(s),function(o){return ym.call(s,o)}))}:sh,d0=pc?function(s){for(var o=[];s;)ln(o,Gc(s)),s=lo(s);return o}:sh,Nt=Dt;(gc&&Nt(new gc(new ArrayBuffer(1)))!=Ri||ws&&Nt(new ws)!=Je||mc&&Nt(mc.resolve())!=ut||ki&&Nt(new ki)!=mt||Ts&&Nt(new Ts)!=Bt)&&(Nt=function(s){var o=Dt(s),h=o==se?s.constructor:r,g=h?Xn(h):"";if(g)switch(g){case u3:return Ri;case l3:return Je;case c3:return ut;case h3:return mt;case f3:return Bt}return o});function CN(s,o,h){for(var g=-1,y=h.length;++g<y;){var S=h[g],C=S.size;switch(S.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=Ft(o,s+C);break;case"takeRight":s=yt(s,o-C);break}}return{start:s,end:o}}function IN(s){var o=s.match(NO);return o?o[1].split(LO):[]}function p0(s,o,h){o=pn(o,s);for(var g=-1,y=o.length,S=!1;++g<y;){var C=kr(o[g]);if(!(S=s!=null&&h(s,C)))break;s=s[C]}return S||++g!=y?S:(y=s==null?0:s.length,!!y&&Bo(y)&&Yr(C,y)&&(de(s)||jn(s)))}function RN(s){var o=s.length,h=new s.constructor(o);return o&&typeof s[0]=="string"&&He.call(s,"index")&&(h.index=s.index,h.input=s.input),h}function g0(s){return typeof s.constructor=="function"&&!Os(s)?Di(lo(s)):{}}function PN(s,o,h){var g=s.constructor;switch(o){case ys:return Nc(s);case ze:case Ke:return new g(+s);case Ri:return dN(s,h);case $l:case Gl:case zl:case Hl:case Vl:case Xl:case jl:case Wl:case ql:return Zm(s,h);case Je:return new g;case Le:case Hr:return new g(s);case Ot:return pN(s);case mt:return new g;case Ii:return gN(s)}}function MN(s,o){var h=o.length;if(!h)return s;var g=h-1;return o[g]=(h>1?"& ":"")+o[g],o=o.join(h>2?", ":" "),s.replace(FO,`{
1974
1974
  /* [wrapped with `+o+`] */
1975
- `)}function ON(s){return de(s)||jn(s)||!!(xm&&s&&s[xm])}function Yr(s,o){var h=typeof s;return o=o??ee,!!o&&(h=="number"||h!="symbol"&&VO.test(s))&&s>-1&&s%1==0&&s<o}function Ut(s,o,h){if(!lt(h))return!1;var g=typeof o;return(g=="number"?zt(h)&&Yr(o,h.length):g=="string"&&o in h)?Sr(h[o],s):!1}function zc(s,o){if(de(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||Kt(s)?!0:RO.test(s)||!IO.test(s)||o!=null&&s in qe(o)}function FN(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function Hc(s){var o=Ro(s),h=T[o];if(typeof h!="function"||!(o in Ae.prototype))return!1;if(s===h)return!0;var g=Uc(h);return!!g&&s===g[0]}function NN(s){return!!mm&&mm in s}var LN=io?Kr:ah;function Os(s){var o=s&&s.constructor,h=typeof o=="function"&&o.prototype||Li;return s===h}function m0(s){return s===s&&!lt(s)}function v0(s,o){return function(h){return h==null?!1:h[s]===o&&(o!==r||s in qe(h))}}function kN(s){var o=Lo(s,function(g){return h.size===p&&h.clear(),g}),h=o.cache;return o}function BN(s,o){var h=s[1],g=o[1],y=h|g,S=y<(b|w|L),C=g==L&&h==A||g==L&&h==k&&s[7].length<=o[8]||g==(L|k)&&o[7].length<=o[8]&&h==A;if(!(S||C))return s;g&b&&(s[2]=o[2],y|=h&b?0:E);var R=o[3];if(R){var M=s[3];s[3]=M?Jm(M,R,o[4]):R,s[4]=M?cn(s[3],v):o[4]}return R=o[5],R&&(M=s[5],s[5]=M?e0(M,R,o[6]):R,s[6]=M?cn(s[5],v):o[6]),R=o[7],R&&(s[7]=R),g&L&&(s[8]=s[8]==null?o[8]:Ft(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=y,s}function DN(s){var o=[];if(s!=null)for(var h in qe(s))o.push(h);return o}function UN(s){return ao.call(s)}function _0(s,o,h){return o=yt(o===r?s.length-1:o,0),function(){for(var g=arguments,y=-1,S=yt(g.length-o,0),C=F(S);++y<S;)C[y]=g[o+y];y=-1;for(var R=F(o+1);++y<o;)R[y]=g[y];return R[o]=h(C),Wt(s,this,R)}}function y0(s,o){return o.length<2?s:Hn(s,ur(o,0,-1))}function $N(s,o){for(var h=s.length,g=Ft(o.length,h),y=Gt(s);g--;){var S=o[g];s[g]=Yr(S,h)?y[S]:r}return s}function Vc(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var x0=w0(Hm),Fs=t3||function(s,o){return Ct.setTimeout(s,o)},Xc=w0(lN);function b0(s,o,h){var g=o+"";return Xc(s,MN(g,GN(IN(g),h)))}function w0(s){var o=0,h=0;return function(){var g=s3(),y=H-(g-h);if(h=g,y>0){if(++o>=fe)return arguments[0]}else o=0;return s.apply(r,arguments)}}function Mo(s,o){var h=-1,g=s.length,y=g-1;for(o=o===r?g:o;++h<o;){var S=Cc(h,y),C=s[S];s[S]=s[h],s[h]=C}return s.length=o,s}var T0=kN(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(PO,function(h,g,y,S){o.push(y?S.replace(DO,"$1"):g||h)}),o});function kr(s){if(typeof s=="string"||Kt(s))return s;var o=s+"";return o=="0"&&1/s==-z?"-0":o}function Xn(s){if(s!=null){try{return so.call(s)}catch{}try{return s+""}catch{}}return""}function GN(s,o){return ir(xe,function(h){var g="_."+h[0];o&h[1]&&!eo(s,g)&&s.push(g)}),s.sort()}function S0(s){if(s instanceof Ae)return s.clone();var o=new ar(s.__wrapped__,s.__chain__);return o.__actions__=Gt(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function zN(s,o,h){(h?Ut(s,o,h):o===r)?o=1:o=yt(ge(o),0);var g=s==null?0:s.length;if(!g||o<1)return[];for(var y=0,S=0,C=F(fo(g/o));y<g;)C[S++]=ur(s,y,y+=o);return C}function HN(s){for(var o=-1,h=s==null?0:s.length,g=0,y=[];++o<h;){var S=s[o];S&&(y[g++]=S)}return y}function VN(){var s=arguments.length;if(!s)return[];for(var o=F(s-1),h=arguments[0],g=s;g--;)o[g-1]=arguments[g];return ln(de(h)?Gt(h):[h],It(o,1))}var XN=_e(function(s,o){return dt(s)?Cs(s,It(o,1,dt,!0)):[]}),jN=_e(function(s,o){var h=lr(o);return dt(h)&&(h=r),dt(s)?Cs(s,It(o,1,dt,!0),ie(h,2)):[]}),WN=_e(function(s,o){var h=lr(o);return dt(h)&&(h=r),dt(s)?Cs(s,It(o,1,dt,!0),r,h):[]});function qN(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:ge(o),ur(s,o<0?0:o,g)):[]}function YN(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:ge(o),o=g-o,ur(s,0,o<0?0:o)):[]}function KN(s,o){return s&&s.length?To(s,ie(o,3),!0,!0):[]}function ZN(s,o){return s&&s.length?To(s,ie(o,3),!0):[]}function QN(s,o,h,g){var y=s==null?0:s.length;return y?(h&&typeof h!="number"&&Ut(s,o,h)&&(h=0,g=y),V3(s,o,h,g)):[]}function A0(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=h==null?0:ge(h);return y<0&&(y=yt(g+y,0)),to(s,ie(o,3),y)}function E0(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=g-1;return h!==r&&(y=ge(h),y=h<0?yt(g+y,0):Ft(y,g-1)),to(s,ie(o,3),y,!0)}function C0(s){var o=s==null?0:s.length;return o?It(s,1):[]}function JN(s){var o=s==null?0:s.length;return o?It(s,z):[]}function eL(s,o){var h=s==null?0:s.length;return h?(o=o===r?1:ge(o),It(s,o)):[]}function tL(s){for(var o=-1,h=s==null?0:s.length,g={};++o<h;){var y=s[o];g[y[0]]=y[1]}return g}function I0(s){return s&&s.length?s[0]:r}function rL(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=h==null?0:ge(h);return y<0&&(y=yt(g+y,0)),Mi(s,o,y)}function nL(s){var o=s==null?0:s.length;return o?ur(s,0,-1):[]}var iL=_e(function(s){var o=it(s,Oc);return o.length&&o[0]===s[0]?wc(o):[]}),sL=_e(function(s){var o=lr(s),h=it(s,Oc);return o===lr(h)?o=r:h.pop(),h.length&&h[0]===s[0]?wc(h,ie(o,2)):[]}),aL=_e(function(s){var o=lr(s),h=it(s,Oc);return o=typeof o=="function"?o:r,o&&h.pop(),h.length&&h[0]===s[0]?wc(h,r,o):[]});function oL(s,o){return s==null?"":n3.call(s,o)}function lr(s){var o=s==null?0:s.length;return o?s[o-1]:r}function uL(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=g;return h!==r&&(y=ge(h),y=y<0?yt(g+y,0):Ft(y,g-1)),o===o?GF(s,o,y):to(s,um,y,!0)}function lL(s,o){return s&&s.length?Um(s,ge(o)):r}var cL=_e(R0);function R0(s,o){return s&&s.length&&o&&o.length?Ec(s,o):s}function hL(s,o,h){return s&&s.length&&o&&o.length?Ec(s,o,ie(h,2)):s}function fL(s,o,h){return s&&s.length&&o&&o.length?Ec(s,o,r,h):s}var dL=qr(function(s,o){var h=s==null?0:s.length,g=_c(s,o);return zm(s,it(o,function(y){return Yr(y,h)?+y:y}).sort(Qm)),g});function pL(s,o){var h=[];if(!(s&&s.length))return h;var g=-1,y=[],S=s.length;for(o=ie(o,3);++g<S;){var C=s[g];o(C,g,s)&&(h.push(C),y.push(g))}return zm(s,y),h}function jc(s){return s==null?s:o3.call(s)}function gL(s,o,h){var g=s==null?0:s.length;return g?(h&&typeof h!="number"&&Ut(s,o,h)?(o=0,h=g):(o=o==null?0:ge(o),h=h===r?g:ge(h)),ur(s,o,h)):[]}function mL(s,o){return wo(s,o)}function vL(s,o,h){return Rc(s,o,ie(h,2))}function _L(s,o){var h=s==null?0:s.length;if(h){var g=wo(s,o);if(g<h&&Sr(s[g],o))return g}return-1}function yL(s,o){return wo(s,o,!0)}function xL(s,o,h){return Rc(s,o,ie(h,2),!0)}function bL(s,o){var h=s==null?0:s.length;if(h){var g=wo(s,o,!0)-1;if(Sr(s[g],o))return g}return-1}function wL(s){return s&&s.length?Vm(s):[]}function TL(s,o){return s&&s.length?Vm(s,ie(o,2)):[]}function SL(s){var o=s==null?0:s.length;return o?ur(s,1,o):[]}function AL(s,o,h){return s&&s.length?(o=h||o===r?1:ge(o),ur(s,0,o<0?0:o)):[]}function EL(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:ge(o),o=g-o,ur(s,o<0?0:o,g)):[]}function CL(s,o){return s&&s.length?To(s,ie(o,3),!1,!0):[]}function IL(s,o){return s&&s.length?To(s,ie(o,3)):[]}var RL=_e(function(s){return dn(It(s,1,dt,!0))}),PL=_e(function(s){var o=lr(s);return dt(o)&&(o=r),dn(It(s,1,dt,!0),ie(o,2))}),ML=_e(function(s){var o=lr(s);return o=typeof o=="function"?o:r,dn(It(s,1,dt,!0),r,o)});function OL(s){return s&&s.length?dn(s):[]}function FL(s,o){return s&&s.length?dn(s,ie(o,2)):[]}function NL(s,o){return o=typeof o=="function"?o:r,s&&s.length?dn(s,r,o):[]}function Wc(s){if(!(s&&s.length))return[];var o=0;return s=un(s,function(h){if(dt(h))return o=yt(h.length,o),!0}),cc(o,function(h){return it(s,oc(h))})}function P0(s,o){if(!(s&&s.length))return[];var h=Wc(s);return o==null?h:it(h,function(g){return Wt(o,r,g)})}var LL=_e(function(s,o){return dt(s)?Cs(s,o):[]}),kL=_e(function(s){return Mc(un(s,dt))}),BL=_e(function(s){var o=lr(s);return dt(o)&&(o=r),Mc(un(s,dt),ie(o,2))}),DL=_e(function(s){var o=lr(s);return o=typeof o=="function"?o:r,Mc(un(s,dt),r,o)}),UL=_e(Wc);function $L(s,o){return qm(s||[],o||[],Es)}function GL(s,o){return qm(s||[],o||[],Ps)}var zL=_e(function(s){var o=s.length,h=o>1?s[o-1]:r;return h=typeof h=="function"?(s.pop(),h):r,P0(s,h)});function M0(s){var o=T(s);return o.__chain__=!0,o}function HL(s,o){return o(s),s}function Oo(s,o){return o(s)}var VL=qr(function(s){var o=s.length,h=o?s[0]:0,g=this.__wrapped__,y=function(S){return _c(S,s)};return o>1||this.__actions__.length||!(g instanceof Ae)||!Yr(h)?this.thru(y):(g=g.slice(h,+h+(o?1:0)),g.__actions__.push({func:Oo,args:[y],thisArg:r}),new ar(g,this.__chain__).thru(function(S){return o&&!S.length&&S.push(r),S}))});function XL(){return M0(this)}function jL(){return new ar(this.value(),this.__chain__)}function WL(){this.__values__===r&&(this.__values__=X0(this.value()));var s=this.__index__>=this.__values__.length,o=s?r:this.__values__[this.__index__++];return{done:s,value:o}}function qL(){return this}function YL(s){for(var o,h=this;h instanceof vo;){var g=S0(h);g.__index__=0,g.__values__=r,o?y.__wrapped__=g:o=g;var y=g;h=h.__wrapped__}return y.__wrapped__=s,o}function KL(){var s=this.__wrapped__;if(s instanceof Ae){var o=s;return this.__actions__.length&&(o=new Ae(this)),o=o.reverse(),o.__actions__.push({func:Oo,args:[jc],thisArg:r}),new ar(o,this.__chain__)}return this.thru(jc)}function ZL(){return Wm(this.__wrapped__,this.__actions__)}var QL=So(function(s,o,h){He.call(s,h)?++s[h]:jr(s,h,1)});function JL(s,o,h){var g=de(s)?am:H3;return h&&Ut(s,o,h)&&(o=r),g(s,ie(o,3))}function ek(s,o){var h=de(s)?un:Pm;return h(s,ie(o,3))}var tk=i0(A0),rk=i0(E0);function nk(s,o){return It(Fo(s,o),1)}function ik(s,o){return It(Fo(s,o),z)}function sk(s,o,h){return h=h===r?1:ge(h),It(Fo(s,o),h)}function O0(s,o){var h=de(s)?ir:fn;return h(s,ie(o,3))}function F0(s,o){var h=de(s)?SF:Rm;return h(s,ie(o,3))}var ak=So(function(s,o,h){He.call(s,h)?s[h].push(o):jr(s,h,[o])});function ok(s,o,h,g){s=zt(s)?s:Hi(s),h=h&&!g?ge(h):0;var y=s.length;return h<0&&(h=yt(y+h,0)),Do(s)?h<=y&&s.indexOf(o,h)>-1:!!y&&Mi(s,o,h)>-1}var uk=_e(function(s,o,h){var g=-1,y=typeof o=="function",S=zt(s)?F(s.length):[];return fn(s,function(C){S[++g]=y?Wt(o,C,h):Is(C,o,h)}),S}),lk=So(function(s,o,h){jr(s,h,o)});function Fo(s,o){var h=de(s)?it:km;return h(s,ie(o,3))}function ck(s,o,h,g){return s==null?[]:(de(o)||(o=o==null?[]:[o]),h=g?r:h,de(h)||(h=h==null?[]:[h]),$m(s,o,h))}var hk=So(function(s,o,h){s[h?0:1].push(o)},function(){return[[],[]]});function fk(s,o,h){var g=de(s)?sc:cm,y=arguments.length<3;return g(s,ie(o,4),h,y,fn)}function dk(s,o,h){var g=de(s)?AF:cm,y=arguments.length<3;return g(s,ie(o,4),h,y,Rm)}function pk(s,o){var h=de(s)?un:Pm;return h(s,ko(ie(o,3)))}function gk(s){var o=de(s)?Am:oN;return o(s)}function mk(s,o,h){(h?Ut(s,o,h):o===r)?o=1:o=ge(o);var g=de(s)?D3:uN;return g(s,o)}function vk(s){var o=de(s)?U3:cN;return o(s)}function _k(s){if(s==null)return 0;if(zt(s))return Do(s)?Fi(s):s.length;var o=Nt(s);return o==Je||o==mt?s.size:Sc(s).length}function yk(s,o,h){var g=de(s)?ac:hN;return h&&Ut(s,o,h)&&(o=r),g(s,ie(o,3))}var xk=_e(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]]),$m(s,It(o,1),[])}),No=e3||function(){return Ct.Date.now()};function bk(s,o){if(typeof o!="function")throw new sr(u);return s=ge(s),function(){if(--s<1)return o.apply(this,arguments)}}function N0(s,o,h){return o=h?r:o,o=s&&o==null?s.length:o,Wr(s,L,r,r,r,r,o)}function L0(s,o){var h;if(typeof o!="function")throw new sr(u);return s=ge(s),function(){return--s>0&&(h=o.apply(this,arguments)),s<=1&&(o=r),h}}var qc=_e(function(s,o,h){var g=b;if(h.length){var y=cn(h,Gi(qc));g|=O}return Wr(s,g,o,h,y)}),k0=_e(function(s,o,h){var g=b|w;if(h.length){var y=cn(h,Gi(k0));g|=O}return Wr(o,g,s,h,y)});function B0(s,o,h){o=h?r:o;var g=Wr(s,A,r,r,r,r,r,o);return g.placeholder=B0.placeholder,g}function D0(s,o,h){o=h?r:o;var g=Wr(s,I,r,r,r,r,r,o);return g.placeholder=D0.placeholder,g}function U0(s,o,h){var g,y,S,C,R,M,U=0,$=!1,G=!1,q=!0;if(typeof s!="function")throw new sr(u);o=cr(o)||0,lt(h)&&($=!!h.leading,G="maxWait"in h,S=G?yt(cr(h.maxWait)||0,o):S,q="trailing"in h?!!h.trailing:q);function te(pt){var Ar=g,Qr=y;return g=y=r,U=pt,C=s.apply(Qr,Ar),C}function ae(pt){return U=pt,R=Fs(we,o),$?te(pt):C}function me(pt){var Ar=pt-M,Qr=pt-U,iv=o-Ar;return G?Ft(iv,S-Qr):iv}function oe(pt){var Ar=pt-M,Qr=pt-U;return M===r||Ar>=o||Ar<0||G&&Qr>=S}function we(){var pt=No();if(oe(pt))return Ie(pt);R=Fs(we,me(pt))}function Ie(pt){return R=r,q&&g?te(pt):(g=y=r,C)}function Zt(){R!==r&&Ym(R),U=0,g=M=y=R=r}function $t(){return R===r?C:Ie(No())}function Qt(){var pt=No(),Ar=oe(pt);if(g=arguments,y=this,M=pt,Ar){if(R===r)return ae(M);if(G)return Ym(R),R=Fs(we,o),te(M)}return R===r&&(R=Fs(we,o)),C}return Qt.cancel=Zt,Qt.flush=$t,Qt}var wk=_e(function(s,o){return Im(s,1,o)}),Tk=_e(function(s,o,h){return Im(s,cr(o)||0,h)});function Sk(s){return Wr(s,D)}function Lo(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new sr(u);var h=function(){var g=arguments,y=o?o.apply(this,g):g[0],S=h.cache;if(S.has(y))return S.get(y);var C=s.apply(this,g);return h.cache=S.set(y,C)||S,C};return h.cache=new(Lo.Cache||Xr),h}Lo.Cache=Xr;function ko(s){if(typeof s!="function")throw new sr(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 Ak(s){return L0(2,s)}var Ek=fN(function(s,o){o=o.length==1&&de(o[0])?it(o[0],qt(ie())):it(It(o,1),qt(ie()));var h=o.length;return _e(function(g){for(var y=-1,S=Ft(g.length,h);++y<S;)g[y]=o[y].call(this,g[y]);return Wt(s,this,g)})}),Yc=_e(function(s,o){var h=cn(o,Gi(Yc));return Wr(s,O,r,o,h)}),$0=_e(function(s,o){var h=cn(o,Gi($0));return Wr(s,N,r,o,h)}),Ck=qr(function(s,o){return Wr(s,k,r,r,r,o)});function Ik(s,o){if(typeof s!="function")throw new sr(u);return o=o===r?o:ge(o),_e(s,o)}function Rk(s,o){if(typeof s!="function")throw new sr(u);return o=o==null?0:yt(ge(o),0),_e(function(h){var g=h[o],y=gn(h,0,o);return g&&ln(y,g),Wt(s,this,y)})}function Pk(s,o,h){var g=!0,y=!0;if(typeof s!="function")throw new sr(u);return lt(h)&&(g="leading"in h?!!h.leading:g,y="trailing"in h?!!h.trailing:y),U0(s,o,{leading:g,maxWait:o,trailing:y})}function Mk(s){return N0(s,1)}function Ok(s,o){return Yc(Fc(o),s)}function Fk(){if(!arguments.length)return[];var s=arguments[0];return de(s)?s:[s]}function Nk(s){return or(s,m)}function Lk(s,o){return o=typeof o=="function"?o:r,or(s,m,o)}function kk(s){return or(s,c|m)}function Bk(s,o){return o=typeof o=="function"?o:r,or(s,c|m,o)}function Dk(s,o){return o==null||Cm(s,o,St(o))}function Sr(s,o){return s===o||s!==s&&o!==o}var Uk=Io(bc),$k=Io(function(s,o){return s>=o}),jn=Fm(function(){return arguments}())?Fm:function(s){return ht(s)&&He.call(s,"callee")&&!ym.call(s,"callee")},de=F.isArray,Gk=em?qt(em):Y3;function zt(s){return s!=null&&Bo(s.length)&&!Kr(s)}function dt(s){return ht(s)&&zt(s)}function zk(s){return s===!0||s===!1||ht(s)&&Dt(s)==ze}var mn=r3||ah,Hk=tm?qt(tm):K3;function Vk(s){return ht(s)&&s.nodeType===1&&!Ns(s)}function Xk(s){if(s==null)return!0;if(zt(s)&&(de(s)||typeof s=="string"||typeof s.splice=="function"||mn(s)||zi(s)||jn(s)))return!s.length;var o=Nt(s);if(o==Je||o==mt)return!s.size;if(Os(s))return!Sc(s).length;for(var h in s)if(He.call(s,h))return!1;return!0}function jk(s,o){return Rs(s,o)}function Wk(s,o,h){h=typeof h=="function"?h:r;var g=h?h(s,o):r;return g===r?Rs(s,o,r,h):!!g}function Kc(s){if(!ht(s))return!1;var o=Dt(s);return o==be||o==Ze||typeof s.message=="string"&&typeof s.name=="string"&&!Ns(s)}function qk(s){return typeof s=="number"&&bm(s)}function Kr(s){if(!lt(s))return!1;var o=Dt(s);return o==De||o==Qe||o==Ge||o==rr}function G0(s){return typeof s=="number"&&s==ge(s)}function Bo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ee}function lt(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function ht(s){return s!=null&&typeof s=="object"}var z0=rm?qt(rm):Q3;function Yk(s,o){return s===o||Tc(s,o,$c(o))}function Kk(s,o,h){return h=typeof h=="function"?h:r,Tc(s,o,$c(o),h)}function Zk(s){return H0(s)&&s!=+s}function Qk(s){if(LN(s))throw new he(a);return Nm(s)}function Jk(s){return s===null}function eB(s){return s==null}function H0(s){return typeof s=="number"||ht(s)&&Dt(s)==Le}function Ns(s){if(!ht(s)||Dt(s)!=se)return!1;var o=lo(s);if(o===null)return!0;var h=He.call(o,"constructor")&&o.constructor;return typeof h=="function"&&h instanceof h&&so.call(h)==KF}var Zc=nm?qt(nm):J3;function tB(s){return G0(s)&&s>=-ee&&s<=ee}var V0=im?qt(im):eN;function Do(s){return typeof s=="string"||!de(s)&&ht(s)&&Dt(s)==Hr}function Kt(s){return typeof s=="symbol"||ht(s)&&Dt(s)==Ii}var zi=sm?qt(sm):tN;function rB(s){return s===r}function nB(s){return ht(s)&&Nt(s)==Bt}function iB(s){return ht(s)&&Dt(s)==Rg}var sB=Io(Ac),aB=Io(function(s,o){return s<=o});function X0(s){if(!s)return[];if(zt(s))return Do(s)?wr(s):Gt(s);if(bs&&s[bs])return DF(s[bs]());var o=Nt(s),h=o==Je?fc:o==mt?ro:Hi;return h(s)}function Zr(s){if(!s)return s===0?s:0;if(s=cr(s),s===z||s===-z){var o=s<0?-1:1;return o*pe}return s===s?s:0}function ge(s){var o=Zr(s),h=o%1;return o===o?h?o-h:o:0}function j0(s){return s?zn(ge(s),0,Y):0}function cr(s){if(typeof s=="number")return s;if(Kt(s))return X;if(lt(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=lt(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=hm(s);var h=GO.test(s);return h||HO.test(s)?bF(s.slice(2),h?2:8):$O.test(s)?X:+s}function W0(s){return Lr(s,Ht(s))}function oB(s){return s?zn(ge(s),-ee,ee):s===0?s:0}function Ue(s){return s==null?"":Yt(s)}var uB=Ui(function(s,o){if(Os(o)||zt(o)){Lr(o,St(o),s);return}for(var h in o)He.call(o,h)&&Es(s,h,o[h])}),q0=Ui(function(s,o){Lr(o,Ht(o),s)}),Uo=Ui(function(s,o,h,g){Lr(o,Ht(o),s,g)}),lB=Ui(function(s,o,h,g){Lr(o,St(o),s,g)}),cB=qr(_c);function hB(s,o){var h=Di(s);return o==null?h:Em(h,o)}var fB=_e(function(s,o){s=qe(s);var h=-1,g=o.length,y=g>2?o[2]:r;for(y&&Ut(o[0],o[1],y)&&(g=1);++h<g;)for(var S=o[h],C=Ht(S),R=-1,M=C.length;++R<M;){var U=C[R],$=s[U];($===r||Sr($,Li[U])&&!He.call(s,U))&&(s[U]=S[U])}return s}),dB=_e(function(s){return s.push(r,h0),Wt(Y0,r,s)});function pB(s,o){return om(s,ie(o,3),Nr)}function gB(s,o){return om(s,ie(o,3),xc)}function mB(s,o){return s==null?s:yc(s,ie(o,3),Ht)}function vB(s,o){return s==null?s:Mm(s,ie(o,3),Ht)}function _B(s,o){return s&&Nr(s,ie(o,3))}function yB(s,o){return s&&xc(s,ie(o,3))}function xB(s){return s==null?[]:xo(s,St(s))}function bB(s){return s==null?[]:xo(s,Ht(s))}function Qc(s,o,h){var g=s==null?r:Hn(s,o);return g===r?h:g}function wB(s,o){return s!=null&&p0(s,o,X3)}function Jc(s,o){return s!=null&&p0(s,o,j3)}var TB=a0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=ao.call(o)),s[o]=h},th(Vt)),SB=a0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=ao.call(o)),He.call(s,o)?s[o].push(h):s[o]=[h]},ie),AB=_e(Is);function St(s){return zt(s)?Sm(s):Sc(s)}function Ht(s){return zt(s)?Sm(s,!0):rN(s)}function EB(s,o){var h={};return o=ie(o,3),Nr(s,function(g,y,S){jr(h,o(g,y,S),g)}),h}function CB(s,o){var h={};return o=ie(o,3),Nr(s,function(g,y,S){jr(h,y,o(g,y,S))}),h}var IB=Ui(function(s,o,h){bo(s,o,h)}),Y0=Ui(function(s,o,h,g){bo(s,o,h,g)}),RB=qr(function(s,o){var h={};if(s==null)return h;var g=!1;o=it(o,function(S){return S=pn(S,s),g||(g=S.length>1),S}),Lr(s,Dc(s),h),g&&(h=or(h,c|d|m,TN));for(var y=o.length;y--;)Pc(h,o[y]);return h});function PB(s,o){return K0(s,ko(ie(o)))}var MB=qr(function(s,o){return s==null?{}:iN(s,o)});function K0(s,o){if(s==null)return{};var h=it(Dc(s),function(g){return[g]});return o=ie(o),Gm(s,h,function(g,y){return o(g,y[0])})}function OB(s,o,h){o=pn(o,s);var g=-1,y=o.length;for(y||(y=1,s=r);++g<y;){var S=s==null?r:s[kr(o[g])];S===r&&(g=y,S=h),s=Kr(S)?S.call(s):S}return s}function FB(s,o,h){return s==null?s:Ps(s,o,h)}function NB(s,o,h,g){return g=typeof g=="function"?g:r,s==null?s:Ps(s,o,h,g)}var Z0=l0(St),Q0=l0(Ht);function LB(s,o,h){var g=de(s),y=g||mn(s)||zi(s);if(o=ie(o,4),h==null){var S=s&&s.constructor;y?h=g?new S:[]:lt(s)?h=Kr(S)?Di(lo(s)):{}:h={}}return(y?ir:Nr)(s,function(C,R,M){return o(h,C,R,M)}),h}function kB(s,o){return s==null?!0:Pc(s,o)}function BB(s,o,h){return s==null?s:jm(s,o,Fc(h))}function DB(s,o,h,g){return g=typeof g=="function"?g:r,s==null?s:jm(s,o,Fc(h),g)}function Hi(s){return s==null?[]:hc(s,St(s))}function UB(s){return s==null?[]:hc(s,Ht(s))}function $B(s,o,h){return h===r&&(h=o,o=r),h!==r&&(h=cr(h),h=h===h?h:0),o!==r&&(o=cr(o),o=o===o?o:0),zn(cr(s),o,h)}function GB(s,o,h){return o=Zr(o),h===r?(h=o,o=0):h=Zr(h),s=cr(s),W3(s,o,h)}function zB(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=Zr(s),o===r?(o=s,s=0):o=Zr(o)),s>o){var g=s;s=o,o=g}if(h||s%1||o%1){var y=wm();return Ft(s+y*(o-s+xF("1e-"+((y+"").length-1))),o)}return Cc(s,o)}var HB=$i(function(s,o,h){return o=o.toLowerCase(),s+(h?J0(o):o)});function J0(s){return eh(Ue(s).toLowerCase())}function ev(s){return s=Ue(s),s&&s.replace(XO,FF).replace(cF,"")}function VB(s,o,h){s=Ue(s),o=Yt(o);var g=s.length;h=h===r?g:zn(ge(h),0,g);var y=h;return h-=o.length,h>=0&&s.slice(h,y)==o}function XB(s){return s=Ue(s),s&&AO.test(s)?s.replace(Mg,NF):s}function jB(s){return s=Ue(s),s&&MO.test(s)?s.replace(Yl,"\\$&"):s}var WB=$i(function(s,o,h){return s+(h?"-":"")+o.toLowerCase()}),qB=$i(function(s,o,h){return s+(h?" ":"")+o.toLowerCase()}),YB=n0("toLowerCase");function KB(s,o,h){s=Ue(s),o=ge(o);var g=o?Fi(s):0;if(!o||g>=o)return s;var y=(o-g)/2;return Co(po(y),h)+s+Co(fo(y),h)}function ZB(s,o,h){s=Ue(s),o=ge(o);var g=o?Fi(s):0;return o&&g<o?s+Co(o-g,h):s}function QB(s,o,h){s=Ue(s),o=ge(o);var g=o?Fi(s):0;return o&&g<o?Co(o-g,h)+s:s}function JB(s,o,h){return h||o==null?o=0:o&&(o=+o),a3(Ue(s).replace(Kl,""),o||0)}function eD(s,o,h){return(h?Ut(s,o,h):o===r)?o=1:o=ge(o),Ic(Ue(s),o)}function tD(){var s=arguments,o=Ue(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var rD=$i(function(s,o,h){return s+(h?"_":"")+o.toLowerCase()});function nD(s,o,h){return h&&typeof h!="number"&&Ut(s,o,h)&&(o=h=r),h=h===r?Y:h>>>0,h?(s=Ue(s),s&&(typeof o=="string"||o!=null&&!Zc(o))&&(o=Yt(o),!o&&Oi(s))?gn(wr(s),0,h):s.split(o,h)):[]}var iD=$i(function(s,o,h){return s+(h?" ":"")+eh(o)});function sD(s,o,h){return s=Ue(s),h=h==null?0:zn(ge(h),0,s.length),o=Yt(o),s.slice(h,h+o.length)==o}function aD(s,o,h){var g=T.templateSettings;h&&Ut(s,o,h)&&(o=r),s=Ue(s),o=Uo({},o,g,c0);var y=Uo({},o.imports,g.imports,c0),S=St(y),C=hc(y,S),R,M,U=0,$=o.interpolate||Za,G="__p += '",q=dc((o.escape||Za).source+"|"+$.source+"|"+($===Og?UO:Za).source+"|"+(o.evaluate||Za).source+"|$","g"),te="//# sourceURL="+(He.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++gF+"]")+`
1975
+ `)}function ON(s){return de(s)||jn(s)||!!(xm&&s&&s[xm])}function Yr(s,o){var h=typeof s;return o=o??ee,!!o&&(h=="number"||h!="symbol"&&VO.test(s))&&s>-1&&s%1==0&&s<o}function Ut(s,o,h){if(!lt(h))return!1;var g=typeof o;return(g=="number"?zt(h)&&Yr(o,h.length):g=="string"&&o in h)?Sr(h[o],s):!1}function zc(s,o){if(de(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||Kt(s)?!0:RO.test(s)||!IO.test(s)||o!=null&&s in qe(o)}function FN(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function Hc(s){var o=Ro(s),h=T[o];if(typeof h!="function"||!(o in Ae.prototype))return!1;if(s===h)return!0;var g=Uc(h);return!!g&&s===g[0]}function NN(s){return!!mm&&mm in s}var LN=io?Kr:ah;function Os(s){var o=s&&s.constructor,h=typeof o=="function"&&o.prototype||Li;return s===h}function m0(s){return s===s&&!lt(s)}function v0(s,o){return function(h){return h==null?!1:h[s]===o&&(o!==r||s in qe(h))}}function kN(s){var o=Lo(s,function(g){return h.size===p&&h.clear(),g}),h=o.cache;return o}function BN(s,o){var h=s[1],g=o[1],y=h|g,S=y<(x|w|L),C=g==L&&h==A||g==L&&h==k&&s[7].length<=o[8]||g==(L|k)&&o[7].length<=o[8]&&h==A;if(!(S||C))return s;g&x&&(s[2]=o[2],y|=h&x?0:E);var R=o[3];if(R){var M=s[3];s[3]=M?Jm(M,R,o[4]):R,s[4]=M?cn(s[3],v):o[4]}return R=o[5],R&&(M=s[5],s[5]=M?e0(M,R,o[6]):R,s[6]=M?cn(s[5],v):o[6]),R=o[7],R&&(s[7]=R),g&L&&(s[8]=s[8]==null?o[8]:Ft(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=y,s}function DN(s){var o=[];if(s!=null)for(var h in qe(s))o.push(h);return o}function UN(s){return ao.call(s)}function _0(s,o,h){return o=yt(o===r?s.length-1:o,0),function(){for(var g=arguments,y=-1,S=yt(g.length-o,0),C=F(S);++y<S;)C[y]=g[o+y];y=-1;for(var R=F(o+1);++y<o;)R[y]=g[y];return R[o]=h(C),Wt(s,this,R)}}function y0(s,o){return o.length<2?s:Hn(s,ur(o,0,-1))}function $N(s,o){for(var h=s.length,g=Ft(o.length,h),y=Gt(s);g--;){var S=o[g];s[g]=Yr(S,h)?y[S]:r}return s}function Vc(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var x0=w0(Hm),Fs=t3||function(s,o){return Ct.setTimeout(s,o)},Xc=w0(lN);function b0(s,o,h){var g=o+"";return Xc(s,MN(g,GN(IN(g),h)))}function w0(s){var o=0,h=0;return function(){var g=s3(),y=H-(g-h);if(h=g,y>0){if(++o>=fe)return arguments[0]}else o=0;return s.apply(r,arguments)}}function Mo(s,o){var h=-1,g=s.length,y=g-1;for(o=o===r?g:o;++h<o;){var S=Cc(h,y),C=s[S];s[S]=s[h],s[h]=C}return s.length=o,s}var T0=kN(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(PO,function(h,g,y,S){o.push(y?S.replace(DO,"$1"):g||h)}),o});function kr(s){if(typeof s=="string"||Kt(s))return s;var o=s+"";return o=="0"&&1/s==-z?"-0":o}function Xn(s){if(s!=null){try{return so.call(s)}catch{}try{return s+""}catch{}}return""}function GN(s,o){return ir(xe,function(h){var g="_."+h[0];o&h[1]&&!eo(s,g)&&s.push(g)}),s.sort()}function S0(s){if(s instanceof Ae)return s.clone();var o=new ar(s.__wrapped__,s.__chain__);return o.__actions__=Gt(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function zN(s,o,h){(h?Ut(s,o,h):o===r)?o=1:o=yt(ge(o),0);var g=s==null?0:s.length;if(!g||o<1)return[];for(var y=0,S=0,C=F(fo(g/o));y<g;)C[S++]=ur(s,y,y+=o);return C}function HN(s){for(var o=-1,h=s==null?0:s.length,g=0,y=[];++o<h;){var S=s[o];S&&(y[g++]=S)}return y}function VN(){var s=arguments.length;if(!s)return[];for(var o=F(s-1),h=arguments[0],g=s;g--;)o[g-1]=arguments[g];return ln(de(h)?Gt(h):[h],It(o,1))}var XN=_e(function(s,o){return dt(s)?Cs(s,It(o,1,dt,!0)):[]}),jN=_e(function(s,o){var h=lr(o);return dt(h)&&(h=r),dt(s)?Cs(s,It(o,1,dt,!0),ie(h,2)):[]}),WN=_e(function(s,o){var h=lr(o);return dt(h)&&(h=r),dt(s)?Cs(s,It(o,1,dt,!0),r,h):[]});function qN(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:ge(o),ur(s,o<0?0:o,g)):[]}function YN(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:ge(o),o=g-o,ur(s,0,o<0?0:o)):[]}function KN(s,o){return s&&s.length?To(s,ie(o,3),!0,!0):[]}function ZN(s,o){return s&&s.length?To(s,ie(o,3),!0):[]}function QN(s,o,h,g){var y=s==null?0:s.length;return y?(h&&typeof h!="number"&&Ut(s,o,h)&&(h=0,g=y),V3(s,o,h,g)):[]}function A0(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=h==null?0:ge(h);return y<0&&(y=yt(g+y,0)),to(s,ie(o,3),y)}function E0(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=g-1;return h!==r&&(y=ge(h),y=h<0?yt(g+y,0):Ft(y,g-1)),to(s,ie(o,3),y,!0)}function C0(s){var o=s==null?0:s.length;return o?It(s,1):[]}function JN(s){var o=s==null?0:s.length;return o?It(s,z):[]}function eL(s,o){var h=s==null?0:s.length;return h?(o=o===r?1:ge(o),It(s,o)):[]}function tL(s){for(var o=-1,h=s==null?0:s.length,g={};++o<h;){var y=s[o];g[y[0]]=y[1]}return g}function I0(s){return s&&s.length?s[0]:r}function rL(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=h==null?0:ge(h);return y<0&&(y=yt(g+y,0)),Mi(s,o,y)}function nL(s){var o=s==null?0:s.length;return o?ur(s,0,-1):[]}var iL=_e(function(s){var o=it(s,Oc);return o.length&&o[0]===s[0]?wc(o):[]}),sL=_e(function(s){var o=lr(s),h=it(s,Oc);return o===lr(h)?o=r:h.pop(),h.length&&h[0]===s[0]?wc(h,ie(o,2)):[]}),aL=_e(function(s){var o=lr(s),h=it(s,Oc);return o=typeof o=="function"?o:r,o&&h.pop(),h.length&&h[0]===s[0]?wc(h,r,o):[]});function oL(s,o){return s==null?"":n3.call(s,o)}function lr(s){var o=s==null?0:s.length;return o?s[o-1]:r}function uL(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=g;return h!==r&&(y=ge(h),y=y<0?yt(g+y,0):Ft(y,g-1)),o===o?GF(s,o,y):to(s,um,y,!0)}function lL(s,o){return s&&s.length?Um(s,ge(o)):r}var cL=_e(R0);function R0(s,o){return s&&s.length&&o&&o.length?Ec(s,o):s}function hL(s,o,h){return s&&s.length&&o&&o.length?Ec(s,o,ie(h,2)):s}function fL(s,o,h){return s&&s.length&&o&&o.length?Ec(s,o,r,h):s}var dL=qr(function(s,o){var h=s==null?0:s.length,g=_c(s,o);return zm(s,it(o,function(y){return Yr(y,h)?+y:y}).sort(Qm)),g});function pL(s,o){var h=[];if(!(s&&s.length))return h;var g=-1,y=[],S=s.length;for(o=ie(o,3);++g<S;){var C=s[g];o(C,g,s)&&(h.push(C),y.push(g))}return zm(s,y),h}function jc(s){return s==null?s:o3.call(s)}function gL(s,o,h){var g=s==null?0:s.length;return g?(h&&typeof h!="number"&&Ut(s,o,h)?(o=0,h=g):(o=o==null?0:ge(o),h=h===r?g:ge(h)),ur(s,o,h)):[]}function mL(s,o){return wo(s,o)}function vL(s,o,h){return Rc(s,o,ie(h,2))}function _L(s,o){var h=s==null?0:s.length;if(h){var g=wo(s,o);if(g<h&&Sr(s[g],o))return g}return-1}function yL(s,o){return wo(s,o,!0)}function xL(s,o,h){return Rc(s,o,ie(h,2),!0)}function bL(s,o){var h=s==null?0:s.length;if(h){var g=wo(s,o,!0)-1;if(Sr(s[g],o))return g}return-1}function wL(s){return s&&s.length?Vm(s):[]}function TL(s,o){return s&&s.length?Vm(s,ie(o,2)):[]}function SL(s){var o=s==null?0:s.length;return o?ur(s,1,o):[]}function AL(s,o,h){return s&&s.length?(o=h||o===r?1:ge(o),ur(s,0,o<0?0:o)):[]}function EL(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:ge(o),o=g-o,ur(s,o<0?0:o,g)):[]}function CL(s,o){return s&&s.length?To(s,ie(o,3),!1,!0):[]}function IL(s,o){return s&&s.length?To(s,ie(o,3)):[]}var RL=_e(function(s){return dn(It(s,1,dt,!0))}),PL=_e(function(s){var o=lr(s);return dt(o)&&(o=r),dn(It(s,1,dt,!0),ie(o,2))}),ML=_e(function(s){var o=lr(s);return o=typeof o=="function"?o:r,dn(It(s,1,dt,!0),r,o)});function OL(s){return s&&s.length?dn(s):[]}function FL(s,o){return s&&s.length?dn(s,ie(o,2)):[]}function NL(s,o){return o=typeof o=="function"?o:r,s&&s.length?dn(s,r,o):[]}function Wc(s){if(!(s&&s.length))return[];var o=0;return s=un(s,function(h){if(dt(h))return o=yt(h.length,o),!0}),cc(o,function(h){return it(s,oc(h))})}function P0(s,o){if(!(s&&s.length))return[];var h=Wc(s);return o==null?h:it(h,function(g){return Wt(o,r,g)})}var LL=_e(function(s,o){return dt(s)?Cs(s,o):[]}),kL=_e(function(s){return Mc(un(s,dt))}),BL=_e(function(s){var o=lr(s);return dt(o)&&(o=r),Mc(un(s,dt),ie(o,2))}),DL=_e(function(s){var o=lr(s);return o=typeof o=="function"?o:r,Mc(un(s,dt),r,o)}),UL=_e(Wc);function $L(s,o){return qm(s||[],o||[],Es)}function GL(s,o){return qm(s||[],o||[],Ps)}var zL=_e(function(s){var o=s.length,h=o>1?s[o-1]:r;return h=typeof h=="function"?(s.pop(),h):r,P0(s,h)});function M0(s){var o=T(s);return o.__chain__=!0,o}function HL(s,o){return o(s),s}function Oo(s,o){return o(s)}var VL=qr(function(s){var o=s.length,h=o?s[0]:0,g=this.__wrapped__,y=function(S){return _c(S,s)};return o>1||this.__actions__.length||!(g instanceof Ae)||!Yr(h)?this.thru(y):(g=g.slice(h,+h+(o?1:0)),g.__actions__.push({func:Oo,args:[y],thisArg:r}),new ar(g,this.__chain__).thru(function(S){return o&&!S.length&&S.push(r),S}))});function XL(){return M0(this)}function jL(){return new ar(this.value(),this.__chain__)}function WL(){this.__values__===r&&(this.__values__=X0(this.value()));var s=this.__index__>=this.__values__.length,o=s?r:this.__values__[this.__index__++];return{done:s,value:o}}function qL(){return this}function YL(s){for(var o,h=this;h instanceof vo;){var g=S0(h);g.__index__=0,g.__values__=r,o?y.__wrapped__=g:o=g;var y=g;h=h.__wrapped__}return y.__wrapped__=s,o}function KL(){var s=this.__wrapped__;if(s instanceof Ae){var o=s;return this.__actions__.length&&(o=new Ae(this)),o=o.reverse(),o.__actions__.push({func:Oo,args:[jc],thisArg:r}),new ar(o,this.__chain__)}return this.thru(jc)}function ZL(){return Wm(this.__wrapped__,this.__actions__)}var QL=So(function(s,o,h){He.call(s,h)?++s[h]:jr(s,h,1)});function JL(s,o,h){var g=de(s)?am:H3;return h&&Ut(s,o,h)&&(o=r),g(s,ie(o,3))}function ek(s,o){var h=de(s)?un:Pm;return h(s,ie(o,3))}var tk=i0(A0),rk=i0(E0);function nk(s,o){return It(Fo(s,o),1)}function ik(s,o){return It(Fo(s,o),z)}function sk(s,o,h){return h=h===r?1:ge(h),It(Fo(s,o),h)}function O0(s,o){var h=de(s)?ir:fn;return h(s,ie(o,3))}function F0(s,o){var h=de(s)?SF:Rm;return h(s,ie(o,3))}var ak=So(function(s,o,h){He.call(s,h)?s[h].push(o):jr(s,h,[o])});function ok(s,o,h,g){s=zt(s)?s:Hi(s),h=h&&!g?ge(h):0;var y=s.length;return h<0&&(h=yt(y+h,0)),Do(s)?h<=y&&s.indexOf(o,h)>-1:!!y&&Mi(s,o,h)>-1}var uk=_e(function(s,o,h){var g=-1,y=typeof o=="function",S=zt(s)?F(s.length):[];return fn(s,function(C){S[++g]=y?Wt(o,C,h):Is(C,o,h)}),S}),lk=So(function(s,o,h){jr(s,h,o)});function Fo(s,o){var h=de(s)?it:km;return h(s,ie(o,3))}function ck(s,o,h,g){return s==null?[]:(de(o)||(o=o==null?[]:[o]),h=g?r:h,de(h)||(h=h==null?[]:[h]),$m(s,o,h))}var hk=So(function(s,o,h){s[h?0:1].push(o)},function(){return[[],[]]});function fk(s,o,h){var g=de(s)?sc:cm,y=arguments.length<3;return g(s,ie(o,4),h,y,fn)}function dk(s,o,h){var g=de(s)?AF:cm,y=arguments.length<3;return g(s,ie(o,4),h,y,Rm)}function pk(s,o){var h=de(s)?un:Pm;return h(s,ko(ie(o,3)))}function gk(s){var o=de(s)?Am:oN;return o(s)}function mk(s,o,h){(h?Ut(s,o,h):o===r)?o=1:o=ge(o);var g=de(s)?D3:uN;return g(s,o)}function vk(s){var o=de(s)?U3:cN;return o(s)}function _k(s){if(s==null)return 0;if(zt(s))return Do(s)?Fi(s):s.length;var o=Nt(s);return o==Je||o==mt?s.size:Sc(s).length}function yk(s,o,h){var g=de(s)?ac:hN;return h&&Ut(s,o,h)&&(o=r),g(s,ie(o,3))}var xk=_e(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]]),$m(s,It(o,1),[])}),No=e3||function(){return Ct.Date.now()};function bk(s,o){if(typeof o!="function")throw new sr(u);return s=ge(s),function(){if(--s<1)return o.apply(this,arguments)}}function N0(s,o,h){return o=h?r:o,o=s&&o==null?s.length:o,Wr(s,L,r,r,r,r,o)}function L0(s,o){var h;if(typeof o!="function")throw new sr(u);return s=ge(s),function(){return--s>0&&(h=o.apply(this,arguments)),s<=1&&(o=r),h}}var qc=_e(function(s,o,h){var g=x;if(h.length){var y=cn(h,Gi(qc));g|=O}return Wr(s,g,o,h,y)}),k0=_e(function(s,o,h){var g=x|w;if(h.length){var y=cn(h,Gi(k0));g|=O}return Wr(o,g,s,h,y)});function B0(s,o,h){o=h?r:o;var g=Wr(s,A,r,r,r,r,r,o);return g.placeholder=B0.placeholder,g}function D0(s,o,h){o=h?r:o;var g=Wr(s,I,r,r,r,r,r,o);return g.placeholder=D0.placeholder,g}function U0(s,o,h){var g,y,S,C,R,M,U=0,$=!1,G=!1,q=!0;if(typeof s!="function")throw new sr(u);o=cr(o)||0,lt(h)&&($=!!h.leading,G="maxWait"in h,S=G?yt(cr(h.maxWait)||0,o):S,q="trailing"in h?!!h.trailing:q);function te(pt){var Ar=g,Qr=y;return g=y=r,U=pt,C=s.apply(Qr,Ar),C}function ae(pt){return U=pt,R=Fs(we,o),$?te(pt):C}function me(pt){var Ar=pt-M,Qr=pt-U,iv=o-Ar;return G?Ft(iv,S-Qr):iv}function oe(pt){var Ar=pt-M,Qr=pt-U;return M===r||Ar>=o||Ar<0||G&&Qr>=S}function we(){var pt=No();if(oe(pt))return Ie(pt);R=Fs(we,me(pt))}function Ie(pt){return R=r,q&&g?te(pt):(g=y=r,C)}function Zt(){R!==r&&Ym(R),U=0,g=M=y=R=r}function $t(){return R===r?C:Ie(No())}function Qt(){var pt=No(),Ar=oe(pt);if(g=arguments,y=this,M=pt,Ar){if(R===r)return ae(M);if(G)return Ym(R),R=Fs(we,o),te(M)}return R===r&&(R=Fs(we,o)),C}return Qt.cancel=Zt,Qt.flush=$t,Qt}var wk=_e(function(s,o){return Im(s,1,o)}),Tk=_e(function(s,o,h){return Im(s,cr(o)||0,h)});function Sk(s){return Wr(s,D)}function Lo(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new sr(u);var h=function(){var g=arguments,y=o?o.apply(this,g):g[0],S=h.cache;if(S.has(y))return S.get(y);var C=s.apply(this,g);return h.cache=S.set(y,C)||S,C};return h.cache=new(Lo.Cache||Xr),h}Lo.Cache=Xr;function ko(s){if(typeof s!="function")throw new sr(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 Ak(s){return L0(2,s)}var Ek=fN(function(s,o){o=o.length==1&&de(o[0])?it(o[0],qt(ie())):it(It(o,1),qt(ie()));var h=o.length;return _e(function(g){for(var y=-1,S=Ft(g.length,h);++y<S;)g[y]=o[y].call(this,g[y]);return Wt(s,this,g)})}),Yc=_e(function(s,o){var h=cn(o,Gi(Yc));return Wr(s,O,r,o,h)}),$0=_e(function(s,o){var h=cn(o,Gi($0));return Wr(s,N,r,o,h)}),Ck=qr(function(s,o){return Wr(s,k,r,r,r,o)});function Ik(s,o){if(typeof s!="function")throw new sr(u);return o=o===r?o:ge(o),_e(s,o)}function Rk(s,o){if(typeof s!="function")throw new sr(u);return o=o==null?0:yt(ge(o),0),_e(function(h){var g=h[o],y=gn(h,0,o);return g&&ln(y,g),Wt(s,this,y)})}function Pk(s,o,h){var g=!0,y=!0;if(typeof s!="function")throw new sr(u);return lt(h)&&(g="leading"in h?!!h.leading:g,y="trailing"in h?!!h.trailing:y),U0(s,o,{leading:g,maxWait:o,trailing:y})}function Mk(s){return N0(s,1)}function Ok(s,o){return Yc(Fc(o),s)}function Fk(){if(!arguments.length)return[];var s=arguments[0];return de(s)?s:[s]}function Nk(s){return or(s,m)}function Lk(s,o){return o=typeof o=="function"?o:r,or(s,m,o)}function kk(s){return or(s,c|m)}function Bk(s,o){return o=typeof o=="function"?o:r,or(s,c|m,o)}function Dk(s,o){return o==null||Cm(s,o,St(o))}function Sr(s,o){return s===o||s!==s&&o!==o}var Uk=Io(bc),$k=Io(function(s,o){return s>=o}),jn=Fm(function(){return arguments}())?Fm:function(s){return ht(s)&&He.call(s,"callee")&&!ym.call(s,"callee")},de=F.isArray,Gk=em?qt(em):Y3;function zt(s){return s!=null&&Bo(s.length)&&!Kr(s)}function dt(s){return ht(s)&&zt(s)}function zk(s){return s===!0||s===!1||ht(s)&&Dt(s)==ze}var mn=r3||ah,Hk=tm?qt(tm):K3;function Vk(s){return ht(s)&&s.nodeType===1&&!Ns(s)}function Xk(s){if(s==null)return!0;if(zt(s)&&(de(s)||typeof s=="string"||typeof s.splice=="function"||mn(s)||zi(s)||jn(s)))return!s.length;var o=Nt(s);if(o==Je||o==mt)return!s.size;if(Os(s))return!Sc(s).length;for(var h in s)if(He.call(s,h))return!1;return!0}function jk(s,o){return Rs(s,o)}function Wk(s,o,h){h=typeof h=="function"?h:r;var g=h?h(s,o):r;return g===r?Rs(s,o,r,h):!!g}function Kc(s){if(!ht(s))return!1;var o=Dt(s);return o==be||o==Ze||typeof s.message=="string"&&typeof s.name=="string"&&!Ns(s)}function qk(s){return typeof s=="number"&&bm(s)}function Kr(s){if(!lt(s))return!1;var o=Dt(s);return o==De||o==Qe||o==Ge||o==rr}function G0(s){return typeof s=="number"&&s==ge(s)}function Bo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ee}function lt(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function ht(s){return s!=null&&typeof s=="object"}var z0=rm?qt(rm):Q3;function Yk(s,o){return s===o||Tc(s,o,$c(o))}function Kk(s,o,h){return h=typeof h=="function"?h:r,Tc(s,o,$c(o),h)}function Zk(s){return H0(s)&&s!=+s}function Qk(s){if(LN(s))throw new he(a);return Nm(s)}function Jk(s){return s===null}function eB(s){return s==null}function H0(s){return typeof s=="number"||ht(s)&&Dt(s)==Le}function Ns(s){if(!ht(s)||Dt(s)!=se)return!1;var o=lo(s);if(o===null)return!0;var h=He.call(o,"constructor")&&o.constructor;return typeof h=="function"&&h instanceof h&&so.call(h)==KF}var Zc=nm?qt(nm):J3;function tB(s){return G0(s)&&s>=-ee&&s<=ee}var V0=im?qt(im):eN;function Do(s){return typeof s=="string"||!de(s)&&ht(s)&&Dt(s)==Hr}function Kt(s){return typeof s=="symbol"||ht(s)&&Dt(s)==Ii}var zi=sm?qt(sm):tN;function rB(s){return s===r}function nB(s){return ht(s)&&Nt(s)==Bt}function iB(s){return ht(s)&&Dt(s)==Rg}var sB=Io(Ac),aB=Io(function(s,o){return s<=o});function X0(s){if(!s)return[];if(zt(s))return Do(s)?wr(s):Gt(s);if(bs&&s[bs])return DF(s[bs]());var o=Nt(s),h=o==Je?fc:o==mt?ro:Hi;return h(s)}function Zr(s){if(!s)return s===0?s:0;if(s=cr(s),s===z||s===-z){var o=s<0?-1:1;return o*pe}return s===s?s:0}function ge(s){var o=Zr(s),h=o%1;return o===o?h?o-h:o:0}function j0(s){return s?zn(ge(s),0,Y):0}function cr(s){if(typeof s=="number")return s;if(Kt(s))return X;if(lt(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=lt(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=hm(s);var h=GO.test(s);return h||HO.test(s)?bF(s.slice(2),h?2:8):$O.test(s)?X:+s}function W0(s){return Lr(s,Ht(s))}function oB(s){return s?zn(ge(s),-ee,ee):s===0?s:0}function Ue(s){return s==null?"":Yt(s)}var uB=Ui(function(s,o){if(Os(o)||zt(o)){Lr(o,St(o),s);return}for(var h in o)He.call(o,h)&&Es(s,h,o[h])}),q0=Ui(function(s,o){Lr(o,Ht(o),s)}),Uo=Ui(function(s,o,h,g){Lr(o,Ht(o),s,g)}),lB=Ui(function(s,o,h,g){Lr(o,St(o),s,g)}),cB=qr(_c);function hB(s,o){var h=Di(s);return o==null?h:Em(h,o)}var fB=_e(function(s,o){s=qe(s);var h=-1,g=o.length,y=g>2?o[2]:r;for(y&&Ut(o[0],o[1],y)&&(g=1);++h<g;)for(var S=o[h],C=Ht(S),R=-1,M=C.length;++R<M;){var U=C[R],$=s[U];($===r||Sr($,Li[U])&&!He.call(s,U))&&(s[U]=S[U])}return s}),dB=_e(function(s){return s.push(r,h0),Wt(Y0,r,s)});function pB(s,o){return om(s,ie(o,3),Nr)}function gB(s,o){return om(s,ie(o,3),xc)}function mB(s,o){return s==null?s:yc(s,ie(o,3),Ht)}function vB(s,o){return s==null?s:Mm(s,ie(o,3),Ht)}function _B(s,o){return s&&Nr(s,ie(o,3))}function yB(s,o){return s&&xc(s,ie(o,3))}function xB(s){return s==null?[]:xo(s,St(s))}function bB(s){return s==null?[]:xo(s,Ht(s))}function Qc(s,o,h){var g=s==null?r:Hn(s,o);return g===r?h:g}function wB(s,o){return s!=null&&p0(s,o,X3)}function Jc(s,o){return s!=null&&p0(s,o,j3)}var TB=a0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=ao.call(o)),s[o]=h},th(Vt)),SB=a0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=ao.call(o)),He.call(s,o)?s[o].push(h):s[o]=[h]},ie),AB=_e(Is);function St(s){return zt(s)?Sm(s):Sc(s)}function Ht(s){return zt(s)?Sm(s,!0):rN(s)}function EB(s,o){var h={};return o=ie(o,3),Nr(s,function(g,y,S){jr(h,o(g,y,S),g)}),h}function CB(s,o){var h={};return o=ie(o,3),Nr(s,function(g,y,S){jr(h,y,o(g,y,S))}),h}var IB=Ui(function(s,o,h){bo(s,o,h)}),Y0=Ui(function(s,o,h,g){bo(s,o,h,g)}),RB=qr(function(s,o){var h={};if(s==null)return h;var g=!1;o=it(o,function(S){return S=pn(S,s),g||(g=S.length>1),S}),Lr(s,Dc(s),h),g&&(h=or(h,c|d|m,TN));for(var y=o.length;y--;)Pc(h,o[y]);return h});function PB(s,o){return K0(s,ko(ie(o)))}var MB=qr(function(s,o){return s==null?{}:iN(s,o)});function K0(s,o){if(s==null)return{};var h=it(Dc(s),function(g){return[g]});return o=ie(o),Gm(s,h,function(g,y){return o(g,y[0])})}function OB(s,o,h){o=pn(o,s);var g=-1,y=o.length;for(y||(y=1,s=r);++g<y;){var S=s==null?r:s[kr(o[g])];S===r&&(g=y,S=h),s=Kr(S)?S.call(s):S}return s}function FB(s,o,h){return s==null?s:Ps(s,o,h)}function NB(s,o,h,g){return g=typeof g=="function"?g:r,s==null?s:Ps(s,o,h,g)}var Z0=l0(St),Q0=l0(Ht);function LB(s,o,h){var g=de(s),y=g||mn(s)||zi(s);if(o=ie(o,4),h==null){var S=s&&s.constructor;y?h=g?new S:[]:lt(s)?h=Kr(S)?Di(lo(s)):{}:h={}}return(y?ir:Nr)(s,function(C,R,M){return o(h,C,R,M)}),h}function kB(s,o){return s==null?!0:Pc(s,o)}function BB(s,o,h){return s==null?s:jm(s,o,Fc(h))}function DB(s,o,h,g){return g=typeof g=="function"?g:r,s==null?s:jm(s,o,Fc(h),g)}function Hi(s){return s==null?[]:hc(s,St(s))}function UB(s){return s==null?[]:hc(s,Ht(s))}function $B(s,o,h){return h===r&&(h=o,o=r),h!==r&&(h=cr(h),h=h===h?h:0),o!==r&&(o=cr(o),o=o===o?o:0),zn(cr(s),o,h)}function GB(s,o,h){return o=Zr(o),h===r?(h=o,o=0):h=Zr(h),s=cr(s),W3(s,o,h)}function zB(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=Zr(s),o===r?(o=s,s=0):o=Zr(o)),s>o){var g=s;s=o,o=g}if(h||s%1||o%1){var y=wm();return Ft(s+y*(o-s+xF("1e-"+((y+"").length-1))),o)}return Cc(s,o)}var HB=$i(function(s,o,h){return o=o.toLowerCase(),s+(h?J0(o):o)});function J0(s){return eh(Ue(s).toLowerCase())}function ev(s){return s=Ue(s),s&&s.replace(XO,FF).replace(cF,"")}function VB(s,o,h){s=Ue(s),o=Yt(o);var g=s.length;h=h===r?g:zn(ge(h),0,g);var y=h;return h-=o.length,h>=0&&s.slice(h,y)==o}function XB(s){return s=Ue(s),s&&AO.test(s)?s.replace(Mg,NF):s}function jB(s){return s=Ue(s),s&&MO.test(s)?s.replace(Yl,"\\$&"):s}var WB=$i(function(s,o,h){return s+(h?"-":"")+o.toLowerCase()}),qB=$i(function(s,o,h){return s+(h?" ":"")+o.toLowerCase()}),YB=n0("toLowerCase");function KB(s,o,h){s=Ue(s),o=ge(o);var g=o?Fi(s):0;if(!o||g>=o)return s;var y=(o-g)/2;return Co(po(y),h)+s+Co(fo(y),h)}function ZB(s,o,h){s=Ue(s),o=ge(o);var g=o?Fi(s):0;return o&&g<o?s+Co(o-g,h):s}function QB(s,o,h){s=Ue(s),o=ge(o);var g=o?Fi(s):0;return o&&g<o?Co(o-g,h)+s:s}function JB(s,o,h){return h||o==null?o=0:o&&(o=+o),a3(Ue(s).replace(Kl,""),o||0)}function eD(s,o,h){return(h?Ut(s,o,h):o===r)?o=1:o=ge(o),Ic(Ue(s),o)}function tD(){var s=arguments,o=Ue(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var rD=$i(function(s,o,h){return s+(h?"_":"")+o.toLowerCase()});function nD(s,o,h){return h&&typeof h!="number"&&Ut(s,o,h)&&(o=h=r),h=h===r?Y:h>>>0,h?(s=Ue(s),s&&(typeof o=="string"||o!=null&&!Zc(o))&&(o=Yt(o),!o&&Oi(s))?gn(wr(s),0,h):s.split(o,h)):[]}var iD=$i(function(s,o,h){return s+(h?" ":"")+eh(o)});function sD(s,o,h){return s=Ue(s),h=h==null?0:zn(ge(h),0,s.length),o=Yt(o),s.slice(h,h+o.length)==o}function aD(s,o,h){var g=T.templateSettings;h&&Ut(s,o,h)&&(o=r),s=Ue(s),o=Uo({},o,g,c0);var y=Uo({},o.imports,g.imports,c0),S=St(y),C=hc(y,S),R,M,U=0,$=o.interpolate||Za,G="__p += '",q=dc((o.escape||Za).source+"|"+$.source+"|"+($===Og?UO:Za).source+"|"+(o.evaluate||Za).source+"|$","g"),te="//# sourceURL="+(He.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++gF+"]")+`
1976
1976
  `;s.replace(q,function(oe,we,Ie,Zt,$t,Qt){return Ie||(Ie=Zt),G+=s.slice(U,Qt).replace(jO,LF),we&&(R=!0,G+=`' +
1977
1977
  __e(`+we+`) +
1978
1978
  '`),$t&&(M=!0,G+=`';
@@ -1989,4 +1989,4 @@ __p += '`),Ie&&(G+=`' +
1989
1989
  function print() { __p += __j.call(arguments, '') }
1990
1990
  `:`;
1991
1991
  `)+G+`return __p
1992
- }`;var me=rv(function(){return ke(S,te+"return "+G).apply(r,C)});if(me.source=G,Kc(me))throw me;return me}function oD(s){return Ue(s).toLowerCase()}function uD(s){return Ue(s).toUpperCase()}function lD(s,o,h){if(s=Ue(s),s&&(h||o===r))return hm(s);if(!s||!(o=Yt(o)))return s;var g=wr(s),y=wr(o),S=fm(g,y),C=dm(g,y)+1;return gn(g,S,C).join("")}function cD(s,o,h){if(s=Ue(s),s&&(h||o===r))return s.slice(0,gm(s)+1);if(!s||!(o=Yt(o)))return s;var g=wr(s),y=dm(g,wr(o))+1;return gn(g,0,y).join("")}function hD(s,o,h){if(s=Ue(s),s&&(h||o===r))return s.replace(Kl,"");if(!s||!(o=Yt(o)))return s;var g=wr(s),y=fm(g,wr(o));return gn(g,y).join("")}function fD(s,o){var h=j,g=Q;if(lt(o)){var y="separator"in o?o.separator:y;h="length"in o?ge(o.length):h,g="omission"in o?Yt(o.omission):g}s=Ue(s);var S=s.length;if(Oi(s)){var C=wr(s);S=C.length}if(h>=S)return s;var R=h-Fi(g);if(R<1)return g;var M=C?gn(C,0,R).join(""):s.slice(0,R);if(y===r)return M+g;if(C&&(R+=M.length-R),Zc(y)){if(s.slice(R).search(y)){var U,$=M;for(y.global||(y=dc(y.source,Ue(Fg.exec(y))+"g")),y.lastIndex=0;U=y.exec($);)var G=U.index;M=M.slice(0,G===r?R:G)}}else if(s.indexOf(Yt(y),R)!=R){var q=M.lastIndexOf(y);q>-1&&(M=M.slice(0,q))}return M+g}function dD(s){return s=Ue(s),s&&SO.test(s)?s.replace(Pg,zF):s}var pD=$i(function(s,o,h){return s+(h?" ":"")+o.toUpperCase()}),eh=n0("toUpperCase");function tv(s,o,h){return s=Ue(s),o=h?r:o,o===r?BF(s)?XF(s):IF(s):s.match(o)||[]}var rv=_e(function(s,o){try{return Wt(s,r,o)}catch(h){return Kc(h)?h:new he(h)}}),gD=qr(function(s,o){return ir(o,function(h){h=kr(h),jr(s,h,qc(s[h],s))}),s});function mD(s){var o=s==null?0:s.length,h=ie();return s=o?it(s,function(g){if(typeof g[1]!="function")throw new sr(u);return[h(g[0]),g[1]]}):[],_e(function(g){for(var y=-1;++y<o;){var S=s[y];if(Wt(S[0],this,g))return Wt(S[1],this,g)}})}function vD(s){return z3(or(s,c))}function th(s){return function(){return s}}function _D(s,o){return s==null||s!==s?o:s}var yD=s0(),xD=s0(!0);function Vt(s){return s}function rh(s){return Lm(typeof s=="function"?s:or(s,c))}function bD(s){return Bm(or(s,c))}function wD(s,o){return Dm(s,or(o,c))}var TD=_e(function(s,o){return function(h){return Is(h,s,o)}}),SD=_e(function(s,o){return function(h){return Is(s,h,o)}});function nh(s,o,h){var g=St(o),y=xo(o,g);h==null&&!(lt(o)&&(y.length||!g.length))&&(h=o,o=s,s=this,y=xo(o,St(o)));var S=!(lt(h)&&"chain"in h)||!!h.chain,C=Kr(s);return ir(y,function(R){var M=o[R];s[R]=M,C&&(s.prototype[R]=function(){var U=this.__chain__;if(S||U){var $=s(this.__wrapped__),G=$.__actions__=Gt(this.__actions__);return G.push({func:M,args:arguments,thisArg:s}),$.__chain__=U,$}return M.apply(s,ln([this.value()],arguments))})}),s}function AD(){return Ct._===this&&(Ct._=ZF),this}function ih(){}function ED(s){return s=ge(s),_e(function(o){return Um(o,s)})}var CD=Lc(it),ID=Lc(am),RD=Lc(ac);function nv(s){return zc(s)?oc(kr(s)):sN(s)}function PD(s){return function(o){return s==null?r:Hn(s,o)}}var MD=o0(),OD=o0(!0);function sh(){return[]}function ah(){return!1}function FD(){return{}}function ND(){return""}function LD(){return!0}function kD(s,o){if(s=ge(s),s<1||s>ee)return[];var h=Y,g=Ft(s,Y);o=ie(o),s-=Y;for(var y=cc(g,o);++h<s;)o(h);return y}function BD(s){return de(s)?it(s,kr):Kt(s)?[s]:Gt(T0(Ue(s)))}function DD(s){var o=++YF;return Ue(s)+o}var UD=Eo(function(s,o){return s+o},0),$D=kc("ceil"),GD=Eo(function(s,o){return s/o},1),zD=kc("floor");function HD(s){return s&&s.length?yo(s,Vt,bc):r}function VD(s,o){return s&&s.length?yo(s,ie(o,2),bc):r}function XD(s){return lm(s,Vt)}function jD(s,o){return lm(s,ie(o,2))}function WD(s){return s&&s.length?yo(s,Vt,Ac):r}function qD(s,o){return s&&s.length?yo(s,ie(o,2),Ac):r}var YD=Eo(function(s,o){return s*o},1),KD=kc("round"),ZD=Eo(function(s,o){return s-o},0);function QD(s){return s&&s.length?lc(s,Vt):0}function JD(s,o){return s&&s.length?lc(s,ie(o,2)):0}return T.after=bk,T.ary=N0,T.assign=uB,T.assignIn=q0,T.assignInWith=Uo,T.assignWith=lB,T.at=cB,T.before=L0,T.bind=qc,T.bindAll=gD,T.bindKey=k0,T.castArray=Fk,T.chain=M0,T.chunk=zN,T.compact=HN,T.concat=VN,T.cond=mD,T.conforms=vD,T.constant=th,T.countBy=QL,T.create=hB,T.curry=B0,T.curryRight=D0,T.debounce=U0,T.defaults=fB,T.defaultsDeep=dB,T.defer=wk,T.delay=Tk,T.difference=XN,T.differenceBy=jN,T.differenceWith=WN,T.drop=qN,T.dropRight=YN,T.dropRightWhile=KN,T.dropWhile=ZN,T.fill=QN,T.filter=ek,T.flatMap=nk,T.flatMapDeep=ik,T.flatMapDepth=sk,T.flatten=C0,T.flattenDeep=JN,T.flattenDepth=eL,T.flip=Sk,T.flow=yD,T.flowRight=xD,T.fromPairs=tL,T.functions=xB,T.functionsIn=bB,T.groupBy=ak,T.initial=nL,T.intersection=iL,T.intersectionBy=sL,T.intersectionWith=aL,T.invert=TB,T.invertBy=SB,T.invokeMap=uk,T.iteratee=rh,T.keyBy=lk,T.keys=St,T.keysIn=Ht,T.map=Fo,T.mapKeys=EB,T.mapValues=CB,T.matches=bD,T.matchesProperty=wD,T.memoize=Lo,T.merge=IB,T.mergeWith=Y0,T.method=TD,T.methodOf=SD,T.mixin=nh,T.negate=ko,T.nthArg=ED,T.omit=RB,T.omitBy=PB,T.once=Ak,T.orderBy=ck,T.over=CD,T.overArgs=Ek,T.overEvery=ID,T.overSome=RD,T.partial=Yc,T.partialRight=$0,T.partition=hk,T.pick=MB,T.pickBy=K0,T.property=nv,T.propertyOf=PD,T.pull=cL,T.pullAll=R0,T.pullAllBy=hL,T.pullAllWith=fL,T.pullAt=dL,T.range=MD,T.rangeRight=OD,T.rearg=Ck,T.reject=pk,T.remove=pL,T.rest=Ik,T.reverse=jc,T.sampleSize=mk,T.set=FB,T.setWith=NB,T.shuffle=vk,T.slice=gL,T.sortBy=xk,T.sortedUniq=wL,T.sortedUniqBy=TL,T.split=nD,T.spread=Rk,T.tail=SL,T.take=AL,T.takeRight=EL,T.takeRightWhile=CL,T.takeWhile=IL,T.tap=HL,T.throttle=Pk,T.thru=Oo,T.toArray=X0,T.toPairs=Z0,T.toPairsIn=Q0,T.toPath=BD,T.toPlainObject=W0,T.transform=LB,T.unary=Mk,T.union=RL,T.unionBy=PL,T.unionWith=ML,T.uniq=OL,T.uniqBy=FL,T.uniqWith=NL,T.unset=kB,T.unzip=Wc,T.unzipWith=P0,T.update=BB,T.updateWith=DB,T.values=Hi,T.valuesIn=UB,T.without=LL,T.words=tv,T.wrap=Ok,T.xor=kL,T.xorBy=BL,T.xorWith=DL,T.zip=UL,T.zipObject=$L,T.zipObjectDeep=GL,T.zipWith=zL,T.entries=Z0,T.entriesIn=Q0,T.extend=q0,T.extendWith=Uo,nh(T,T),T.add=UD,T.attempt=rv,T.camelCase=HB,T.capitalize=J0,T.ceil=$D,T.clamp=$B,T.clone=Nk,T.cloneDeep=kk,T.cloneDeepWith=Bk,T.cloneWith=Lk,T.conformsTo=Dk,T.deburr=ev,T.defaultTo=_D,T.divide=GD,T.endsWith=VB,T.eq=Sr,T.escape=XB,T.escapeRegExp=jB,T.every=JL,T.find=tk,T.findIndex=A0,T.findKey=pB,T.findLast=rk,T.findLastIndex=E0,T.findLastKey=gB,T.floor=zD,T.forEach=O0,T.forEachRight=F0,T.forIn=mB,T.forInRight=vB,T.forOwn=_B,T.forOwnRight=yB,T.get=Qc,T.gt=Uk,T.gte=$k,T.has=wB,T.hasIn=Jc,T.head=I0,T.identity=Vt,T.includes=ok,T.indexOf=rL,T.inRange=GB,T.invoke=AB,T.isArguments=jn,T.isArray=de,T.isArrayBuffer=Gk,T.isArrayLike=zt,T.isArrayLikeObject=dt,T.isBoolean=zk,T.isBuffer=mn,T.isDate=Hk,T.isElement=Vk,T.isEmpty=Xk,T.isEqual=jk,T.isEqualWith=Wk,T.isError=Kc,T.isFinite=qk,T.isFunction=Kr,T.isInteger=G0,T.isLength=Bo,T.isMap=z0,T.isMatch=Yk,T.isMatchWith=Kk,T.isNaN=Zk,T.isNative=Qk,T.isNil=eB,T.isNull=Jk,T.isNumber=H0,T.isObject=lt,T.isObjectLike=ht,T.isPlainObject=Ns,T.isRegExp=Zc,T.isSafeInteger=tB,T.isSet=V0,T.isString=Do,T.isSymbol=Kt,T.isTypedArray=zi,T.isUndefined=rB,T.isWeakMap=nB,T.isWeakSet=iB,T.join=oL,T.kebabCase=WB,T.last=lr,T.lastIndexOf=uL,T.lowerCase=qB,T.lowerFirst=YB,T.lt=sB,T.lte=aB,T.max=HD,T.maxBy=VD,T.mean=XD,T.meanBy=jD,T.min=WD,T.minBy=qD,T.stubArray=sh,T.stubFalse=ah,T.stubObject=FD,T.stubString=ND,T.stubTrue=LD,T.multiply=YD,T.nth=lL,T.noConflict=AD,T.noop=ih,T.now=No,T.pad=KB,T.padEnd=ZB,T.padStart=QB,T.parseInt=JB,T.random=zB,T.reduce=fk,T.reduceRight=dk,T.repeat=eD,T.replace=tD,T.result=OB,T.round=KD,T.runInContext=P,T.sample=gk,T.size=_k,T.snakeCase=rD,T.some=yk,T.sortedIndex=mL,T.sortedIndexBy=vL,T.sortedIndexOf=_L,T.sortedLastIndex=yL,T.sortedLastIndexBy=xL,T.sortedLastIndexOf=bL,T.startCase=iD,T.startsWith=sD,T.subtract=ZD,T.sum=QD,T.sumBy=JD,T.template=aD,T.times=kD,T.toFinite=Zr,T.toInteger=ge,T.toLength=j0,T.toLower=oD,T.toNumber=cr,T.toSafeInteger=oB,T.toString=Ue,T.toUpper=uD,T.trim=lD,T.trimEnd=cD,T.trimStart=hD,T.truncate=fD,T.unescape=dD,T.uniqueId=DD,T.upperCase=pD,T.upperFirst=eh,T.each=O0,T.eachRight=F0,T.first=I0,nh(T,function(){var s={};return Nr(T,function(o,h){He.call(T.prototype,h)||(s[h]=o)}),s}(),{chain:!1}),T.VERSION=n,ir(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){T[s].placeholder=T}),ir(["drop","take"],function(s,o){Ae.prototype[s]=function(h){h=h===r?1:yt(ge(h),0);var g=this.__filtered__&&!o?new Ae(this):this.clone();return g.__filtered__?g.__takeCount__=Ft(h,g.__takeCount__):g.__views__.push({size:Ft(h,Y),type:s+(g.__dir__<0?"Right":"")}),g},Ae.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),ir(["filter","map","takeWhile"],function(s,o){var h=o+1,g=h==V||h==ve;Ae.prototype[s]=function(y){var S=this.clone();return S.__iteratees__.push({iteratee:ie(y,3),type:h}),S.__filtered__=S.__filtered__||g,S}}),ir(["head","last"],function(s,o){var h="take"+(o?"Right":"");Ae.prototype[s]=function(){return this[h](1).value()[0]}}),ir(["initial","tail"],function(s,o){var h="drop"+(o?"":"Right");Ae.prototype[s]=function(){return this.__filtered__?new Ae(this):this[h](1)}}),Ae.prototype.compact=function(){return this.filter(Vt)},Ae.prototype.find=function(s){return this.filter(s).head()},Ae.prototype.findLast=function(s){return this.reverse().find(s)},Ae.prototype.invokeMap=_e(function(s,o){return typeof s=="function"?new Ae(this):this.map(function(h){return Is(h,s,o)})}),Ae.prototype.reject=function(s){return this.filter(ko(ie(s)))},Ae.prototype.slice=function(s,o){s=ge(s);var h=this;return h.__filtered__&&(s>0||o<0)?new Ae(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),o!==r&&(o=ge(o),h=o<0?h.dropRight(-o):h.take(o-s)),h)},Ae.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Ae.prototype.toArray=function(){return this.take(Y)},Nr(Ae.prototype,function(s,o){var h=/^(?:filter|find|map|reject)|While$/.test(o),g=/^(?:head|last)$/.test(o),y=T[g?"take"+(o=="last"?"Right":""):o],S=g||/^find/.test(o);y&&(T.prototype[o]=function(){var C=this.__wrapped__,R=g?[1]:arguments,M=C instanceof Ae,U=R[0],$=M||de(C),G=function(we){var Ie=y.apply(T,ln([we],R));return g&&q?Ie[0]:Ie};$&&h&&typeof U=="function"&&U.length!=1&&(M=$=!1);var q=this.__chain__,te=!!this.__actions__.length,ae=S&&!q,me=M&&!te;if(!S&&$){C=me?C:new Ae(this);var oe=s.apply(C,R);return oe.__actions__.push({func:Oo,args:[G],thisArg:r}),new ar(oe,q)}return ae&&me?s.apply(this,R):(oe=this.thru(G),ae?g?oe.value()[0]:oe.value():oe)})}),ir(["pop","push","shift","sort","splice","unshift"],function(s){var o=no[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",g=/^(?:pop|shift)$/.test(s);T.prototype[s]=function(){var y=arguments;if(g&&!this.__chain__){var S=this.value();return o.apply(de(S)?S:[],y)}return this[h](function(C){return o.apply(de(C)?C:[],y)})}}),Nr(Ae.prototype,function(s,o){var h=T[o];if(h){var g=h.name+"";He.call(Bi,g)||(Bi[g]=[]),Bi[g].push({name:o,func:h})}}),Bi[Ao(r,w).name]=[{name:"wrapper",func:r}],Ae.prototype.clone=d3,Ae.prototype.reverse=p3,Ae.prototype.value=g3,T.prototype.at=VL,T.prototype.chain=XL,T.prototype.commit=jL,T.prototype.next=WL,T.prototype.plant=YL,T.prototype.reverse=KL,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=ZL,T.prototype.first=T.prototype.head,bs&&(T.prototype[bs]=qL),T},Ni=jF();Dn?((Dn.exports=Ni)._=Ni,rc._=Ni):Ct._=Ni}).call(At)}(Ya,Ya.exports);var xg=Ya.exports;const XM={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},bg=ne.forwardRef((t,e)=>{const[r,n]=ne.useState([]),[,i]=ne.useState(0),[a,u]=ne.useState([]),[,l]=W.useState(!1),[f,p]=LM({autoPlay:!1}),v=W.useRef(null),c=W.useRef(null),d=W.useRef(XM),m=W.useRef(),{tl:_,dragModeRef:x}=W.useContext(_n),{frames:b,delays:w}=f,{src:E,startAt:A,endAt:I,frameStartAt:O,frameEndAt:N,loop:L,visible:k,disabled:D,transformation:{width:j=0,height:Q=0,x:fe,y:H,animation:V,colorCorrection:le={}},pointerdown:ve}=t,{temperatureFilter:z,sharpnessFilter:ee,hueFilter:pe,blurFilter:X,adjustmentFilter:Y,vignetteFilter:ce,noiseFilter:Se}=_i(le),{blurRadius:xe=0,vignette:Me=0,noise:Oe=0}=le,Ge=.1;HM(E,p),ct(je.PAUSE,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ct(je.SEEK_END,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ct(je.SCRUBBER_CLICKED,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ne.useEffect(()=>{d.current&&v.current&&(x.current?(v.current.stop(),d.current.isPlaying=!1,d.current.isDragging=!0):d.current.isDragging=!1)},[x]),ne.useEffect(()=>{if(!$s(b)){const Le=hM(b,ut=>{const{data:rr,width:Ot,height:mt}=ut,Hr=new Uint8Array(rr);return Jt.Texture.fromBuffer(Hr,Ot,mt)}),J=Le.map((ut,rr)=>({texture:ut,time:w[rr]}));n(Le),u(J);let se=0;w.forEach(ut=>{se+=ut*10}),i(se),d.current.totalDuration=se,d.current.totalFrames=b.length}},[b,w]);const ze=xg.debounce(Le=>{if(v.current){let J=Le===0?0:Le/Ge;J=isNaN(J)?0:J;const se=d.current.totalFrames;J=J>se?se:J,J>=se?(v.current.gotoAndStop(0),d.current.isPlaying=!1):(v.current.gotoAndPlay(J||0),d.current.isPlaying=!0)}},20),Ke=xg.debounce(()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},50),Ze=Le=>{if(v.current){let J=Le===0?0:Le/Ge;J=isNaN(J)?0:J;const se=d.current.totalFrames;J=J>se?se:J,J>=se?(v.current.gotoAndStop(0),d.current.isPlaying=!1):(v.current.gotoAndPlay(J||0),d.current.isPlaying=!0)}},be=()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},De=()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},Qe=Le=>{var se;const J=Le+((se=m.current)==null?void 0:se.time());v.current&&x.current?(ze(J),Ke(),d.current.isPlaying=!1):m.current&&v.current&&!d.current.isPlaying&&m.current.isActive()&&_.current.isActive()&&(ze(J),d.current.isPlaying=!0)},Je=()=>{l(!0)};return W.useEffect(()=>{let Le=xt.context(()=>{});if(c.current&&_.current){const J={duration:Number(N)-Number(O),onStart:Ze,onComplete:be,onStartParams:[O,N],onCompleteParams:[],onInterrupt:De,onUpdate:Qe,onUpdateParams:[O,N]};m.current&&m.current.kill(),Le=xt.context(()=>{m.current=xt.from(c.current,J,O),_.current.add(m.current,A)})}return()=>{m.current&&(m.current.kill(),xt.killTweensOf(m.current)),Le.revert()}},[V,A,I,O,N]),Ee.jsx(xn,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:Ee.jsx(Xe.Container,{ref:c,children:r&&r.length>0&&Ee.jsx(yg,{x:fe,y:H,width:j,height:Q,animationSpeed:1,alpha:k?1:0,loop:L,textures:a,onComplete:Je,anchor:.5,forwardRef:v,...!D&&k&&{interactive:!0,pointerdown:ve},filters:[z,ee,pe,Y,...xe>0?[X]:[],...Me>0?[ce]:[],...Oe>0?[Se]:[]]})})})});bg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const jM=ne.forwardRef((t,e)=>{const n=W.useRef(null),i=W.useRef(0),a=W.useRef(null),u=W.useRef(null),l=W.useRef(16),f=W.useRef(null),{visible:p,text:v,disabled:c,transformation:d,pointerdown:m,onDobuleClick:_}=t,{x,y:b,fontFamily:w="Arial",fontWeight:E="normal",fontStyle:A="normal",fontSize:I=16,fontVariant:O="normal",fill:N="black",stroke:L,strokeThickness:k=0,blurRadius:D=0,blurEnabled:j=!1,dropShadowColor:Q=null,dropShadow:fe=!1,dropShadowBlur:H=0,wordWrapWidth:V=5e7,leading:le=0,letterSpacing:ve,colorCorrection:z={}}=d,{temperatureFilter:ee,sharpnessFilter:pe,hueFilter:X,blurFilter:Y,adjustmentFilter:ce}=_i(z),{blurRadius:Se=0}=z;ne.useEffect(()=>{l.current=Number(I)},[I]);const xe=["italic","oblique"].includes(A)?A:void 0,Me=["small-caps"].includes(O),Oe=["bold","bolder","lighter","100","200","300"].includes(E)?E:void 0,Ge=Number(ve)>0?ve:void 0,ze=ne.useMemo(()=>new Jt.TextStyle({fontFamily:w,fontSize:I,fill:N||"white",...L&&k>0&&{stroke:L,strokeThickness:k},...xe&&{fontStyle:xe},...Me&&{fontVariant:Me},...Oe&&{fontWeight:Oe},...Ge&&{letterSpacing:Ge},...j&&{dropShadow:!0,dropShadowBlur:Number(D),dropShadowColor:(Q==null?void 0:Q.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...fe&&{dropShadow:!0,dropShadowBlur:Number(H),dropShadowColor:(Q==null?void 0:Q.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:V||500,leading:le||0}),[j,D,N,w,I,A,le,xe,Oe,Me,Ge,Q,L,k,V,fe,H]);ne.useEffect(()=>{f.current={...d}},[d]);const Ke=()=>{const be=new Date().getTime();be-i.current<300&&_?_():m&&m(),i.current=be},Ze=()=>{!c&&_&&_()};return Ee.jsx(xn,{...t,ref:e,isText:!0,onDoubleClick:Ze,children:Ee.jsx(Xe.Container,{ref:n,children:Ee.jsx(Xe.Container,{alpha:1,ref:u,children:Ee.jsx(Xe.Text,{style:ze,x,y:b,anchor:.5,text:v,alpha:p?1:0,...p&&!c&&{interactive:!0,buttonMode:!0,pointerdown:Ke},ref:a,filters:[ee,pe,X,ce,...Se>0?[Y]:[]]})})})})});var WM=Er,qM=function(){return WM.Date.now()},YM=qM,KM=/\s/;function ZM(t){for(var e=t.length;e--&&KM.test(t.charAt(e)););return e}var QM=ZM,JM=QM,eO=/^\s+/;function tO(t){return t&&t.slice(0,JM(t)+1).replace(eO,"")}var rO=tO,nO=rO,wg=ji,iO=Va,Tg=0/0,sO=/^[-+]0x[0-9a-f]+$/i,aO=/^0b[01]+$/i,oO=/^0o[0-7]+$/i,uO=parseInt;function lO(t){if(typeof t=="number")return t;if(iO(t))return Tg;if(wg(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=wg(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=nO(t);var r=aO.test(t);return r||oO.test(t)?uO(t.slice(2),r?2:8):sO.test(t)?Tg:+t}var cO=lO,hO=ji,Dl=YM,Sg=cO,fO="Expected a function",dO=Math.max,pO=Math.min;function gO(t,e,r){var n,i,a,u,l,f,p=0,v=!1,c=!1,d=!0;if(typeof t!="function")throw new TypeError(fO);e=Sg(e)||0,hO(r)&&(v=!!r.leading,c="maxWait"in r,a=c?dO(Sg(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d);function m(N){var L=n,k=i;return n=i=void 0,p=N,u=t.apply(k,L),u}function _(N){return p=N,l=setTimeout(w,e),v?m(N):u}function x(N){var L=N-f,k=N-p,D=e-L;return c?pO(D,a-k):D}function b(N){var L=N-f,k=N-p;return f===void 0||L>=e||L<0||c&&k>=a}function w(){var N=Dl();if(b(N))return E(N);l=setTimeout(w,x(N))}function E(N){return l=void 0,d&&n?m(N):(n=i=void 0,u)}function A(){l!==void 0&&clearTimeout(l),p=0,n=f=i=l=void 0}function I(){return l===void 0?u:E(Dl())}function O(){var N=Dl(),L=b(N);if(n=arguments,i=this,f=N,L){if(l===void 0)return _(f);if(c)return clearTimeout(l),l=setTimeout(w,e),m(f)}return l===void 0&&(l=setTimeout(w,e)),u}return O.cancel=A,O.flush=I,O}var mO=gO;const Ka=Wn(mO),Ag=(t,e,r,n)=>{const i=W.useCallback(Ka(t,n),[t,n]),a=W.useCallback(Ka(e,n),[e,n]),u=W.useCallback(Ka(r,n),[r,n]),l=W.useCallback(()=>{i()},[i]),f=W.useCallback(()=>{a()},[a]),p=W.useCallback(()=>{u()},[u]);return{onPointerOver:l,onPointerDown:f,onPointerOut:p}},vO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Eg=ne.forwardRef((t,e)=>{const[r,n]=ne.useState(0),[i,a]=ne.useState(),u=W.useRef(null),l=W.useRef(null),f=W.useRef(null),p=W.useRef(vO),v=W.useRef(),{uniqueId:c,mute:d=!1,src:m,startAt:_,endAt:x,frameStartAt:b,frameEndAt:w,visible:E,disabled:A,transformation:{x:I,y:O,width:N,height:L,animation:k,colorCorrection:D={}},pointerdown:j=()=>{},pointerout:Q=()=>{},pointerover:fe=()=>{}}=t,{tl:H,dragModeRef:V,isRemotion:le}=W.useContext(_n),{onPointerDown:ve,onPointerOut:z,onPointerOver:ee}=Ag(fe,j,Q,1),{blurRadius:pe=0,vignette:X=0,noise:Y=0}=D,{temperatureFilter:ce,sharpnessFilter:Se,hueFilter:xe,blurFilter:Me,adjustmentFilter:Oe,vignetteFilter:Ge,noiseFilter:ze}=_i(D),Ke=m||"",Ze=ne.useMemo(()=>{const J=document.createElement("video");return J.src=m,J.crossOrigin="Anonymus",J.autoplay=!1,J.currentTime=b===0?.001:b,J},[m,b]);ct(je.PAUSE,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),ct(je.SCRUBBER_CLICKED,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),ct(je.REVERSE_MODE_END,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)});const be=ne.useCallback(Ka(()=>{if(f.current){const J=f.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&f.current.pause(),p.current.isPlaying=!1}},400),[f]);ne.useEffect(()=>{f.current&&!le?(V.current?(be(),p.current.isPlaying=!1,p.current.isDragging=!0):p.current.isDragging=!1,f.current.muted=d):p.current.isDragging=!1},[d,V,be,f]);const De=J=>{if(f.current){if(f.current.currentTime=Number(J),!V.current){const se=f.current,ut=se.currentTime>0&&!se.paused&&!se.ended&&se.readyState>se.HAVE_CURRENT_DATA;H.current&&H.current.isActive()&&v.current&&v.current.isActive()&&(ut||f.current.play(),p.current.isPlaying=!0,n(rr=>rr+1))}p.current.progress=0}},Qe=()=>{if(f.current){const J=f.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&f.current.pause(),p.current.isPlaying=!1,v.current&&(p.current.progress=v.current.progress())}},Je=()=>{},Le=()=>{var J,se;if(v.current&&(p.current.progress=v.current.progress()),f.current&&v.current){const ut=b+((J=v==null?void 0:v.current)==null?void 0:J.time()),rr=Math.abs(f.current.currentTime-ut),Ot=f.current,mt=Ot.currentTime>0&&!Ot.paused&&!Ot.ended&&Ot.readyState>Ot.HAVE_CURRENT_DATA;V.current?(f.current.currentTime=ut,setTimeout(()=>{f.current&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},100),p.current.isPlaying=!1):(mt!==p.current.isPlaying||!mt)&&p.current.progress>.01&&p.current.progress<.99?(se=H.current)!=null&&se.isActive()&&v.current&&v.current.isActive()&&(mt||f.current.play(),p.current.isPlaying=!0):rr>.3&&p.current.progress>.01&&p.current.progress<.99&&(f.current.currentTime=ut)}};return W.useEffect(()=>{let J=xt.context(()=>{});if(l.current&&H.current){const se={duration:Number(w)-Number(b),onStart:De,onComplete:Qe,onStartParams:[b,w],onCompleteParams:[],onInterrupt:Je,onUpdate:Le,onUpdateParams:[b,w],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)}};J=xt.context(()=>{v.current=xt.from(l.current,se,b),H.current.add(v.current,_)})}return()=>{v.current&&(v.current.kill(),xt.killTweensOf(v.current)),J.revert()}},[k,_,x,b,w]),ne.useEffect(()=>{f.current&&(f.current.muted=d)},[d]),ne.useEffect(()=>{const J=Math.round((Number(b)+Number.EPSILON)*100)/100,se=function(){f.current&&(f.current.currentTime=J)},ut=function(){if(f.current){const Bt=f.current;Bt.currentTime>0&&!Bt.paused&&!Bt.ended&&Bt.readyState>Bt.HAVE_CURRENT_DATA&&f.current.pause()}p.current.isWaiting=!1,p.current.isStalled=!1},rr=function(){f.current&&f.current.pause(),p.current.isWaiting=!0,p.current.isStalled=!1},Ot=function(){p.current.isWaiting=!1,p.current.isStalled=!1},mt=function(){p.current.isWaiting=!1,p.current.isStalled=!0},Hr=Math.round((Number(b)+Number.EPSILON)*100)/100,Ii=Math.round((Number(w)+Number.EPSILON)*100)/100,Ul=`${Ke}#t=${Hr},${Ii}`;return Jt.Texture.fromLoader(Ze,Ul,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(Bt=>{Bt&&(a(Bt),f.current=Bt.baseTexture.resource.source,f.current.id=c,f.current.addEventListener("loadedmetadata",se),f.current.addEventListener("ended",ut),f.current.addEventListener("loadstart",rr),f.current.addEventListener("canplaythrough",Ot),f.current.addEventListener("stalled",mt))}),()=>{f.current&&(f.current.pause(),f.current.removeEventListener("loadedmetadata",se),f.current.removeEventListener("ended",ut),f.current.removeEventListener("loadstart",rr),f.current.removeEventListener("canplaythrough",Ot),f.current.removeEventListener("stalled",mt))}},[Ke,c,b,w,Ze]),ne.useEffect(()=>{const J=setTimeout(()=>{i&&v.current&&H.current&&v.current.progress()<.1&&f.current&&!v.current.isActive()&&!le&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},30);return()=>{clearTimeout(J)}},[i]),ne.useEffect(()=>{H.current&&!H.current.isActive()&&!le&&(p.current.isPlaying=!1,f.current&&f.current.pause());const J=setTimeout(()=>{if(i&&H.current&&r>0&&!le){H.current.isActive()||(p.current.isPlaying=!1,f.current&&f.current.pause());const se=f.current;se&&H.current.isActive()&&v.current&&v.current.isActive()&&(se.currentTime>0&&!se.paused&&!se.ended&&se.readyState>se.HAVE_CURRENT_DATA||f.current.play(),p.current.isPlaying=!0)}},10);return()=>{clearTimeout(J)}},[r,i]),Ee.jsx(xn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:ve,pointerover:ee,pointerout:z,children:Ee.jsx(Xe.Container,{ref:l,children:i&&Ee.jsx(Xe.Sprite,{texture:i,width:N,height:L,anchor:.5,x:I,y:O,ref:u,alpha:E?1:0,...!A&&E&&{interactive:!0,pointerdown:j},filters:[ce,Se,xe,Oe,...pe>0?[Me]:[],...X>0?[Ge]:[],...Y>0?[ze]:[]]})})})});Eg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const _O=ne.forwardRef((t,e)=>{const[r,n]=ne.useState(),i=W.useRef(null),a=W.useRef(null),{visible:u,disabled:l,transformation:{x:f,y:p,width:v,height:c,colorCorrection:d={}},pointerdown:m=()=>{},pointerout:_=()=>{},pointerover:x=()=>{},canvasImageRef:b}=t,w=b&&(b==null?void 0:b.getCanvas()),E=Xe.useApp(),{onPointerDown:A,onPointerOut:I,onPointerOver:O}=Ag(x,m,_,1),{blurRadius:N=0,vignette:L=0,noise:k=0}=d,{temperatureFilter:D,sharpnessFilter:j,hueFilter:Q,blurFilter:fe,adjustmentFilter:H,vignetteFilter:V,noiseFilter:le}=_i(d);return Xe.useTick(()=>{if(i.current&&i.current.texture){const ve=i.current.texture.baseTexture;ve&&ve.update(),a.current&&E.renderer.render(a.current)}}),ne.useEffect(()=>{if(!$s(w)){const ve=Jt.Texture.from(w);n(ve)}},[w]),Ee.jsx(xn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:A,pointerover:O,pointerout:I,children:Ee.jsx(Xe.Container,{ref:a,children:r&&Ee.jsx(Xe.Sprite,{texture:r,width:v,height:c,anchor:.5,x:f,y:p,ref:i,alpha:u?1:0,...!l&&u&&{interactive:!0,pointerdown:m},filters:[D,j,Q,H,...N>0?[fe]:[],...L>0?[V]:[],...k>0?[le]:[]]})})})}),yO=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),f=W.useRef(!1),{tl:p,totalDuration:v=0,reverseModeRef:c}=W.useContext(_n),d=e<.2?"static":"none";ct(je.COMPLETE,()=>{i.current&&(i.current.eventMode=d)}),ct(je.REVERSE_MODE_END,()=>{if(p.current){const _=p.current.time();_>e&&_<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 m=()=>{if(c.current&&l.current&&p.current){f.current=!0;const _=p.current.time();_>e&&_<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 ct(je.COMPLETE,()=>{}),ne.useEffect(()=>{const _=xt.context(()=>{if(i.current&&p.current){const x=xt.to(i.current,{alpha:1,duration:.1});l.current=xt.to(a.current,{alpha:1,duration:Number(r)-Number(e),onStart:()=>{i.current&&(i.current.alpha=1,i.current.eventMode="static")},onUpdate:m,onComplete:()=>{i.current&&(i.current.alpha=0,i.current.eventMode="none")}}),p.current.add([x,l.current],e)}});return()=>{l.current&&(p.current.remove(l.current),l.current.progress(0).kill()),_.revert()}},[e,r,v,n]),Ee.jsx(Xe.Container,{ref:i,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:Ee.jsx(Xe.Container,{ref:u,children:Ee.jsx(Xe.Container,{ref:a,alpha:1,children:t.children})})})},xO=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:n}=W.useContext(_n);return ne.useEffect(()=>{n&&n(Number(r)+.2)},[e,r]),t.children};var Cg=(t=>(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.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))(Cg||{}),Ig=(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))(Ig||{});Ve.Animations=Cg,Ve.BlendModes=Ig,Ve.Events=je,Ve.GsapPixieContext=_n,Ve.GsapPixieContextProvider=vv,Ve.PixiAnimatedSprite=yg,Ve.PixiAudioSprite=aE,Ve.PixiGifSprite=bg,Ve.PixiImageSprite=mp,Ve.PixiSequence=yO,Ve.PixiSequenceWrapper=xO,Ve.PixiSvgPathSprite=sE,Ve.PixiTextSprite=jM,Ve.PixiVideoCanvasSyncSprite=_O,Ve.PixiVideoSprite=Eg,Ve.emitCustomEvent=qn,Ve.newCustomEventEmitter=mv,Ve.useCustomEventListener=ct,Object.defineProperty(Ve,Symbol.toStringTag,{value:"Module"})});
1992
+ }`;var me=rv(function(){return ke(S,te+"return "+G).apply(r,C)});if(me.source=G,Kc(me))throw me;return me}function oD(s){return Ue(s).toLowerCase()}function uD(s){return Ue(s).toUpperCase()}function lD(s,o,h){if(s=Ue(s),s&&(h||o===r))return hm(s);if(!s||!(o=Yt(o)))return s;var g=wr(s),y=wr(o),S=fm(g,y),C=dm(g,y)+1;return gn(g,S,C).join("")}function cD(s,o,h){if(s=Ue(s),s&&(h||o===r))return s.slice(0,gm(s)+1);if(!s||!(o=Yt(o)))return s;var g=wr(s),y=dm(g,wr(o))+1;return gn(g,0,y).join("")}function hD(s,o,h){if(s=Ue(s),s&&(h||o===r))return s.replace(Kl,"");if(!s||!(o=Yt(o)))return s;var g=wr(s),y=fm(g,wr(o));return gn(g,y).join("")}function fD(s,o){var h=j,g=Q;if(lt(o)){var y="separator"in o?o.separator:y;h="length"in o?ge(o.length):h,g="omission"in o?Yt(o.omission):g}s=Ue(s);var S=s.length;if(Oi(s)){var C=wr(s);S=C.length}if(h>=S)return s;var R=h-Fi(g);if(R<1)return g;var M=C?gn(C,0,R).join(""):s.slice(0,R);if(y===r)return M+g;if(C&&(R+=M.length-R),Zc(y)){if(s.slice(R).search(y)){var U,$=M;for(y.global||(y=dc(y.source,Ue(Fg.exec(y))+"g")),y.lastIndex=0;U=y.exec($);)var G=U.index;M=M.slice(0,G===r?R:G)}}else if(s.indexOf(Yt(y),R)!=R){var q=M.lastIndexOf(y);q>-1&&(M=M.slice(0,q))}return M+g}function dD(s){return s=Ue(s),s&&SO.test(s)?s.replace(Pg,zF):s}var pD=$i(function(s,o,h){return s+(h?" ":"")+o.toUpperCase()}),eh=n0("toUpperCase");function tv(s,o,h){return s=Ue(s),o=h?r:o,o===r?BF(s)?XF(s):IF(s):s.match(o)||[]}var rv=_e(function(s,o){try{return Wt(s,r,o)}catch(h){return Kc(h)?h:new he(h)}}),gD=qr(function(s,o){return ir(o,function(h){h=kr(h),jr(s,h,qc(s[h],s))}),s});function mD(s){var o=s==null?0:s.length,h=ie();return s=o?it(s,function(g){if(typeof g[1]!="function")throw new sr(u);return[h(g[0]),g[1]]}):[],_e(function(g){for(var y=-1;++y<o;){var S=s[y];if(Wt(S[0],this,g))return Wt(S[1],this,g)}})}function vD(s){return z3(or(s,c))}function th(s){return function(){return s}}function _D(s,o){return s==null||s!==s?o:s}var yD=s0(),xD=s0(!0);function Vt(s){return s}function rh(s){return Lm(typeof s=="function"?s:or(s,c))}function bD(s){return Bm(or(s,c))}function wD(s,o){return Dm(s,or(o,c))}var TD=_e(function(s,o){return function(h){return Is(h,s,o)}}),SD=_e(function(s,o){return function(h){return Is(s,h,o)}});function nh(s,o,h){var g=St(o),y=xo(o,g);h==null&&!(lt(o)&&(y.length||!g.length))&&(h=o,o=s,s=this,y=xo(o,St(o)));var S=!(lt(h)&&"chain"in h)||!!h.chain,C=Kr(s);return ir(y,function(R){var M=o[R];s[R]=M,C&&(s.prototype[R]=function(){var U=this.__chain__;if(S||U){var $=s(this.__wrapped__),G=$.__actions__=Gt(this.__actions__);return G.push({func:M,args:arguments,thisArg:s}),$.__chain__=U,$}return M.apply(s,ln([this.value()],arguments))})}),s}function AD(){return Ct._===this&&(Ct._=ZF),this}function ih(){}function ED(s){return s=ge(s),_e(function(o){return Um(o,s)})}var CD=Lc(it),ID=Lc(am),RD=Lc(ac);function nv(s){return zc(s)?oc(kr(s)):sN(s)}function PD(s){return function(o){return s==null?r:Hn(s,o)}}var MD=o0(),OD=o0(!0);function sh(){return[]}function ah(){return!1}function FD(){return{}}function ND(){return""}function LD(){return!0}function kD(s,o){if(s=ge(s),s<1||s>ee)return[];var h=Y,g=Ft(s,Y);o=ie(o),s-=Y;for(var y=cc(g,o);++h<s;)o(h);return y}function BD(s){return de(s)?it(s,kr):Kt(s)?[s]:Gt(T0(Ue(s)))}function DD(s){var o=++YF;return Ue(s)+o}var UD=Eo(function(s,o){return s+o},0),$D=kc("ceil"),GD=Eo(function(s,o){return s/o},1),zD=kc("floor");function HD(s){return s&&s.length?yo(s,Vt,bc):r}function VD(s,o){return s&&s.length?yo(s,ie(o,2),bc):r}function XD(s){return lm(s,Vt)}function jD(s,o){return lm(s,ie(o,2))}function WD(s){return s&&s.length?yo(s,Vt,Ac):r}function qD(s,o){return s&&s.length?yo(s,ie(o,2),Ac):r}var YD=Eo(function(s,o){return s*o},1),KD=kc("round"),ZD=Eo(function(s,o){return s-o},0);function QD(s){return s&&s.length?lc(s,Vt):0}function JD(s,o){return s&&s.length?lc(s,ie(o,2)):0}return T.after=bk,T.ary=N0,T.assign=uB,T.assignIn=q0,T.assignInWith=Uo,T.assignWith=lB,T.at=cB,T.before=L0,T.bind=qc,T.bindAll=gD,T.bindKey=k0,T.castArray=Fk,T.chain=M0,T.chunk=zN,T.compact=HN,T.concat=VN,T.cond=mD,T.conforms=vD,T.constant=th,T.countBy=QL,T.create=hB,T.curry=B0,T.curryRight=D0,T.debounce=U0,T.defaults=fB,T.defaultsDeep=dB,T.defer=wk,T.delay=Tk,T.difference=XN,T.differenceBy=jN,T.differenceWith=WN,T.drop=qN,T.dropRight=YN,T.dropRightWhile=KN,T.dropWhile=ZN,T.fill=QN,T.filter=ek,T.flatMap=nk,T.flatMapDeep=ik,T.flatMapDepth=sk,T.flatten=C0,T.flattenDeep=JN,T.flattenDepth=eL,T.flip=Sk,T.flow=yD,T.flowRight=xD,T.fromPairs=tL,T.functions=xB,T.functionsIn=bB,T.groupBy=ak,T.initial=nL,T.intersection=iL,T.intersectionBy=sL,T.intersectionWith=aL,T.invert=TB,T.invertBy=SB,T.invokeMap=uk,T.iteratee=rh,T.keyBy=lk,T.keys=St,T.keysIn=Ht,T.map=Fo,T.mapKeys=EB,T.mapValues=CB,T.matches=bD,T.matchesProperty=wD,T.memoize=Lo,T.merge=IB,T.mergeWith=Y0,T.method=TD,T.methodOf=SD,T.mixin=nh,T.negate=ko,T.nthArg=ED,T.omit=RB,T.omitBy=PB,T.once=Ak,T.orderBy=ck,T.over=CD,T.overArgs=Ek,T.overEvery=ID,T.overSome=RD,T.partial=Yc,T.partialRight=$0,T.partition=hk,T.pick=MB,T.pickBy=K0,T.property=nv,T.propertyOf=PD,T.pull=cL,T.pullAll=R0,T.pullAllBy=hL,T.pullAllWith=fL,T.pullAt=dL,T.range=MD,T.rangeRight=OD,T.rearg=Ck,T.reject=pk,T.remove=pL,T.rest=Ik,T.reverse=jc,T.sampleSize=mk,T.set=FB,T.setWith=NB,T.shuffle=vk,T.slice=gL,T.sortBy=xk,T.sortedUniq=wL,T.sortedUniqBy=TL,T.split=nD,T.spread=Rk,T.tail=SL,T.take=AL,T.takeRight=EL,T.takeRightWhile=CL,T.takeWhile=IL,T.tap=HL,T.throttle=Pk,T.thru=Oo,T.toArray=X0,T.toPairs=Z0,T.toPairsIn=Q0,T.toPath=BD,T.toPlainObject=W0,T.transform=LB,T.unary=Mk,T.union=RL,T.unionBy=PL,T.unionWith=ML,T.uniq=OL,T.uniqBy=FL,T.uniqWith=NL,T.unset=kB,T.unzip=Wc,T.unzipWith=P0,T.update=BB,T.updateWith=DB,T.values=Hi,T.valuesIn=UB,T.without=LL,T.words=tv,T.wrap=Ok,T.xor=kL,T.xorBy=BL,T.xorWith=DL,T.zip=UL,T.zipObject=$L,T.zipObjectDeep=GL,T.zipWith=zL,T.entries=Z0,T.entriesIn=Q0,T.extend=q0,T.extendWith=Uo,nh(T,T),T.add=UD,T.attempt=rv,T.camelCase=HB,T.capitalize=J0,T.ceil=$D,T.clamp=$B,T.clone=Nk,T.cloneDeep=kk,T.cloneDeepWith=Bk,T.cloneWith=Lk,T.conformsTo=Dk,T.deburr=ev,T.defaultTo=_D,T.divide=GD,T.endsWith=VB,T.eq=Sr,T.escape=XB,T.escapeRegExp=jB,T.every=JL,T.find=tk,T.findIndex=A0,T.findKey=pB,T.findLast=rk,T.findLastIndex=E0,T.findLastKey=gB,T.floor=zD,T.forEach=O0,T.forEachRight=F0,T.forIn=mB,T.forInRight=vB,T.forOwn=_B,T.forOwnRight=yB,T.get=Qc,T.gt=Uk,T.gte=$k,T.has=wB,T.hasIn=Jc,T.head=I0,T.identity=Vt,T.includes=ok,T.indexOf=rL,T.inRange=GB,T.invoke=AB,T.isArguments=jn,T.isArray=de,T.isArrayBuffer=Gk,T.isArrayLike=zt,T.isArrayLikeObject=dt,T.isBoolean=zk,T.isBuffer=mn,T.isDate=Hk,T.isElement=Vk,T.isEmpty=Xk,T.isEqual=jk,T.isEqualWith=Wk,T.isError=Kc,T.isFinite=qk,T.isFunction=Kr,T.isInteger=G0,T.isLength=Bo,T.isMap=z0,T.isMatch=Yk,T.isMatchWith=Kk,T.isNaN=Zk,T.isNative=Qk,T.isNil=eB,T.isNull=Jk,T.isNumber=H0,T.isObject=lt,T.isObjectLike=ht,T.isPlainObject=Ns,T.isRegExp=Zc,T.isSafeInteger=tB,T.isSet=V0,T.isString=Do,T.isSymbol=Kt,T.isTypedArray=zi,T.isUndefined=rB,T.isWeakMap=nB,T.isWeakSet=iB,T.join=oL,T.kebabCase=WB,T.last=lr,T.lastIndexOf=uL,T.lowerCase=qB,T.lowerFirst=YB,T.lt=sB,T.lte=aB,T.max=HD,T.maxBy=VD,T.mean=XD,T.meanBy=jD,T.min=WD,T.minBy=qD,T.stubArray=sh,T.stubFalse=ah,T.stubObject=FD,T.stubString=ND,T.stubTrue=LD,T.multiply=YD,T.nth=lL,T.noConflict=AD,T.noop=ih,T.now=No,T.pad=KB,T.padEnd=ZB,T.padStart=QB,T.parseInt=JB,T.random=zB,T.reduce=fk,T.reduceRight=dk,T.repeat=eD,T.replace=tD,T.result=OB,T.round=KD,T.runInContext=P,T.sample=gk,T.size=_k,T.snakeCase=rD,T.some=yk,T.sortedIndex=mL,T.sortedIndexBy=vL,T.sortedIndexOf=_L,T.sortedLastIndex=yL,T.sortedLastIndexBy=xL,T.sortedLastIndexOf=bL,T.startCase=iD,T.startsWith=sD,T.subtract=ZD,T.sum=QD,T.sumBy=JD,T.template=aD,T.times=kD,T.toFinite=Zr,T.toInteger=ge,T.toLength=j0,T.toLower=oD,T.toNumber=cr,T.toSafeInteger=oB,T.toString=Ue,T.toUpper=uD,T.trim=lD,T.trimEnd=cD,T.trimStart=hD,T.truncate=fD,T.unescape=dD,T.uniqueId=DD,T.upperCase=pD,T.upperFirst=eh,T.each=O0,T.eachRight=F0,T.first=I0,nh(T,function(){var s={};return Nr(T,function(o,h){He.call(T.prototype,h)||(s[h]=o)}),s}(),{chain:!1}),T.VERSION=n,ir(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){T[s].placeholder=T}),ir(["drop","take"],function(s,o){Ae.prototype[s]=function(h){h=h===r?1:yt(ge(h),0);var g=this.__filtered__&&!o?new Ae(this):this.clone();return g.__filtered__?g.__takeCount__=Ft(h,g.__takeCount__):g.__views__.push({size:Ft(h,Y),type:s+(g.__dir__<0?"Right":"")}),g},Ae.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),ir(["filter","map","takeWhile"],function(s,o){var h=o+1,g=h==V||h==ve;Ae.prototype[s]=function(y){var S=this.clone();return S.__iteratees__.push({iteratee:ie(y,3),type:h}),S.__filtered__=S.__filtered__||g,S}}),ir(["head","last"],function(s,o){var h="take"+(o?"Right":"");Ae.prototype[s]=function(){return this[h](1).value()[0]}}),ir(["initial","tail"],function(s,o){var h="drop"+(o?"":"Right");Ae.prototype[s]=function(){return this.__filtered__?new Ae(this):this[h](1)}}),Ae.prototype.compact=function(){return this.filter(Vt)},Ae.prototype.find=function(s){return this.filter(s).head()},Ae.prototype.findLast=function(s){return this.reverse().find(s)},Ae.prototype.invokeMap=_e(function(s,o){return typeof s=="function"?new Ae(this):this.map(function(h){return Is(h,s,o)})}),Ae.prototype.reject=function(s){return this.filter(ko(ie(s)))},Ae.prototype.slice=function(s,o){s=ge(s);var h=this;return h.__filtered__&&(s>0||o<0)?new Ae(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),o!==r&&(o=ge(o),h=o<0?h.dropRight(-o):h.take(o-s)),h)},Ae.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Ae.prototype.toArray=function(){return this.take(Y)},Nr(Ae.prototype,function(s,o){var h=/^(?:filter|find|map|reject)|While$/.test(o),g=/^(?:head|last)$/.test(o),y=T[g?"take"+(o=="last"?"Right":""):o],S=g||/^find/.test(o);y&&(T.prototype[o]=function(){var C=this.__wrapped__,R=g?[1]:arguments,M=C instanceof Ae,U=R[0],$=M||de(C),G=function(we){var Ie=y.apply(T,ln([we],R));return g&&q?Ie[0]:Ie};$&&h&&typeof U=="function"&&U.length!=1&&(M=$=!1);var q=this.__chain__,te=!!this.__actions__.length,ae=S&&!q,me=M&&!te;if(!S&&$){C=me?C:new Ae(this);var oe=s.apply(C,R);return oe.__actions__.push({func:Oo,args:[G],thisArg:r}),new ar(oe,q)}return ae&&me?s.apply(this,R):(oe=this.thru(G),ae?g?oe.value()[0]:oe.value():oe)})}),ir(["pop","push","shift","sort","splice","unshift"],function(s){var o=no[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",g=/^(?:pop|shift)$/.test(s);T.prototype[s]=function(){var y=arguments;if(g&&!this.__chain__){var S=this.value();return o.apply(de(S)?S:[],y)}return this[h](function(C){return o.apply(de(C)?C:[],y)})}}),Nr(Ae.prototype,function(s,o){var h=T[o];if(h){var g=h.name+"";He.call(Bi,g)||(Bi[g]=[]),Bi[g].push({name:o,func:h})}}),Bi[Ao(r,w).name]=[{name:"wrapper",func:r}],Ae.prototype.clone=d3,Ae.prototype.reverse=p3,Ae.prototype.value=g3,T.prototype.at=VL,T.prototype.chain=XL,T.prototype.commit=jL,T.prototype.next=WL,T.prototype.plant=YL,T.prototype.reverse=KL,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=ZL,T.prototype.first=T.prototype.head,bs&&(T.prototype[bs]=qL),T},Ni=jF();Dn?((Dn.exports=Ni)._=Ni,rc._=Ni):Ct._=Ni}).call(At)}(Ya,Ya.exports);var xg=Ya.exports;const XM={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},bg=ne.forwardRef((t,e)=>{const[r,n]=ne.useState([]),[,i]=ne.useState(0),[a,u]=ne.useState([]),[,l]=W.useState(!1),[f,p]=LM({autoPlay:!1}),v=W.useRef(null),c=W.useRef(null),d=W.useRef(XM),m=W.useRef(),{tl:_,dragModeRef:b}=W.useContext(_n),{frames:x,delays:w}=f,{src:E,startAt:A,endAt:I,frameStartAt:O,frameEndAt:N,loop:L,visible:k,disabled:D,transformation:{width:j=0,height:Q=0,x:fe,y:H,animation:V,colorCorrection:le={}},pointerdown:ve}=t,{temperatureFilter:z,sharpnessFilter:ee,hueFilter:pe,blurFilter:X,adjustmentFilter:Y,vignetteFilter:ce,noiseFilter:Se}=_i(le),{blurRadius:xe=0,vignette:Me=0,noise:Oe=0}=le,Ge=.1;HM(E,p),ct(je.PAUSE,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ct(je.SEEK_END,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ct(je.SCRUBBER_CLICKED,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ne.useEffect(()=>{d.current&&v.current&&(b.current?(v.current.stop(),d.current.isPlaying=!1,d.current.isDragging=!0):d.current.isDragging=!1)},[b]),ne.useEffect(()=>{if(!$s(x)){const Le=hM(x,ut=>{const{data:rr,width:Ot,height:mt}=ut,Hr=new Uint8Array(rr);return Jt.Texture.fromBuffer(Hr,Ot,mt)}),J=Le.map((ut,rr)=>({texture:ut,time:w[rr]}));n(Le),u(J);let se=0;w.forEach(ut=>{se+=ut*10}),i(se),d.current.totalDuration=se,d.current.totalFrames=x.length}},[x,w]);const ze=xg.debounce(Le=>{if(v.current){let J=Le===0?0:Le/Ge;J=isNaN(J)?0:J;const se=d.current.totalFrames;J=J>se?se:J,J>=se?(v.current.gotoAndStop(0),d.current.isPlaying=!1):(v.current.gotoAndPlay(J||0),d.current.isPlaying=!0)}},20),Ke=xg.debounce(()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},50),Ze=Le=>{if(v.current){let J=Le===0?0:Le/Ge;J=isNaN(J)?0:J;const se=d.current.totalFrames;J=J>se?se:J,J>=se?(v.current.gotoAndStop(0),d.current.isPlaying=!1):(v.current.gotoAndPlay(J||0),d.current.isPlaying=!0)}},be=()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},De=()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},Qe=Le=>{var se;const J=Le+((se=m.current)==null?void 0:se.time());v.current&&b.current?(ze(J),Ke(),d.current.isPlaying=!1):m.current&&v.current&&!d.current.isPlaying&&m.current.isActive()&&_.current.isActive()&&(ze(J),d.current.isPlaying=!0)},Je=()=>{l(!0)};return W.useEffect(()=>{let Le=xt.context(()=>{});if(c.current&&_.current){const J={duration:Number(N)-Number(O),onStart:Ze,onComplete:be,onStartParams:[O,N],onCompleteParams:[],onInterrupt:De,onUpdate:Qe,onUpdateParams:[O,N]};m.current&&m.current.kill(),Le=xt.context(()=>{m.current=xt.from(c.current,J,O),_.current.add(m.current,A)})}return()=>{m.current&&(m.current.kill(),xt.killTweensOf(m.current)),Le.revert()}},[V,A,I,O,N]),Ee.jsx(xn,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:Ee.jsx(Xe.Container,{ref:c,children:r&&r.length>0&&Ee.jsx(yg,{x:fe,y:H,width:j,height:Q,animationSpeed:1,alpha:k?1:0,loop:L,textures:a,onComplete:Je,anchor:.5,forwardRef:v,...!D&&k&&{interactive:!0,pointerdown:ve},filters:[z,ee,pe,Y,...xe>0?[X]:[],...Me>0?[ce]:[],...Oe>0?[Se]:[]]})})})});bg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const jM=ne.forwardRef((t,e)=>{const n=W.useRef(null),i=W.useRef(0),a=W.useRef(null),u=W.useRef(null),l=W.useRef(16),f=W.useRef(null),{visible:p,text:v,disabled:c,transformation:d,pointerdown:m,onDobuleClick:_}=t,{x:b,y:x,fontFamily:w="Arial",fontWeight:E="normal",fontStyle:A="normal",fontSize:I=16,fontVariant:O="normal",fill:N="black",stroke:L,strokeThickness:k=0,blurRadius:D=0,blurEnabled:j=!1,dropShadowColor:Q=null,dropShadow:fe=!1,dropShadowBlur:H=0,wordWrapWidth:V=5e7,leading:le=0,letterSpacing:ve,colorCorrection:z={}}=d,{temperatureFilter:ee,sharpnessFilter:pe,hueFilter:X,blurFilter:Y,adjustmentFilter:ce}=_i(z),{blurRadius:Se=0}=z;ne.useEffect(()=>{l.current=Number(I)},[I]);const xe=["italic","oblique"].includes(A)?A:void 0,Me=["small-caps"].includes(O),Oe=["bold","bolder","lighter","100","200","300"].includes(E)?E:void 0,Ge=Number(ve)>0?ve:void 0,ze=ne.useMemo(()=>new Jt.TextStyle({fontFamily:w,fontSize:I,fill:N||"white",...L&&k>0&&{stroke:L,strokeThickness:k},...xe&&{fontStyle:xe},...Me&&{fontVariant:Me},...Oe&&{fontWeight:Oe},...Ge&&{letterSpacing:Ge},...j&&{dropShadow:!0,dropShadowBlur:Number(D),dropShadowColor:(Q==null?void 0:Q.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...fe&&{dropShadow:!0,dropShadowBlur:Number(H),dropShadowColor:(Q==null?void 0:Q.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:V||500,leading:le||0}),[j,D,N,w,I,A,le,xe,Oe,Me,Ge,Q,L,k,V,fe,H]);ne.useEffect(()=>{f.current={...d}},[d]);const Ke=()=>{const be=new Date().getTime();be-i.current<300&&_?_():m&&m(),i.current=be},Ze=()=>{!c&&_&&_()};return Ee.jsx(xn,{...t,ref:e,isText:!0,onDoubleClick:Ze,children:Ee.jsx(Xe.Container,{ref:n,children:Ee.jsx(Xe.Container,{alpha:1,ref:u,children:Ee.jsx(Xe.Text,{style:ze,x:b,y:x,anchor:.5,text:v,alpha:p?1:0,...p&&!c&&{interactive:!0,buttonMode:!0,pointerdown:Ke},ref:a,filters:[ee,pe,X,ce,...Se>0?[Y]:[]]})})})})});var WM=Er,qM=function(){return WM.Date.now()},YM=qM,KM=/\s/;function ZM(t){for(var e=t.length;e--&&KM.test(t.charAt(e)););return e}var QM=ZM,JM=QM,eO=/^\s+/;function tO(t){return t&&t.slice(0,JM(t)+1).replace(eO,"")}var rO=tO,nO=rO,wg=ji,iO=Va,Tg=0/0,sO=/^[-+]0x[0-9a-f]+$/i,aO=/^0b[01]+$/i,oO=/^0o[0-7]+$/i,uO=parseInt;function lO(t){if(typeof t=="number")return t;if(iO(t))return Tg;if(wg(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=wg(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=nO(t);var r=aO.test(t);return r||oO.test(t)?uO(t.slice(2),r?2:8):sO.test(t)?Tg:+t}var cO=lO,hO=ji,Dl=YM,Sg=cO,fO="Expected a function",dO=Math.max,pO=Math.min;function gO(t,e,r){var n,i,a,u,l,f,p=0,v=!1,c=!1,d=!0;if(typeof t!="function")throw new TypeError(fO);e=Sg(e)||0,hO(r)&&(v=!!r.leading,c="maxWait"in r,a=c?dO(Sg(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d);function m(N){var L=n,k=i;return n=i=void 0,p=N,u=t.apply(k,L),u}function _(N){return p=N,l=setTimeout(w,e),v?m(N):u}function b(N){var L=N-f,k=N-p,D=e-L;return c?pO(D,a-k):D}function x(N){var L=N-f,k=N-p;return f===void 0||L>=e||L<0||c&&k>=a}function w(){var N=Dl();if(x(N))return E(N);l=setTimeout(w,b(N))}function E(N){return l=void 0,d&&n?m(N):(n=i=void 0,u)}function A(){l!==void 0&&clearTimeout(l),p=0,n=f=i=l=void 0}function I(){return l===void 0?u:E(Dl())}function O(){var N=Dl(),L=x(N);if(n=arguments,i=this,f=N,L){if(l===void 0)return _(f);if(c)return clearTimeout(l),l=setTimeout(w,e),m(f)}return l===void 0&&(l=setTimeout(w,e)),u}return O.cancel=A,O.flush=I,O}var mO=gO;const Ka=Wn(mO),Ag=(t,e,r,n)=>{const i=W.useCallback(Ka(t,n),[t,n]),a=W.useCallback(Ka(e,n),[e,n]),u=W.useCallback(Ka(r,n),[r,n]),l=W.useCallback(()=>{i()},[i]),f=W.useCallback(()=>{a()},[a]),p=W.useCallback(()=>{u()},[u]);return{onPointerOver:l,onPointerDown:f,onPointerOut:p}},vO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Eg=ne.forwardRef((t,e)=>{const[r,n]=ne.useState(0),[i,a]=ne.useState(),u=W.useRef(null),l=W.useRef(null),f=W.useRef(null),p=W.useRef(vO),v=W.useRef(),{uniqueId:c,mute:d=!1,src:m,startAt:_,endAt:b,frameStartAt:x,frameEndAt:w,visible:E,disabled:A,transformation:{x:I,y:O,width:N,height:L,animation:k,colorCorrection:D={}},pointerdown:j=()=>{},pointerout:Q=()=>{},pointerover:fe=()=>{}}=t,{tl:H,dragModeRef:V,isRemotion:le}=W.useContext(_n),{onPointerDown:ve,onPointerOut:z,onPointerOver:ee}=Ag(fe,j,Q,1),{blurRadius:pe=0,vignette:X=0,noise:Y=0}=D,{temperatureFilter:ce,sharpnessFilter:Se,hueFilter:xe,blurFilter:Me,adjustmentFilter:Oe,vignetteFilter:Ge,noiseFilter:ze}=_i(D),Ke=m||"",Ze=ne.useMemo(()=>{const J=document.createElement("video");return J.src=m,J.crossOrigin="Anonymus",J.autoplay=!1,J.currentTime=x===0?.001:x,J},[m,x]);ct(je.PAUSE,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),ct(je.SCRUBBER_CLICKED,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),ct(je.REVERSE_MODE_END,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)});const be=ne.useCallback(Ka(()=>{if(f.current){const J=f.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&f.current.pause(),p.current.isPlaying=!1}},400),[f]);ne.useEffect(()=>{f.current&&!le?(V.current?(be(),p.current.isPlaying=!1,p.current.isDragging=!0):p.current.isDragging=!1,f.current.muted=d):p.current.isDragging=!1},[d,V,be,f]);const De=J=>{if(f.current){if(f.current.currentTime=Number(J),!V.current){const se=f.current,ut=se.currentTime>0&&!se.paused&&!se.ended&&se.readyState>se.HAVE_CURRENT_DATA;H.current&&H.current.isActive()&&v.current&&v.current.isActive()&&(ut||f.current.play(),p.current.isPlaying=!0,n(rr=>rr+1))}p.current.progress=0}},Qe=()=>{if(f.current){const J=f.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&f.current.pause(),p.current.isPlaying=!1,v.current&&(p.current.progress=v.current.progress())}},Je=()=>{},Le=()=>{var J,se;if(v.current&&(p.current.progress=v.current.progress()),f.current&&v.current){const ut=x+((J=v==null?void 0:v.current)==null?void 0:J.time()),rr=Math.abs(f.current.currentTime-ut),Ot=f.current,mt=Ot.currentTime>0&&!Ot.paused&&!Ot.ended&&Ot.readyState>Ot.HAVE_CURRENT_DATA;V.current?(f.current.currentTime=ut,setTimeout(()=>{f.current&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},100),p.current.isPlaying=!1):(mt!==p.current.isPlaying||!mt)&&p.current.progress>.01&&p.current.progress<.99?(se=H.current)!=null&&se.isActive()&&v.current&&v.current.isActive()&&(mt||f.current.play(),p.current.isPlaying=!0):rr>.3&&p.current.progress>.01&&p.current.progress<.99&&(f.current.currentTime=ut)}};return W.useEffect(()=>{let J=xt.context(()=>{});if(l.current&&H.current){const se={duration:Number(w)-Number(x),onStart:De,onComplete:Qe,onStartParams:[x,w],onCompleteParams:[],onInterrupt:Je,onUpdate:Le,onUpdateParams:[x,w],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)}};J=xt.context(()=>{v.current=xt.from(l.current,se,x),H.current.add(v.current,_)})}return()=>{v.current&&(v.current.kill(),xt.killTweensOf(v.current)),J.revert()}},[k,_,b,x,w]),ne.useEffect(()=>{f.current&&(f.current.muted=d)},[d]),ne.useEffect(()=>{const J=Math.round((Number(x)+Number.EPSILON)*100)/100,se=function(){f.current&&(f.current.currentTime=J)},ut=function(){if(f.current){const Bt=f.current;Bt.currentTime>0&&!Bt.paused&&!Bt.ended&&Bt.readyState>Bt.HAVE_CURRENT_DATA&&f.current.pause()}p.current.isWaiting=!1,p.current.isStalled=!1},rr=function(){f.current&&f.current.pause(),p.current.isWaiting=!0,p.current.isStalled=!1},Ot=function(){p.current.isWaiting=!1,p.current.isStalled=!1},mt=function(){p.current.isWaiting=!1,p.current.isStalled=!0},Hr=Math.round((Number(x)+Number.EPSILON)*100)/100,Ii=Math.round((Number(w)+Number.EPSILON)*100)/100,Ul=`${Ke}#t=${Hr},${Ii}`;return Jt.Texture.fromLoader(Ze,Ul,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(Bt=>{Bt&&(a(Bt),f.current=Bt.baseTexture.resource.source,f.current.id=c,f.current.addEventListener("loadedmetadata",se),f.current.addEventListener("ended",ut),f.current.addEventListener("loadstart",rr),f.current.addEventListener("canplaythrough",Ot),f.current.addEventListener("stalled",mt))}),()=>{f.current&&(f.current.pause(),f.current.removeEventListener("loadedmetadata",se),f.current.removeEventListener("ended",ut),f.current.removeEventListener("loadstart",rr),f.current.removeEventListener("canplaythrough",Ot),f.current.removeEventListener("stalled",mt))}},[Ke,c,x,w,Ze]),ne.useEffect(()=>{const J=setTimeout(()=>{i&&v.current&&H.current&&v.current.progress()<.1&&f.current&&!v.current.isActive()&&!le&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},30);return()=>{clearTimeout(J)}},[i]),ne.useEffect(()=>{H.current&&!H.current.isActive()&&!le&&(p.current.isPlaying=!1,f.current&&f.current.pause());const J=setTimeout(()=>{if(i&&H.current&&r>0&&!le){H.current.isActive()||(p.current.isPlaying=!1,f.current&&f.current.pause());const se=f.current;se&&H.current.isActive()&&v.current&&v.current.isActive()&&(se.currentTime>0&&!se.paused&&!se.ended&&se.readyState>se.HAVE_CURRENT_DATA||f.current.play(),p.current.isPlaying=!0)}},10);return()=>{clearTimeout(J)}},[r,i]),Ee.jsx(xn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:ve,pointerover:ee,pointerout:z,children:Ee.jsx(Xe.Container,{ref:l,children:i&&Ee.jsx(Xe.Sprite,{texture:i,width:N,height:L,anchor:.5,x:I,y:O,ref:u,alpha:E?1:0,...!A&&E&&{interactive:!0,pointerdown:j},filters:[ce,Se,xe,Oe,...pe>0?[Me]:[],...X>0?[Ge]:[],...Y>0?[ze]:[]]})})})});Eg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const _O=ne.forwardRef((t,e)=>{const[r,n]=ne.useState(),i=W.useRef(null),a=W.useRef(null),{visible:u,disabled:l,transformation:{x:f,y:p,width:v,height:c,colorCorrection:d={}},pointerdown:m=()=>{},pointerout:_=()=>{},pointerover:b=()=>{},canvasImageRef:x}=t,w=x&&(x==null?void 0:x.getCanvas()),E=Xe.useApp(),{onPointerDown:A,onPointerOut:I,onPointerOver:O}=Ag(b,m,_,1),{blurRadius:N=0,vignette:L=0,noise:k=0}=d,{temperatureFilter:D,sharpnessFilter:j,hueFilter:Q,blurFilter:fe,adjustmentFilter:H,vignetteFilter:V,noiseFilter:le}=_i(d);return Xe.useTick(()=>{if(i.current&&i.current.texture){const ve=i.current.texture.baseTexture;ve&&ve.update(),a.current&&E.renderer.render(a.current)}}),ne.useEffect(()=>{if(!$s(w)){const ve=Jt.Texture.from(w);n(ve)}},[w]),Ee.jsx(xn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:A,pointerover:O,pointerout:I,children:Ee.jsx(Xe.Container,{ref:a,children:r&&Ee.jsx(Xe.Sprite,{texture:r,width:v,height:c,anchor:.5,x:f,y:p,ref:i,alpha:u?1:0,...!l&&u&&{interactive:!0,pointerdown:m},filters:[D,j,Q,H,...N>0?[fe]:[],...L>0?[V]:[],...k>0?[le]:[]]})})})}),yO=t=>{var b;const{startAt:e,endAt:r,uniqueId:n}=t,i=W.useRef(null),a=W.useRef(null),u=W.useRef(null),l=W.useRef(null),f=W.useRef(!1),{tl:p,totalDuration:v=0,reverseModeRef:c}=W.useContext(_n),d=e<.2?"static":"none",m=W.useRef(1);ct(je.COMPLETE,()=>{i.current&&(i.current.eventMode=d)}),ct(je.REVERSE_MODE_END,()=>{if(p.current){const x=p.current.time();x>e&&x<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 x=p.current.time();x>e&&x<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 ct(je.COMPLETE,()=>{}),ne.useEffect(()=>{const x=xt.context(()=>{if(i.current&&p.current){const w=xt.to(i.current,{alpha:1,duration:.1});l.current=xt.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([w,l.current],e)}});return()=>{l.current&&(p.current.remove(l.current),l.current.progress(0).kill()),x.revert()}},[e,r,v,n]),console.log("current alpha with time",(b=i==null?void 0:i.current)==null?void 0:b.alpha),Ee.jsx(Xe.Container,{ref:i,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:Ee.jsx(Xe.Container,{ref:u,children:Ee.jsx(Xe.Container,{ref:a,alpha:1,children:t.children})})})},xO=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:n}=W.useContext(_n);return ne.useEffect(()=>{n&&n(Number(r)+.2)},[e,r]),t.children};var Cg=(t=>(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.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))(Cg||{}),Ig=(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))(Ig||{});Ve.Animations=Cg,Ve.BlendModes=Ig,Ve.Events=je,Ve.GsapPixieContext=_n,Ve.GsapPixieContextProvider=vv,Ve.PixiAnimatedSprite=yg,Ve.PixiAudioSprite=aE,Ve.PixiGifSprite=bg,Ve.PixiImageSprite=mp,Ve.PixiSequence=yO,Ve.PixiSequenceWrapper=xO,Ve.PixiSvgPathSprite=sE,Ve.PixiTextSprite=jM,Ve.PixiVideoCanvasSyncSprite=_O,Ve.PixiVideoSprite=Eg,Ve.emitCustomEvent=qn,Ve.newCustomEventEmitter=mv,Ve.useCustomEventListener=ct,Object.defineProperty(Ve,Symbol.toStringTag,{value:"Module"})});