reacthub-pixitweenjs 0.2.107-alpha.16 → 0.2.107-alpha.18
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/components/PixiSVGSprite/PixiSvgPathSprite.d.ts +2 -0
- package/dist/hooks/withEffectsHook.d.ts +1 -0
- package/dist/hooks/withFiltersHook.d.ts +4 -0
- package/dist/index.es.js +4659 -4604
- package/dist/index.umd.js +104 -90
- package/dist/types/BaseProps.d.ts +2 -0
- package/dist/types/Effects.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Ve,
|
|
1
|
+
(function(Ve,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap"],W):(Ve=typeof globalThis<"u"?globalThis:Ve||self,W(Ve["reacthub-pixitweenjs"]={},Ve.React,Ve.PIXIReact,Ve.PIXI,Ve.reacthubReactBindings,Ve.gsap))})(this,function(Ve,W,rt,sv,av,yt){"use strict";function oh(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const ie=oh(W),lr=oh(sv);var At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ov(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var uh={exports:{}},ks={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,24 +6,24 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var av=q,ov=Symbol.for("react.element"),uv=Symbol.for("react.fragment"),lv=Object.prototype.hasOwnProperty,cv=av.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hv={key:!0,ref:!0,__self:!0,__source:!0};function uh(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)lv.call(e,n)&&!hv.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:ov,type:t,key:a,ref:u,props:i,_owner:cv.current}}Ns.Fragment=uv,Ns.jsx=uh,Ns.jsxs=uh,oh.exports=Ns;var Fe=oh.exports,pn=(t=>(t.BlackAndWhite="BlackAndWhite",t.Sepia="Sepia",t.RetroVintage="RetroVintage",t.NightVision="NightVision",t.Normal="Normal",t.None="Normal",t))(pn||{});let lh;function ch(){return lh=document.body,lh}function ot(t,e,r){let n;return q.useEffect(()=>{n=n||ch();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 Vn(t,e){const r=ch(),n=new CustomEvent(t,{detail:e});r.dispatchEvent(n)}function fv(){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 gn=ie.createContext({}),Xe={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"},dv=({children:t})=>{const[e,r]=q.useState(0),n=q.useRef(),i=q.useRef(),a=q.useRef(.001),u=q.useRef(!1),l=q.useRef(!1);q.useLayoutEffect(()=>(i.current=mt.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&mt.killTweensOf(n.current),n.current=mt.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&n.current.revert(),i.current.revert()}),[]);const f=q.useCallback(()=>{if(n.current){let E=n.current.time();E<a.current?u.current=!0:u.current=!1,a.current=E}},[]);q.useEffect(()=>{if(n.current){const x=n.current;x.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){x.pause(),f()}).eventCallback("onUpdate",function(){f()}).eventCallback("onRepeat",function(){console.log("onrepeat",x.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",x.progress())}).eventCallback("onComplete",function(){x.pause(),x.revert(),Vn(Xe.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),f()})}},[]);const p=q.useCallback(()=>{n.current&&n.current.revert()},[]),v=q.useCallback(()=>{n.current&&n.current.restart()},[]),c=q.useCallback(()=>{if(n.current){const x=n.current;x.repeat(1),x.restart()}},[]),d=q.useCallback(x=>{n.current&&n.current.seek(x)},[]),m=q.useCallback(()=>{n.current&&n.current.seek(4)},[]),_=q.useCallback(()=>{const x=n.current;return x?x.totalDuration():0},[]),b=()=>{n.current&&(n.current.pause(),Vn(Xe.PAUSE))},w=()=>{n.current&&(n.current.resume(),Vn(Xe.RESUME))};return ot(Xe.SEEK_START,()=>{l.current=!0}),ot(Xe.SCRUBBER_PLAY,()=>{w()}),ot(Xe.SCRUBBER_PAUSE,()=>{b()}),ot(Xe.SCRUBBER_SEEK,x=>{d(x)}),ot(Xe.SEEK_END,()=>{l.current=!1}),ot(Xe.REVERSE_MODE_START,()=>{u.current=!0}),ot(Xe.REVERSE_MODE_END,()=>{u.current=!1}),ot(Xe.SCRUBBER_PROGRESS_UPDATE,x=>{}),Fe.jsx(gn.Provider,{value:{gsapCtx:i,tl:n,handlePlay:w,handlePause:b,handleReset:p,handleSeek:d,handleSeekTest:m,handleRestart:v,handleRepeat:c,playerTimeRef:a,getTimelineDuration:_,totalDuration:e,setTotalDuration:r,reverseModeRef:u,dragModeRef:l},children:t})},pv=({pixiTransformerRef:t,imageRef:e,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:f=!1})=>{const p=Fr.utils.string2hex("#F3C409"),v=Fr.utils.string2hex("#F3C409"),c=ie.useRef({isDragging:!1}),d=300,m=ie.useRef(0),_=ie.useCallback(()=>{a&&!c.current.isDragging&&a(!0)},[a]),b=ie.useCallback(()=>{a&&!c.current.isDragging&&a(!1)},[a]),w=ie.useCallback(()=>{c.current.isDragging=!0;const S=new Date().getTime();S-m.current<d&&u&&u(),m.current=S},[]),x=ie.useCallback(S=>{c.current.isDragging=!0,i&&i(S),Vn(Xe.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),E=ie.useCallback(()=>{if(e.current===null)return;const S=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],$=k[0]<0?-1:1,j=k[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(S),y:Math.round(I),width:Math.round(Math.max(5,O)),height:Math.round(Math.max(5,N)),rotation:L,scale:f?k:[$,j]}}),Vn(Xe.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),c.current.isDragging=!1},[n]);return ie.useEffect(()=>(t.current&&(t.current.on("mouseover",_),t.current.on("mouseout",b),t.current.on("mousedown",w)),()=>{t.current&&(t.current.off("mouseover",_),t.current.off("mouseout",b),t.current.off("mousedown",w))}),[]),Fe.jsx(iv.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:x,transformcommit:E})};var gv=Object.prototype;function mv(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||gv;return t===r}var hh=mv;function vv(t,e){return function(r){return t(e(r))}}var _v=vv,yv=_v,xv=yv(Object.keys,Object),bv=xv,wv=hh,Tv=bv,Av=Object.prototype,Sv=Av.hasOwnProperty;function Ev(t){if(!wv(t))return Tv(t);var e=[];for(var r in Object(t))Sv.call(t,r)&&r!="constructor"&&e.push(r);return e}var fh=Ev,Cv=typeof bt=="object"&&bt&&bt.Object===Object&&bt,dh=Cv,Iv=dh,Rv=typeof self=="object"&&self&&self.Object===Object&&self,Pv=Iv||Rv||Function("return this")(),wr=Pv,Mv=wr,Ov=Mv.Symbol,Ls=Ov,ph=Ls,gh=Object.prototype,Fv=gh.hasOwnProperty,Nv=gh.toString,$i=ph?ph.toStringTag:void 0;function Lv(t){var e=Fv.call(t,$i),r=t[$i];try{t[$i]=void 0;var n=!0}catch{}var i=Nv.call(t);return n&&(e?t[$i]=r:delete t[$i]),i}var kv=Lv,Bv=Object.prototype,Dv=Bv.toString;function Uv(t){return Dv.call(t)}var $v=Uv,mh=Ls,Gv=kv,zv=$v,Hv="[object Null]",Vv="[object Undefined]",vh=mh?mh.toStringTag:void 0;function Xv(t){return t==null?t===void 0?Vv:Hv:vh&&vh in Object(t)?Gv(t):zv(t)}var Gi=Xv;function jv(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var zi=jv,Wv=Gi,qv=zi,Yv="[object AsyncFunction]",Kv="[object Function]",Zv="[object GeneratorFunction]",Qv="[object Proxy]";function Jv(t){if(!qv(t))return!1;var e=Wv(t);return e==Kv||e==Zv||e==Yv||e==Qv}var _h=Jv,e_=wr,t_=e_["__core-js_shared__"],r_=t_,$o=r_,yh=function(){var t=/[^.]+$/.exec($o&&$o.keys&&$o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function n_(t){return!!yh&&yh in t}var i_=n_,s_=Function.prototype,a_=s_.toString;function o_(t){if(t!=null){try{return a_.call(t)}catch{}try{return t+""}catch{}}return""}var xh=o_,u_=_h,l_=i_,c_=zi,h_=xh,f_=/[\\^$.*+?()[\]{}|]/g,d_=/^\[object .+?Constructor\]$/,p_=Function.prototype,g_=Object.prototype,m_=p_.toString,v_=g_.hasOwnProperty,__=RegExp("^"+m_.call(v_).replace(f_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y_(t){if(!c_(t)||l_(t))return!1;var e=u_(t)?__:d_;return e.test(h_(t))}var x_=y_;function b_(t,e){return t==null?void 0:t[e]}var w_=b_,T_=x_,A_=w_;function S_(t,e){var r=A_(t,e);return T_(r)?r:void 0}var Xn=S_,E_=Xn,C_=wr,I_=E_(C_,"DataView"),R_=I_,P_=Xn,M_=wr,O_=P_(M_,"Map"),Go=O_,F_=Xn,N_=wr,L_=F_(N_,"Promise"),k_=L_,B_=Xn,D_=wr,U_=B_(D_,"Set"),$_=U_,G_=Xn,z_=wr,H_=G_(z_,"WeakMap"),V_=H_,zo=R_,Ho=Go,Vo=k_,Xo=$_,jo=V_,bh=Gi,jn=xh,wh="[object Map]",X_="[object Object]",Th="[object Promise]",Ah="[object Set]",Sh="[object WeakMap]",Eh="[object DataView]",j_=jn(zo),W_=jn(Ho),q_=jn(Vo),Y_=jn(Xo),K_=jn(jo),mn=bh;(zo&&mn(new zo(new ArrayBuffer(1)))!=Eh||Ho&&mn(new Ho)!=wh||Vo&&mn(Vo.resolve())!=Th||Xo&&mn(new Xo)!=Ah||jo&&mn(new jo)!=Sh)&&(mn=function(t){var e=bh(t),r=e==X_?t.constructor:void 0,n=r?jn(r):"";if(n)switch(n){case j_:return Eh;case W_:return wh;case q_:return Th;case Y_:return Ah;case K_:return Sh}return e});var Ch=mn;function Z_(t){return t!=null&&typeof t=="object"}var Hi=Z_,Q_=Gi,J_=Hi,ey="[object Arguments]";function ty(t){return J_(t)&&Q_(t)==ey}var ry=ty,Ih=ry,ny=Hi,Rh=Object.prototype,iy=Rh.hasOwnProperty,sy=Rh.propertyIsEnumerable,ay=Ih(function(){return arguments}())?Ih:function(t){return ny(t)&&iy.call(t,"callee")&&!sy.call(t,"callee")},Wo=ay,oy=Array.isArray,Tr=oy,uy=9007199254740991;function ly(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=uy}var qo=ly,cy=_h,hy=qo;function fy(t){return t!=null&&hy(t.length)&&!cy(t)}var ks=fy,Bs={exports:{}};function dy(){return!1}var py=dy;Bs.exports,function(t,e){var r=wr,n=py,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,u=a&&a.exports===i,l=u?r.Buffer:void 0,f=l?l.isBuffer:void 0,p=f||n;t.exports=p}(Bs,Bs.exports);var Yo=Bs.exports,gy=Gi,my=qo,vy=Hi,_y="[object Arguments]",yy="[object Array]",xy="[object Boolean]",by="[object Date]",wy="[object Error]",Ty="[object Function]",Ay="[object Map]",Sy="[object Number]",Ey="[object Object]",Cy="[object RegExp]",Iy="[object Set]",Ry="[object String]",Py="[object WeakMap]",My="[object ArrayBuffer]",Oy="[object DataView]",Fy="[object Float32Array]",Ny="[object Float64Array]",Ly="[object Int8Array]",ky="[object Int16Array]",By="[object Int32Array]",Dy="[object Uint8Array]",Uy="[object Uint8ClampedArray]",$y="[object Uint16Array]",Gy="[object Uint32Array]",Ke={};Ke[Fy]=Ke[Ny]=Ke[Ly]=Ke[ky]=Ke[By]=Ke[Dy]=Ke[Uy]=Ke[$y]=Ke[Gy]=!0,Ke[_y]=Ke[yy]=Ke[My]=Ke[xy]=Ke[Oy]=Ke[by]=Ke[wy]=Ke[Ty]=Ke[Ay]=Ke[Sy]=Ke[Ey]=Ke[Cy]=Ke[Iy]=Ke[Ry]=Ke[Py]=!1;function zy(t){return vy(t)&&my(t.length)&&!!Ke[gy(t)]}var Hy=zy;function Vy(t){return function(e){return t(e)}}var Xy=Vy,Ds={exports:{}};Ds.exports,function(t,e){var r=dh,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}(Ds,Ds.exports);var jy=Ds.exports,Wy=Hy,qy=Xy,Ph=jy,Mh=Ph&&Ph.isTypedArray,Yy=Mh?qy(Mh):Wy,Ko=Yy,Ky=fh,Zy=Ch,Qy=Wo,Jy=Tr,ex=ks,tx=Yo,rx=hh,nx=Ko,ix="[object Map]",sx="[object Set]",ax=Object.prototype,ox=ax.hasOwnProperty;function ux(t){if(t==null)return!0;if(ex(t)&&(Jy(t)||typeof t=="string"||typeof t.splice=="function"||tx(t)||nx(t)||Qy(t)))return!t.length;var e=Zy(t);if(e==ix||e==sx)return!t.size;if(rx(t))return!Ky(t).length;for(var r in t)if(ox.call(t,r))return!1;return!0}var lx=ux;const Zo=Hn(lx);var Qo=(t=>(t.NONE="none",t.NORMAL="normal",t.LENSFLARE="lensflare",t.FILMSTRIP="filmstrip",t.GRUNGE="grunge",t.BRICKS="bricks",t))(Qo||{});const Oh={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}},cx=t=>{const{overlay:e,width:r,height:n,x:i,y:a}=t,{src:u,blendmode:l}=Oh[e]||Oh.normal;return Fe.jsx(et.TilingSprite,{image:u,width:r,height:n,x:i,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},hx=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Wn=ie.forwardRef((t,e)=>{const[r,n]=ie.useState(!1),[i,a]=q.useState(!1),[u,l]=q.useState(!1),f=q.useRef(null),p=q.useRef(null),v=q.useRef(null),c=q.useRef(null),{uniqueId:d,visible:m,transformation:{x:_,y:b,width:w,height:x,scale:E=[1,1],rotation:S=0,effect:I,overlay:O},applyTransformer:N,disabled:L,pointerdown:k,pointerout:$,pointerover:j,isText:ee,isDragging:se,isGif:X,onDoubleClick:H,isTextEditMode:ve}=t;ot(Xe.COMPLETE,()=>{f.current}),ie.useImperativeHandle(e,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>u}),[i,u]),ie.useEffect(()=>{f.current&&n(!0)},[]);const ke=ie.useCallback(()=>{l(!0),j&&j()},[]),z=ie.useCallback(()=>{a(!0)},[]),re=ie.useCallback(V=>{t.onAnchorTransformationEnd&&t.onAnchorTransformationEnd(V),a(!1)},[]),ge=et.withFilters(et.Container,{matrix:Fr.filters.ColorMatrixFilter});return Fe.jsxs(et.Container,{ref:p,children:[Fe.jsxs(et.Container,{ref:f,position:[_,b],pivot:[_,b],width:w,height:x,scale:E,rotation:S,...!L&&m&&!i&&!se&&{interactive:!0,buttonMode:!0,pointerdown:k,pointerover:j,pointerout:$},children:[!X&&Fe.jsx(ge,{scale:1,apply:({matrix:V})=>{I===pn.BlackAndWhite?V.desaturate():I===pn.Sepia?V.sepia():I===pn.RetroVintage||I===pn.NightVision?V.negative():I===pn.Normal&&V.reset()},matrix:{enabled:!0,matrix:hx},children:Fe.jsx(et.Container,{ref:v,children:t.children})}),X&&Fe.jsx(et.Container,{ref:v,children:t.children}),!Zo(O)&&O!==Qo.NONE&&O!==Qo.NORMAL&&Fe.jsx(cx,{overlay:O,width:w,height:x,x:_,y:b})]}),N&&m&&!ve&&Fe.jsx(pv,{pixiTransformerRef:c,imageRef:f,isMounted:r,transformCommit:re,transformChange:z,mouseoverEvent:ke,uniqueId:d,isText:ee,onDoubleClick:H})]})});Wn.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var vn=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))(vn||{}),Fh=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(Fh||{}),Jo=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(Jo||{}),ce=(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))(ce||{}),Kr=(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))(Kr||{}),Z=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(Z||{}),qn=(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))(qn||{}),Ne=(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))(Ne||{}),eu=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(eu||{}),Ar=(t=>(t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR",t))(Ar||{}),Vi=(t=>(t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t))(Vi||{}),_n=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(_n||{}),Zr=(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))(Zr||{}),yn=(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))(yn||{}),tu=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(tu||{}),qt=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(qt||{}),dt=(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))(dt||{}),ft=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(ft||{}),Sr=(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))(Sr||{});const be={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,Nh=/iPod/i,Lh=/iPad/i,kh=/\biOS-universal(?:.+)Mac\b/i,nu=/\bAndroid(?:.+)Mobile\b/i,Bh=/Android/i,Yn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Us=/Silk/i,Nr=/Windows Phone/i,Dh=/\bWindows(?:.+)ARM\b/i,Uh=/BlackBerry/i,$h=/BB10/i,Gh=/Opera Mini/i,zh=/\b(CriOS|Chrome)(?:.+)Mobile/i,Hh=/Mobile(?:.+)Firefox\b/i,Vh=function(t){return typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream>"u"};function fx(t){return function(e){return e.test(t)}}function Xh(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=fx(r),a={apple:{phone:i(ru)&&!i(Nr),ipod:i(Nh),tablet:!i(ru)&&(i(Lh)||Vh(e))&&!i(Nr),universal:i(kh),device:(i(ru)||i(Nh)||i(Lh)||i(kh)||Vh(e))&&!i(Nr)},amazon:{phone:i(Yn),tablet:!i(Yn)&&i(Us),device:i(Yn)||i(Us)},android:{phone:!i(Nr)&&i(Yn)||!i(Nr)&&i(nu),tablet:!i(Nr)&&!i(Yn)&&!i(nu)&&(i(Us)||i(Bh)),device:!i(Nr)&&(i(Yn)||i(Us)||i(nu)||i(Bh))||i(/\bokhttp\b/i)},windows:{phone:i(Nr),tablet:i(Dh),device:i(Nr)||i(Dh)},other:{blackberry:i(Uh),blackberry10:i($h),opera:i(Gh),firefox:i(Hh),chrome:i(zh),device:i(Uh)||i($h)||i(Gh)||i(Hh)||i(zh)},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 Kn=(Xh.default??Xh)(globalThis.navigator);be.RETINA_PREFIX=/@([0-9\.]+)x/,be.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var jh={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 w=this._events[b],x=arguments.length,E,S;if(w.fn){switch(w.once&&this.removeListener(p,w.fn,void 0,!0),x){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,v),!0;case 3:return w.fn.call(w.context,v,c),!0;case 4:return w.fn.call(w.context,v,c,d),!0;case 5:return w.fn.call(w.context,v,c,d,m),!0;case 6:return w.fn.call(w.context,v,c,d,m,_),!0}for(S=1,E=new Array(x-1);S<x;S++)E[S-1]=arguments[S];w.fn.apply(w.context,E)}else{var I=w.length,O;for(S=0;S<I;S++)switch(w[S].once&&this.removeListener(p,w[S].fn,void 0,!0),x){case 1:w[S].fn.call(w[S].context);break;case 2:w[S].fn.call(w[S].context,v);break;case 3:w[S].fn.call(w[S].context,v,c);break;case 4:w[S].fn.call(w[S].context,v,c,d);break;default:if(!E)for(O=1,E=new Array(x-1);O<x;O++)E[O-1]=arguments[O];w[S].fn.apply(w[S].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,w=[],x=_.length;b<x;b++)(_[b].fn!==v||d&&!_[b].once||c&&_[b].context!==c)&&w.push(_[b]);w.length?this._events[m]=w.length===1?w[0]:w: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})(jh);var dx=jh.exports;const $s=Hn(dx);var iu={exports:{}};iu.exports=Gs,iu.exports.default=Gs;function Gs(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,a=Wh(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=_x(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 Xi(a,u,r,l,f,m,0),u}function Wh(t,e,r,n,i){var a,u;if(i===ou(t,e,r,n)>0)for(a=e;a<r;a+=n)u=Kh(a,t[a],t[a+1],u);else for(a=r-n;a>=e;a-=n)u=Kh(a,t[a],t[a+1],u);return u&&zs(u,u.next)&&(Wi(u),u=u.next),u}function xn(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(zs(r,r.next)||nt(r.prev,r,r.next)===0)){if(Wi(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function Xi(t,e,r,n,i,a,u){if(t){!u&&a&&Tx(t,n,i,a);for(var l=t,f,p;t.prev!==t.next;){if(f=t.prev,p=t.next,a?gx(t,n,i,a):px(t)){e.push(f.i/r|0),e.push(t.i/r|0),e.push(p.i/r|0),Wi(t),t=p.next,l=p.next;continue}if(t=p,t===l){u?u===1?(t=mx(xn(t),e,r),Xi(t,e,r,n,i,a,2)):u===2&&vx(t,e,r,n,i,a):Xi(xn(t),e,r,n,i,a,1);break}}}}function px(t){var e=t.prev,r=t,n=t.next;if(nt(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&&Zn(i,l,a,f,u,p,_.x,_.y)&&nt(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function gx(t,e,r,n){var i=t.prev,a=t,u=t.next;if(nt(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,w=v>c?v>d?v:d:c>d?c:d,x=su(m,_,e,r,n),E=su(b,w,e,r,n),S=t.prevZ,I=t.nextZ;S&&S.z>=x&&I&&I.z<=E;){if(S.x>=m&&S.x<=b&&S.y>=_&&S.y<=w&&S!==i&&S!==u&&Zn(l,v,f,c,p,d,S.x,S.y)&&nt(S.prev,S,S.next)>=0||(S=S.prevZ,I.x>=m&&I.x<=b&&I.y>=_&&I.y<=w&&I!==i&&I!==u&&Zn(l,v,f,c,p,d,I.x,I.y)&&nt(I.prev,I,I.next)>=0))return!1;I=I.nextZ}for(;S&&S.z>=x;){if(S.x>=m&&S.x<=b&&S.y>=_&&S.y<=w&&S!==i&&S!==u&&Zn(l,v,f,c,p,d,S.x,S.y)&&nt(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;I&&I.z<=E;){if(I.x>=m&&I.x<=b&&I.y>=_&&I.y<=w&&I!==i&&I!==u&&Zn(l,v,f,c,p,d,I.x,I.y)&&nt(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function mx(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!zs(i,a)&&qh(i,n,n.next,a)&&ji(i,a)&&ji(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),Wi(n),Wi(n.next),n=t=a),n=n.next}while(n!==t);return xn(n)}function vx(t,e,r,n,i,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&Ex(u,l)){var f=Yh(u,l);u=xn(u,u.next),f=xn(f,f.next),Xi(u,e,r,n,i,a,0),Xi(f,e,r,n,i,a,0);return}l=l.next}u=u.next}while(u!==t)}function _x(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=Wh(t,l,f,n,!1),p===p.next&&(p.steiner=!0),i.push(Sx(p));for(i.sort(yx),a=0;a<i.length;a++)r=xx(i[a],r);return r}function yx(t,e){return t.x-e.x}function xx(t,e){var r=bx(t,e);if(!r)return e;var n=Yh(r,t);return xn(n,n.next),xn(r,r.next)}function bx(t,e){var r=e,n=t.x,i=t.y,a=-1/0,u;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var l=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=n&&l>a&&(a=l,u=r.x<r.next.x?r:r.next,l===n))return u}r=r.next}while(r!==e);if(!u)return null;var f=u,p=u.x,v=u.y,c=1/0,d;r=u;do n>=r.x&&r.x>=p&&n!==r.x&&Zn(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),ji(r,t)&&(d<c||d===c&&(r.x>u.x||r.x===u.x&&wx(u,r)))&&(u=r,c=d)),r=r.next;while(r!==f);return u}function wx(t,e){return nt(t.prev,t,e.prev)<0&&nt(e.next,t,t.next)<0}function Tx(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,Ax(i)}function Ax(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 Sx(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 Zn(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 Ex(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Cx(t,e)&&(ji(t,e)&&ji(e,t)&&Ix(t,e)&&(nt(t.prev,t,e.prev)||nt(t,e.prev,e))||zs(t,e)&&nt(t.prev,t,t.next)>0&&nt(e.prev,e,e.next)>0)}function nt(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function zs(t,e){return t.x===e.x&&t.y===e.y}function qh(t,e,r,n){var i=Vs(nt(t,e,r)),a=Vs(nt(t,e,n)),u=Vs(nt(r,n,t)),l=Vs(nt(r,n,e));return!!(i!==a&&u!==l||i===0&&Hs(t,r,e)||a===0&&Hs(t,n,e)||u===0&&Hs(r,t,n)||l===0&&Hs(r,e,n))}function Hs(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 Vs(t){return t>0?1:t<0?-1:0}function Cx(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&&qh(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function ji(t,e){return nt(t.prev,t,t.next)<0?nt(t,e,t.next)>=0&&nt(t,t.prev,e)>=0:nt(t,e,t.prev)<0||nt(t,t.next,e)<0}function Ix(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 Yh(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 Kh(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 Wi(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}Gs.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}Gs.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 Rx=iu.exports;const Px=Hn(Rx);var Xs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Xs.exports,function(t,e){(function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,a=typeof bt=="object"&&bt;(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="-",w=/^xn--/,x=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,S={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(V){throw new RangeError(S[V])}function $(V,K){for(var he=V.length,ye=[];he--;)ye[he]=K(V[he]);return ye}function j(V,K){var he=V.split("@"),ye="";he.length>1&&(ye=he[0]+"@",V=he[1]),V=V.replace(E,".");var xe=V.split("."),Pe=$(xe,K).join(".");return ye+Pe}function ee(V){for(var K=[],he=0,ye=V.length,xe,Pe;he<ye;)xe=V.charCodeAt(he++),xe>=55296&&xe<=56319&&he<ye?(Pe=V.charCodeAt(he++),(Pe&64512)==56320?K.push(((xe&1023)<<10)+(Pe&1023)+65536):(K.push(xe),he--)):K.push(xe);return K}function se(V){return $(V,function(K){var he="";return K>65535&&(K-=65536,he+=N(K>>>10&1023|55296),K=56320|K&1023),he+=N(K),he}).join("")}function X(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:f}function H(V,K){return V+22+75*(V<26)-((K!=0)<<5)}function ve(V,K,he){var ye=0;for(V=he?O(V/d):V>>1,V+=O(V/K);V>I*v>>1;ye+=f)V=O(V/I);return O(ye+(I+1)*V/(V+c))}function ke(V){var K=[],he=V.length,ye,xe=0,Pe=_,Oe=m,ze,He,Ze,Q,W,ae,Ee,Ce,Qe;for(ze=V.lastIndexOf(b),ze<0&&(ze=0),He=0;He<ze;++He)V.charCodeAt(He)>=128&&k("not-basic"),K.push(V.charCodeAt(He));for(Ze=ze>0?ze+1:0;Ze<he;){for(Q=xe,W=1,ae=f;Ze>=he&&k("invalid-input"),Ee=X(V.charCodeAt(Ze++)),(Ee>=f||Ee>O((l-xe)/W))&&k("overflow"),xe+=Ee*W,Ce=ae<=Oe?p:ae>=Oe+v?v:ae-Oe,!(Ee<Ce);ae+=f)Qe=f-Ce,W>O(l/Qe)&&k("overflow"),W*=Qe;ye=K.length+1,Oe=ve(xe-Q,ye,Q==0),O(xe/ye)>l-Pe&&k("overflow"),Pe+=O(xe/ye),xe%=ye,K.splice(xe++,0,Pe)}return se(K)}function z(V){var K,he,ye,xe,Pe,Oe,ze,He,Ze,Q,W,ae=[],Ee,Ce,Qe,gr;for(V=ee(V),Ee=V.length,K=_,he=0,Pe=m,Oe=0;Oe<Ee;++Oe)W=V[Oe],W<128&&ae.push(N(W));for(ye=xe=ae.length,xe&&ae.push(b);ye<Ee;){for(ze=l,Oe=0;Oe<Ee;++Oe)W=V[Oe],W>=K&&W<ze&&(ze=W);for(Ce=ye+1,ze-K>O((l-he)/Ce)&&k("overflow"),he+=(ze-K)*Ce,K=ze,Oe=0;Oe<Ee;++Oe)if(W=V[Oe],W<K&&++he>l&&k("overflow"),W==K){for(He=he,Ze=f;Q=Ze<=Pe?p:Ze>=Pe+v?v:Ze-Pe,!(He<Q);Ze+=f)gr=He-Q,Qe=f-Q,ae.push(N(H(Q+gr%Qe,0))),He=O(gr/Qe);ae.push(N(H(He,0))),Pe=ve(he,Ce,ye==xe),he=0,++ye}++he,++K}return ae.join("")}function re(V){return j(V,function(K){return w.test(K)?ke(K.slice(4).toLowerCase()):K})}function ge(V){return j(V,function(K){return x.test(K)?"xn--"+z(K):K})}if(u={version:"1.4.1",ucs2:{decode:ee,encode:se},decode:ke,encode:z,toASCII:ge,toUnicode:re},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})(bt)}(Xs,Xs.exports);var Mx=Xs.exports,Ox=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},Zh=typeof Symbol<"u"&&Symbol,Fx=Ox,Nx=function(){return typeof Zh!="function"||typeof Symbol!="function"||typeof Zh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fx()},Qh={foo:{}},Lx=Object,kx=function(){return{__proto__:Qh}.foo===Qh.foo&&!({__proto__:null}instanceof Lx)},Bx="Function.prototype.bind called on incompatible ",uu=Array.prototype.slice,Dx=Object.prototype.toString,Ux="[object Function]",$x=function(e){var r=this;if(typeof r!="function"||Dx.call(r)!==Ux)throw new TypeError(Bx+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},Gx=$x,lu=Function.prototype.bind||Gx,zx=lu,Hx=zx.call(Function.call,Object.prototype.hasOwnProperty),Te,Qn=SyntaxError,Jh=Function,Jn=TypeError,cu=function(t){try{return Jh('"use strict"; return ('+t+").constructor;")()}catch{}},bn=Object.getOwnPropertyDescriptor;if(bn)try{bn({},"")}catch{bn=null}var hu=function(){throw new Jn},Vx=bn?function(){try{return arguments.callee,hu}catch{try{return bn(arguments,"callee").get}catch{return hu}}}():hu,ei=Nx(),Xx=kx(),vt=Object.getPrototypeOf||(Xx?function(t){return t.__proto__}:null),ti={},jx=typeof Uint8Array>"u"||!vt?Te:vt(Uint8Array),wn={"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":ei&&vt?vt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":ti,"%AsyncGenerator%":ti,"%AsyncGeneratorFunction%":ti,"%AsyncIteratorPrototype%":ti,"%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%":Jh,"%GeneratorFunction%":ti,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ei&&vt?vt(vt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ei||!vt?Te:vt(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"||!ei||!vt?Te:vt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ei&&vt?vt(""[Symbol.iterator]()):Te,"%Symbol%":ei?Symbol:Te,"%SyntaxError%":Qn,"%ThrowTypeError%":Vx,"%TypedArray%":jx,"%TypeError%":Jn,"%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(vt)try{null.error}catch(t){var Wx=vt(vt(t));wn["%Error.prototype%"]=Wx}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&&vt&&(r=vt(i.prototype))}return wn[e]=r,r},ef={"%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,js=Hx,Yx=qi.call(Function.call,Array.prototype.concat),Kx=qi.call(Function.apply,Array.prototype.splice),tf=qi.call(Function.call,String.prototype.replace),Ws=qi.call(Function.call,String.prototype.slice),Zx=qi.call(Function.call,RegExp.prototype.exec),Qx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Jx=/\\(\\)?/g,e1=function(e){var r=Ws(e,0,1),n=Ws(e,-1);if(r==="%"&&n!=="%")throw new Qn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Qn("invalid intrinsic syntax, expected opening `%`");var i=[];return tf(e,Qx,function(a,u,l,f){i[i.length]=l?tf(f,Jx,"$1"):u||a}),i},t1=function(e,r){var n=e,i;if(js(ef,n)&&(i=ef[n],n="%"+i[0]+"%"),js(wn,n)){var a=wn[n];if(a===ti&&(a=qx(n)),typeof a>"u"&&!r)throw new Jn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Qn("intrinsic "+e+" does not exist!")},fu=function(e,r){if(typeof e!="string"||e.length===0)throw new Jn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Jn('"allowMissing" argument must be a boolean');if(Zx(/^%?[^%]*%?$/,e)===null)throw new Qn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=e1(e),i=n.length>0?n[0]:"",a=t1("%"+i+"%",r),u=a.name,l=a.value,f=!1,p=a.alias;p&&(i=p[0],Kx(n,Yx([0,1],p)));for(var v=1,c=!0;v<n.length;v+=1){var d=n[v],m=Ws(d,0,1),_=Ws(d,-1);if((m==='"'||m==="'"||m==="`"||_==='"'||_==="'"||_==="`")&&m!==_)throw new Qn("property names with quotes must have matching quotes");if((d==="constructor"||!c)&&(f=!0),i+="."+d,u="%"+i+"%",js(wn,u))l=wn[u];else if(l!=null){if(!(d in l)){if(!r)throw new Jn("base intrinsic for "+e+" exists, but the property is not available.");return}if(bn&&v+1>=n.length){var b=bn(l,d);c=!!b,c&&"get"in b&&!("originalValue"in b.get)?l=b.get:l=l[d]}else c=js(l,d),l=l[d];c&&!f&&(wn[u]=l)}}return l},rf={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})(rf);var r1=rf.exports,nf=fu,sf=r1,n1=sf(nf("String.prototype.indexOf")),i1=function(e,r){var n=nf(e,!!r);return typeof n=="function"&&n1(e,".prototype.")>-1?sf(n):n};const s1=sv(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,qs=du&&pu&&typeof pu.get=="function"?pu.get:null,af=du&&Map.prototype.forEach,gu=typeof Set=="function"&&Set.prototype,mu=Object.getOwnPropertyDescriptor&&gu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ys=gu&&mu&&typeof mu.get=="function"?mu.get:null,of=gu&&Set.prototype.forEach,a1=typeof WeakMap=="function"&&WeakMap.prototype,Yi=a1?WeakMap.prototype.has:null,o1=typeof WeakSet=="function"&&WeakSet.prototype,Ki=o1?WeakSet.prototype.has:null,u1=typeof WeakRef=="function"&&WeakRef.prototype,uf=u1?WeakRef.prototype.deref:null,l1=Boolean.prototype.valueOf,c1=Object.prototype.toString,h1=Function.prototype.toString,f1=String.prototype.match,vu=String.prototype.slice,Qr=String.prototype.replace,d1=String.prototype.toUpperCase,lf=String.prototype.toLowerCase,cf=RegExp.prototype.test,hf=Array.prototype.concat,Er=Array.prototype.join,p1=Array.prototype.slice,ff=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,ri=typeof Symbol=="function"&&typeof Symbol.iterator=="object",St=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ri||"symbol")?Symbol.toStringTag:null,df=Object.prototype.propertyIsEnumerable,pf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function gf(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||cf.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-ff(-t):ff(t);if(n!==t){var i=String(n),a=vu.call(e,i.length+1);return Qr.call(i,r,"$&_")+"."+Qr.call(Qr.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Qr.call(e,r,"$&_")}var bu=s1,mf=bu.custom,vf=xf(mf)?mf:null,g1=function t(e,r,n,i){var a=r||{};if(Jr(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Jr(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=Jr(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(Jr(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(Jr(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 wf(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return l?gf(e,f):f}if(typeof e=="bigint"){var p=String(e)+"n";return l?gf(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=F1(a,n);if(typeof i>"u")i=[];else if(bf(i,e)>=0)return"[Circular]";function d(X,H,ve){if(H&&(i=p1.call(i),i.push(H)),ve){var ke={depth:a.depth};return Jr(a,"quoteStyle")&&(ke.quoteStyle=a.quoteStyle),t(X,ke,n+1,i)}return t(X,a,n+1,i)}if(typeof e=="function"&&!yf(e)){var m=A1(e),_=Ks(e,d);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(_.length>0?" { "+Er.call(_,", ")+" }":"")}if(xf(e)){var b=ri?Qr.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):xu.call(e);return typeof e=="object"&&!ri?Zi(b):b}if(P1(e)){for(var w="<"+lf.call(String(e.nodeName)),x=e.attributes||[],E=0;E<x.length;E++)w+=" "+x[E].name+"="+_f(m1(x[E].value),"double",a);return w+=">",e.childNodes&&e.childNodes.length&&(w+="..."),w+="</"+lf.call(String(e.nodeName))+">",w}if(wu(e)){if(e.length===0)return"[]";var S=Ks(e,d);return c&&!O1(S)?"["+Au(S,c)+"]":"[ "+Er.call(S,", ")+" ]"}if(_1(e)){var I=Ks(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!df.call(e,"cause")?"{ ["+String(e)+"] "+Er.call(hf.call("[cause]: "+d(e.cause),I),", ")+" }":I.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Er.call(I,", ")+" }"}if(typeof e=="object"&&u){if(vf&&typeof e[vf]=="function"&&bu)return bu(e,{depth:v-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(S1(e)){var O=[];return af&&af.call(e,function(X,H){O.push(d(H,e,!0)+" => "+d(X,e))}),Tf("Map",qs.call(e),O,c)}if(I1(e)){var N=[];return of&&of.call(e,function(X){N.push(d(X,e))}),Tf("Set",Ys.call(e),N,c)}if(E1(e))return Tu("WeakMap");if(R1(e))return Tu("WeakSet");if(C1(e))return Tu("WeakRef");if(x1(e))return Zi(d(Number(e)));if(w1(e))return Zi(d(_u.call(e)));if(b1(e))return Zi(l1.call(e));if(y1(e))return Zi(d(String(e)));if(!v1(e)&&!yf(e)){var L=Ks(e,d),k=pf?pf(e)===Object.prototype:e instanceof Object||e.constructor===Object,$=e instanceof Object?"":"null prototype",j=!k&&St&&Object(e)===e&&St in e?vu.call(en(e),8,-1):$?"Object":"",ee=k||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",se=ee+(j||$?"["+Er.call(hf.call([],j||[],$||[]),": ")+"] ":"");return L.length===0?se+"{}":c?se+"{"+Au(L,c)+"}":se+"{ "+Er.call(L,", ")+" }"}return String(e)};function _f(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function m1(t){return Qr.call(String(t),/"/g,""")}function wu(t){return en(t)==="[object Array]"&&(!St||!(typeof t=="object"&&St in t))}function v1(t){return en(t)==="[object Date]"&&(!St||!(typeof t=="object"&&St in t))}function yf(t){return en(t)==="[object RegExp]"&&(!St||!(typeof t=="object"&&St in t))}function _1(t){return en(t)==="[object Error]"&&(!St||!(typeof t=="object"&&St in t))}function y1(t){return en(t)==="[object String]"&&(!St||!(typeof t=="object"&&St in t))}function x1(t){return en(t)==="[object Number]"&&(!St||!(typeof t=="object"&&St in t))}function b1(t){return en(t)==="[object Boolean]"&&(!St||!(typeof t=="object"&&St in t))}function xf(t){if(ri)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 w1(t){if(!t||typeof t!="object"||!_u)return!1;try{return _u.call(t),!0}catch{}return!1}var T1=Object.prototype.hasOwnProperty||function(t){return t in this};function Jr(t,e){return T1.call(t,e)}function en(t){return c1.call(t)}function A1(t){if(t.name)return t.name;var e=f1.call(h1.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function bf(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 S1(t){if(!qs||!t||typeof t!="object")return!1;try{qs.call(t);try{Ys.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function E1(t){if(!Yi||!t||typeof t!="object")return!1;try{Yi.call(t,Yi);try{Ki.call(t,Ki)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function C1(t){if(!uf||!t||typeof t!="object")return!1;try{return uf.call(t),!0}catch{}return!1}function I1(t){if(!Ys||!t||typeof t!="object")return!1;try{Ys.call(t);try{qs.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function R1(t){if(!Ki||!t||typeof t!="object")return!1;try{Ki.call(t,Ki);try{Yi.call(t,Yi)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function P1(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function wf(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return wf(vu.call(t,0,e.maxStringLength),e)+n}var i=Qr.call(Qr.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,M1);return _f(i,"single",e)}function M1(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":"")+d1.call(e.toString(16))}function Zi(t){return"Object("+t+")"}function Tu(t){return t+" { ? }"}function Tf(t,e,r,n){var i=n?Au(r,n):Er.call(r,", ");return t+" ("+e+") {"+i+"}"}function O1(t){for(var e=0;e<t.length;e++)if(bf(t[e],`
|
|
10
|
-
`)>=0)return!1;return!0}function
|
|
11
|
-
`+e.prev+e.base;return r+
|
|
12
|
-
`+e.prev}function Ks(t,e){var r=wu(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=Jr(t,i)?e(t[i],t):""}var a=typeof yu=="function"?yu(t):[],u;if(ri){u={};for(var l=0;l<a.length;l++)u["$"+a[l]]=a[l]}for(var f in t)Jr(t,f)&&(r&&String(Number(f))===f&&f<t.length||ri&&u["$"+f]instanceof Symbol||(cf.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++)df.call(t,a[p])&&n.push("["+e(a[p])+"]: "+e(t[a[p]],t));return n}var Su=fu,ni=i1,N1=g1,L1=Su("%TypeError%"),Zs=Su("%WeakMap%",!0),Qs=Su("%Map%",!0),k1=ni("WeakMap.prototype.get",!0),B1=ni("WeakMap.prototype.set",!0),D1=ni("WeakMap.prototype.has",!0),U1=ni("Map.prototype.get",!0),$1=ni("Map.prototype.set",!0),G1=ni("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},z1=function(t,e){var r=Eu(t,e);return r&&r.value},H1=function(t,e,r){var n=Eu(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},V1=function(t,e){return!!Eu(t,e)},X1=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new L1("Side channel does not contain "+N1(a))},get:function(a){if(Zs&&a&&(typeof a=="object"||typeof a=="function")){if(e)return k1(e,a)}else if(Qs){if(r)return U1(r,a)}else if(n)return z1(n,a)},has:function(a){if(Zs&&a&&(typeof a=="object"||typeof a=="function")){if(e)return D1(e,a)}else if(Qs){if(r)return G1(r,a)}else if(n)return V1(n,a);return!1},set:function(a,u){Zs&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Zs),B1(e,a,u)):Qs?(r||(r=new Qs),$1(r,a,u)):(n||(n={key:{},next:null}),H1(n,a,u))}};return i},j1=String.prototype.replace,W1=/%20/g,Cu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Iu={default:Cu.RFC3986,formatters:{RFC1738:function(t){return j1.call(t,W1,"+")},RFC3986:function(t){return String(t)}},RFC1738:Cu.RFC1738,RFC3986:Cu.RFC3986},q1=Iu,Ru=Object.prototype.hasOwnProperty,Tn=Array.isArray,Cr=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Y1=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Tn(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},K1=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Tn(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 Tn(e)&&!Tn(r)&&(i=Af(e,n)),Tn(e)&&Tn(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)},Z1=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},Q1=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}},J1=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+Cr[p];continue}if(p<2048){l=l+(Cr[192|p>>6]+Cr[128|p&63]);continue}if(p<55296||p>=57344){l=l+(Cr[224|p>>12]+Cr[128|p>>6&63]+Cr[128|p&63]);continue}f+=1,p=65536+((p&1023)<<10|u.charCodeAt(f)&1023),l+=Cr[240|p>>18]+Cr[128|p>>12&63]+Cr[128|p>>6&63]+Cr[128|p&63]}return l},eb=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 Y1(r),e},tb=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},rb=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},nb=function(e,r){return[].concat(e,r)},ib=function(e,r){if(Tn(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},Sf={arrayToObject:Af,assign:Z1,combine:nb,compact:eb,decode:Q1,encode:J1,isBuffer:rb,isRegExp:tb,maybeMap:ib,merge:K1},Ef=X1,Js=Sf,Qi=Iu,sb=Object.prototype.hasOwnProperty,Cf={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},Lr=Array.isArray,ab=Array.prototype.push,If=function(t,e){ab.apply(t,Lr(e)?e:[e])},ob=Date.prototype.toISOString,Rf=Qi.default,Et={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Js.encode,encodeValuesOnly:!1,format:Rf,formatter:Qi.formatters[Rf],indices:!1,serializeDate:function(e){return ob.call(e)},skipNulls:!1,strictNullHandling:!1},ub=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Pu={},lb=function t(e,r,n,i,a,u,l,f,p,v,c,d,m,_,b,w){for(var x=e,E=w,S=0,I=!1;(E=E.get(Pu))!==void 0&&!I;){var O=E.get(e);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");I=!0}typeof E.get(Pu)>"u"&&(S=0)}if(typeof f=="function"?x=f(r,x):x instanceof Date?x=c(x):n==="comma"&&Lr(x)&&(x=Js.maybeMap(x,function(ke){return ke instanceof Date?c(ke):ke})),x===null){if(a)return l&&!_?l(r,Et.encoder,b,"key",d):r;x=""}if(ub(x)||Js.isBuffer(x)){if(l){var N=_?r:l(r,Et.encoder,b,"key",d);return[m(N)+"="+m(l(x,Et.encoder,b,"value",d))]}return[m(r)+"="+m(String(x))]}var L=[];if(typeof x>"u")return L;var k;if(n==="comma"&&Lr(x))_&&l&&(x=Js.maybeMap(x,l)),k=[{value:x.length>0?x.join(",")||null:void 0}];else if(Lr(f))k=f;else{var $=Object.keys(x);k=p?$.sort(p):$}for(var j=i&&Lr(x)&&x.length===1?r+"[]":r,ee=0;ee<k.length;++ee){var se=k[ee],X=typeof se=="object"&&typeof se.value<"u"?se.value:x[se];if(!(u&&X===null)){var H=Lr(x)?typeof n=="function"?n(j,se):j:j+(v?"."+se:"["+se+"]");w.set(e,S);var ve=Ef();ve.set(Pu,w),If(L,t(X,H,n,i,a,u,n==="comma"&&_&&Lr(x)?null:l,f,p,v,c,d,m,_,b,ve))}}return L},cb=function(e){if(!e)return Et;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||Et.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=Qi.default;if(typeof e.format<"u"){if(!sb.call(Qi.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Qi.formatters[n],a=Et.filter;return(typeof e.filter=="function"||Lr(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Et.addQueryPrefix,allowDots:typeof e.allowDots>"u"?Et.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Et.charsetSentinel,delimiter:typeof e.delimiter>"u"?Et.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Et.encode,encoder:typeof e.encoder=="function"?e.encoder:Et.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Et.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Et.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Et.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Et.strictNullHandling}},hb=function(t,e){var r=t,n=cb(e),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Lr(n.filter)&&(a=n.filter,i=a);var u=[];if(typeof r!="object"||r===null)return"";var l;e&&e.arrayFormat in Cf?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var f=Cf[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=Ef(),c=0;c<i.length;++c){var d=i[c];n.skipNulls&&r[d]===null||If(u,lb(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:""},ii=Sf,Mu=Object.prototype.hasOwnProperty,fb=Array.isArray,_t={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ii.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},db=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Pf=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},pb="utf8=%26%2310003%3B",gb="utf8=%E2%9C%93",mb=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]===gb?p="utf-8":u[f]===pb&&(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,_t.decoder,p,"key"),_=r.strictNullHandling?null:""):(m=r.decoder(v.slice(0,d),_t.decoder,p,"key"),_=ii.maybeMap(Pf(v.slice(d+1),r),function(b){return r.decoder(b,_t.decoder,p,"value")})),_&&r.interpretNumericEntities&&p==="iso-8859-1"&&(_=db(_)),v.indexOf("[]=")>-1&&(_=fb(_)?[_]:_),Mu.call(n,m)?n[m]=ii.combine(n[m],_):n[m]=_}return n},vb=function(t,e,r,n){for(var i=n?e:Pf(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},_b=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)+"]"),vb(v,r,n,i)}},yb=function(e){if(!e)return _t;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"?_t.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?_t.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:_t.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:_t.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:_t.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:_t.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:_t.comma,decoder:typeof e.decoder=="function"?e.decoder:_t.decoder,delimiter:typeof e.delimiter=="string"||ii.isRegExp(e.delimiter)?e.delimiter:_t.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:_t.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:_t.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:_t.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:_t.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:_t.strictNullHandling}},xb=function(t,e){var r=yb(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?mb(t,r):t,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],f=_b(l,n[l],r,typeof t=="string");i=ii.merge(i,f,r)}return r.allowSparse===!0?i:ii.compact(i)},bb=hb,wb=xb,Tb=Iu,Ab={formats:Tb,parse:wb,stringify:bb},Sb=Mx;function ir(){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 Eb=/^([a-z0-9.+-]+:)/i,Cb=/:[0-9]*$/,Ib=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Rb=["<",">",'"',"`"," ","\r",`
|
|
13
|
-
`," "],
|
|
9
|
+
*/var uv=W,lv=Symbol.for("react.element"),cv=Symbol.for("react.fragment"),hv=Object.prototype.hasOwnProperty,fv=uv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dv={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)hv.call(e,n)&&!dv.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:lv,type:t,key:a,ref:u,props:i,_owner:fv.current}}ks.Fragment=cv,ks.jsx=lh,ks.jsxs=lh,uh.exports=ks;var Fe=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 lt(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 Wn(t,e){const r=hh(),n=new CustomEvent(t,{detail:e});r.dispatchEvent(n)}function pv(){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=ie.createContext({}),Xe={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"},gv=({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);W.useLayoutEffect(()=>(i.current=yt.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&yt.killTweensOf(n.current),n.current=yt.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&n.current.revert(),i.current.revert()}),[]);const f=W.useCallback(()=>{if(n.current){let E=n.current.time();E<a.current?u.current=!0:u.current=!1,a.current=E}},[]);W.useEffect(()=>{if(n.current){const x=n.current;x.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){x.pause(),f()}).eventCallback("onUpdate",function(){f()}).eventCallback("onRepeat",function(){console.log("onrepeat",x.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",x.progress())}).eventCallback("onComplete",function(){x.pause(),x.revert(),Wn(Xe.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),f()})}},[]);const p=W.useCallback(()=>{n.current&&n.current.revert()},[]),v=W.useCallback(()=>{n.current&&n.current.restart()},[]),c=W.useCallback(()=>{if(n.current){const x=n.current;x.repeat(1),x.restart()}},[]),d=W.useCallback(x=>{n.current&&n.current.seek(x)},[]),m=W.useCallback(()=>{n.current&&n.current.seek(4)},[]),_=W.useCallback(()=>{const x=n.current;return x?x.totalDuration():0},[]),b=()=>{n.current&&(n.current.pause(),Wn(Xe.PAUSE))},w=()=>{n.current&&(n.current.resume(),Wn(Xe.RESUME))};return lt(Xe.SEEK_START,()=>{l.current=!0}),lt(Xe.SCRUBBER_PLAY,()=>{w()}),lt(Xe.SCRUBBER_PAUSE,()=>{b()}),lt(Xe.SCRUBBER_SEEK,x=>{d(x)}),lt(Xe.SEEK_END,()=>{l.current=!1}),lt(Xe.REVERSE_MODE_START,()=>{u.current=!0}),lt(Xe.REVERSE_MODE_END,()=>{u.current=!1}),lt(Xe.SCRUBBER_PROGRESS_UPDATE,x=>{}),Fe.jsx(_n.Provider,{value:{gsapCtx:i,tl:n,handlePlay:w,handlePause:b,handleReset:p,handleSeek:d,handleSeekTest:m,handleRestart:v,handleRepeat:c,playerTimeRef:a,getTimelineDuration:_,totalDuration:e,setTotalDuration:r,reverseModeRef:u,dragModeRef:l},children:t})},mv=({pixiTransformerRef:t,imageRef:e,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:f=!1})=>{const p=lr.utils.string2hex("#F3C409"),v=lr.utils.string2hex("#F3C409"),c=ie.useRef({isDragging:!1}),d=300,m=ie.useRef(0),_=ie.useCallback(()=>{a&&!c.current.isDragging&&a(!0)},[a]),b=ie.useCallback(()=>{a&&!c.current.isDragging&&a(!1)},[a]),w=ie.useCallback(()=>{c.current.isDragging=!0;const S=new Date().getTime();S-m.current<d&&u&&u(),m.current=S},[]),x=ie.useCallback(S=>{c.current.isDragging=!0,i&&i(S),Wn(Xe.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),E=ie.useCallback(()=>{if(e.current===null)return;const S=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],$=k[0]<0?-1:1,j=k[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(S),y:Math.round(I),width:Math.round(Math.max(5,O)),height:Math.round(Math.max(5,N)),rotation:L,scale:f?k:[$,j]}}),Wn(Xe.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),c.current.isDragging=!1},[n]);return ie.useEffect(()=>(t.current&&(t.current.on("mouseover",_),t.current.on("mouseout",b),t.current.on("mousedown",w)),()=>{t.current&&(t.current.off("mouseover",_),t.current.off("mouseout",b),t.current.off("mousedown",w))}),[]),Fe.jsx(av.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:x,transformcommit:E})};var vv=Object.prototype;function _v(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||vv;return t===r}var fh=_v;function yv(t,e){return function(r){return t(e(r))}}var xv=yv,bv=xv,wv=bv(Object.keys,Object),Tv=wv,Av=fh,Sv=Tv,Ev=Object.prototype,Cv=Ev.hasOwnProperty;function Iv(t){if(!Av(t))return Sv(t);var e=[];for(var r in Object(t))Cv.call(t,r)&&r!="constructor"&&e.push(r);return e}var dh=Iv,Rv=typeof At=="object"&&At&&At.Object===Object&&At,ph=Rv,Pv=ph,Mv=typeof self=="object"&&self&&self.Object===Object&&self,Ov=Pv||Mv||Function("return this")(),Er=Ov,Fv=Er,Nv=Fv.Symbol,Bs=Nv,gh=Bs,mh=Object.prototype,Lv=mh.hasOwnProperty,kv=mh.toString,Vi=gh?gh.toStringTag:void 0;function Bv(t){var e=Lv.call(t,Vi),r=t[Vi];try{t[Vi]=void 0;var n=!0}catch{}var i=kv.call(t);return n&&(e?t[Vi]=r:delete t[Vi]),i}var Dv=Bv,Uv=Object.prototype,$v=Uv.toString;function Gv(t){return $v.call(t)}var zv=Gv,vh=Bs,Hv=Dv,Vv=zv,Xv="[object Null]",jv="[object Undefined]",_h=vh?vh.toStringTag:void 0;function Wv(t){return t==null?t===void 0?jv:Xv:_h&&_h in Object(t)?Hv(t):Vv(t)}var Xi=Wv;function qv(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ji=qv,Yv=Xi,Kv=ji,Zv="[object AsyncFunction]",Qv="[object Function]",Jv="[object GeneratorFunction]",e_="[object Proxy]";function t_(t){if(!Kv(t))return!1;var e=Yv(t);return e==Qv||e==Jv||e==Zv||e==e_}var yh=t_,r_=Er,n_=r_["__core-js_shared__"],i_=n_,Go=i_,xh=function(){var t=/[^.]+$/.exec(Go&&Go.keys&&Go.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function s_(t){return!!xh&&xh in t}var a_=s_,o_=Function.prototype,u_=o_.toString;function l_(t){if(t!=null){try{return u_.call(t)}catch{}try{return t+""}catch{}}return""}var bh=l_,c_=yh,h_=a_,f_=ji,d_=bh,p_=/[\\^$.*+?()[\]{}|]/g,g_=/^\[object .+?Constructor\]$/,m_=Function.prototype,v_=Object.prototype,__=m_.toString,y_=v_.hasOwnProperty,x_=RegExp("^"+__.call(y_).replace(p_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function b_(t){if(!f_(t)||h_(t))return!1;var e=c_(t)?x_:g_;return e.test(d_(t))}var w_=b_;function T_(t,e){return t==null?void 0:t[e]}var A_=T_,S_=w_,E_=A_;function C_(t,e){var r=E_(t,e);return S_(r)?r:void 0}var qn=C_,I_=qn,R_=Er,P_=I_(R_,"DataView"),M_=P_,O_=qn,F_=Er,N_=O_(F_,"Map"),zo=N_,L_=qn,k_=Er,B_=L_(k_,"Promise"),D_=B_,U_=qn,$_=Er,G_=U_($_,"Set"),z_=G_,H_=qn,V_=Er,X_=H_(V_,"WeakMap"),j_=X_,Ho=M_,Vo=zo,Xo=D_,jo=z_,Wo=j_,wh=Xi,Yn=bh,Th="[object Map]",W_="[object Object]",Ah="[object Promise]",Sh="[object Set]",Eh="[object WeakMap]",Ch="[object DataView]",q_=Yn(Ho),Y_=Yn(Vo),K_=Yn(Xo),Z_=Yn(jo),Q_=Yn(Wo),yn=wh;(Ho&&yn(new Ho(new ArrayBuffer(1)))!=Ch||Vo&&yn(new Vo)!=Th||Xo&&yn(Xo.resolve())!=Ah||jo&&yn(new jo)!=Sh||Wo&&yn(new Wo)!=Eh)&&(yn=function(t){var e=wh(t),r=e==W_?t.constructor:void 0,n=r?Yn(r):"";if(n)switch(n){case q_:return Ch;case Y_:return Th;case K_:return Ah;case Z_:return Sh;case Q_:return Eh}return e});var Ih=yn;function J_(t){return t!=null&&typeof t=="object"}var Wi=J_,ey=Xi,ty=Wi,ry="[object Arguments]";function ny(t){return ty(t)&&ey(t)==ry}var iy=ny,Rh=iy,sy=Wi,Ph=Object.prototype,ay=Ph.hasOwnProperty,oy=Ph.propertyIsEnumerable,uy=Rh(function(){return arguments}())?Rh:function(t){return sy(t)&&ay.call(t,"callee")&&!oy.call(t,"callee")},qo=uy,ly=Array.isArray,Cr=ly,cy=9007199254740991;function hy(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=cy}var Yo=hy,fy=yh,dy=Yo;function py(t){return t!=null&&dy(t.length)&&!fy(t)}var Ds=py,Us={exports:{}};function gy(){return!1}var my=gy;Us.exports,function(t,e){var r=Er,n=my,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}(Us,Us.exports);var Ko=Us.exports,vy=Xi,_y=Yo,yy=Wi,xy="[object Arguments]",by="[object Array]",wy="[object Boolean]",Ty="[object Date]",Ay="[object Error]",Sy="[object Function]",Ey="[object Map]",Cy="[object Number]",Iy="[object Object]",Ry="[object RegExp]",Py="[object Set]",My="[object String]",Oy="[object WeakMap]",Fy="[object ArrayBuffer]",Ny="[object DataView]",Ly="[object Float32Array]",ky="[object Float64Array]",By="[object Int8Array]",Dy="[object Int16Array]",Uy="[object Int32Array]",$y="[object Uint8Array]",Gy="[object Uint8ClampedArray]",zy="[object Uint16Array]",Hy="[object Uint32Array]",et={};et[Ly]=et[ky]=et[By]=et[Dy]=et[Uy]=et[$y]=et[Gy]=et[zy]=et[Hy]=!0,et[xy]=et[by]=et[Fy]=et[wy]=et[Ny]=et[Ty]=et[Ay]=et[Sy]=et[Ey]=et[Cy]=et[Iy]=et[Ry]=et[Py]=et[My]=et[Oy]=!1;function Vy(t){return yy(t)&&_y(t.length)&&!!et[vy(t)]}var Xy=Vy;function jy(t){return function(e){return t(e)}}var Wy=jy,$s={exports:{}};$s.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}($s,$s.exports);var qy=$s.exports,Yy=Xy,Ky=Wy,Mh=qy,Oh=Mh&&Mh.isTypedArray,Zy=Oh?Ky(Oh):Yy,Zo=Zy,Qy=dh,Jy=Ih,ex=qo,tx=Cr,rx=Ds,nx=Ko,ix=fh,sx=Zo,ax="[object Map]",ox="[object Set]",ux=Object.prototype,lx=ux.hasOwnProperty;function cx(t){if(t==null)return!0;if(rx(t)&&(tx(t)||typeof t=="string"||typeof t.splice=="function"||nx(t)||sx(t)||ex(t)))return!t.length;var e=Jy(t);if(e==ax||e==ox)return!t.size;if(ix(t))return!Qy(t).length;for(var r in t)if(lx.call(t,r))return!1;return!0}var hx=cx;const Qo=jn(hx);var Jo=(t=>(t.NONE="none",t.NORMAL="normal",t.LENSFLARE="lensflare",t.FILMSTRIP="filmstrip",t.GRUNGE="grunge",t.BRICKS="bricks",t))(Jo||{});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}},fx=t=>{const{overlay:e,width:r,height:n,x:i,y:a}=t,{src:u,blendmode:l}=Fh[e]||Fh.normal;return Fe.jsx(rt.TilingSprite,{image:u,width:r,height:n,x:i,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},dx=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Kn=ie.forwardRef((t,e)=>{const[r,n]=ie.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:w,height:x,scale:E=[1,1],rotation:S=0,effect:I,overlay:O},applyTransformer:N,disabled:L,pointerdown:k,pointerout:$,pointerover:j,isText:Q,isDragging:de,isGif:H,onDoubleClick:V,isTextEditMode:ge}=t;lt(Xe.COMPLETE,()=>{f.current}),ie.useImperativeHandle(e,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>u}),[i,u]),ie.useEffect(()=>{f.current&&n(!0)},[]);const Re=ie.useCallback(()=>{l(!0),j&&j()},[]),z=ie.useCallback(()=>{a(!0)},[]),ee=ie.useCallback(X=>{t.onAnchorTransformationEnd&&t.onAnchorTransformationEnd(X),a(!1)},[]),fe=rt.withFilters(rt.Container,{matrix:lr.filters.ColorMatrixFilter});return Fe.jsxs(rt.Container,{ref:p,children:[Fe.jsxs(rt.Container,{ref:f,position:[_,b],pivot:[_,b],width:w,height:x,scale:E,rotation:S,...!L&&m&&!i&&!de&&{interactive:!0,buttonMode:!0,pointerdown:k,pointerover:j,pointerout:$},children:[!H&&Fe.jsx(fe,{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:dx},children:Fe.jsx(rt.Container,{ref:v,children:t.children})}),H&&Fe.jsx(rt.Container,{ref:v,children:t.children}),!Qo(O)&&O!==Jo.NONE&&O!==Jo.NORMAL&&Fe.jsx(fx,{overlay:O,width:w,height:x,x:_,y:b})]}),N&&m&&!ge&&Fe.jsx(mv,{pixiTransformerRef:c,imageRef:f,isMounted:r,transformCommit:ee,transformChange:z,mouseoverEvent:Re,uniqueId:d,isText:Q,onDoubleClick:V})]})});Kn.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var xn=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))(xn||{}),Nh=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(Nh||{}),eu=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(eu||{}),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||{}),Ne=(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))(Ne||{}),tu=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(tu||{}),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||{}),bn=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(bn||{}),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||{}),wn=(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))(wn||{}),ru=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(ru||{}),Jt=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(Jt||{}),mt=(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))(mt||{}),pt=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(pt||{}),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 _e={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 nu=/iPhone/i,Lh=/iPod/i,kh=/iPad/i,Bh=/\biOS-universal(?:.+)Mac\b/i,iu=/\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 px(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=px(r),a={apple:{phone:i(nu)&&!i(Br),ipod:i(Lh),tablet:!i(nu)&&(i(kh)||Xh(e))&&!i(Br),universal:i(Bh),device:(i(nu)||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(iu),tablet:!i(Br)&&!i(Qn)&&!i(iu)&&(i(Gs)||i(Dh)),device:!i(Br)&&(i(Qn)||i(Gs)||i(iu)||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);_e.RETINA_PREFIX=/@([0-9\.]+)x/,_e.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 w=this._events[b],x=arguments.length,E,S;if(w.fn){switch(w.once&&this.removeListener(p,w.fn,void 0,!0),x){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,v),!0;case 3:return w.fn.call(w.context,v,c),!0;case 4:return w.fn.call(w.context,v,c,d),!0;case 5:return w.fn.call(w.context,v,c,d,m),!0;case 6:return w.fn.call(w.context,v,c,d,m,_),!0}for(S=1,E=new Array(x-1);S<x;S++)E[S-1]=arguments[S];w.fn.apply(w.context,E)}else{var I=w.length,O;for(S=0;S<I;S++)switch(w[S].once&&this.removeListener(p,w[S].fn,void 0,!0),x){case 1:w[S].fn.call(w[S].context);break;case 2:w[S].fn.call(w[S].context,v);break;case 3:w[S].fn.call(w[S].context,v,c);break;case 4:w[S].fn.call(w[S].context,v,c,d);break;default:if(!E)for(O=1,E=new Array(x-1);O<x;O++)E[O-1]=arguments[O];w[S].fn.apply(w[S].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,w=[],x=_.length;b<x;b++)(_[b].fn!==v||d&&!_[b].once||c&&_[b].context!==c)&&w.push(_[b]);w.length?this._events[m]=w.length===1?w[0]:w: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 gx=Wh.exports;const zs=jn(gx);var su={exports:{}};su.exports=Hs,su.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=xx(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===uu(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 Tn(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&&Sx(t,n,i,a);for(var l=t,f,p;t.prev!==t.next;){if(f=t.prev,p=t.next,a?vx(t,n,i,a):mx(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=_x(Tn(t),e,r),Yi(t,e,r,n,i,a,2)):u===2&&yx(t,e,r,n,i,a):Yi(Tn(t),e,r,n,i,a,1);break}}}}function mx(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 vx(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,w=v>c?v>d?v:d:c>d?c:d,x=au(m,_,e,r,n),E=au(b,w,e,r,n),S=t.prevZ,I=t.nextZ;S&&S.z>=x&&I&&I.z<=E;){if(S.x>=m&&S.x<=b&&S.y>=_&&S.y<=w&&S!==i&&S!==u&&ei(l,v,f,c,p,d,S.x,S.y)&&st(S.prev,S,S.next)>=0||(S=S.prevZ,I.x>=m&&I.x<=b&&I.y>=_&&I.y<=w&&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(;S&&S.z>=x;){if(S.x>=m&&S.x<=b&&S.y>=_&&S.y<=w&&S!==i&&S!==u&&ei(l,v,f,c,p,d,S.x,S.y)&&st(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;I&&I.z<=E;){if(I.x>=m&&I.x<=b&&I.y>=_&&I.y<=w&&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 _x(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 Tn(n)}function yx(t,e,r,n,i,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&Ix(u,l)){var f=Kh(u,l);u=Tn(u,u.next),f=Tn(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 xx(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(Cx(p));for(i.sort(bx),a=0;a<i.length;a++)r=wx(i[a],r);return r}function bx(t,e){return t.x-e.x}function wx(t,e){var r=Tx(t,e);if(!r)return e;var n=Kh(r,t);return Tn(n,n.next),Tn(r,r.next)}function Tx(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&&Ax(u,r)))&&(u=r,c=d)),r=r.next;while(r!==f);return u}function Ax(t,e){return st(t.prev,t,e.prev)<0&&st(e.next,t,t.next)<0}function Sx(t,e,r,n){var i=t;do i.z===0&&(i.z=au(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,Ex(i)}function Ex(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 au(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 Cx(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 Ix(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Rx(t,e)&&(Ki(t,e)&&Ki(e,t)&&Px(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 Rx(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 Px(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 ou(t.i,t.x,t.y),n=new ou(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 ou(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 ou(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(uu(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(uu(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 uu(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 Mx=su.exports;const Ox=jn(Mx);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="-",w=/^xn--/,x=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,S={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(S[X])}function $(X,Y){for(var le=X.length,we=[];le--;)we[le]=Y(X[le]);return we}function j(X,Y){var le=X.split("@"),we="";le.length>1&&(we=le[0]+"@",X=le[1]),X=X.replace(E,".");var ye=X.split("."),Me=$(ye,Y).join(".");return we+Me}function Q(X){for(var Y=[],le=0,we=X.length,ye,Me;le<we;)ye=X.charCodeAt(le++),ye>=55296&&ye<=56319&&le<we?(Me=X.charCodeAt(le++),(Me&64512)==56320?Y.push(((ye&1023)<<10)+(Me&1023)+65536):(Y.push(ye),le--)):Y.push(ye);return Y}function de(X){return $(X,function(Y){var le="";return Y>65535&&(Y-=65536,le+=N(Y>>>10&1023|55296),Y=56320|Y&1023),le+=N(Y),le}).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 ge(X,Y,le){var we=0;for(X=le?O(X/d):X>>1,X+=O(X/Y);X>I*v>>1;we+=f)X=O(X/I);return O(we+(I+1)*X/(X+c))}function Re(X){var Y=[],le=X.length,we,ye=0,Me=_,Oe=m,ze,De,Ye,Ke,Te,Ue,Ze,Qe,J;for(ze=X.lastIndexOf(b),ze<0&&(ze=0),De=0;De<ze;++De)X.charCodeAt(De)>=128&&k("not-basic"),Y.push(X.charCodeAt(De));for(Ye=ze>0?ze+1:0;Ye<le;){for(Ke=ye,Te=1,Ue=f;Ye>=le&&k("invalid-input"),Ze=H(X.charCodeAt(Ye++)),(Ze>=f||Ze>O((l-ye)/Te))&&k("overflow"),ye+=Ze*Te,Qe=Ue<=Oe?p:Ue>=Oe+v?v:Ue-Oe,!(Ze<Qe);Ue+=f)J=f-Qe,Te>O(l/J)&&k("overflow"),Te*=J;we=Y.length+1,Oe=ge(ye-Ke,we,Ke==0),O(ye/we)>l-Me&&k("overflow"),Me+=O(ye/we),ye%=we,Y.splice(ye++,0,Me)}return de(Y)}function z(X){var Y,le,we,ye,Me,Oe,ze,De,Ye,Ke,Te,Ue=[],Ze,Qe,J,ne;for(X=Q(X),Ze=X.length,Y=_,le=0,Me=m,Oe=0;Oe<Ze;++Oe)Te=X[Oe],Te<128&&Ue.push(N(Te));for(we=ye=Ue.length,ye&&Ue.push(b);we<Ze;){for(ze=l,Oe=0;Oe<Ze;++Oe)Te=X[Oe],Te>=Y&&Te<ze&&(ze=Te);for(Qe=we+1,ze-Y>O((l-le)/Qe)&&k("overflow"),le+=(ze-Y)*Qe,Y=ze,Oe=0;Oe<Ze;++Oe)if(Te=X[Oe],Te<Y&&++le>l&&k("overflow"),Te==Y){for(De=le,Ye=f;Ke=Ye<=Me?p:Ye>=Me+v?v:Ye-Me,!(De<Ke);Ye+=f)ne=De-Ke,J=f-Ke,Ue.push(N(V(Ke+ne%J,0))),De=O(ne/J);Ue.push(N(V(De,0))),Me=ge(le,Qe,we==ye),le=0,++we}++le,++Y}return Ue.join("")}function ee(X){return j(X,function(Y){return w.test(Y)?Re(Y.slice(4).toLowerCase()):Y})}function fe(X){return j(X,function(Y){return x.test(Y)?"xn--"+z(Y):Y})}if(u={version:"1.4.1",ucs2:{decode:Q,encode:de},decode:Re,encode:z,toASCII:fe,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 Fx=Ws.exports,Nx=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,Lx=Nx,kx=function(){return typeof Qh!="function"||typeof Symbol!="function"||typeof Qh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Lx()},Jh={foo:{}},Bx=Object,Dx=function(){return{__proto__:Jh}.foo===Jh.foo&&!({__proto__:null}instanceof Bx)},Ux="Function.prototype.bind called on incompatible ",lu=Array.prototype.slice,$x=Object.prototype.toString,Gx="[object Function]",zx=function(e){var r=this;if(typeof r!="function"||$x.call(r)!==Gx)throw new TypeError(Ux+r);for(var n=lu.call(arguments,1),i,a=function(){if(this instanceof i){var v=r.apply(this,n.concat(lu.call(arguments)));return Object(v)===v?v:this}else return r.apply(e,n.concat(lu.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},Hx=zx,cu=Function.prototype.bind||Hx,Vx=cu,Xx=Vx.call(Function.call,Object.prototype.hasOwnProperty),be,ti=SyntaxError,ef=Function,ri=TypeError,hu=function(t){try{return ef('"use strict"; return ('+t+").constructor;")()}catch{}},An=Object.getOwnPropertyDescriptor;if(An)try{An({},"")}catch{An=null}var fu=function(){throw new ri},jx=An?function(){try{return arguments.callee,fu}catch{try{return An(arguments,"callee").get}catch{return fu}}}():fu,ni=kx(),Wx=Dx(),xt=Object.getPrototypeOf||(Wx?function(t){return t.__proto__}:null),ii={},qx=typeof Uint8Array>"u"||!xt?be:xt(Uint8Array),Sn={"%AggregateError%":typeof AggregateError>"u"?be:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?be:ArrayBuffer,"%ArrayIteratorPrototype%":ni&&xt?xt([][Symbol.iterator]()):be,"%AsyncFromSyncIteratorPrototype%":be,"%AsyncFunction%":ii,"%AsyncGenerator%":ii,"%AsyncGeneratorFunction%":ii,"%AsyncIteratorPrototype%":ii,"%Atomics%":typeof Atomics>"u"?be:Atomics,"%BigInt%":typeof BigInt>"u"?be:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?be:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?be:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?be:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?be:Float32Array,"%Float64Array%":typeof Float64Array>"u"?be:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?be:FinalizationRegistry,"%Function%":ef,"%GeneratorFunction%":ii,"%Int8Array%":typeof Int8Array>"u"?be:Int8Array,"%Int16Array%":typeof Int16Array>"u"?be:Int16Array,"%Int32Array%":typeof Int32Array>"u"?be:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ni&&xt?xt(xt([][Symbol.iterator]())):be,"%JSON%":typeof JSON=="object"?JSON:be,"%Map%":typeof Map>"u"?be:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ni||!xt?be:xt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?be:Promise,"%Proxy%":typeof Proxy>"u"?be:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?be:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?be:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ni||!xt?be:xt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?be:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ni&&xt?xt(""[Symbol.iterator]()):be,"%Symbol%":ni?Symbol:be,"%SyntaxError%":ti,"%ThrowTypeError%":jx,"%TypedArray%":qx,"%TypeError%":ri,"%Uint8Array%":typeof Uint8Array>"u"?be:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?be:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?be:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?be:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?be:WeakMap,"%WeakRef%":typeof WeakRef>"u"?be:WeakRef,"%WeakSet%":typeof WeakSet>"u"?be:WeakSet};if(xt)try{null.error}catch(t){var Yx=xt(xt(t));Sn["%Error.prototype%"]=Yx}var Kx=function t(e){var r;if(e==="%AsyncFunction%")r=hu("async function () {}");else if(e==="%GeneratorFunction%")r=hu("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=hu("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&xt&&(r=xt(i.prototype))}return Sn[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=cu,qs=Xx,Zx=Qi.call(Function.call,Array.prototype.concat),Qx=Qi.call(Function.apply,Array.prototype.splice),rf=Qi.call(Function.call,String.prototype.replace),Ys=Qi.call(Function.call,String.prototype.slice),Jx=Qi.call(Function.call,RegExp.prototype.exec),e1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,t1=/\\(\\)?/g,r1=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,e1,function(a,u,l,f){i[i.length]=l?rf(f,t1,"$1"):u||a}),i},n1=function(e,r){var n=e,i;if(qs(tf,n)&&(i=tf[n],n="%"+i[0]+"%"),qs(Sn,n)){var a=Sn[n];if(a===ii&&(a=Kx(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!")},du=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(Jx(/^%?[^%]*%?$/,e)===null)throw new ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=r1(e),i=n.length>0?n[0]:"",a=n1("%"+i+"%",r),u=a.name,l=a.value,f=!1,p=a.alias;p&&(i=p[0],Qx(n,Zx([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(Sn,u))l=Sn[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&&(Sn[u]=l)}}return l},nf={exports:{}};(function(t){var e=cu,r=du,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 i1=nf.exports,sf=du,af=i1,s1=af(sf("String.prototype.indexOf")),a1=function(e,r){var n=sf(e,!!r);return typeof n=="function"&&s1(e,".prototype.")>-1?af(n):n};const o1=ov(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var pu=typeof Map=="function"&&Map.prototype,gu=Object.getOwnPropertyDescriptor&&pu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ks=pu&&gu&&typeof gu.get=="function"?gu.get:null,of=pu&&Map.prototype.forEach,mu=typeof Set=="function"&&Set.prototype,vu=Object.getOwnPropertyDescriptor&&mu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Zs=mu&&vu&&typeof vu.get=="function"?vu.get:null,uf=mu&&Set.prototype.forEach,u1=typeof WeakMap=="function"&&WeakMap.prototype,Ji=u1?WeakMap.prototype.has:null,l1=typeof WeakSet=="function"&&WeakSet.prototype,es=l1?WeakSet.prototype.has:null,c1=typeof WeakRef=="function"&&WeakRef.prototype,lf=c1?WeakRef.prototype.deref:null,h1=Boolean.prototype.valueOf,f1=Object.prototype.toString,d1=Function.prototype.toString,p1=String.prototype.match,_u=String.prototype.slice,tn=String.prototype.replace,g1=String.prototype.toUpperCase,cf=String.prototype.toLowerCase,hf=RegExp.prototype.test,ff=Array.prototype.concat,Pr=Array.prototype.join,m1=Array.prototype.slice,df=Math.floor,yu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xu=Object.getOwnPropertySymbols,bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,si=typeof Symbol=="function"&&typeof Symbol.iterator=="object",It=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=_u.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 wu=o1,vf=wu.custom,_f=bf(vf)?vf:null,v1=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 Tu(e)?"[Array]":"[Object]";var c=L1(a,n);if(typeof i>"u")i=[];else if(wf(i,e)>=0)return"[Circular]";function d(H,V,ge){if(V&&(i=m1.call(i),i.push(V)),ge){var Re={depth:a.depth};return rn(a,"quoteStyle")&&(Re.quoteStyle=a.quoteStyle),t(H,Re,n+1,i)}return t(H,a,n+1,i)}if(typeof e=="function"&&!xf(e)){var m=E1(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"):bu.call(e);return typeof e=="object"&&!si?ts(b):b}if(O1(e)){for(var w="<"+cf.call(String(e.nodeName)),x=e.attributes||[],E=0;E<x.length;E++)w+=" "+x[E].name+"="+yf(_1(x[E].value),"double",a);return w+=">",e.childNodes&&e.childNodes.length&&(w+="..."),w+="</"+cf.call(String(e.nodeName))+">",w}if(Tu(e)){if(e.length===0)return"[]";var S=Qs(e,d);return c&&!N1(S)?"["+Su(S,c)+"]":"[ "+Pr.call(S,", ")+" ]"}if(x1(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"&&wu)return wu(e,{depth:v-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(C1(e)){var O=[];return of&&of.call(e,function(H,V){O.push(d(V,e,!0)+" => "+d(H,e))}),Af("Map",Ks.call(e),O,c)}if(P1(e)){var N=[];return uf&&uf.call(e,function(H){N.push(d(H,e))}),Af("Set",Zs.call(e),N,c)}if(I1(e))return Au("WeakMap");if(M1(e))return Au("WeakSet");if(R1(e))return Au("WeakRef");if(w1(e))return ts(d(Number(e)));if(A1(e))return ts(d(yu.call(e)));if(T1(e))return ts(h1.call(e));if(b1(e))return ts(d(String(e)));if(!y1(e)&&!xf(e)){var L=Qs(e,d),k=gf?gf(e)===Object.prototype:e instanceof Object||e.constructor===Object,$=e instanceof Object?"":"null prototype",j=!k&&It&&Object(e)===e&&It in e?_u.call(nn(e),8,-1):$?"Object":"",Q=k||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",de=Q+(j||$?"["+Pr.call(ff.call([],j||[],$||[]),": ")+"] ":"");return L.length===0?de+"{}":c?de+"{"+Su(L,c)+"}":de+"{ "+Pr.call(L,", ")+" }"}return String(e)};function yf(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function _1(t){return tn.call(String(t),/"/g,""")}function Tu(t){return nn(t)==="[object Array]"&&(!It||!(typeof t=="object"&&It in t))}function y1(t){return nn(t)==="[object Date]"&&(!It||!(typeof t=="object"&&It in t))}function xf(t){return nn(t)==="[object RegExp]"&&(!It||!(typeof t=="object"&&It in t))}function x1(t){return nn(t)==="[object Error]"&&(!It||!(typeof t=="object"&&It in t))}function b1(t){return nn(t)==="[object String]"&&(!It||!(typeof t=="object"&&It in t))}function w1(t){return nn(t)==="[object Number]"&&(!It||!(typeof t=="object"&&It in t))}function T1(t){return nn(t)==="[object Boolean]"&&(!It||!(typeof t=="object"&&It 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"||!bu)return!1;try{return bu.call(t),!0}catch{}return!1}function A1(t){if(!t||typeof t!="object"||!yu)return!1;try{return yu.call(t),!0}catch{}return!1}var S1=Object.prototype.hasOwnProperty||function(t){return t in this};function rn(t,e){return S1.call(t,e)}function nn(t){return f1.call(t)}function E1(t){if(t.name)return t.name;var e=p1.call(d1.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 C1(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 I1(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 R1(t){if(!lf||!t||typeof t!="object")return!1;try{return lf.call(t),!0}catch{}return!1}function P1(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 M1(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 O1(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(_u.call(t,0,e.maxStringLength),e)+n}var i=tn.call(tn.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,F1);return yf(i,"single",e)}function F1(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":"")+g1.call(e.toString(16))}function ts(t){return"Object("+t+")"}function Au(t){return t+" { ? }"}function Af(t,e,r,n){var i=n?Su(r,n):Pr.call(r,", ");return t+" ("+e+") {"+i+"}"}function N1(t){for(var e=0;e<t.length;e++)if(wf(t[e],`
|
|
10
|
+
`)>=0)return!1;return!0}function L1(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
|
+
`+e.prev+e.base;return r+Pr.call(t,","+r)+`
|
|
12
|
+
`+e.prev}function Qs(t,e){var r=Tu(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 xu=="function"?xu(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 xu=="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 Eu=du,ai=a1,k1=v1,B1=Eu("%TypeError%"),Js=Eu("%WeakMap%",!0),ea=Eu("%Map%",!0),D1=ai("WeakMap.prototype.get",!0),U1=ai("WeakMap.prototype.set",!0),$1=ai("WeakMap.prototype.has",!0),G1=ai("Map.prototype.get",!0),z1=ai("Map.prototype.set",!0),H1=ai("Map.prototype.has",!0),Cu=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},V1=function(t,e){var r=Cu(t,e);return r&&r.value},X1=function(t,e,r){var n=Cu(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},j1=function(t,e){return!!Cu(t,e)},W1=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new B1("Side channel does not contain "+k1(a))},get:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(e)return D1(e,a)}else if(ea){if(r)return G1(r,a)}else if(n)return V1(n,a)},has: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);return!1},set:function(a,u){Js&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Js),U1(e,a,u)):ea?(r||(r=new ea),z1(r,a,u)):(n||(n={key:{},next:null}),X1(n,a,u))}};return i},q1=String.prototype.replace,Y1=/%20/g,Iu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ru={default:Iu.RFC3986,formatters:{RFC1738:function(t){return q1.call(t,Y1,"+")},RFC3986:function(t){return String(t)}},RFC1738:Iu.RFC1738,RFC3986:Iu.RFC3986},K1=Ru,Pu=Object.prototype.hasOwnProperty,En=Array.isArray,Mr=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Z1=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(En(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},Sf=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},Q1=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(En(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Pu.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 En(e)&&!En(r)&&(i=Sf(e,n)),En(e)&&En(r)?(r.forEach(function(a,u){if(Pu.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 Pu.call(a,u)?a[u]=t(a[u],l,n):a[u]=l,a},i)},J1=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},eb=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}},tb=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===K1.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},rb=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 Z1(r),e},nb=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},ib=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},sb=function(e,r){return[].concat(e,r)},ab=function(e,r){if(En(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},Ef={arrayToObject:Sf,assign:J1,combine:sb,compact:rb,decode:eb,encode:tb,isBuffer:ib,isRegExp:nb,maybeMap:ab,merge:Q1},Cf=W1,ta=Ef,rs=Ru,ob=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,ub=Array.prototype.push,Rf=function(t,e){ub.apply(t,Dr(e)?e:[e])},lb=Date.prototype.toISOString,Pf=rs.default,Rt={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 lb.call(e)},skipNulls:!1,strictNullHandling:!1},cb=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Mu={},hb=function t(e,r,n,i,a,u,l,f,p,v,c,d,m,_,b,w){for(var x=e,E=w,S=0,I=!1;(E=E.get(Mu))!==void 0&&!I;){var O=E.get(e);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");I=!0}typeof E.get(Mu)>"u"&&(S=0)}if(typeof f=="function"?x=f(r,x):x instanceof Date?x=c(x):n==="comma"&&Dr(x)&&(x=ta.maybeMap(x,function(Re){return Re instanceof Date?c(Re):Re})),x===null){if(a)return l&&!_?l(r,Rt.encoder,b,"key",d):r;x=""}if(cb(x)||ta.isBuffer(x)){if(l){var N=_?r:l(r,Rt.encoder,b,"key",d);return[m(N)+"="+m(l(x,Rt.encoder,b,"value",d))]}return[m(r)+"="+m(String(x))]}var L=[];if(typeof x>"u")return L;var k;if(n==="comma"&&Dr(x))_&&l&&(x=ta.maybeMap(x,l)),k=[{value:x.length>0?x.join(",")||null:void 0}];else if(Dr(f))k=f;else{var $=Object.keys(x);k=p?$.sort(p):$}for(var j=i&&Dr(x)&&x.length===1?r+"[]":r,Q=0;Q<k.length;++Q){var de=k[Q],H=typeof de=="object"&&typeof de.value<"u"?de.value:x[de];if(!(u&&H===null)){var V=Dr(x)?typeof n=="function"?n(j,de):j:j+(v?"."+de:"["+de+"]");w.set(e,S);var ge=Cf();ge.set(Mu,w),Rf(L,t(H,V,n,i,a,u,n==="comma"&&_&&Dr(x)?null:l,f,p,v,c,d,m,_,b,ge))}}return L},fb=function(e){if(!e)return Rt;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||Rt.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(!ob.call(rs.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=rs.formatters[n],a=Rt.filter;return(typeof e.filter=="function"||Dr(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Rt.addQueryPrefix,allowDots:typeof e.allowDots>"u"?Rt.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Rt.charsetSentinel,delimiter:typeof e.delimiter>"u"?Rt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Rt.encode,encoder:typeof e.encoder=="function"?e.encoder:Rt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Rt.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Rt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Rt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Rt.strictNullHandling}},db=function(t,e){var r=t,n=fb(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,hb(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,Ou=Object.prototype.hasOwnProperty,pb=Array.isArray,bt={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},gb=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},mb="utf8=%26%2310003%3B",vb="utf8=%E2%9C%93",_b=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]===vb?p="utf-8":u[f]===mb&&(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,bt.decoder,p,"key"),_=r.strictNullHandling?null:""):(m=r.decoder(v.slice(0,d),bt.decoder,p,"key"),_=oi.maybeMap(Mf(v.slice(d+1),r),function(b){return r.decoder(b,bt.decoder,p,"value")})),_&&r.interpretNumericEntities&&p==="iso-8859-1"&&(_=gb(_)),v.indexOf("[]=")>-1&&(_=pb(_)?[_]:_),Ou.call(n,m)?n[m]=oi.combine(n[m],_):n[m]=_}return n},yb=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},xb=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&&Ou.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&&Ou.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;v.push(f[1])}return f&&v.push("["+a.slice(f.index)+"]"),yb(v,r,n,i)}},bb=function(e){if(!e)return bt;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"?bt.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?bt.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:bt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:bt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:bt.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:bt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:bt.comma,decoder:typeof e.decoder=="function"?e.decoder:bt.decoder,delimiter:typeof e.delimiter=="string"||oi.isRegExp(e.delimiter)?e.delimiter:bt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:bt.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:bt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:bt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:bt.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:bt.strictNullHandling}},wb=function(t,e){var r=bb(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?_b(t,r):t,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],f=xb(l,n[l],r,typeof t=="string");i=oi.merge(i,f,r)}return r.allowSparse===!0?i:oi.compact(i)},Tb=db,Ab=wb,Sb=Ru,Eb={formats:Sb,parse:Ab,stringify:Tb},Cb=Fx;function cr(){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 Ib=/^([a-z0-9.+-]+:)/i,Rb=/:[0-9]*$/,Pb=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Mb=["<",">",'"',"`"," ","\r",`
|
|
13
|
+
`," "],Ob=["{","}","|","\\","^","`"].concat(Mb),Fu=["'"].concat(Ob),Of=["%","/","?",";","#"].concat(Fu),Ff=["/","?","#"],Fb=255,Nf=/^[+a-z0-9A-Z_-]{0,63}$/,Nb=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Lb={javascript:!0,"javascript:":!0},Nu={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},Lu=Eb;function ra(t,e,r){if(t&&typeof t=="object"&&t instanceof cr)return t;var n=new cr;return n.parse(t,e,r),n}cr.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=Pb.exec(l);if(f)return this.path=l,this.href=l,this.pathname=f[1],f[2]?(this.search=f[2],e?this.query=Lu.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=Ib.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&&Nu[p])&&(l=l.substr(2),this.slashes=!0)}if(!Nu[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,w;d===-1?w=l.lastIndexOf("@"):w=l.lastIndexOf("@",d),w!==-1&&(b=l.slice(0,w),l=l.slice(w+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 x=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!x)for(var E=this.hostname.split(/\./),m=0,S=E.length;m<S;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),$=E.slice(m+1),j=I.match(Nb);j&&(k.push(j[1]),$.unshift(j[2])),$.length&&(l="/"+$.join(".")+l),this.hostname=k.join(".");break}}}this.hostname.length>Fb?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=Cb.toASCII(this.hostname));var Q=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+Q,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!Lb[v])for(var m=0,S=Fu.length;m<S;m++){var H=Fu[m];if(l.indexOf(H)!==-1){var V=encodeURIComponent(H);V===H&&(V=escape(H)),l=l.split(H).join(V)}}var ge=l.indexOf("#");ge!==-1&&(this.hash=l.substr(ge),l=l.slice(0,ge));var Re=l.indexOf("?");if(Re!==-1?(this.search=l.substr(Re),this.query=l.substr(Re+1),e&&(this.query=Lu.parse(this.query)),l=l.slice(0,Re)):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 kb(t){return typeof t=="string"&&(t=ra(t)),t instanceof cr?t.format():cr.prototype.format.call(t)}cr.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=Lu.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 Bb(t,e){return ra(t,!1,!0).resolve(e)}cr.prototype.resolve=function(t){return this.resolveObject(ra(t,!1,!0)).format()},cr.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new cr;e.parse(t,!1,!0),t=e}for(var r=new cr,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&&!Nu[t.protocol]){for(var S=(t.pathname||"").split("/");S.length&&!(t.host=S.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),S[0]!==""&&S.unshift(""),S.length<2&&S.unshift(""),r.pathname=S.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)==="/",w=b||_||r.host&&t.pathname,x=w,E=r.pathname&&r.pathname.split("/")||[],S=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&&(S[0]===""?S[0]=t.host:S.unshift(t.host)),t.host=null),w=w&&(S[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=S;else if(S.length)E||(E=[]),E.pop(),E=E.concat(S),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,$=E.length;$>=0;$--)N=E[$],N==="."?E.splice($,1):N===".."?(E.splice($,1),k++):k&&(E.splice($,1),k--);if(!w&&!x)for(;k--;k)E.unshift("..");w&&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 w=w||r.host&&E.length,w&&!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},cr.prototype.parseHost=function(){var t=this.host,e=Rb.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 Db=ra,Ub=Bb,$b=kb;const Gb={parse:Db,format:$b,resolve:Ub},Lf={};function Ie(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))),Nf[e]=!0}let Lu;function $b(){return typeof Lu>"u"&&(Lu=function(){var r;const e={stencil:!0,failIfMajorPerformanceCaveat:be.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!be.ADAPTER.getWebGLRenderingContext())return!1;const n=be.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 Gb={grad:.9,turn:360,rad:360/(2*Math.PI)},kr=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},yt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Yt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},Lf=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},kf=function(t){return{r:Yt(t.r,0,255),g:Yt(t.g,0,255),b:Yt(t.b,0,255),a:Yt(t.a)}},ku=function(t){return{r:yt(t.r),g:yt(t.g),b:yt(t.b),a:yt(t.a,3)}},zb=/^#([0-9a-f]{3,8})$/i,ta=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Bf=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}},Df=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}},Uf=function(t){return{h:Lf(t.h),s:Yt(t.s,0,100),l:Yt(t.l,0,100),a:Yt(t.a)}},$f=function(t){return{h:yt(t.h),s:yt(t.s),l:yt(t.l),a:yt(t.a,3)}},Gf=function(t){return Df((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},Ji=function(t){return{h:(e=Bf(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},Hb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bu={string:[[function(t){var e=zb.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?yt(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?yt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Xb.exec(t)||jb.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:kf({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=Hb.exec(t)||Vb.exec(t);if(!e)return null;var r,n,i=Uf({h:(r=e[1],n=e[2],n===void 0&&(n="deg"),Number(r)*(Gb[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Gf(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 kr(e)&&kr(r)&&kr(n)?kf({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(!kr(e)||!kr(r)||!kr(n))return null;var u=Uf({h:Number(e),s:Number(r),l:Number(n),a:Number(a)});return Gf(u)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,i=t.a,a=i===void 0?1:i;if(!kr(e)||!kr(r)||!kr(n))return null;var u=function(l){return{h:Lf(l.h),s:Yt(l.s,0,100),v:Yt(l.v,0,100),a:Yt(l.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(a)});return Df(u)},"hsv"]]},zf=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]},Wb=function(t){return typeof t=="string"?zf(t.trim(),Bu.string):typeof t=="object"&&t!==null?zf(t,Bu.object):[null,void 0]},Du=function(t,e){var r=Ji(t);return{h:r.h,s:Yt(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},Hf=function(t,e){var r=Ji(t);return{h:r.h,s:r.s,l:Yt(r.l+100*e,0,100),a:r.a}},$u=function(){function t(e){this.parsed=Wb(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 yt(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?ta(yt(255*a)):"","#"+ta(r)+ta(n)+ta(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 $f(Ji(this.rgba))},t.prototype.toHslString=function(){return e=$f(Ji(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=Bf(this.rgba),{h:yt(e.h),s:yt(e.s),v:yt(e.v),a:yt(e.a,3)};var e},t.prototype.invert=function(){return Ir({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),Ir(Du(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Ir(Du(this.rgba,-e))},t.prototype.grayscale=function(){return Ir(Du(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Ir(Hf(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Ir(Hf(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"?Ir({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):yt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=Ji(this.rgba);return typeof e=="number"?Ir({h:e,s:r.s,l:r.l,a:r.a}):yt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Ir(e).toHex()},t}(),Ir=function(t){return t instanceof $u?t:new $u(t)},Vf=[],qb=function(t){t.forEach(function(e){Vf.indexOf(e)<0&&(e($u,Bu),Vf.push(e))})};function Yb(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([Yb]);const ai=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 ai)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]=ai.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=ai.HEX_PATTERN.exec(t);n&&(t=`#${n[2]}`)}const r=Ir(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 Ct=ai;Ct.shared=new ai,Ct.temp=new ai,Ct.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function ra(t,e=[]){return Re("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Ct.shared.setValue(t).toRgbArray(e)}function Gu(t){return Re("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Ct.shared.setValue(t).toNumber()}function Kb(){const t=[],e=[];for(let n=0;n<32;n++)t[n]=n,e[n]=n;t[ce.NORMAL_NPM]=ce.NORMAL,t[ce.ADD_NPM]=ce.ADD,t[ce.SCREEN_NPM]=ce.SCREEN,e[ce.NORMAL]=ce.NORMAL_NPM,e[ce.ADD]=ce.ADD_NPM,e[ce.SCREEN]=ce.SCREEN_NPM;const r=[];return r.push(e),r.push(t),r}const Zb=Kb();function Xf(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 na(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 jf(t){return!(t&t-1)&&!!t}function Wf(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 ia(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 Qb=0;function es(){return++Qb}const qf={},Rr=Object.create(null),tn=Object.create(null);let sa;function Jb(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location,sa||(sa=document.createElement("a")),sa.href=t;const r=Ub.parse(sa.href),n=!r.port&&e.port===""||r.port===e.port;return r.hostname!==e.hostname||!n||r.protocol!==e.protocol?"anonymous":""}function Yf(t,e=1){var n;const r=(n=be.RETINA_PREFIX)==null?void 0:n.exec(t);return r?parseFloat(r[1]):e}var Se=(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))(Se||{});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},Kf=(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)=>Kf(a,r)-Kf(i,r)))},n=>{const i=e.indexOf(n.ref);i!==-1&&e.splice(i,1)})}};class ew{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 tw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
19
|
-
`);function
|
|
20
|
-
else `),r<t-1&&(e+=`if(test == ${r}.0){}`);return e}function nw(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=tw.replace(/%forloop%/gi,rw(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 aa=class tv{constructor(){this.data=0,this.blendMode=ce.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!==ce.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 tv;return e.depthTest=!1,e.blend=!0,e}};const Yu=[];function Zf(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 sr{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(sr.prototype,{dispatch:{value:sr.prototype.emit},run:{value:sr.prototype.emit}});class ts{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new sr("setRealSize"),this.onUpdate=new sr("update"),this.onError=new sr("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 ts{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===Zr.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 iw={scaleMode:Ar.NEAREST,format:Z.RGBA,alphaMode:Zr.NPM},oi=class extends $s{constructor(t=null,e=null){super(),e=Object.assign({},oi.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 ts)&&(t=Zf(t,m),t.internal=!0),this.resolution=d||be.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=es(),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=jf(this.realWidth)&&jf(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 tn[this.cacheId],delete Rr[this.cacheId],this.cacheId=null),this.dispose(),oi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(t,e,r=be.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}_${es()}`}i=t._pixiId}let a=tn[i];if(n&&r&&!a)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return a||(a=new oi(t,e),a.cacheId=i,oi.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?Ne.FLOAT:Ne.UNSIGNED_BYTE;return new oi(i,Object.assign({},iw,n||{width:e,height:r,type:a}))}static addToCache(t,e){e&&(t.textureCacheIds.includes(e)||t.textureCacheIds.push(e),tn[e]&&tn[e]!==t&&console.warn(`BaseTexture added to the cache with an id [${e}] that already had an entry`),tn[e]=t)}static removeFromCache(t){if(typeof t=="string"){const e=tn[t];if(e){const r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete tn[t],e}}else if(t!=null&&t.textureCacheIds){for(let e=0;e<t.textureCacheIds.length;++e)delete tn[t.textureCacheIds[e]];return t.textureCacheIds.length=0,t}return null}};let Le=oi;Le.defaultOptions={mipmap:_n.POW2,anisotropicLevel:0,scaleMode:Ar.LINEAR,wrapMode:Vi.CLAMP,alphaMode:Zr.UNPACK,target:qn.TEXTURE_2D,format:Z.RGBA,type:Ne.UNSIGNED_BYTE},Le._globalBatch=0;class Zu{constructor(){this.texArray=null,this.blend=0,this.type=Kr.TRIANGLES,this.start=0,this.size=0,this.data=null}}let sw=0;class Pt{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=sw++,this.disposeRunner=new sr("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?Sr.ELEMENT_ARRAY_BUFFER:Sr.ARRAY_BUFFER}get index(){return this.type===Sr.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new Pt(e)}}class oa{constructor(e,r=0,n=!1,i=Ne.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 oa(e,r,n,i,a)}}const aw={Float32Array,Uint32Array,Int32Array,Uint8Array};function ow(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=Xf(v);i[c]||(i[c]=new aw[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 Qf={5126:4,5123:2,5121:1};let uw=0;const lw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class ui{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=uw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new sr("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 Pt||(r instanceof Array&&(r=new Float32Array(r)),r=new Pt(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 oa(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 Pt||(e instanceof Array&&(e=new Uint16Array(e)),e=new Pt(e)),e.type=Sr.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 Pt;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*Qf[a.type]/4),a.buffer=0}for(n.data=ow(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 ui;for(let r=0;r<this.buffers.length;r++)e.buffers[r]=new Pt(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];e.attributes[r]=new oa(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=Sr.ELEMENT_ARRAY_BUFFER),e}static merge(e){const r=new ui,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 lw[Xf(u.buffers[l].data)](i[l]),r.buffers[l]=new Pt(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=Sr.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*Qf[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 Jf extends ui{constructor(e=!1){super(),this._buffer=new Pt(null,e,!1),this._indexBuffer=new Pt(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Ne.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Ne.FLOAT).addAttribute("aColor",this._buffer,4,!0,Ne.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Ne.FLOAT).addIndex(this._indexBuffer)}}const ua=Math.PI*2,cw=180/Math.PI,rs=Math.PI/180;var wt=(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))(wt||{});class qe{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new qe(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 la=[new qe,new qe,new qe,new qe];class je{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=wt.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 je(0,0,0,0)}clone(){return new je(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=la[0].set(e.left,e.top),f=la[1].set(e.left,e.bottom),p=la[2].set(e.right,e.top),v=la[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,w=d*n+m*u,x=d*i+m*u;if(Math.max(_,b,w,x)<=d*l.x+m*l.y||Math.min(_,b,w,x)>=d*v.x+m*v.y)return!1;const E=c*(l.y-p.y),S=c*(p.x-l.x),I=E*n+S*a,O=E*i+S*a,N=E*n+S*u,L=E*i+S*u;return!(Math.max(I,O,N,L)<=E*l.x+S*l.y||Math.min(I,O,N,L)>=E*v.x+S*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=wt.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 je(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 hw=class rv{constructor(e=0,r=0,n=0,i=0){this.x=e,this.y=r,this.width=n,this.height=i,this.type=wt.ELIP}clone(){return new rv(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 je(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 ns{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=wt.POLY,this.closeStroke=!0}clone(){const e=this.points.slice(),r=new ns(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=wt.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 Mt=class Uo{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 qe;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 qe;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(ua-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 Uo;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 Uo}static get TEMP_MATRIX(){return new Uo}};const An=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Sn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],En=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Cn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],el=[],ed=[],ca=Math.sign;function fw(){for(let t=0;t<16;t++){const e=[];el.push(e);for(let r=0;r<16;r++){const n=ca(An[t]*An[r]+En[t]*Sn[r]),i=ca(Sn[t]*An[r]+Cn[t]*Sn[r]),a=ca(An[t]*En[r]+En[t]*Cn[r]),u=ca(Sn[t]*En[r]+Cn[t]*Cn[r]);for(let l=0;l<16;l++)if(An[l]===n&&Sn[l]===i&&En[l]===a&&Cn[l]===u){e.push(l);break}}}for(let t=0;t<16;t++){const e=new Mt;e.set(An[t],Sn[t],En[t],Cn[t],0,0),ed.push(e)}}fw();const it={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=>An[t],uY:t=>Sn[t],vX:t=>En[t],vY:t=>Cn[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>el[t][e],sub:(t,e)=>el[t][it.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?it.S:it.N:Math.abs(e)*2<=Math.abs(t)?t>0?it.E:it.W:e>0?t>0?it.SE:it.SW:t>0?it.NE:it.NW,matrixAppendRotationInv:(t,e,r=0,n=0)=>{const i=ed[it.inv(e)];i.tx=r,i.ty=n,t.append(i)}};class In{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 In(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 td=class{constructor(){this.worldTransform=new Mt,this.localTransform=new Mt,this.position=new In(this.onChange,this,0,0),this.scale=new In(this.onChange,this,1,1),this.pivot=new In(this.onChange,this,0,0),this.skew=new In(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=td;tl.IDENTITY=new td;var dw=`varying vec2 vTextureCoord;
|
|
18
|
+
Deprecated since v${t}`),console.warn(n))),Lf[e]=!0}let ku;function zb(){return typeof ku>"u"&&(ku=function(){var r;const e={stencil:!0,failIfMajorPerformanceCaveat:_e.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!_e.ADAPTER.getWebGLRenderingContext())return!1;const n=_e.ADAPTER.createCanvas();let i=n.getContext("webgl",e)||n.getContext("experimental-webgl",e);const a=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const u=i.getExtension("WEBGL_lose_context");u&&u.loseContext()}return i=null,a}catch{return!1}}()),ku}var Hb={grad:.9,turn:360,rad:360/(2*Math.PI)},Ur=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},wt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},er=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:er(t.r,0,255),g:er(t.g,0,255),b:er(t.b,0,255),a:er(t.a)}},Bu=function(t){return{r:wt(t.r),g:wt(t.g),b:wt(t.b),a:wt(t.a,3)}},Vb=/^#([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:er(t.s,0,100),l:er(t.l,0,100),a:er(t.a)}},Gf=function(t){return{h:wt(t.h),s:wt(t.s),l:wt(t.l),a:wt(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},Xb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Du={string:[[function(t){var e=Vb.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?wt(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?wt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Wb.exec(t)||qb.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=Xb.exec(t)||jb.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)*(Hb[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:er(l.s,0,100),v:er(l.v,0,100),a:er(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]},Yb=function(t){return typeof t=="string"?Hf(t.trim(),Du.string):typeof t=="object"&&t!==null?Hf(t,Du.object):[null,void 0]},Uu=function(t,e){var r=ns(t);return{h:r.h,s:er(r.s+100*e,0,100),l:r.l,a:r.a}},$u=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:er(r.l+100*e,0,100),a:r.a}},Gu=function(){function t(e){this.parsed=Yb(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return wt($u(this.rgba),2)},t.prototype.isDark=function(){return $u(this.rgba)<.5},t.prototype.isLight=function(){return $u(this.rgba)>=.5},t.prototype.toHex=function(){return e=Bu(this.rgba),r=e.r,n=e.g,i=e.b,u=(a=e.a)<1?na(wt(255*a)):"","#"+na(r)+na(n)+na(i)+u;var e,r,n,i,a,u},t.prototype.toRgb=function(){return Bu(this.rgba)},t.prototype.toRgbString=function(){return e=Bu(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:wt(e.h),s:wt(e.s),v:wt(e.v),a:wt(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(Uu(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Or(Uu(this.rgba,-e))},t.prototype.grayscale=function(){return Or(Uu(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}):wt(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}):wt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Or(e).toHex()},t}(),Or=function(t){return t instanceof Gu?t:new Gu(t)},Xf=[],Kb=function(t){t.forEach(function(e){Xf.indexOf(e)<0&&(e(Gu,Du),Xf.push(e))})};function Zb(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"])}Kb([Zb]);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 Pt=li;Pt.shared=new li,Pt.temp=new li,Pt.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function ia(t,e=[]){return Ie("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Pt.shared.setValue(t).toRgbArray(e)}function zu(t){return Ie("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Pt.shared.setValue(t).toNumber()}function Qb(){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 Jb=Qb();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 ew=0;function is(){return++ew}const Yf={},Fr=Object.create(null),sn=Object.create(null);let oa;function tw(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location,oa||(oa=document.createElement("a")),oa.href=t;const r=Gb.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=_e.RETINA_PREFIX)==null?void 0:n.exec(t);return r?parseFloat(r[1]):e}var Ee=(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))(Ee||{});const Hu=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)=>Hu(t).priority??e,Ge={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(Hu).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(Hu).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 rw{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 nw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
19
|
+
`);function iw(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 sw(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=nw.replace(/%forloop%/gi,iw(t));if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}const Vu=0,Xu=1,ju=2,Wu=3,qu=4,Yu=5;let ua=class nv{constructor(){this.data=0,this.blendMode=ue.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Vu)}set blend(e){!!(this.data&1<<Vu)!==e&&(this.data^=1<<Vu)}get offsets(){return!!(this.data&1<<Xu)}set offsets(e){!!(this.data&1<<Xu)!==e&&(this.data^=1<<Xu)}get culling(){return!!(this.data&1<<ju)}set culling(e){!!(this.data&1<<ju)!==e&&(this.data^=1<<ju)}get depthTest(){return!!(this.data&1<<Wu)}set depthTest(e){!!(this.data&1<<Wu)!==e&&(this.data^=1<<Wu)}get depthMask(){return!!(this.data&1<<Yu)}set depthMask(e){!!(this.data&1<<Yu)!==e&&(this.data^=1<<Yu)}get clockwiseFrontFace(){return!!(this.data&1<<qu)}set clockwiseFrontFace(e){!!(this.data&1<<qu)!==e&&(this.data^=1<<qu)}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 nv;return e.depthTest=!1,e.blend=!0,e}};const Ku=[];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=Ku.length-1;n>=0;--n){const i=Ku[n];if(i.test&&i.test(t,r))return new i(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class hr{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(hr.prototype,{dispatch:{value:hr.prototype.emit},run:{value:hr.prototype.emit}});class ss{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new hr("setRealSize"),this.onUpdate=new hr("update"),this.onError=new hr("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 Zu 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 aw={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||_e.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=_e.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 Zu(t,{width:e,height:r}),a=t instanceof Float32Array?Ne.FLOAT:Ne.UNSIGNED_BYTE;return new ci(i,Object.assign({},aw,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 Le=ci;Le.defaultOptions={mipmap:bn.POW2,anisotropicLevel:0,scaleMode:Ir.LINEAR,wrapMode:qi.CLAMP,alphaMode:en.UNPACK,target:Zn.TEXTURE_2D,format:K.RGBA,type:Ne.UNSIGNED_BYTE},Le._globalBatch=0;class Qu{constructor(){this.texArray=null,this.blend=0,this.type=Jr.TRIANGLES,this.start=0,this.size=0,this.data=null}}let ow=0;class Ft{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=ow++,this.disposeRunner=new hr("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 Ft(e)}}class la{constructor(e,r=0,n=!1,i=Ne.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 uw={Float32Array,Uint32Array,Int32Array,Uint8Array};function lw(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 uw[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 cw=0;const hw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class hi{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=cw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new hr("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 Ft||(r instanceof Array&&(r=new Float32Array(r)),r=new Ft(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 Ft||(e instanceof Array&&(e=new Uint16Array(e)),e=new Ft(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 Ft;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=lw(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 Ft(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 hw[jf(u.buffers[l].data)](i[l]),r.buffers[l]=new Ft(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 Ft(null,e,!1),this._indexBuffer=new Ft(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Ne.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Ne.FLOAT).addAttribute("aColor",this._buffer,4,!0,Ne.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Ne.FLOAT).addIndex(this._indexBuffer)}}const ca=Math.PI*2,fw=180/Math.PI,as=Math.PI/180;var St=(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))(St||{});class qe{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new qe(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 qe,new qe,new qe,new qe];class je{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=St.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 je(0,0,0,0)}clone(){return new je(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,w=d*n+m*u,x=d*i+m*u;if(Math.max(_,b,w,x)<=d*l.x+m*l.y||Math.min(_,b,w,x)>=d*v.x+m*v.y)return!1;const E=c*(l.y-p.y),S=c*(p.x-l.x),I=E*n+S*a,O=E*i+S*a,N=E*n+S*u,L=E*i+S*u;return!(Math.max(I,O,N,L)<=E*l.x+S*l.y||Math.min(I,O,N,L)>=E*v.x+S*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 Ju{constructor(e=0,r=0,n=0){this.x=e,this.y=r,this.radius=n,this.type=St.CIRC}clone(){return new Ju(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 je(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 dw=class iv{constructor(e=0,r=0,n=0,i=0){this.x=e,this.y=r,this.width=n,this.height=i,this.type=St.ELIP}clone(){return new iv(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 je(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=St.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 el{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=St.RREC}clone(){return new el(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 Nt=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 qe;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 qe;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 Cn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],In=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Rn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Pn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],tl=[],td=[],fa=Math.sign;function pw(){for(let t=0;t<16;t++){const e=[];tl.push(e);for(let r=0;r<16;r++){const n=fa(Cn[t]*Cn[r]+Rn[t]*In[r]),i=fa(In[t]*Cn[r]+Pn[t]*In[r]),a=fa(Cn[t]*Rn[r]+Rn[t]*Pn[r]),u=fa(In[t]*Rn[r]+Pn[t]*Pn[r]);for(let l=0;l<16;l++)if(Cn[l]===n&&In[l]===i&&Rn[l]===a&&Pn[l]===u){e.push(l);break}}}for(let t=0;t<16;t++){const e=new Nt;e.set(Cn[t],In[t],Rn[t],Pn[t],0,0),td.push(e)}}pw();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=>Cn[t],uY:t=>In[t],vX:t=>Rn[t],vY:t=>Pn[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>tl[t][e],sub:(t,e)=>tl[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 Mn{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 Mn(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 Nt,this.localTransform=new Nt,this.position=new Mn(this.onChange,this,0,0),this.scale=new Mn(this.onChange,this,1,1),this.pivot=new Mn(this.onChange,this,0,0),this.skew=new Mn(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 rl=rd;rl.IDENTITY=new rd;var gw=`varying vec2 vTextureCoord;
|
|
21
21
|
|
|
22
22
|
uniform sampler2D uSampler;
|
|
23
23
|
|
|
24
24
|
void main(void){
|
|
25
25
|
gl_FragColor *= texture2D(uSampler, vTextureCoord);
|
|
26
|
-
}`,
|
|
26
|
+
}`,mw=`attribute vec2 aVertexPosition;
|
|
27
27
|
attribute vec2 aTextureCoord;
|
|
28
28
|
|
|
29
29
|
uniform mat3 projectionMatrix;
|
|
@@ -34,7 +34,7 @@ void main(void){
|
|
|
34
34
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
35
35
|
vTextureCoord = aTextureCoord;
|
|
36
36
|
}
|
|
37
|
-
`;function
|
|
37
|
+
`;function nd(t,e,r){const n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),n}function nl(t){const e=new Array(t);for(let r=0;r<e.length;r++)e[r]=!1;return e}function id(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return nl(2*e);case"bvec3":return nl(3*e);case"bvec4":return nl(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const fi=[{test:t=>t.type==="float"&&t.size===1&&!t.isArray,code:t=>`
|
|
38
38
|
if(uv["${t}"] !== ud["${t}"].value)
|
|
39
39
|
{
|
|
40
40
|
ud["${t}"].value = uv["${t}"]
|
|
@@ -154,7 +154,7 @@ void main(void){
|
|
|
154
154
|
cv[3] = v[3];
|
|
155
155
|
|
|
156
156
|
gl.uniform4f(ud["${t}"].location, v[0], v[1], v[2], v[3])
|
|
157
|
-
}`}],
|
|
157
|
+
}`}],vw={float:`
|
|
158
158
|
if (cv !== v)
|
|
159
159
|
{
|
|
160
160
|
cu.value = v;
|
|
@@ -290,7 +290,7 @@ void main(void){
|
|
|
290
290
|
cu.value = v;
|
|
291
291
|
|
|
292
292
|
gl.uniform1i(location, v);
|
|
293
|
-
}`},
|
|
293
|
+
}`},_w={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function yw(t,e){var n;const r=[`
|
|
294
294
|
var v = null;
|
|
295
295
|
var cv = null;
|
|
296
296
|
var cu = null;
|
|
@@ -300,18 +300,18 @@ void main(void){
|
|
|
300
300
|
renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}');
|
|
301
301
|
`):r.push(`
|
|
302
302
|
renderer.shader.syncUniformGroup(uv.${i}, syncData);
|
|
303
|
-
`));continue}const u=t.uniforms[i];let l=!1;for(let f=0;f<
|
|
303
|
+
`));continue}const u=t.uniforms[i];let l=!1;for(let f=0;f<fi.length;f++)if(fi[f].test(a,u)){r.push(fi[f].code(i,u)),l=!0;break}if(!l){const p=(a.size===1&&!a.isArray?vw:_w)[a.type].replace("location",`ud["${i}"].location`);r.push(`
|
|
304
304
|
cu = ud["${i}"];
|
|
305
305
|
cv = cu.value;
|
|
306
306
|
v = uv["${i}"];
|
|
307
307
|
${p};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
|
|
308
|
-
`))}const
|
|
308
|
+
`))}const sd={};let di=sd;function xw(){if(di===sd||di!=null&&di.isContextLost()){const t=_e.ADAPTER.createCanvas();let e;_e.PREFER_ENV>=xn.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),di=e}return di}let da;function bw(){if(!da){da=Jt.MEDIUM;const t=xw();t&&t.getShaderPrecisionFormat&&(da=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?Jt.HIGH:Jt.MEDIUM)}return da}function ad(t,e){const r=t.getShaderSource(e).split(`
|
|
309
309
|
`).map((p,v)=>`${v}: ${p}`),n=t.getShaderInfoLog(e),i=n.split(`
|
|
310
310
|
`),a={},u=i.map(p=>parseFloat(p.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(p=>p&&!a[p]?(a[p]=!0,!0):!1),l=[""];u.forEach(p=>{r[p-1]=`%c${r[p-1]}%c`,l.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const f=r.join(`
|
|
311
|
-
`);l[0]=f,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function
|
|
312
|
-
${t}`}else if(r!==
|
|
311
|
+
`);l[0]=f,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function ww(t,e,r,n){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||ad(t,r),t.getShaderParameter(n,t.COMPILE_STATUS)||ad(t,n),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}const Tw={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function od(t){return Tw[t]}let pa=null;const ud={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function ld(t,e){if(!pa){const r=Object.keys(ud);pa={};for(let n=0;n<r.length;++n){const i=r[n];pa[t[i]]=ud[i]}}return pa[e]}function cd(t,e,r){if(t.substring(0,9)!=="precision"){let n=e;return e===Jt.HIGH&&r!==Jt.HIGH&&(n=Jt.MEDIUM),`precision ${n} float;
|
|
312
|
+
${t}`}else if(r!==Jt.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}let us;function Aw(){if(typeof us=="boolean")return us;try{us=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{us=!1}return us}let Sw=0;const ga={},pi=class{constructor(t,e,r="pixi-shader",n={}){this.extra={},this.id=Sw++,this.vertexSrc=t||pi.defaultVertexSrc,this.fragmentSrc=e||pi.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),ga[r]?(ga[r]++,r+=`-${ga[r]}`):ga[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
|
|
313
313
|
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${r}
|
|
314
|
-
${this.fragmentSrc}`,this.vertexSrc=
|
|
314
|
+
${this.fragmentSrc}`,this.vertexSrc=cd(this.vertexSrc,pi.defaultVertexPrecision,Jt.HIGH),this.fragmentSrc=cd(this.fragmentSrc,pi.defaultFragmentPrecision,bw())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return mw}static get defaultFragmentSrc(){return gw}static from(t,e,r){const n=t+e;let i=Yf[n];return i||(Yf[n]=i=new pi(t,e,r)),i}};let $r=pi;$r.defaultVertexPrecision=Jt.HIGH,$r.defaultFragmentPrecision=Jn.apple.device?Jt.HIGH:Jt.MEDIUM;let Ew=0;class fr{constructor(e,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Ew++,this.static=!!r,this.ubo=!!n,e instanceof Ft?(this.buffer=e,this.buffer.type=Rr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new Ft(new Float32Array(1)),this.buffer.type=Rr.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,r,n){if(!this.ubo)this.uniforms[e]=new fr(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,r,n){return new fr(e,r,n)}static uboFrom(e,r){return new fr(e,r??!0,!0)}}class ls{constructor(e,r){this.uniformBindCount=0,this.program=e,r?r instanceof fr?this.uniformGroup=r:this.uniformGroup=new fr(r):this.uniformGroup=new fr({}),this.disposeRunner=new hr("disposeShader")}checkUniformExists(e,r){if(r.uniforms[e])return!0;for(const n in r.uniforms){const i=r.uniforms[n];if(i.group&&this.checkUniformExists(e,i))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,r,n){const i=$r.from(e,r);return new ls(i,n)}}class Cw{constructor(e,r){if(this.vertexSrc=e,this.fragTemplate=r,this.programCache={},this.defaultGroupCache={},!r.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!r.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const n=new Int32Array(e);for(let a=0;a<e;a++)n[a]=a;this.defaultGroupCache[e]=fr.from({uSamplers:n},!0);let i=this.fragTemplate;i=i.replace(/%count%/gi,`${e}`),i=i.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new $r(this.vertexSrc,i)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new Nt,default:this.defaultGroupCache[e]};return new ls(this.programCache[e],r)}generateSampleSrc(e){let r="";r+=`
|
|
315
315
|
`,r+=`
|
|
316
316
|
`;for(let n=0;n<e;n++)n>0&&(r+=`
|
|
317
317
|
else `),n<e-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
|
|
@@ -319,7 +319,7 @@ else `),n<e-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
|
|
|
319
319
|
color = texture2D(uSamplers[${n}], vTextureCoord);`,r+=`
|
|
320
320
|
}`;return r+=`
|
|
321
321
|
`,r+=`
|
|
322
|
-
`,r}}class
|
|
322
|
+
`,r}}class il{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function Iw(){return!Jn.apple.device}function Rw(t){let e=!0;const r=_e.ADAPTER.getNavigator();if(Jn.tablet||Jn.phone){if(Jn.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(e=!1)}if(Jn.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(e=!1)}}return e?t:4}class hd{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var Pw=`varying vec2 vTextureCoord;
|
|
323
323
|
varying vec4 vColor;
|
|
324
324
|
varying float vTextureId;
|
|
325
325
|
uniform sampler2D uSamplers[%count%];
|
|
@@ -329,7 +329,7 @@ void main(void){
|
|
|
329
329
|
%forloop%
|
|
330
330
|
gl_FragColor = color * vColor;
|
|
331
331
|
}
|
|
332
|
-
`,
|
|
332
|
+
`,Mw=`precision highp float;
|
|
333
333
|
attribute vec2 aVertexPosition;
|
|
334
334
|
attribute vec2 aTextureCoord;
|
|
335
335
|
attribute vec4 aColor;
|
|
@@ -350,14 +350,14 @@ void main(void){
|
|
|
350
350
|
vTextureId = aTextureId;
|
|
351
351
|
vColor = aColor * tint;
|
|
352
352
|
}
|
|
353
|
-
`;const
|
|
353
|
+
`;const dr=class extends hd{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=ed,this.vertexSize=6,this.state=ua.for2d(),this.size=dr.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??Rw(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Iw(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return Ie("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Mw}static get defaultFragmentTemplate(){return Pw}setShaderGenerator({vertex:t=dr.defaultVertexSrc,fragment:e=dr.defaultFragmentTemplate}={}){this.shaderGenerator=new Cw(t,e)}contextChange(){const t=this.renderer.gl;_e.PREFER_ENV===xn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),dr.defaultMaxTextures),this.maxTextures=sw(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}=dr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;t.length<r;)t.push(new Qu);for(;e.length<n;)e.push(new il);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=dr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,a=this.renderer.textureGC.count;let u=++Le._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;Le._globalBatch=u}buildDrawCalls(t,e,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:a,vertexSize:u}=this,l=dr._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=Jb[_.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;dr.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=dr._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),dr.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 rw(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=Pt.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 pr=dr;pr.defaultBatchSize=4096,pr.extension={name:"batch",type:Ee.RendererPlugin},pr._drawCallPool=[],pr._textureArrayPool=[],Ge.add(pr);var Ow=`varying vec2 vTextureCoord;
|
|
354
354
|
|
|
355
355
|
uniform sampler2D uSampler;
|
|
356
356
|
|
|
357
357
|
void main(void){
|
|
358
358
|
gl_FragColor = texture2D(uSampler, vTextureCoord);
|
|
359
359
|
}
|
|
360
|
-
`,
|
|
360
|
+
`,Fw=`attribute vec2 aVertexPosition;
|
|
361
361
|
|
|
362
362
|
uniform mat3 projectionMatrix;
|
|
363
363
|
|
|
@@ -383,7 +383,7 @@ void main(void)
|
|
|
383
383
|
gl_Position = filterVertexPosition();
|
|
384
384
|
vTextureCoord = filterTextureCoord();
|
|
385
385
|
}
|
|
386
|
-
`;const as=class extends ss{constructor(t,e,r){const n=Br.from(t||as.defaultVertexSrc,e||as.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=as.defaultResolution,this.multisample=as.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new aa}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 Mw}static get defaultFragmentSrc(){return Pw}};let De=as;De.defaultResolution=1,De.defaultMultisample=ft.NONE;class pa{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Ct(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(){}}pa.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},pa.extension={type:[Se.RendererSystem,Se.CanvasRendererSystem],name:"background"},$e.add(pa);class hd{constructor(e){this.renderer=e,this.emptyRenderer=new cd(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}}hd.extension={type:Se.RendererSystem,name:"batch"},$e.add(hd);let fd=0;class ga{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=fd++}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=fd++,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(be.PREFER_ENV>=vn.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")}}ga.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ga.extension={type:Se.RendererSystem,name:"context"},$e.add(ga);class Ow extends Ku{upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.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 sr("disposeFramebuffer"),this.multisample=ft.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new Le(null,{scaleMode:Ar.NEAREST,resolution:1,mipmap:_n.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Le(new Ow(null,{width:this.width,height:this.height}),{scaleMode:Ar.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:_n.OFF,format:Z.DEPTH_COMPONENT,type:Ne.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 dd extends Le{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=ft.NONE),super(null,e),this.mipmap=_n.OFF,this.valid=!0,this._clear=new Ct([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 rn extends ts{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=Jb(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===Zr.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 pd extends rn{constructor(e,r){if(r=r||{},typeof e=="string"){const n=new Image;rn.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??be.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===Zr.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 gd{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=it.add(n,it.NW),this.x0=f+u*it.uX(n),this.y0=p+l*it.uY(n),n=it.add(n,2),this.x1=f+u*it.uX(n),this.y1=p+l*it.uY(n),n=it.add(n,2),this.x2=f+u*it.uX(n),this.y2=p+l*it.uY(n),n=it.add(n,2),this.x3=f+u*it.uX(n),this.y3=p+l*it.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 md=new gd;function ma(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}class Me extends $s{constructor(e,r,n,i,a,u,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new je(0,0,1,1)),e instanceof Me&&(e=e.baseTexture),this.baseTexture=e,this._frame=r,this.trim=i,this.valid=!1,this._uvs=md,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 qe(u.x,u.y):new qe(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&&Rr[r.url]&&Me.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,Me.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const e=this._frame.clone(),r=this._frame===this.orig?e:this.orig.clone(),n=new Me(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===md&&(this._uvs=new gd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,r={},n=be.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let a=null;if(i)a=e;else if(e instanceof Le){if(!e.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${l}-${es()}`,Le.addToCache(e,e.cacheId)}a=e.cacheId}else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${es()}`}a=e._pixiId}let u=Rr[a];if(i&&n&&!u)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!u&&!(e instanceof Le)?(r.resolution||(r.resolution=Yf(e)),u=new Me(new Le(e,r)),u.baseTexture.cacheId=a,Le.addToCache(u.baseTexture,a),Me.addToCache(u,a)):!u&&e instanceof Le&&(u=new Me(e),Me.addToCache(u,a)),u}static fromURL(e,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Me.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 Me(Le.fromBuffer(e,r,n,i))}static fromLoader(e,r,n,i){const a=new Le(e,Object.assign({scaleMode:Le.defaultOptions.scaleMode,resolution:Yf(r)},i)),{resource:u}=a;u instanceof pd&&(u.url=r);const l=new Me(a);return n||(n=r),Le.addToCache(l.baseTexture,n),Me.addToCache(l,n),n!==r&&(Le.addToCache(l.baseTexture,r),Me.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),Rr[r]&&Rr[r]!==e&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Rr[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=Rr[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete Rr[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)Rr[e.textureCacheIds[r]]===e&&delete Rr[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 Me._EMPTY||(Me._EMPTY=new Me(new Le),ma(Me._EMPTY),ma(Me._EMPTY.baseTexture)),Me._EMPTY}static get WHITE(){if(!Me._WHITE){const e=be.ADAPTER.createCanvas(16,16),r=e.getContext("2d");e.width=16,e.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Me._WHITE=new Me(Le.from(e)),ma(Me._WHITE),ma(Me._WHITE.baseTexture)}return Me._WHITE}}class va extends Me{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 va(new dd(e))}}class vd{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,r,n=ft.NONE){const i=new dd(Object.assign({width:e,height:r,resolution:1,multisample:n},this.textureOptions));return new va(i)}getOptimalTexture(e,r,n=1,i=ft.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=na(e),r=na(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||ft.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}}}vd.SCREEN_KEY=-1;class Fw extends ui{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Nw extends ui{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 Pt(this.vertices),this.uvBuffer=new Pt(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 Lw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=ft.NONE,this.sourceFrame=new je,this.destinationFrame=new je,this.bindingSourceFrame=new je,this.bindingDestinationFrame=new je,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const _a=[new qe,new qe,new qe,new qe],sl=new Mt;class _d{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new vd,this.statePool=[],this.quad=new Fw,this.quadUv=new Nw,this.tempRect=new je,this.activeState={},this.globalUniforms=new ar({outputFrame:new je,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 Lw,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,yn.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,yn.CLEAR,r);const d=p;p=v,v=d}n[c].apply(this,p,f.renderTexture,yn.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=yn.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===yn.CLEAR||r===yn.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(Kr.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Kr.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(Mt.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=ft.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||ft.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=_a[0],i=_a[1],a=_a[2],u=_a[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)}}}_d.extension={type:Se.RendererSystem,name:"filter"},$e.add(_d);class kw{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ft.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Bw=new je;class yd{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 je,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;be.PREFER_ENV===vn.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 kw(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=ft.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=ft.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=Bw,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 je}destroy(){this.renderer=null}}yd.extension={type:Se.RendererSystem,name:"framebuffer"},$e.add(yd);const al={5126:4,5123:2,5121:1};class xd{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;be.PREFER_ENV===vn.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 w=d[b],x=w.size;w.stride===void 0&&(m[w.buffer]===x*al[w.type]?w.stride=0:w.stride=m[w.buffer]),w.start===void 0&&(w.start=_[w.buffer],_[w.buffer]+=x*al[w.type])}v=i.createVertexArray(),i.bindVertexArray(v);for(let b=0;b<c.length;b++){const w=c[b];u.bind(w),n&&w._glBuffers[a].refCount++}return this.activateVao(e,l),p[l.id]=v,p[f]=v,i.bindVertexArray(null),u.unbind(Sr.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}}xd.extension={type:Se.RendererSystem,name:"geometry"},$e.add(xd);const bd=new Mt;class Dw{constructor(e,r){this._texture=e,this.mapCoord=new Mt,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&&(bd.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(bd));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 Uw=`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 Fw}static get defaultFragmentSrc(){return Ow}};let Be=cs;Be.defaultResolution=1,Be.defaultMultisample=pt.NONE;class ma{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Pt(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:[Ee.RendererSystem,Ee.CanvasRendererSystem],name:"background"},Ge.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:Ee.RendererSystem,name:"batch"},Ge.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(_e.PREFER_ENV>=xn.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:Ee.RendererSystem,name:"context"},Ge.add(va);class Nw extends Zu{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 sl{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 hr("disposeFramebuffer"),this.multisample=pt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new Le(null,{scaleMode:Ir.NEAREST,resolution:1,mipmap:bn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Le(new Nw(null,{width:this.width,height:this.height}),{scaleMode:Ir.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:bn.OFF,format:K.DEPTH_COMPONENT,type:Ne.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 Le{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=pt.NONE),super(null,e),this.mipmap=bn.OFF,this.valid=!0,this._clear=new Pt([0,0,0,0]),this.framebuffer=new sl(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=tw(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??_e.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 je(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 qe(u.x,u.y):new qe(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=_e.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let a=null;if(i)a=e;else if(e instanceof Le){if(!e.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${l}-${is()}`,Le.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 Le)?(r.resolution||(r.resolution=Kf(e)),u=new Pe(new Le(e,r)),u.baseTexture.cacheId=a,Le.addToCache(u.baseTexture,a),Pe.addToCache(u,a)):!u&&e instanceof Le&&(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(Le.fromBuffer(e,r,n,i))}static fromLoader(e,r,n,i){const a=new Le(e,Object.assign({scaleMode:Le.defaultOptions.scaleMode,resolution:Kf(r)},i)),{resource:u}=a;u instanceof gd&&(u.url=r);const l=new Pe(a);return n||(n=r),Le.addToCache(l.baseTexture,n),Pe.addToCache(l,n),n!==r&&(Le.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 Le),_a(Pe._EMPTY),_a(Pe._EMPTY.baseTexture)),Pe._EMPTY}static get WHITE(){if(!Pe._WHITE){const e=_e.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(Le.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=pt.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=pt.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||pt.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 Lw extends hi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class kw 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 Ft(this.vertices),this.uvBuffer=new Ft(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 Bw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=pt.NONE,this.sourceFrame=new je,this.destinationFrame=new je,this.bindingSourceFrame=new je,this.bindingDestinationFrame=new je,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const xa=[new qe,new qe,new qe,new qe],al=new Nt;class yd{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new _d,this.statePool=[],this.quad=new Lw,this.quadUv=new kw,this.tempRect=new je,this.activeState={},this.globalUniforms=new fr({outputFrame:new je,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 Bw,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(al.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,wn.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,wn.CLEAR,r);const d=p;p=v,v=d}n[c].apply(this,p,f.renderTexture,wn.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=wn.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===wn.CLEAR||r===wn.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(Nt.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=pt.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||pt.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?al.copyFrom(a):al.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:Ee.RendererSystem,name:"filter"},Ge.add(yd);class Dw{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=pt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Uw=new je;class xd{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new sl(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 je,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;_e.PREFER_ENV===xn.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=eu.COLOR|eu.DEPTH){const{gl:u}=this;u.clearColor(e,r,n,i),u.clear(a)}initFramebuffer(e){const{gl:r}=this,n=new Dw(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=pt.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=pt.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 sl(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=Uw,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 je}destroy(){this.renderer=null}}xd.extension={type:Ee.RendererSystem,name:"framebuffer"},Ge.add(xd);const ol={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;_e.PREFER_ENV===xn.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*ol[d[b].type];for(const b in d){const w=d[b],x=w.size;w.stride===void 0&&(m[w.buffer]===x*ol[w.type]?w.stride=0:w.stride=m[w.buffer]),w.start===void 0&&(w.start=_[w.buffer],_[w.buffer]+=x*ol[w.type])}v=i.createVertexArray(),i.bindVertexArray(v);for(let b=0;b<c.length;b++){const w=c[b];u.bind(w),n&&w._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:Ee.RendererSystem,name:"geometry"},Ge.add(bd);const wd=new Nt;class $w{constructor(e,r){this._texture=e,this.mapCoord=new Nt,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 Gw=`varying vec2 vMaskCoord;
|
|
387
387
|
varying vec2 vTextureCoord;
|
|
388
388
|
|
|
389
389
|
uniform sampler2D uSampler;
|
|
@@ -408,7 +408,7 @@ void main(void)
|
|
|
408
408
|
|
|
409
409
|
gl_FragColor = original;
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
`,zw=`attribute vec2 aVertexPosition;
|
|
412
412
|
attribute vec2 aTextureCoord;
|
|
413
413
|
|
|
414
414
|
uniform mat3 projectionMatrix;
|
|
@@ -424,7 +424,7 @@ void main(void)
|
|
|
424
424
|
vTextureCoord = aTextureCoord;
|
|
425
425
|
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
|
|
426
426
|
}
|
|
427
|
-
`;class Gw extends De{constructor(e,r,n){let i=null;typeof e!="string"&&r===void 0&&n===void 0&&(i=e,e=void 0,r=void 0,n=void 0),super(e||$w,r||Uw,n),this.maskSprite=i,this.maskMatrix=new Mt}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,r,n,i){const a=this._maskSprite,u=a._texture;u.valid&&(u.uvMatrix||(u.uvMatrix=new Dw(u,0)),u.uvMatrix.update(),this.uniforms.npmAlpha=u.baseTexture.alphaMode?0:1,this.uniforms.mask=u,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,a).prepend(u.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=u.uvMatrix.uClampFrame,e.applyFilter(this,r,n,i))}}class zw{constructor(e=null){this.type=dt.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=De.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=dt.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class wd{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,r){let n=r;if(!n.isMaskData){const a=this.maskDataPool.pop()||new zw;a.pooled=!0,a.maskObject=r,n=a}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=e,n.type!==dt.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case dt.SCISSOR:this.renderer.scissor.push(n);break;case dt.STENCIL:this.renderer.stencil.push(n);break;case dt.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case dt.COLOR:this.pushColorMask(n);break}n.type===dt.SPRITE&&this.maskStack.push(n)}pop(e){const r=this.maskStack.pop();if(!(!r||r._target!==e)){if(r.enabled)switch(r.type){case dt.SCISSOR:this.renderer.scissor.pop(r);break;case dt.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case dt.SPRITE:this.popSpriteMask(r);break;case dt.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===dt.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(e){const r=e.maskObject;r?r.isSprite?e.type=dt.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=dt.SCISSOR:e.type=dt.STENCIL:e.type=dt.COLOR}pushSpriteMask(e){const{maskObject:r}=e,n=e._target;let i=e._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Gw]));const a=this.renderer,u=a.renderTexture;let l,f;if(u.current){const v=u.current;l=e.resolution||v.resolution,f=e.multisample??v.multisample}else l=e.resolution||a.resolution,f=e.multisample??a.multisample;i[0].resolution=l,i[0].multisample=f,i[0].maskSprite=r;const p=n.filterArea;n.filterArea=r.getBounds(!0),a.filter.push(n,i),n.filterArea=p,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const r=e._colorMask,n=e._colorMask=r&e.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(e){const r=e._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}wd.extension={type:Se.RendererSystem,name:"mask"},$e.add(wd);class Td{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=e;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Ad=new Mt,Sd=[],ya=class extends Td{constructor(t){super(t),this.glConst=be.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0}calcScissorRect(t){if(t._scissorRectLocal)return;const e=t._scissorRect,{maskObject:r}=t,{renderer:n}=this,i=n.renderTexture,a=r.getBounds(!0,Sd.pop()??new je);this.roundFrameToPixels(a,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),e&&a.fit(e),t._scissorRectLocal=a}static isMatrixRotated(t){if(!t)return!1;const{a:e,b:r,c:n,d:i}=t;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(i)>1e-4)}testScissor(t){const{maskObject:e}=t;if(!e.isFastRect||!e.isFastRect()||ya.isMatrixRotated(e.worldTransform)||ya.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(t);const r=t._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(t,e,r,n,i){ya.isMatrixRotated(i)||(i=i?Ad.copyFrom(i):Ad.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,t),t.fit(n),t.x=Math.round(t.x*e),t.y=Math.round(t.y*e),t.width=Math.round(t.width*e),t.height=Math.round(t.height*e))}push(t){t._scissorRectLocal||this.calcScissorRect(t);const{gl:e}=this.renderer;t._scissorRect||e.enable(e.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=t._scissorRectLocal,this._useCurrent()}pop(t){const{gl:e}=this.renderer;t&&Sd.push(t._scissorRectLocal),this.getStackLength()>0?this._useCurrent():e.disable(e.SCISSOR_TEST)}_useCurrent(){const t=this.maskStack[this.maskStack.length-1]._scissorRect;let e;this.renderer.renderTexture.current?e=t.y:e=this.renderer.height-t.height-t.y,this.renderer.gl.scissor(t.x,e,t.width,t.height)}};let Ed=ya;Ed.extension={type:Se.RendererSystem,name:"scissor"},$e.add(Ed);class Cd extends Td{constructor(e){super(e),this.glConst=be.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const r=e.maskObject,{gl:n}=this.renderer,i=e._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;const a=e._colorMask;a!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(e._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}pop(e){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}Cd.extension={type:Se.RendererSystem,name:"stencil"},$e.add(Cd);class Id{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Re("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return Re("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return Re("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const r in e)this.plugins[r]=new e[r](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}Id.extension={type:[Se.RendererSystem,Se.CanvasRendererSystem],name:"_plugin"},$e.add(Id);class Rd{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Mt,this.transform=null}update(e,r,n,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)}calculateProjection(e,r,n,i){const a=this.projectionMatrix,u=i?-1:1;a.identity(),a.a=1/r.width*2,a.d=u*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-u-r.y*a.d}setTransform(e){}destroy(){this.renderer=null}}Rd.extension={type:Se.RendererSystem,name:"projection"},$e.add(Rd);const Hw=new tl;class Pd{constructor(e){this.renderer=e,this._tempMatrix=new Mt}generateTexture(e,r){const{region:n,...i}=r||{},a=n||e.getLocalBounds(null,!0);a.width===0&&(a.width=1),a.height===0&&(a.height=1);const u=va.create({width:a.width,height:a.height,...i});this._tempMatrix.tx=-a.x,this._tempMatrix.ty=-a.y;const l=e.transform;return e.transform=Hw,this.renderer.render(e,{renderTexture:u,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=l,u}destroy(){}}Pd.extension={type:[Se.RendererSystem,Se.CanvasRendererSystem],name:"textureGenerator"},$e.add(Pd);const Rn=new je,os=new je;class Md{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new je,this.destinationFrame=new je,this.viewportFrame=new je}bind(e=null,r,n){const i=this.renderer;this.current=e;let a,u,l;e?(a=e.baseTexture,l=a.resolution,r||(Rn.width=e.frame.width,Rn.height=e.frame.height,r=Rn),n||(os.x=e.frame.x,os.y=e.frame.y,os.width=r.width,os.height=r.height,n=os),u=a.framebuffer):(l=i.resolution,r||(Rn.width=i._view.screen.width,Rn.height=i._view.screen.height,r=Rn),n||(n=Rn,n.width=r.width,n.height=r.height));const f=this.viewportFrame;f.x=n.x*l,f.y=n.y*l,f.width=n.width*l,f.height=n.height*l,e||(f.y=i.view.height-(f.y+f.height)),f.ceil(),this.renderer.framebuffer.bind(u,f),this.renderer.projection.update(n,r,l,!u),e?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(e,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=e?Ct.shared.setValue(e):n,a=this.destinationFrame,u=this.current?this.current.baseTexture:this.renderer._view.screen,l=a.width!==u.width||a.height!==u.height;if(l){let{x:f,y:p,width:v,height:c}=this.viewportFrame;f=Math.round(f),p=Math.round(p),v=Math.round(v),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,p,v,c)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:Se.RendererSystem,name:"renderTexture"},$e.add(Md);class Vw{constructor(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Xw(t,e){const r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const a=e.getActiveAttrib(t,i);if(a.name.startsWith("gl_"))continue;const u=ud(e,a.type),l={type:u,name:a.name,size:ad(u),location:e.getAttribLocation(t,a.name)};r[a.name]=l}return r}function jw(t,e){const r={},n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const a=e.getActiveUniform(t,i),u=a.name.replace(/\[.*?\]$/,""),l=!!a.name.match(/\[.*?\]$/),f=ud(e,a.type);r[u]={name:u,index:i,type:f,size:a.size,isArray:l,value:nd(f,a.size)}}return r}function Ww(t,e){var f;const r=rd(t,t.VERTEX_SHADER,e.vertexSrc),n=rd(t,t.FRAGMENT_SHADER,e.fragmentSrc),i=t.createProgram();t.attachShader(i,r),t.attachShader(i,n);const a=(f=e.extra)==null?void 0:f.transformFeedbackVaryings;if(a&&(typeof t.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(i,a.names,a.bufferMode==="separate"?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)||xw(t,i,r,n),e.attributeData=Xw(i,t),e.uniformData=jw(i,t),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){const p=Object.keys(e.attributeData);p.sort((v,c)=>v>c?1:-1);for(let v=0;v<p.length;v++)e.attributeData[p[v]].location=v,t.bindAttribLocation(i,v,p[v]);t.linkProgram(i)}t.deleteShader(r),t.deleteShader(n);const u={};for(const p in e.uniformData){const v=e.uniformData[p];u[p]={location:t.getUniformLocation(i,p),value:nd(v.type,v.size)}}return new Vw(i,u)}function qw(t,e,r,n,i){r.buffer.update(i)}const Yw={float:`
|
|
427
|
+
`;class Hw extends Be{constructor(e,r,n){let i=null;typeof e!="string"&&r===void 0&&n===void 0&&(i=e,e=void 0,r=void 0,n=void 0),super(e||zw,r||Gw,n),this.maskSprite=i,this.maskMatrix=new Nt}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,r,n,i){const a=this._maskSprite,u=a._texture;u.valid&&(u.uvMatrix||(u.uvMatrix=new $w(u,0)),u.uvMatrix.update(),this.uniforms.npmAlpha=u.baseTexture.alphaMode?0:1,this.uniforms.mask=u,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,a).prepend(u.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=u.uvMatrix.uClampFrame,e.applyFilter(this,r,n,i))}}class Vw{constructor(e=null){this.type=mt.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Be.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=mt.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Td{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,r){let n=r;if(!n.isMaskData){const a=this.maskDataPool.pop()||new Vw;a.pooled=!0,a.maskObject=r,n=a}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=e,n.type!==mt.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case mt.SCISSOR:this.renderer.scissor.push(n);break;case mt.STENCIL:this.renderer.stencil.push(n);break;case mt.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case mt.COLOR:this.pushColorMask(n);break}n.type===mt.SPRITE&&this.maskStack.push(n)}pop(e){const r=this.maskStack.pop();if(!(!r||r._target!==e)){if(r.enabled)switch(r.type){case mt.SCISSOR:this.renderer.scissor.pop(r);break;case mt.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case mt.SPRITE:this.popSpriteMask(r);break;case mt.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===mt.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(e){const r=e.maskObject;r?r.isSprite?e.type=mt.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=mt.SCISSOR:e.type=mt.STENCIL:e.type=mt.COLOR}pushSpriteMask(e){const{maskObject:r}=e,n=e._target;let i=e._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Hw]));const a=this.renderer,u=a.renderTexture;let l,f;if(u.current){const v=u.current;l=e.resolution||v.resolution,f=e.multisample??v.multisample}else l=e.resolution||a.resolution,f=e.multisample??a.multisample;i[0].resolution=l,i[0].multisample=f,i[0].maskSprite=r;const p=n.filterArea;n.filterArea=r.getBounds(!0),a.filter.push(n,i),n.filterArea=p,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const r=e._colorMask,n=e._colorMask=r&e.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(e){const r=e._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Td.extension={type:Ee.RendererSystem,name:"mask"},Ge.add(Td);class Ad{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=e;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Sd=new Nt,Ed=[],ba=class extends Ad{constructor(t){super(t),this.glConst=_e.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0}calcScissorRect(t){if(t._scissorRectLocal)return;const e=t._scissorRect,{maskObject:r}=t,{renderer:n}=this,i=n.renderTexture,a=r.getBounds(!0,Ed.pop()??new je);this.roundFrameToPixels(a,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),e&&a.fit(e),t._scissorRectLocal=a}static isMatrixRotated(t){if(!t)return!1;const{a:e,b:r,c:n,d:i}=t;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(i)>1e-4)}testScissor(t){const{maskObject:e}=t;if(!e.isFastRect||!e.isFastRect()||ba.isMatrixRotated(e.worldTransform)||ba.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(t);const r=t._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(t,e,r,n,i){ba.isMatrixRotated(i)||(i=i?Sd.copyFrom(i):Sd.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,t),t.fit(n),t.x=Math.round(t.x*e),t.y=Math.round(t.y*e),t.width=Math.round(t.width*e),t.height=Math.round(t.height*e))}push(t){t._scissorRectLocal||this.calcScissorRect(t);const{gl:e}=this.renderer;t._scissorRect||e.enable(e.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=t._scissorRectLocal,this._useCurrent()}pop(t){const{gl:e}=this.renderer;t&&Ed.push(t._scissorRectLocal),this.getStackLength()>0?this._useCurrent():e.disable(e.SCISSOR_TEST)}_useCurrent(){const t=this.maskStack[this.maskStack.length-1]._scissorRect;let e;this.renderer.renderTexture.current?e=t.y:e=this.renderer.height-t.height-t.y,this.renderer.gl.scissor(t.x,e,t.width,t.height)}};let Cd=ba;Cd.extension={type:Ee.RendererSystem,name:"scissor"},Ge.add(Cd);class Id extends Ad{constructor(e){super(e),this.glConst=_e.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const r=e.maskObject,{gl:n}=this.renderer,i=e._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;const a=e._colorMask;a!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(e._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}pop(e){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}Id.extension={type:Ee.RendererSystem,name:"stencil"},Ge.add(Id);class Rd{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Ie("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return Ie("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return Ie("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const r in e)this.plugins[r]=new e[r](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}Rd.extension={type:[Ee.RendererSystem,Ee.CanvasRendererSystem],name:"_plugin"},Ge.add(Rd);class Pd{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Nt,this.transform=null}update(e,r,n,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)}calculateProjection(e,r,n,i){const a=this.projectionMatrix,u=i?-1:1;a.identity(),a.a=1/r.width*2,a.d=u*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-u-r.y*a.d}setTransform(e){}destroy(){this.renderer=null}}Pd.extension={type:Ee.RendererSystem,name:"projection"},Ge.add(Pd);const Xw=new rl;class Md{constructor(e){this.renderer=e,this._tempMatrix=new Nt}generateTexture(e,r){const{region:n,...i}=r||{},a=n||e.getLocalBounds(null,!0);a.width===0&&(a.width=1),a.height===0&&(a.height=1);const u=ya.create({width:a.width,height:a.height,...i});this._tempMatrix.tx=-a.x,this._tempMatrix.ty=-a.y;const l=e.transform;return e.transform=Xw,this.renderer.render(e,{renderTexture:u,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=l,u}destroy(){}}Md.extension={type:[Ee.RendererSystem,Ee.CanvasRendererSystem],name:"textureGenerator"},Ge.add(Md);const On=new je,hs=new je;class Od{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new je,this.destinationFrame=new je,this.viewportFrame=new je}bind(e=null,r,n){const i=this.renderer;this.current=e;let a,u,l;e?(a=e.baseTexture,l=a.resolution,r||(On.width=e.frame.width,On.height=e.frame.height,r=On),n||(hs.x=e.frame.x,hs.y=e.frame.y,hs.width=r.width,hs.height=r.height,n=hs),u=a.framebuffer):(l=i.resolution,r||(On.width=i._view.screen.width,On.height=i._view.screen.height,r=On),n||(n=On,n.width=r.width,n.height=r.height));const f=this.viewportFrame;f.x=n.x*l,f.y=n.y*l,f.width=n.width*l,f.height=n.height*l,e||(f.y=i.view.height-(f.y+f.height)),f.ceil(),this.renderer.framebuffer.bind(u,f),this.renderer.projection.update(n,r,l,!u),e?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(e,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=e?Pt.shared.setValue(e):n,a=this.destinationFrame,u=this.current?this.current.baseTexture:this.renderer._view.screen,l=a.width!==u.width||a.height!==u.height;if(l){let{x:f,y:p,width:v,height:c}=this.viewportFrame;f=Math.round(f),p=Math.round(p),v=Math.round(v),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,p,v,c)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Od.extension={type:Ee.RendererSystem,name:"renderTexture"},Ge.add(Od);class jw{constructor(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Ww(t,e){const r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const a=e.getActiveAttrib(t,i);if(a.name.startsWith("gl_"))continue;const u=ld(e,a.type),l={type:u,name:a.name,size:od(u),location:e.getAttribLocation(t,a.name)};r[a.name]=l}return r}function qw(t,e){const r={},n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const a=e.getActiveUniform(t,i),u=a.name.replace(/\[.*?\]$/,""),l=!!a.name.match(/\[.*?\]$/),f=ld(e,a.type);r[u]={name:u,index:i,type:f,size:a.size,isArray:l,value:id(f,a.size)}}return r}function Yw(t,e){var f;const r=nd(t,t.VERTEX_SHADER,e.vertexSrc),n=nd(t,t.FRAGMENT_SHADER,e.fragmentSrc),i=t.createProgram();t.attachShader(i,r),t.attachShader(i,n);const a=(f=e.extra)==null?void 0:f.transformFeedbackVaryings;if(a&&(typeof t.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(i,a.names,a.bufferMode==="separate"?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)||ww(t,i,r,n),e.attributeData=Ww(i,t),e.uniformData=qw(i,t),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){const p=Object.keys(e.attributeData);p.sort((v,c)=>v>c?1:-1);for(let v=0;v<p.length;v++)e.attributeData[p[v]].location=v,t.bindAttribLocation(i,v,p[v]);t.linkProgram(i)}t.deleteShader(r),t.deleteShader(n);const u={};for(const p in e.uniformData){const v=e.uniformData[p];u[p]={location:t.getUniformLocation(i,p),value:id(v.type,v.size)}}return new jw(i,u)}function Kw(t,e,r,n,i){r.buffer.update(i)}const Zw={float:`
|
|
428
428
|
data[offset] = v;
|
|
429
429
|
`,vec2:`
|
|
430
430
|
data[offset] = v[0];
|
|
@@ -462,7 +462,7 @@ void main(void)
|
|
|
462
462
|
{
|
|
463
463
|
data[offset + i] = v[i];
|
|
464
464
|
}
|
|
465
|
-
`},
|
|
465
|
+
`},Fd={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function Qw(t){const e=t.map(a=>({data:a,offset:0,dataLen:0,dirty:0}));let r=0,n=0,i=0;for(let a=0;a<e.length;a++){const u=e[a];if(r=Fd[u.data.type],u.data.size>1&&(r=Math.max(r,16)*u.data.size),u.dataLen=r,n%r!==0&&n<16){const l=n%r%16;n+=l,i+=l}n+r>16?(i=Math.ceil(i/16)*16,u.offset=i,i+=r,n=r):(u.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:e,size:i}}function Jw(t,e){const r=[];for(const n in t)e[n]&&r.push(e[n]);return r.sort((n,i)=>n.index-i.index),r}function eT(t,e){if(!t.autoManage)return{size:0,syncFunc:Kw};const r=Jw(t.uniforms,e),{uboElements:n,size:i}=Qw(r),a=[`
|
|
466
466
|
var v = null;
|
|
467
467
|
var v2 = null;
|
|
468
468
|
var cv = null;
|
|
@@ -470,7 +470,7 @@ void main(void)
|
|
|
470
470
|
var gl = renderer.gl
|
|
471
471
|
var index = 0;
|
|
472
472
|
var data = buffer.data;
|
|
473
|
-
`];for(let u=0;u<n.length;u++){const l=n[u],f=t.uniforms[l.data.name],p=l.data.name;let v=!1;for(let c=0;c<
|
|
473
|
+
`];for(let u=0;u<n.length;u++){const l=n[u],f=t.uniforms[l.data.name],p=l.data.name;let v=!1;for(let c=0;c<fi.length;c++){const d=fi[c];if(d.codeUbo&&d.test(l.data,f)){a.push(`offset = ${l.offset/4};`,fi[c].codeUbo(l.data.name,f)),v=!0;break}}if(!v)if(l.data.size>1){const c=od(l.data.type),d=Math.max(Fd[l.data.type]/16,1),m=c/d,_=(4-m%4)%4;a.push(`
|
|
474
474
|
cv = ud.${p}.value;
|
|
475
475
|
v = uv.${p};
|
|
476
476
|
offset = ${l.offset/4};
|
|
@@ -486,7 +486,7 @@ void main(void)
|
|
|
486
486
|
offset += ${_};
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
`)}else{const c=
|
|
489
|
+
`)}else{const c=Zw[l.data.type];a.push(`
|
|
490
490
|
cv = ud.${p}.value;
|
|
491
491
|
v = uv.${p};
|
|
492
492
|
offset = ${l.offset/4};
|
|
@@ -494,7 +494,7 @@ void main(void)
|
|
|
494
494
|
`)}}return a.push(`
|
|
495
495
|
renderer.buffer.update(buffer);
|
|
496
496
|
`),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(`
|
|
497
|
-
`))}}let Jw=0;const xa={textureCount:0,uboCount:0};class Fd{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Jw++}systemCheck(){if(!ww())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,r){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const n=e.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(xa.textureCount=0,xa.uboCount=0,this.syncUniformGroup(e.uniformGroup,xa)),i}setUniforms(e){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,e,this.renderer)}syncUniformGroup(e,r){const n=this.getGlProgram();(!e.static||e.dirtyId!==n.uniformDirtyGroups[e.id])&&(n.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,n,r))}syncUniforms(e,r,n){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(r.uniformData,e.uniforms,this.renderer,n)}createSyncGroups(e){const r=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=vw(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[r],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,r){const n=this.getGlProgram();if(!e.static||e.dirtyId!==0||!n.uniformGroups[e.id]){e.dirtyId=0;const i=n.uniformGroups[e.id]||this.createSyncBufferGroup(e,n,r);e.buffer.update(),i(n.uniformData,e.uniforms,this.renderer,xa,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(e,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(e.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const u=this.getSignature(e,this.shader.program.uniformData,"ubo");let l=this._uboCache[u];if(l||(l=this._uboCache[u]=Qw(e,this.shader.program.uniformData)),e.autoManage){const f=new Float32Array(l.size/4);e.buffer.update(f)}return r.uniformGroups[e.id]=l.syncFunc,r.uniformGroups[e.id]}getSignature(e,r,n){const i=e.uniforms,a=[`${n}-`];for(const u in i)a.push(u),r[u]&&a.push(r[u].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const r=this.gl,n=e.program,i=Ww(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Fd.extension={type:Se.RendererSystem,name:"shader"},$e.add(Fd);class ba{constructor(e){this.renderer=e}run(e){const{renderer:r}=this;r.runners.init.emit(r.options),e.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}ba.defaultOptions={hello:!1},ba.extension={type:[Se.RendererSystem,Se.CanvasRendererSystem],name:"startup"},$e.add(ba);function eT(t,e=[]){return e[ce.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.ADD]=[t.ONE,t.ONE],e[ce.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.NONE]=[0,0],e[ce.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[ce.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ce.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[ce.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[ce.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[ce.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[ce.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[ce.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[ce.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[ce.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[ce.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}const tT=0,rT=1,nT=2,iT=3,sT=4,aT=5,ol=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=ce.NONE,this._blendEq=!1,this.map=[],this.map[tT]=this.setBlend,this.map[rT]=this.setOffset,this.map[nT]=this.setCullFace,this.map[iT]=this.setDepthTest,this.map[sT]=this.setFrontFace,this.map[aT]=this.setDepthMask,this.checks=[],this.defaultState=new aa,this.defaultState.blend=!0}contextChange(t){this.gl=t,this.blendModes=eT(t),this.set(this.defaultState),this.reset()}set(t){if(t=t||this.defaultState,this.stateId!==t.data){let e=this.stateId^t.data,r=0;for(;e;)e&1&&this.map[r].call(this,!!(t.data&1<<r)),e=e>>1,r++;this.stateId=t.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,t)}forceState(t){t=t||this.defaultState;for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data}setBlend(t){this.updateCheck(ol.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)}setOffset(t){this.updateCheck(ol.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(t){this.gl.depthMask(t)}setCullFace(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])}setBlendMode(t){if(t===this.blendMode)return;this.blendMode=t;const e=this.blendModes[t],r=this.gl;e.length===2?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(t,e){this.gl.polygonOffset(t,e)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(t,e){const r=this.checks.indexOf(t);e&&r===-1?this.checks.push(t):!e&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(t,e){t.setBlendMode(e.blendMode)}static checkPolygonOffset(t,e){t.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null}};let Nd=ol;Nd.extension={type:Se.RendererSystem,name:"state"},$e.add(Nd);class oT extends $s{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);const r=(e.priority??[]).filter(i=>e.systems[i]),n=[...r,...Object.keys(e.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(e.systems[i],i)}addRunners(...e){e.forEach(r=>{this.runners[r]=new sr(r)})}addSystem(e,r){const n=new e(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(e,r){const n=Object.keys(this._systemsHash);e.items.forEach(i=>{const a=n.find(u=>this._systemsHash[u]===i);i[e.name](r[a])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const wa=class{constructor(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=wa.defaultMaxIdle,this.checkCountMax=wa.defaultCheckCountMax,this.mode=wa.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==tu.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const t=this.renderer.texture,e=t.managedTextures;let r=!1;for(let n=0;n<e.length;n++){const i=e[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<e.length;i++)e[i]!==null&&(e[n++]=e[i]);e.length=n}}unload(t){const e=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&e.destroyTexture(r);for(let n=t.children.length-1;n>=0;n--)this.unload(t.children[n])}destroy(){this.renderer=null}};let lr=wa;lr.defaultMode=tu.AUTO,lr.defaultMaxIdle=60*60,lr.defaultCheckCountMax=60*10,lr.extension={type:Se.RendererSystem,name:"textureGC"},$e.add(lr);class ul{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ne.UNSIGNED_BYTE,this.internalFormat=Z.RGBA,this.samplerType=0}}function uT(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[Ne.UNSIGNED_BYTE]:{[Z.RGBA]:t.RGBA8,[Z.RGB]:t.RGB8,[Z.RG]:t.RG8,[Z.RED]:t.R8,[Z.RGBA_INTEGER]:t.RGBA8UI,[Z.RGB_INTEGER]:t.RGB8UI,[Z.RG_INTEGER]:t.RG8UI,[Z.RED_INTEGER]:t.R8UI,[Z.ALPHA]:t.ALPHA,[Z.LUMINANCE]:t.LUMINANCE,[Z.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ne.BYTE]:{[Z.RGBA]:t.RGBA8_SNORM,[Z.RGB]:t.RGB8_SNORM,[Z.RG]:t.RG8_SNORM,[Z.RED]:t.R8_SNORM,[Z.RGBA_INTEGER]:t.RGBA8I,[Z.RGB_INTEGER]:t.RGB8I,[Z.RG_INTEGER]:t.RG8I,[Z.RED_INTEGER]:t.R8I},[Ne.UNSIGNED_SHORT]:{[Z.RGBA_INTEGER]:t.RGBA16UI,[Z.RGB_INTEGER]:t.RGB16UI,[Z.RG_INTEGER]:t.RG16UI,[Z.RED_INTEGER]:t.R16UI,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT16},[Ne.SHORT]:{[Z.RGBA_INTEGER]:t.RGBA16I,[Z.RGB_INTEGER]:t.RGB16I,[Z.RG_INTEGER]:t.RG16I,[Z.RED_INTEGER]:t.R16I},[Ne.UNSIGNED_INT]:{[Z.RGBA_INTEGER]:t.RGBA32UI,[Z.RGB_INTEGER]:t.RGB32UI,[Z.RG_INTEGER]:t.RG32UI,[Z.RED_INTEGER]:t.R32UI,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT24},[Ne.INT]:{[Z.RGBA_INTEGER]:t.RGBA32I,[Z.RGB_INTEGER]:t.RGB32I,[Z.RG_INTEGER]:t.RG32I,[Z.RED_INTEGER]:t.R32I},[Ne.FLOAT]:{[Z.RGBA]:t.RGBA32F,[Z.RGB]:t.RGB32F,[Z.RG]:t.RG32F,[Z.RED]:t.R32F,[Z.DEPTH_COMPONENT]:t.DEPTH_COMPONENT32F},[Ne.HALF_FLOAT]:{[Z.RGBA]:t.RGBA16F,[Z.RGB]:t.RGB16F,[Z.RG]:t.RG16F,[Z.RED]:t.R16F},[Ne.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:t.RGB565},[Ne.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:t.RGBA4},[Ne.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:t.RGB5_A1},[Ne.UNSIGNED_INT_2_10_10_10_REV]:{[Z.RGBA]:t.RGB10_A2,[Z.RGBA_INTEGER]:t.RGB10_A2UI},[Ne.UNSIGNED_INT_10F_11F_11F_REV]:{[Z.RGB]:t.R11F_G11F_B10F},[Ne.UNSIGNED_INT_5_9_9_9_REV]:{[Z.RGB]:t.RGB9_E5},[Ne.UNSIGNED_INT_24_8]:{[Z.DEPTH_STENCIL]:t.DEPTH24_STENCIL8},[Ne.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Z.DEPTH_STENCIL]:t.DEPTH32F_STENCIL8}}:e={[Ne.UNSIGNED_BYTE]:{[Z.RGBA]:t.RGBA,[Z.RGB]:t.RGB,[Z.ALPHA]:t.ALPHA,[Z.LUMINANCE]:t.LUMINANCE,[Z.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ne.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:t.RGB},[Ne.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:t.RGBA},[Ne.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:t.RGBA}},e}class Ld{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Le,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=uT(e);const r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new ul(e.createTexture());e.bindTexture(e.TEXTURE_2D,n.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=n,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new ul(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(e,r=0){const{gl:n}=this;if(e=e==null?void 0:e.castToBaseTexture(),e!=null&&e.valid&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;const i=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[r]!==e&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(e.target,i.texture)),i.dirtyId!==e.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(e)):i.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[r]=e}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===e&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(e.target,this.emptyTextures[e.target].texture),n[i]=null)}ensureSamplerType(e){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let a=e-1;a>=0;--a){const u=r[a];u&&u._glTextures[i].samplerType!==eu.FLOAT&&this.renderer.texture.unbind(u)}}initTexture(e){const r=new ul(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r}initTextureType(e,r){var n;r.internalFormat=((n=this.internalFormats[e.type])==null?void 0:n[e.format])??e.format,this.webGLVersion===2&&e.type===Ne.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type}updateTexture(e){var i;const r=e._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(e,r),(i=e.resource)!=null&&i.upload(n,e,r))r.samplerType!==eu.FLOAT&&(this.hasIntegerTextures=!0);else{const a=e.realWidth,u=e.realHeight,l=n.gl;(r.width!==a||r.height!==u||r.dirtyId<0)&&(r.width=a,r.height=u,l.texImage2D(e.target,0,r.internalFormat,a,u,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}destroyTexture(e,r){const{gl:n}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(e);i!==-1&&ia(this.managedTextures,i,1)}}updateTextureStyle(e){var n;const r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===_n.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=Vi.CLAMP:r.wrapMode=e.wrapMode,(n=e.resource)!=null&&n.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)}setStyle(e,r){const n=this.gl;if(r.mipmap&&e.mipmap!==_n.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ar.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Ar.LINEAR){const a=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ar.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Ar.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Ld.extension={type:Se.RendererSystem,name:"texture"},$e.add(Ld);class kd{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glTransformFeedbacks[n]||this.createGLTransformFeedback(e);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:r,renderer:n,CONTEXT_UID:i}=this,a=r.createTransformFeedback();e._glTransformFeedbacks[i]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let u=0;u<e.buffers.length;u++){const l=e.buffers[u];l&&(n.buffer.update(l),l._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,u,l._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),a}disposeTransformFeedback(e,r){const n=e._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let u=0;u<e.buffers.length;u++){const l=e.buffers[u];if(!l)continue;const f=l._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&a.dispose(l,r))}n&&(r||i.deleteTransformFeedback(n),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}kd.extension={type:Se.RendererSystem,name:"transformFeedback"},$e.add(kd);class Ta{constructor(e){this.renderer=e}init(e){this.screen=new je(0,0,e.width,e.height),this.element=e.view||be.ADAPTER.createCanvas(),this.resolution=e.resolution||be.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,r){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){var r;e&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Ta.defaultOptions={width:800,height:600,resolution:be.RESOLUTION,autoDensity:!1},Ta.extension={type:[Se.RendererSystem,Se.CanvasRendererSystem],name:"_view"},$e.add(Ta),be.PREFER_ENV=vn.WEBGL2,be.STRICT_TEXTURE_CACHE=!1,be.RENDER_OPTIONS={...ga.defaultOptions,...pa.defaultOptions,...Ta.defaultOptions,...ba.defaultOptions},Object.defineProperties(be,{WRAP_MODE:{get(){return Le.defaultOptions.wrapMode},set(t){Re("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Le.defaultOptions.wrapMode=t}},SCALE_MODE:{get(){return Le.defaultOptions.scaleMode},set(t){Re("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Le.defaultOptions.scaleMode=t}},MIPMAP_TEXTURES:{get(){return Le.defaultOptions.mipmap},set(t){Re("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Le.defaultOptions.mipmap=t}},ANISOTROPIC_LEVEL:{get(){return Le.defaultOptions.anisotropicLevel},set(t){Re("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Le.defaultOptions.anisotropicLevel=t}},FILTER_RESOLUTION:{get(){return Re("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),De.defaultResolution},set(t){De.defaultResolution=t}},FILTER_MULTISAMPLE:{get(){return Re("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),De.defaultMultisample},set(t){De.defaultMultisample=t}},SPRITE_MAX_TEXTURES:{get(){return ur.defaultMaxTextures},set(t){Re("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),ur.defaultMaxTextures=t}},SPRITE_BATCH_SIZE:{get(){return ur.defaultBatchSize},set(t){Re("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),ur.defaultBatchSize=t}},CAN_UPLOAD_SAME_BUFFER:{get(){return ur.canUploadSameBuffer},set(t){Re("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),ur.canUploadSameBuffer=t}},GC_MODE:{get(){return lr.defaultMode},set(t){Re("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),lr.defaultMode=t}},GC_MAX_IDLE:{get(){return lr.defaultMaxIdle},set(t){Re("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),lr.defaultMaxIdle=t}},GC_MAX_CHECK_COUNT:{get(){return lr.defaultCheckCountMax},set(t){Re("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),lr.defaultCheckCountMax=t}},PRECISION_VERTEX:{get(){return Br.defaultVertexPrecision},set(t){Re("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Br.defaultVertexPrecision=t}},PRECISION_FRAGMENT:{get(){return Br.defaultFragmentPrecision},set(t){Re("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Br.defaultFragmentPrecision=t}}});var Aa=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(Aa||{});class ll{constructor(e,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=r,this.priority=n,this.once=i}match(e,r=null){return this.fn===e&&this.context===r}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=e?null:r,this.previous=null,r}}const $t=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new ll(null,null,1/0),this.deltaMS=1/$t.targetFPMS,this.elapsedMS=1/$t.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,e,r=Aa.NORMAL){return this._addListener(new ll(t,e,r))}addOnce(t,e,r=Aa.NORMAL){return this._addListener(new ll(t,e,r,!0))}_addListener(t){let e=this._head.next,r=this._head;if(!e)t.connect(r);else{for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}return this._startIfPossible(),this}remove(t,e){let r=this._head.next;for(;r;)r.match(t,e)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){const i=t-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=t-i%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*$t.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,$t.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){if(t===0)this._minElapsedMS=0;else{const e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!$t._shared){const t=$t._shared=new $t;t.autoStart=!0,t._protected=!0}return $t._shared}static get system(){if(!$t._system){const t=$t._system=new $t;t.autoStart=!0,t._protected=!0}return $t._system}};let cr=$t;cr.targetFPMS=.06,Object.defineProperties(be,{TARGET_FPMS:{get(){return cr.targetFPMS},set(t){Re("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),cr.targetFPMS=t}}});class Bd{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Aa.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?cr.shared:new cr,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Bd.extension=Se.Application,$e.add(Bd);const lT=[];$e.handleByList(Se.Renderer,lT);class Dd{constructor(e){this.renderer=e}contextChange(e){let r;if(this.renderer.context.webGLVersion===1){const n=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,n)}else{const n=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,n)}r>=ft.HIGH?this.multisample=ft.HIGH:r>=ft.MEDIUM?this.multisample=ft.MEDIUM:r>=ft.LOW?this.multisample=ft.LOW:this.multisample=ft.NONE}destroy(){}}Dd.extension={type:Se.RendererSystem,name:"_multisample"},$e.add(Dd);class cT{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Ud{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);r.bindBuffer(e.type,i.buffer)}unbind(e){const{gl:r}=this;r.bindBuffer(e,null)}bindBufferBase(e,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==e){const a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[r]=e,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(e,r,n){const{gl:i,CONTEXT_UID:a}=this;n=n||0;const u=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,u.buffer,n*256,256)}update(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);if(e._updateID!==i.updateID)if(i.updateID=e._updateID,r.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)r.bufferSubData(e.type,0,e.data);else{const a=e.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,r.bufferData(e.type,e.data,a)}}dispose(e,r){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],e)}createGLBuffer(e){const{CONTEXT_UID:r,gl:n}=this;return e._glBuffers[r]=new cT(n.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[r]}}Ud.extension={type:Se.RendererSystem,name:"buffer"},$e.add(Ud);class $d{constructor(e){this.renderer=e}render(e,r){const n=this.renderer;let i,a,u,l;if(r&&(i=r.renderTexture,a=r.clear,u=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=u,!n.context.isLost){if(i||(this.lastObjectRendered=e),!l){const f=e.enableTempParent();e.updateTransform(),e.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),e.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}$d.extension={type:Se.RendererSystem,name:"objectRenderer"},$e.add($d);const cl=class extends oT{constructor(t){super(),this.type=Fh.WEBGL,t=Object.assign({},be.RENDER_OPTIONS,t),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new ar({projectionMatrix:new Mt},!0);const e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:cl.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in t&&(Re("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),t.premultipliedAlpha=t.useContextAlpha&&t.useContextAlpha!=="notMultiplied",t.backgroundAlpha=t.useContextAlpha===!1?1:t.backgroundAlpha),this._plugin.rendererPlugins=cl.__plugins,this.options=t,this.startup.run(this.options)}static test(t){return t!=null&&t.forceCanvas?!1:$b()}render(t,e){this.objectRenderer.render(t,e)}resize(t,e){this._view.resizeView(t,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(t=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:t}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(t){this._view.resolution=t,this.runners.resolutionChange.emit(t)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Re("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Re("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Re("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Re("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(t){Re("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=t}get backgroundAlpha(){return Re("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(t){Re("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=t}get powerPreference(){return Re("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(t,e){return this.textureGenerator.generateTexture(t,e)}};let fi=cl;fi.extension={type:Se.Renderer,priority:1},fi.__plugins={},fi.__systems={},$e.handleByMap(Se.RendererPlugin,fi.__plugins),$e.handleByMap(Se.RendererSystem,fi.__systems),$e.add(fi);class Gd extends ts{constructor(e,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let a=0;a<e;a++){const u=new Le;this.items.push(u),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,r){for(let n=0;n<this.length;n++)e[n]&&(e[n].castToBaseTexture?this.addBaseTextureAt(e[n].castToBaseTexture(),n):e[n]instanceof ts?this.addResourceAt(e[n],n):this.addResourceAt(Zf(e[n],r),n))}dispose(){for(let e=0,r=this.length;e<r;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[r].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)}unbind(e){super.unbind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class hT extends Gd{constructor(e,r){const{width:n,height:i}=r||{};let a,u;Array.isArray(e)?(a=e,u=e.length):u=e,super(u,{width:n,height:i}),a&&this.initFromArray(a,r)}addBaseTextureAt(e,r){if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=qn.TEXTURE_2D_ARRAY}upload(e,r,n){const{length:i,itemDirtyIds:a,items:u}=this,{gl:l}=e;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const p=u[f];a[f]<p.dirtyId&&(a[f]=p.dirtyId,p.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,f,p.resource.width,p.resource.height,1,r.format,n.type,p.resource.source))}return!0}}class fT extends rn{constructor(e){super(e)}static test(e){const{OffscreenCanvas:r}=globalThis;return r&&e instanceof r?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}}const us=class extends Gd{constructor(t,e){const{width:r,height:n,autoLoad:i,linkBaseTexture:a}=e||{};if(t&&t.length!==us.SIDES)throw new Error(`Invalid length. Got ${t.length}, expected 6`);super(6,{width:r,height:n});for(let u=0;u<us.SIDES;u++)this.items[u].target=qn.TEXTURE_CUBE_MAP_POSITIVE_X+u;this.linkBaseTexture=a!==!1,t&&this.initFromArray(t,e),i!==!1&&this.load()}bind(t){super.bind(t),t.target=qn.TEXTURE_CUBE_MAP}addBaseTextureAt(t,e,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[e])throw new Error(`Index ${e} is out of bounds`);if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0)if(t.resource)this.addResourceAt(t.resource,e);else throw new Error("CubeResource does not support copying of renderTexture.");else t.target=qn.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this}upload(t,e,r){const n=this.itemDirtyIds;for(let i=0;i<us.SIDES;i++){const a=this.items[i];(n[i]<a.dirtyId||r.dirtyId<e.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(t,a,r),n[i]=a.dirtyId):n[i]<-1&&(t.gl.texImage2D(a.target,0,r.internalFormat,e.realWidth,e.realHeight,0,e.format,r.type,null),n[i]=-1))}return!0}static test(t){return Array.isArray(t)&&t.length===us.SIDES}};let zd=us;zd.SIDES=6;class di extends rn{constructor(e,r){r=r||{};let n,i;typeof e=="string"?(n=di.EMPTY,i=e):(n=e,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,r)=>{if(this.url===null){e(this);return}try{const n=await be.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Zr.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),e(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(e,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(e,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return di._EMPTY=di._EMPTY??be.ADAPTER.createCanvas(0,0),di._EMPTY}}const Sa=class extends rn{constructor(t,e){e=e||{},super(be.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=t,this.scale=e.scale||1,this._overrideWidth=e.width,this._overrideHeight=e.height,this._resolve=null,this._crossorigin=e.crossorigin,this._load=null,e.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(t=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),t(this)},Sa.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const t=new Image;rn.crossOrigin(t,this.svg,this._crossorigin),t.src=this.svg,t.onerror=e=>{this._resolve&&(t.onerror=null,this.onError.emit(e))},t.onload=()=>{if(!this._resolve)return;const e=t.width,r=t.height;if(!e||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=e*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*e,i=this._overrideHeight||this._overrideWidth/e*r),n=Math.round(n),i=Math.round(i);const a=this.source;a.width=n,a.height=i,a._pixiId=`canvas_${es()}`,a.getContext("2d").drawImage(t,0,0,e,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(t){const e=Sa.SVG_SIZE.exec(t),r={};return e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(t,e){return e==="svg"||typeof t=="string"&&t.startsWith("data:image/svg+xml")||typeof t=="string"&&Sa.SVG_XML.test(t)}};let hl=Sa;hl.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,hl.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const fl=class extends rn{constructor(t,e){if(e=e||{},!(t instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof t=="string"&&(t=[t]);const n=t[0].src||t[0];rn.crossOrigin(r,n,e.crossorigin);for(let i=0;i<t.length;++i){const a=document.createElement("source");let{src:u,mime:l}=t[i];u=u||t[i];const f=u.split("?").shift().toLowerCase(),p=f.slice(f.lastIndexOf(".")+1);l=l||fl.MIME_TYPES[p]||`video/${p}`,a.src=u,a.type=l,r.appendChild(a)}t=r}super(t),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),e.autoLoad!==!1&&this.load()}update(t=0){if(!this.destroyed){const e=cr.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const t=this.source;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("error",this._onError,!0)),this._load=new Promise(e=>{this.valid?e(this):(this._resolve=e,t.load())}),this._load}_onError(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)}_isSourcePlaying(){const t=this.source;return!t.paused&&!t.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(cr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(cr.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);const e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()}dispose(){this._isConnectedToTicker&&(cr.shared.remove(this.update,this),this._isConnectedToTicker=!1);const t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(cr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(cr.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t)}static test(t,e){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement||fl.TYPES.includes(e)}};let dl=fl;dl.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],dl.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Yu.push(di,pd,fT,dl,hl,Ku,zd,hT);var dT=`attribute vec2 aVertexPosition;
|
|
497
|
+
`))}}let tT=0;const wa={textureCount:0,uboCount:0};class Nd{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=tT++}systemCheck(){if(!Aw())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,r){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const n=e.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(wa.textureCount=0,wa.uboCount=0,this.syncUniformGroup(e.uniformGroup,wa)),i}setUniforms(e){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,e,this.renderer)}syncUniformGroup(e,r){const n=this.getGlProgram();(!e.static||e.dirtyId!==n.uniformDirtyGroups[e.id])&&(n.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,n,r))}syncUniforms(e,r,n){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(r.uniformData,e.uniforms,this.renderer,n)}createSyncGroups(e){const r=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=yw(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[r],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,r){const n=this.getGlProgram();if(!e.static||e.dirtyId!==0||!n.uniformGroups[e.id]){e.dirtyId=0;const i=n.uniformGroups[e.id]||this.createSyncBufferGroup(e,n,r);e.buffer.update(),i(n.uniformData,e.uniforms,this.renderer,wa,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(e,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(e.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const u=this.getSignature(e,this.shader.program.uniformData,"ubo");let l=this._uboCache[u];if(l||(l=this._uboCache[u]=eT(e,this.shader.program.uniformData)),e.autoManage){const f=new Float32Array(l.size/4);e.buffer.update(f)}return r.uniformGroups[e.id]=l.syncFunc,r.uniformGroups[e.id]}getSignature(e,r,n){const i=e.uniforms,a=[`${n}-`];for(const u in i)a.push(u),r[u]&&a.push(r[u].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const r=this.gl,n=e.program,i=Yw(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Nd.extension={type:Ee.RendererSystem,name:"shader"},Ge.add(Nd);class Ta{constructor(e){this.renderer=e}run(e){const{renderer:r}=this;r.runners.init.emit(r.options),e.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Ta.defaultOptions={hello:!1},Ta.extension={type:[Ee.RendererSystem,Ee.CanvasRendererSystem],name:"startup"},Ge.add(Ta);function rT(t,e=[]){return e[ue.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.ADD]=[t.ONE,t.ONE],e[ue.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.NONE]=[0,0],e[ue.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[ue.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[ue.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[ue.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[ue.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[ue.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[ue.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[ue.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[ue.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[ue.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[ue.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}const nT=0,iT=1,sT=2,aT=3,oT=4,uT=5,ul=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=ue.NONE,this._blendEq=!1,this.map=[],this.map[nT]=this.setBlend,this.map[iT]=this.setOffset,this.map[sT]=this.setCullFace,this.map[aT]=this.setDepthTest,this.map[oT]=this.setFrontFace,this.map[uT]=this.setDepthMask,this.checks=[],this.defaultState=new ua,this.defaultState.blend=!0}contextChange(t){this.gl=t,this.blendModes=rT(t),this.set(this.defaultState),this.reset()}set(t){if(t=t||this.defaultState,this.stateId!==t.data){let e=this.stateId^t.data,r=0;for(;e;)e&1&&this.map[r].call(this,!!(t.data&1<<r)),e=e>>1,r++;this.stateId=t.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,t)}forceState(t){t=t||this.defaultState;for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data}setBlend(t){this.updateCheck(ul.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)}setOffset(t){this.updateCheck(ul.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(t){this.gl.depthMask(t)}setCullFace(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])}setBlendMode(t){if(t===this.blendMode)return;this.blendMode=t;const e=this.blendModes[t],r=this.gl;e.length===2?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(t,e){this.gl.polygonOffset(t,e)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(t,e){const r=this.checks.indexOf(t);e&&r===-1?this.checks.push(t):!e&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(t,e){t.setBlendMode(e.blendMode)}static checkPolygonOffset(t,e){t.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null}};let Ld=ul;Ld.extension={type:Ee.RendererSystem,name:"state"},Ge.add(Ld);class lT extends zs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);const r=(e.priority??[]).filter(i=>e.systems[i]),n=[...r,...Object.keys(e.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(e.systems[i],i)}addRunners(...e){e.forEach(r=>{this.runners[r]=new hr(r)})}addSystem(e,r){const n=new e(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(e,r){const n=Object.keys(this._systemsHash);e.items.forEach(i=>{const a=n.find(u=>this._systemsHash[u]===i);i[e.name](r[a])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const Aa=class{constructor(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=Aa.defaultMaxIdle,this.checkCountMax=Aa.defaultCheckCountMax,this.mode=Aa.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==ru.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const t=this.renderer.texture,e=t.managedTextures;let r=!1;for(let n=0;n<e.length;n++){const i=e[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<e.length;i++)e[i]!==null&&(e[n++]=e[i]);e.length=n}}unload(t){const e=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&e.destroyTexture(r);for(let n=t.children.length-1;n>=0;n--)this.unload(t.children[n])}destroy(){this.renderer=null}};let gr=Aa;gr.defaultMode=ru.AUTO,gr.defaultMaxIdle=60*60,gr.defaultCheckCountMax=60*10,gr.extension={type:Ee.RendererSystem,name:"textureGC"},Ge.add(gr);class ll{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ne.UNSIGNED_BYTE,this.internalFormat=K.RGBA,this.samplerType=0}}function cT(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[Ne.UNSIGNED_BYTE]:{[K.RGBA]:t.RGBA8,[K.RGB]:t.RGB8,[K.RG]:t.RG8,[K.RED]:t.R8,[K.RGBA_INTEGER]:t.RGBA8UI,[K.RGB_INTEGER]:t.RGB8UI,[K.RG_INTEGER]:t.RG8UI,[K.RED_INTEGER]:t.R8UI,[K.ALPHA]:t.ALPHA,[K.LUMINANCE]:t.LUMINANCE,[K.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ne.BYTE]:{[K.RGBA]:t.RGBA8_SNORM,[K.RGB]:t.RGB8_SNORM,[K.RG]:t.RG8_SNORM,[K.RED]:t.R8_SNORM,[K.RGBA_INTEGER]:t.RGBA8I,[K.RGB_INTEGER]:t.RGB8I,[K.RG_INTEGER]:t.RG8I,[K.RED_INTEGER]:t.R8I},[Ne.UNSIGNED_SHORT]:{[K.RGBA_INTEGER]:t.RGBA16UI,[K.RGB_INTEGER]:t.RGB16UI,[K.RG_INTEGER]:t.RG16UI,[K.RED_INTEGER]:t.R16UI,[K.DEPTH_COMPONENT]:t.DEPTH_COMPONENT16},[Ne.SHORT]:{[K.RGBA_INTEGER]:t.RGBA16I,[K.RGB_INTEGER]:t.RGB16I,[K.RG_INTEGER]:t.RG16I,[K.RED_INTEGER]:t.R16I},[Ne.UNSIGNED_INT]:{[K.RGBA_INTEGER]:t.RGBA32UI,[K.RGB_INTEGER]:t.RGB32UI,[K.RG_INTEGER]:t.RG32UI,[K.RED_INTEGER]:t.R32UI,[K.DEPTH_COMPONENT]:t.DEPTH_COMPONENT24},[Ne.INT]:{[K.RGBA_INTEGER]:t.RGBA32I,[K.RGB_INTEGER]:t.RGB32I,[K.RG_INTEGER]:t.RG32I,[K.RED_INTEGER]:t.R32I},[Ne.FLOAT]:{[K.RGBA]:t.RGBA32F,[K.RGB]:t.RGB32F,[K.RG]:t.RG32F,[K.RED]:t.R32F,[K.DEPTH_COMPONENT]:t.DEPTH_COMPONENT32F},[Ne.HALF_FLOAT]:{[K.RGBA]:t.RGBA16F,[K.RGB]:t.RGB16F,[K.RG]:t.RG16F,[K.RED]:t.R16F},[Ne.UNSIGNED_SHORT_5_6_5]:{[K.RGB]:t.RGB565},[Ne.UNSIGNED_SHORT_4_4_4_4]:{[K.RGBA]:t.RGBA4},[Ne.UNSIGNED_SHORT_5_5_5_1]:{[K.RGBA]:t.RGB5_A1},[Ne.UNSIGNED_INT_2_10_10_10_REV]:{[K.RGBA]:t.RGB10_A2,[K.RGBA_INTEGER]:t.RGB10_A2UI},[Ne.UNSIGNED_INT_10F_11F_11F_REV]:{[K.RGB]:t.R11F_G11F_B10F},[Ne.UNSIGNED_INT_5_9_9_9_REV]:{[K.RGB]:t.RGB9_E5},[Ne.UNSIGNED_INT_24_8]:{[K.DEPTH_STENCIL]:t.DEPTH24_STENCIL8},[Ne.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[K.DEPTH_STENCIL]:t.DEPTH32F_STENCIL8}}:e={[Ne.UNSIGNED_BYTE]:{[K.RGBA]:t.RGBA,[K.RGB]:t.RGB,[K.ALPHA]:t.ALPHA,[K.LUMINANCE]:t.LUMINANCE,[K.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ne.UNSIGNED_SHORT_5_6_5]:{[K.RGB]:t.RGB},[Ne.UNSIGNED_SHORT_4_4_4_4]:{[K.RGBA]:t.RGBA},[Ne.UNSIGNED_SHORT_5_5_5_1]:{[K.RGBA]:t.RGBA}},e}class kd{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Le,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=cT(e);const r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new ll(e.createTexture());e.bindTexture(e.TEXTURE_2D,n.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=n,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new ll(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(e,r=0){const{gl:n}=this;if(e=e==null?void 0:e.castToBaseTexture(),e!=null&&e.valid&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;const i=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[r]!==e&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(e.target,i.texture)),i.dirtyId!==e.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(e)):i.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[r]=e}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===e&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(e.target,this.emptyTextures[e.target].texture),n[i]=null)}ensureSamplerType(e){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let a=e-1;a>=0;--a){const u=r[a];u&&u._glTextures[i].samplerType!==tu.FLOAT&&this.renderer.texture.unbind(u)}}initTexture(e){const r=new ll(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r}initTextureType(e,r){var n;r.internalFormat=((n=this.internalFormats[e.type])==null?void 0:n[e.format])??e.format,this.webGLVersion===2&&e.type===Ne.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type}updateTexture(e){var i;const r=e._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(e,r),(i=e.resource)!=null&&i.upload(n,e,r))r.samplerType!==tu.FLOAT&&(this.hasIntegerTextures=!0);else{const a=e.realWidth,u=e.realHeight,l=n.gl;(r.width!==a||r.height!==u||r.dirtyId<0)&&(r.width=a,r.height=u,l.texImage2D(e.target,0,r.internalFormat,a,u,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}destroyTexture(e,r){const{gl:n}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(e);i!==-1&&aa(this.managedTextures,i,1)}}updateTextureStyle(e){var n;const r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===bn.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=qi.CLAMP:r.wrapMode=e.wrapMode,(n=e.resource)!=null&&n.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)}setStyle(e,r){const n=this.gl;if(r.mipmap&&e.mipmap!==bn.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Ir.LINEAR){const a=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}kd.extension={type:Ee.RendererSystem,name:"texture"},Ge.add(kd);class Bd{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glTransformFeedbacks[n]||this.createGLTransformFeedback(e);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:r,renderer:n,CONTEXT_UID:i}=this,a=r.createTransformFeedback();e._glTransformFeedbacks[i]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let u=0;u<e.buffers.length;u++){const l=e.buffers[u];l&&(n.buffer.update(l),l._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,u,l._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),a}disposeTransformFeedback(e,r){const n=e._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let u=0;u<e.buffers.length;u++){const l=e.buffers[u];if(!l)continue;const f=l._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&a.dispose(l,r))}n&&(r||i.deleteTransformFeedback(n),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Bd.extension={type:Ee.RendererSystem,name:"transformFeedback"},Ge.add(Bd);class Sa{constructor(e){this.renderer=e}init(e){this.screen=new je(0,0,e.width,e.height),this.element=e.view||_e.ADAPTER.createCanvas(),this.resolution=e.resolution||_e.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,r){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){var r;e&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Sa.defaultOptions={width:800,height:600,resolution:_e.RESOLUTION,autoDensity:!1},Sa.extension={type:[Ee.RendererSystem,Ee.CanvasRendererSystem],name:"_view"},Ge.add(Sa),_e.PREFER_ENV=xn.WEBGL2,_e.STRICT_TEXTURE_CACHE=!1,_e.RENDER_OPTIONS={...va.defaultOptions,...ma.defaultOptions,...Sa.defaultOptions,...Ta.defaultOptions},Object.defineProperties(_e,{WRAP_MODE:{get(){return Le.defaultOptions.wrapMode},set(t){Ie("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Le.defaultOptions.wrapMode=t}},SCALE_MODE:{get(){return Le.defaultOptions.scaleMode},set(t){Ie("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Le.defaultOptions.scaleMode=t}},MIPMAP_TEXTURES:{get(){return Le.defaultOptions.mipmap},set(t){Ie("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Le.defaultOptions.mipmap=t}},ANISOTROPIC_LEVEL:{get(){return Le.defaultOptions.anisotropicLevel},set(t){Ie("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Le.defaultOptions.anisotropicLevel=t}},FILTER_RESOLUTION:{get(){return Ie("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Be.defaultResolution},set(t){Be.defaultResolution=t}},FILTER_MULTISAMPLE:{get(){return Ie("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Be.defaultMultisample},set(t){Be.defaultMultisample=t}},SPRITE_MAX_TEXTURES:{get(){return pr.defaultMaxTextures},set(t){Ie("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),pr.defaultMaxTextures=t}},SPRITE_BATCH_SIZE:{get(){return pr.defaultBatchSize},set(t){Ie("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),pr.defaultBatchSize=t}},CAN_UPLOAD_SAME_BUFFER:{get(){return pr.canUploadSameBuffer},set(t){Ie("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),pr.canUploadSameBuffer=t}},GC_MODE:{get(){return gr.defaultMode},set(t){Ie("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),gr.defaultMode=t}},GC_MAX_IDLE:{get(){return gr.defaultMaxIdle},set(t){Ie("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),gr.defaultMaxIdle=t}},GC_MAX_CHECK_COUNT:{get(){return gr.defaultCheckCountMax},set(t){Ie("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),gr.defaultCheckCountMax=t}},PRECISION_VERTEX:{get(){return $r.defaultVertexPrecision},set(t){Ie("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),$r.defaultVertexPrecision=t}},PRECISION_FRAGMENT:{get(){return $r.defaultFragmentPrecision},set(t){Ie("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),$r.defaultFragmentPrecision=t}}});var Ea=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(Ea||{});class cl{constructor(e,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=r,this.priority=n,this.once=i}match(e,r=null){return this.fn===e&&this.context===r}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=e?null:r,this.previous=null,r}}const Xt=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new cl(null,null,1/0),this.deltaMS=1/Xt.targetFPMS,this.elapsedMS=1/Xt.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,e,r=Ea.NORMAL){return this._addListener(new cl(t,e,r))}addOnce(t,e,r=Ea.NORMAL){return this._addListener(new cl(t,e,r,!0))}_addListener(t){let e=this._head.next,r=this._head;if(!e)t.connect(r);else{for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}return this._startIfPossible(),this}remove(t,e){let r=this._head.next;for(;r;)r.match(t,e)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){const i=t-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=t-i%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*Xt.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,Xt.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){if(t===0)this._minElapsedMS=0;else{const e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!Xt._shared){const t=Xt._shared=new Xt;t.autoStart=!0,t._protected=!0}return Xt._shared}static get system(){if(!Xt._system){const t=Xt._system=new Xt;t.autoStart=!0,t._protected=!0}return Xt._system}};let mr=Xt;mr.targetFPMS=.06,Object.defineProperties(_e,{TARGET_FPMS:{get(){return mr.targetFPMS},set(t){Ie("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),mr.targetFPMS=t}}});class Dd{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Ea.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?mr.shared:new mr,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Dd.extension=Ee.Application,Ge.add(Dd);const hT=[];Ge.handleByList(Ee.Renderer,hT);class Ud{constructor(e){this.renderer=e}contextChange(e){let r;if(this.renderer.context.webGLVersion===1){const n=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,n)}else{const n=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,n)}r>=pt.HIGH?this.multisample=pt.HIGH:r>=pt.MEDIUM?this.multisample=pt.MEDIUM:r>=pt.LOW?this.multisample=pt.LOW:this.multisample=pt.NONE}destroy(){}}Ud.extension={type:Ee.RendererSystem,name:"_multisample"},Ge.add(Ud);class fT{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class $d{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);r.bindBuffer(e.type,i.buffer)}unbind(e){const{gl:r}=this;r.bindBuffer(e,null)}bindBufferBase(e,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==e){const a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[r]=e,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(e,r,n){const{gl:i,CONTEXT_UID:a}=this;n=n||0;const u=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,u.buffer,n*256,256)}update(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);if(e._updateID!==i.updateID)if(i.updateID=e._updateID,r.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)r.bufferSubData(e.type,0,e.data);else{const a=e.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,r.bufferData(e.type,e.data,a)}}dispose(e,r){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],e)}createGLBuffer(e){const{CONTEXT_UID:r,gl:n}=this;return e._glBuffers[r]=new fT(n.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[r]}}$d.extension={type:Ee.RendererSystem,name:"buffer"},Ge.add($d);class Gd{constructor(e){this.renderer=e}render(e,r){const n=this.renderer;let i,a,u,l;if(r&&(i=r.renderTexture,a=r.clear,u=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=u,!n.context.isLost){if(i||(this.lastObjectRendered=e),!l){const f=e.enableTempParent();e.updateTransform(),e.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),e.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}Gd.extension={type:Ee.RendererSystem,name:"objectRenderer"},Ge.add(Gd);const hl=class extends lT{constructor(t){super(),this.type=Nh.WEBGL,t=Object.assign({},_e.RENDER_OPTIONS,t),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new fr({projectionMatrix:new Nt},!0);const e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:hl.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in t&&(Ie("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),t.premultipliedAlpha=t.useContextAlpha&&t.useContextAlpha!=="notMultiplied",t.backgroundAlpha=t.useContextAlpha===!1?1:t.backgroundAlpha),this._plugin.rendererPlugins=hl.__plugins,this.options=t,this.startup.run(this.options)}static test(t){return t!=null&&t.forceCanvas?!1:zb()}render(t,e){this.objectRenderer.render(t,e)}resize(t,e){this._view.resizeView(t,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(t=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:t}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(t){this._view.resolution=t,this.runners.resolutionChange.emit(t)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Ie("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Ie("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Ie("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Ie("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(t){Ie("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=t}get backgroundAlpha(){return Ie("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(t){Ie("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=t}get powerPreference(){return Ie("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(t,e){return this.textureGenerator.generateTexture(t,e)}};let gi=hl;gi.extension={type:Ee.Renderer,priority:1},gi.__plugins={},gi.__systems={},Ge.handleByMap(Ee.RendererPlugin,gi.__plugins),Ge.handleByMap(Ee.RendererSystem,gi.__systems),Ge.add(gi);class zd extends ss{constructor(e,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let a=0;a<e;a++){const u=new Le;this.items.push(u),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,r){for(let n=0;n<this.length;n++)e[n]&&(e[n].castToBaseTexture?this.addBaseTextureAt(e[n].castToBaseTexture(),n):e[n]instanceof ss?this.addResourceAt(e[n],n):this.addResourceAt(Qf(e[n],r),n))}dispose(){for(let e=0,r=this.length;e<r;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[r].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)}unbind(e){super.unbind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class dT extends zd{constructor(e,r){const{width:n,height:i}=r||{};let a,u;Array.isArray(e)?(a=e,u=e.length):u=e,super(u,{width:n,height:i}),a&&this.initFromArray(a,r)}addBaseTextureAt(e,r){if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=Zn.TEXTURE_2D_ARRAY}upload(e,r,n){const{length:i,itemDirtyIds:a,items:u}=this,{gl:l}=e;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const p=u[f];a[f]<p.dirtyId&&(a[f]=p.dirtyId,p.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,f,p.resource.width,p.resource.height,1,r.format,n.type,p.resource.source))}return!0}}class pT extends an{constructor(e){super(e)}static test(e){const{OffscreenCanvas:r}=globalThis;return r&&e instanceof r?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}}const fs=class extends zd{constructor(t,e){const{width:r,height:n,autoLoad:i,linkBaseTexture:a}=e||{};if(t&&t.length!==fs.SIDES)throw new Error(`Invalid length. Got ${t.length}, expected 6`);super(6,{width:r,height:n});for(let u=0;u<fs.SIDES;u++)this.items[u].target=Zn.TEXTURE_CUBE_MAP_POSITIVE_X+u;this.linkBaseTexture=a!==!1,t&&this.initFromArray(t,e),i!==!1&&this.load()}bind(t){super.bind(t),t.target=Zn.TEXTURE_CUBE_MAP}addBaseTextureAt(t,e,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[e])throw new Error(`Index ${e} is out of bounds`);if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0)if(t.resource)this.addResourceAt(t.resource,e);else throw new Error("CubeResource does not support copying of renderTexture.");else t.target=Zn.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this}upload(t,e,r){const n=this.itemDirtyIds;for(let i=0;i<fs.SIDES;i++){const a=this.items[i];(n[i]<a.dirtyId||r.dirtyId<e.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(t,a,r),n[i]=a.dirtyId):n[i]<-1&&(t.gl.texImage2D(a.target,0,r.internalFormat,e.realWidth,e.realHeight,0,e.format,r.type,null),n[i]=-1))}return!0}static test(t){return Array.isArray(t)&&t.length===fs.SIDES}};let Hd=fs;Hd.SIDES=6;class mi extends an{constructor(e,r){r=r||{};let n,i;typeof e=="string"?(n=mi.EMPTY,i=e):(n=e,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,r)=>{if(this.url===null){e(this);return}try{const n=await _e.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===en.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),e(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(e,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(e,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return mi._EMPTY=mi._EMPTY??_e.ADAPTER.createCanvas(0,0),mi._EMPTY}}const Ca=class extends an{constructor(t,e){e=e||{},super(_e.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=t,this.scale=e.scale||1,this._overrideWidth=e.width,this._overrideHeight=e.height,this._resolve=null,this._crossorigin=e.crossorigin,this._load=null,e.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(t=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),t(this)},Ca.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const t=new Image;an.crossOrigin(t,this.svg,this._crossorigin),t.src=this.svg,t.onerror=e=>{this._resolve&&(t.onerror=null,this.onError.emit(e))},t.onload=()=>{if(!this._resolve)return;const e=t.width,r=t.height;if(!e||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=e*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*e,i=this._overrideHeight||this._overrideWidth/e*r),n=Math.round(n),i=Math.round(i);const a=this.source;a.width=n,a.height=i,a._pixiId=`canvas_${is()}`,a.getContext("2d").drawImage(t,0,0,e,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(t){const e=Ca.SVG_SIZE.exec(t),r={};return e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(t,e){return e==="svg"||typeof t=="string"&&t.startsWith("data:image/svg+xml")||typeof t=="string"&&Ca.SVG_XML.test(t)}};let fl=Ca;fl.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,fl.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const dl=class extends an{constructor(t,e){if(e=e||{},!(t instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof t=="string"&&(t=[t]);const n=t[0].src||t[0];an.crossOrigin(r,n,e.crossorigin);for(let i=0;i<t.length;++i){const a=document.createElement("source");let{src:u,mime:l}=t[i];u=u||t[i];const f=u.split("?").shift().toLowerCase(),p=f.slice(f.lastIndexOf(".")+1);l=l||dl.MIME_TYPES[p]||`video/${p}`,a.src=u,a.type=l,r.appendChild(a)}t=r}super(t),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),e.autoLoad!==!1&&this.load()}update(t=0){if(!this.destroyed){const e=mr.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const t=this.source;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("error",this._onError,!0)),this._load=new Promise(e=>{this.valid?e(this):(this._resolve=e,t.load())}),this._load}_onError(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)}_isSourcePlaying(){const t=this.source;return!t.paused&&!t.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(mr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(mr.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);const e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()}dispose(){this._isConnectedToTicker&&(mr.shared.remove(this.update,this),this._isConnectedToTicker=!1);const t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(mr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(mr.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t)}static test(t,e){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement||dl.TYPES.includes(e)}};let pl=dl;pl.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],pl.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Ku.push(mi,gd,pT,pl,fl,Zu,Hd,dT);var gT=`attribute vec2 aVertexPosition;
|
|
498
498
|
attribute vec2 aTextureCoord;
|
|
499
499
|
|
|
500
500
|
uniform mat3 projectionMatrix;
|
|
@@ -505,7 +505,7 @@ void main(void)
|
|
|
505
505
|
{
|
|
506
506
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
507
507
|
vTextureCoord = aTextureCoord;
|
|
508
|
-
}`,
|
|
508
|
+
}`,mT=`varying vec2 vTextureCoord;
|
|
509
509
|
uniform sampler2D uSampler;
|
|
510
510
|
|
|
511
511
|
uniform float gamma;
|
|
@@ -536,7 +536,7 @@ void main(void)
|
|
|
536
536
|
|
|
537
537
|
gl_FragColor = c * alpha;
|
|
538
538
|
}
|
|
539
|
-
`;let
|
|
539
|
+
`;let vT=class extends Be{constructor(e){super(gT,mT),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,e)}apply(e,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,n,i)}};var _T=`attribute vec2 aVertexPosition;
|
|
540
540
|
attribute vec2 aTextureCoord;
|
|
541
541
|
|
|
542
542
|
uniform mat3 projectionMatrix;
|
|
@@ -547,7 +547,7 @@ void main(void)
|
|
|
547
547
|
{
|
|
548
548
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
549
549
|
vTextureCoord = aTextureCoord;
|
|
550
|
-
}`,
|
|
550
|
+
}`,yT=`
|
|
551
551
|
varying vec2 vTextureCoord;
|
|
552
552
|
uniform sampler2D uSampler;
|
|
553
553
|
|
|
@@ -573,7 +573,7 @@ void main(void)
|
|
|
573
573
|
color *= 0.25;
|
|
574
574
|
|
|
575
575
|
gl_FragColor = color;
|
|
576
|
-
}`,
|
|
576
|
+
}`,xT=`
|
|
577
577
|
varying vec2 vTextureCoord;
|
|
578
578
|
uniform sampler2D uSampler;
|
|
579
579
|
|
|
@@ -601,7 +601,7 @@ void main(void)
|
|
|
601
601
|
|
|
602
602
|
gl_FragColor = color;
|
|
603
603
|
}
|
|
604
|
-
`;let
|
|
604
|
+
`;let ds=class extends Be{constructor(e=4,r=3,n=!1){super(_T,n?xT:yT),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new qe,this.pixelSize=1,this._clamp=n,Array.isArray(e)?this.kernels=e:(this._blur=e,this.quality=r)}apply(e,r,n,i){const a=this._pixelSize.x/r._frame.width,u=this._pixelSize.y/r._frame.height;let l;if(this._quality===1||this._blur===0)l=this._kernels[0]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,r,n,i);else{const f=e.getFilterTexture();let p=r,v=f,c;const d=this._quality-1;for(let m=0;m<d;m++)l=this._kernels[m]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,p,v,1),c=p,p=v,v=c;l=this._kernels[d]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,e.applyFilter(this,p,n,i),e.returnFilterTexture(f)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((e,r)=>e+r+.5,0))}_generateKernels(){const e=this._blur,r=this._quality,n=[e];if(e>0){let i=e;const a=e/r;for(let u=1;u<r;u++)i-=a,n.push(i)}this._kernels=n,this._updatePadding()}get kernels(){return this._kernels}set kernels(e){Array.isArray(e)&&e.length>0?(this._kernels=e,this._quality=e.length,this._blur=Math.max(...e)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(e){typeof e=="number"?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof qe?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()}get blur(){return this._blur}set blur(e){this._blur=e,this._generateKernels()}};var Vd=`attribute vec2 aVertexPosition;
|
|
605
605
|
attribute vec2 aTextureCoord;
|
|
606
606
|
|
|
607
607
|
uniform mat3 projectionMatrix;
|
|
@@ -612,7 +612,7 @@ void main(void)
|
|
|
612
612
|
{
|
|
613
613
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
614
614
|
vTextureCoord = aTextureCoord;
|
|
615
|
-
}`,
|
|
615
|
+
}`,bT=`
|
|
616
616
|
uniform sampler2D uSampler;
|
|
617
617
|
varying vec2 vTextureCoord;
|
|
618
618
|
|
|
@@ -633,7 +633,7 @@ void main() {
|
|
|
633
633
|
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
`;let
|
|
636
|
+
`;let wT=class extends Be{constructor(e=.5){super(Vd,bT),this.threshold=e}get threshold(){return this.uniforms.threshold}set threshold(e){this.uniforms.threshold=e}};var TT=`uniform sampler2D uSampler;
|
|
637
637
|
varying vec2 vTextureCoord;
|
|
638
638
|
|
|
639
639
|
uniform sampler2D bloomTexture;
|
|
@@ -647,7 +647,7 @@ void main() {
|
|
|
647
647
|
bloomColor.rgb *= bloomScale;
|
|
648
648
|
gl_FragColor = color + bloomColor;
|
|
649
649
|
}
|
|
650
|
-
`;const
|
|
650
|
+
`;const Xd=class extends Be{constructor(e){super(Vd,TT),this.bloomScale=1,this.brightness=1,this._resolution=_e.FILTER_RESOLUTION,typeof e=="number"&&(e={threshold:e});const r=Object.assign(Xd.defaults,e);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:i,quality:a,pixelSize:u,resolution:l}=r;this._extractFilter=new wT(r.threshold),this._extractFilter.resolution=l,this._blurFilter=n?new ds(n):new ds(i,a),this.pixelSize=u,this.resolution=l}apply(e,r,n,i,a){const u=e.getFilterTexture();this._extractFilter.apply(e,r,u,1,a);const l=e.getFilterTexture();this._blurFilter.apply(e,u,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,e.applyFilter(this,r,n,i),e.returnFilterTexture(l),e.returnFilterTexture(u)}get resolution(){return this._resolution}set resolution(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)}get threshold(){return this._extractFilter.threshold}set threshold(e){this._extractFilter.threshold=e}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.blur}set blur(e){this._blurFilter.blur=e}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){this._blurFilter.pixelSize=e}};let AT=Xd;AT.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:_e.FILTER_RESOLUTION};var ST=`attribute vec2 aVertexPosition;
|
|
651
651
|
attribute vec2 aTextureCoord;
|
|
652
652
|
|
|
653
653
|
uniform mat3 projectionMatrix;
|
|
@@ -658,7 +658,7 @@ void main(void)
|
|
|
658
658
|
{
|
|
659
659
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
660
660
|
vTextureCoord = aTextureCoord;
|
|
661
|
-
}`,
|
|
661
|
+
}`,ET=`uniform float radius;
|
|
662
662
|
uniform float strength;
|
|
663
663
|
uniform vec2 center;
|
|
664
664
|
uniform sampler2D uSampler;
|
|
@@ -691,7 +691,7 @@ void main()
|
|
|
691
691
|
|
|
692
692
|
gl_FragColor = color;
|
|
693
693
|
}
|
|
694
|
-
`;const
|
|
694
|
+
`;const jd=class extends Be{constructor(e){super(ST,ET),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,jd.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,e.applyFilter(this,r,n,i)}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}get strength(){return this.uniforms.strength}set strength(e){this.uniforms.strength=e}get center(){return this.uniforms.center}set center(e){this.uniforms.center=e}};let CT=jd;CT.defaults={center:[.5,.5],radius:100,strength:1};var IT=`const float PI = 3.1415926538;
|
|
695
695
|
const float PI_2 = PI*2.;
|
|
696
696
|
|
|
697
697
|
varying vec2 vTextureCoord;
|
|
@@ -818,7 +818,7 @@ void main(void) {
|
|
|
818
818
|
// mix resulting color with current color
|
|
819
819
|
gl_FragColor = gradientColor + currentColor*(1.-gradientColor.a);
|
|
820
820
|
}
|
|
821
|
-
`,
|
|
821
|
+
`,RT=`attribute vec2 aVertexPosition;
|
|
822
822
|
attribute vec2 aTextureCoord;
|
|
823
823
|
|
|
824
824
|
uniform mat3 projectionMatrix;
|
|
@@ -834,7 +834,7 @@ void main(void)
|
|
|
834
834
|
vTextureCoord = aTextureCoord;
|
|
835
835
|
vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw;
|
|
836
836
|
}
|
|
837
|
-
`,Pn=Pn||{};Pn.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 Pn=Pn||{};Pn.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 re=new Error(e+": "+z);throw re.source=e,re}function n(){var z=i();return e.length>0&&r("Invalid input not EOF"),z}function i(){return S(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,re,ge){return l(re,function(V){var K=ge();return K&&(ve(t.comma)||r("Missing comma before color stops")),{type:z,orientation:K,colorStops:S(I)}})}function l(z,re){var ge=ve(z);if(ge){ve(t.startCall)||r("Missing (");var V=re(ge);return ve(t.endCall)||r("Missing )"),V}}function f(){return p()||v()}function p(){return H("directional",t.sideOrCorner,1)}function v(){return H("angular",t.angleValue,1)}function c(){var z,re=d(),ge;return re&&(z=[],z.push(re),ge=e,ve(t.comma)&&(re=d(),re?z.push(re):e=ge)),z}function d(){var z=m()||_();if(z)z.at=w();else{var re=b();if(re){z=re;var ge=w();ge&&(z.at=ge)}else{var V=x();V&&(z={type:"default-radial",at:V})}}return z}function m(){var z=H("shape",/^(circle)/i,0);return z&&(z.style=X()||b()),z}function _(){var z=H("shape",/^(ellipse)/i,0);return z&&(z.style=ee()||b()),z}function b(){return H("extent-keyword",t.extentKeywords,1)}function w(){if(H("position",/^at/,0)){var z=x();return z||r("Missing positioning value"),z}}function x(){var z=E();if(z.x||z.y)return{type:"position",value:z}}function E(){return{x:ee(),y:ee()}}function S(z){var re=z(),ge=[];if(re)for(ge.push(re);ve(t.comma);)re=z(),re?ge.push(re):r("One extra comma");return ge}function I(){var z=O();return z||r("Expected color definition"),z.length=ee(),z}function O(){return L()||$()||k()||N()}function N(){return H("literal",t.literalColor,0)}function L(){return H("hex",t.hexColor,1)}function k(){return l(t.rgbColor,function(){return{type:"rgb",value:S(j)}})}function $(){return l(t.rgbaColor,function(){return{type:"rgba",value:S(j)}})}function j(){return ve(t.number)[1]}function ee(){return H("%",t.percentageValue,1)||se()||X()}function se(){return H("position-keyword",t.positionKeywords,1)}function X(){return H("px",t.pixelValue,1)||H("em",t.emValue,1)}function H(z,re,ge){var V=ve(re);if(V)return{type:z,value:V[ge]}}function ve(z){var re,ge;return ge=/^[\n\r\t\s]+/.exec(e),ge&&ke(ge[0].length),re=z.exec(e),re&&ke(re[0].length),re}function ke(z){e=e.substr(z)}return function(z){return e=z.toString(),n()}}();var IT=Pn.parse;Pn.stringify;var jd={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]},Wd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function RT(t){var e,r=[],n=1,i;if(typeof t=="string")if(jd[t])r=jd[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(Wd[d]!==void 0)return Wd[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 PT(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments));var e,r=RT(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 qd(t){switch(typeof t){case"string":return MT(t);case"number":return ra(t);default:return t}}function MT(t){const e=PT(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 OT(t){const e=IT(GT(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=FT(r.type),i=NT(r.colorStops),a=UT(r.orientation);return{type:n,stops:i,angle:a}}function FT(t){const e={"linear-gradient":0,"radial-gradient":1};if(!(t in e))throw new Error(`Unsupported gradient type "${t}"`);return e[t]}function NT(t){const e=BT(t),r=[];for(let n=0;n<t.length;n++){const i=LT(t[n]);r.push({offset:e[n],color:i.slice(0,3),alpha:i[3]})}return r}function LT(t){return qd(kT(t))}function kT(t){switch(t.type){case"hex":return`#${t.value}`;case"literal":return t.value;default:return`${t.type}(${t.value.join(",")})`}}function BT(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(DT)}function DT(t){return t.toString().length>6?parseFloat(t.toString().substring(0,6)):t}function UT(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 $T(t.value)}return 0}function $T(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 GT(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 zT=Object.defineProperty,HT=Object.defineProperties,VT=Object.getOwnPropertyDescriptors,Yd=Object.getOwnPropertySymbols,XT=Object.prototype.hasOwnProperty,jT=Object.prototype.propertyIsEnumerable,Kd=(t,e,r)=>e in t?zT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ml=(t,e)=>{for(var r in e||(e={}))XT.call(e,r)&&Kd(t,r,e[r]);if(Yd)for(var r of Yd(e))jT.call(e,r)&&Kd(t,r,e[r]);return t},WT=(t,e)=>HT(t,VT(e));const Zd=90;function qT(t){return[...t].sort((e,r)=>e.offset-r.offset)}const vl=class extends De{constructor(e){e&&"css"in e&&(e=WT(ml({},OT(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(CT,ET),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=qd(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-Zd}get angle(){return this.uniforms.uAngle+Zd}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 Ea=vl;Ea.LINEAR=0,Ea.RADIAL=1,Ea.CONIC=2,Ea.defaults={type:vl.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var YT=`attribute vec2 aVertexPosition;
|
|
837
|
+
`,Fn=Fn||{};Fn.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 Fn=Fn||{};Fn.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 S(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,fe){return l(ee,function(X){var Y=fe();return Y&&(ge(t.comma)||r("Missing comma before color stops")),{type:z,orientation:Y,colorStops:S(I)}})}function l(z,ee){var fe=ge(z);if(fe){ge(t.startCall)||r("Missing (");var X=ee(fe);return ge(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(),fe;return ee&&(z=[],z.push(ee),fe=e,ge(t.comma)&&(ee=d(),ee?z.push(ee):e=fe)),z}function d(){var z=m()||_();if(z)z.at=w();else{var ee=b();if(ee){z=ee;var fe=w();fe&&(z.at=fe)}else{var X=x();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 w(){if(V("position",/^at/,0)){var z=x();return z||r("Missing positioning value"),z}}function x(){var z=E();if(z.x||z.y)return{type:"position",value:z}}function E(){return{x:Q(),y:Q()}}function S(z){var ee=z(),fe=[];if(ee)for(fe.push(ee);ge(t.comma);)ee=z(),ee?fe.push(ee):r("One extra comma");return fe}function I(){var z=O();return z||r("Expected color definition"),z.length=Q(),z}function O(){return L()||$()||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:S(j)}})}function $(){return l(t.rgbaColor,function(){return{type:"rgba",value:S(j)}})}function j(){return ge(t.number)[1]}function Q(){return V("%",t.percentageValue,1)||de()||H()}function de(){return V("position-keyword",t.positionKeywords,1)}function H(){return V("px",t.pixelValue,1)||V("em",t.emValue,1)}function V(z,ee,fe){var X=ge(ee);if(X)return{type:z,value:X[fe]}}function ge(z){var ee,fe;return fe=/^[\n\r\t\s]+/.exec(e),fe&&Re(fe[0].length),ee=z.exec(e),ee&&Re(ee[0].length),ee}function Re(z){e=e.substr(z)}return function(z){return e=z.toString(),n()}}();var PT=Fn.parse;Fn.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 MT(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 gl={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},ml={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}};gl.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 OT(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments));var e,r=MT(t);if(!r.space)return[];const n=r.space[0]==="h"?ml.min:gl.min,i=r.space[0]==="h"?ml.max:gl.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=ml.rgb(e)),e.push(Math.min(Math.max(r.alpha,0),1)),e}function Yd(t){switch(typeof t){case"string":return FT(t);case"number":return ia(t);default:return t}}function FT(t){const e=OT(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 NT(t){const e=PT(HT(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=LT(r.type),i=kT(r.colorStops),a=GT(r.orientation);return{type:n,stops:i,angle:a}}function LT(t){const e={"linear-gradient":0,"radial-gradient":1};if(!(t in e))throw new Error(`Unsupported gradient type "${t}"`);return e[t]}function kT(t){const e=UT(t),r=[];for(let n=0;n<t.length;n++){const i=BT(t[n]);r.push({offset:e[n],color:i.slice(0,3),alpha:i[3]})}return r}function BT(t){return Yd(DT(t))}function DT(t){switch(t.type){case"hex":return`#${t.value}`;case"literal":return t.value;default:return`${t.type}(${t.value.join(",")})`}}function UT(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($T)}function $T(t){return t.toString().length>6?parseFloat(t.toString().substring(0,6)):t}function GT(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 zT(t.value)}return 0}function zT(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 HT(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 VT=Object.defineProperty,XT=Object.defineProperties,jT=Object.getOwnPropertyDescriptors,Kd=Object.getOwnPropertySymbols,WT=Object.prototype.hasOwnProperty,qT=Object.prototype.propertyIsEnumerable,Zd=(t,e,r)=>e in t?VT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vl=(t,e)=>{for(var r in e||(e={}))WT.call(e,r)&&Zd(t,r,e[r]);if(Kd)for(var r of Kd(e))qT.call(e,r)&&Zd(t,r,e[r]);return t},YT=(t,e)=>XT(t,jT(e));const Qd=90;function KT(t){return[...t].sort((e,r)=>e.offset-r.offset)}const _l=class extends Be{constructor(e){e&&"css"in e&&(e=YT(vl({},NT(e.css||"")),{alpha:e.alpha,maxColors:e.maxColors}));const r=vl(vl({},_l.defaults),e);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(RT,IT),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(e){const r=KT(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=_l;Ia.LINEAR=0,Ia.RADIAL=1,Ia.CONIC=2,Ia.defaults={type:_l.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var ZT=`attribute vec2 aVertexPosition;
|
|
838
838
|
attribute vec2 aTextureCoord;
|
|
839
839
|
|
|
840
840
|
uniform mat3 projectionMatrix;
|
|
@@ -845,7 +845,7 @@ void main(void)
|
|
|
845
845
|
{
|
|
846
846
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
847
847
|
vTextureCoord = aTextureCoord;
|
|
848
|
-
}`,
|
|
848
|
+
}`,QT=`precision mediump float;
|
|
849
849
|
|
|
850
850
|
varying mediump vec2 vTextureCoord;
|
|
851
851
|
|
|
@@ -874,7 +874,7 @@ void main(void)
|
|
|
874
874
|
|
|
875
875
|
gl_FragColor.a = c22.a;
|
|
876
876
|
}
|
|
877
|
-
`;let
|
|
877
|
+
`;let JT=class extends Be{constructor(e,r=200,n=200){super(ZT,QT),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),e!==void 0&&(this.matrix=e),this.width=r,this.height=n}get matrix(){return this.uniforms.matrix}set matrix(e){e.forEach((r,n)=>{this.uniforms.matrix[n]=r})}get width(){return 1/this.uniforms.texelSize[0]}set width(e){this.uniforms.texelSize[0]=1/e}get height(){return 1/this.uniforms.texelSize[1]}set height(e){this.uniforms.texelSize[1]=1/e}};var eA=`attribute vec2 aVertexPosition;
|
|
878
878
|
attribute vec2 aTextureCoord;
|
|
879
879
|
|
|
880
880
|
uniform mat3 projectionMatrix;
|
|
@@ -885,7 +885,7 @@ void main(void)
|
|
|
885
885
|
{
|
|
886
886
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
887
887
|
vTextureCoord = aTextureCoord;
|
|
888
|
-
}`,
|
|
888
|
+
}`,tA=`varying vec2 vTextureCoord;
|
|
889
889
|
uniform sampler2D uSampler;
|
|
890
890
|
|
|
891
891
|
uniform vec4 filterArea;
|
|
@@ -951,7 +951,7 @@ void main(void)
|
|
|
951
951
|
|
|
952
952
|
gl_FragColor.rgb = rgb;
|
|
953
953
|
}
|
|
954
|
-
`;const
|
|
954
|
+
`;const Jd=class extends Be{constructor(e){super(eA,tA),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Jd.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}set curvature(e){this.uniforms.curvature=e}get curvature(){return this.uniforms.curvature}set lineWidth(e){this.uniforms.lineWidth=e}get lineWidth(){return this.uniforms.lineWidth}set lineContrast(e){this.uniforms.lineContrast=e}get lineContrast(){return this.uniforms.lineContrast}set verticalLine(e){this.uniforms.verticalLine=e}get verticalLine(){return this.uniforms.verticalLine}set noise(e){this.uniforms.noise=e}get noise(){return this.uniforms.noise}set noiseSize(e){this.uniforms.noiseSize=e}get noiseSize(){return this.uniforms.noiseSize}set vignetting(e){this.uniforms.vignetting=e}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(e){this.uniforms.vignettingAlpha=e}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(e){this.uniforms.vignettingBlur=e}get vignettingBlur(){return this.uniforms.vignettingBlur}};let rA=Jd;rA.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var nA=`attribute vec2 aVertexPosition;
|
|
955
955
|
attribute vec2 aTextureCoord;
|
|
956
956
|
|
|
957
957
|
uniform mat3 projectionMatrix;
|
|
@@ -962,7 +962,7 @@ void main(void)
|
|
|
962
962
|
{
|
|
963
963
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
964
964
|
vTextureCoord = aTextureCoord;
|
|
965
|
-
}`,
|
|
965
|
+
}`,iA=`varying vec2 vTextureCoord;
|
|
966
966
|
uniform sampler2D uSampler;
|
|
967
967
|
uniform float alpha;
|
|
968
968
|
uniform vec3 color;
|
|
@@ -980,7 +980,7 @@ void main(void){
|
|
|
980
980
|
sample *= alpha;
|
|
981
981
|
|
|
982
982
|
gl_FragColor = sample;
|
|
983
|
-
}`,
|
|
983
|
+
}`,sA=Object.defineProperty,ep=Object.getOwnPropertySymbols,aA=Object.prototype.hasOwnProperty,oA=Object.prototype.propertyIsEnumerable,tp=(t,e,r)=>e in t?sA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,rp=(t,e)=>{for(var r in e||(e={}))aA.call(e,r)&&tp(t,r,e[r]);if(ep)for(var r of ep(e))oA.call(e,r)&&tp(t,r,e[r]);return t};const yl=class extends Be{constructor(e){super(),this.angle=45,this._distance=5,this._resolution=_e.FILTER_RESOLUTION;const r=e?rp(rp({},yl.defaults),e):yl.defaults,{kernels:n,blur:i,quality:a,pixelSize:u,resolution:l}=r;this._offset=new Mn(this._updatePadding,this),this._tintFilter=new Be(nA,iA),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=l,this._blurFilter=n?new ds(n):new ds(i,a),this.pixelSize=u,this.resolution=l;const{shadowOnly:f,rotation:p,distance:v,offset:c,alpha:d,color:m}=r;this.shadowOnly=f,p!==void 0&&v!==void 0?(this.rotation=p,this.distance=v):this.offset=c,this.alpha=d,this.color=m}apply(e,r,n,i){const a=e.getFilterTexture();this._tintFilter.apply(e,r,a,1),this._blurFilter.apply(e,a,n,i),this.shadowOnly!==!0&&e.applyFilter(this,r,n,0),e.returnFilterTexture(a)}_updatePadding(){const e=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=e+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(e){this._offset.copyFrom(e),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)}get distance(){return this._distance}set distance(e){Ie("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=e,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/as}set rotation(e){Ie("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=e*as,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(e){this._tintFilter.uniforms.alpha=e}get color(){return zu(this._tintFilter.uniforms.color)}set color(e){ia(e,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.blur}set blur(e){this._blurFilter.blur=e,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){this._blurFilter.pixelSize=e}};let uA=yl;uA.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:_e.FILTER_RESOLUTION};var lA=`attribute vec2 aVertexPosition;
|
|
984
984
|
attribute vec2 aTextureCoord;
|
|
985
985
|
|
|
986
986
|
uniform mat3 projectionMatrix;
|
|
@@ -991,7 +991,7 @@ void main(void)
|
|
|
991
991
|
{
|
|
992
992
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
993
993
|
vTextureCoord = aTextureCoord;
|
|
994
|
-
}`,
|
|
994
|
+
}`,cA=`// precision highp float;
|
|
995
995
|
|
|
996
996
|
varying vec2 vTextureCoord;
|
|
997
997
|
uniform sampler2D uSampler;
|
|
@@ -1087,7 +1087,7 @@ void main(void)
|
|
|
1087
1087
|
gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;
|
|
1088
1088
|
gl_FragColor.a = texture2D(uSampler, coord).a;
|
|
1089
1089
|
}
|
|
1090
|
-
`;const
|
|
1090
|
+
`;const xl=class extends Be{constructor(e){super(lA,cA),this.offset=100,this.fillMode=xl.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=Pe.from(this._canvas,{scaleMode:Ir.NEAREST}),Object.assign(this,xl.defaults,e)}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,r,n,i)}_randomizeSizes(){const e=this._sizes,r=this._slices-1,n=this.sampleSize,i=Math.min(this.minSize/n,.9/this._slices);if(this.average){const a=this._slices;let u=1;for(let l=0;l<r;l++){const f=u/(a-l),p=Math.max(f*(1-Math.random()*.6),i);e[l]=p,u-=p}e[r]=u}else{let a=1;const u=Math.sqrt(1/this._slices);for(let l=0;l<r;l++){const f=Math.max(u*a*Math.random(),i);e[l]=f,a-=f}e[r]=a}this.shuffle()}shuffle(){const e=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const i=Math.random()*n>>0,a=e[n];e[n]=e[i],e[i]=a}}_randomizeOffsets(){for(let e=0;e<this._slices;e++)this._offsets[e]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const e=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,e);let i,a=0;for(let u=0;u<this._slices;u++){i=Math.floor(this._offsets[u]*256);const l=this._sizes[u]*e,f=i>0?i:0,p=i<0?-i:0;n.fillStyle=`rgba(${f}, ${p}, 0, 1)`,n.fillRect(0,a>>0,e,l+1>>0),a+=l}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(e){const r=Math.min(this._slices,e.length);for(let n=0;n<r;n++)this._sizes[n]=e[n]}get sizes(){return this._sizes}set offsets(e){const r=Math.min(this._slices,e.length);for(let n=0;n<r;n++)this._offsets[n]=e[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(e){this._slices!==e&&(this._slices=e,this.uniforms.slices=e,this._sizes=this.uniforms.slicesWidth=new Float32Array(e),this._offsets=this.uniforms.slicesOffset=new Float32Array(e),this.refresh())}get direction(){return this._direction}set direction(e){if(this._direction===e)return;this._direction=e;const r=e*as;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(e){this.uniforms.red=e}get green(){return this.uniforms.green}set green(e){this.uniforms.green=e}get blue(){return this.uniforms.blue}set blue(e){this.uniforms.blue=e}destroy(){var e;(e=this.texture)==null||e.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let vi=xl;vi.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},vi.TRANSPARENT=0,vi.ORIGINAL=1,vi.LOOP=2,vi.CLAMP=3,vi.MIRROR=4;var hA=`attribute vec2 aVertexPosition;
|
|
1091
1091
|
attribute vec2 aTextureCoord;
|
|
1092
1092
|
|
|
1093
1093
|
uniform mat3 projectionMatrix;
|
|
@@ -1098,7 +1098,7 @@ void main(void)
|
|
|
1098
1098
|
{
|
|
1099
1099
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1100
1100
|
vTextureCoord = aTextureCoord;
|
|
1101
|
-
}`,
|
|
1101
|
+
}`,fA=`varying vec2 vTextureCoord;
|
|
1102
1102
|
varying vec4 vColor;
|
|
1103
1103
|
|
|
1104
1104
|
uniform sampler2D uSampler;
|
|
@@ -1164,7 +1164,7 @@ void main(void) {
|
|
|
1164
1164
|
gl_FragColor = innerColor + outerGlowColor;
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
|
-
`;const
|
|
1167
|
+
`;const np=class extends Be{constructor(t){const e=Object.assign({},np.defaults,t),{outerStrength:r,innerStrength:n,color:i,knockout:a,quality:u,alpha:l}=e,f=Math.round(e.distance);super(hA,fA.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/u/f).toFixed(7)}`).replace(/__DIST__/gi,`${f.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:i,outerStrength:r,innerStrength:n,padding:f,knockout:a,alpha:l})}get color(){return zu(this.uniforms.glowColor)}set color(t){ia(t,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(t){this.uniforms.outerStrength=t}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(t){this.uniforms.innerStrength=t}get knockout(){return this.uniforms.knockout}set knockout(t){this.uniforms.knockout=t}get alpha(){return this.uniforms.alpha}set alpha(t){this.uniforms.alpha=t}};let dA=np;dA.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var pA=`attribute vec2 aVertexPosition;
|
|
1168
1168
|
attribute vec2 aTextureCoord;
|
|
1169
1169
|
|
|
1170
1170
|
uniform mat3 projectionMatrix;
|
|
@@ -1175,7 +1175,7 @@ void main(void)
|
|
|
1175
1175
|
{
|
|
1176
1176
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1177
1177
|
vTextureCoord = aTextureCoord;
|
|
1178
|
-
}`,
|
|
1178
|
+
}`,gA=`vec3 mod289(vec3 x)
|
|
1179
1179
|
{
|
|
1180
1180
|
return x - floor(x * (1.0 / 289.0)) * 289.0;
|
|
1181
1181
|
}
|
|
@@ -1270,7 +1270,7 @@ float turb(vec3 P, vec3 rep, float lacunarity, float gain)
|
|
|
1270
1270
|
}
|
|
1271
1271
|
return abs(sum);
|
|
1272
1272
|
}
|
|
1273
|
-
`,
|
|
1273
|
+
`,mA=`varying vec2 vTextureCoord;
|
|
1274
1274
|
uniform sampler2D uSampler;
|
|
1275
1275
|
uniform vec4 filterArea;
|
|
1276
1276
|
uniform vec2 dimensions;
|
|
@@ -1315,7 +1315,7 @@ void main(void) {
|
|
|
1315
1315
|
gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;
|
|
1316
1316
|
|
|
1317
1317
|
}
|
|
1318
|
-
`;const
|
|
1318
|
+
`;const ip=class extends Be{constructor(e){super(pA,mA.replace("${perlin}",gA)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(ip.defaults,e);this._angleLight=new qe,this.angle=r.angle,this.gain=r.gain,this.lacunarity=r.lacunarity,this.alpha=r.alpha,this.parallel=r.parallel,this.center=r.center,this.time=r.time}apply(e,r,n,i){const{width:a,height:u}=r.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,n,i)}get angle(){return this._angle}set angle(e){this._angle=e;const r=e*as;this._angleLight.x=Math.cos(r),this._angleLight.y=Math.sin(r)}get gain(){return this.uniforms.gain}set gain(e){this.uniforms.gain=e}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(e){this.uniforms.lacunarity=e}get alpha(){return this.uniforms.alpha}set alpha(e){this.uniforms.alpha=e}};let vA=ip;vA.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var _A=`attribute vec2 aVertexPosition;
|
|
1319
1319
|
attribute vec2 aTextureCoord;
|
|
1320
1320
|
|
|
1321
1321
|
uniform mat3 projectionMatrix;
|
|
@@ -1326,7 +1326,7 @@ void main(void)
|
|
|
1326
1326
|
{
|
|
1327
1327
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1328
1328
|
vTextureCoord = aTextureCoord;
|
|
1329
|
-
}`,
|
|
1329
|
+
}`,yA=`precision mediump float;
|
|
1330
1330
|
|
|
1331
1331
|
varying vec2 vTextureCoord;
|
|
1332
1332
|
uniform sampler2D uSampler;
|
|
@@ -1384,7 +1384,7 @@ void main()
|
|
|
1384
1384
|
// alpha
|
|
1385
1385
|
gl_FragColor = mix(color, result, uAlpha);
|
|
1386
1386
|
}
|
|
1387
|
-
`;const
|
|
1387
|
+
`;const sp=class extends Be{constructor(t){super(_A,yA),this._hue=0;const e=Object.assign({},sp.defaults,t);Object.assign(this,e)}get hue(){return this._hue}set hue(t){this._hue=t,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}get colorize(){return this.uniforms.uColorize}set colorize(t){this.uniforms.uColorize=t}get lightness(){return this.uniforms.uLightness}set lightness(t){this.uniforms.uLightness=t}get saturation(){return this.uniforms.uSaturation}set saturation(t){this.uniforms.uSaturation=t}};let xA=sp;xA.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var bA=`attribute vec2 aVertexPosition;
|
|
1388
1388
|
attribute vec2 aTextureCoord;
|
|
1389
1389
|
|
|
1390
1390
|
uniform mat3 projectionMatrix;
|
|
@@ -1395,7 +1395,7 @@ void main(void)
|
|
|
1395
1395
|
{
|
|
1396
1396
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1397
1397
|
vTextureCoord = aTextureCoord;
|
|
1398
|
-
}`,
|
|
1398
|
+
}`,wA=`varying vec2 vTextureCoord;
|
|
1399
1399
|
uniform sampler2D uSampler;
|
|
1400
1400
|
uniform vec4 filterArea;
|
|
1401
1401
|
uniform vec2 dimensions;
|
|
@@ -1499,7 +1499,7 @@ void main()
|
|
|
1499
1499
|
|
|
1500
1500
|
gl_FragColor.rgb = color;
|
|
1501
1501
|
}
|
|
1502
|
-
`;const
|
|
1502
|
+
`;const ap=class extends Be{constructor(e,r=0){super(bA,wA),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof e=="number"?(this.seed=e,e=void 0):this.seed=r,Object.assign(this,ap.defaults,e)}apply(e,r,n,i){var a,u;this.uniforms.dimensions[0]=(a=r.filterFrame)==null?void 0:a.width,this.uniforms.dimensions[1]=(u=r.filterFrame)==null?void 0:u.height,this.uniforms.seed=this.seed,e.applyFilter(this,r,n,i)}set sepia(e){this.uniforms.sepia=e}get sepia(){return this.uniforms.sepia}set noise(e){this.uniforms.noise=e}get noise(){return this.uniforms.noise}set noiseSize(e){this.uniforms.noiseSize=e}get noiseSize(){return this.uniforms.noiseSize}set scratch(e){this.uniforms.scratch=e}get scratch(){return this.uniforms.scratch}set scratchDensity(e){this.uniforms.scratchDensity=e}get scratchDensity(){return this.uniforms.scratchDensity}set scratchWidth(e){this.uniforms.scratchWidth=e}get scratchWidth(){return this.uniforms.scratchWidth}set vignetting(e){this.uniforms.vignetting=e}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(e){this.uniforms.vignettingAlpha=e}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(e){this.uniforms.vignettingBlur=e}get vignettingBlur(){return this.uniforms.vignettingBlur}};let op=ap;op.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var TA=`attribute vec2 aVertexPosition;
|
|
1503
1503
|
attribute vec2 aTextureCoord;
|
|
1504
1504
|
|
|
1505
1505
|
uniform mat3 projectionMatrix;
|
|
@@ -1510,7 +1510,7 @@ void main(void)
|
|
|
1510
1510
|
{
|
|
1511
1511
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1512
1512
|
vTextureCoord = aTextureCoord;
|
|
1513
|
-
}`,
|
|
1513
|
+
}`,AA=`varying vec2 vTextureCoord;
|
|
1514
1514
|
uniform sampler2D uSampler;
|
|
1515
1515
|
uniform vec4 filterClamp;
|
|
1516
1516
|
|
|
@@ -1548,7 +1548,7 @@ void main(void) {
|
|
|
1548
1548
|
vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
|
|
1549
1549
|
gl_FragColor = contentColor + outlineColor;
|
|
1550
1550
|
}
|
|
1551
|
-
`;const
|
|
1551
|
+
`;const Ra=class extends Be{constructor(e=1,r=0,n=.1,i=1,a=!1){super(TA,AA.replace(/\$\{angleStep\}/,Ra.getAngleStep(n))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=a,Object.assign(this,{thickness:e,color:r,quality:n,alpha:i,knockout:a})}static getAngleStep(e){const r=Math.max(e*Ra.MAX_SAMPLES,Ra.MIN_SAMPLES);return(Math.PI*2/r).toFixed(7)}apply(e,r,n,i){this.uniforms.uThickness[0]=this._thickness/r._frame.width,this.uniforms.uThickness[1]=this._thickness/r._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,e.applyFilter(this,r,n,i)}get alpha(){return this._alpha}set alpha(e){this._alpha=e}get color(){return zu(this.uniforms.uColor)}set color(e){ia(e,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(e){this._knockout=e}get thickness(){return this._thickness}set thickness(e){this._thickness=e,this.padding=e}};let up=Ra;up.MIN_SAMPLES=1,up.MAX_SAMPLES=100;var SA=`attribute vec2 aVertexPosition;
|
|
1552
1552
|
attribute vec2 aTextureCoord;
|
|
1553
1553
|
|
|
1554
1554
|
uniform mat3 projectionMatrix;
|
|
@@ -1559,7 +1559,7 @@ void main(void)
|
|
|
1559
1559
|
{
|
|
1560
1560
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1561
1561
|
vTextureCoord = aTextureCoord;
|
|
1562
|
-
}`,
|
|
1562
|
+
}`,EA=`varying vec2 vTextureCoord;
|
|
1563
1563
|
uniform sampler2D uSampler;
|
|
1564
1564
|
|
|
1565
1565
|
uniform vec4 filterArea;
|
|
@@ -1603,7 +1603,7 @@ void main(void)
|
|
|
1603
1603
|
|
|
1604
1604
|
gl_FragColor = color * _alpha;
|
|
1605
1605
|
}
|
|
1606
|
-
`;const
|
|
1606
|
+
`;const lp=class extends Be{constructor(e){super(SA,EA),this.time=0,this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,lp.defaults,e)}apply(e,r,n,i){var a,u;this.uniforms.dimensions[0]=(a=r.filterFrame)==null?void 0:a.width,this.uniforms.dimensions[1]=(u=r.filterFrame)==null?void 0:u.height,this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}set mirror(e){this.uniforms.mirror=e}get mirror(){return this.uniforms.mirror}set boundary(e){this.uniforms.boundary=e}get boundary(){return this.uniforms.boundary}set amplitude(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]}get amplitude(){return this.uniforms.amplitude}set waveLength(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]}get waveLength(){return this.uniforms.waveLength}set alpha(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]}get alpha(){return this.uniforms.alpha}};let CA=lp;CA.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var IA=`attribute vec2 aVertexPosition;
|
|
1607
1607
|
attribute vec2 aTextureCoord;
|
|
1608
1608
|
|
|
1609
1609
|
uniform mat3 projectionMatrix;
|
|
@@ -1614,7 +1614,7 @@ void main(void)
|
|
|
1614
1614
|
{
|
|
1615
1615
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1616
1616
|
vTextureCoord = aTextureCoord;
|
|
1617
|
-
}`,
|
|
1617
|
+
}`,RA=`varying vec2 vTextureCoord;
|
|
1618
1618
|
uniform sampler2D uSampler;
|
|
1619
1619
|
uniform vec4 filterArea;
|
|
1620
1620
|
uniform vec4 filterClamp;
|
|
@@ -1683,7 +1683,7 @@ void main()
|
|
|
1683
1683
|
|
|
1684
1684
|
gl_FragColor = color;
|
|
1685
1685
|
}
|
|
1686
|
-
`;const
|
|
1686
|
+
`;const cp=class extends Be{constructor(e=[0,0],r,n=0){super(IA,RA),this.center=e,Object.assign(this,cp.defaults,r),this.time=n}apply(e,r,n,i){this.uniforms.time=this.time,e.applyFilter(this,r,n,i)}get center(){return this.uniforms.center}set center(e){this.uniforms.center=e}get amplitude(){return this.uniforms.amplitude}set amplitude(e){this.uniforms.amplitude=e}get wavelength(){return this.uniforms.wavelength}set wavelength(e){this.uniforms.wavelength=e}get brightness(){return this.uniforms.brightness}set brightness(e){this.uniforms.brightness=e}get speed(){return this.uniforms.speed}set speed(e){this.uniforms.speed=e}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}};let PA=cp;PA.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var MA=`attribute vec2 aVertexPosition;
|
|
1687
1687
|
attribute vec2 aTextureCoord;
|
|
1688
1688
|
|
|
1689
1689
|
uniform mat3 projectionMatrix;
|
|
@@ -1694,7 +1694,7 @@ void main(void)
|
|
|
1694
1694
|
{
|
|
1695
1695
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1696
1696
|
vTextureCoord = aTextureCoord;
|
|
1697
|
-
}`,
|
|
1697
|
+
}`,OA=`varying vec2 vTextureCoord;
|
|
1698
1698
|
|
|
1699
1699
|
uniform sampler2D uSampler;
|
|
1700
1700
|
uniform float blur;
|
|
@@ -1733,7 +1733,7 @@ void main(void)
|
|
|
1733
1733
|
|
|
1734
1734
|
gl_FragColor = color;
|
|
1735
1735
|
}
|
|
1736
|
-
`;let
|
|
1736
|
+
`;let hp=class extends Be{constructor(e){var r,n;super(MA,OA),this.uniforms.blur=e.blur,this.uniforms.gradientBlur=e.gradientBlur,this.uniforms.start=(r=e.start)!=null?r:new qe(0,window.innerHeight/2),this.uniforms.end=(n=e.end)!=null?n:new qe(600,window.innerHeight/2),this.uniforms.delta=new qe(30,30),this.uniforms.texSize=new qe(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(e){this.uniforms.blur=e}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(e){this.uniforms.gradientBlur=e}get start(){return this.uniforms.start}set start(e){this.uniforms.start=e,this.updateDelta()}get end(){return this.uniforms.end}set end(e){this.uniforms.end=e,this.updateDelta()}},FA=class extends hp{updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+r*r);this.uniforms.delta.x=e/n,this.uniforms.delta.y=r/n}},NA=class extends hp{updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(e*e+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=e/n}};const fp=class extends Be{constructor(e,r,n,i){super(),typeof e=="number"&&(Ie("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),e={blur:e,gradientBlur:r,start:n,end:i}),e=Object.assign({},fp.defaults,e),this.tiltShiftXFilter=new FA(e),this.tiltShiftYFilter=new NA(e)}apply(e,r,n,i){const a=e.getFilterTexture();this.tiltShiftXFilter.apply(e,r,a,1),this.tiltShiftYFilter.apply(e,a,n,i),e.returnFilterTexture(a)}get blur(){return this.tiltShiftXFilter.blur}set blur(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e}get start(){return this.tiltShiftXFilter.start}set start(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e}get end(){return this.tiltShiftXFilter.end}set end(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e}};let LA=fp;LA.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var kA=`attribute vec2 aVertexPosition;
|
|
1737
1737
|
attribute vec2 aTextureCoord;
|
|
1738
1738
|
|
|
1739
1739
|
uniform mat3 projectionMatrix;
|
|
@@ -1744,7 +1744,7 @@ void main(void)
|
|
|
1744
1744
|
{
|
|
1745
1745
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1746
1746
|
vTextureCoord = aTextureCoord;
|
|
1747
|
-
}`,
|
|
1747
|
+
}`,BA=`varying vec2 vTextureCoord;
|
|
1748
1748
|
|
|
1749
1749
|
uniform sampler2D uSampler;
|
|
1750
1750
|
uniform float radius;
|
|
@@ -1800,7 +1800,7 @@ void main(void)
|
|
|
1800
1800
|
gl_FragColor = texture2D(uSampler, coord );
|
|
1801
1801
|
|
|
1802
1802
|
}
|
|
1803
|
-
`;const
|
|
1803
|
+
`;const dp=class extends Be{constructor(t){super(kA,BA),Object.assign(this,dp.defaults,t)}get offset(){return this.uniforms.offset}set offset(t){this.uniforms.offset=t}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}get angle(){return this.uniforms.angle}set angle(t){this.uniforms.angle=t}};let DA=dp;DA.defaults={radius:200,angle:4,padding:20,offset:new qe};var UA=`attribute vec2 aVertexPosition;
|
|
1804
1804
|
attribute vec2 aTextureCoord;
|
|
1805
1805
|
|
|
1806
1806
|
uniform mat3 projectionMatrix;
|
|
@@ -1811,7 +1811,7 @@ void main(void)
|
|
|
1811
1811
|
{
|
|
1812
1812
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
1813
1813
|
vTextureCoord = aTextureCoord;
|
|
1814
|
-
}
|
|
1814
|
+
}`,$A=`varying vec2 vTextureCoord;
|
|
1815
1815
|
uniform sampler2D uSampler;
|
|
1816
1816
|
uniform vec4 filterArea;
|
|
1817
1817
|
|
|
@@ -1897,7 +1897,7 @@ void main() {
|
|
|
1897
1897
|
|
|
1898
1898
|
gl_FragColor = color;
|
|
1899
1899
|
}
|
|
1900
|
-
`,
|
|
1900
|
+
`,pp=Object.getOwnPropertySymbols,GA=Object.prototype.hasOwnProperty,zA=Object.prototype.propertyIsEnumerable,HA=(t,e)=>{var r={};for(var n in t)GA.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&&zA.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=HA(e,["maxKernelSize"]);super(UA,$A.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 VA=gp;VA.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const ps=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 lr.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
|
-
`);
|
|
1912
|
+
`);b.uniforms.temperature=v;const w=new JT([0,-d,0,-d,1+4*d,-d,0,-d,0]),x=new lr.filters.ColorMatrixFilter;x.hue(c,!1);const E=new ds(p,1,!0),S=new op({vignetting:m}),I=new lr.filters.NoiseFilter(_);return{adjustmentFilter:new vT({...l&&{gamma:l},...n&&{brightness:n},...e&&{contrast:e},...r&&{saturation:r},...a&&{red:a},...f&&{green:f},...u&&{blue:u},...i&&{alpha:i}}),blurFilter:E,hueFilter:x,sharpnessFilter:w,temperatureFilter:b,vignetteFilter:S,noiseFilter:I}},XA=()=>{const t=new lr.Filter(null,`
|
|
1913
1913
|
precision mediump float;
|
|
1914
1914
|
uniform mat3 uNightVisionMatrix;
|
|
1915
1915
|
varying vec2 vTextureCoord;
|
|
@@ -1920,7 +1920,21 @@ void main() {
|
|
|
1920
1920
|
vec3 color = texColor.rgb;
|
|
1921
1921
|
gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
|
|
1922
1922
|
}
|
|
1923
|
-
`),e=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return t.uniforms.uNightVisionMatrix=e,{nightVisionFilter:t}},pp=ie.forwardRef((t,e)=>{const r=q.useRef(null),n=q.useRef(null),{src:i,visible:a,transformation:{x:u,y:l,width:f,height:p,anchor:v,colorCorrection:c={},effect:d},pointerdown:m}=t,{blurRadius:_=0}=c,{temperatureFilter:b,sharpnessFilter:w,hueFilter:x,blurFilter:E,adjustmentFilter:S}=cs(c),{nightVisionFilter:I}=VA();return ie.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Fe.jsx(Wn,{...t,ref:e,children:Fe.jsx(et.Container,{ref:n,children:Fe.jsx(et.Sprite,{image:i,width:f,height:p,anchor:v,ref:r,alpha:a?1:0,x:u,y:l,...a&&{interactive:!0,pointerdown:m},filters:[b,w,x,S,..._>0?[E]:[],...d===pn.NightVision?[I]:[]]})})})});pp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Ia={build(t){const e=t.points;let r,n,i,a,u,l;if(t.type===wt.CIRC){const _=t.shape;r=_.x,n=_.y,u=l=_.radius,i=a=0}else if(t.type===wt.ELIP){const _=t.shape;r=_.x,n=_.y,u=_.width,l=_.height,i=a=0}else{const _=t.shape,b=_.width/2,w=_.height/2;r=_.x+b,n=_.y+w,u=l=Math.max(0,Math.min(_.radius,Math.min(b,w))),i=b-u,a=w-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,w=r+_,x=r-_,E=n+b;if(e[v++]=w,e[v++]=E,e[--c]=E,e[--c]=x,a){const S=n-b;e[d++]=x,e[d++]=S,e[--m]=S,e[--m]=w}}for(let _=1;_<f;_++){const b=Math.PI/2*(_/f),w=i+Math.cos(b)*u,x=a+Math.sin(b)*l,E=r+w,S=r-w,I=n+x,O=n-x;e[v++]=E,e[v++]=I,e[--c]=I,e[--c]=S,e[d++]=S,e[d++]=O,e[--m]=O,e[--m]=E}{const _=i,b=a+l,w=r+_,x=r-_,E=n+b,S=n-b;e[v++]=w,e[v++]=E,e[--m]=S,e[--m]=w,i&&(e[v++]=x,e[v++]=E,e[--m]=S,e[--m]=x)}},triangulate(t,e){const r=t.points,n=e.points,i=e.indices;if(r.length===0)return;let a=n.length/2;const u=a;let l,f;if(t.type!==wt.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 gp(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 mp={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){gp(r,!1);const u=[];for(let p=0;p<n.length;p++){const v=n[p];gp(v.points,!0),u.push(r.length/2),r=r.concat(v.points)}const l=Px(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])}}},XA={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)}},jA={build(t){Ia.build(t)},triangulate(t,e){Ia.triangulate(t,e)}};var hr=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(hr||{}),Mn=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(Mn||{});const gi={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 vp{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,w=p*c+v*d,x=a*Math.sqrt(_)/m,E=a*Math.sqrt(b)/m,S=x*w/_,I=E*w/b,O=x*d+E*v,N=x*c+E*p,L=v*(E+S),k=p*(E+S),$=d*(x+I),j=c*(x+I),ee=Math.atan2(k-N,L-O),se=Math.atan2(j-N,$-O);return{cx:O+e,cy:N+r,radius:a,startAngle:ee,endAngle:se,anticlockwise:v*c>d*p}}static arc(e,r,n,i,a,u,l,f,p){const v=l-u,c=gi._segmentsCount(Math.abs(v)*a,Math.ceil(Math.abs(v)/ua)*40),d=v/(c*2),m=d*2,_=Math.cos(d),b=Math.sin(d),w=c-1,x=w%1/w;for(let E=0;E<=w;++E){const S=E+x*E,I=d+u+m*S,O=Math.cos(I),N=-Math.sin(I);p.push((_*O+b*N)*a+n,(_*-N+b*O)*a+i)}}}class WA{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,w=0,x=0,E=0,S=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=_*_,w=b*_,x=w*e+3*b*c*n+3*_*d*a+m*l,E=w*r+3*b*c*i+3*_*d*u+m*f,S=O-x,I=N-E,O=x,N=E,v+=Math.sqrt(S*S+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=gi._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 w=1,x=0;w<=v;++w)x=w/v,c=1-x,d=c*c,m=d*c,_=x*x,b=_*x,l.push(m*f+3*d*x*e+3*c*_*n+b*a,m*p+3*d*x*r+3*c*_*i+b*u)}}function _p(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,w=v+d,x=c+m;return l.push(_,b,w,x),2}function On(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),w=(15*_*Math.sqrt(b)/Math.PI>>0)+1,x=m/w;if(d+=x,l){u.push(t,e,r,n);for(let E=1,S=d;E<w;E++,S+=x)u.push(t,e,t+Math.sin(S)*b,e+Math.cos(S)*b);u.push(t,e,i,a)}else{u.push(r,n,t,e);for(let E=1,S=d;E<w;E++,S+=x)u.push(t+Math.sin(S)*b,e+Math.cos(S)*b,t,e);u.push(i,a,t,e)}return w*2}function qA(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 qe(n[0],n[1]),l=new qe(n[n.length-2],n[n.length-1]),f=r.type!==wt.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,re=(l.y+u.y)*.5;n.unshift(z,re),n.push(z,re)}const v=e.points,c=n.length/2;let d=n.length;const m=v.length/2,_=a.width/2,b=_*_,w=a.miterLimit*a.miterLimit;let x=n[0],E=n[1],S=n[2],I=n[3],O=0,N=0,L=-(E-I),k=x-S,$=0,j=0,ee=Math.sqrt(L*L+k*k);L/=ee,k/=ee,L*=_,k*=_;const se=a.alignment,X=(1-se)*2,H=se*2;f||(a.cap===Mn.ROUND?d+=On(x-L*(X-H)*.5,E-k*(X-H)*.5,x-L*X,E-k*X,x+L*H,E+k*H,v,!0)+2:a.cap===Mn.SQUARE&&(d+=_p(x,E,L,k,X,H,!0,v))),v.push(x-L*X,E-k*X,x+L*H,E+k*H);for(let z=1;z<c-1;++z){x=n[(z-1)*2],E=n[(z-1)*2+1],S=n[z*2],I=n[z*2+1],O=n[(z+1)*2],N=n[(z+1)*2+1],L=-(E-I),k=x-S,ee=Math.sqrt(L*L+k*k),L/=ee,k/=ee,L*=_,k*=_,$=-(I-N),j=S-O,ee=Math.sqrt($*$+j*j),$/=ee,j/=ee,$*=_,j*=_;const re=S-x,ge=E-I,V=S-O,K=N-I,he=re*V+ge*K,ye=ge*V-K*re,xe=ye<0;if(Math.abs(ye)<.001*Math.abs(he)){v.push(S-L*X,I-k*X,S+L*H,I+k*H),he>=0&&(a.join===hr.ROUND?d+=On(S,I,S-L*X,I-k*X,S-$*X,I-j*X,v,!1)+4:d+=2,v.push(S-$*H,I-j*H,S+$*X,I+j*X));continue}const Pe=(-L+x)*(-k+I)-(-L+S)*(-k+E),Oe=(-$+O)*(-j+I)-(-$+S)*(-j+N),ze=(re*Oe-V*Pe)/ye,He=(K*Pe-ge*Oe)/ye,Ze=(ze-S)*(ze-S)+(He-I)*(He-I),Q=S+(ze-S)*X,W=I+(He-I)*X,ae=S-(ze-S)*H,Ee=I-(He-I)*H,Ce=Math.min(re*re+ge*ge,V*V+K*K),Qe=xe?X:H,gr=Ce+Qe*Qe*b,Ot=Ze<=gr;let $r=a.join;if($r===hr.MITER&&Ze/b>w&&($r=hr.BEVEL),Ot)switch($r){case hr.MITER:{v.push(Q,W,ae,Ee);break}case hr.BEVEL:{xe?v.push(Q,W,S+L*H,I+k*H,Q,W,S+$*H,I+j*H):v.push(S-L*X,I-k*X,ae,Ee,S-$*X,I-j*X,ae,Ee),d+=2;break}case hr.ROUND:{xe?(v.push(Q,W,S+L*H,I+k*H),d+=On(S,I,S+L*H,I+k*H,S+$*H,I+j*H,v,!0)+4,v.push(Q,W,S+$*H,I+j*H)):(v.push(S-L*X,I-k*X,ae,Ee),d+=On(S,I,S-L*X,I-k*X,S-$*X,I-j*X,v,!1)+4,v.push(S-$*X,I-j*X,ae,Ee));break}}else{switch(v.push(S-L*X,I-k*X,S+L*H,I+k*H),$r){case hr.MITER:{xe?v.push(ae,Ee,ae,Ee):v.push(Q,W,Q,W),d+=2;break}case hr.ROUND:{xe?d+=On(S,I,S+L*H,I+k*H,S+$*H,I+j*H,v,!0)+2:d+=On(S,I,S-L*X,I-k*X,S-$*X,I-j*X,v,!1)+2;break}}v.push(S-$*X,I-j*X,S+$*H,I+j*H),d+=2}}x=n[(c-2)*2],E=n[(c-2)*2+1],S=n[(c-1)*2],I=n[(c-1)*2+1],L=-(E-I),k=x-S,ee=Math.sqrt(L*L+k*k),L/=ee,k/=ee,L*=_,k*=_,v.push(S-L*X,I-k*X,S+L*H,I+k*H),f||(a.cap===Mn.ROUND?d+=On(S-L*(X-H)*.5,I-k*(X-H)*.5,S-L*X,I-k*X,S+L*H,I+k*H,v,!1)+2:a.cap===Mn.SQUARE&&(d+=_p(S,I,L,k,X,H,!1,v)));const ve=e.indices,ke=gi.epsilon*gi.epsilon;for(let z=m;z<d+m-2;++z)x=v[z*2],E=v[z*2+1],S=v[(z+1)*2],I=v[(z+1)*2+1],O=v[(z+2)*2],N=v[(z+2)*2+1],!(Math.abs(x*(I-N)+S*(N-E)+O*(E-I))<ke)&&ve.push(z,z+1,z+2)}function YA(t,e){let r=0;const n=t.shape,i=t.points||n.points,a=n.type!==wt.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 yp(t,e){t.lineStyle.native?YA(t,e):qA(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),w=2*c*b,x=2*Math.sqrt(m),E=d/b;return(w*_+b*d*(_-x)+(4*m*c-d*d)*Math.log((2*b+E+_)/(E+x)))/(4*w)}static curveTo(e,r,n,i,a){const u=a[a.length-2],l=a[a.length-1],f=gi._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={[wt.POLY]:mp,[wt.CIRC]:Ia,[wt.ELIP]:Ia,[wt.RECT]:XA,[wt.RREC]:jA},xp=[],Ra=[];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?je.EMPTY:(e=e||new je(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,w=u*r+f*n+v,x=l*r+p*n+c;d=w<d?w:d,m=x<m?x:m,_=w>_?w:_,b=x>b?x:b,w=u*i+f*n+v,x=l*i+p*n+c,d=w<d?w:d,m=x<m?x:m,_=w>_?w:_,b=x>b?x:b,w=u*r+f*a+v,x=l*r+p*a+c,d=w<d?w:d,m=x<m?x:m,_=w>_?w:_,b=x>b?x:b,w=u*i+f*a+v,x=l*i+p*a+c,d=w<d?w:d,m=x<m?x:m,_=w>_?w:_,b=x>b?x: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,w=this.maxY;for(let x=n;x<i;x+=2){const E=r[x],S=r[x+1],I=l*E+p*S+c,O=v*S+f*E+d;m=Math.min(m,I-a),b=Math.max(b,I+a),_=Math.min(_,O-u),w=Math.max(w,O+u)}this.minX=m,this.minY=_,this.maxX=b,this.maxY=w}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 mi extends $s{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(mi.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 je),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new je),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 KA),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*cw}set angle(e){this.transform.rotation=e*rs}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 KA extends mi{constructor(){super(...arguments),this.sortDirty=null}}mi.prototype.displayObjectUpdateTransform=mi.prototype.updateTransform;const ZA=new Mt;function QA(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const Al=class extends mi{constructor(){super(),this.children=[],this.sortableChildren=Al.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);ia(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,ia(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,ia(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(QA),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!==Al.prototype._render&&(r=this.getBounds(!0));const i=t.projection.transform;if(i&&(n?(n=ZA.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!==dt.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 vi=Al;vi.defaultSortableChildren=!1,vi.prototype.containerUpdateTransform=vi.prototype.updateTransform,Object.defineProperties(be,{SORTABLE_CHILDREN:{get(){return vi.defaultSortableChildren},set(t){Re("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),vi.defaultSortableChildren=t}}});class Pa{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 Pa(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 _i=new qe,bp=class extends Jf{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(),Ra.push(this.drawCalls[t]);this.drawCalls.length=0;for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e.reset(),xp.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 Pa(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 Pa(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,_i):_i.copyFrom(t),n.shape.contains(_i.x,_i.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(_i.x,_i.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,w=this.points.length/2;_.wrapMode=Vi.REPEAT,d===0?this.processFill(f):this.processLine(f);const x=this.points.length/2-w;x!==0&&(r&&!this._compareStyles(n,m)&&(r.end(b,w),r=null),r||(r=xp.pop()||new WA,r.begin(m,b,w),this.batches.push(r),n=m),this.addUvs(this.points,t,m.texture,w,x,m.matrix))}}const i=this.indices.length,a=this.points.length/2;if(r&&r.end(i,a),this.batches.length===0){this.batchable=!0;return}const u=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&u===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=u?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(t,e){return!(!t||!e||t.texture.baseTexture!==e.texture.baseTexture||t.color+t.alpha!==e.color+e.alpha||!!t.native!=!!e.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let t=0,e=this.graphicsData.length;t<e;t++){const r=this.graphicsData[t],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const t=this.batches;for(let e=0,r=t.length;e<r;e++){const n=t[e];for(let i=0;i<n.size;i++){const a=n.start+i;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const t=this.batches;for(let e=0;e<t.length;e++)if(t[e].style.native)return!1;return this.points.length<bp.BATCHABLE_SIZE*2}buildDrawCalls(){let t=++Le._globalBatch;for(let v=0;v<this.drawCalls.length;v++)this.drawCalls[v].texArray.clear(),Ra.push(this.drawCalls[v]);this.drawCalls.length=0;const e=this.colors,r=this.textureIds;let n=Ra.pop();n||(n=new Zu,n.texArray=new nl),n.texArray.count=0,n.start=0,n.size=0,n.type=Kr.TRIANGLES;let i=0,a=null,u=0,l=!1,f=Kr.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?Kr.LINES:Kr.TRIANGLES,a=null,i=d,t++),a!==_&&(a=_,_._batchEnabled!==t&&(i===d&&(t++,i=0,n.size>0&&(n=Ra.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=Vi.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)}Le._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?mp.triangulate(t,this):wl[t.type].triangulate(t,this)}processLine(t){yp(t,this);for(let e=0;e<t.holes.length;e++)yp(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=Ct.shared.setValue(e).toLittleEndianNumber(),u=Ct.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 wp=bp;wp.BATCHABLE_SIZE=100;class Ma{constructor(){this.color=16777215,this.alpha=1,this.texture=Me.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new Ma;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=Me.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Sl extends Ma{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Mn.BUTT,this.join=hr.MITER,this.miterLimit=10}clone(){const e=new Sl;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={},Oa=class extends vi{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 Ma,this._lineStyle=new Sl,this._matrix=null,this._holeMode=!1,this.state=aa.for2d(),this._geometry=t||new wp,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ct(16777215),this.blendMode=ce.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Oa(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:Me.WHITE,color:t!=null&&t.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Mn.BUTT,join:hr.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 ns,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new ns,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=vp.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+=ua:a&&n<=i&&(n+=ua),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 vp.arc(l,f,t,e,r,n,i,a,v),this}beginFill(t=0,e){return this.beginTextureFill({texture:Me.WHITE,color:t,alpha:e})}normalizeColor(t){const e=Ct.shared.setValue(t.color??0);t.color=e.toNumber(),t.alpha??(t.alpha=e.alpha)}beginTextureFill(t){const e={texture:Me.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 je(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 hw(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 ns(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===wt.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:Ct.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,Ct.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 Mt,default:ar.from({uSamplers:i},!0)},u=t.plugins[r]._shader.program;El[r]=new ss(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,Oa._TEMP_POINT),this._geometry.containsPoint(Oa._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=Ct.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=Oa;Cl.curves=gi,Cl._TEMP_POINT=new qe;var JA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Il={},eS={get exports(){return Il},set exports(t){Il=t}};/*!
|
|
1923
|
+
`),e=[.393,.769,.189,.349,.686,.168,.272,.534,.131];t.uniforms.uNightVisionMatrix=e;const r=new lr.Filter(null,`
|
|
1924
|
+
precision mediump float;
|
|
1925
|
+
varying vec2 vTextureCoord;
|
|
1926
|
+
uniform sampler2D uSampler;
|
|
1927
|
+
uniform vec4 vignetteColor;
|
|
1928
|
+
uniform float vignetteSize;
|
|
1929
|
+
uniform float vignetteStrength;
|
|
1930
|
+
|
|
1931
|
+
void main(void) {
|
|
1932
|
+
vec4 texColor = texture2D(uSampler, vTextureCoord);
|
|
1933
|
+
vec2 delta = vTextureCoord - vec2(0.5);
|
|
1934
|
+
float vignette = 1.0 - smoothstep(vignetteSize, 0.5, length(delta));
|
|
1935
|
+
gl_FragColor = texColor * vignetteColor * vignetteStrength * vignette;
|
|
1936
|
+
}
|
|
1937
|
+
`);return r.uniforms.vignetteColor=[0,0,0,1],r.uniforms.vignetteSize=.7,r.uniforms.vignetteStrength=.6,{nightVisionFilter:t,vignetteFilter:r}},mp=ie.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:w=0,noise:x=0}=d,{temperatureFilter:E,sharpnessFilter:S,hueFilter:I,blurFilter:O,adjustmentFilter:N,vignetteFilter:L,noiseFilter:k}=ps(d),{nightVisionFilter:$}=XA();return ie.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Fe.jsx(Kn,{...t,ref:e,children:Fe.jsx(rt.Container,{ref:n,children:Fe.jsx(rt.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,S,I,N,...b>0?[O]:[],...m===vn.NightVision?[$]:[],...w>0?[L]:[],...x>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===St.CIRC){const _=t.shape;r=_.x,n=_.y,u=l=_.radius,i=a=0}else if(t.type===St.ELIP){const _=t.shape;r=_.x,n=_.y,u=_.width,l=_.height,i=a=0}else{const _=t.shape,b=_.width/2,w=_.height/2;r=_.x+b,n=_.y+w,u=l=Math.max(0,Math.min(_.radius,Math.min(b,w))),i=b-u,a=w-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,w=r+_,x=r-_,E=n+b;if(e[v++]=w,e[v++]=E,e[--c]=E,e[--c]=x,a){const S=n-b;e[d++]=x,e[d++]=S,e[--m]=S,e[--m]=w}}for(let _=1;_<f;_++){const b=Math.PI/2*(_/f),w=i+Math.cos(b)*u,x=a+Math.sin(b)*l,E=r+w,S=r-w,I=n+x,O=n-x;e[v++]=E,e[v++]=I,e[--c]=I,e[--c]=S,e[d++]=S,e[d++]=O,e[--m]=O,e[--m]=E}{const _=i,b=a+l,w=r+_,x=r-_,E=n+b,S=n-b;e[v++]=w,e[v++]=E,e[--m]=S,e[--m]=w,i&&(e[v++]=x,e[v++]=E,e[--m]=S,e[--m]=x)}},triangulate(t,e){const r=t.points,n=e.points,i=e.indices;if(r.length===0)return;let a=n.length/2;const u=a;let l,f;if(t.type!==St.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=Ox(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])}}},jA={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)}},WA={build(t){Pa.build(t)},triangulate(t,e){Pa.triangulate(t,e)}};var vr=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(vr||{}),Nn=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(Nn||{});const _i={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,w=p*c+v*d,x=a*Math.sqrt(_)/m,E=a*Math.sqrt(b)/m,S=x*w/_,I=E*w/b,O=x*d+E*v,N=x*c+E*p,L=v*(E+S),k=p*(E+S),$=d*(x+I),j=c*(x+I),Q=Math.atan2(k-N,L-O),de=Math.atan2(j-N,$-O);return{cx:O+e,cy:N+r,radius:a,startAngle:Q,endAngle:de,anticlockwise:v*c>d*p}}static arc(e,r,n,i,a,u,l,f,p){const v=l-u,c=_i._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),w=c-1,x=w%1/w;for(let E=0;E<=w;++E){const S=E+x*E,I=d+u+m*S,O=Math.cos(I),N=-Math.sin(I);p.push((_*O+b*N)*a+n,(_*-N+b*O)*a+i)}}}class qA{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 bl{static curveLength(e,r,n,i,a,u,l,f){let v=0,c=0,d=0,m=0,_=0,b=0,w=0,x=0,E=0,S=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=_*_,w=b*_,x=w*e+3*b*c*n+3*_*d*a+m*l,E=w*r+3*b*c*i+3*_*d*u+m*f,S=O-x,I=N-E,O=x,N=E,v+=Math.sqrt(S*S+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=_i._segmentsCount(bl.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 w=1,x=0;w<=v;++w)x=w/v,c=1-x,d=c*c,m=d*c,_=x*x,b=_*x,l.push(m*f+3*d*x*e+3*c*_*n+b*a,m*p+3*d*x*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,w=v+d,x=c+m;return l.push(_,b,w,x),2}function Ln(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),w=(15*_*Math.sqrt(b)/Math.PI>>0)+1,x=m/w;if(d+=x,l){u.push(t,e,r,n);for(let E=1,S=d;E<w;E++,S+=x)u.push(t,e,t+Math.sin(S)*b,e+Math.cos(S)*b);u.push(t,e,i,a)}else{u.push(r,n,t,e);for(let E=1,S=d;E<w;E++,S+=x)u.push(t+Math.sin(S)*b,e+Math.cos(S)*b,t,e);u.push(i,a,t,e)}return w*2}function YA(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 qe(n[0],n[1]),l=new qe(n[n.length-2],n[n.length-1]),f=r.type!==St.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=_*_,w=a.miterLimit*a.miterLimit;let x=n[0],E=n[1],S=n[2],I=n[3],O=0,N=0,L=-(E-I),k=x-S,$=0,j=0,Q=Math.sqrt(L*L+k*k);L/=Q,k/=Q,L*=_,k*=_;const de=a.alignment,H=(1-de)*2,V=de*2;f||(a.cap===Nn.ROUND?d+=Ln(x-L*(H-V)*.5,E-k*(H-V)*.5,x-L*H,E-k*H,x+L*V,E+k*V,v,!0)+2:a.cap===Nn.SQUARE&&(d+=xp(x,E,L,k,H,V,!0,v))),v.push(x-L*H,E-k*H,x+L*V,E+k*V);for(let z=1;z<c-1;++z){x=n[(z-1)*2],E=n[(z-1)*2+1],S=n[z*2],I=n[z*2+1],O=n[(z+1)*2],N=n[(z+1)*2+1],L=-(E-I),k=x-S,Q=Math.sqrt(L*L+k*k),L/=Q,k/=Q,L*=_,k*=_,$=-(I-N),j=S-O,Q=Math.sqrt($*$+j*j),$/=Q,j/=Q,$*=_,j*=_;const ee=S-x,fe=E-I,X=S-O,Y=N-I,le=ee*X+fe*Y,we=fe*X-Y*ee,ye=we<0;if(Math.abs(we)<.001*Math.abs(le)){v.push(S-L*H,I-k*H,S+L*V,I+k*V),le>=0&&(a.join===vr.ROUND?d+=Ln(S,I,S-L*H,I-k*H,S-$*H,I-j*H,v,!1)+4:d+=2,v.push(S-$*V,I-j*V,S+$*H,I+j*H));continue}const Me=(-L+x)*(-k+I)-(-L+S)*(-k+E),Oe=(-$+O)*(-j+I)-(-$+S)*(-j+N),ze=(ee*Oe-X*Me)/we,De=(Y*Me-fe*Oe)/we,Ye=(ze-S)*(ze-S)+(De-I)*(De-I),Ke=S+(ze-S)*H,Te=I+(De-I)*H,Ue=S-(ze-S)*V,Ze=I-(De-I)*V,Qe=Math.min(ee*ee+fe*fe,X*X+Y*Y),J=ye?H:V,ne=Qe+J*J*b,Ae=Ye<=ne;let gt=a.join;if(gt===vr.MITER&&Ye/b>w&&(gt=vr.BEVEL),Ae)switch(gt){case vr.MITER:{v.push(Ke,Te,Ue,Ze);break}case vr.BEVEL:{ye?v.push(Ke,Te,S+L*V,I+k*V,Ke,Te,S+$*V,I+j*V):v.push(S-L*H,I-k*H,Ue,Ze,S-$*H,I-j*H,Ue,Ze),d+=2;break}case vr.ROUND:{ye?(v.push(Ke,Te,S+L*V,I+k*V),d+=Ln(S,I,S+L*V,I+k*V,S+$*V,I+j*V,v,!0)+4,v.push(Ke,Te,S+$*V,I+j*V)):(v.push(S-L*H,I-k*H,Ue,Ze),d+=Ln(S,I,S-L*H,I-k*H,S-$*H,I-j*H,v,!1)+4,v.push(S-$*H,I-j*H,Ue,Ze));break}}else{switch(v.push(S-L*H,I-k*H,S+L*V,I+k*V),gt){case vr.MITER:{ye?v.push(Ue,Ze,Ue,Ze):v.push(Ke,Te,Ke,Te),d+=2;break}case vr.ROUND:{ye?d+=Ln(S,I,S+L*V,I+k*V,S+$*V,I+j*V,v,!0)+2:d+=Ln(S,I,S-L*H,I-k*H,S-$*H,I-j*H,v,!1)+2;break}}v.push(S-$*H,I-j*H,S+$*V,I+j*V),d+=2}}x=n[(c-2)*2],E=n[(c-2)*2+1],S=n[(c-1)*2],I=n[(c-1)*2+1],L=-(E-I),k=x-S,Q=Math.sqrt(L*L+k*k),L/=Q,k/=Q,L*=_,k*=_,v.push(S-L*H,I-k*H,S+L*V,I+k*V),f||(a.cap===Nn.ROUND?d+=Ln(S-L*(H-V)*.5,I-k*(H-V)*.5,S-L*H,I-k*H,S+L*V,I+k*V,v,!1)+2:a.cap===Nn.SQUARE&&(d+=xp(S,I,L,k,H,V,!1,v)));const ge=e.indices,Re=_i.epsilon*_i.epsilon;for(let z=m;z<d+m-2;++z)x=v[z*2],E=v[z*2+1],S=v[(z+1)*2],I=v[(z+1)*2+1],O=v[(z+2)*2],N=v[(z+2)*2+1],!(Math.abs(x*(I-N)+S*(N-E)+O*(E-I))<Re)&&ge.push(z,z+1,z+2)}function KA(t,e){let r=0;const n=t.shape,i=t.points||n.points,a=n.type!==St.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?KA(t,e):YA(t,e)}class wl{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),w=2*c*b,x=2*Math.sqrt(m),E=d/b;return(w*_+b*d*(_-x)+(4*m*c-d*d)*Math.log((2*b+E+_)/(E+x)))/(4*w)}static curveTo(e,r,n,i,a){const u=a[a.length-2],l=a[a.length-1],f=_i._segmentsCount(wl.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 Tl={[St.POLY]:_p,[St.CIRC]:Pa,[St.ELIP]:Pa,[St.RECT]:jA,[St.RREC]:WA},wp=[],Ma=[];class Al{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?je.EMPTY:(e=e||new je(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,w=u*r+f*n+v,x=l*r+p*n+c;d=w<d?w:d,m=x<m?x:m,_=w>_?w:_,b=x>b?x:b,w=u*i+f*n+v,x=l*i+p*n+c,d=w<d?w:d,m=x<m?x:m,_=w>_?w:_,b=x>b?x:b,w=u*r+f*a+v,x=l*r+p*a+c,d=w<d?w:d,m=x<m?x:m,_=w>_?w:_,b=x>b?x:b,w=u*i+f*a+v,x=l*i+p*a+c,d=w<d?w:d,m=x<m?x:m,_=w>_?w:_,b=x>b?x: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,w=this.maxY;for(let x=n;x<i;x+=2){const E=r[x],S=r[x+1],I=l*E+p*S+c,O=v*S+f*E+d;m=Math.min(m,I-a),b=Math.max(b,I+a),_=Math.min(_,O-u),w=Math.max(w,O+u)}this.minX=m,this.minY=_,this.maxX=b,this.maxY=w}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 yi extends zs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new rl,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 Al,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(yi.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 je),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new je),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Al);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 ZA),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*fw}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 ZA extends yi{constructor(){super(...arguments),this.sortDirty=null}}yi.prototype.displayObjectUpdateTransform=yi.prototype.updateTransform;const QA=new Nt;function JA(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const Sl=class extends yi{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(JA),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=QA.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!==mt.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 xi=Sl;xi.defaultSortableChildren=!1,xi.prototype.containerUpdateTransform=xi.prototype.updateTransform,Object.defineProperties(_e,{SORTABLE_CHILDREN:{get(){return xi.defaultSortableChildren},set(t){Ie("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),xi.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 bi=new qe,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 Al,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,bi):bi.copyFrom(t),n.shape.contains(bi.x,bi.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(bi.x,bi.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;Tl[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,w=this.points.length/2;_.wrapMode=qi.REPEAT,d===0?this.processFill(f):this.processLine(f);const x=this.points.length/2-w;x!==0&&(r&&!this._compareStyles(n,m)&&(r.end(b,w),r=null),r||(r=wp.pop()||new qA,r.begin(m,b,w),this.batches.push(r),n=m),this.addUvs(this.points,t,m.texture,w,x,m.matrix))}}const i=this.indices.length,a=this.points.length/2;if(r&&r.end(i,a),this.batches.length===0){this.batchable=!0;return}const u=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&u===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=u?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(t,e){return!(!t||!e||t.texture.baseTexture!==e.texture.baseTexture||t.color+t.alpha!==e.color+e.alpha||!!t.native!=!!e.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let t=0,e=this.graphicsData.length;t<e;t++){const r=this.graphicsData[t],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const t=this.batches;for(let e=0,r=t.length;e<r;e++){const n=t[e];for(let i=0;i<n.size;i++){const a=n.start+i;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const t=this.batches;for(let e=0;e<t.length;e++)if(t[e].style.native)return!1;return this.points.length<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let t=++Le._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 Qu,n.texArray=new il),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 Qu,n.texArray=new il),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)}Le._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):Tl[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];Tl[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=Pt.shared.setValue(e).toLittleEndianNumber(),u=Pt.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 Ap=Tp;Ap.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 El extends Fa{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Nn.BUTT,this.join=vr.MITER,this.miterLimit=10}clone(){const e=new El;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 Cl={},Na=class extends xi{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 El,this._matrix=null,this._holeMode=!1,this.state=ua.for2d(),this._geometry=t||new Ap,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Pt(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:Nn.BUTT,join:vr.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),wl.curveTo(t,e,r,n,i),this}bezierCurveTo(t,e,r,n,i,a){return this._initCurve(),bl.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=Pt.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 je(t,e,r,n))}drawRoundedRect(t,e,r,n,i){return this.drawShape(new el(t,e,r,n,i))}drawCircle(t,e,r){return this.drawShape(new Ju(t,e,r))}drawEllipse(t,e,r,n){return this.drawShape(new dw(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===St.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:Pt.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,Pt.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(!Cl[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 Nt,default:fr.from({uSamplers:i},!0)},u=t.plugins[r]._shader.program;Cl[r]=new ls(u,a)}e=Cl[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=Pt.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 Il=Na;Il.curves=_i,Il._TEMP_POINT=new qe;var eS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Rl={},tS={get exports(){return Rl},set exports(t){Rl=t}};/*!
|
|
1924
1938
|
* d-path-parser - v1.0.0
|
|
1925
1939
|
* by Massimo Artizzu (MaxArt2501)
|
|
1926
1940
|
*
|
|
@@ -1928,10 +1942,10 @@ void main() {
|
|
|
1928
1942
|
*
|
|
1929
1943
|
* Licensed under the MIT License
|
|
1930
1944
|
* See LICENSE for details
|
|
1931
|
-
*/(function(t,e){(function(r,n){t.exports=n()})(JA,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 w=m("number",b);if(w===null&&!b)return null;m("comma");var x=m("number",!0);return{x:+w,y:+x}},"arc definition":function(b){var w=a["coordinate pair"](b);if(!w&&!b)return null;m("comma");var x=+m("number",!0);m("comma",!0);var E=!!+m("flag",!0);m("comma");var S=!!+m("flag",!0);m("comma");var I=a["coordinate pair"](!0);return{radii:w,rotation:x,large:E,clockwise:S,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,w){return w===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,w,x){var E=x%3;if(!E)b.push(d({cp1:w}));else{var S=b[b.length-1];S[E===1?"cp2":"end"]=w}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,w,x){var E=x&1;if(!E)b.push(d({cp:w}));else{var S=b[b.length-1];S.end=w}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,w){i[b].lastIndex=u;var x=i[b].exec(n);if(!x||x.index!==u){if(!w)return null;throw Error("Expected "+b+" at position "+u)}return u=i[b].lastIndex,x[1]}function _(b){for(var w=[],x,E=!0;x=a[b](E);)w.push(x),E=!!m("comma");return w}}})})(eS);const tS=/^\s+/,rS=/\s+$/;function ne(t,e){if(t=t||"",e=e||{},t instanceof ne)return t;if(!(this instanceof ne))return new ne(t,e);var r=nS(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ne.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),e,r,n,i,a,u;return e=t.r/255,r=t.g/255,n=t.b/255,e<=.03928?i=e/12.92:i=Math.pow((e+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?u=n/12.92:u=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*u},setAlpha:function(t){return this._a=Ip(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Ap(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString: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.v*100);return this._a==1?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=Tp(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Tp(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 Sp(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return oS(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(tt(this._r,255)*100)+"%",g:Math.round(tt(this._g,255)*100)+"%",b:Math.round(tt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(tt(this._r,255)*100)+"%, "+Math.round(tt(this._g,255)*100)+"%, "+Math.round(tt(this._b,255)*100)+"%)":"rgba("+Math.round(tt(this._r,255)*100)+"%, "+Math.round(tt(this._g,255)*100)+"%, "+Math.round(tt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:yS[Sp(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+Ep(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=ne(t);r="#"+Ep(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!e&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ne(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(hS,arguments)},brighten:function(){return this._applyModification(fS,arguments)},darken:function(){return this._applyModification(dS,arguments)},desaturate:function(){return this._applyModification(uS,arguments)},saturate:function(){return this._applyModification(lS,arguments)},greyscale:function(){return this._applyModification(cS,arguments)},spin:function(){return this._applyModification(pS,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(vS,arguments)},complement:function(){return this._applyCombination(gS,arguments)},monochromatic:function(){return this._applyCombination(_S,arguments)},splitcomplement:function(){return this._applyCombination(mS,arguments)},triad:function(){return this._applyCombination(Cp,[3])},tetrad:function(){return this._applyCombination(Cp,[4])}},ne.fromRatio=function(t,e){if(typeof t=="object"){var r={};for(var n in t)t.hasOwnProperty(n)&&(n==="a"?r[n]=t[n]:r[n]=hs(t[n]));t=r}return ne(t,e)};function nS(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=TS(t)),typeof t=="object"&&(Dr(t.r)&&Dr(t.g)&&Dr(t.b)?(e=iS(t.r,t.g,t.b),u=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Dr(t.h)&&Dr(t.s)&&Dr(t.v)?(n=hs(t.s),i=hs(t.v),e=aS(t.h,n,i),u=!0,l="hsv"):Dr(t.h)&&Dr(t.s)&&Dr(t.l)&&(n=hs(t.s),a=hs(t.l),e=sS(t.h,n,a),u=!0,l="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=Ip(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 iS(t,e,r){return{r:tt(t,255)*255,g:tt(e,255)*255,b:tt(r,255)*255}}function Tp(t,e,r){t=tt(t,255),e=tt(e,255),r=tt(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 sS(t,e,r){var n,i,a;t=tt(t,360),e=tt(e,100),r=tt(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 Ap(t,e,r){t=tt(t,255),e=tt(e,255),r=tt(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 aS(t,e,r){t=tt(t,360)*6,e=tt(e,100),r=tt(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 Sp(t,e,r,n){var i=[fr(Math.round(t).toString(16)),fr(Math.round(e).toString(16)),fr(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 oS(t,e,r,n,i){var a=[fr(Math.round(t).toString(16)),fr(Math.round(e).toString(16)),fr(Math.round(r).toString(16)),fr(Rp(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 Ep(t,e,r,n){var i=[fr(Rp(n)),fr(Math.round(t).toString(16)),fr(Math.round(e).toString(16)),fr(Math.round(r).toString(16))];return i.join("")}ne.equals=function(t,e){return!t||!e?!1:ne(t).toRgbString()==ne(e).toRgbString()},ne.random=function(){return ne.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function uS(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.s-=e/100,r.s=Fa(r.s),ne(r)}function lS(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.s+=e/100,r.s=Fa(r.s),ne(r)}function cS(t){return ne(t).desaturate(100)}function hS(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.l+=e/100,r.l=Fa(r.l),ne(r)}function fS(t,e){e=e===0?0:e||10;var r=ne(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),ne(r)}function dS(t,e){e=e===0?0:e||10;var r=ne(t).toHsl();return r.l-=e/100,r.l=Fa(r.l),ne(r)}function pS(t,e){var r=ne(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,ne(r)}function gS(t){var e=ne(t).toHsl();return e.h=(e.h+180)%360,ne(e)}function Cp(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ne(t).toHsl(),n=[ne(t)],i=360/e,a=1;a<e;a++)n.push(ne({h:(r.h+a*i)%360,s:r.s,l:r.l}));return n}function mS(t){var e=ne(t).toHsl(),r=e.h;return[ne(t),ne({h:(r+72)%360,s:e.s,l:e.l}),ne({h:(r+216)%360,s:e.s,l:e.l})]}function vS(t,e,r){e=e||6,r=r||30;var n=ne(t).toHsl(),i=360/r,a=[ne(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(ne(n));return a}function _S(t,e){e=e||6;for(var r=ne(t).toHsv(),n=r.h,i=r.s,a=r.v,u=[],l=1/e;e--;)u.push(ne({h:n,s:i,v:a})),a=(a+l)%1;return u}ne.mix=function(t,e,r){r=r===0?0:r||50;var n=ne(t).toRgb(),i=ne(e).toRgb(),a=r/100,u={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return ne(u)},ne.readability=function(t,e){var r=ne(t),n=ne(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},ne.isReadable=function(t,e,r){var n=ne.readability(t,e),i,a;switch(a=!1,i=AS(r),i.level+i.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a},ne.mostReadable=function(t,e,r){var n=null,i=0,a,u,l,f;r=r||{},u=r.includeFallbackColors,l=r.level,f=r.size;for(var p=0;p<e.length;p++)a=ne.readability(t,e[p]),a>i&&(i=a,n=ne(e[p]));return ne.isReadable(t,n,{level:l,size:f})||!u?n:(r.includeFallbackColors=!1,ne.mostReadable(t,["#fff","#000"],r))};var Rl=ne.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},yS=ne.hexNames=xS(Rl);function xS(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function Ip(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function tt(t,e){bS(t)&&(t="100%");var r=wS(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 Fa(t){return Math.min(1,Math.max(0,t))}function Gt(t){return parseInt(t,16)}function bS(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function wS(t){return typeof t=="string"&&t.indexOf("%")!=-1}function fr(t){return t.length==1?"0"+t:""+t}function hs(t){return t<=1&&(t=t*100+"%"),t}function Rp(t){return Math.round(parseFloat(t)*255).toString(16)}function Pp(t){return Gt(t)/255}var dr=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 Dr(t){return!!dr.CSS_UNIT.exec(t)}function TS(t){t=t.replace(tS,"").replace(rS,"").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=dr.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=dr.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=dr.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=dr.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=dr.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=dr.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=dr.hex8.exec(t))?{r:Gt(r[1]),g:Gt(r[2]),b:Gt(r[3]),a:Pp(r[4]),format:e?"name":"hex8"}:(r=dr.hex6.exec(t))?{r:Gt(r[1]),g:Gt(r[2]),b:Gt(r[3]),format:e?"name":"hex"}:(r=dr.hex4.exec(t))?{r:Gt(r[1]+""+r[1]),g:Gt(r[2]+""+r[2]),b:Gt(r[3]+""+r[3]),a:Pp(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=dr.hex3.exec(t))?{r:Gt(r[1]+""+r[1]),g:Gt(r[2]+""+r[2]),b:Gt(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function AS(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 SS=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")}}(),fs=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}},ES=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}]},Mp=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)},CS=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),w=Math.pow(d,2),x=m*_-m*w-_*b;x<0&&(x=0),x/=m*w+_*b,x=Math.sqrt(x)*(l===f?-1:1);var E=x*a/u*d,S=x*-u/a*c,I=v*E-p*S+(e+n)/2,O=p*E+v*S+(r+i)/2,N=(c-E)/a,L=(d-S)/u,k=(-c-E)/a,$=(-d-S)/u,j=Mp(1,0,N,L),ee=Mp(N,L,k,$);return f===0&&ee>0&&(ee-=fs),f===1&&ee<0&&(ee+=fs),[I,O,j,ee]},Op=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*fs/360),w=Math.cos(p*fs/360),x=w*(r-i)/2+b*(n-a)/2,E=-b*(r-i)/2+w*(n-a)/2;if(x===0&&E===0)return[];u=Math.abs(u),l=Math.abs(l);var S=Math.pow(x,2)/Math.pow(u,2)+Math.pow(E,2)/Math.pow(l,2);S>1&&(u*=Math.sqrt(S),l*=Math.sqrt(S));var I=CS(r,n,i,a,u,l,c,m,b,w,x,E),O=SS(I,4),N=O[0],L=O[1],k=O[2],$=O[3],j=Math.abs($)/(fs/4);Math.abs(1-j)<1e-7&&(j=1);var ee=Math.max(Math.ceil(j),1);$/=ee;for(var se=0;se<ee;se++)_.push(ES(k,$)),k+=$;return _.map(function(X){var H=Pl(X[0],u,l,w,b,N,L),ve=H.x,ke=H.y,z=Pl(X[1],u,l,w,b,N,L),re=z.x,ge=z.y,V=Pl(X[2],u,l,w,b,N,L),K=V.x,he=V.y;return{x1:ve,y1:ke,x2:re,y2:ge,x:K,y:he}})};class IS 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}=ne(e).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(e){let r="r",n="r";const i=e.nodeName==="elipse";i&&(r+="x",n+="y");const a=parseFloat(e.getAttribute(n)),u=parseFloat(e.getAttribute(r)),l=e.getAttribute("cx"),f=e.getAttribute("cy");let p=0,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":{Op({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":{Op({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 Na={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},RS=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function PS(t){return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&RS.indexOf(t)>=0}function MS(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 OS(t){return(t|32)===97}function yi(t){return t>=48&&t<=57}function FS(t){return t>=48&&t<=57||t===43||t===45||t===46}function NS(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function La(t){for(;t.index<t.max&&PS(t.path.charCodeAt(t.index));)t.index++}function LS(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 kS(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),!yi(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&&yi(f)){t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+e+")";return}for(;r<n&&yi(t.path.charCodeAt(r));)r++,a=!0;f=r<n?t.path.charCodeAt(r):0}if(f===46){for(l=!0,r++;yi(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&&yi(t.path.charCodeAt(r)))for(;r<n&&yi(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>=Na[r]&&(t.result.push([e].concat(n.splice(0,Na[r]))),!!Na[r]););}function BS(t){var e=t.max,r,n,i,a,u;if(t.segmentStart=t.index,r=t.path.charCodeAt(t.index),n=OS(r),!MS(r)){t.err="SvgPath: bad command "+t.path[t.index]+" (at pos "+t.index+")";return}if(a=Na[t.path[t.index].toLowerCase()],t.index++,La(t),t.data=[],!a){Ml(t);return}for(i=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?LS(t):kS(t),t.err.length){Ml(t);return}t.data.push(t.param),La(t),i=!1,t.index<e&&t.path.charCodeAt(t.index)===44&&(t.index++,La(t),i=!0)}if(!i&&(t.index>=t.max||!FS(t.path.charCodeAt(t.index))))break}Ml(t)}var DS=function(e){var r=new NS(e),n=r.max;for(La(r);r.index<n&&!r.err.length;)BS(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 US(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 pr(){if(!(this instanceof pr))return new pr;this.queue=[],this.cache=null}pr.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)},pr.prototype.translate=function(t,e){return(t!==0||e!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},pr.prototype.scale=function(t,e){return(t!==1||e!==1)&&(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},pr.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},pr.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},pr.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},pr.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=US(this.cache,this.queue[t]);return this.cache},pr.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 Fp=pr,$S=Fp,GS={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},zS=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,HS=/[\s,]+/,VS=function(e){var r=new $S,n,i;return e.split(zS).forEach(function(a){if(a.length){if(typeof GS[a]<"u"){n=a;return}switch(i=a.split(HS).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},ds=Math.PI*2;function Np(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 XS(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,w=d*m-d*b-m*_;w<0&&(w=0),w/=d*b+m*_,w=Math.sqrt(w)*(i===a?-1:1);var x=w*u/l*c,E=w*-l/u*v,S=p*x-f*E+(t+r)/2,I=f*x+p*E+(e+n)/2,O=(v-x)/u,N=(c-E)/l,L=(-v-x)/u,k=(-c-E)/l,$=Np(1,0,O,N),j=Np(O,N,L,k);return a===0&&j>0&&(j-=ds),a===1&&j<0&&(j+=ds),[S,I,$,j]}function jS(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 WS=function(e,r,n,i,a,u,l,f,p){var v=Math.sin(p*ds/360),c=Math.cos(p*ds/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=XS(e,r,n,i,a,u,l,f,v,c),w=[],x=b[2],E=b[3],S=Math.max(Math.ceil(Math.abs(E)/(ds/4)),1);E/=S;for(var I=0;I<S;I++)w.push(jS(x,E)),x+=E;return w.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 $=c*L-v*k,j=v*L+c*k;O[N+0]=$+b[0],O[N+1]=j+b[1]}return O})},ps=1e-10,Lp=Math.PI/180;function gs(t,e,r){if(!(this instanceof gs))return new gs(t,e,r);this.rx=t,this.ry=e,this.ax=r}gs.prototype.transform=function(t){var e=Math.cos(this.ax*Lp),r=Math.sin(this.ax*Lp),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<ps*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)<ps&&Math.abs(p-a)<ps?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},gs.prototype.isDegenerate=function(){return this.rx<ps*this.ry||this.ry<ps*this.rx};var qS=gs,YS=DS,KS=VS,nn=Fp,ZS=WS,QS=qS;function st(t){if(!(this instanceof st))return new st(t);var e=YS(t);this.segments=e.segments,this.err=e.err,this.__stack=[]}st.from=function(t){if(typeof t=="string")return new st(t);if(t instanceof st){var e=new st("");return e.err=t.err,e.segments=t.segments.map(function(r){return r.slice()}),e.__stack=t.__stack.map(function(r){return nn().matrix(r.toArray())}),e}throw new Error("SvgPath.from: invalid param type "+t)},st.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=QS(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)},st.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=nn(),e=this.__stack.length;--e>=0;)t.matrix(this.__stack[e].toArray());this.__matrix(t),this.__stack=[]}},st.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},st.prototype.translate=function(t,e){return this.__stack.push(nn().translate(t,e||0)),this},st.prototype.scale=function(t,e){return this.__stack.push(nn().scale(t,!e&&e!==0?t:e)),this},st.prototype.rotate=function(t,e,r){return this.__stack.push(nn().rotate(t,e||0,r||0)),this},st.prototype.skewX=function(t){return this.__stack.push(nn().skewX(t)),this},st.prototype.skewY=function(t){return this.__stack.push(nn().skewY(t)),this},st.prototype.matrix=function(t){return this.__stack.push(nn().matrix(t)),this},st.prototype.transform=function(t){return t.trim()?(this.__stack.push(KS(t)),this):this},st.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},st.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},st.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},st.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},st.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=ZS(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},st.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 JS=st,eE=JS;const tE=Hn(eE),rE=ie.forwardRef((t,e)=>{const[r,n]=ie.useState(null),i=q.useRef(null),a=q.useRef(null),u=q.useRef(null),{path:l,visible:f,transformation:{x:p,y:v,width:c,height:d,anchor:m,hexColor:_,fill:b,stroke:w="none",strokeWidth:x=0,colorCorrection:E={}},pointerdown:S,pointerup:I}=t,O=et.useApp(),{temperatureFilter:N,sharpnessFilter:L,hueFilter:k,blurFilter:$,adjustmentFilter:j}=cs(E),{blurRadius:ee=0}=E;return ie.useEffect(()=>{const se=tE(l).scale(5).translate(0,0).toString(),X=`<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${d}">
|
|
1932
|
-
<path stroke="${
|
|
1945
|
+
*/(function(t,e){(function(r,n){t.exports=n()})(eS,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 w=m("number",b);if(w===null&&!b)return null;m("comma");var x=m("number",!0);return{x:+w,y:+x}},"arc definition":function(b){var w=a["coordinate pair"](b);if(!w&&!b)return null;m("comma");var x=+m("number",!0);m("comma",!0);var E=!!+m("flag",!0);m("comma");var S=!!+m("flag",!0);m("comma");var I=a["coordinate pair"](!0);return{radii:w,rotation:x,large:E,clockwise:S,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,w){return w===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,w,x){var E=x%3;if(!E)b.push(d({cp1:w}));else{var S=b[b.length-1];S[E===1?"cp2":"end"]=w}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,w,x){var E=x&1;if(!E)b.push(d({cp:w}));else{var S=b[b.length-1];S.end=w}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,w){i[b].lastIndex=u;var x=i[b].exec(n);if(!x||x.index!==u){if(!w)return null;throw Error("Expected "+b+" at position "+u)}return u=i[b].lastIndex,x[1]}function _(b){for(var w=[],x,E=!0;x=a[b](E);)w.push(x),E=!!m("comma");return w}}})})(tS);const rS=/^\s+/,nS=/\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=iS(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=Sp(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Sp(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 uS(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:xS[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(fS,arguments)},brighten:function(){return this._applyModification(dS,arguments)},darken:function(){return this._applyModification(pS,arguments)},desaturate:function(){return this._applyModification(lS,arguments)},saturate:function(){return this._applyModification(cS,arguments)},greyscale:function(){return this._applyModification(hS,arguments)},spin:function(){return this._applyModification(gS,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(_S,arguments)},complement:function(){return this._applyCombination(mS,arguments)},monochromatic:function(){return this._applyCombination(yS,arguments)},splitcomplement:function(){return this._applyCombination(vS,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]=gs(t[n]));t=r}return re(t,e)};function iS(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=AS(t)),typeof t=="object"&&(Gr(t.r)&&Gr(t.g)&&Gr(t.b)?(e=sS(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=gs(t.s),i=gs(t.v),e=oS(t.h,n,i),u=!0,l="hsv"):Gr(t.h)&&Gr(t.s)&&Gr(t.l)&&(n=gs(t.s),a=gs(t.l),e=aS(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 sS(t,e,r){return{r:nt(t,255)*255,g:nt(e,255)*255,b:nt(r,255)*255}}function Sp(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 aS(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 oS(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=[_r(Math.round(t).toString(16)),_r(Math.round(e).toString(16)),_r(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 uS(t,e,r,n,i){var a=[_r(Math.round(t).toString(16)),_r(Math.round(e).toString(16)),_r(Math.round(r).toString(16)),_r(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=[_r(Mp(n)),_r(Math.round(t).toString(16)),_r(Math.round(e).toString(16)),_r(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 lS(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 cS(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 hS(t){return re(t).desaturate(100)}function fS(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 dS(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 pS(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 gS(t,e){var r=re(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,re(r)}function mS(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 vS(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 _S(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 yS(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=SS(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 Pl=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"},xS=re.hexNames=bS(Pl);function bS(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){wS(t)&&(t="100%");var r=TS(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 wS(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function TS(t){return typeof t=="string"&&t.indexOf("%")!=-1}function _r(t){return t.length==1?"0"+t:""+t}function gs(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 yr=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!!yr.CSS_UNIT.exec(t)}function AS(t){t=t.replace(rS,"").replace(nS,"").toLowerCase();var e=!1;if(Pl[t])t=Pl[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=yr.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=yr.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=yr.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=yr.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=yr.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=yr.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=yr.hex8.exec(t))?{r:jt(r[1]),g:jt(r[2]),b:jt(r[3]),a:Op(r[4]),format:e?"name":"hex8"}:(r=yr.hex6.exec(t))?{r:jt(r[1]),g:jt(r[2]),b:jt(r[3]),format:e?"name":"hex"}:(r=yr.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=yr.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 SS(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 ES=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")}}(),ms=Math.PI*2,Ml=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}},CS=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)},IS=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),w=Math.pow(d,2),x=m*_-m*w-_*b;x<0&&(x=0),x/=m*w+_*b,x=Math.sqrt(x)*(l===f?-1:1);var E=x*a/u*d,S=x*-u/a*c,I=v*E-p*S+(e+n)/2,O=p*E+v*S+(r+i)/2,N=(c-E)/a,L=(d-S)/u,k=(-c-E)/a,$=(-d-S)/u,j=Fp(1,0,N,L),Q=Fp(N,L,k,$);return f===0&&Q>0&&(Q-=ms),f===1&&Q<0&&(Q+=ms),[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*ms/360),w=Math.cos(p*ms/360),x=w*(r-i)/2+b*(n-a)/2,E=-b*(r-i)/2+w*(n-a)/2;if(x===0&&E===0)return[];u=Math.abs(u),l=Math.abs(l);var S=Math.pow(x,2)/Math.pow(u,2)+Math.pow(E,2)/Math.pow(l,2);S>1&&(u*=Math.sqrt(S),l*=Math.sqrt(S));var I=IS(r,n,i,a,u,l,c,m,b,w,x,E),O=ES(I,4),N=O[0],L=O[1],k=O[2],$=O[3],j=Math.abs($)/(ms/4);Math.abs(1-j)<1e-7&&(j=1);var Q=Math.max(Math.ceil(j),1);$/=Q;for(var de=0;de<Q;de++)_.push(CS(k,$)),k+=$;return _.map(function(H){var V=Ml(H[0],u,l,w,b,N,L),ge=V.x,Re=V.y,z=Ml(H[1],u,l,w,b,N,L),ee=z.x,fe=z.y,X=Ml(H[2],u,l,w,b,N,L),Y=X.x,le=X.y;return{x1:ge,y1:Re,x2:ee,y2:fe,x:Y,y:le}})};class RS extends Il{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=Rl(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},PS=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function MS(t){return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&PS.indexOf(t)>=0}function OS(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 FS(t){return(t|32)===97}function wi(t){return t>=48&&t<=57}function NS(t){return t>=48&&t<=57||t===43||t===45||t===46}function LS(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&&MS(t.path.charCodeAt(t.index));)t.index++}function kS(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 BS(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),!wi(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&&wi(f)){t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+e+")";return}for(;r<n&&wi(t.path.charCodeAt(r));)r++,a=!0;f=r<n?t.path.charCodeAt(r):0}if(f===46){for(l=!0,r++;wi(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&&wi(t.path.charCodeAt(r)))for(;r<n&&wi(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 Ol(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 DS(t){var e=t.max,r,n,i,a,u;if(t.segmentStart=t.index,r=t.path.charCodeAt(t.index),n=FS(r),!OS(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){Ol(t);return}for(i=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?kS(t):BS(t),t.err.length){Ol(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||!NS(t.path.charCodeAt(t.index))))break}Ol(t)}var US=function(e){var r=new LS(e),n=r.max;for(Ba(r);r.index<n&&!r.err.length;)DS(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 $S(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 xr(){if(!(this instanceof xr))return new xr;this.queue=[],this.cache=null}xr.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)},xr.prototype.translate=function(t,e){return(t!==0||e!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},xr.prototype.scale=function(t,e){return(t!==1||e!==1)&&(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},xr.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},xr.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},xr.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},xr.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=$S(this.cache,this.queue[t]);return this.cache},xr.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=xr,GS=Lp,zS={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},HS=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,VS=/[\s,]+/,XS=function(e){var r=new GS,n,i;return e.split(HS).forEach(function(a){if(a.length){if(typeof zS[a]<"u"){n=a;return}switch(i=a.split(VS).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},vs=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 jS(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,w=d*m-d*b-m*_;w<0&&(w=0),w/=d*b+m*_,w=Math.sqrt(w)*(i===a?-1:1);var x=w*u/l*c,E=w*-l/u*v,S=p*x-f*E+(t+r)/2,I=f*x+p*E+(e+n)/2,O=(v-x)/u,N=(c-E)/l,L=(-v-x)/u,k=(-c-E)/l,$=kp(1,0,O,N),j=kp(O,N,L,k);return a===0&&j>0&&(j-=vs),a===1&&j<0&&(j+=vs),[S,I,$,j]}function WS(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 qS=function(e,r,n,i,a,u,l,f,p){var v=Math.sin(p*vs/360),c=Math.cos(p*vs/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=jS(e,r,n,i,a,u,l,f,v,c),w=[],x=b[2],E=b[3],S=Math.max(Math.ceil(Math.abs(E)/(vs/4)),1);E/=S;for(var I=0;I<S;I++)w.push(WS(x,E)),x+=E;return w.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 $=c*L-v*k,j=v*L+c*k;O[N+0]=$+b[0],O[N+1]=j+b[1]}return O})},_s=1e-10,Bp=Math.PI/180;function ys(t,e,r){if(!(this instanceof ys))return new ys(t,e,r);this.rx=t,this.ry=e,this.ax=r}ys.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<_s*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)<_s&&Math.abs(p-a)<_s?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},ys.prototype.isDegenerate=function(){return this.rx<_s*this.ry||this.ry<_s*this.rx};var YS=ys,KS=US,ZS=XS,on=Lp,QS=qS,JS=YS;function ot(t){if(!(this instanceof ot))return new ot(t);var e=KS(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=JS(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(ZS(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=QS(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 eE=ot,tE=eE;const rE=jn(tE),nE=ie.forwardRef((t,e)=>{const[r,n]=ie.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:w,stroke:x="none",strokeWidth:E=0,colorCorrection:S={}},pointerdown:I,pointerup:O}=t,N=rt.useApp(),{temperatureFilter:L,sharpnessFilter:k,hueFilter:$,blurFilter:j,adjustmentFilter:Q,vignetteFilter:de,noiseFilter:H}=ps(S),{blurRadius:V=0,vignette:ge=0,noise:Re=0}=S;return ie.useEffect(()=>{const z=rE(l).scale(5).translate(0,0).toString(),ee=`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${m}">
|
|
1946
|
+
<path stroke="${x}" stroke-width="${E}" fill="${b||w}" d="${z}">
|
|
1933
1947
|
</path>
|
|
1934
|
-
</svg>`,
|
|
1948
|
+
</svg>`,fe=new RS(ee),X=N.renderer.generateTexture(fe);return n(X),()=>{}},[N,l,x,E,b,w]),Fe.jsx(Kn,{...t,ref:e,children:Fe.jsx(rt.Container,{ref:a,children:Fe.jsx(rt.Container,{ref:u,children:r&&Fe.jsx(rt.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,$,Q,...V>0?[j]:[],...ge>0?[de]:[],...Re>0?[H]:[]]})})})})});var Dp={};/*!
|
|
1935
1949
|
* howler.js v2.2.3
|
|
1936
1950
|
* howlerjs.com
|
|
1937
1951
|
*
|
|
@@ -1939,7 +1953,7 @@ void main() {
|
|
|
1939
1953
|
* goldfirestudios.com
|
|
1940
1954
|
*
|
|
1941
1955
|
* MIT License
|
|
1942
|
-
*/(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 w=d._howls[m]._soundById(_[b]);w&&w._node&&(w._node.volume=w._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 w=d._howls[m]._soundById(_[b]);w&&w._node&&(w._node.muted=c?!0:w._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),w=b&&parseInt(b[0].split("/")[1],10)<33,x=_.indexOf("Safari")!==-1&&_.indexOf("Chrome")===-1,E=_.match(/Version\/(.*?) /),S=x&&E&&parseInt(E[1],10)<15;return c._codecs={mp3:!!(!w&&(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:!!(!S&&d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!S&&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 w=c._howls[b]._getSoundIds(),x=0;x<w.length;x++){var E=c._howls[b]._soundById(w[x]);E&&E._node&&!E._node._unlocked&&(E._node._unlocked=!0,E._node.load())}c._autoResume();var S=c.ctx.createBufferSource();S.buffer=c._scratchBuffer,S.connect(c.ctx.destination),typeof S.start>"u"?S.noteOn(0):S.start(0),typeof c.ctx.resume=="function"&&c.ctx.resume(),S.onended=function(){S.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,w=0;w<m._sounds.length;w++)m._sounds[w]._paused&&!m._sounds[w]._ended&&(b++,_=m._sounds[w]._id);b===1?c=null:_=null}}var x=_?m._soundById(_):m._inactiveSound();if(!x)return null;if(_&&!c&&(c=x._sprite||"__default"),m._state!=="loaded"){x._sprite=c,x._ended=!1;var E=x._id;return m._queue.push({event:"play",action:function(){m.play(E)}}),E}if(_&&!x._paused)return d||m._loadQueue("play"),x._id;m._webAudio&&r._autoResume();var S=Math.max(0,x._seek>0?x._seek:m._sprite[c][0]/1e3),I=Math.max(0,(m._sprite[c][0]+m._sprite[c][1])/1e3-S),O=I*1e3/Math.abs(x._rate),N=m._sprite[c][0]/1e3,L=(m._sprite[c][0]+m._sprite[c][1])/1e3;x._sprite=c,x._ended=!1;var k=function(){x._paused=!1,x._seek=S,x._start=N,x._stop=L,x._loop=!!(x._loop||m._sprite[c][2])};if(S>=L){m._ended(x);return}var $=x._node;if(m._webAudio){var j=function(){m._playLock=!1,k(),m._refreshBuffer(x);var H=x._muted||m._muted?0:x._volume;$.gain.setValueAtTime(H,r.ctx.currentTime),x._playStart=r.ctx.currentTime,typeof $.bufferSource.start>"u"?x._loop?$.bufferSource.noteGrainOn(0,S,86400):$.bufferSource.noteGrainOn(0,S,I):x._loop?$.bufferSource.start(0,S,86400):$.bufferSource.start(0,S,I),O!==1/0&&(m._endTimers[x._id]=setTimeout(m._ended.bind(m,x),O)),d||setTimeout(function(){m._emit("play",x._id),m._loadQueue()},0)};r.state==="running"&&r.ctx.state!=="interrupted"?j():(m._playLock=!0,m.once("resume",j),m._clearTimer(x._id))}else{var ee=function(){$.currentTime=S,$.muted=x._muted||m._muted||r._muted||$.muted,$.volume=x._volume*r.volume(),$.playbackRate=x._rate;try{var H=$.play();if(H&&typeof Promise<"u"&&(H instanceof Promise||typeof H.then=="function")?(m._playLock=!0,k(),H.then(function(){m._playLock=!1,$._unlocked=!0,d?m._loadQueue():m._emit("play",x._id)}).catch(function(){m._playLock=!1,m._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),x._ended=!0,x._paused=!0})):d||(m._playLock=!1,k(),m._emit("play",x._id)),$.playbackRate=x._rate,$.paused){m._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}c!=="__default"||x._loop?m._endTimers[x._id]=setTimeout(m._ended.bind(m,x),O):(m._endTimers[x._id]=function(){m._ended(x),$.removeEventListener("ended",m._endTimers[x._id],!1)},$.addEventListener("ended",m._endTimers[x._id],!1))}catch(ve){m._emit("playerror",x._id,ve)}};$.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&($.src=m._src,$.load());var se=window&&window.ejecta||!$.readyState&&r._navigator.isCocoonJS;if($.readyState>=3||se)ee();else{m._playLock=!0,m._state="loading";var X=function(){m._state="loaded",ee(),$.removeEventListener(r._canPlayEvent,X,!1)};$.addEventListener(r._canPlayEvent,X,!1),m._clearTimer(x._id)}}return x._id},pause:function(c){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"pause",action:function(){d.pause(c)}}),d;for(var m=d._getSoundIds(c),_=0;_<m.length;_++){d._clearTimer(m[_]);var 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 w=m._soundById(_[b]);w&&(w._seek=w._start||0,w._rateSeek=0,w._paused=!0,w._ended=!0,m._stopFade(_[b]),w._node&&(m._webAudio?w._node.bufferSource&&(typeof w._node.bufferSource.stop>"u"?w._node.bufferSource.noteOff(0):w._node.bufferSource.stop(0),m._cleanBuffer(w._node)):(!isNaN(w._node.duration)||w._node.duration===1/0)&&(w._node.currentTime=w._start||0,w._node.pause(),w._node.duration===1/0&&m._clearSound(w._node))),d||m._emit("stop",w._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 w=m._soundById(_[b]);w&&(w._muted=c,w._interval&&m._stopFade(w._id),m._webAudio&&w._node?w._node.gain.setValueAtTime(c?0:w._volume,r.ctx.currentTime):w._node&&(w._node.muted=r._muted?!0:c),m._emit("mute",w._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(),w=b.indexOf(d[0]);w>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length>=2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var x;if(typeof m<"u"&&m>=0&&m<=1){if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"volume",action:function(){c.volume.apply(c,d)}}),c;typeof _>"u"&&(c._volume=m),_=c._getSoundIds(_);for(var E=0;E<_.length;E++)x=c._soundById(_[E]),x&&(x._volume=m,d[2]||c._stopFade(_[E]),c._webAudio&&x._node&&!x._muted?x._node.gain.setValueAtTime(m,r.ctx.currentTime):x._node&&!x._muted&&(x._node.volume=m*r.volume()),c._emit("volume",x._id))}else return x=_?c._soundById(_):c._sounds[0],x?x._volume:0;return c},fade:function(c,d,m,_){var 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 w=b._getSoundIds(_),x=0;x<w.length;x++){var E=b._soundById(w[x]);if(E){if(_||b._stopFade(w[x]),b._webAudio&&!E._muted){var S=r.ctx.currentTime,I=S+m/1e3;E._volume=c,E._node.gain.setValueAtTime(c,S),E._node.gain.linearRampToValueAtTime(d,I)}b._startFadeInterval(E,c,d,m,w[x],typeof _>"u")}}return b},_startFadeInterval:function(c,d,m,_,b,w){var x=this,E=d,S=m-d,I=Math.abs(S/.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+=S*L,E=Math.round(E*100)/100,S<0?E=Math.max(m,E):E=Math.min(m,E),x._webAudio?c._volume=E:x.volume(E,c._id,!0),w&&(x._volume=E),(m<d&&E<=m||m>d&&E>=m)&&(clearInterval(c._interval),c._interval=null,c._fadeTo=null,x.volume(m,c._id),x._emit("fade",c._id))},O)},_stopFade:function(c){var d=this,m=d._soundById(c);return m&&m._interval&&(d._webAudio&&m._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(m._interval),m._interval=null,d.volume(m._fadeTo,c),m._fadeTo=null,d._emit("fade",c)),d},loop:function(){var c=this,d=arguments,m,_,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 w=c._getSoundIds(_),x=0;x<w.length;x++)b=c._soundById(w[x]),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(w[x])&&(c.pause(w[x],!0),c.play(w[x],!0)))));return c},rate:function(){var c=this,d=arguments,m,_;if(d.length===0)_=c._sounds[0]._id;else if(d.length===1){var b=c._getSoundIds(),w=b.indexOf(d[0]);w>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var x;if(typeof m=="number"){if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"rate",action:function(){c.rate.apply(c,d)}}),c;typeof _>"u"&&(c._rate=m),_=c._getSoundIds(_);for(var E=0;E<_.length;E++)if(x=c._soundById(_[E]),x){c.playing(_[E])&&(x._rateSeek=c.seek(_[E]),x._playStart=c._webAudio?r.ctx.currentTime:x._playStart),x._rate=m,c._webAudio&&x._node&&x._node.bufferSource?x._node.bufferSource.playbackRate.setValueAtTime(m,r.ctx.currentTime):x._node&&(x._node.playbackRate=m);var S=c.seek(_[E]),I=(c._sprite[x._sprite][0]+c._sprite[x._sprite][1])/1e3-S,O=I*1e3/Math.abs(x._rate);(c._endTimers[_[E]]||!x._paused)&&(c._clearTimer(_[E]),c._endTimers[_[E]]=setTimeout(c._ended.bind(c,x),O)),c._emit("rate",x._id)}}else return x=c._soundById(_),x?x._rate:c._rate;return c},seek:function(){var c=this,d=arguments,m,_;if(d.length===0)c._sounds.length&&(_=c._sounds[0]._id);else if(d.length===1){var b=c._getSoundIds(),w=b.indexOf(d[0]);w>=0?_=parseInt(d[0],10):c._sounds.length&&(_=c._sounds[0]._id,m=parseFloat(d[0]))}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));if(typeof _>"u")return 0;if(typeof m=="number"&&(c._state!=="loaded"||c._playLock))return c._queue.push({event:"seek",action:function(){c.seek.apply(c,d)}}),c;var x=c._soundById(_);if(x)if(typeof m=="number"&&m>=0){var E=c.playing(_);E&&c.pause(_,!0),x._seek=m,x._ended=!1,c._clearTimer(_),!c._webAudio&&x._node&&!isNaN(x._node.duration)&&(x._node.currentTime=m);var S=function(){E&&c.play(_,!0),c._emit("seek",_)};if(E&&!c._webAudio){var I=function(){c._playLock?setTimeout(I,0):S()};setTimeout(I,0)}else S()}else if(c._webAudio){var O=c.playing(_)?r.ctx.currentTime-x._playStart:0,N=x._rateSeek?x._rateSeek-x._seek:0;return x._seek+(N+O*Math.abs(x._rate))}else return x._node.currentTime;return c},playing:function(c){var d=this;if(typeof c=="number"){var m=d._soundById(c);return m?!m._paused:!1}for(var _=0;_<d._sounds.length;_++)if(!d._sounds[_]._paused)return!0;return!1},duration:function(c){var d=this,m=d._duration,_=d._soundById(c);return _&&(m=d._sprite[_._sprite][1]/1e3),m},state:function(){return this._state},unload:function(){for(var c=this,d=c._sounds,m=0;m<d.length;m++)d[m]._paused||c.stop(d[m]._id),c._webAudio||(c._clearSound(d[m]._node),d[m]._node.removeEventListener("error",d[m]._errorFn,!1),d[m]._node.removeEventListener(r._canPlayEvent,d[m]._loadFn,!1),d[m]._node.removeEventListener("ended",d[m]._endFn,!1),r._releaseHtml5Audio(d[m]._node)),delete d[m]._node,c._clearTimer(d[m]._id);var _=r._howls.indexOf(c);_>=0&&r._howls.splice(_,1);var 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,w=b["_on"+c];return typeof d=="function"&&w.push(_?{id:m,fn:d,once:_}:{id:m,fn:d}),b},off:function(c,d,m){var _=this,b=_["_on"+c],w=0;if(typeof d=="number"&&(m=d,d=null),d||m)for(w=0;w<b.length;w++){var x=m===b[w].id;if(d===b[w].fn&&x||!d&&x){b.splice(w,1);break}}else if(c)_["_on"+c]=[];else{var E=Object.keys(_);for(w=0;w<E.length;w++)E[w].indexOf("_on")===0&&Array.isArray(_[E[w]])&&(_[E[w]]=[])}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],w=b.length-1;w>=0;w--)(!b[w].id||b[w].id===d||c==="load")&&(setTimeout((function(x){x.call(this,d,m)}).bind(_,b[w].fn),0),b[w].once&&_.off(c,b[w].fn,b[w].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 w=new XMLHttpRequest;w.open(c._xhr.method,d,!0),w.withCredentials=c._xhr.withCredentials,w.responseType="arraybuffer",c._xhr.headers&&Object.keys(c._xhr.headers).forEach(function(x){w.setRequestHeader(x,c._xhr.headers[x])}),w.onload=function(){var x=(w.status+"")[0];if(x!=="0"&&x!=="2"&&x!=="3"){c._emit("loaderror",null,"Failed loading audio file with status: "+w.status+".");return}f(w.response,c)},w.onerror=function(){c._webAudio&&(c._html5=!0,c._webAudio=!1,c._sounds=[],delete a[d],c.load())},l(w)}},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 bt<"u"?(bt.HowlerGlobal=e,bt.Howler=r,bt.Howl=n,bt.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 w=d._howls[m]._soundById(_[b]);w&&w._node&&(w._node.volume=w._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 w=d._howls[m]._soundById(_[b]);w&&w._node&&(w._node.muted=c?!0:w._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),w=b&&parseInt(b[0].split("/")[1],10)<33,x=_.indexOf("Safari")!==-1&&_.indexOf("Chrome")===-1,E=_.match(/Version\/(.*?) /),S=x&&E&&parseInt(E[1],10)<15;return c._codecs={mp3:!!(!w&&(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:!!(!S&&d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!S&&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 w=c._howls[b]._getSoundIds(),x=0;x<w.length;x++){var E=c._howls[b]._soundById(w[x]);E&&E._node&&!E._node._unlocked&&(E._node._unlocked=!0,E._node.load())}c._autoResume();var S=c.ctx.createBufferSource();S.buffer=c._scratchBuffer,S.connect(c.ctx.destination),typeof S.start>"u"?S.noteOn(0):S.start(0),typeof c.ctx.resume=="function"&&c.ctx.resume(),S.onended=function(){S.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,w=0;w<m._sounds.length;w++)m._sounds[w]._paused&&!m._sounds[w]._ended&&(b++,_=m._sounds[w]._id);b===1?c=null:_=null}}var x=_?m._soundById(_):m._inactiveSound();if(!x)return null;if(_&&!c&&(c=x._sprite||"__default"),m._state!=="loaded"){x._sprite=c,x._ended=!1;var E=x._id;return m._queue.push({event:"play",action:function(){m.play(E)}}),E}if(_&&!x._paused)return d||m._loadQueue("play"),x._id;m._webAudio&&r._autoResume();var S=Math.max(0,x._seek>0?x._seek:m._sprite[c][0]/1e3),I=Math.max(0,(m._sprite[c][0]+m._sprite[c][1])/1e3-S),O=I*1e3/Math.abs(x._rate),N=m._sprite[c][0]/1e3,L=(m._sprite[c][0]+m._sprite[c][1])/1e3;x._sprite=c,x._ended=!1;var k=function(){x._paused=!1,x._seek=S,x._start=N,x._stop=L,x._loop=!!(x._loop||m._sprite[c][2])};if(S>=L){m._ended(x);return}var $=x._node;if(m._webAudio){var j=function(){m._playLock=!1,k(),m._refreshBuffer(x);var V=x._muted||m._muted?0:x._volume;$.gain.setValueAtTime(V,r.ctx.currentTime),x._playStart=r.ctx.currentTime,typeof $.bufferSource.start>"u"?x._loop?$.bufferSource.noteGrainOn(0,S,86400):$.bufferSource.noteGrainOn(0,S,I):x._loop?$.bufferSource.start(0,S,86400):$.bufferSource.start(0,S,I),O!==1/0&&(m._endTimers[x._id]=setTimeout(m._ended.bind(m,x),O)),d||setTimeout(function(){m._emit("play",x._id),m._loadQueue()},0)};r.state==="running"&&r.ctx.state!=="interrupted"?j():(m._playLock=!0,m.once("resume",j),m._clearTimer(x._id))}else{var Q=function(){$.currentTime=S,$.muted=x._muted||m._muted||r._muted||$.muted,$.volume=x._volume*r.volume(),$.playbackRate=x._rate;try{var V=$.play();if(V&&typeof Promise<"u"&&(V instanceof Promise||typeof V.then=="function")?(m._playLock=!0,k(),V.then(function(){m._playLock=!1,$._unlocked=!0,d?m._loadQueue():m._emit("play",x._id)}).catch(function(){m._playLock=!1,m._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),x._ended=!0,x._paused=!0})):d||(m._playLock=!1,k(),m._emit("play",x._id)),$.playbackRate=x._rate,$.paused){m._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}c!=="__default"||x._loop?m._endTimers[x._id]=setTimeout(m._ended.bind(m,x),O):(m._endTimers[x._id]=function(){m._ended(x),$.removeEventListener("ended",m._endTimers[x._id],!1)},$.addEventListener("ended",m._endTimers[x._id],!1))}catch(ge){m._emit("playerror",x._id,ge)}};$.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&($.src=m._src,$.load());var de=window&&window.ejecta||!$.readyState&&r._navigator.isCocoonJS;if($.readyState>=3||de)Q();else{m._playLock=!0,m._state="loading";var H=function(){m._state="loaded",Q(),$.removeEventListener(r._canPlayEvent,H,!1)};$.addEventListener(r._canPlayEvent,H,!1),m._clearTimer(x._id)}}return x._id},pause:function(c){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"pause",action:function(){d.pause(c)}}),d;for(var m=d._getSoundIds(c),_=0;_<m.length;_++){d._clearTimer(m[_]);var 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 w=m._soundById(_[b]);w&&(w._seek=w._start||0,w._rateSeek=0,w._paused=!0,w._ended=!0,m._stopFade(_[b]),w._node&&(m._webAudio?w._node.bufferSource&&(typeof w._node.bufferSource.stop>"u"?w._node.bufferSource.noteOff(0):w._node.bufferSource.stop(0),m._cleanBuffer(w._node)):(!isNaN(w._node.duration)||w._node.duration===1/0)&&(w._node.currentTime=w._start||0,w._node.pause(),w._node.duration===1/0&&m._clearSound(w._node))),d||m._emit("stop",w._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 w=m._soundById(_[b]);w&&(w._muted=c,w._interval&&m._stopFade(w._id),m._webAudio&&w._node?w._node.gain.setValueAtTime(c?0:w._volume,r.ctx.currentTime):w._node&&(w._node.muted=r._muted?!0:c),m._emit("mute",w._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(),w=b.indexOf(d[0]);w>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length>=2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var x;if(typeof m<"u"&&m>=0&&m<=1){if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"volume",action:function(){c.volume.apply(c,d)}}),c;typeof _>"u"&&(c._volume=m),_=c._getSoundIds(_);for(var E=0;E<_.length;E++)x=c._soundById(_[E]),x&&(x._volume=m,d[2]||c._stopFade(_[E]),c._webAudio&&x._node&&!x._muted?x._node.gain.setValueAtTime(m,r.ctx.currentTime):x._node&&!x._muted&&(x._node.volume=m*r.volume()),c._emit("volume",x._id))}else return x=_?c._soundById(_):c._sounds[0],x?x._volume:0;return c},fade:function(c,d,m,_){var 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 w=b._getSoundIds(_),x=0;x<w.length;x++){var E=b._soundById(w[x]);if(E){if(_||b._stopFade(w[x]),b._webAudio&&!E._muted){var S=r.ctx.currentTime,I=S+m/1e3;E._volume=c,E._node.gain.setValueAtTime(c,S),E._node.gain.linearRampToValueAtTime(d,I)}b._startFadeInterval(E,c,d,m,w[x],typeof _>"u")}}return b},_startFadeInterval:function(c,d,m,_,b,w){var x=this,E=d,S=m-d,I=Math.abs(S/.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+=S*L,E=Math.round(E*100)/100,S<0?E=Math.max(m,E):E=Math.min(m,E),x._webAudio?c._volume=E:x.volume(E,c._id,!0),w&&(x._volume=E),(m<d&&E<=m||m>d&&E>=m)&&(clearInterval(c._interval),c._interval=null,c._fadeTo=null,x.volume(m,c._id),x._emit("fade",c._id))},O)},_stopFade:function(c){var d=this,m=d._soundById(c);return m&&m._interval&&(d._webAudio&&m._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(m._interval),m._interval=null,d.volume(m._fadeTo,c),m._fadeTo=null,d._emit("fade",c)),d},loop:function(){var c=this,d=arguments,m,_,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 w=c._getSoundIds(_),x=0;x<w.length;x++)b=c._soundById(w[x]),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(w[x])&&(c.pause(w[x],!0),c.play(w[x],!0)))));return c},rate:function(){var c=this,d=arguments,m,_;if(d.length===0)_=c._sounds[0]._id;else if(d.length===1){var b=c._getSoundIds(),w=b.indexOf(d[0]);w>=0?_=parseInt(d[0],10):m=parseFloat(d[0])}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));var x;if(typeof m=="number"){if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"rate",action:function(){c.rate.apply(c,d)}}),c;typeof _>"u"&&(c._rate=m),_=c._getSoundIds(_);for(var E=0;E<_.length;E++)if(x=c._soundById(_[E]),x){c.playing(_[E])&&(x._rateSeek=c.seek(_[E]),x._playStart=c._webAudio?r.ctx.currentTime:x._playStart),x._rate=m,c._webAudio&&x._node&&x._node.bufferSource?x._node.bufferSource.playbackRate.setValueAtTime(m,r.ctx.currentTime):x._node&&(x._node.playbackRate=m);var S=c.seek(_[E]),I=(c._sprite[x._sprite][0]+c._sprite[x._sprite][1])/1e3-S,O=I*1e3/Math.abs(x._rate);(c._endTimers[_[E]]||!x._paused)&&(c._clearTimer(_[E]),c._endTimers[_[E]]=setTimeout(c._ended.bind(c,x),O)),c._emit("rate",x._id)}}else return x=c._soundById(_),x?x._rate:c._rate;return c},seek:function(){var c=this,d=arguments,m,_;if(d.length===0)c._sounds.length&&(_=c._sounds[0]._id);else if(d.length===1){var b=c._getSoundIds(),w=b.indexOf(d[0]);w>=0?_=parseInt(d[0],10):c._sounds.length&&(_=c._sounds[0]._id,m=parseFloat(d[0]))}else d.length===2&&(m=parseFloat(d[0]),_=parseInt(d[1],10));if(typeof _>"u")return 0;if(typeof m=="number"&&(c._state!=="loaded"||c._playLock))return c._queue.push({event:"seek",action:function(){c.seek.apply(c,d)}}),c;var x=c._soundById(_);if(x)if(typeof m=="number"&&m>=0){var E=c.playing(_);E&&c.pause(_,!0),x._seek=m,x._ended=!1,c._clearTimer(_),!c._webAudio&&x._node&&!isNaN(x._node.duration)&&(x._node.currentTime=m);var S=function(){E&&c.play(_,!0),c._emit("seek",_)};if(E&&!c._webAudio){var I=function(){c._playLock?setTimeout(I,0):S()};setTimeout(I,0)}else S()}else if(c._webAudio){var O=c.playing(_)?r.ctx.currentTime-x._playStart:0,N=x._rateSeek?x._rateSeek-x._seek:0;return x._seek+(N+O*Math.abs(x._rate))}else return x._node.currentTime;return c},playing:function(c){var d=this;if(typeof c=="number"){var m=d._soundById(c);return m?!m._paused:!1}for(var _=0;_<d._sounds.length;_++)if(!d._sounds[_]._paused)return!0;return!1},duration:function(c){var d=this,m=d._duration,_=d._soundById(c);return _&&(m=d._sprite[_._sprite][1]/1e3),m},state:function(){return this._state},unload:function(){for(var c=this,d=c._sounds,m=0;m<d.length;m++)d[m]._paused||c.stop(d[m]._id),c._webAudio||(c._clearSound(d[m]._node),d[m]._node.removeEventListener("error",d[m]._errorFn,!1),d[m]._node.removeEventListener(r._canPlayEvent,d[m]._loadFn,!1),d[m]._node.removeEventListener("ended",d[m]._endFn,!1),r._releaseHtml5Audio(d[m]._node)),delete d[m]._node,c._clearTimer(d[m]._id);var _=r._howls.indexOf(c);_>=0&&r._howls.splice(_,1);var 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,w=b["_on"+c];return typeof d=="function"&&w.push(_?{id:m,fn:d,once:_}:{id:m,fn:d}),b},off:function(c,d,m){var _=this,b=_["_on"+c],w=0;if(typeof d=="number"&&(m=d,d=null),d||m)for(w=0;w<b.length;w++){var x=m===b[w].id;if(d===b[w].fn&&x||!d&&x){b.splice(w,1);break}}else if(c)_["_on"+c]=[];else{var E=Object.keys(_);for(w=0;w<E.length;w++)E[w].indexOf("_on")===0&&Array.isArray(_[E[w]])&&(_[E[w]]=[])}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],w=b.length-1;w>=0;w--)(!b[w].id||b[w].id===d||c==="load")&&(setTimeout((function(x){x.call(this,d,m)}).bind(_,b[w].fn),0),b[w].once&&_.off(c,b[w].fn,b[w].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 w=new XMLHttpRequest;w.open(c._xhr.method,d,!0),w.withCredentials=c._xhr.withCredentials,w.responseType="arraybuffer",c._xhr.headers&&Object.keys(c._xhr.headers).forEach(function(x){w.setRequestHeader(x,c._xhr.headers[x])}),w.onload=function(){var x=(w.status+"")[0];if(x!=="0"&&x!=="2"&&x!=="3"){c._emit("loaderror",null,"Failed loading audio file with status: "+w.status+".");return}f(w.response,c)},w.onerror=function(){c._webAudio&&(c._html5=!0,c._webAudio=!1,c._sounds=[],delete a[d],c.load())},l(w)}},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)})();/*!
|
|
1943
1957
|
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
|
|
1944
1958
|
*
|
|
1945
1959
|
* howler.js v2.2.3
|
|
@@ -1949,30 +1963,30 @@ void main() {
|
|
|
1949
1963
|
* goldfirestudios.com
|
|
1950
1964
|
*
|
|
1951
1965
|
* MIT License
|
|
1952
|
-
*/(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)}})()})(kp);const nE=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=ie.useState(!1),n=q.useRef(null),i=q.useRef(e),a=q.useRef(null),u=ie.useRef(null),{tl:l,dragModeRef:f}=q.useContext(gn),{uniqueId:p,src:v,startAt:c,endAt:d,mute:m,speed:_,audioStartAt:b,audioEndAt:w,visible:x}=t;ot(Xe.PAUSE,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),ot(Xe.COMPLETE,()=>{b>0&&u.current&&u.current.seek(b)}),ot(Xe.SCRUBBER_CLICKED,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),ie.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)},S=()=>{var N;n.current&&((N=u.current)==null||N.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=N=>{var k,$;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&&(($=l.current)!=null&&$.isActive())&&u.current&&(u.current.seek(L),u.current.play(),i.current.isPlaying=!0)},O=()=>{};return q.useEffect(()=>{let N=mt.context(()=>{});if(n.current&&l.current){const L={duration:Number(w)-Number(b),onStart:E,onComplete:S,onStartParams:[b,w],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[b,w]};N=mt.context(()=>{a.current=mt.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(),mt.killTweensOf(a.current)),N.revert()}},[c,d,b,w]),ie.useEffect(()=>{n.current&&r(!0)},[]),ie.useEffect(()=>(Zo(v)||(u.current=new kp.Howl({src:[v],autoplay:!1,loop:!1,rate:_||1,volume:!m&&x?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&&x?1:0),u.current.rate(_||1),u.current.pause(),i.current.isPlaying=!1,i.current.completed=!1)},onend:()=>{console.log("end of playing audio sprite"+p),i.current.isPlaying=!1,i.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+p),i.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+p),i.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+p),i.current.isPlaying=!1}})),()=>{u.current&&u.current.unload()}),[p,v,c,d,b,w,m,x,_]),ie.useEffect(()=>{u.current&&(console.log("running updateEffect 2002",p,w),u.current.volume(!m&&x?1:0),u.current.rate(_||1),i.current.isPlaying=!0)},[m,x,_]),Fe.jsx(et.Container,{ref:n})};function iE(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 Bp=iE;function sE(){this.__data__=[],this.size=0}var aE=sE;function oE(t,e){return t===e||t!==t&&e!==e}var Dp=oE,uE=Dp;function lE(t,e){for(var r=t.length;r--;)if(uE(t[r][0],e))return r;return-1}var ka=lE,cE=ka,hE=Array.prototype,fE=hE.splice;function dE(t){var e=this.__data__,r=cE(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():fE.call(e,r,1),--this.size,!0}var pE=dE,gE=ka;function mE(t){var e=this.__data__,r=gE(e,t);return r<0?void 0:e[r][1]}var vE=mE,_E=ka;function yE(t){return _E(this.__data__,t)>-1}var xE=yE,bE=ka;function wE(t,e){var r=this.__data__,n=bE(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var TE=wE,AE=aE,SE=pE,EE=vE,CE=xE,IE=TE;function xi(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])}}xi.prototype.clear=AE,xi.prototype.delete=SE,xi.prototype.get=EE,xi.prototype.has=CE,xi.prototype.set=IE;var Ba=xi,RE=Ba;function PE(){this.__data__=new RE,this.size=0}var ME=PE;function OE(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var FE=OE;function NE(t){return this.__data__.get(t)}var LE=NE;function kE(t){return this.__data__.has(t)}var BE=kE,DE=Xn,UE=DE(Object,"create"),Da=UE,Up=Da;function $E(){this.__data__=Up?Up(null):{},this.size=0}var GE=$E;function zE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var HE=zE,VE=Da,XE="__lodash_hash_undefined__",jE=Object.prototype,WE=jE.hasOwnProperty;function qE(t){var e=this.__data__;if(VE){var r=e[t];return r===XE?void 0:r}return WE.call(e,t)?e[t]:void 0}var YE=qE,KE=Da,ZE=Object.prototype,QE=ZE.hasOwnProperty;function JE(t){var e=this.__data__;return KE?e[t]!==void 0:QE.call(e,t)}var eC=JE,tC=Da,rC="__lodash_hash_undefined__";function nC(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=tC&&e===void 0?rC:e,this}var iC=nC,sC=GE,aC=HE,oC=YE,uC=eC,lC=iC;function bi(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])}}bi.prototype.clear=sC,bi.prototype.delete=aC,bi.prototype.get=oC,bi.prototype.has=uC,bi.prototype.set=lC;var cC=bi,$p=cC,hC=Ba,fC=Go;function dC(){this.size=0,this.__data__={hash:new $p,map:new(fC||hC),string:new $p}}var pC=dC;function gC(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var mC=gC,vC=mC;function _C(t,e){var r=t.__data__;return vC(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ua=_C,yC=Ua;function xC(t){var e=yC(this,t).delete(t);return this.size-=e?1:0,e}var bC=xC,wC=Ua;function TC(t){return wC(this,t).get(t)}var AC=TC,SC=Ua;function EC(t){return SC(this,t).has(t)}var CC=EC,IC=Ua;function RC(t,e){var r=IC(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var PC=RC,MC=pC,OC=bC,FC=AC,NC=CC,LC=PC;function wi(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])}}wi.prototype.clear=MC,wi.prototype.delete=OC,wi.prototype.get=FC,wi.prototype.has=NC,wi.prototype.set=LC;var Ol=wi,kC=Ba,BC=Go,DC=Ol,UC=200;function $C(t,e){var r=this.__data__;if(r instanceof kC){var n=r.__data__;if(!BC||n.length<UC-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new DC(n)}return r.set(t,e),this.size=r.size,this}var GC=$C,zC=Ba,HC=ME,VC=FE,XC=LE,jC=BE,WC=GC;function Ti(t){var e=this.__data__=new zC(t);this.size=e.size}Ti.prototype.clear=HC,Ti.prototype.delete=VC,Ti.prototype.get=XC,Ti.prototype.has=jC,Ti.prototype.set=WC;var Gp=Ti,qC="__lodash_hash_undefined__";function YC(t){return this.__data__.set(t,qC),this}var KC=YC;function ZC(t){return this.__data__.has(t)}var QC=ZC,JC=Ol,e2=KC,t2=QC;function $a(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new JC;++e<r;)this.add(t[e])}$a.prototype.add=$a.prototype.push=e2,$a.prototype.has=t2;var r2=$a;function n2(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 i2=n2;function s2(t,e){return t.has(e)}var a2=s2,o2=r2,u2=i2,l2=a2,c2=1,h2=2;function f2(t,e,r,n,i,a){var u=r&c2,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&h2?new o2:void 0;for(a.set(t,e),a.set(e,t);++c<l;){var _=t[c],b=e[c];if(n)var w=u?n(b,_,c,e,t,a):n(_,b,c,t,e,a);if(w!==void 0){if(w)continue;d=!1;break}if(m){if(!u2(e,function(x,E){if(!l2(m,E)&&(_===x||i(_,x,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 zp=f2,d2=wr,p2=d2.Uint8Array,g2=p2;function m2(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var v2=m2;function _2(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var y2=_2,Hp=Ls,Vp=g2,x2=Dp,b2=zp,w2=v2,T2=y2,A2=1,S2=2,E2="[object Boolean]",C2="[object Date]",I2="[object Error]",R2="[object Map]",P2="[object Number]",M2="[object RegExp]",O2="[object Set]",F2="[object String]",N2="[object Symbol]",L2="[object ArrayBuffer]",k2="[object DataView]",Xp=Hp?Hp.prototype:void 0,Fl=Xp?Xp.valueOf:void 0;function B2(t,e,r,n,i,a,u){switch(r){case k2:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case L2:return!(t.byteLength!=e.byteLength||!a(new Vp(t),new Vp(e)));case E2:case C2:case P2:return x2(+t,+e);case I2:return t.name==e.name&&t.message==e.message;case M2:case F2:return t==e+"";case R2:var l=w2;case O2:var f=n&A2;if(l||(l=T2),t.size!=e.size&&!f)return!1;var p=u.get(t);if(p)return p==e;n|=S2,u.set(t,e);var v=b2(l(t),l(e),n,i,a,u);return u.delete(t),v;case N2:if(Fl)return Fl.call(t)==Fl.call(e)}return!1}var D2=B2;function U2(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var $2=U2,G2=$2,z2=Tr;function H2(t,e,r){var n=e(t);return z2(t)?n:G2(n,r(t))}var V2=H2;function X2(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 j2=X2;function W2(){return[]}var q2=W2,Y2=j2,K2=q2,Z2=Object.prototype,Q2=Z2.propertyIsEnumerable,jp=Object.getOwnPropertySymbols,J2=jp?function(t){return t==null?[]:(t=Object(t),Y2(jp(t),function(e){return Q2.call(t,e)}))}:K2,eI=J2;function tI(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var rI=tI,nI=9007199254740991,iI=/^(?:0|[1-9]\d*)$/;function sI(t,e){var r=typeof t;return e=e??nI,!!e&&(r=="number"||r!="symbol"&&iI.test(t))&&t>-1&&t%1==0&&t<e}var Wp=sI,aI=rI,oI=Wo,uI=Tr,lI=Yo,cI=Wp,hI=Ko,fI=Object.prototype,dI=fI.hasOwnProperty;function pI(t,e){var r=uI(t),n=!r&&oI(t),i=!r&&!n&&lI(t),a=!r&&!n&&!i&&hI(t),u=r||n||i||a,l=u?aI(t.length,String):[],f=l.length;for(var p in t)(e||dI.call(t,p))&&!(u&&(p=="length"||i&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||cI(p,f)))&&l.push(p);return l}var gI=pI,mI=gI,vI=fh,_I=ks;function yI(t){return _I(t)?mI(t):vI(t)}var Nl=yI,xI=V2,bI=eI,wI=Nl;function TI(t){return xI(t,wI,bI)}var AI=TI,qp=AI,SI=1,EI=Object.prototype,CI=EI.hasOwnProperty;function II(t,e,r,n,i,a){var u=r&SI,l=qp(t),f=l.length,p=qp(e),v=p.length;if(f!=v&&!u)return!1;for(var c=f;c--;){var d=l[c];if(!(u?d in e:CI.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 w=u;++c<f;){d=l[c];var x=t[d],E=e[d];if(n)var S=u?n(E,x,d,e,t,a):n(x,E,d,t,e,a);if(!(S===void 0?x===E||i(x,E,r,n,a):S)){b=!1;break}w||(w=d=="constructor")}if(b&&!w){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 RI=II,Ll=Gp,PI=zp,MI=D2,OI=RI,Yp=Ch,Kp=Tr,Zp=Yo,FI=Ko,NI=1,Qp="[object Arguments]",Jp="[object Array]",Ga="[object Object]",LI=Object.prototype,eg=LI.hasOwnProperty;function kI(t,e,r,n,i,a){var u=Kp(t),l=Kp(e),f=u?Jp:Yp(t),p=l?Jp:Yp(e);f=f==Qp?Ga:f,p=p==Qp?Ga:p;var v=f==Ga,c=p==Ga,d=f==p;if(d&&Zp(t)){if(!Zp(e))return!1;u=!0,v=!1}if(d&&!v)return a||(a=new Ll),u||FI(t)?PI(t,e,r,n,i,a):MI(t,e,f,r,n,i,a);if(!(r&NI)){var m=v&&eg.call(t,"__wrapped__"),_=c&&eg.call(e,"__wrapped__");if(m||_){var b=m?t.value():t,w=_?e.value():e;return a||(a=new Ll),i(b,w,r,n,a)}}return d?(a||(a=new Ll),OI(t,e,r,n,i,a)):!1}var BI=kI,DI=BI,tg=Hi;function rg(t,e,r,n,i){return t===e?!0:t==null||e==null||!tg(t)&&!tg(e)?t!==t&&e!==e:DI(t,e,r,n,rg,i)}var ng=rg,UI=Gp,$I=ng,GI=1,zI=2;function HI(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 UI;if(n)var d=n(p,v,f,t,e,c);if(!(d===void 0?$I(v,p,GI|zI,n,c):d))return!1}}return!0}var VI=HI,XI=zi;function jI(t){return t===t&&!XI(t)}var ig=jI,WI=ig,qI=Nl;function YI(t){for(var e=qI(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,WI(i)]}return e}var KI=YI;function ZI(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var sg=ZI,QI=VI,JI=KI,eR=sg;function tR(t){var e=JI(t);return e.length==1&&e[0][2]?eR(e[0][0],e[0][1]):function(r){return r===t||QI(r,t,e)}}var rR=tR,nR=Gi,iR=Hi,sR="[object Symbol]";function aR(t){return typeof t=="symbol"||iR(t)&&nR(t)==sR}var za=aR,oR=Tr,uR=za,lR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cR=/^\w*$/;function hR(t,e){if(oR(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||uR(t)?!0:cR.test(t)||!lR.test(t)||e!=null&&t in Object(e)}var kl=hR,ag=Ol,fR="Expected a function";function Bl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(fR);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||ag),r}Bl.Cache=ag;var dR=Bl,pR=dR,gR=500;function mR(t){var e=pR(t,function(n){return r.size===gR&&r.clear(),n}),r=e.cache;return e}var vR=mR,_R=vR,yR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xR=/\\(\\)?/g,bR=_R(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(yR,function(r,n,i,a){e.push(i?a.replace(xR,"$1"):n||r)}),e}),wR=bR,og=Ls,TR=Bp,AR=Tr,SR=za,ER=1/0,ug=og?og.prototype:void 0,lg=ug?ug.toString:void 0;function cg(t){if(typeof t=="string")return t;if(AR(t))return TR(t,cg)+"";if(SR(t))return lg?lg.call(t):"";var e=t+"";return e=="0"&&1/t==-ER?"-0":e}var CR=cg,IR=CR;function RR(t){return t==null?"":IR(t)}var PR=RR,MR=Tr,OR=kl,FR=wR,NR=PR;function LR(t,e){return MR(t)?t:OR(t,e)?[t]:FR(NR(t))}var hg=LR,kR=za,BR=1/0;function DR(t){if(typeof t=="string"||kR(t))return t;var e=t+"";return e=="0"&&1/t==-BR?"-0":e}var Ha=DR,UR=hg,$R=Ha;function GR(t,e){e=UR(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[$R(e[r++])];return r&&r==n?t:void 0}var fg=GR,zR=fg;function HR(t,e,r){var n=t==null?void 0:zR(t,e);return n===void 0?r:n}var VR=HR;function XR(t,e){return t!=null&&e in Object(t)}var jR=XR,WR=hg,qR=Wo,YR=Tr,KR=Wp,ZR=qo,QR=Ha;function JR(t,e,r){e=WR(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var u=QR(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&&ZR(i)&&KR(u,i)&&(YR(t)||qR(t)))}var eP=JR,tP=jR,rP=eP;function nP(t,e){return t!=null&&rP(t,e,tP)}var iP=nP,sP=ng,aP=VR,oP=iP,uP=kl,lP=ig,cP=sg,hP=Ha,fP=1,dP=2;function pP(t,e){return uP(t)&&lP(e)?cP(hP(t),e):function(r){var n=aP(r,t);return n===void 0&&n===e?oP(r,t):sP(e,n,fP|dP)}}var gP=pP;function mP(t){return t}var vP=mP;function _P(t){return function(e){return e==null?void 0:e[t]}}var yP=_P,xP=fg;function bP(t){return function(e){return xP(e,t)}}var wP=bP,TP=yP,AP=wP,SP=kl,EP=Ha;function CP(t){return SP(t)?TP(EP(t)):AP(t)}var IP=CP,RP=rR,PP=gP,MP=vP,OP=Tr,FP=IP;function NP(t){return typeof t=="function"?t:t==null?MP:typeof t=="object"?OP(t)?PP(t[0],t[1]):RP(t):FP(t)}var LP=NP;function kP(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 BP=kP,DP=BP,UP=DP(),$P=UP,GP=$P,zP=Nl;function HP(t,e){return t&&GP(t,e,zP)}var VP=HP,XP=ks;function jP(t,e){return function(r,n){if(r==null)return r;if(!XP(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 WP=jP,qP=VP,YP=WP,KP=YP(qP),ZP=KP,QP=ZP,JP=ks;function eM(t,e){var r=-1,n=JP(t)?Array(t.length):[];return QP(t,function(i,a,u){n[++r]=e(i,a,u)}),n}var tM=eM,rM=Bp,nM=LP,iM=tM,sM=Tr;function aM(t,e){var r=sM(t)?rM:iM;return r(t,nM(e))}var oM=aM;const uM=Hn(oM);var Fn={},dg={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.loop=Ur.conditional=Ur.parse=void 0;var lM=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};Ur.parse=lM;var cM=function(e,r){return function(n,i,a,u){r(n,i,a)&&u(n,e,i,a)}};Ur.conditional=cM;var hM=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}};Ur.loop=hM;var lt={};Object.defineProperty(lt,"__esModule",{value:!0}),lt.readBits=lt.readArray=lt.readUnsigned=lt.readString=lt.peekBytes=lt.readBytes=lt.peekByte=lt.readByte=lt.buildStream=void 0;var fM=function(e){return{data:e,pos:0}};lt.buildStream=fM;var pg=function(){return function(e){return e.data[e.pos++]}};lt.readByte=pg;var dM=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};lt.peekByte=dM;var Va=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};lt.readBytes=Va;var pM=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};lt.peekBytes=pM;var gM=function(e){return function(r){return Array.from(Va(e)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};lt.readString=gM;var mM=function(e){return function(r){var n=Va(2)(r);return e?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};lt.readUnsigned=mM;var vM=function(e,r){return function(n,i,a){for(var u=typeof r=="function"?r(n,i,a):r,l=Va(e),f=new Array(u),p=0;p<u;p++)f[p]=l(n);return f}};lt.readArray=vM;var _M=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},yM=function(e){return function(r){for(var n=pg()(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]=_M(i,f.index,f.length):u[l]=i[f.index],u},{})}};lt.readBits=yM,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=Ur,r=lt,n={blocks:function(d){for(var m=0,_=[],b=d.data.length,w=0,x=(0,r.readByte)()(d);x!==m&&x;x=(0,r.readByte)()(d)){if(d.pos+x>=b){var E=b-d.pos;_.push((0,r.readBytes)(E)(d)),w+=E;break}_.push((0,r.readBytes)(x)(d)),w+=x}for(var S=new Uint8Array(w),I=0,O=0;O<_.length;O++)S.set(_[O],I),I+=_[O].length;return S}},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}(dg);var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.deinterlace=void 0;var xM=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};Xa.deinterlace=xM;var ja={};Object.defineProperty(ja,"__esModule",{value:!0}),ja.lzw=void 0;var bM=function(e,r,n){var i=4096,a=-1,u=n,l,f,p,v,c,d,m,N,_,b,O,w,L,k,j,$,x=new Array(n),E=new Array(i),S=new Array(i),I=new Array(i+1);for(w=e,f=1<<w,c=f+1,l=f+2,m=a,v=w+1,p=(1<<v)-1,_=0;_<f;_++)E[_]=0,S[_]=_;var O,N,L,k,$,j;for(O=N=L=k=$=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=w+1,p=(1<<v)-1,l=f+2,m=a;continue}if(m==a){I[k++]=S[_],m=_,L=_;continue}for(d=_,_==l&&(I[k++]=L,_=m);_>f;)I[k++]=S[_],_=E[_];L=S[_]&255,I[k++]=L,l<i&&(E[l]=m,S[l]=L,l++,!(l&p)&&l<i&&(v++,p+=l)),m=d}k--,x[$++]=I[k],b++}for(b=$;b<u;b++)x[b]=0;return x};ja.lzw=bM,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.decompressFrames=Fn.decompressFrame=Fn.parseGIF=void 0;var wM=CM(dg),TM=Ur,AM=lt,SM=Xa,EM=ja;function CM(t){return t&&t.__esModule?t:{default:t}}var IM=function(e){var r=new Uint8Array(e);return(0,TM.parse)((0,AM.buildStream)(r),wM.default)};Fn.parseGIF=IM;var RM=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},gg=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,EM.lzw)(i.data.minCodeSize,i.data.blocks,a);i.descriptor.lct.interlaced&&(u=(0,SM.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=RM(l)),l};Fn.decompressFrame=gg;var PM=function(e,r){return e.frames.filter(function(n){return n.image}).map(function(n){return gg(n,e.gct,r)})};Fn.decompressFrames=PM;const mg=(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},MM=t=>mg({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),OM=t=>q.useReducer(mg,t,MM);var FM='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 NM(t){const e=new Blob([FM],{type:"application/javascript"}),r=URL.createObjectURL(e),n=new Worker(r,t);return URL.revokeObjectURL(r),n}const LM=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),kM=(t,e)=>{const r={};return()=>(r.instance||(r.instance=t()),q.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)},BM=t=>{const e=q.useRef(t);return q.useEffect(()=>{e.current=t},[t]),e},DM=t=>{const e=BM(t);return q.useCallback(r=>e.current&&e.current(r),[])},UM=kM(()=>new NM,t=>t.terminate()),$M=(t,e)=>{const r=DM(e),n=UM();q.useEffect(()=>{if(typeof t=="string"){const i=a=>{const u=a.data||a;if(u.src===t){const l=u.error?u:LM(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])},GM=({isPlaying:t,forwardRef:e,...r})=>{const n=ie.useRef(null);return ie.useImperativeHandle(e,()=>n.current,[n]),ie.useEffect(()=>{if(n.current===null)return;const i=n.current;i[t?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[t]),Fe.jsx(et.AnimatedSprite,{ref:n,...r,isPlaying:t})},vg=ie.memo(GM);var Wa={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 iE=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=ie.useState(!1),n=W.useRef(null),i=W.useRef(e),a=W.useRef(null),u=ie.useRef(null),{tl:l,dragModeRef:f}=W.useContext(_n),{uniqueId:p,src:v,startAt:c,endAt:d,mute:m,speed:_,audioStartAt:b,audioEndAt:w,visible:x}=t;lt(Xe.PAUSE,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),lt(Xe.COMPLETE,()=>{b>0&&u.current&&u.current.seek(b)}),lt(Xe.SCRUBBER_CLICKED,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),ie.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)},S=()=>{var N;n.current&&((N=u.current)==null||N.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=N=>{var k,$;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&&(($=l.current)!=null&&$.isActive())&&u.current&&(u.current.seek(L),u.current.play(),i.current.isPlaying=!0)},O=()=>{};return W.useEffect(()=>{let N=yt.context(()=>{});if(n.current&&l.current){const L={duration:Number(w)-Number(b),onStart:E,onComplete:S,onStartParams:[b,w],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[b,w]};N=yt.context(()=>{a.current=yt.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(),yt.killTweensOf(a.current)),N.revert()}},[c,d,b,w]),ie.useEffect(()=>{n.current&&r(!0)},[]),ie.useEffect(()=>(Qo(v)||(u.current=new Dp.Howl({src:[v],autoplay:!1,loop:!1,rate:_||1,volume:!m&&x?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&&x?1:0),u.current.rate(_||1),u.current.pause(),i.current.isPlaying=!1,i.current.completed=!1)},onend:()=>{console.log("end of playing audio sprite"+p),i.current.isPlaying=!1,i.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+p),i.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+p),i.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+p),i.current.isPlaying=!1}})),()=>{u.current&&u.current.unload()}),[p,v,c,d,b,w,m,x,_]),ie.useEffect(()=>{u.current&&(console.log("running updateEffect 2002",p,w),u.current.volume(!m&&x?1:0),u.current.rate(_||1),i.current.isPlaying=!0)},[m,x,_]),Fe.jsx(rt.Container,{ref:n})};function sE(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=sE;function aE(){this.__data__=[],this.size=0}var oE=aE;function uE(t,e){return t===e||t!==t&&e!==e}var $p=uE,lE=$p;function cE(t,e){for(var r=t.length;r--;)if(lE(t[r][0],e))return r;return-1}var Da=cE,hE=Da,fE=Array.prototype,dE=fE.splice;function pE(t){var e=this.__data__,r=hE(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():dE.call(e,r,1),--this.size,!0}var gE=pE,mE=Da;function vE(t){var e=this.__data__,r=mE(e,t);return r<0?void 0:e[r][1]}var _E=vE,yE=Da;function xE(t){return yE(this.__data__,t)>-1}var bE=xE,wE=Da;function TE(t,e){var r=this.__data__,n=wE(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var AE=TE,SE=oE,EE=gE,CE=_E,IE=bE,RE=AE;function Ti(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ti.prototype.clear=SE,Ti.prototype.delete=EE,Ti.prototype.get=CE,Ti.prototype.has=IE,Ti.prototype.set=RE;var Ua=Ti,PE=Ua;function ME(){this.__data__=new PE,this.size=0}var OE=ME;function FE(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var NE=FE;function LE(t){return this.__data__.get(t)}var kE=LE;function BE(t){return this.__data__.has(t)}var DE=BE,UE=qn,$E=UE(Object,"create"),$a=$E,Gp=$a;function GE(){this.__data__=Gp?Gp(null):{},this.size=0}var zE=GE;function HE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var VE=HE,XE=$a,jE="__lodash_hash_undefined__",WE=Object.prototype,qE=WE.hasOwnProperty;function YE(t){var e=this.__data__;if(XE){var r=e[t];return r===jE?void 0:r}return qE.call(e,t)?e[t]:void 0}var KE=YE,ZE=$a,QE=Object.prototype,JE=QE.hasOwnProperty;function eC(t){var e=this.__data__;return ZE?e[t]!==void 0:JE.call(e,t)}var tC=eC,rC=$a,nC="__lodash_hash_undefined__";function iC(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=rC&&e===void 0?nC:e,this}var sC=iC,aC=zE,oC=VE,uC=KE,lC=tC,cC=sC;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=aC,Ai.prototype.delete=oC,Ai.prototype.get=uC,Ai.prototype.has=lC,Ai.prototype.set=cC;var hC=Ai,zp=hC,fC=Ua,dC=zo;function pC(){this.size=0,this.__data__={hash:new zp,map:new(dC||fC),string:new zp}}var gC=pC;function mC(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var vC=mC,_C=vC;function yC(t,e){var r=t.__data__;return _C(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ga=yC,xC=Ga;function bC(t){var e=xC(this,t).delete(t);return this.size-=e?1:0,e}var wC=bC,TC=Ga;function AC(t){return TC(this,t).get(t)}var SC=AC,EC=Ga;function CC(t){return EC(this,t).has(t)}var IC=CC,RC=Ga;function PC(t,e){var r=RC(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var MC=PC,OC=gC,FC=wC,NC=SC,LC=IC,kC=MC;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=OC,Si.prototype.delete=FC,Si.prototype.get=NC,Si.prototype.has=LC,Si.prototype.set=kC;var Fl=Si,BC=Ua,DC=zo,UC=Fl,$C=200;function GC(t,e){var r=this.__data__;if(r instanceof BC){var n=r.__data__;if(!DC||n.length<$C-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new UC(n)}return r.set(t,e),this.size=r.size,this}var zC=GC,HC=Ua,VC=OE,XC=NE,jC=kE,WC=DE,qC=zC;function Ei(t){var e=this.__data__=new HC(t);this.size=e.size}Ei.prototype.clear=VC,Ei.prototype.delete=XC,Ei.prototype.get=jC,Ei.prototype.has=WC,Ei.prototype.set=qC;var Hp=Ei,YC="__lodash_hash_undefined__";function KC(t){return this.__data__.set(t,YC),this}var ZC=KC;function QC(t){return this.__data__.has(t)}var JC=QC,e2=Fl,t2=ZC,r2=JC;function za(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new e2;++e<r;)this.add(t[e])}za.prototype.add=za.prototype.push=t2,za.prototype.has=r2;var n2=za;function i2(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 s2=i2;function a2(t,e){return t.has(e)}var o2=a2,u2=n2,l2=s2,c2=o2,h2=1,f2=2;function d2(t,e,r,n,i,a){var u=r&h2,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&f2?new u2:void 0;for(a.set(t,e),a.set(e,t);++c<l;){var _=t[c],b=e[c];if(n)var w=u?n(b,_,c,e,t,a):n(_,b,c,t,e,a);if(w!==void 0){if(w)continue;d=!1;break}if(m){if(!l2(e,function(x,E){if(!c2(m,E)&&(_===x||i(_,x,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=d2,p2=Er,g2=p2.Uint8Array,m2=g2;function v2(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var _2=v2;function y2(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var x2=y2,Xp=Bs,jp=m2,b2=$p,w2=Vp,T2=_2,A2=x2,S2=1,E2=2,C2="[object Boolean]",I2="[object Date]",R2="[object Error]",P2="[object Map]",M2="[object Number]",O2="[object RegExp]",F2="[object Set]",N2="[object String]",L2="[object Symbol]",k2="[object ArrayBuffer]",B2="[object DataView]",Wp=Xp?Xp.prototype:void 0,Nl=Wp?Wp.valueOf:void 0;function D2(t,e,r,n,i,a,u){switch(r){case B2:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case k2:return!(t.byteLength!=e.byteLength||!a(new jp(t),new jp(e)));case C2:case I2:case M2:return b2(+t,+e);case R2:return t.name==e.name&&t.message==e.message;case O2:case N2:return t==e+"";case P2:var l=T2;case F2:var f=n&S2;if(l||(l=A2),t.size!=e.size&&!f)return!1;var p=u.get(t);if(p)return p==e;n|=E2,u.set(t,e);var v=w2(l(t),l(e),n,i,a,u);return u.delete(t),v;case L2:if(Nl)return Nl.call(t)==Nl.call(e)}return!1}var U2=D2;function $2(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var G2=$2,z2=G2,H2=Cr;function V2(t,e,r){var n=e(t);return H2(t)?n:z2(n,r(t))}var X2=V2;function j2(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 W2=j2;function q2(){return[]}var Y2=q2,K2=W2,Z2=Y2,Q2=Object.prototype,J2=Q2.propertyIsEnumerable,qp=Object.getOwnPropertySymbols,eI=qp?function(t){return t==null?[]:(t=Object(t),K2(qp(t),function(e){return J2.call(t,e)}))}:Z2,tI=eI;function rI(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var nI=rI,iI=9007199254740991,sI=/^(?:0|[1-9]\d*)$/;function aI(t,e){var r=typeof t;return e=e??iI,!!e&&(r=="number"||r!="symbol"&&sI.test(t))&&t>-1&&t%1==0&&t<e}var Yp=aI,oI=nI,uI=qo,lI=Cr,cI=Ko,hI=Yp,fI=Zo,dI=Object.prototype,pI=dI.hasOwnProperty;function gI(t,e){var r=lI(t),n=!r&&uI(t),i=!r&&!n&&cI(t),a=!r&&!n&&!i&&fI(t),u=r||n||i||a,l=u?oI(t.length,String):[],f=l.length;for(var p in t)(e||pI.call(t,p))&&!(u&&(p=="length"||i&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||hI(p,f)))&&l.push(p);return l}var mI=gI,vI=mI,_I=dh,yI=Ds;function xI(t){return yI(t)?vI(t):_I(t)}var Ll=xI,bI=X2,wI=tI,TI=Ll;function AI(t){return bI(t,TI,wI)}var SI=AI,Kp=SI,EI=1,CI=Object.prototype,II=CI.hasOwnProperty;function RI(t,e,r,n,i,a){var u=r&EI,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:II.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 w=u;++c<f;){d=l[c];var x=t[d],E=e[d];if(n)var S=u?n(E,x,d,e,t,a):n(x,E,d,t,e,a);if(!(S===void 0?x===E||i(x,E,r,n,a):S)){b=!1;break}w||(w=d=="constructor")}if(b&&!w){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 PI=RI,kl=Hp,MI=Vp,OI=U2,FI=PI,Zp=Ih,Qp=Cr,Jp=Ko,NI=Zo,LI=1,eg="[object Arguments]",tg="[object Array]",Ha="[object Object]",kI=Object.prototype,rg=kI.hasOwnProperty;function BI(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 kl),u||NI(t)?MI(t,e,r,n,i,a):OI(t,e,f,r,n,i,a);if(!(r&LI)){var m=v&&rg.call(t,"__wrapped__"),_=c&&rg.call(e,"__wrapped__");if(m||_){var b=m?t.value():t,w=_?e.value():e;return a||(a=new kl),i(b,w,r,n,a)}}return d?(a||(a=new kl),FI(t,e,r,n,i,a)):!1}var DI=BI,UI=DI,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:UI(t,e,r,n,ig,i)}var sg=ig,$I=Hp,GI=sg,zI=1,HI=2;function VI(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 $I;if(n)var d=n(p,v,f,t,e,c);if(!(d===void 0?GI(v,p,zI|HI,n,c):d))return!1}}return!0}var XI=VI,jI=ji;function WI(t){return t===t&&!jI(t)}var ag=WI,qI=ag,YI=Ll;function KI(t){for(var e=YI(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,qI(i)]}return e}var ZI=KI;function QI(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var og=QI,JI=XI,eR=ZI,tR=og;function rR(t){var e=eR(t);return e.length==1&&e[0][2]?tR(e[0][0],e[0][1]):function(r){return r===t||JI(r,t,e)}}var nR=rR,iR=Xi,sR=Wi,aR="[object Symbol]";function oR(t){return typeof t=="symbol"||sR(t)&&iR(t)==aR}var Va=oR,uR=Cr,lR=Va,cR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hR=/^\w*$/;function fR(t,e){if(uR(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||lR(t)?!0:hR.test(t)||!cR.test(t)||e!=null&&t in Object(e)}var Bl=fR,ug=Fl,dR="Expected a function";function Dl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(dR);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(Dl.Cache||ug),r}Dl.Cache=ug;var pR=Dl,gR=pR,mR=500;function vR(t){var e=gR(t,function(n){return r.size===mR&&r.clear(),n}),r=e.cache;return e}var _R=vR,yR=_R,xR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bR=/\\(\\)?/g,wR=yR(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(xR,function(r,n,i,a){e.push(i?a.replace(bR,"$1"):n||r)}),e}),TR=wR,lg=Bs,AR=Up,SR=Cr,ER=Va,CR=1/0,cg=lg?lg.prototype:void 0,hg=cg?cg.toString:void 0;function fg(t){if(typeof t=="string")return t;if(SR(t))return AR(t,fg)+"";if(ER(t))return hg?hg.call(t):"";var e=t+"";return e=="0"&&1/t==-CR?"-0":e}var IR=fg,RR=IR;function PR(t){return t==null?"":RR(t)}var MR=PR,OR=Cr,FR=Bl,NR=TR,LR=MR;function kR(t,e){return OR(t)?t:FR(t,e)?[t]:NR(LR(t))}var dg=kR,BR=Va,DR=1/0;function UR(t){if(typeof t=="string"||BR(t))return t;var e=t+"";return e=="0"&&1/t==-DR?"-0":e}var Xa=UR,$R=dg,GR=Xa;function zR(t,e){e=$R(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[GR(e[r++])];return r&&r==n?t:void 0}var pg=zR,HR=pg;function VR(t,e,r){var n=t==null?void 0:HR(t,e);return n===void 0?r:n}var XR=VR;function jR(t,e){return t!=null&&e in Object(t)}var WR=jR,qR=dg,YR=qo,KR=Cr,ZR=Yp,QR=Yo,JR=Xa;function eP(t,e,r){e=qR(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var u=JR(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&&QR(i)&&ZR(u,i)&&(KR(t)||YR(t)))}var tP=eP,rP=WR,nP=tP;function iP(t,e){return t!=null&&nP(t,e,rP)}var sP=iP,aP=sg,oP=XR,uP=sP,lP=Bl,cP=ag,hP=og,fP=Xa,dP=1,pP=2;function gP(t,e){return lP(t)&&cP(e)?hP(fP(t),e):function(r){var n=oP(r,t);return n===void 0&&n===e?uP(r,t):aP(e,n,dP|pP)}}var mP=gP;function vP(t){return t}var _P=vP;function yP(t){return function(e){return e==null?void 0:e[t]}}var xP=yP,bP=pg;function wP(t){return function(e){return bP(e,t)}}var TP=wP,AP=xP,SP=TP,EP=Bl,CP=Xa;function IP(t){return EP(t)?AP(CP(t)):SP(t)}var RP=IP,PP=nR,MP=mP,OP=_P,FP=Cr,NP=RP;function LP(t){return typeof t=="function"?t:t==null?OP:typeof t=="object"?FP(t)?MP(t[0],t[1]):PP(t):NP(t)}var kP=LP;function BP(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 DP=BP,UP=DP,$P=UP(),GP=$P,zP=GP,HP=Ll;function VP(t,e){return t&&zP(t,e,HP)}var XP=VP,jP=Ds;function WP(t,e){return function(r,n){if(r==null)return r;if(!jP(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 qP=WP,YP=XP,KP=qP,ZP=KP(YP),QP=ZP,JP=QP,eM=Ds;function tM(t,e){var r=-1,n=eM(t)?Array(t.length):[];return JP(t,function(i,a,u){n[++r]=e(i,a,u)}),n}var rM=tM,nM=Up,iM=kP,sM=rM,aM=Cr;function oM(t,e){var r=aM(t)?nM:sM;return r(t,iM(e))}var uM=oM;const lM=jn(uM);var kn={},gg={},zr={};Object.defineProperty(zr,"__esModule",{value:!0}),zr.loop=zr.conditional=zr.parse=void 0;var cM=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=cM;var hM=function(e,r){return function(n,i,a,u){r(n,i,a)&&u(n,e,i,a)}};zr.conditional=hM;var fM=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=fM;var ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.readBits=ht.readArray=ht.readUnsigned=ht.readString=ht.peekBytes=ht.readBytes=ht.peekByte=ht.readByte=ht.buildStream=void 0;var dM=function(e){return{data:e,pos:0}};ht.buildStream=dM;var mg=function(){return function(e){return e.data[e.pos++]}};ht.readByte=mg;var pM=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};ht.peekByte=pM;var ja=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};ht.readBytes=ja;var gM=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};ht.peekBytes=gM;var mM=function(e){return function(r){return Array.from(ja(e)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};ht.readString=mM;var vM=function(e){return function(r){var n=ja(2)(r);return e?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};ht.readUnsigned=vM;var _M=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}};ht.readArray=_M;var yM=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},xM=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]=yM(i,f.index,f.length):u[l]=i[f.index],u},{})}};ht.readBits=xM,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=zr,r=ht,n={blocks:function(d){for(var m=0,_=[],b=d.data.length,w=0,x=(0,r.readByte)()(d);x!==m&&x;x=(0,r.readByte)()(d)){if(d.pos+x>=b){var E=b-d.pos;_.push((0,r.readBytes)(E)(d)),w+=E;break}_.push((0,r.readBytes)(x)(d)),w+=x}for(var S=new Uint8Array(w),I=0,O=0;O<_.length;O++)S.set(_[O],I),I+=_[O].length;return S}},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 bM=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=bM;var qa={};Object.defineProperty(qa,"__esModule",{value:!0}),qa.lzw=void 0;var wM=function(e,r,n){var i=4096,a=-1,u=n,l,f,p,v,c,d,m,N,_,b,O,w,L,k,j,$,x=new Array(n),E=new Array(i),S=new Array(i),I=new Array(i+1);for(w=e,f=1<<w,c=f+1,l=f+2,m=a,v=w+1,p=(1<<v)-1,_=0;_<f;_++)E[_]=0,S[_]=_;var O,N,L,k,$,j;for(O=N=L=k=$=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=w+1,p=(1<<v)-1,l=f+2,m=a;continue}if(m==a){I[k++]=S[_],m=_,L=_;continue}for(d=_,_==l&&(I[k++]=L,_=m);_>f;)I[k++]=S[_],_=E[_];L=S[_]&255,I[k++]=L,l<i&&(E[l]=m,S[l]=L,l++,!(l&p)&&l<i&&(v++,p+=l)),m=d}k--,x[$++]=I[k],b++}for(b=$;b<u;b++)x[b]=0;return x};qa.lzw=wM,Object.defineProperty(kn,"__esModule",{value:!0}),kn.decompressFrames=kn.decompressFrame=kn.parseGIF=void 0;var TM=IM(gg),AM=zr,SM=ht,EM=Wa,CM=qa;function IM(t){return t&&t.__esModule?t:{default:t}}var RM=function(e){var r=new Uint8Array(e);return(0,AM.parse)((0,SM.buildStream)(r),TM.default)};kn.parseGIF=RM;var PM=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,CM.lzw)(i.data.minCodeSize,i.data.blocks,a);i.descriptor.lct.interlaced&&(u=(0,EM.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=PM(l)),l};kn.decompressFrame=vg;var MM=function(e,r){return e.frames.filter(function(n){return n.image}).map(function(n){return vg(n,e.gct,r)})};kn.decompressFrames=MM;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},OM=t=>_g({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),FM=t=>W.useReducer(_g,t,OM);var NM='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 LM(t){const e=new Blob([NM],{type:"application/javascript"}),r=URL.createObjectURL(e),n=new Worker(r,t);return URL.revokeObjectURL(r),n}const kM=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),BM=(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)},DM=t=>{const e=W.useRef(t);return W.useEffect(()=>{e.current=t},[t]),e},UM=t=>{const e=DM(t);return W.useCallback(r=>e.current&&e.current(r),[])},$M=BM(()=>new LM,t=>t.terminate()),GM=(t,e)=>{const r=UM(e),n=$M();W.useEffect(()=>{if(typeof t=="string"){const i=a=>{const u=a.data||a;if(u.src===t){const l=u.error?u:kM(u);r(l)}};return n.addEventListener("message",i),n.postMessage({src:t,type:"parse"}),()=>{n.postMessage({src:t,type:"cancel"}),n.removeEventListener("message",i)}}},[n,t])},zM=({isPlaying:t,forwardRef:e,...r})=>{const n=ie.useRef(null);return ie.useImperativeHandle(e,()=>n.current,[n]),ie.useEffect(()=>{if(n.current===null)return;const i=n.current;i[t?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[t]),Fe.jsx(rt.AnimatedSprite,{ref:n,...r,isPlaying:t})},yg=ie.memo(zM);var Ya={exports:{}};/**
|
|
1953
1967
|
* @license
|
|
1954
1968
|
* Lodash <https://lodash.com/>
|
|
1955
1969
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
1956
1970
|
* Released under MIT license <https://lodash.com/license>
|
|
1957
1971
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1958
1972
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1959
|
-
*/Wa.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,w=1,x=2,E=4,S=8,I=16,O=32,N=64,L=128,k=256,$=512,j=30,ee="...",se=800,X=16,H=1,ve=2,ke=3,z=1/0,re=9007199254740991,ge=17976931348623157e292,V=0/0,K=4294967295,he=K-1,ye=K>>>1,xe=[["ary",L],["bind",w],["bindKey",x],["curry",S],["curryRight",I],["flip",$],["partial",O],["partialRight",N],["rearg",k]],Pe="[object Arguments]",Oe="[object Array]",ze="[object AsyncFunction]",He="[object Boolean]",Ze="[object Date]",Q="[object DOMException]",W="[object Error]",ae="[object Function]",Ee="[object GeneratorFunction]",Ce="[object Map]",Qe="[object Number]",gr="[object Null]",Ot="[object Object]",$r="[object Promise]",mr="[object Proxy]",Ai="[object RegExp]",vr="[object Set]",ms="[object String]",Ya="[object Symbol]",_O="[object Undefined]",vs="[object WeakMap]",yO="[object WeakSet]",_s="[object ArrayBuffer]",Si="[object DataView]",Ul="[object Float32Array]",$l="[object Float64Array]",Gl="[object Int8Array]",zl="[object Int16Array]",Hl="[object Int32Array]",Vl="[object Uint8Array]",Xl="[object Uint8ClampedArray]",jl="[object Uint16Array]",Wl="[object Uint32Array]",xO=/\b__p \+= '';/g,bO=/\b(__p \+=) '' \+/g,wO=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Eg=/&(?:amp|lt|gt|quot|#39);/g,Cg=/[&<>"']/g,TO=RegExp(Eg.source),AO=RegExp(Cg.source),SO=/<%-([\s\S]+?)%>/g,EO=/<%([\s\S]+?)%>/g,Ig=/<%=([\s\S]+?)%>/g,CO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IO=/^\w*$/,RO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ql=/[\\^$.*+?()[\]{}|]/g,PO=RegExp(ql.source),Yl=/^\s+/,MO=/\s/,OO=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,FO=/\{\n\/\* \[wrapped with (.+)\] \*/,NO=/,? & /,LO=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kO=/[()=,{}\[\]\/\s]/,BO=/\\(\\)?/g,DO=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rg=/\w*$/,UO=/^[-+]0x[0-9a-f]+$/i,$O=/^0b[01]+$/i,GO=/^\[object .+?Constructor\]$/,zO=/^0o[0-7]+$/i,HO=/^(?:0|[1-9]\d*)$/,VO=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ka=/($^)/,XO=/['\n\r\u2028\u2029\\]/g,Za="\\ud800-\\udfff",jO="\\u0300-\\u036f",WO="\\ufe20-\\ufe2f",qO="\\u20d0-\\u20ff",Pg=jO+WO+qO,Mg="\\u2700-\\u27bf",Og="a-z\\xdf-\\xf6\\xf8-\\xff",YO="\\xac\\xb1\\xd7\\xf7",KO="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ZO="\\u2000-\\u206f",QO=" \\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",Fg="A-Z\\xc0-\\xd6\\xd8-\\xde",Ng="\\ufe0e\\ufe0f",Lg=YO+KO+ZO+QO,Kl="['’]",JO="["+Za+"]",kg="["+Lg+"]",Qa="["+Pg+"]",Bg="\\d+",eF="["+Mg+"]",Dg="["+Og+"]",Ug="[^"+Za+Lg+Bg+Mg+Og+Fg+"]",Zl="\\ud83c[\\udffb-\\udfff]",tF="(?:"+Qa+"|"+Zl+")",$g="[^"+Za+"]",Ql="(?:\\ud83c[\\udde6-\\uddff]){2}",Jl="[\\ud800-\\udbff][\\udc00-\\udfff]",Ei="["+Fg+"]",Gg="\\u200d",zg="(?:"+Dg+"|"+Ug+")",rF="(?:"+Ei+"|"+Ug+")",Hg="(?:"+Kl+"(?:d|ll|m|re|s|t|ve))?",Vg="(?:"+Kl+"(?:D|LL|M|RE|S|T|VE))?",Xg=tF+"?",jg="["+Ng+"]?",nF="(?:"+Gg+"(?:"+[$g,Ql,Jl].join("|")+")"+jg+Xg+")*",iF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wg=jg+Xg+nF,aF="(?:"+[eF,Ql,Jl].join("|")+")"+Wg,oF="(?:"+[$g+Qa+"?",Qa,Ql,Jl,JO].join("|")+")",uF=RegExp(Kl,"g"),lF=RegExp(Qa,"g"),ec=RegExp(Zl+"(?="+Zl+")|"+oF+Wg,"g"),cF=RegExp([Ei+"?"+Dg+"+"+Hg+"(?="+[kg,Ei,"$"].join("|")+")",rF+"+"+Vg+"(?="+[kg,Ei+zg,"$"].join("|")+")",Ei+"?"+zg+"+"+Hg,Ei+"+"+Vg,sF,iF,Bg,aF].join("|"),"g"),hF=RegExp("["+Gg+Za+Pg+Ng+"]"),fF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dF=["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"],pF=-1,Je={};Je[Ul]=Je[$l]=Je[Gl]=Je[zl]=Je[Hl]=Je[Vl]=Je[Xl]=Je[jl]=Je[Wl]=!0,Je[Pe]=Je[Oe]=Je[_s]=Je[He]=Je[Si]=Je[Ze]=Je[W]=Je[ae]=Je[Ce]=Je[Qe]=Je[Ot]=Je[Ai]=Je[vr]=Je[ms]=Je[vs]=!1;var Ye={};Ye[Pe]=Ye[Oe]=Ye[_s]=Ye[Si]=Ye[He]=Ye[Ze]=Ye[Ul]=Ye[$l]=Ye[Gl]=Ye[zl]=Ye[Hl]=Ye[Ce]=Ye[Qe]=Ye[Ot]=Ye[Ai]=Ye[vr]=Ye[ms]=Ye[Ya]=Ye[Vl]=Ye[Xl]=Ye[jl]=Ye[Wl]=!0,Ye[W]=Ye[ae]=Ye[vs]=!1;var gF={À:"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"},mF={"&":"&","<":"<",">":">",'"':""","'":"'"},vF={"&":"&","<":"<",">":">",""":'"',"'":"'"},_F={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yF=parseFloat,xF=parseInt,qg=typeof bt=="object"&&bt&&bt.Object===Object&&bt,bF=typeof self=="object"&&self&&self.Object===Object&&self,Tt=qg||bF||Function("return this")(),tc=e&&!e.nodeType&&e,Nn=tc&&!0&&t&&!t.nodeType&&t,Yg=Nn&&Nn.exports===tc,rc=Yg&&qg.process,Kt=function(){try{var P=Nn&&Nn.require&&Nn.require("util").types;return P||rc&&rc.binding&&rc.binding("util")}catch{}}(),Kg=Kt&&Kt.isArrayBuffer,Zg=Kt&&Kt.isDate,Qg=Kt&&Kt.isMap,Jg=Kt&&Kt.isRegExp,em=Kt&&Kt.isSet,tm=Kt&&Kt.isTypedArray;function zt(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 wF(P,B,F,J){for(var fe=-1,Be=P==null?0:P.length;++fe<Be;){var pt=P[fe];B(J,pt,F(pt),P)}return J}function Zt(P,B){for(var F=-1,J=P==null?0:P.length;++F<J&&B(P[F],F,P)!==!1;);return P}function TF(P,B){for(var F=P==null?0:P.length;F--&&B(P[F],F,P)!==!1;);return P}function rm(P,B){for(var F=-1,J=P==null?0:P.length;++F<J;)if(!B(P[F],F,P))return!1;return!0}function sn(P,B){for(var F=-1,J=P==null?0:P.length,fe=0,Be=[];++F<J;){var pt=P[F];B(pt,F,P)&&(Be[fe++]=pt)}return Be}function Ja(P,B){var F=P==null?0:P.length;return!!F&&Ci(P,B,0)>-1}function nc(P,B,F){for(var J=-1,fe=P==null?0:P.length;++J<fe;)if(F(B,P[J]))return!0;return!1}function rt(P,B){for(var F=-1,J=P==null?0:P.length,fe=Array(J);++F<J;)fe[F]=B(P[F],F,P);return fe}function an(P,B){for(var F=-1,J=B.length,fe=P.length;++F<J;)P[fe+F]=B[F];return P}function ic(P,B,F,J){var fe=-1,Be=P==null?0:P.length;for(J&&Be&&(F=P[++fe]);++fe<Be;)F=B(F,P[fe],fe,P);return F}function AF(P,B,F,J){var fe=P==null?0:P.length;for(J&&fe&&(F=P[--fe]);fe--;)F=B(F,P[fe],fe,P);return F}function sc(P,B){for(var F=-1,J=P==null?0:P.length;++F<J;)if(B(P[F],F,P))return!0;return!1}var SF=ac("length");function EF(P){return P.split("")}function CF(P){return P.match(LO)||[]}function nm(P,B,F){var J;return F(P,function(fe,Be,pt){if(B(fe,Be,pt))return J=Be,!1}),J}function eo(P,B,F,J){for(var fe=P.length,Be=F+(J?1:-1);J?Be--:++Be<fe;)if(B(P[Be],Be,P))return Be;return-1}function Ci(P,B,F){return B===B?UF(P,B,F):eo(P,im,F)}function IF(P,B,F,J){for(var fe=F-1,Be=P.length;++fe<Be;)if(J(P[fe],B))return fe;return-1}function im(P){return P!==P}function sm(P,B){var F=P==null?0:P.length;return F?uc(P,B)/F:V}function ac(P){return function(B){return B==null?r:B[P]}}function oc(P){return function(B){return P==null?r:P[B]}}function am(P,B,F,J,fe){return fe(P,function(Be,pt,We){F=J?(J=!1,Be):B(F,Be,pt,We)}),F}function RF(P,B){var F=P.length;for(P.sort(B);F--;)P[F]=P[F].value;return P}function uc(P,B){for(var F,J=-1,fe=P.length;++J<fe;){var Be=B(P[J]);Be!==r&&(F=F===r?Be:F+Be)}return F}function lc(P,B){for(var F=-1,J=Array(P);++F<P;)J[F]=B(F);return J}function PF(P,B){return rt(B,function(F){return[F,P[F]]})}function om(P){return P&&P.slice(0,hm(P)+1).replace(Yl,"")}function Ht(P){return function(B){return P(B)}}function cc(P,B){return rt(B,function(F){return P[F]})}function ys(P,B){return P.has(B)}function um(P,B){for(var F=-1,J=P.length;++F<J&&Ci(B,P[F],0)>-1;);return F}function lm(P,B){for(var F=P.length;F--&&Ci(B,P[F],0)>-1;);return F}function MF(P,B){for(var F=P.length,J=0;F--;)P[F]===B&&++J;return J}var OF=oc(gF),FF=oc(mF);function NF(P){return"\\"+_F[P]}function LF(P,B){return P==null?r:P[B]}function Ii(P){return hF.test(P)}function kF(P){return fF.test(P)}function BF(P){for(var B,F=[];!(B=P.next()).done;)F.push(B.value);return F}function hc(P){var B=-1,F=Array(P.size);return P.forEach(function(J,fe){F[++B]=[fe,J]}),F}function cm(P,B){return function(F){return P(B(F))}}function on(P,B){for(var F=-1,J=P.length,fe=0,Be=[];++F<J;){var pt=P[F];(pt===B||pt===v)&&(P[F]=v,Be[fe++]=F)}return Be}function to(P){var B=-1,F=Array(P.size);return P.forEach(function(J){F[++B]=J}),F}function DF(P){var B=-1,F=Array(P.size);return P.forEach(function(J){F[++B]=[J,J]}),F}function UF(P,B,F){for(var J=F-1,fe=P.length;++J<fe;)if(P[J]===B)return J;return-1}function $F(P,B,F){for(var J=F+1;J--;)if(P[J]===B)return J;return J}function Ri(P){return Ii(P)?zF(P):SF(P)}function _r(P){return Ii(P)?HF(P):EF(P)}function hm(P){for(var B=P.length;B--&&MO.test(P.charAt(B)););return B}var GF=oc(vF);function zF(P){for(var B=ec.lastIndex=0;ec.test(P);)++B;return B}function HF(P){return P.match(ec)||[]}function VF(P){return P.match(cF)||[]}var XF=function P(B){B=B==null?Tt:Pi.defaults(Tt.Object(),B,Pi.pick(Tt,dF));var F=B.Array,J=B.Date,fe=B.Error,Be=B.Function,pt=B.Math,We=B.Object,fc=B.RegExp,jF=B.String,Qt=B.TypeError,ro=F.prototype,WF=Be.prototype,Mi=We.prototype,no=B["__core-js_shared__"],io=WF.toString,Ge=Mi.hasOwnProperty,qF=0,fm=function(){var s=/[^.]+$/.exec(no&&no.keys&&no.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),so=Mi.toString,YF=io.call(We),KF=Tt._,ZF=fc("^"+io.call(Ge).replace(ql,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ao=Yg?B.Buffer:r,un=B.Symbol,oo=B.Uint8Array,dm=ao?ao.allocUnsafe:r,uo=cm(We.getPrototypeOf,We),pm=We.create,gm=Mi.propertyIsEnumerable,lo=ro.splice,mm=un?un.isConcatSpreadable:r,xs=un?un.iterator:r,Ln=un?un.toStringTag:r,co=function(){try{var s=$n(We,"defineProperty");return s({},"",{}),s}catch{}}(),QF=B.clearTimeout!==Tt.clearTimeout&&B.clearTimeout,JF=J&&J.now!==Tt.Date.now&&J.now,e3=B.setTimeout!==Tt.setTimeout&&B.setTimeout,ho=pt.ceil,fo=pt.floor,dc=We.getOwnPropertySymbols,t3=ao?ao.isBuffer:r,vm=B.isFinite,r3=ro.join,n3=cm(We.keys,We),gt=pt.max,It=pt.min,i3=J.now,s3=B.parseInt,_m=pt.random,a3=ro.reverse,pc=$n(B,"DataView"),bs=$n(B,"Map"),gc=$n(B,"Promise"),Oi=$n(B,"Set"),ws=$n(B,"WeakMap"),Ts=$n(We,"create"),po=ws&&new ws,Fi={},o3=Gn(pc),u3=Gn(bs),l3=Gn(gc),c3=Gn(Oi),h3=Gn(ws),go=un?un.prototype:r,As=go?go.valueOf:r,ym=go?go.toString:r;function T(s){if(ut(s)&&!de(s)&&!(s instanceof Ae)){if(s instanceof Jt)return s;if(Ge.call(s,"__wrapped__"))return x0(s)}return new Jt(s)}var Ni=function(){function s(){}return function(o){if(!at(o))return{};if(pm)return pm(o);s.prototype=o;var h=new s;return s.prototype=r,h}}();function mo(){}function Jt(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}T.templateSettings={escape:SO,evaluate:EO,interpolate:Ig,variable:"",imports:{_:T}},T.prototype=mo.prototype,T.prototype.constructor=T,Jt.prototype=Ni(mo.prototype),Jt.prototype.constructor=Jt;function Ae(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=K,this.__views__=[]}function f3(){var s=new Ae(this.__wrapped__);return s.__actions__=kt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=kt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=kt(this.__views__),s}function d3(){if(this.__filtered__){var s=new Ae(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function p3(){var s=this.__wrapped__.value(),o=this.__dir__,h=de(s),g=o<0,y=h?s.length:0,A=EN(0,y,this.__views__),C=A.start,R=A.end,M=R-C,D=g?R:C-1,U=this.__iteratees__,G=U.length,Y=0,te=It(M,this.__takeCount__);if(!h||!g&&y==M&&te==M)return Hm(s,this.__actions__);var ue=[];e:for(;M--&&Y<te;){D+=o;for(var me=-1,le=s[D];++me<G;){var we=U[me],Ie=we.iteratee,jt=we.type,Lt=Ie(le);if(jt==ve)le=Lt;else if(!Lt){if(jt==H)continue e;break e}}ue[Y++]=le}return ue}Ae.prototype=Ni(mo.prototype),Ae.prototype.constructor=Ae;function kn(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 g3(){this.__data__=Ts?Ts(null):{},this.size=0}function m3(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function v3(s){var o=this.__data__;if(Ts){var h=o[s];return h===f?r:h}return Ge.call(o,s)?o[s]:r}function _3(s){var o=this.__data__;return Ts?o[s]!==r:Ge.call(o,s)}function y3(s,o){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Ts&&o===r?f:o,this}kn.prototype.clear=g3,kn.prototype.delete=m3,kn.prototype.get=v3,kn.prototype.has=_3,kn.prototype.set=y3;function Gr(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 x3(){this.__data__=[],this.size=0}function b3(s){var o=this.__data__,h=vo(o,s);if(h<0)return!1;var g=o.length-1;return h==g?o.pop():lo.call(o,h,1),--this.size,!0}function w3(s){var o=this.__data__,h=vo(o,s);return h<0?r:o[h][1]}function T3(s){return vo(this.__data__,s)>-1}function A3(s,o){var h=this.__data__,g=vo(h,s);return g<0?(++this.size,h.push([s,o])):h[g][1]=o,this}Gr.prototype.clear=x3,Gr.prototype.delete=b3,Gr.prototype.get=w3,Gr.prototype.has=T3,Gr.prototype.set=A3;function zr(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 S3(){this.size=0,this.__data__={hash:new kn,map:new(bs||Gr),string:new kn}}function E3(s){var o=Ro(this,s).delete(s);return this.size-=o?1:0,o}function C3(s){return Ro(this,s).get(s)}function I3(s){return Ro(this,s).has(s)}function R3(s,o){var h=Ro(this,s),g=h.size;return h.set(s,o),this.size+=h.size==g?0:1,this}zr.prototype.clear=S3,zr.prototype.delete=E3,zr.prototype.get=C3,zr.prototype.has=I3,zr.prototype.set=R3;function Bn(s){var o=-1,h=s==null?0:s.length;for(this.__data__=new zr;++o<h;)this.add(s[o])}function P3(s){return this.__data__.set(s,f),this}function M3(s){return this.__data__.has(s)}Bn.prototype.add=Bn.prototype.push=P3,Bn.prototype.has=M3;function yr(s){var o=this.__data__=new Gr(s);this.size=o.size}function O3(){this.__data__=new Gr,this.size=0}function F3(s){var o=this.__data__,h=o.delete(s);return this.size=o.size,h}function N3(s){return this.__data__.get(s)}function L3(s){return this.__data__.has(s)}function k3(s,o){var h=this.__data__;if(h instanceof Gr){var g=h.__data__;if(!bs||g.length<i-1)return g.push([s,o]),this.size=++h.size,this;h=this.__data__=new zr(g)}return h.set(s,o),this.size=h.size,this}yr.prototype.clear=O3,yr.prototype.delete=F3,yr.prototype.get=N3,yr.prototype.has=L3,yr.prototype.set=k3;function xm(s,o){var h=de(s),g=!h&&zn(s),y=!h&&!g&&dn(s),A=!h&&!g&&!y&&Di(s),C=h||g||y||A,R=C?lc(s.length,jF):[],M=R.length;for(var D in s)(o||Ge.call(s,D))&&!(C&&(D=="length"||y&&(D=="offset"||D=="parent")||A&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||jr(D,M)))&&R.push(D);return R}function bm(s){var o=s.length;return o?s[Ec(0,o-1)]:r}function B3(s,o){return Po(kt(s),Dn(o,0,s.length))}function D3(s){return Po(kt(s))}function mc(s,o,h){(h!==r&&!xr(s[o],h)||h===r&&!(o in s))&&Hr(s,o,h)}function Ss(s,o,h){var g=s[o];(!(Ge.call(s,o)&&xr(g,h))||h===r&&!(o in s))&&Hr(s,o,h)}function vo(s,o){for(var h=s.length;h--;)if(xr(s[h][0],o))return h;return-1}function U3(s,o,h,g){return ln(s,function(y,A,C){o(g,y,h(y),C)}),g}function wm(s,o){return s&&Mr(o,xt(o),s)}function $3(s,o){return s&&Mr(o,Dt(o),s)}function Hr(s,o,h){o=="__proto__"&&co?co(s,o,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[o]=h}function vc(s,o){for(var h=-1,g=o.length,y=F(g),A=s==null;++h<g;)y[h]=A?r:Zc(s,o[h]);return y}function Dn(s,o,h){return s===s&&(h!==r&&(s=s<=h?s:h),o!==r&&(s=s>=o?s:o)),s}function er(s,o,h,g,y,A){var C,R=o&c,M=o&d,D=o&m;if(h&&(C=y?h(s,g,y,A):h(s)),C!==r)return C;if(!at(s))return s;var U=de(s);if(U){if(C=IN(s),!R)return kt(s,C)}else{var G=Rt(s),Y=G==ae||G==Ee;if(dn(s))return jm(s,R);if(G==Ot||G==Pe||Y&&!y){if(C=M||Y?{}:h0(s),!R)return M?vN(s,$3(C,s)):mN(s,wm(C,s))}else{if(!Ye[G])return y?s:{};C=RN(s,G,R)}}A||(A=new yr);var te=A.get(s);if(te)return te;A.set(s,C),$0(s)?s.forEach(function(le){C.add(er(le,o,h,le,s,A))}):D0(s)&&s.forEach(function(le,we){C.set(we,er(le,o,h,we,s,A))});var ue=D?M?Bc:kc:M?Dt:xt,me=U?r:ue(s);return Zt(me||s,function(le,we){me&&(we=le,le=s[we]),Ss(C,we,er(le,o,h,we,s,A))}),C}function G3(s){var o=xt(s);return function(h){return Tm(h,s,o)}}function Tm(s,o,h){var g=h.length;if(s==null)return!g;for(s=We(s);g--;){var y=h[g],A=o[y],C=s[y];if(C===r&&!(y in s)||!A(C))return!1}return!0}function Am(s,o,h){if(typeof s!="function")throw new Qt(u);return Os(function(){s.apply(r,h)},o)}function Es(s,o,h,g){var y=-1,A=Ja,C=!0,R=s.length,M=[],D=o.length;if(!R)return M;h&&(o=rt(o,Ht(h))),g?(A=nc,C=!1):o.length>=i&&(A=ys,C=!1,o=new Bn(o));e:for(;++y<R;){var U=s[y],G=h==null?U:h(U);if(U=g||U!==0?U:0,C&&G===G){for(var Y=D;Y--;)if(o[Y]===G)continue e;M.push(U)}else A(o,G,g)||M.push(U)}return M}var ln=Zm(Pr),Sm=Zm(yc,!0);function z3(s,o){var h=!0;return ln(s,function(g,y,A){return h=!!o(g,y,A),h}),h}function _o(s,o,h){for(var g=-1,y=s.length;++g<y;){var A=s[g],C=o(A);if(C!=null&&(R===r?C===C&&!Xt(C):h(C,R)))var R=C,M=A}return M}function H3(s,o,h,g){var y=s.length;for(h=pe(h),h<0&&(h=-h>y?0:y+h),g=g===r||g>y?y:pe(g),g<0&&(g+=y),g=h>g?0:z0(g);h<g;)s[h++]=o;return s}function Em(s,o){var h=[];return ln(s,function(g,y,A){o(g,y,A)&&h.push(g)}),h}function At(s,o,h,g,y){var A=-1,C=s.length;for(h||(h=MN),y||(y=[]);++A<C;){var R=s[A];o>0&&h(R)?o>1?At(R,o-1,h,g,y):an(y,R):g||(y[y.length]=R)}return y}var _c=Qm(),Cm=Qm(!0);function Pr(s,o){return s&&_c(s,o,xt)}function yc(s,o){return s&&Cm(s,o,xt)}function yo(s,o){return sn(o,function(h){return Wr(s[h])})}function Un(s,o){o=hn(o,s);for(var h=0,g=o.length;s!=null&&h<g;)s=s[Or(o[h++])];return h&&h==g?s:r}function Im(s,o,h){var g=o(s);return de(s)?g:an(g,h(s))}function Ft(s){return s==null?s===r?_O:gr:Ln&&Ln in We(s)?SN(s):DN(s)}function xc(s,o){return s>o}function V3(s,o){return s!=null&&Ge.call(s,o)}function X3(s,o){return s!=null&&o in We(s)}function j3(s,o,h){return s>=It(o,h)&&s<gt(o,h)}function bc(s,o,h){for(var g=h?nc:Ja,y=s[0].length,A=s.length,C=A,R=F(A),M=1/0,D=[];C--;){var U=s[C];C&&o&&(U=rt(U,Ht(o))),M=It(U.length,M),R[C]=!h&&(o||y>=120&&U.length>=120)?new Bn(C&&U):r}U=s[0];var G=-1,Y=R[0];e:for(;++G<y&&D.length<M;){var te=U[G],ue=o?o(te):te;if(te=h||te!==0?te:0,!(Y?ys(Y,ue):g(D,ue,h))){for(C=A;--C;){var me=R[C];if(!(me?ys(me,ue):g(s[C],ue,h)))continue e}Y&&Y.push(ue),D.push(te)}}return D}function W3(s,o,h,g){return Pr(s,function(y,A,C){o(g,h(y),A,C)}),g}function Cs(s,o,h){o=hn(o,s),s=g0(s,o);var g=s==null?s:s[Or(rr(o))];return g==null?r:zt(g,s,h)}function Rm(s){return ut(s)&&Ft(s)==Pe}function q3(s){return ut(s)&&Ft(s)==_s}function Y3(s){return ut(s)&&Ft(s)==Ze}function Is(s,o,h,g,y){return s===o?!0:s==null||o==null||!ut(s)&&!ut(o)?s!==s&&o!==o:K3(s,o,h,g,Is,y)}function K3(s,o,h,g,y,A){var C=de(s),R=de(o),M=C?Oe:Rt(s),D=R?Oe:Rt(o);M=M==Pe?Ot:M,D=D==Pe?Ot:D;var U=M==Ot,G=D==Ot,Y=M==D;if(Y&&dn(s)){if(!dn(o))return!1;C=!0,U=!1}if(Y&&!U)return A||(A=new yr),C||Di(s)?u0(s,o,h,g,y,A):TN(s,o,M,h,g,y,A);if(!(h&_)){var te=U&&Ge.call(s,"__wrapped__"),ue=G&&Ge.call(o,"__wrapped__");if(te||ue){var me=te?s.value():s,le=ue?o.value():o;return A||(A=new yr),y(me,le,h,g,A)}}return Y?(A||(A=new yr),AN(s,o,h,g,y,A)):!1}function Z3(s){return ut(s)&&Rt(s)==Ce}function wc(s,o,h,g){var y=h.length,A=y,C=!g;if(s==null)return!A;for(s=We(s);y--;){var R=h[y];if(C&&R[2]?R[1]!==s[R[0]]:!(R[0]in s))return!1}for(;++y<A;){R=h[y];var M=R[0],D=s[M],U=R[1];if(C&&R[2]){if(D===r&&!(M in s))return!1}else{var G=new yr;if(g)var Y=g(D,U,M,s,o,G);if(!(Y===r?Is(U,D,_|b,g,G):Y))return!1}}return!0}function Pm(s){if(!at(s)||FN(s))return!1;var o=Wr(s)?ZF:GO;return o.test(Gn(s))}function Q3(s){return ut(s)&&Ft(s)==Ai}function J3(s){return ut(s)&&Rt(s)==vr}function eN(s){return ut(s)&&ko(s.length)&&!!Je[Ft(s)]}function Mm(s){return typeof s=="function"?s:s==null?Ut:typeof s=="object"?de(s)?Nm(s[0],s[1]):Fm(s):J0(s)}function Tc(s){if(!Ms(s))return n3(s);var o=[];for(var h in We(s))Ge.call(s,h)&&h!="constructor"&&o.push(h);return o}function tN(s){if(!at(s))return BN(s);var o=Ms(s),h=[];for(var g in s)g=="constructor"&&(o||!Ge.call(s,g))||h.push(g);return h}function Ac(s,o){return s<o}function Om(s,o){var h=-1,g=Bt(s)?F(s.length):[];return ln(s,function(y,A,C){g[++h]=o(y,A,C)}),g}function Fm(s){var o=Uc(s);return o.length==1&&o[0][2]?d0(o[0][0],o[0][1]):function(h){return h===s||wc(h,s,o)}}function Nm(s,o){return Gc(s)&&f0(o)?d0(Or(s),o):function(h){var g=Zc(h,s);return g===r&&g===o?Qc(h,s):Is(o,g,_|b)}}function xo(s,o,h,g,y){s!==o&&_c(o,function(A,C){if(y||(y=new yr),at(A))rN(s,o,C,h,xo,g,y);else{var R=g?g(Hc(s,C),A,C+"",s,o,y):r;R===r&&(R=A),mc(s,C,R)}},Dt)}function rN(s,o,h,g,y,A,C){var R=Hc(s,h),M=Hc(o,h),D=C.get(M);if(D){mc(s,h,D);return}var U=A?A(R,M,h+"",s,o,C):r,G=U===r;if(G){var Y=de(M),te=!Y&&dn(M),ue=!Y&&!te&&Di(M);U=M,Y||te||ue?de(R)?U=R:ct(R)?U=kt(R):te?(G=!1,U=jm(M,!0)):ue?(G=!1,U=Wm(M,!0)):U=[]:Fs(M)||zn(M)?(U=R,zn(R)?U=H0(R):(!at(R)||Wr(R))&&(U=h0(M))):G=!1}G&&(C.set(M,U),y(U,M,g,A,C),C.delete(M)),mc(s,h,U)}function Lm(s,o){var h=s.length;if(h)return o+=o<0?h:0,jr(o,h)?s[o]:r}function km(s,o,h){o.length?o=rt(o,function(A){return de(A)?function(C){return Un(C,A.length===1?A[0]:A)}:A}):o=[Ut];var g=-1;o=rt(o,Ht(oe()));var y=Om(s,function(A,C,R){var M=rt(o,function(D){return D(A)});return{criteria:M,index:++g,value:A}});return RF(y,function(A,C){return gN(A,C,h)})}function nN(s,o){return Bm(s,o,function(h,g){return Qc(s,g)})}function Bm(s,o,h){for(var g=-1,y=o.length,A={};++g<y;){var C=o[g],R=Un(s,C);h(R,C)&&Rs(A,hn(C,s),R)}return A}function iN(s){return function(o){return Un(o,s)}}function Sc(s,o,h,g){var y=g?IF:Ci,A=-1,C=o.length,R=s;for(s===o&&(o=kt(o)),h&&(R=rt(s,Ht(h)));++A<C;)for(var M=0,D=o[A],U=h?h(D):D;(M=y(R,U,M,g))>-1;)R!==s&&lo.call(R,M,1),lo.call(s,M,1);return s}function Dm(s,o){for(var h=s?o.length:0,g=h-1;h--;){var y=o[h];if(h==g||y!==A){var A=y;jr(y)?lo.call(s,y,1):Rc(s,y)}}return s}function Ec(s,o){return s+fo(_m()*(o-s+1))}function sN(s,o,h,g){for(var y=-1,A=gt(ho((o-s)/(h||1)),0),C=F(A);A--;)C[g?A:++y]=s,s+=h;return C}function Cc(s,o){var h="";if(!s||o<1||o>re)return h;do o%2&&(h+=s),o=fo(o/2),o&&(s+=s);while(o);return h}function _e(s,o){return Vc(p0(s,o,Ut),s+"")}function aN(s){return bm(Ui(s))}function oN(s,o){var h=Ui(s);return Po(h,Dn(o,0,h.length))}function Rs(s,o,h,g){if(!at(s))return s;o=hn(o,s);for(var y=-1,A=o.length,C=A-1,R=s;R!=null&&++y<A;){var M=Or(o[y]),D=h;if(M==="__proto__"||M==="constructor"||M==="prototype")return s;if(y!=C){var U=R[M];D=g?g(U,M,R):r,D===r&&(D=at(U)?U:jr(o[y+1])?[]:{})}Ss(R,M,D),R=R[M]}return s}var Um=po?function(s,o){return po.set(s,o),s}:Ut,uN=co?function(s,o){return co(s,"toString",{configurable:!0,enumerable:!1,value:eh(o),writable:!0})}:Ut;function lN(s){return Po(Ui(s))}function tr(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 A=F(y);++g<y;)A[g]=s[g+o];return A}function cN(s,o){var h;return ln(s,function(g,y,A){return h=o(g,y,A),!h}),!!h}function bo(s,o,h){var g=0,y=s==null?g:s.length;if(typeof o=="number"&&o===o&&y<=ye){for(;g<y;){var A=g+y>>>1,C=s[A];C!==null&&!Xt(C)&&(h?C<=o:C<o)?g=A+1:y=A}return y}return Ic(s,o,Ut,h)}function Ic(s,o,h,g){var y=0,A=s==null?0:s.length;if(A===0)return 0;o=h(o);for(var C=o!==o,R=o===null,M=Xt(o),D=o===r;y<A;){var U=fo((y+A)/2),G=h(s[U]),Y=G!==r,te=G===null,ue=G===G,me=Xt(G);if(C)var le=g||ue;else D?le=ue&&(g||Y):R?le=ue&&Y&&(g||!te):M?le=ue&&Y&&!te&&(g||!me):te||me?le=!1:le=g?G<=o:G<o;le?y=U+1:A=U}return It(A,he)}function $m(s,o){for(var h=-1,g=s.length,y=0,A=[];++h<g;){var C=s[h],R=o?o(C):C;if(!h||!xr(R,M)){var M=R;A[y++]=C===0?0:C}}return A}function Gm(s){return typeof s=="number"?s:Xt(s)?V:+s}function Vt(s){if(typeof s=="string")return s;if(de(s))return rt(s,Vt)+"";if(Xt(s))return ym?ym.call(s):"";var o=s+"";return o=="0"&&1/s==-z?"-0":o}function cn(s,o,h){var g=-1,y=Ja,A=s.length,C=!0,R=[],M=R;if(h)C=!1,y=nc;else if(A>=i){var D=o?null:bN(s);if(D)return to(D);C=!1,y=ys,M=new Bn}else M=o?[]:R;e:for(;++g<A;){var U=s[g],G=o?o(U):U;if(U=h||U!==0?U:0,C&&G===G){for(var Y=M.length;Y--;)if(M[Y]===G)continue e;o&&M.push(G),R.push(U)}else y(M,G,h)||(M!==R&&M.push(G),R.push(U))}return R}function Rc(s,o){return o=hn(o,s),s=g0(s,o),s==null||delete s[Or(rr(o))]}function zm(s,o,h,g){return Rs(s,o,h(Un(s,o)),g)}function wo(s,o,h,g){for(var y=s.length,A=g?y:-1;(g?A--:++A<y)&&o(s[A],A,s););return h?tr(s,g?0:A,g?A+1:y):tr(s,g?A+1:0,g?y:A)}function Hm(s,o){var h=s;return h instanceof Ae&&(h=h.value()),ic(o,function(g,y){return y.func.apply(y.thisArg,an([g],y.args))},h)}function Pc(s,o,h){var g=s.length;if(g<2)return g?cn(s[0]):[];for(var y=-1,A=F(g);++y<g;)for(var C=s[y],R=-1;++R<g;)R!=y&&(A[y]=Es(A[y]||C,s[R],o,h));return cn(At(A,1),o,h)}function Vm(s,o,h){for(var g=-1,y=s.length,A=o.length,C={};++g<y;){var R=g<A?o[g]:r;h(C,s[g],R)}return C}function Mc(s){return ct(s)?s:[]}function Oc(s){return typeof s=="function"?s:Ut}function hn(s,o){return de(s)?s:Gc(s,o)?[s]:y0(Ue(s))}var hN=_e;function fn(s,o,h){var g=s.length;return h=h===r?g:h,!o&&h>=g?s:tr(s,o,h)}var Xm=QF||function(s){return Tt.clearTimeout(s)};function jm(s,o){if(o)return s.slice();var h=s.length,g=dm?dm(h):new s.constructor(h);return s.copy(g),g}function Fc(s){var o=new s.constructor(s.byteLength);return new oo(o).set(new oo(s)),o}function fN(s,o){var h=o?Fc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}function dN(s){var o=new s.constructor(s.source,Rg.exec(s));return o.lastIndex=s.lastIndex,o}function pN(s){return As?We(As.call(s)):{}}function Wm(s,o){var h=o?Fc(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,A=Xt(s),C=o!==r,R=o===null,M=o===o,D=Xt(o);if(!R&&!D&&!A&&s>o||A&&C&&M&&!R&&!D||g&&C&&M||!h&&M||!y)return 1;if(!g&&!A&&!D&&s<o||D&&h&&y&&!g&&!A||R&&h&&y||!C&&y||!M)return-1}return 0}function gN(s,o,h){for(var g=-1,y=s.criteria,A=o.criteria,C=y.length,R=h.length;++g<C;){var M=qm(y[g],A[g]);if(M){if(g>=R)return M;var D=h[g];return M*(D=="desc"?-1:1)}}return s.index-o.index}function Ym(s,o,h,g){for(var y=-1,A=s.length,C=h.length,R=-1,M=o.length,D=gt(A-C,0),U=F(M+D),G=!g;++R<M;)U[R]=o[R];for(;++y<C;)(G||y<A)&&(U[h[y]]=s[y]);for(;D--;)U[R++]=s[y++];return U}function Km(s,o,h,g){for(var y=-1,A=s.length,C=-1,R=h.length,M=-1,D=o.length,U=gt(A-R,0),G=F(U+D),Y=!g;++y<U;)G[y]=s[y];for(var te=y;++M<D;)G[te+M]=o[M];for(;++C<R;)(Y||y<A)&&(G[te+h[C]]=s[y++]);return G}function kt(s,o){var h=-1,g=s.length;for(o||(o=F(g));++h<g;)o[h]=s[h];return o}function Mr(s,o,h,g){var y=!h;h||(h={});for(var A=-1,C=o.length;++A<C;){var R=o[A],M=g?g(h[R],s[R],R,h,s):r;M===r&&(M=s[R]),y?Hr(h,R,M):Ss(h,R,M)}return h}function mN(s,o){return Mr(s,$c(s),o)}function vN(s,o){return Mr(s,l0(s),o)}function To(s,o){return function(h,g){var y=de(h)?wF:U3,A=o?o():{};return y(h,s,oe(g,2),A)}}function Li(s){return _e(function(o,h){var g=-1,y=h.length,A=y>1?h[y-1]:r,C=y>2?h[2]:r;for(A=s.length>3&&typeof A=="function"?(y--,A):r,C&&Nt(h[0],h[1],C)&&(A=y<3?r:A,y=1),o=We(o);++g<y;){var R=h[g];R&&s(o,R,g,A)}return o})}function Zm(s,o){return function(h,g){if(h==null)return h;if(!Bt(h))return s(h,g);for(var y=h.length,A=o?y:-1,C=We(h);(o?A--:++A<y)&&g(C[A],A,C)!==!1;);return h}}function Qm(s){return function(o,h,g){for(var y=-1,A=We(o),C=g(o),R=C.length;R--;){var M=C[s?R:++y];if(h(A[M],M,A)===!1)break}return o}}function _N(s,o,h){var g=o&w,y=Ps(s);function A(){var C=this&&this!==Tt&&this instanceof A?y:s;return C.apply(g?h:this,arguments)}return A}function Jm(s){return function(o){o=Ue(o);var h=Ii(o)?_r(o):r,g=h?h[0]:o.charAt(0),y=h?fn(h,1).join(""):o.slice(1);return g[s]()+y}}function ki(s){return function(o){return ic(Z0(K0(o).replace(uF,"")),s,"")}}function Ps(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=Ni(s.prototype),g=s.apply(h,o);return at(g)?g:h}}function yN(s,o,h){var g=Ps(s);function y(){for(var A=arguments.length,C=F(A),R=A,M=Bi(y);R--;)C[R]=arguments[R];var D=A<3&&C[0]!==M&&C[A-1]!==M?[]:on(C,M);if(A-=D.length,A<h)return i0(s,o,Ao,y.placeholder,r,C,D,r,r,h-A);var U=this&&this!==Tt&&this instanceof y?g:s;return zt(U,this,C)}return y}function e0(s){return function(o,h,g){var y=We(o);if(!Bt(o)){var A=oe(h,3);o=xt(o),h=function(R){return A(y[R],R,y)}}var C=s(o,h,g);return C>-1?y[A?o[C]:C]:r}}function t0(s){return Xr(function(o){var h=o.length,g=h,y=Jt.prototype.thru;for(s&&o.reverse();g--;){var A=o[g];if(typeof A!="function")throw new Qt(u);if(y&&!C&&Io(A)=="wrapper")var C=new Jt([],!0)}for(g=C?g:h;++g<h;){A=o[g];var R=Io(A),M=R=="wrapper"?Dc(A):r;M&&zc(M[0])&&M[1]==(L|S|O|k)&&!M[4].length&&M[9]==1?C=C[Io(M[0])].apply(C,M[3]):C=A.length==1&&zc(A)?C[R]():C.thru(A)}return function(){var D=arguments,U=D[0];if(C&&D.length==1&&de(U))return C.plant(U).value();for(var G=0,Y=h?o[G].apply(this,D):U;++G<h;)Y=o[G].call(this,Y);return Y}})}function Ao(s,o,h,g,y,A,C,R,M,D){var U=o&L,G=o&w,Y=o&x,te=o&(S|I),ue=o&$,me=Y?r:Ps(s);function le(){for(var we=arguments.length,Ie=F(we),jt=we;jt--;)Ie[jt]=arguments[jt];if(te)var Lt=Bi(le),Wt=MF(Ie,Lt);if(g&&(Ie=Ym(Ie,g,y,te)),A&&(Ie=Km(Ie,A,C,te)),we-=Wt,te&&we<D){var ht=on(Ie,Lt);return i0(s,o,Ao,le.placeholder,h,Ie,ht,R,M,D-we)}var br=G?h:this,Yr=Y?br[s]:s;return we=Ie.length,R?Ie=UN(Ie,R):ue&&we>1&&Ie.reverse(),U&&M<we&&(Ie.length=M),this&&this!==Tt&&this instanceof le&&(Yr=me||Ps(Yr)),Yr.apply(br,Ie)}return le}function r0(s,o){return function(h,g){return W3(h,s,o(g),{})}}function So(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=Vt(h),g=Vt(g)):(h=Gm(h),g=Gm(g)),y=s(h,g)}return y}}function Nc(s){return Xr(function(o){return o=rt(o,Ht(oe())),_e(function(h){var g=this;return s(o,function(y){return zt(y,g,h)})})})}function Eo(s,o){o=o===r?" ":Vt(o);var h=o.length;if(h<2)return h?Cc(o,s):o;var g=Cc(o,ho(s/Ri(o)));return Ii(o)?fn(_r(g),0,s).join(""):g.slice(0,s)}function xN(s,o,h,g){var y=o&w,A=Ps(s);function C(){for(var R=-1,M=arguments.length,D=-1,U=g.length,G=F(U+M),Y=this&&this!==Tt&&this instanceof C?A:s;++D<U;)G[D]=g[D];for(;M--;)G[D++]=arguments[++R];return zt(Y,y?h:this,G)}return C}function n0(s){return function(o,h,g){return g&&typeof g!="number"&&Nt(o,h,g)&&(h=g=r),o=qr(o),h===r?(h=o,o=0):h=qr(h),g=g===r?o<h?1:-1:qr(g),sN(o,h,g,s)}}function Co(s){return function(o,h){return typeof o=="string"&&typeof h=="string"||(o=nr(o),h=nr(h)),s(o,h)}}function i0(s,o,h,g,y,A,C,R,M,D){var U=o&S,G=U?C:r,Y=U?r:C,te=U?A:r,ue=U?r:A;o|=U?O:N,o&=~(U?N:O),o&E||(o&=~(w|x));var me=[s,o,y,te,G,ue,Y,R,M,D],le=h.apply(r,me);return zc(s)&&m0(le,me),le.placeholder=g,v0(le,s,o)}function Lc(s){var o=pt[s];return function(h,g){if(h=nr(h),g=g==null?0:It(pe(g),292),g&&vm(h)){var y=(Ue(h)+"e").split("e"),A=o(y[0]+"e"+(+y[1]+g));return y=(Ue(A)+"e").split("e"),+(y[0]+"e"+(+y[1]-g))}return o(h)}}var bN=Oi&&1/to(new Oi([,-0]))[1]==z?function(s){return new Oi(s)}:nh;function s0(s){return function(o){var h=Rt(o);return h==Ce?hc(o):h==vr?DF(o):PF(o,s(o))}}function Vr(s,o,h,g,y,A,C,R){var M=o&x;if(!M&&typeof s!="function")throw new Qt(u);var D=g?g.length:0;if(D||(o&=~(O|N),g=y=r),C=C===r?C:gt(pe(C),0),R=R===r?R:pe(R),D-=y?y.length:0,o&N){var U=g,G=y;g=y=r}var Y=M?r:Dc(s),te=[s,o,h,g,y,U,G,A,C,R];if(Y&&kN(te,Y),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:gt(te[9]-D,0),!R&&o&(S|I)&&(o&=~(S|I)),!o||o==w)var ue=_N(s,o,h);else o==S||o==I?ue=yN(s,o,R):(o==O||o==(w|O))&&!y.length?ue=xN(s,o,h,g):ue=Ao.apply(r,te);var me=Y?Um:m0;return v0(me(ue,te),s,o)}function a0(s,o,h,g){return s===r||xr(s,Mi[h])&&!Ge.call(g,h)?o:s}function o0(s,o,h,g,y,A){return at(s)&&at(o)&&(A.set(o,s),xo(s,o,r,o0,A),A.delete(o)),s}function wN(s){return Fs(s)?r:s}function u0(s,o,h,g,y,A){var C=h&_,R=s.length,M=o.length;if(R!=M&&!(C&&M>R))return!1;var D=A.get(s),U=A.get(o);if(D&&U)return D==o&&U==s;var G=-1,Y=!0,te=h&b?new Bn:r;for(A.set(s,o),A.set(o,s);++G<R;){var ue=s[G],me=o[G];if(g)var le=C?g(me,ue,G,o,s,A):g(ue,me,G,s,o,A);if(le!==r){if(le)continue;Y=!1;break}if(te){if(!sc(o,function(we,Ie){if(!ys(te,Ie)&&(ue===we||y(ue,we,h,g,A)))return te.push(Ie)})){Y=!1;break}}else if(!(ue===me||y(ue,me,h,g,A))){Y=!1;break}}return A.delete(s),A.delete(o),Y}function TN(s,o,h,g,y,A,C){switch(h){case Si:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case _s:return!(s.byteLength!=o.byteLength||!A(new oo(s),new oo(o)));case He:case Ze:case Qe:return xr(+s,+o);case W:return s.name==o.name&&s.message==o.message;case Ai:case ms:return s==o+"";case Ce:var R=hc;case vr:var M=g&_;if(R||(R=to),s.size!=o.size&&!M)return!1;var D=C.get(s);if(D)return D==o;g|=b,C.set(s,o);var U=u0(R(s),R(o),g,y,A,C);return C.delete(s),U;case Ya:if(As)return As.call(s)==As.call(o)}return!1}function AN(s,o,h,g,y,A){var C=h&_,R=kc(s),M=R.length,D=kc(o),U=D.length;if(M!=U&&!C)return!1;for(var G=M;G--;){var Y=R[G];if(!(C?Y in o:Ge.call(o,Y)))return!1}var te=A.get(s),ue=A.get(o);if(te&&ue)return te==o&&ue==s;var me=!0;A.set(s,o),A.set(o,s);for(var le=C;++G<M;){Y=R[G];var we=s[Y],Ie=o[Y];if(g)var jt=C?g(Ie,we,Y,o,s,A):g(we,Ie,Y,s,o,A);if(!(jt===r?we===Ie||y(we,Ie,h,g,A):jt)){me=!1;break}le||(le=Y=="constructor")}if(me&&!le){var Lt=s.constructor,Wt=o.constructor;Lt!=Wt&&"constructor"in s&&"constructor"in o&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof Wt=="function"&&Wt instanceof Wt)&&(me=!1)}return A.delete(s),A.delete(o),me}function Xr(s){return Vc(p0(s,r,T0),s+"")}function kc(s){return Im(s,xt,$c)}function Bc(s){return Im(s,Dt,l0)}var Dc=po?function(s){return po.get(s)}:nh;function Io(s){for(var o=s.name+"",h=Fi[o],g=Ge.call(Fi,o)?h.length:0;g--;){var y=h[g],A=y.func;if(A==null||A==s)return y.name}return o}function Bi(s){var o=Ge.call(T,"placeholder")?T:s;return o.placeholder}function oe(){var s=T.iteratee||th;return s=s===th?Mm:s,arguments.length?s(arguments[0],arguments[1]):s}function Ro(s,o){var h=s.__data__;return ON(o)?h[typeof o=="string"?"string":"hash"]:h.map}function Uc(s){for(var o=xt(s),h=o.length;h--;){var g=o[h],y=s[g];o[h]=[g,y,f0(y)]}return o}function $n(s,o){var h=LF(s,o);return Pm(h)?h:r}function SN(s){var o=Ge.call(s,Ln),h=s[Ln];try{s[Ln]=r;var g=!0}catch{}var y=so.call(s);return g&&(o?s[Ln]=h:delete s[Ln]),y}var $c=dc?function(s){return s==null?[]:(s=We(s),sn(dc(s),function(o){return gm.call(s,o)}))}:ih,l0=dc?function(s){for(var o=[];s;)an(o,$c(s)),s=uo(s);return o}:ih,Rt=Ft;(pc&&Rt(new pc(new ArrayBuffer(1)))!=Si||bs&&Rt(new bs)!=Ce||gc&&Rt(gc.resolve())!=$r||Oi&&Rt(new Oi)!=vr||ws&&Rt(new ws)!=vs)&&(Rt=function(s){var o=Ft(s),h=o==Ot?s.constructor:r,g=h?Gn(h):"";if(g)switch(g){case o3:return Si;case u3:return Ce;case l3:return $r;case c3:return vr;case h3:return vs}return o});function EN(s,o,h){for(var g=-1,y=h.length;++g<y;){var A=h[g],C=A.size;switch(A.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=It(o,s+C);break;case"takeRight":s=gt(s,o-C);break}}return{start:s,end:o}}function CN(s){var o=s.match(FO);return o?o[1].split(NO):[]}function c0(s,o,h){o=hn(o,s);for(var g=-1,y=o.length,A=!1;++g<y;){var C=Or(o[g]);if(!(A=s!=null&&h(s,C)))break;s=s[C]}return A||++g!=y?A:(y=s==null?0:s.length,!!y&&ko(y)&&jr(C,y)&&(de(s)||zn(s)))}function IN(s){var o=s.length,h=new s.constructor(o);return o&&typeof s[0]=="string"&&Ge.call(s,"index")&&(h.index=s.index,h.input=s.input),h}function h0(s){return typeof s.constructor=="function"&&!Ms(s)?Ni(uo(s)):{}}function RN(s,o,h){var g=s.constructor;switch(o){case _s:return Fc(s);case He:case Ze:return new g(+s);case Si:return fN(s,h);case Ul:case $l:case Gl:case zl:case Hl:case Vl:case Xl:case jl:case Wl:return Wm(s,h);case Ce:return new g;case Qe:case ms:return new g(s);case Ai:return dN(s);case vr:return new g;case Ya:return pN(s)}}function PN(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(OO,`{
|
|
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,w=1,x=2,E=4,S=8,I=16,O=32,N=64,L=128,k=256,$=512,j=30,Q="...",de=800,H=16,V=1,ge=2,Re=3,z=1/0,ee=9007199254740991,fe=17976931348623157e292,X=0/0,Y=4294967295,le=Y-1,we=Y>>>1,ye=[["ary",L],["bind",w],["bindKey",x],["curry",S],["curryRight",I],["flip",$],["partial",O],["partialRight",N],["rearg",k]],Me="[object Arguments]",Oe="[object Array]",ze="[object AsyncFunction]",De="[object Boolean]",Ye="[object Date]",Ke="[object DOMException]",Te="[object Error]",Ue="[object Function]",Ze="[object GeneratorFunction]",Qe="[object Map]",J="[object Number]",ne="[object Null]",Ae="[object Object]",gt="[object Promise]",Ut="[object Proxy]",$t="[object RegExp]",Lt="[object Set]",Hr="[object String]",Ci="[object Symbol]",br="[object Undefined]",Ii="[object WeakMap]",yO="[object WeakSet]",xs="[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]",xO=/\b__p \+= '';/g,bO=/\b(__p \+=) '' \+/g,wO=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ig=/&(?:amp|lt|gt|quot|#39);/g,Rg=/[&<>"']/g,TO=RegExp(Ig.source),AO=RegExp(Rg.source),SO=/<%-([\s\S]+?)%>/g,EO=/<%([\s\S]+?)%>/g,Pg=/<%=([\s\S]+?)%>/g,CO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IO=/^\w*$/,RO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yl=/[\\^$.*+?()[\]{}|]/g,PO=RegExp(Yl.source),Kl=/^\s+/,MO=/\s/,OO=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,FO=/\{\n\/\* \[wrapped with (.+)\] \*/,NO=/,? & /,LO=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kO=/[()=,{}\[\]\/\s]/,BO=/\\(\\)?/g,DO=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mg=/\w*$/,UO=/^[-+]0x[0-9a-f]+$/i,$O=/^0b[01]+$/i,GO=/^\[object .+?Constructor\]$/,zO=/^0o[0-7]+$/i,HO=/^(?:0|[1-9]\d*)$/,VO=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Za=/($^)/,XO=/['\n\r\u2028\u2029\\]/g,Qa="\\ud800-\\udfff",jO="\\u0300-\\u036f",WO="\\ufe20-\\ufe2f",qO="\\u20d0-\\u20ff",Og=jO+WO+qO,Fg="\\u2700-\\u27bf",Ng="a-z\\xdf-\\xf6\\xf8-\\xff",YO="\\xac\\xb1\\xd7\\xf7",KO="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ZO="\\u2000-\\u206f",QO=" \\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",Lg="A-Z\\xc0-\\xd6\\xd8-\\xde",kg="\\ufe0e\\ufe0f",Bg=YO+KO+ZO+QO,Zl="['’]",JO="["+Qa+"]",Dg="["+Bg+"]",Ja="["+Og+"]",Ug="\\d+",eF="["+Fg+"]",$g="["+Ng+"]",Gg="[^"+Qa+Bg+Ug+Fg+Ng+Lg+"]",Ql="\\ud83c[\\udffb-\\udfff]",tF="(?:"+Ja+"|"+Ql+")",zg="[^"+Qa+"]",Jl="(?:\\ud83c[\\udde6-\\uddff]){2}",ec="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+Lg+"]",Hg="\\u200d",Vg="(?:"+$g+"|"+Gg+")",rF="(?:"+Pi+"|"+Gg+")",Xg="(?:"+Zl+"(?:d|ll|m|re|s|t|ve))?",jg="(?:"+Zl+"(?:D|LL|M|RE|S|T|VE))?",Wg=tF+"?",qg="["+kg+"]?",nF="(?:"+Hg+"(?:"+[zg,Jl,ec].join("|")+")"+qg+Wg+")*",iF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Yg=qg+Wg+nF,aF="(?:"+[eF,Jl,ec].join("|")+")"+Yg,oF="(?:"+[zg+Ja+"?",Ja,Jl,ec,JO].join("|")+")",uF=RegExp(Zl,"g"),lF=RegExp(Ja,"g"),tc=RegExp(Ql+"(?="+Ql+")|"+oF+Yg,"g"),cF=RegExp([Pi+"?"+$g+"+"+Xg+"(?="+[Dg,Pi,"$"].join("|")+")",rF+"+"+jg+"(?="+[Dg,Pi+Vg,"$"].join("|")+")",Pi+"?"+Vg+"+"+Xg,Pi+"+"+jg,sF,iF,Ug,aF].join("|"),"g"),hF=RegExp("["+Hg+Qa+Og+kg+"]"),fF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dF=["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"],pF=-1,tt={};tt[$l]=tt[Gl]=tt[zl]=tt[Hl]=tt[Vl]=tt[Xl]=tt[jl]=tt[Wl]=tt[ql]=!0,tt[Me]=tt[Oe]=tt[xs]=tt[De]=tt[Ri]=tt[Ye]=tt[Te]=tt[Ue]=tt[Qe]=tt[J]=tt[Ae]=tt[$t]=tt[Lt]=tt[Hr]=tt[Ii]=!1;var Je={};Je[Me]=Je[Oe]=Je[xs]=Je[Ri]=Je[De]=Je[Ye]=Je[$l]=Je[Gl]=Je[zl]=Je[Hl]=Je[Vl]=Je[Qe]=Je[J]=Je[Ae]=Je[$t]=Je[Lt]=Je[Hr]=Je[Ci]=Je[Xl]=Je[jl]=Je[Wl]=Je[ql]=!0,Je[Te]=Je[Ue]=Je[Ii]=!1;var gF={À:"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"},mF={"&":"&","<":"<",">":">",'"':""","'":"'"},vF={"&":"&","<":"<",">":">",""":'"',"'":"'"},_F={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yF=parseFloat,xF=parseInt,Kg=typeof At=="object"&&At&&At.Object===Object&&At,bF=typeof self=="object"&&self&&self.Object===Object&&self,Et=Kg||bF||Function("return this")(),rc=e&&!e.nodeType&&e,Bn=rc&&!0&&t&&!t.nodeType&&t,Zg=Bn&&Bn.exports===rc,nc=Zg&&Kg.process,tr=function(){try{var P=Bn&&Bn.require&&Bn.require("util").types;return P||nc&&nc.binding&&nc.binding("util")}catch{}}(),Qg=tr&&tr.isArrayBuffer,Jg=tr&&tr.isDate,em=tr&&tr.isMap,tm=tr&&tr.isRegExp,rm=tr&&tr.isSet,nm=tr&&tr.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 wF(P,B,F,Z){for(var ce=-1,ke=P==null?0:P.length;++ce<ke;){var vt=P[ce];B(Z,vt,F(vt),P)}return Z}function rr(P,B){for(var F=-1,Z=P==null?0:P.length;++F<Z&&B(P[F],F,P)!==!1;);return P}function TF(P,B){for(var F=P==null?0:P.length;F--&&B(P[F],F,P)!==!1;);return P}function im(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,ce=0,ke=[];++F<Z;){var vt=P[F];B(vt,F,P)&&(ke[ce++]=vt)}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,ce=P==null?0:P.length;++Z<ce;)if(F(B,P[Z]))return!0;return!1}function it(P,B){for(var F=-1,Z=P==null?0:P.length,ce=Array(Z);++F<Z;)ce[F]=B(P[F],F,P);return ce}function ln(P,B){for(var F=-1,Z=B.length,ce=P.length;++F<Z;)P[ce+F]=B[F];return P}function sc(P,B,F,Z){var ce=-1,ke=P==null?0:P.length;for(Z&&ke&&(F=P[++ce]);++ce<ke;)F=B(F,P[ce],ce,P);return F}function AF(P,B,F,Z){var ce=P==null?0:P.length;for(Z&&ce&&(F=P[--ce]);ce--;)F=B(F,P[ce],ce,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 SF=oc("length");function EF(P){return P.split("")}function CF(P){return P.match(LO)||[]}function sm(P,B,F){var Z;return F(P,function(ce,ke,vt){if(B(ce,ke,vt))return Z=ke,!1}),Z}function to(P,B,F,Z){for(var ce=P.length,ke=F+(Z?1:-1);Z?ke--:++ke<ce;)if(B(P[ke],ke,P))return ke;return-1}function Mi(P,B,F){return B===B?UF(P,B,F):to(P,am,F)}function IF(P,B,F,Z){for(var ce=F-1,ke=P.length;++ce<ke;)if(Z(P[ce],B))return ce;return-1}function am(P){return P!==P}function om(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 um(P,B,F,Z,ce){return ce(P,function(ke,vt,We){F=Z?(Z=!1,ke):B(F,ke,vt,We)}),F}function RF(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,ce=P.length;++Z<ce;){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 PF(P,B){return it(B,function(F){return[F,P[F]]})}function lm(P){return P&&P.slice(0,dm(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 bs(P,B){return P.has(B)}function cm(P,B){for(var F=-1,Z=P.length;++F<Z&&Mi(B,P[F],0)>-1;);return F}function hm(P,B){for(var F=P.length;F--&&Mi(B,P[F],0)>-1;);return F}function MF(P,B){for(var F=P.length,Z=0;F--;)P[F]===B&&++Z;return Z}var OF=uc(gF),FF=uc(mF);function NF(P){return"\\"+_F[P]}function LF(P,B){return P==null?r:P[B]}function Oi(P){return hF.test(P)}function kF(P){return fF.test(P)}function BF(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,ce){F[++B]=[ce,Z]}),F}function fm(P,B){return function(F){return P(B(F))}}function cn(P,B){for(var F=-1,Z=P.length,ce=0,ke=[];++F<Z;){var vt=P[F];(vt===B||vt===v)&&(P[F]=v,ke[ce++]=F)}return ke}function ro(P){var B=-1,F=Array(P.size);return P.forEach(function(Z){F[++B]=Z}),F}function DF(P){var B=-1,F=Array(P.size);return P.forEach(function(Z){F[++B]=[Z,Z]}),F}function UF(P,B,F){for(var Z=F-1,ce=P.length;++Z<ce;)if(P[Z]===B)return Z;return-1}function $F(P,B,F){for(var Z=F+1;Z--;)if(P[Z]===B)return Z;return Z}function Fi(P){return Oi(P)?zF(P):SF(P)}function wr(P){return Oi(P)?HF(P):EF(P)}function dm(P){for(var B=P.length;B--&&MO.test(P.charAt(B)););return B}var GF=uc(vF);function zF(P){for(var B=tc.lastIndex=0;tc.test(P);)++B;return B}function HF(P){return P.match(tc)||[]}function VF(P){return P.match(cF)||[]}var XF=function P(B){B=B==null?Et:Ni.defaults(Et.Object(),B,Ni.pick(Et,dF));var F=B.Array,Z=B.Date,ce=B.Error,ke=B.Function,vt=B.Math,We=B.Object,dc=B.RegExp,jF=B.String,nr=B.TypeError,no=F.prototype,WF=ke.prototype,Li=We.prototype,io=B["__core-js_shared__"],so=WF.toString,He=Li.hasOwnProperty,qF=0,pm=function(){var s=/[^.]+$/.exec(io&&io.keys&&io.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ao=Li.toString,YF=so.call(We),KF=Et._,ZF=dc("^"+so.call(He).replace(Yl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oo=Zg?B.Buffer:r,hn=B.Symbol,uo=B.Uint8Array,gm=oo?oo.allocUnsafe:r,lo=fm(We.getPrototypeOf,We),mm=We.create,vm=Li.propertyIsEnumerable,co=no.splice,_m=hn?hn.isConcatSpreadable:r,ws=hn?hn.iterator:r,Dn=hn?hn.toStringTag:r,ho=function(){try{var s=Hn(We,"defineProperty");return s({},"",{}),s}catch{}}(),QF=B.clearTimeout!==Et.clearTimeout&&B.clearTimeout,JF=Z&&Z.now!==Et.Date.now&&Z.now,e3=B.setTimeout!==Et.setTimeout&&B.setTimeout,fo=vt.ceil,po=vt.floor,pc=We.getOwnPropertySymbols,t3=oo?oo.isBuffer:r,ym=B.isFinite,r3=no.join,n3=fm(We.keys,We),_t=vt.max,Mt=vt.min,i3=Z.now,s3=B.parseInt,xm=vt.random,a3=no.reverse,gc=Hn(B,"DataView"),Ts=Hn(B,"Map"),mc=Hn(B,"Promise"),ki=Hn(B,"Set"),As=Hn(B,"WeakMap"),Ss=Hn(We,"create"),go=As&&new As,Bi={},o3=Vn(gc),u3=Vn(Ts),l3=Vn(mc),c3=Vn(ki),h3=Vn(As),mo=hn?hn.prototype:r,Es=mo?mo.valueOf:r,bm=mo?mo.toString:r;function T(s){if(ct(s)&&!he(s)&&!(s instanceof Se)){if(s instanceof ir)return s;if(He.call(s,"__wrapped__"))return w0(s)}return new ir(s)}var Di=function(){function s(){}return function(o){if(!ut(o))return{};if(mm)return mm(o);s.prototype=o;var h=new s;return s.prototype=r,h}}();function vo(){}function ir(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}T.templateSettings={escape:SO,evaluate:EO,interpolate:Pg,variable:"",imports:{_:T}},T.prototype=vo.prototype,T.prototype.constructor=T,ir.prototype=Di(vo.prototype),ir.prototype.constructor=ir;function Se(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Y,this.__views__=[]}function f3(){var s=new Se(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 d3(){if(this.__filtered__){var s=new Se(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function p3(){var s=this.__wrapped__.value(),o=this.__dir__,h=he(s),g=o<0,y=h?s.length:0,A=EN(0,y,this.__views__),C=A.start,R=A.end,M=R-C,D=g?R:C-1,U=this.__iteratees__,G=U.length,q=0,te=Mt(M,this.__takeCount__);if(!h||!g&&y==M&&te==M)return Xm(s,this.__actions__);var ae=[];e:for(;M--&&q<te;){D+=o;for(var me=-1,oe=s[D];++me<G;){var xe=U[me],Ce=xe.iteratee,Zt=xe.type,Dt=Ce(oe);if(Zt==ge)oe=Dt;else if(!Dt){if(Zt==V)continue e;break e}}ae[q++]=oe}return ae}Se.prototype=Di(vo.prototype),Se.prototype.constructor=Se;function Un(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 g3(){this.__data__=Ss?Ss(null):{},this.size=0}function m3(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function v3(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 _3(s){var o=this.__data__;return Ss?o[s]!==r:He.call(o,s)}function y3(s,o){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Ss&&o===r?f:o,this}Un.prototype.clear=g3,Un.prototype.delete=m3,Un.prototype.get=v3,Un.prototype.has=_3,Un.prototype.set=y3;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 x3(){this.__data__=[],this.size=0}function b3(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 w3(s){var o=this.__data__,h=_o(o,s);return h<0?r:o[h][1]}function T3(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=x3,Vr.prototype.delete=b3,Vr.prototype.get=w3,Vr.prototype.has=T3,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 S3(){this.size=0,this.__data__={hash:new Un,map:new(Ts||Vr),string:new Un}}function E3(s){var o=Po(this,s).delete(s);return this.size-=o?1:0,o}function C3(s){return Po(this,s).get(s)}function I3(s){return Po(this,s).has(s)}function R3(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=S3,Xr.prototype.delete=E3,Xr.prototype.get=C3,Xr.prototype.has=I3,Xr.prototype.set=R3;function $n(s){var o=-1,h=s==null?0:s.length;for(this.__data__=new Xr;++o<h;)this.add(s[o])}function P3(s){return this.__data__.set(s,f),this}function M3(s){return this.__data__.has(s)}$n.prototype.add=$n.prototype.push=P3,$n.prototype.has=M3;function Tr(s){var o=this.__data__=new Vr(s);this.size=o.size}function O3(){this.__data__=new Vr,this.size=0}function F3(s){var o=this.__data__,h=o.delete(s);return this.size=o.size,h}function N3(s){return this.__data__.get(s)}function L3(s){return this.__data__.has(s)}function k3(s,o){var h=this.__data__;if(h instanceof Vr){var g=h.__data__;if(!Ts||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=O3,Tr.prototype.delete=F3,Tr.prototype.get=N3,Tr.prototype.has=L3,Tr.prototype.set=k3;function wm(s,o){var h=he(s),g=!h&&Xn(s),y=!h&&!g&&mn(s),A=!h&&!g&&!y&&zi(s),C=h||g||y||A,R=C?cc(s.length,jF):[],M=R.length;for(var D in s)(o||He.call(s,D))&&!(C&&(D=="length"||y&&(D=="offset"||D=="parent")||A&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||Yr(D,M)))&&R.push(D);return R}function Tm(s){var o=s.length;return o?s[Cc(0,o-1)]:r}function B3(s,o){return Mo(Gt(s),Gn(o,0,s.length))}function D3(s){return Mo(Gt(s))}function vc(s,o,h){(h!==r&&!Ar(s[o],h)||h===r&&!(o in s))&&jr(s,o,h)}function Cs(s,o,h){var g=s[o];(!(He.call(s,o)&&Ar(g,h))||h===r&&!(o in s))&&jr(s,o,h)}function _o(s,o){for(var h=s.length;h--;)if(Ar(s[h][0],o))return h;return-1}function U3(s,o,h,g){return fn(s,function(y,A,C){o(g,y,h(y),C)}),g}function Am(s,o){return s&&Lr(o,Tt(o),s)}function $3(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),A=s==null;++h<g;)y[h]=A?r:Qc(s,o[h]);return y}function Gn(s,o,h){return s===s&&(h!==r&&(s=s<=h?s:h),o!==r&&(s=s>=o?s:o)),s}function sr(s,o,h,g,y,A){var C,R=o&c,M=o&d,D=o&m;if(h&&(C=y?h(s,g,y,A):h(s)),C!==r)return C;if(!ut(s))return s;var U=he(s);if(U){if(C=IN(s),!R)return Gt(s,C)}else{var G=Ot(s),q=G==Ue||G==Ze;if(mn(s))return qm(s,R);if(G==Ae||G==Me||q&&!y){if(C=M||q?{}:d0(s),!R)return M?vN(s,$3(C,s)):mN(s,Am(C,s))}else{if(!Je[G])return y?s:{};C=RN(s,G,R)}}A||(A=new Tr);var te=A.get(s);if(te)return te;A.set(s,C),z0(s)?s.forEach(function(oe){C.add(sr(oe,o,h,oe,s,A))}):$0(s)&&s.forEach(function(oe,xe){C.set(xe,sr(oe,o,h,xe,s,A))});var ae=D?M?Dc:Bc:M?Ht:Tt,me=U?r:ae(s);return rr(me||s,function(oe,xe){me&&(xe=oe,oe=s[xe]),Cs(C,xe,sr(oe,o,h,xe,s,A))}),C}function G3(s){var o=Tt(s);return function(h){return Sm(h,s,o)}}function Sm(s,o,h){var g=h.length;if(s==null)return!g;for(s=We(s);g--;){var y=h[g],A=o[y],C=s[y];if(C===r&&!(y in s)||!A(C))return!1}return!0}function Em(s,o,h){if(typeof s!="function")throw new nr(u);return Ns(function(){s.apply(r,h)},o)}function Is(s,o,h,g){var y=-1,A=eo,C=!0,R=s.length,M=[],D=o.length;if(!R)return M;h&&(o=it(o,qt(h))),g?(A=ic,C=!1):o.length>=i&&(A=bs,C=!1,o=new $n(o));e:for(;++y<R;){var U=s[y],G=h==null?U:h(U);if(U=g||U!==0?U:0,C&&G===G){for(var q=D;q--;)if(o[q]===G)continue e;M.push(U)}else A(o,G,g)||M.push(U)}return M}var fn=Jm(Nr),Cm=Jm(xc,!0);function z3(s,o){var h=!0;return fn(s,function(g,y,A){return h=!!o(g,y,A),h}),h}function yo(s,o,h){for(var g=-1,y=s.length;++g<y;){var A=s[g],C=o(A);if(C!=null&&(R===r?C===C&&!Kt(C):h(C,R)))var R=C,M=A}return M}function H3(s,o,h,g){var y=s.length;for(h=pe(h),h<0&&(h=-h>y?0:y+h),g=g===r||g>y?y:pe(g),g<0&&(g+=y),g=h>g?0:V0(g);h<g;)s[h++]=o;return s}function Im(s,o){var h=[];return fn(s,function(g,y,A){o(g,y,A)&&h.push(g)}),h}function Ct(s,o,h,g,y){var A=-1,C=s.length;for(h||(h=MN),y||(y=[]);++A<C;){var R=s[A];o>0&&h(R)?o>1?Ct(R,o-1,h,g,y):ln(y,R):g||(y[y.length]=R)}return y}var yc=e0(),Rm=e0(!0);function Nr(s,o){return s&&yc(s,o,Tt)}function xc(s,o){return s&&Rm(s,o,Tt)}function xo(s,o){return un(o,function(h){return Kr(s[h])})}function zn(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 Pm(s,o,h){var g=o(s);return he(s)?g:ln(g,h(s))}function kt(s){return s==null?s===r?br:ne:Dn&&Dn in We(s)?SN(s):DN(s)}function bc(s,o){return s>o}function V3(s,o){return s!=null&&He.call(s,o)}function X3(s,o){return s!=null&&o in We(s)}function j3(s,o,h){return s>=Mt(o,h)&&s<_t(o,h)}function wc(s,o,h){for(var g=h?ic:eo,y=s[0].length,A=s.length,C=A,R=F(A),M=1/0,D=[];C--;){var U=s[C];C&&o&&(U=it(U,qt(o))),M=Mt(U.length,M),R[C]=!h&&(o||y>=120&&U.length>=120)?new $n(C&&U):r}U=s[0];var G=-1,q=R[0];e:for(;++G<y&&D.length<M;){var te=U[G],ae=o?o(te):te;if(te=h||te!==0?te:0,!(q?bs(q,ae):g(D,ae,h))){for(C=A;--C;){var me=R[C];if(!(me?bs(me,ae):g(s[C],ae,h)))continue e}q&&q.push(ae),D.push(te)}}return D}function W3(s,o,h,g){return Nr(s,function(y,A,C){o(g,h(y),A,C)}),g}function Rs(s,o,h){o=pn(o,s),s=v0(s,o);var g=s==null?s:s[kr(or(o))];return g==null?r:Wt(g,s,h)}function Mm(s){return ct(s)&&kt(s)==Me}function q3(s){return ct(s)&&kt(s)==xs}function Y3(s){return ct(s)&&kt(s)==Ye}function Ps(s,o,h,g,y){return s===o?!0:s==null||o==null||!ct(s)&&!ct(o)?s!==s&&o!==o:K3(s,o,h,g,Ps,y)}function K3(s,o,h,g,y,A){var C=he(s),R=he(o),M=C?Oe:Ot(s),D=R?Oe:Ot(o);M=M==Me?Ae:M,D=D==Me?Ae:D;var U=M==Ae,G=D==Ae,q=M==D;if(q&&mn(s)){if(!mn(o))return!1;C=!0,U=!1}if(q&&!U)return A||(A=new Tr),C||zi(s)?c0(s,o,h,g,y,A):TN(s,o,M,h,g,y,A);if(!(h&_)){var te=U&&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 A||(A=new Tr),y(me,oe,h,g,A)}}return q?(A||(A=new Tr),AN(s,o,h,g,y,A)):!1}function Z3(s){return ct(s)&&Ot(s)==Qe}function Tc(s,o,h,g){var y=h.length,A=y,C=!g;if(s==null)return!A;for(s=We(s);y--;){var R=h[y];if(C&&R[2]?R[1]!==s[R[0]]:!(R[0]in s))return!1}for(;++y<A;){R=h[y];var M=R[0],D=s[M],U=R[1];if(C&&R[2]){if(D===r&&!(M in s))return!1}else{var G=new Tr;if(g)var q=g(D,U,M,s,o,G);if(!(q===r?Ps(U,D,_|b,g,G):q))return!1}}return!0}function Om(s){if(!ut(s)||FN(s))return!1;var o=Kr(s)?ZF:GO;return o.test(Vn(s))}function Q3(s){return ct(s)&&kt(s)==$t}function J3(s){return ct(s)&&Ot(s)==Lt}function eN(s){return ct(s)&&Bo(s.length)&&!!tt[kt(s)]}function Fm(s){return typeof s=="function"?s:s==null?Vt:typeof s=="object"?he(s)?km(s[0],s[1]):Lm(s):tv(s)}function Ac(s){if(!Fs(s))return n3(s);var o=[];for(var h in We(s))He.call(s,h)&&h!="constructor"&&o.push(h);return o}function tN(s){if(!ut(s))return BN(s);var o=Fs(s),h=[];for(var g in s)g=="constructor"&&(o||!He.call(s,g))||h.push(g);return h}function Sc(s,o){return s<o}function Nm(s,o){var h=-1,g=zt(s)?F(s.length):[];return fn(s,function(y,A,C){g[++h]=o(y,A,C)}),g}function Lm(s){var o=$c(s);return o.length==1&&o[0][2]?g0(o[0][0],o[0][1]):function(h){return h===s||Tc(h,s,o)}}function km(s,o){return zc(s)&&p0(o)?g0(kr(s),o):function(h){var g=Qc(h,s);return g===r&&g===o?Jc(h,s):Ps(o,g,_|b)}}function bo(s,o,h,g,y){s!==o&&yc(o,function(A,C){if(y||(y=new Tr),ut(A))rN(s,o,C,h,bo,g,y);else{var R=g?g(Vc(s,C),A,C+"",s,o,y):r;R===r&&(R=A),vc(s,C,R)}},Ht)}function rN(s,o,h,g,y,A,C){var R=Vc(s,h),M=Vc(o,h),D=C.get(M);if(D){vc(s,h,D);return}var U=A?A(R,M,h+"",s,o,C):r,G=U===r;if(G){var q=he(M),te=!q&&mn(M),ae=!q&&!te&&zi(M);U=M,q||te||ae?he(R)?U=R:ft(R)?U=Gt(R):te?(G=!1,U=qm(M,!0)):ae?(G=!1,U=Ym(M,!0)):U=[]:Ls(M)||Xn(M)?(U=R,Xn(R)?U=X0(R):(!ut(R)||Kr(R))&&(U=d0(M))):G=!1}G&&(C.set(M,U),y(U,M,g,A,C),C.delete(M)),vc(s,h,U)}function Bm(s,o){var h=s.length;if(h)return o+=o<0?h:0,Yr(o,h)?s[o]:r}function Dm(s,o,h){o.length?o=it(o,function(A){return he(A)?function(C){return zn(C,A.length===1?A[0]:A)}:A}):o=[Vt];var g=-1;o=it(o,qt(se()));var y=Nm(s,function(A,C,R){var M=it(o,function(D){return D(A)});return{criteria:M,index:++g,value:A}});return RF(y,function(A,C){return gN(A,C,h)})}function nN(s,o){return Um(s,o,function(h,g){return Jc(s,g)})}function Um(s,o,h){for(var g=-1,y=o.length,A={};++g<y;){var C=o[g],R=zn(s,C);h(R,C)&&Ms(A,pn(C,s),R)}return A}function iN(s){return function(o){return zn(o,s)}}function Ec(s,o,h,g){var y=g?IF:Mi,A=-1,C=o.length,R=s;for(s===o&&(o=Gt(o)),h&&(R=it(s,qt(h)));++A<C;)for(var M=0,D=o[A],U=h?h(D):D;(M=y(R,U,M,g))>-1;)R!==s&&co.call(R,M,1),co.call(s,M,1);return s}function $m(s,o){for(var h=s?o.length:0,g=h-1;h--;){var y=o[h];if(h==g||y!==A){var A=y;Yr(y)?co.call(s,y,1):Pc(s,y)}}return s}function Cc(s,o){return s+po(xm()*(o-s+1))}function sN(s,o,h,g){for(var y=-1,A=_t(fo((o-s)/(h||1)),0),C=F(A);A--;)C[g?A:++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 ve(s,o){return Xc(m0(s,o,Vt),s+"")}function aN(s){return Tm(Hi(s))}function oN(s,o){var h=Hi(s);return Mo(h,Gn(o,0,h.length))}function Ms(s,o,h,g){if(!ut(s))return s;o=pn(o,s);for(var y=-1,A=o.length,C=A-1,R=s;R!=null&&++y<A;){var M=kr(o[y]),D=h;if(M==="__proto__"||M==="constructor"||M==="prototype")return s;if(y!=C){var U=R[M];D=g?g(U,M,R):r,D===r&&(D=ut(U)?U:Yr(o[y+1])?[]:{})}Cs(R,M,D),R=R[M]}return s}var Gm=go?function(s,o){return go.set(s,o),s}:Vt,uN=ho?function(s,o){return ho(s,"toString",{configurable:!0,enumerable:!1,value:th(o),writable:!0})}:Vt;function lN(s){return Mo(Hi(s))}function ar(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 A=F(y);++g<y;)A[g]=s[g+o];return A}function cN(s,o){var h;return fn(s,function(g,y,A){return h=o(g,y,A),!h}),!!h}function wo(s,o,h){var g=0,y=s==null?g:s.length;if(typeof o=="number"&&o===o&&y<=we){for(;g<y;){var A=g+y>>>1,C=s[A];C!==null&&!Kt(C)&&(h?C<=o:C<o)?g=A+1:y=A}return y}return Rc(s,o,Vt,h)}function Rc(s,o,h,g){var y=0,A=s==null?0:s.length;if(A===0)return 0;o=h(o);for(var C=o!==o,R=o===null,M=Kt(o),D=o===r;y<A;){var U=po((y+A)/2),G=h(s[U]),q=G!==r,te=G===null,ae=G===G,me=Kt(G);if(C)var oe=g||ae;else D?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=U+1:A=U}return Mt(A,le)}function zm(s,o){for(var h=-1,g=s.length,y=0,A=[];++h<g;){var C=s[h],R=o?o(C):C;if(!h||!Ar(R,M)){var M=R;A[y++]=C===0?0:C}}return A}function Hm(s){return typeof s=="number"?s:Kt(s)?X:+s}function Yt(s){if(typeof s=="string")return s;if(he(s))return it(s,Yt)+"";if(Kt(s))return bm?bm.call(s):"";var o=s+"";return o=="0"&&1/s==-z?"-0":o}function dn(s,o,h){var g=-1,y=eo,A=s.length,C=!0,R=[],M=R;if(h)C=!1,y=ic;else if(A>=i){var D=o?null:bN(s);if(D)return ro(D);C=!1,y=bs,M=new $n}else M=o?[]:R;e:for(;++g<A;){var U=s[g],G=o?o(U):U;if(U=h||U!==0?U:0,C&&G===G){for(var q=M.length;q--;)if(M[q]===G)continue e;o&&M.push(G),R.push(U)}else y(M,G,h)||(M!==R&&M.push(G),R.push(U))}return R}function Pc(s,o){return o=pn(o,s),s=v0(s,o),s==null||delete s[kr(or(o))]}function Vm(s,o,h,g){return Ms(s,o,h(zn(s,o)),g)}function To(s,o,h,g){for(var y=s.length,A=g?y:-1;(g?A--:++A<y)&&o(s[A],A,s););return h?ar(s,g?0:A,g?A+1:y):ar(s,g?A+1:0,g?y:A)}function Xm(s,o){var h=s;return h instanceof Se&&(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,A=F(g);++y<g;)for(var C=s[y],R=-1;++R<g;)R!=y&&(A[y]=Is(A[y]||C,s[R],o,h));return dn(Ct(A,1),o,h)}function jm(s,o,h){for(var g=-1,y=s.length,A=o.length,C={};++g<y;){var R=g<A?o[g]:r;h(C,s[g],R)}return C}function Oc(s){return ft(s)?s:[]}function Fc(s){return typeof s=="function"?s:Vt}function pn(s,o){return he(s)?s:zc(s,o)?[s]:b0($e(s))}var hN=ve;function gn(s,o,h){var g=s.length;return h=h===r?g:h,!o&&h>=g?s:ar(s,o,h)}var Wm=QF||function(s){return Et.clearTimeout(s)};function qm(s,o){if(o)return s.slice();var h=s.length,g=gm?gm(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 fN(s,o){var h=o?Nc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}function dN(s){var o=new s.constructor(s.source,Mg.exec(s));return o.lastIndex=s.lastIndex,o}function pN(s){return Es?We(Es.call(s)):{}}function Ym(s,o){var h=o?Nc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}function Km(s,o){if(s!==o){var h=s!==r,g=s===null,y=s===s,A=Kt(s),C=o!==r,R=o===null,M=o===o,D=Kt(o);if(!R&&!D&&!A&&s>o||A&&C&&M&&!R&&!D||g&&C&&M||!h&&M||!y)return 1;if(!g&&!A&&!D&&s<o||D&&h&&y&&!g&&!A||R&&h&&y||!C&&y||!M)return-1}return 0}function gN(s,o,h){for(var g=-1,y=s.criteria,A=o.criteria,C=y.length,R=h.length;++g<C;){var M=Km(y[g],A[g]);if(M){if(g>=R)return M;var D=h[g];return M*(D=="desc"?-1:1)}}return s.index-o.index}function Zm(s,o,h,g){for(var y=-1,A=s.length,C=h.length,R=-1,M=o.length,D=_t(A-C,0),U=F(M+D),G=!g;++R<M;)U[R]=o[R];for(;++y<C;)(G||y<A)&&(U[h[y]]=s[y]);for(;D--;)U[R++]=s[y++];return U}function Qm(s,o,h,g){for(var y=-1,A=s.length,C=-1,R=h.length,M=-1,D=o.length,U=_t(A-R,0),G=F(U+D),q=!g;++y<U;)G[y]=s[y];for(var te=y;++M<D;)G[te+M]=o[M];for(;++C<R;)(q||y<A)&&(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 A=-1,C=o.length;++A<C;){var R=o[A],M=g?g(h[R],s[R],R,h,s):r;M===r&&(M=s[R]),y?jr(h,R,M):Cs(h,R,M)}return h}function mN(s,o){return Lr(s,Gc(s),o)}function vN(s,o){return Lr(s,h0(s),o)}function Ao(s,o){return function(h,g){var y=he(h)?wF:U3,A=o?o():{};return y(h,s,se(g,2),A)}}function Ui(s){return ve(function(o,h){var g=-1,y=h.length,A=y>1?h[y-1]:r,C=y>2?h[2]:r;for(A=s.length>3&&typeof A=="function"?(y--,A):r,C&&Bt(h[0],h[1],C)&&(A=y<3?r:A,y=1),o=We(o);++g<y;){var R=h[g];R&&s(o,R,g,A)}return o})}function Jm(s,o){return function(h,g){if(h==null)return h;if(!zt(h))return s(h,g);for(var y=h.length,A=o?y:-1,C=We(h);(o?A--:++A<y)&&g(C[A],A,C)!==!1;);return h}}function e0(s){return function(o,h,g){for(var y=-1,A=We(o),C=g(o),R=C.length;R--;){var M=C[s?R:++y];if(h(A[M],M,A)===!1)break}return o}}function _N(s,o,h){var g=o&w,y=Os(s);function A(){var C=this&&this!==Et&&this instanceof A?y:s;return C.apply(g?h:this,arguments)}return A}function t0(s){return function(o){o=$e(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(J0(Q0(o).replace(uF,"")),s,"")}}function Os(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 ut(g)?g:h}}function yN(s,o,h){var g=Os(s);function y(){for(var A=arguments.length,C=F(A),R=A,M=Gi(y);R--;)C[R]=arguments[R];var D=A<3&&C[0]!==M&&C[A-1]!==M?[]:cn(C,M);if(A-=D.length,A<h)return a0(s,o,So,y.placeholder,r,C,D,r,r,h-A);var U=this&&this!==Et&&this instanceof y?g:s;return Wt(U,this,C)}return y}function r0(s){return function(o,h,g){var y=We(o);if(!zt(o)){var A=se(h,3);o=Tt(o),h=function(R){return A(y[R],R,y)}}var C=s(o,h,g);return C>-1?y[A?o[C]:C]:r}}function n0(s){return qr(function(o){var h=o.length,g=h,y=ir.prototype.thru;for(s&&o.reverse();g--;){var A=o[g];if(typeof A!="function")throw new nr(u);if(y&&!C&&Ro(A)=="wrapper")var C=new ir([],!0)}for(g=C?g:h;++g<h;){A=o[g];var R=Ro(A),M=R=="wrapper"?Uc(A):r;M&&Hc(M[0])&&M[1]==(L|S|O|k)&&!M[4].length&&M[9]==1?C=C[Ro(M[0])].apply(C,M[3]):C=A.length==1&&Hc(A)?C[R]():C.thru(A)}return function(){var D=arguments,U=D[0];if(C&&D.length==1&&he(U))return C.plant(U).value();for(var G=0,q=h?o[G].apply(this,D):U;++G<h;)q=o[G].call(this,q);return q}})}function So(s,o,h,g,y,A,C,R,M,D){var U=o&L,G=o&w,q=o&x,te=o&(S|I),ae=o&$,me=q?r:Os(s);function oe(){for(var xe=arguments.length,Ce=F(xe),Zt=xe;Zt--;)Ce[Zt]=arguments[Zt];if(te)var Dt=Gi(oe),Qt=MF(Ce,Dt);if(g&&(Ce=Zm(Ce,g,y,te)),A&&(Ce=Qm(Ce,A,C,te)),xe-=Qt,te&&xe<D){var dt=cn(Ce,Dt);return a0(s,o,So,oe.placeholder,h,Ce,dt,R,M,D-xe)}var Sr=G?h:this,Qr=q?Sr[s]:s;return xe=Ce.length,R?Ce=UN(Ce,R):ae&&xe>1&&Ce.reverse(),U&&M<xe&&(Ce.length=M),this&&this!==Et&&this instanceof oe&&(Qr=me||Os(Qr)),Qr.apply(Sr,Ce)}return oe}function i0(s,o){return function(h,g){return W3(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=Hm(h),g=Hm(g)),y=s(h,g)}return y}}function Lc(s){return qr(function(o){return o=it(o,qt(se())),ve(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 xN(s,o,h,g){var y=o&w,A=Os(s);function C(){for(var R=-1,M=arguments.length,D=-1,U=g.length,G=F(U+M),q=this&&this!==Et&&this instanceof C?A:s;++D<U;)G[D]=g[D];for(;M--;)G[D++]=arguments[++R];return Wt(q,y?h:this,G)}return C}function s0(s){return function(o,h,g){return g&&typeof g!="number"&&Bt(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),sN(o,h,g,s)}}function Io(s){return function(o,h){return typeof o=="string"&&typeof h=="string"||(o=ur(o),h=ur(h)),s(o,h)}}function a0(s,o,h,g,y,A,C,R,M,D){var U=o&S,G=U?C:r,q=U?r:C,te=U?A:r,ae=U?r:A;o|=U?O:N,o&=~(U?N:O),o&E||(o&=~(w|x));var me=[s,o,y,te,G,ae,q,R,M,D],oe=h.apply(r,me);return Hc(s)&&_0(oe,me),oe.placeholder=g,y0(oe,s,o)}function kc(s){var o=vt[s];return function(h,g){if(h=ur(h),g=g==null?0:Mt(pe(g),292),g&&ym(h)){var y=($e(h)+"e").split("e"),A=o(y[0]+"e"+(+y[1]+g));return y=($e(A)+"e").split("e"),+(y[0]+"e"+(+y[1]-g))}return o(h)}}var bN=ki&&1/ro(new ki([,-0]))[1]==z?function(s){return new ki(s)}:ih;function o0(s){return function(o){var h=Ot(o);return h==Qe?fc(o):h==Lt?DF(o):PF(o,s(o))}}function Wr(s,o,h,g,y,A,C,R){var M=o&x;if(!M&&typeof s!="function")throw new nr(u);var D=g?g.length:0;if(D||(o&=~(O|N),g=y=r),C=C===r?C:_t(pe(C),0),R=R===r?R:pe(R),D-=y?y.length:0,o&N){var U=g,G=y;g=y=r}var q=M?r:Uc(s),te=[s,o,h,g,y,U,G,A,C,R];if(q&&kN(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:_t(te[9]-D,0),!R&&o&(S|I)&&(o&=~(S|I)),!o||o==w)var ae=_N(s,o,h);else o==S||o==I?ae=yN(s,o,R):(o==O||o==(w|O))&&!y.length?ae=xN(s,o,h,g):ae=So.apply(r,te);var me=q?Gm:_0;return y0(me(ae,te),s,o)}function u0(s,o,h,g){return s===r||Ar(s,Li[h])&&!He.call(g,h)?o:s}function l0(s,o,h,g,y,A){return ut(s)&&ut(o)&&(A.set(o,s),bo(s,o,r,l0,A),A.delete(o)),s}function wN(s){return Ls(s)?r:s}function c0(s,o,h,g,y,A){var C=h&_,R=s.length,M=o.length;if(R!=M&&!(C&&M>R))return!1;var D=A.get(s),U=A.get(o);if(D&&U)return D==o&&U==s;var G=-1,q=!0,te=h&b?new $n:r;for(A.set(s,o),A.set(o,s);++G<R;){var ae=s[G],me=o[G];if(g)var oe=C?g(me,ae,G,o,s,A):g(ae,me,G,s,o,A);if(oe!==r){if(oe)continue;q=!1;break}if(te){if(!ac(o,function(xe,Ce){if(!bs(te,Ce)&&(ae===xe||y(ae,xe,h,g,A)))return te.push(Ce)})){q=!1;break}}else if(!(ae===me||y(ae,me,h,g,A))){q=!1;break}}return A.delete(s),A.delete(o),q}function TN(s,o,h,g,y,A,C){switch(h){case Ri:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case xs:return!(s.byteLength!=o.byteLength||!A(new uo(s),new uo(o)));case De:case Ye:case J:return Ar(+s,+o);case Te:return s.name==o.name&&s.message==o.message;case $t:case Hr:return s==o+"";case Qe:var R=fc;case Lt:var M=g&_;if(R||(R=ro),s.size!=o.size&&!M)return!1;var D=C.get(s);if(D)return D==o;g|=b,C.set(s,o);var U=c0(R(s),R(o),g,y,A,C);return C.delete(s),U;case Ci:if(Es)return Es.call(s)==Es.call(o)}return!1}function AN(s,o,h,g,y,A){var C=h&_,R=Bc(s),M=R.length,D=Bc(o),U=D.length;if(M!=U&&!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=A.get(s),ae=A.get(o);if(te&&ae)return te==o&&ae==s;var me=!0;A.set(s,o),A.set(o,s);for(var oe=C;++G<M;){q=R[G];var xe=s[q],Ce=o[q];if(g)var Zt=C?g(Ce,xe,q,o,s,A):g(xe,Ce,q,s,o,A);if(!(Zt===r?xe===Ce||y(xe,Ce,h,g,A):Zt)){me=!1;break}oe||(oe=q=="constructor")}if(me&&!oe){var Dt=s.constructor,Qt=o.constructor;Dt!=Qt&&"constructor"in s&&"constructor"in o&&!(typeof Dt=="function"&&Dt instanceof Dt&&typeof Qt=="function"&&Qt instanceof Qt)&&(me=!1)}return A.delete(s),A.delete(o),me}function qr(s){return Xc(m0(s,r,S0),s+"")}function Bc(s){return Pm(s,Tt,Gc)}function Dc(s){return Pm(s,Ht,h0)}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],A=y.func;if(A==null||A==s)return y.name}return o}function Gi(s){var o=He.call(T,"placeholder")?T:s;return o.placeholder}function se(){var s=T.iteratee||rh;return s=s===rh?Fm:s,arguments.length?s(arguments[0],arguments[1]):s}function Po(s,o){var h=s.__data__;return ON(o)?h[typeof o=="string"?"string":"hash"]:h.map}function $c(s){for(var o=Tt(s),h=o.length;h--;){var g=o[h],y=s[g];o[h]=[g,y,p0(y)]}return o}function Hn(s,o){var h=LF(s,o);return Om(h)?h:r}function SN(s){var o=He.call(s,Dn),h=s[Dn];try{s[Dn]=r;var g=!0}catch{}var y=ao.call(s);return g&&(o?s[Dn]=h:delete s[Dn]),y}var Gc=pc?function(s){return s==null?[]:(s=We(s),un(pc(s),function(o){return vm.call(s,o)}))}:sh,h0=pc?function(s){for(var o=[];s;)ln(o,Gc(s)),s=lo(s);return o}:sh,Ot=kt;(gc&&Ot(new gc(new ArrayBuffer(1)))!=Ri||Ts&&Ot(new Ts)!=Qe||mc&&Ot(mc.resolve())!=gt||ki&&Ot(new ki)!=Lt||As&&Ot(new As)!=Ii)&&(Ot=function(s){var o=kt(s),h=o==Ae?s.constructor:r,g=h?Vn(h):"";if(g)switch(g){case o3:return Ri;case u3:return Qe;case l3:return gt;case c3:return Lt;case h3:return Ii}return o});function EN(s,o,h){for(var g=-1,y=h.length;++g<y;){var A=h[g],C=A.size;switch(A.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=Mt(o,s+C);break;case"takeRight":s=_t(s,o-C);break}}return{start:s,end:o}}function CN(s){var o=s.match(FO);return o?o[1].split(NO):[]}function f0(s,o,h){o=pn(o,s);for(var g=-1,y=o.length,A=!1;++g<y;){var C=kr(o[g]);if(!(A=s!=null&&h(s,C)))break;s=s[C]}return A||++g!=y?A:(y=s==null?0:s.length,!!y&&Bo(y)&&Yr(C,y)&&(he(s)||Xn(s)))}function IN(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 d0(s){return typeof s.constructor=="function"&&!Fs(s)?Di(lo(s)):{}}function RN(s,o,h){var g=s.constructor;switch(o){case xs:return Nc(s);case De:case Ye:return new g(+s);case Ri:return fN(s,h);case $l:case Gl:case zl:case Hl:case Vl:case Xl:case jl:case Wl:case ql:return Ym(s,h);case Qe:return new g;case J:case Hr:return new g(s);case $t:return dN(s);case Lt:return new g;case Ci:return pN(s)}}function PN(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(OO,`{
|
|
1960
1974
|
/* [wrapped with `+o+`] */
|
|
1961
|
-
`)}function MN(s){return de(s)||zn(s)||!!(mm&&s&&s[mm])}function jr(s,o){var h=typeof s;return o=o??re,!!o&&(h=="number"||h!="symbol"&&HO.test(s))&&s>-1&&s%1==0&&s<o}function Nt(s,o,h){if(!at(h))return!1;var g=typeof o;return(g=="number"?Bt(h)&&jr(o,h.length):g=="string"&&o in h)?xr(h[o],s):!1}function Gc(s,o){if(de(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||Xt(s)?!0:IO.test(s)||!CO.test(s)||o!=null&&s in We(o)}function ON(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function zc(s){var o=Io(s),h=T[o];if(typeof h!="function"||!(o in Ae.prototype))return!1;if(s===h)return!0;var g=Dc(h);return!!g&&s===g[0]}function FN(s){return!!fm&&fm in s}var NN=no?Wr:sh;function Ms(s){var o=s&&s.constructor,h=typeof o=="function"&&o.prototype||Mi;return s===h}function f0(s){return s===s&&!at(s)}function d0(s,o){return function(h){return h==null?!1:h[s]===o&&(o!==r||s in We(h))}}function LN(s){var o=No(s,function(g){return h.size===p&&h.clear(),g}),h=o.cache;return o}function kN(s,o){var h=s[1],g=o[1],y=h|g,A=y<(w|x|L),C=g==L&&h==S||g==L&&h==k&&s[7].length<=o[8]||g==(L|k)&&o[7].length<=o[8]&&h==S;if(!(A||C))return s;g&w&&(s[2]=o[2],y|=h&w?0:E);var R=o[3];if(R){var M=s[3];s[3]=M?Ym(M,R,o[4]):R,s[4]=M?on(s[3],v):o[4]}return R=o[5],R&&(M=s[5],s[5]=M?Km(M,R,o[6]):R,s[6]=M?on(s[5],v):o[6]),R=o[7],R&&(s[7]=R),g&L&&(s[8]=s[8]==null?o[8]:It(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=y,s}function BN(s){var o=[];if(s!=null)for(var h in We(s))o.push(h);return o}function DN(s){return so.call(s)}function p0(s,o,h){return o=gt(o===r?s.length-1:o,0),function(){for(var g=arguments,y=-1,A=gt(g.length-o,0),C=F(A);++y<A;)C[y]=g[o+y];y=-1;for(var R=F(o+1);++y<o;)R[y]=g[y];return R[o]=h(C),zt(s,this,R)}}function g0(s,o){return o.length<2?s:Un(s,tr(o,0,-1))}function UN(s,o){for(var h=s.length,g=It(o.length,h),y=kt(s);g--;){var A=o[g];s[g]=jr(A,h)?y[A]:r}return s}function Hc(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var m0=_0(Um),Os=e3||function(s,o){return Tt.setTimeout(s,o)},Vc=_0(uN);function v0(s,o,h){var g=o+"";return Vc(s,PN(g,$N(CN(g),h)))}function _0(s){var o=0,h=0;return function(){var g=i3(),y=X-(g-h);if(h=g,y>0){if(++o>=se)return arguments[0]}else o=0;return s.apply(r,arguments)}}function Po(s,o){var h=-1,g=s.length,y=g-1;for(o=o===r?g:o;++h<o;){var A=Ec(h,y),C=s[A];s[A]=s[h],s[h]=C}return s.length=o,s}var y0=LN(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(RO,function(h,g,y,A){o.push(y?A.replace(BO,"$1"):g||h)}),o});function Or(s){if(typeof s=="string"||Xt(s))return s;var o=s+"";return o=="0"&&1/s==-z?"-0":o}function Gn(s){if(s!=null){try{return io.call(s)}catch{}try{return s+""}catch{}}return""}function $N(s,o){return Zt(xe,function(h){var g="_."+h[0];o&h[1]&&!Ja(s,g)&&s.push(g)}),s.sort()}function x0(s){if(s instanceof Ae)return s.clone();var o=new Jt(s.__wrapped__,s.__chain__);return o.__actions__=kt(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function GN(s,o,h){(h?Nt(s,o,h):o===r)?o=1:o=gt(pe(o),0);var g=s==null?0:s.length;if(!g||o<1)return[];for(var y=0,A=0,C=F(ho(g/o));y<g;)C[A++]=tr(s,y,y+=o);return C}function zN(s){for(var o=-1,h=s==null?0:s.length,g=0,y=[];++o<h;){var A=s[o];A&&(y[g++]=A)}return y}function HN(){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 an(de(h)?kt(h):[h],At(o,1))}var VN=_e(function(s,o){return ct(s)?Es(s,At(o,1,ct,!0)):[]}),XN=_e(function(s,o){var h=rr(o);return ct(h)&&(h=r),ct(s)?Es(s,At(o,1,ct,!0),oe(h,2)):[]}),jN=_e(function(s,o){var h=rr(o);return ct(h)&&(h=r),ct(s)?Es(s,At(o,1,ct,!0),r,h):[]});function WN(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:pe(o),tr(s,o<0?0:o,g)):[]}function qN(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:pe(o),o=g-o,tr(s,0,o<0?0:o)):[]}function YN(s,o){return s&&s.length?wo(s,oe(o,3),!0,!0):[]}function KN(s,o){return s&&s.length?wo(s,oe(o,3),!0):[]}function ZN(s,o,h,g){var y=s==null?0:s.length;return y?(h&&typeof h!="number"&&Nt(s,o,h)&&(h=0,g=y),H3(s,o,h,g)):[]}function b0(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=h==null?0:pe(h);return y<0&&(y=gt(g+y,0)),eo(s,oe(o,3),y)}function w0(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=g-1;return h!==r&&(y=pe(h),y=h<0?gt(g+y,0):It(y,g-1)),eo(s,oe(o,3),y,!0)}function T0(s){var o=s==null?0:s.length;return o?At(s,1):[]}function QN(s){var o=s==null?0:s.length;return o?At(s,z):[]}function JN(s,o){var h=s==null?0:s.length;return h?(o=o===r?1:pe(o),At(s,o)):[]}function eL(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 A0(s){return s&&s.length?s[0]:r}function tL(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=h==null?0:pe(h);return y<0&&(y=gt(g+y,0)),Ci(s,o,y)}function rL(s){var o=s==null?0:s.length;return o?tr(s,0,-1):[]}var nL=_e(function(s){var o=rt(s,Mc);return o.length&&o[0]===s[0]?bc(o):[]}),iL=_e(function(s){var o=rr(s),h=rt(s,Mc);return o===rr(h)?o=r:h.pop(),h.length&&h[0]===s[0]?bc(h,oe(o,2)):[]}),sL=_e(function(s){var o=rr(s),h=rt(s,Mc);return o=typeof o=="function"?o:r,o&&h.pop(),h.length&&h[0]===s[0]?bc(h,r,o):[]});function aL(s,o){return s==null?"":r3.call(s,o)}function rr(s){var o=s==null?0:s.length;return o?s[o-1]:r}function oL(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=g;return h!==r&&(y=pe(h),y=y<0?gt(g+y,0):It(y,g-1)),o===o?$F(s,o,y):eo(s,im,y,!0)}function uL(s,o){return s&&s.length?Lm(s,pe(o)):r}var lL=_e(S0);function S0(s,o){return s&&s.length&&o&&o.length?Sc(s,o):s}function cL(s,o,h){return s&&s.length&&o&&o.length?Sc(s,o,oe(h,2)):s}function hL(s,o,h){return s&&s.length&&o&&o.length?Sc(s,o,r,h):s}var fL=Xr(function(s,o){var h=s==null?0:s.length,g=vc(s,o);return Dm(s,rt(o,function(y){return jr(y,h)?+y:y}).sort(qm)),g});function dL(s,o){var h=[];if(!(s&&s.length))return h;var g=-1,y=[],A=s.length;for(o=oe(o,3);++g<A;){var C=s[g];o(C,g,s)&&(h.push(C),y.push(g))}return Dm(s,y),h}function Xc(s){return s==null?s:a3.call(s)}function pL(s,o,h){var g=s==null?0:s.length;return g?(h&&typeof h!="number"&&Nt(s,o,h)?(o=0,h=g):(o=o==null?0:pe(o),h=h===r?g:pe(h)),tr(s,o,h)):[]}function gL(s,o){return bo(s,o)}function mL(s,o,h){return Ic(s,o,oe(h,2))}function vL(s,o){var h=s==null?0:s.length;if(h){var g=bo(s,o);if(g<h&&xr(s[g],o))return g}return-1}function _L(s,o){return bo(s,o,!0)}function yL(s,o,h){return Ic(s,o,oe(h,2),!0)}function xL(s,o){var h=s==null?0:s.length;if(h){var g=bo(s,o,!0)-1;if(xr(s[g],o))return g}return-1}function bL(s){return s&&s.length?$m(s):[]}function wL(s,o){return s&&s.length?$m(s,oe(o,2)):[]}function TL(s){var o=s==null?0:s.length;return o?tr(s,1,o):[]}function AL(s,o,h){return s&&s.length?(o=h||o===r?1:pe(o),tr(s,0,o<0?0:o)):[]}function SL(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:pe(o),o=g-o,tr(s,o<0?0:o,g)):[]}function EL(s,o){return s&&s.length?wo(s,oe(o,3),!1,!0):[]}function CL(s,o){return s&&s.length?wo(s,oe(o,3)):[]}var IL=_e(function(s){return cn(At(s,1,ct,!0))}),RL=_e(function(s){var o=rr(s);return ct(o)&&(o=r),cn(At(s,1,ct,!0),oe(o,2))}),PL=_e(function(s){var o=rr(s);return o=typeof o=="function"?o:r,cn(At(s,1,ct,!0),r,o)});function ML(s){return s&&s.length?cn(s):[]}function OL(s,o){return s&&s.length?cn(s,oe(o,2)):[]}function FL(s,o){return o=typeof o=="function"?o:r,s&&s.length?cn(s,r,o):[]}function jc(s){if(!(s&&s.length))return[];var o=0;return s=sn(s,function(h){if(ct(h))return o=gt(h.length,o),!0}),lc(o,function(h){return rt(s,ac(h))})}function E0(s,o){if(!(s&&s.length))return[];var h=jc(s);return o==null?h:rt(h,function(g){return zt(o,r,g)})}var NL=_e(function(s,o){return ct(s)?Es(s,o):[]}),LL=_e(function(s){return Pc(sn(s,ct))}),kL=_e(function(s){var o=rr(s);return ct(o)&&(o=r),Pc(sn(s,ct),oe(o,2))}),BL=_e(function(s){var o=rr(s);return o=typeof o=="function"?o:r,Pc(sn(s,ct),r,o)}),DL=_e(jc);function UL(s,o){return Vm(s||[],o||[],Ss)}function $L(s,o){return Vm(s||[],o||[],Rs)}var GL=_e(function(s){var o=s.length,h=o>1?s[o-1]:r;return h=typeof h=="function"?(s.pop(),h):r,E0(s,h)});function C0(s){var o=T(s);return o.__chain__=!0,o}function zL(s,o){return o(s),s}function Mo(s,o){return o(s)}var HL=Xr(function(s){var o=s.length,h=o?s[0]:0,g=this.__wrapped__,y=function(A){return vc(A,s)};return o>1||this.__actions__.length||!(g instanceof Ae)||!jr(h)?this.thru(y):(g=g.slice(h,+h+(o?1:0)),g.__actions__.push({func:Mo,args:[y],thisArg:r}),new Jt(g,this.__chain__).thru(function(A){return o&&!A.length&&A.push(r),A}))});function VL(){return C0(this)}function XL(){return new Jt(this.value(),this.__chain__)}function jL(){this.__values__===r&&(this.__values__=G0(this.value()));var s=this.__index__>=this.__values__.length,o=s?r:this.__values__[this.__index__++];return{done:s,value:o}}function WL(){return this}function qL(s){for(var o,h=this;h instanceof mo;){var g=x0(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 YL(){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:Mo,args:[Xc],thisArg:r}),new Jt(o,this.__chain__)}return this.thru(Xc)}function KL(){return Hm(this.__wrapped__,this.__actions__)}var ZL=To(function(s,o,h){Ge.call(s,h)?++s[h]:Hr(s,h,1)});function QL(s,o,h){var g=de(s)?rm:z3;return h&&Nt(s,o,h)&&(o=r),g(s,oe(o,3))}function JL(s,o){var h=de(s)?sn:Em;return h(s,oe(o,3))}var ek=e0(b0),tk=e0(w0);function rk(s,o){return At(Oo(s,o),1)}function nk(s,o){return At(Oo(s,o),z)}function ik(s,o,h){return h=h===r?1:pe(h),At(Oo(s,o),h)}function I0(s,o){var h=de(s)?Zt:ln;return h(s,oe(o,3))}function R0(s,o){var h=de(s)?TF:Sm;return h(s,oe(o,3))}var sk=To(function(s,o,h){Ge.call(s,h)?s[h].push(o):Hr(s,h,[o])});function ak(s,o,h,g){s=Bt(s)?s:Ui(s),h=h&&!g?pe(h):0;var y=s.length;return h<0&&(h=gt(y+h,0)),Bo(s)?h<=y&&s.indexOf(o,h)>-1:!!y&&Ci(s,o,h)>-1}var ok=_e(function(s,o,h){var g=-1,y=typeof o=="function",A=Bt(s)?F(s.length):[];return ln(s,function(C){A[++g]=y?zt(o,C,h):Cs(C,o,h)}),A}),uk=To(function(s,o,h){Hr(s,h,o)});function Oo(s,o){var h=de(s)?rt:Om;return h(s,oe(o,3))}function lk(s,o,h,g){return s==null?[]:(de(o)||(o=o==null?[]:[o]),h=g?r:h,de(h)||(h=h==null?[]:[h]),km(s,o,h))}var ck=To(function(s,o,h){s[h?0:1].push(o)},function(){return[[],[]]});function hk(s,o,h){var g=de(s)?ic:am,y=arguments.length<3;return g(s,oe(o,4),h,y,ln)}function fk(s,o,h){var g=de(s)?AF:am,y=arguments.length<3;return g(s,oe(o,4),h,y,Sm)}function dk(s,o){var h=de(s)?sn:Em;return h(s,Lo(oe(o,3)))}function pk(s){var o=de(s)?bm:aN;return o(s)}function gk(s,o,h){(h?Nt(s,o,h):o===r)?o=1:o=pe(o);var g=de(s)?B3:oN;return g(s,o)}function mk(s){var o=de(s)?D3:lN;return o(s)}function vk(s){if(s==null)return 0;if(Bt(s))return Bo(s)?Ri(s):s.length;var o=Rt(s);return o==Ce||o==vr?s.size:Tc(s).length}function _k(s,o,h){var g=de(s)?sc:cN;return h&&Nt(s,o,h)&&(o=r),g(s,oe(o,3))}var yk=_e(function(s,o){if(s==null)return[];var h=o.length;return h>1&&Nt(s,o[0],o[1])?o=[]:h>2&&Nt(o[0],o[1],o[2])&&(o=[o[0]]),km(s,At(o,1),[])}),Fo=JF||function(){return Tt.Date.now()};function xk(s,o){if(typeof o!="function")throw new Qt(u);return s=pe(s),function(){if(--s<1)return o.apply(this,arguments)}}function P0(s,o,h){return o=h?r:o,o=s&&o==null?s.length:o,Vr(s,L,r,r,r,r,o)}function M0(s,o){var h;if(typeof o!="function")throw new Qt(u);return s=pe(s),function(){return--s>0&&(h=o.apply(this,arguments)),s<=1&&(o=r),h}}var Wc=_e(function(s,o,h){var g=w;if(h.length){var y=on(h,Bi(Wc));g|=O}return Vr(s,g,o,h,y)}),O0=_e(function(s,o,h){var g=w|x;if(h.length){var y=on(h,Bi(O0));g|=O}return Vr(o,g,s,h,y)});function F0(s,o,h){o=h?r:o;var g=Vr(s,S,r,r,r,r,r,o);return g.placeholder=F0.placeholder,g}function N0(s,o,h){o=h?r:o;var g=Vr(s,I,r,r,r,r,r,o);return g.placeholder=N0.placeholder,g}function L0(s,o,h){var g,y,A,C,R,M,D=0,U=!1,G=!1,Y=!0;if(typeof s!="function")throw new Qt(u);o=nr(o)||0,at(h)&&(U=!!h.leading,G="maxWait"in h,A=G?gt(nr(h.maxWait)||0,o):A,Y="trailing"in h?!!h.trailing:Y);function te(ht){var br=g,Yr=y;return g=y=r,D=ht,C=s.apply(Yr,br),C}function ue(ht){return D=ht,R=Os(we,o),U?te(ht):C}function me(ht){var br=ht-M,Yr=ht-D,ev=o-br;return G?It(ev,A-Yr):ev}function le(ht){var br=ht-M,Yr=ht-D;return M===r||br>=o||br<0||G&&Yr>=A}function we(){var ht=Fo();if(le(ht))return Ie(ht);R=Os(we,me(ht))}function Ie(ht){return R=r,Y&&g?te(ht):(g=y=r,C)}function jt(){R!==r&&Xm(R),D=0,g=M=y=R=r}function Lt(){return R===r?C:Ie(Fo())}function Wt(){var ht=Fo(),br=le(ht);if(g=arguments,y=this,M=ht,br){if(R===r)return ue(M);if(G)return Xm(R),R=Os(we,o),te(M)}return R===r&&(R=Os(we,o)),C}return Wt.cancel=jt,Wt.flush=Lt,Wt}var bk=_e(function(s,o){return Am(s,1,o)}),wk=_e(function(s,o,h){return Am(s,nr(o)||0,h)});function Tk(s){return Vr(s,$)}function No(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new Qt(u);var h=function(){var g=arguments,y=o?o.apply(this,g):g[0],A=h.cache;if(A.has(y))return A.get(y);var C=s.apply(this,g);return h.cache=A.set(y,C)||A,C};return h.cache=new(No.Cache||zr),h}No.Cache=zr;function Lo(s){if(typeof s!="function")throw new Qt(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 M0(2,s)}var Sk=hN(function(s,o){o=o.length==1&&de(o[0])?rt(o[0],Ht(oe())):rt(At(o,1),Ht(oe()));var h=o.length;return _e(function(g){for(var y=-1,A=It(g.length,h);++y<A;)g[y]=o[y].call(this,g[y]);return zt(s,this,g)})}),qc=_e(function(s,o){var h=on(o,Bi(qc));return Vr(s,O,r,o,h)}),k0=_e(function(s,o){var h=on(o,Bi(k0));return Vr(s,N,r,o,h)}),Ek=Xr(function(s,o){return Vr(s,k,r,r,r,o)});function Ck(s,o){if(typeof s!="function")throw new Qt(u);return o=o===r?o:pe(o),_e(s,o)}function Ik(s,o){if(typeof s!="function")throw new Qt(u);return o=o==null?0:gt(pe(o),0),_e(function(h){var g=h[o],y=fn(h,0,o);return g&&an(y,g),zt(s,this,y)})}function Rk(s,o,h){var g=!0,y=!0;if(typeof s!="function")throw new Qt(u);return at(h)&&(g="leading"in h?!!h.leading:g,y="trailing"in h?!!h.trailing:y),L0(s,o,{leading:g,maxWait:o,trailing:y})}function Pk(s){return P0(s,1)}function Mk(s,o){return qc(Oc(o),s)}function Ok(){if(!arguments.length)return[];var s=arguments[0];return de(s)?s:[s]}function Fk(s){return er(s,m)}function Nk(s,o){return o=typeof o=="function"?o:r,er(s,m,o)}function Lk(s){return er(s,c|m)}function kk(s,o){return o=typeof o=="function"?o:r,er(s,c|m,o)}function Bk(s,o){return o==null||Tm(s,o,xt(o))}function xr(s,o){return s===o||s!==s&&o!==o}var Dk=Co(xc),Uk=Co(function(s,o){return s>=o}),zn=Rm(function(){return arguments}())?Rm:function(s){return ut(s)&&Ge.call(s,"callee")&&!gm.call(s,"callee")},de=F.isArray,$k=Kg?Ht(Kg):q3;function Bt(s){return s!=null&&ko(s.length)&&!Wr(s)}function ct(s){return ut(s)&&Bt(s)}function Gk(s){return s===!0||s===!1||ut(s)&&Ft(s)==He}var dn=t3||sh,zk=Zg?Ht(Zg):Y3;function Hk(s){return ut(s)&&s.nodeType===1&&!Fs(s)}function Vk(s){if(s==null)return!0;if(Bt(s)&&(de(s)||typeof s=="string"||typeof s.splice=="function"||dn(s)||Di(s)||zn(s)))return!s.length;var o=Rt(s);if(o==Ce||o==vr)return!s.size;if(Ms(s))return!Tc(s).length;for(var h in s)if(Ge.call(s,h))return!1;return!0}function Xk(s,o){return Is(s,o)}function jk(s,o,h){h=typeof h=="function"?h:r;var g=h?h(s,o):r;return g===r?Is(s,o,r,h):!!g}function Yc(s){if(!ut(s))return!1;var o=Ft(s);return o==W||o==Q||typeof s.message=="string"&&typeof s.name=="string"&&!Fs(s)}function Wk(s){return typeof s=="number"&&vm(s)}function Wr(s){if(!at(s))return!1;var o=Ft(s);return o==ae||o==Ee||o==ze||o==mr}function B0(s){return typeof s=="number"&&s==pe(s)}function ko(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=re}function at(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function ut(s){return s!=null&&typeof s=="object"}var D0=Qg?Ht(Qg):Z3;function qk(s,o){return s===o||wc(s,o,Uc(o))}function Yk(s,o,h){return h=typeof h=="function"?h:r,wc(s,o,Uc(o),h)}function Kk(s){return U0(s)&&s!=+s}function Zk(s){if(NN(s))throw new fe(a);return Pm(s)}function Qk(s){return s===null}function Jk(s){return s==null}function U0(s){return typeof s=="number"||ut(s)&&Ft(s)==Qe}function Fs(s){if(!ut(s)||Ft(s)!=Ot)return!1;var o=uo(s);if(o===null)return!0;var h=Ge.call(o,"constructor")&&o.constructor;return typeof h=="function"&&h instanceof h&&io.call(h)==YF}var Kc=Jg?Ht(Jg):Q3;function eB(s){return B0(s)&&s>=-re&&s<=re}var $0=em?Ht(em):J3;function Bo(s){return typeof s=="string"||!de(s)&&ut(s)&&Ft(s)==ms}function Xt(s){return typeof s=="symbol"||ut(s)&&Ft(s)==Ya}var Di=tm?Ht(tm):eN;function tB(s){return s===r}function rB(s){return ut(s)&&Rt(s)==vs}function nB(s){return ut(s)&&Ft(s)==yO}var iB=Co(Ac),sB=Co(function(s,o){return s<=o});function G0(s){if(!s)return[];if(Bt(s))return Bo(s)?_r(s):kt(s);if(xs&&s[xs])return BF(s[xs]());var o=Rt(s),h=o==Ce?hc:o==vr?to:Ui;return h(s)}function qr(s){if(!s)return s===0?s:0;if(s=nr(s),s===z||s===-z){var o=s<0?-1:1;return o*ge}return s===s?s:0}function pe(s){var o=qr(s),h=o%1;return o===o?h?o-h:o:0}function z0(s){return s?Dn(pe(s),0,K):0}function nr(s){if(typeof s=="number")return s;if(Xt(s))return V;if(at(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=at(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=om(s);var h=$O.test(s);return h||zO.test(s)?xF(s.slice(2),h?2:8):UO.test(s)?V:+s}function H0(s){return Mr(s,Dt(s))}function aB(s){return s?Dn(pe(s),-re,re):s===0?s:0}function Ue(s){return s==null?"":Vt(s)}var oB=Li(function(s,o){if(Ms(o)||Bt(o)){Mr(o,xt(o),s);return}for(var h in o)Ge.call(o,h)&&Ss(s,h,o[h])}),V0=Li(function(s,o){Mr(o,Dt(o),s)}),Do=Li(function(s,o,h,g){Mr(o,Dt(o),s,g)}),uB=Li(function(s,o,h,g){Mr(o,xt(o),s,g)}),lB=Xr(vc);function cB(s,o){var h=Ni(s);return o==null?h:wm(h,o)}var hB=_e(function(s,o){s=We(s);var h=-1,g=o.length,y=g>2?o[2]:r;for(y&&Nt(o[0],o[1],y)&&(g=1);++h<g;)for(var A=o[h],C=Dt(A),R=-1,M=C.length;++R<M;){var D=C[R],U=s[D];(U===r||xr(U,Mi[D])&&!Ge.call(s,D))&&(s[D]=A[D])}return s}),fB=_e(function(s){return s.push(r,o0),zt(X0,r,s)});function dB(s,o){return nm(s,oe(o,3),Pr)}function pB(s,o){return nm(s,oe(o,3),yc)}function gB(s,o){return s==null?s:_c(s,oe(o,3),Dt)}function mB(s,o){return s==null?s:Cm(s,oe(o,3),Dt)}function vB(s,o){return s&&Pr(s,oe(o,3))}function _B(s,o){return s&&yc(s,oe(o,3))}function yB(s){return s==null?[]:yo(s,xt(s))}function xB(s){return s==null?[]:yo(s,Dt(s))}function Zc(s,o,h){var g=s==null?r:Un(s,o);return g===r?h:g}function bB(s,o){return s!=null&&c0(s,o,V3)}function Qc(s,o){return s!=null&&c0(s,o,X3)}var wB=r0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=so.call(o)),s[o]=h},eh(Ut)),TB=r0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=so.call(o)),Ge.call(s,o)?s[o].push(h):s[o]=[h]},oe),AB=_e(Cs);function xt(s){return Bt(s)?xm(s):Tc(s)}function Dt(s){return Bt(s)?xm(s,!0):tN(s)}function SB(s,o){var h={};return o=oe(o,3),Pr(s,function(g,y,A){Hr(h,o(g,y,A),g)}),h}function EB(s,o){var h={};return o=oe(o,3),Pr(s,function(g,y,A){Hr(h,y,o(g,y,A))}),h}var CB=Li(function(s,o,h){xo(s,o,h)}),X0=Li(function(s,o,h,g){xo(s,o,h,g)}),IB=Xr(function(s,o){var h={};if(s==null)return h;var g=!1;o=rt(o,function(A){return A=hn(A,s),g||(g=A.length>1),A}),Mr(s,Bc(s),h),g&&(h=er(h,c|d|m,wN));for(var y=o.length;y--;)Rc(h,o[y]);return h});function RB(s,o){return j0(s,Lo(oe(o)))}var PB=Xr(function(s,o){return s==null?{}:nN(s,o)});function j0(s,o){if(s==null)return{};var h=rt(Bc(s),function(g){return[g]});return o=oe(o),Bm(s,h,function(g,y){return o(g,y[0])})}function MB(s,o,h){o=hn(o,s);var g=-1,y=o.length;for(y||(y=1,s=r);++g<y;){var A=s==null?r:s[Or(o[g])];A===r&&(g=y,A=h),s=Wr(A)?A.call(s):A}return s}function OB(s,o,h){return s==null?s:Rs(s,o,h)}function FB(s,o,h,g){return g=typeof g=="function"?g:r,s==null?s:Rs(s,o,h,g)}var W0=s0(xt),q0=s0(Dt);function NB(s,o,h){var g=de(s),y=g||dn(s)||Di(s);if(o=oe(o,4),h==null){var A=s&&s.constructor;y?h=g?new A:[]:at(s)?h=Wr(A)?Ni(uo(s)):{}:h={}}return(y?Zt:Pr)(s,function(C,R,M){return o(h,C,R,M)}),h}function LB(s,o){return s==null?!0:Rc(s,o)}function kB(s,o,h){return s==null?s:zm(s,o,Oc(h))}function BB(s,o,h,g){return g=typeof g=="function"?g:r,s==null?s:zm(s,o,Oc(h),g)}function Ui(s){return s==null?[]:cc(s,xt(s))}function DB(s){return s==null?[]:cc(s,Dt(s))}function UB(s,o,h){return h===r&&(h=o,o=r),h!==r&&(h=nr(h),h=h===h?h:0),o!==r&&(o=nr(o),o=o===o?o:0),Dn(nr(s),o,h)}function $B(s,o,h){return o=qr(o),h===r?(h=o,o=0):h=qr(h),s=nr(s),j3(s,o,h)}function GB(s,o,h){if(h&&typeof h!="boolean"&&Nt(s,o,h)&&(o=h=r),h===r&&(typeof o=="boolean"?(h=o,o=r):typeof s=="boolean"&&(h=s,s=r)),s===r&&o===r?(s=0,o=1):(s=qr(s),o===r?(o=s,s=0):o=qr(o)),s>o){var g=s;s=o,o=g}if(h||s%1||o%1){var y=_m();return It(s+y*(o-s+yF("1e-"+((y+"").length-1))),o)}return Ec(s,o)}var zB=ki(function(s,o,h){return o=o.toLowerCase(),s+(h?Y0(o):o)});function Y0(s){return Jc(Ue(s).toLowerCase())}function K0(s){return s=Ue(s),s&&s.replace(VO,OF).replace(lF,"")}function HB(s,o,h){s=Ue(s),o=Vt(o);var g=s.length;h=h===r?g:Dn(pe(h),0,g);var y=h;return h-=o.length,h>=0&&s.slice(h,y)==o}function VB(s){return s=Ue(s),s&&AO.test(s)?s.replace(Cg,FF):s}function XB(s){return s=Ue(s),s&&PO.test(s)?s.replace(ql,"\\$&"):s}var jB=ki(function(s,o,h){return s+(h?"-":"")+o.toLowerCase()}),WB=ki(function(s,o,h){return s+(h?" ":"")+o.toLowerCase()}),qB=Jm("toLowerCase");function YB(s,o,h){s=Ue(s),o=pe(o);var g=o?Ri(s):0;if(!o||g>=o)return s;var y=(o-g)/2;return Eo(fo(y),h)+s+Eo(ho(y),h)}function KB(s,o,h){s=Ue(s),o=pe(o);var g=o?Ri(s):0;return o&&g<o?s+Eo(o-g,h):s}function ZB(s,o,h){s=Ue(s),o=pe(o);var g=o?Ri(s):0;return o&&g<o?Eo(o-g,h)+s:s}function QB(s,o,h){return h||o==null?o=0:o&&(o=+o),s3(Ue(s).replace(Yl,""),o||0)}function JB(s,o,h){return(h?Nt(s,o,h):o===r)?o=1:o=pe(o),Cc(Ue(s),o)}function eD(){var s=arguments,o=Ue(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var tD=ki(function(s,o,h){return s+(h?"_":"")+o.toLowerCase()});function rD(s,o,h){return h&&typeof h!="number"&&Nt(s,o,h)&&(o=h=r),h=h===r?K:h>>>0,h?(s=Ue(s),s&&(typeof o=="string"||o!=null&&!Kc(o))&&(o=Vt(o),!o&&Ii(s))?fn(_r(s),0,h):s.split(o,h)):[]}var nD=ki(function(s,o,h){return s+(h?" ":"")+Jc(o)});function iD(s,o,h){return s=Ue(s),h=h==null?0:Dn(pe(h),0,s.length),o=Vt(o),s.slice(h,h+o.length)==o}function sD(s,o,h){var g=T.templateSettings;h&&Nt(s,o,h)&&(o=r),s=Ue(s),o=Do({},o,g,a0);var y=Do({},o.imports,g.imports,a0),A=xt(y),C=cc(y,A),R,M,D=0,U=o.interpolate||Ka,G="__p += '",Y=fc((o.escape||Ka).source+"|"+U.source+"|"+(U===Ig?DO:Ka).source+"|"+(o.evaluate||Ka).source+"|$","g"),te="//# sourceURL="+(Ge.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pF+"]")+`
|
|
1962
|
-
`;s.replace(
|
|
1963
|
-
__e(`+
|
|
1964
|
-
'`),
|
|
1965
|
-
`+
|
|
1966
|
-
__p += '`),
|
|
1967
|
-
((__t = (`+
|
|
1968
|
-
'`),D=
|
|
1969
|
-
`;var
|
|
1975
|
+
`)}function MN(s){return he(s)||Xn(s)||!!(_m&&s&&s[_m])}function Yr(s,o){var h=typeof s;return o=o??ee,!!o&&(h=="number"||h!="symbol"&&HO.test(s))&&s>-1&&s%1==0&&s<o}function Bt(s,o,h){if(!ut(h))return!1;var g=typeof o;return(g=="number"?zt(h)&&Yr(o,h.length):g=="string"&&o in h)?Ar(h[o],s):!1}function zc(s,o){if(he(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||Kt(s)?!0:IO.test(s)||!CO.test(s)||o!=null&&s in We(o)}function ON(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 Se.prototype))return!1;if(s===h)return!0;var g=Uc(h);return!!g&&s===g[0]}function FN(s){return!!pm&&pm in s}var NN=io?Kr:ah;function Fs(s){var o=s&&s.constructor,h=typeof o=="function"&&o.prototype||Li;return s===h}function p0(s){return s===s&&!ut(s)}function g0(s,o){return function(h){return h==null?!1:h[s]===o&&(o!==r||s in We(h))}}function LN(s){var o=Lo(s,function(g){return h.size===p&&h.clear(),g}),h=o.cache;return o}function kN(s,o){var h=s[1],g=o[1],y=h|g,A=y<(w|x|L),C=g==L&&h==S||g==L&&h==k&&s[7].length<=o[8]||g==(L|k)&&o[7].length<=o[8]&&h==S;if(!(A||C))return s;g&w&&(s[2]=o[2],y|=h&w?0:E);var R=o[3];if(R){var M=s[3];s[3]=M?Zm(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?Qm(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]:Mt(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=y,s}function BN(s){var o=[];if(s!=null)for(var h in We(s))o.push(h);return o}function DN(s){return ao.call(s)}function m0(s,o,h){return o=_t(o===r?s.length-1:o,0),function(){for(var g=arguments,y=-1,A=_t(g.length-o,0),C=F(A);++y<A;)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 v0(s,o){return o.length<2?s:zn(s,ar(o,0,-1))}function UN(s,o){for(var h=s.length,g=Mt(o.length,h),y=Gt(s);g--;){var A=o[g];s[g]=Yr(A,h)?y[A]:r}return s}function Vc(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var _0=x0(Gm),Ns=e3||function(s,o){return Et.setTimeout(s,o)},Xc=x0(uN);function y0(s,o,h){var g=o+"";return Xc(s,PN(g,$N(CN(g),h)))}function x0(s){var o=0,h=0;return function(){var g=i3(),y=H-(g-h);if(h=g,y>0){if(++o>=de)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 A=Cc(h,y),C=s[A];s[A]=s[h],s[h]=C}return s.length=o,s}var b0=LN(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(RO,function(h,g,y,A){o.push(y?A.replace(BO,"$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 Vn(s){if(s!=null){try{return so.call(s)}catch{}try{return s+""}catch{}}return""}function $N(s,o){return rr(ye,function(h){var g="_."+h[0];o&h[1]&&!eo(s,g)&&s.push(g)}),s.sort()}function w0(s){if(s instanceof Se)return s.clone();var o=new ir(s.__wrapped__,s.__chain__);return o.__actions__=Gt(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function GN(s,o,h){(h?Bt(s,o,h):o===r)?o=1:o=_t(pe(o),0);var g=s==null?0:s.length;if(!g||o<1)return[];for(var y=0,A=0,C=F(fo(g/o));y<g;)C[A++]=ar(s,y,y+=o);return C}function zN(s){for(var o=-1,h=s==null?0:s.length,g=0,y=[];++o<h;){var A=s[o];A&&(y[g++]=A)}return y}function HN(){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(he(h)?Gt(h):[h],Ct(o,1))}var VN=ve(function(s,o){return ft(s)?Is(s,Ct(o,1,ft,!0)):[]}),XN=ve(function(s,o){var h=or(o);return ft(h)&&(h=r),ft(s)?Is(s,Ct(o,1,ft,!0),se(h,2)):[]}),jN=ve(function(s,o){var h=or(o);return ft(h)&&(h=r),ft(s)?Is(s,Ct(o,1,ft,!0),r,h):[]});function WN(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:pe(o),ar(s,o<0?0:o,g)):[]}function qN(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:pe(o),o=g-o,ar(s,0,o<0?0:o)):[]}function YN(s,o){return s&&s.length?To(s,se(o,3),!0,!0):[]}function KN(s,o){return s&&s.length?To(s,se(o,3),!0):[]}function ZN(s,o,h,g){var y=s==null?0:s.length;return y?(h&&typeof h!="number"&&Bt(s,o,h)&&(h=0,g=y),H3(s,o,h,g)):[]}function T0(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=h==null?0:pe(h);return y<0&&(y=_t(g+y,0)),to(s,se(o,3),y)}function A0(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=g-1;return h!==r&&(y=pe(h),y=h<0?_t(g+y,0):Mt(y,g-1)),to(s,se(o,3),y,!0)}function S0(s){var o=s==null?0:s.length;return o?Ct(s,1):[]}function QN(s){var o=s==null?0:s.length;return o?Ct(s,z):[]}function JN(s,o){var h=s==null?0:s.length;return h?(o=o===r?1:pe(o),Ct(s,o)):[]}function eL(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 E0(s){return s&&s.length?s[0]:r}function tL(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=h==null?0:pe(h);return y<0&&(y=_t(g+y,0)),Mi(s,o,y)}function rL(s){var o=s==null?0:s.length;return o?ar(s,0,-1):[]}var nL=ve(function(s){var o=it(s,Oc);return o.length&&o[0]===s[0]?wc(o):[]}),iL=ve(function(s){var o=or(s),h=it(s,Oc);return o===or(h)?o=r:h.pop(),h.length&&h[0]===s[0]?wc(h,se(o,2)):[]}),sL=ve(function(s){var o=or(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 aL(s,o){return s==null?"":r3.call(s,o)}function or(s){var o=s==null?0:s.length;return o?s[o-1]:r}function oL(s,o,h){var g=s==null?0:s.length;if(!g)return-1;var y=g;return h!==r&&(y=pe(h),y=y<0?_t(g+y,0):Mt(y,g-1)),o===o?$F(s,o,y):to(s,am,y,!0)}function uL(s,o){return s&&s.length?Bm(s,pe(o)):r}var lL=ve(C0);function C0(s,o){return s&&s.length&&o&&o.length?Ec(s,o):s}function cL(s,o,h){return s&&s.length&&o&&o.length?Ec(s,o,se(h,2)):s}function hL(s,o,h){return s&&s.length&&o&&o.length?Ec(s,o,r,h):s}var fL=qr(function(s,o){var h=s==null?0:s.length,g=_c(s,o);return $m(s,it(o,function(y){return Yr(y,h)?+y:y}).sort(Km)),g});function dL(s,o){var h=[];if(!(s&&s.length))return h;var g=-1,y=[],A=s.length;for(o=se(o,3);++g<A;){var C=s[g];o(C,g,s)&&(h.push(C),y.push(g))}return $m(s,y),h}function jc(s){return s==null?s:a3.call(s)}function pL(s,o,h){var g=s==null?0:s.length;return g?(h&&typeof h!="number"&&Bt(s,o,h)?(o=0,h=g):(o=o==null?0:pe(o),h=h===r?g:pe(h)),ar(s,o,h)):[]}function gL(s,o){return wo(s,o)}function mL(s,o,h){return Rc(s,o,se(h,2))}function vL(s,o){var h=s==null?0:s.length;if(h){var g=wo(s,o);if(g<h&&Ar(s[g],o))return g}return-1}function _L(s,o){return wo(s,o,!0)}function yL(s,o,h){return Rc(s,o,se(h,2),!0)}function xL(s,o){var h=s==null?0:s.length;if(h){var g=wo(s,o,!0)-1;if(Ar(s[g],o))return g}return-1}function bL(s){return s&&s.length?zm(s):[]}function wL(s,o){return s&&s.length?zm(s,se(o,2)):[]}function TL(s){var o=s==null?0:s.length;return o?ar(s,1,o):[]}function AL(s,o,h){return s&&s.length?(o=h||o===r?1:pe(o),ar(s,0,o<0?0:o)):[]}function SL(s,o,h){var g=s==null?0:s.length;return g?(o=h||o===r?1:pe(o),o=g-o,ar(s,o<0?0:o,g)):[]}function EL(s,o){return s&&s.length?To(s,se(o,3),!1,!0):[]}function CL(s,o){return s&&s.length?To(s,se(o,3)):[]}var IL=ve(function(s){return dn(Ct(s,1,ft,!0))}),RL=ve(function(s){var o=or(s);return ft(o)&&(o=r),dn(Ct(s,1,ft,!0),se(o,2))}),PL=ve(function(s){var o=or(s);return o=typeof o=="function"?o:r,dn(Ct(s,1,ft,!0),r,o)});function ML(s){return s&&s.length?dn(s):[]}function OL(s,o){return s&&s.length?dn(s,se(o,2)):[]}function FL(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(ft(h))return o=_t(h.length,o),!0}),cc(o,function(h){return it(s,oc(h))})}function I0(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 NL=ve(function(s,o){return ft(s)?Is(s,o):[]}),LL=ve(function(s){return Mc(un(s,ft))}),kL=ve(function(s){var o=or(s);return ft(o)&&(o=r),Mc(un(s,ft),se(o,2))}),BL=ve(function(s){var o=or(s);return o=typeof o=="function"?o:r,Mc(un(s,ft),r,o)}),DL=ve(Wc);function UL(s,o){return jm(s||[],o||[],Cs)}function $L(s,o){return jm(s||[],o||[],Ms)}var GL=ve(function(s){var o=s.length,h=o>1?s[o-1]:r;return h=typeof h=="function"?(s.pop(),h):r,I0(s,h)});function R0(s){var o=T(s);return o.__chain__=!0,o}function zL(s,o){return o(s),s}function Oo(s,o){return o(s)}var HL=qr(function(s){var o=s.length,h=o?s[0]:0,g=this.__wrapped__,y=function(A){return _c(A,s)};return o>1||this.__actions__.length||!(g instanceof Se)||!Yr(h)?this.thru(y):(g=g.slice(h,+h+(o?1:0)),g.__actions__.push({func:Oo,args:[y],thisArg:r}),new ir(g,this.__chain__).thru(function(A){return o&&!A.length&&A.push(r),A}))});function VL(){return R0(this)}function XL(){return new ir(this.value(),this.__chain__)}function jL(){this.__values__===r&&(this.__values__=H0(this.value()));var s=this.__index__>=this.__values__.length,o=s?r:this.__values__[this.__index__++];return{done:s,value:o}}function WL(){return this}function qL(s){for(var o,h=this;h instanceof vo;){var g=w0(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 YL(){var s=this.__wrapped__;if(s instanceof Se){var o=s;return this.__actions__.length&&(o=new Se(this)),o=o.reverse(),o.__actions__.push({func:Oo,args:[jc],thisArg:r}),new ir(o,this.__chain__)}return this.thru(jc)}function KL(){return Xm(this.__wrapped__,this.__actions__)}var ZL=Ao(function(s,o,h){He.call(s,h)?++s[h]:jr(s,h,1)});function QL(s,o,h){var g=he(s)?im:z3;return h&&Bt(s,o,h)&&(o=r),g(s,se(o,3))}function JL(s,o){var h=he(s)?un:Im;return h(s,se(o,3))}var ek=r0(T0),tk=r0(A0);function rk(s,o){return Ct(Fo(s,o),1)}function nk(s,o){return Ct(Fo(s,o),z)}function ik(s,o,h){return h=h===r?1:pe(h),Ct(Fo(s,o),h)}function P0(s,o){var h=he(s)?rr:fn;return h(s,se(o,3))}function M0(s,o){var h=he(s)?TF:Cm;return h(s,se(o,3))}var sk=Ao(function(s,o,h){He.call(s,h)?s[h].push(o):jr(s,h,[o])});function ak(s,o,h,g){s=zt(s)?s:Hi(s),h=h&&!g?pe(h):0;var y=s.length;return h<0&&(h=_t(y+h,0)),Do(s)?h<=y&&s.indexOf(o,h)>-1:!!y&&Mi(s,o,h)>-1}var ok=ve(function(s,o,h){var g=-1,y=typeof o=="function",A=zt(s)?F(s.length):[];return fn(s,function(C){A[++g]=y?Wt(o,C,h):Rs(C,o,h)}),A}),uk=Ao(function(s,o,h){jr(s,h,o)});function Fo(s,o){var h=he(s)?it:Nm;return h(s,se(o,3))}function lk(s,o,h,g){return s==null?[]:(he(o)||(o=o==null?[]:[o]),h=g?r:h,he(h)||(h=h==null?[]:[h]),Dm(s,o,h))}var ck=Ao(function(s,o,h){s[h?0:1].push(o)},function(){return[[],[]]});function hk(s,o,h){var g=he(s)?sc:um,y=arguments.length<3;return g(s,se(o,4),h,y,fn)}function fk(s,o,h){var g=he(s)?AF:um,y=arguments.length<3;return g(s,se(o,4),h,y,Cm)}function dk(s,o){var h=he(s)?un:Im;return h(s,ko(se(o,3)))}function pk(s){var o=he(s)?Tm:aN;return o(s)}function gk(s,o,h){(h?Bt(s,o,h):o===r)?o=1:o=pe(o);var g=he(s)?B3:oN;return g(s,o)}function mk(s){var o=he(s)?D3:lN;return o(s)}function vk(s){if(s==null)return 0;if(zt(s))return Do(s)?Fi(s):s.length;var o=Ot(s);return o==Qe||o==Lt?s.size:Ac(s).length}function _k(s,o,h){var g=he(s)?ac:cN;return h&&Bt(s,o,h)&&(o=r),g(s,se(o,3))}var yk=ve(function(s,o){if(s==null)return[];var h=o.length;return h>1&&Bt(s,o[0],o[1])?o=[]:h>2&&Bt(o[0],o[1],o[2])&&(o=[o[0]]),Dm(s,Ct(o,1),[])}),No=JF||function(){return Et.Date.now()};function xk(s,o){if(typeof o!="function")throw new nr(u);return s=pe(s),function(){if(--s<1)return o.apply(this,arguments)}}function O0(s,o,h){return o=h?r:o,o=s&&o==null?s.length:o,Wr(s,L,r,r,r,r,o)}function F0(s,o){var h;if(typeof o!="function")throw new nr(u);return s=pe(s),function(){return--s>0&&(h=o.apply(this,arguments)),s<=1&&(o=r),h}}var qc=ve(function(s,o,h){var g=w;if(h.length){var y=cn(h,Gi(qc));g|=O}return Wr(s,g,o,h,y)}),N0=ve(function(s,o,h){var g=w|x;if(h.length){var y=cn(h,Gi(N0));g|=O}return Wr(o,g,s,h,y)});function L0(s,o,h){o=h?r:o;var g=Wr(s,S,r,r,r,r,r,o);return g.placeholder=L0.placeholder,g}function k0(s,o,h){o=h?r:o;var g=Wr(s,I,r,r,r,r,r,o);return g.placeholder=k0.placeholder,g}function B0(s,o,h){var g,y,A,C,R,M,D=0,U=!1,G=!1,q=!0;if(typeof s!="function")throw new nr(u);o=ur(o)||0,ut(h)&&(U=!!h.leading,G="maxWait"in h,A=G?_t(ur(h.maxWait)||0,o):A,q="trailing"in h?!!h.trailing:q);function te(dt){var Sr=g,Qr=y;return g=y=r,D=dt,C=s.apply(Qr,Sr),C}function ae(dt){return D=dt,R=Ns(xe,o),U?te(dt):C}function me(dt){var Sr=dt-M,Qr=dt-D,rv=o-Sr;return G?Mt(rv,A-Qr):rv}function oe(dt){var Sr=dt-M,Qr=dt-D;return M===r||Sr>=o||Sr<0||G&&Qr>=A}function xe(){var dt=No();if(oe(dt))return Ce(dt);R=Ns(xe,me(dt))}function Ce(dt){return R=r,q&&g?te(dt):(g=y=r,C)}function Zt(){R!==r&&Wm(R),D=0,g=M=y=R=r}function Dt(){return R===r?C:Ce(No())}function Qt(){var dt=No(),Sr=oe(dt);if(g=arguments,y=this,M=dt,Sr){if(R===r)return ae(M);if(G)return Wm(R),R=Ns(xe,o),te(M)}return R===r&&(R=Ns(xe,o)),C}return Qt.cancel=Zt,Qt.flush=Dt,Qt}var bk=ve(function(s,o){return Em(s,1,o)}),wk=ve(function(s,o,h){return Em(s,ur(o)||0,h)});function Tk(s){return Wr(s,$)}function Lo(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new nr(u);var h=function(){var g=arguments,y=o?o.apply(this,g):g[0],A=h.cache;if(A.has(y))return A.get(y);var C=s.apply(this,g);return h.cache=A.set(y,C)||A,C};return h.cache=new(Lo.Cache||Xr),h}Lo.Cache=Xr;function ko(s){if(typeof s!="function")throw new nr(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 F0(2,s)}var Sk=hN(function(s,o){o=o.length==1&&he(o[0])?it(o[0],qt(se())):it(Ct(o,1),qt(se()));var h=o.length;return ve(function(g){for(var y=-1,A=Mt(g.length,h);++y<A;)g[y]=o[y].call(this,g[y]);return Wt(s,this,g)})}),Yc=ve(function(s,o){var h=cn(o,Gi(Yc));return Wr(s,O,r,o,h)}),D0=ve(function(s,o){var h=cn(o,Gi(D0));return Wr(s,N,r,o,h)}),Ek=qr(function(s,o){return Wr(s,k,r,r,r,o)});function Ck(s,o){if(typeof s!="function")throw new nr(u);return o=o===r?o:pe(o),ve(s,o)}function Ik(s,o){if(typeof s!="function")throw new nr(u);return o=o==null?0:_t(pe(o),0),ve(function(h){var g=h[o],y=gn(h,0,o);return g&&ln(y,g),Wt(s,this,y)})}function Rk(s,o,h){var g=!0,y=!0;if(typeof s!="function")throw new nr(u);return ut(h)&&(g="leading"in h?!!h.leading:g,y="trailing"in h?!!h.trailing:y),B0(s,o,{leading:g,maxWait:o,trailing:y})}function Pk(s){return O0(s,1)}function Mk(s,o){return Yc(Fc(o),s)}function Ok(){if(!arguments.length)return[];var s=arguments[0];return he(s)?s:[s]}function Fk(s){return sr(s,m)}function Nk(s,o){return o=typeof o=="function"?o:r,sr(s,m,o)}function Lk(s){return sr(s,c|m)}function kk(s,o){return o=typeof o=="function"?o:r,sr(s,c|m,o)}function Bk(s,o){return o==null||Sm(s,o,Tt(o))}function Ar(s,o){return s===o||s!==s&&o!==o}var Dk=Io(bc),Uk=Io(function(s,o){return s>=o}),Xn=Mm(function(){return arguments}())?Mm:function(s){return ct(s)&&He.call(s,"callee")&&!vm.call(s,"callee")},he=F.isArray,$k=Qg?qt(Qg):q3;function zt(s){return s!=null&&Bo(s.length)&&!Kr(s)}function ft(s){return ct(s)&&zt(s)}function Gk(s){return s===!0||s===!1||ct(s)&&kt(s)==De}var mn=t3||ah,zk=Jg?qt(Jg):Y3;function Hk(s){return ct(s)&&s.nodeType===1&&!Ls(s)}function Vk(s){if(s==null)return!0;if(zt(s)&&(he(s)||typeof s=="string"||typeof s.splice=="function"||mn(s)||zi(s)||Xn(s)))return!s.length;var o=Ot(s);if(o==Qe||o==Lt)return!s.size;if(Fs(s))return!Ac(s).length;for(var h in s)if(He.call(s,h))return!1;return!0}function Xk(s,o){return Ps(s,o)}function jk(s,o,h){h=typeof h=="function"?h:r;var g=h?h(s,o):r;return g===r?Ps(s,o,r,h):!!g}function Kc(s){if(!ct(s))return!1;var o=kt(s);return o==Te||o==Ke||typeof s.message=="string"&&typeof s.name=="string"&&!Ls(s)}function Wk(s){return typeof s=="number"&&ym(s)}function Kr(s){if(!ut(s))return!1;var o=kt(s);return o==Ue||o==Ze||o==ze||o==Ut}function U0(s){return typeof s=="number"&&s==pe(s)}function Bo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ee}function ut(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function ct(s){return s!=null&&typeof s=="object"}var $0=em?qt(em):Z3;function qk(s,o){return s===o||Tc(s,o,$c(o))}function Yk(s,o,h){return h=typeof h=="function"?h:r,Tc(s,o,$c(o),h)}function Kk(s){return G0(s)&&s!=+s}function Zk(s){if(NN(s))throw new ce(a);return Om(s)}function Qk(s){return s===null}function Jk(s){return s==null}function G0(s){return typeof s=="number"||ct(s)&&kt(s)==J}function Ls(s){if(!ct(s)||kt(s)!=Ae)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)==YF}var Zc=tm?qt(tm):Q3;function eB(s){return U0(s)&&s>=-ee&&s<=ee}var z0=rm?qt(rm):J3;function Do(s){return typeof s=="string"||!he(s)&&ct(s)&&kt(s)==Hr}function Kt(s){return typeof s=="symbol"||ct(s)&&kt(s)==Ci}var zi=nm?qt(nm):eN;function tB(s){return s===r}function rB(s){return ct(s)&&Ot(s)==Ii}function nB(s){return ct(s)&&kt(s)==yO}var iB=Io(Sc),sB=Io(function(s,o){return s<=o});function H0(s){if(!s)return[];if(zt(s))return Do(s)?wr(s):Gt(s);if(ws&&s[ws])return BF(s[ws]());var o=Ot(s),h=o==Qe?fc:o==Lt?ro:Hi;return h(s)}function Zr(s){if(!s)return s===0?s:0;if(s=ur(s),s===z||s===-z){var o=s<0?-1:1;return o*fe}return s===s?s:0}function pe(s){var o=Zr(s),h=o%1;return o===o?h?o-h:o:0}function V0(s){return s?Gn(pe(s),0,Y):0}function ur(s){if(typeof s=="number")return s;if(Kt(s))return X;if(ut(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=ut(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=lm(s);var h=$O.test(s);return h||zO.test(s)?xF(s.slice(2),h?2:8):UO.test(s)?X:+s}function X0(s){return Lr(s,Ht(s))}function aB(s){return s?Gn(pe(s),-ee,ee):s===0?s:0}function $e(s){return s==null?"":Yt(s)}var oB=Ui(function(s,o){if(Fs(o)||zt(o)){Lr(o,Tt(o),s);return}for(var h in o)He.call(o,h)&&Cs(s,h,o[h])}),j0=Ui(function(s,o){Lr(o,Ht(o),s)}),Uo=Ui(function(s,o,h,g){Lr(o,Ht(o),s,g)}),uB=Ui(function(s,o,h,g){Lr(o,Tt(o),s,g)}),lB=qr(_c);function cB(s,o){var h=Di(s);return o==null?h:Am(h,o)}var hB=ve(function(s,o){s=We(s);var h=-1,g=o.length,y=g>2?o[2]:r;for(y&&Bt(o[0],o[1],y)&&(g=1);++h<g;)for(var A=o[h],C=Ht(A),R=-1,M=C.length;++R<M;){var D=C[R],U=s[D];(U===r||Ar(U,Li[D])&&!He.call(s,D))&&(s[D]=A[D])}return s}),fB=ve(function(s){return s.push(r,l0),Wt(W0,r,s)});function dB(s,o){return sm(s,se(o,3),Nr)}function pB(s,o){return sm(s,se(o,3),xc)}function gB(s,o){return s==null?s:yc(s,se(o,3),Ht)}function mB(s,o){return s==null?s:Rm(s,se(o,3),Ht)}function vB(s,o){return s&&Nr(s,se(o,3))}function _B(s,o){return s&&xc(s,se(o,3))}function yB(s){return s==null?[]:xo(s,Tt(s))}function xB(s){return s==null?[]:xo(s,Ht(s))}function Qc(s,o,h){var g=s==null?r:zn(s,o);return g===r?h:g}function bB(s,o){return s!=null&&f0(s,o,V3)}function Jc(s,o){return s!=null&&f0(s,o,X3)}var wB=i0(function(s,o,h){o!=null&&typeof o.toString!="function"&&(o=ao.call(o)),s[o]=h},th(Vt)),TB=i0(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]},se),AB=ve(Rs);function Tt(s){return zt(s)?wm(s):Ac(s)}function Ht(s){return zt(s)?wm(s,!0):tN(s)}function SB(s,o){var h={};return o=se(o,3),Nr(s,function(g,y,A){jr(h,o(g,y,A),g)}),h}function EB(s,o){var h={};return o=se(o,3),Nr(s,function(g,y,A){jr(h,y,o(g,y,A))}),h}var CB=Ui(function(s,o,h){bo(s,o,h)}),W0=Ui(function(s,o,h,g){bo(s,o,h,g)}),IB=qr(function(s,o){var h={};if(s==null)return h;var g=!1;o=it(o,function(A){return A=pn(A,s),g||(g=A.length>1),A}),Lr(s,Dc(s),h),g&&(h=sr(h,c|d|m,wN));for(var y=o.length;y--;)Pc(h,o[y]);return h});function RB(s,o){return q0(s,ko(se(o)))}var PB=qr(function(s,o){return s==null?{}:nN(s,o)});function q0(s,o){if(s==null)return{};var h=it(Dc(s),function(g){return[g]});return o=se(o),Um(s,h,function(g,y){return o(g,y[0])})}function MB(s,o,h){o=pn(o,s);var g=-1,y=o.length;for(y||(y=1,s=r);++g<y;){var A=s==null?r:s[kr(o[g])];A===r&&(g=y,A=h),s=Kr(A)?A.call(s):A}return s}function OB(s,o,h){return s==null?s:Ms(s,o,h)}function FB(s,o,h,g){return g=typeof g=="function"?g:r,s==null?s:Ms(s,o,h,g)}var Y0=o0(Tt),K0=o0(Ht);function NB(s,o,h){var g=he(s),y=g||mn(s)||zi(s);if(o=se(o,4),h==null){var A=s&&s.constructor;y?h=g?new A:[]:ut(s)?h=Kr(A)?Di(lo(s)):{}:h={}}return(y?rr:Nr)(s,function(C,R,M){return o(h,C,R,M)}),h}function LB(s,o){return s==null?!0:Pc(s,o)}function kB(s,o,h){return s==null?s:Vm(s,o,Fc(h))}function BB(s,o,h,g){return g=typeof g=="function"?g:r,s==null?s:Vm(s,o,Fc(h),g)}function Hi(s){return s==null?[]:hc(s,Tt(s))}function DB(s){return s==null?[]:hc(s,Ht(s))}function UB(s,o,h){return h===r&&(h=o,o=r),h!==r&&(h=ur(h),h=h===h?h:0),o!==r&&(o=ur(o),o=o===o?o:0),Gn(ur(s),o,h)}function $B(s,o,h){return o=Zr(o),h===r?(h=o,o=0):h=Zr(h),s=ur(s),j3(s,o,h)}function GB(s,o,h){if(h&&typeof h!="boolean"&&Bt(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=xm();return Mt(s+y*(o-s+yF("1e-"+((y+"").length-1))),o)}return Cc(s,o)}var zB=$i(function(s,o,h){return o=o.toLowerCase(),s+(h?Z0(o):o)});function Z0(s){return eh($e(s).toLowerCase())}function Q0(s){return s=$e(s),s&&s.replace(VO,OF).replace(lF,"")}function HB(s,o,h){s=$e(s),o=Yt(o);var g=s.length;h=h===r?g:Gn(pe(h),0,g);var y=h;return h-=o.length,h>=0&&s.slice(h,y)==o}function VB(s){return s=$e(s),s&&AO.test(s)?s.replace(Rg,FF):s}function XB(s){return s=$e(s),s&&PO.test(s)?s.replace(Yl,"\\$&"):s}var jB=$i(function(s,o,h){return s+(h?"-":"")+o.toLowerCase()}),WB=$i(function(s,o,h){return s+(h?" ":"")+o.toLowerCase()}),qB=t0("toLowerCase");function YB(s,o,h){s=$e(s),o=pe(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 KB(s,o,h){s=$e(s),o=pe(o);var g=o?Fi(s):0;return o&&g<o?s+Co(o-g,h):s}function ZB(s,o,h){s=$e(s),o=pe(o);var g=o?Fi(s):0;return o&&g<o?Co(o-g,h)+s:s}function QB(s,o,h){return h||o==null?o=0:o&&(o=+o),s3($e(s).replace(Kl,""),o||0)}function JB(s,o,h){return(h?Bt(s,o,h):o===r)?o=1:o=pe(o),Ic($e(s),o)}function eD(){var s=arguments,o=$e(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var tD=$i(function(s,o,h){return s+(h?"_":"")+o.toLowerCase()});function rD(s,o,h){return h&&typeof h!="number"&&Bt(s,o,h)&&(o=h=r),h=h===r?Y:h>>>0,h?(s=$e(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 nD=$i(function(s,o,h){return s+(h?" ":"")+eh(o)});function iD(s,o,h){return s=$e(s),h=h==null?0:Gn(pe(h),0,s.length),o=Yt(o),s.slice(h,h+o.length)==o}function sD(s,o,h){var g=T.templateSettings;h&&Bt(s,o,h)&&(o=r),s=$e(s),o=Uo({},o,g,u0);var y=Uo({},o.imports,g.imports,u0),A=Tt(y),C=hc(y,A),R,M,D=0,U=o.interpolate||Za,G="__p += '",q=dc((o.escape||Za).source+"|"+U.source+"|"+(U===Pg?DO:Za).source+"|"+(o.evaluate||Za).source+"|$","g"),te="//# sourceURL="+(He.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pF+"]")+`
|
|
1976
|
+
`;s.replace(q,function(oe,xe,Ce,Zt,Dt,Qt){return Ce||(Ce=Zt),G+=s.slice(D,Qt).replace(XO,NF),xe&&(R=!0,G+=`' +
|
|
1977
|
+
__e(`+xe+`) +
|
|
1978
|
+
'`),Dt&&(M=!0,G+=`';
|
|
1979
|
+
`+Dt+`;
|
|
1980
|
+
__p += '`),Ce&&(G+=`' +
|
|
1981
|
+
((__t = (`+Ce+`)) == null ? '' : __t) +
|
|
1982
|
+
'`),D=Qt+oe.length,oe}),G+=`';
|
|
1983
|
+
`;var ae=He.call(o,"variable")&&o.variable;if(!ae)G=`with (obj) {
|
|
1970
1984
|
`+G+`
|
|
1971
1985
|
}
|
|
1972
|
-
`;else if(kO.test(
|
|
1973
|
-
`+(
|
|
1986
|
+
`;else if(kO.test(ae))throw new ce(l);G=(M?G.replace(xO,""):G).replace(bO,"$1").replace(wO,"$1;"),G="function("+(ae||"obj")+`) {
|
|
1987
|
+
`+(ae?"":`obj || (obj = {});
|
|
1974
1988
|
`)+"var __t, __p = ''"+(R?", __e = _.escape":"")+(M?`, __j = Array.prototype.join;
|
|
1975
1989
|
function print() { __p += __j.call(arguments, '') }
|
|
1976
1990
|
`:`;
|
|
1977
1991
|
`)+G+`return __p
|
|
1978
|
-
}`;var me=Q0(function(){return Be(A,te+"return "+G).apply(r,C)});if(me.source=G,Yc(me))throw me;return me}function aD(s){return Ue(s).toLowerCase()}function oD(s){return Ue(s).toUpperCase()}function uD(s,o,h){if(s=Ue(s),s&&(h||o===r))return om(s);if(!s||!(o=Vt(o)))return s;var g=_r(s),y=_r(o),A=um(g,y),C=lm(g,y)+1;return fn(g,A,C).join("")}function lD(s,o,h){if(s=Ue(s),s&&(h||o===r))return s.slice(0,hm(s)+1);if(!s||!(o=Vt(o)))return s;var g=_r(s),y=lm(g,_r(o))+1;return fn(g,0,y).join("")}function cD(s,o,h){if(s=Ue(s),s&&(h||o===r))return s.replace(Yl,"");if(!s||!(o=Vt(o)))return s;var g=_r(s),y=um(g,_r(o));return fn(g,y).join("")}function hD(s,o){var h=j,g=ee;if(at(o)){var y="separator"in o?o.separator:y;h="length"in o?pe(o.length):h,g="omission"in o?Vt(o.omission):g}s=Ue(s);var A=s.length;if(Ii(s)){var C=_r(s);A=C.length}if(h>=A)return s;var R=h-Ri(g);if(R<1)return g;var M=C?fn(C,0,R).join(""):s.slice(0,R);if(y===r)return M+g;if(C&&(R+=M.length-R),Kc(y)){if(s.slice(R).search(y)){var D,U=M;for(y.global||(y=fc(y.source,Ue(Rg.exec(y))+"g")),y.lastIndex=0;D=y.exec(U);)var G=D.index;M=M.slice(0,G===r?R:G)}}else if(s.indexOf(Vt(y),R)!=R){var Y=M.lastIndexOf(y);Y>-1&&(M=M.slice(0,Y))}return M+g}function fD(s){return s=Ue(s),s&&TO.test(s)?s.replace(Eg,GF):s}var dD=ki(function(s,o,h){return s+(h?" ":"")+o.toUpperCase()}),Jc=Jm("toUpperCase");function Z0(s,o,h){return s=Ue(s),o=h?r:o,o===r?kF(s)?VF(s):CF(s):s.match(o)||[]}var Q0=_e(function(s,o){try{return zt(s,r,o)}catch(h){return Yc(h)?h:new fe(h)}}),pD=Xr(function(s,o){return Zt(o,function(h){h=Or(h),Hr(s,h,Wc(s[h],s))}),s});function gD(s){var o=s==null?0:s.length,h=oe();return s=o?rt(s,function(g){if(typeof g[1]!="function")throw new Qt(u);return[h(g[0]),g[1]]}):[],_e(function(g){for(var y=-1;++y<o;){var A=s[y];if(zt(A[0],this,g))return zt(A[1],this,g)}})}function mD(s){return G3(er(s,c))}function eh(s){return function(){return s}}function vD(s,o){return s==null||s!==s?o:s}var _D=t0(),yD=t0(!0);function Ut(s){return s}function th(s){return Mm(typeof s=="function"?s:er(s,c))}function xD(s){return Fm(er(s,c))}function bD(s,o){return Nm(s,er(o,c))}var wD=_e(function(s,o){return function(h){return Cs(h,s,o)}}),TD=_e(function(s,o){return function(h){return Cs(s,h,o)}});function rh(s,o,h){var g=xt(o),y=yo(o,g);h==null&&!(at(o)&&(y.length||!g.length))&&(h=o,o=s,s=this,y=yo(o,xt(o)));var A=!(at(h)&&"chain"in h)||!!h.chain,C=Wr(s);return Zt(y,function(R){var M=o[R];s[R]=M,C&&(s.prototype[R]=function(){var D=this.__chain__;if(A||D){var U=s(this.__wrapped__),G=U.__actions__=kt(this.__actions__);return G.push({func:M,args:arguments,thisArg:s}),U.__chain__=D,U}return M.apply(s,an([this.value()],arguments))})}),s}function AD(){return Tt._===this&&(Tt._=KF),this}function nh(){}function SD(s){return s=pe(s),_e(function(o){return Lm(o,s)})}var ED=Nc(rt),CD=Nc(rm),ID=Nc(sc);function J0(s){return Gc(s)?ac(Or(s)):iN(s)}function RD(s){return function(o){return s==null?r:Un(s,o)}}var PD=n0(),MD=n0(!0);function ih(){return[]}function sh(){return!1}function OD(){return{}}function FD(){return""}function ND(){return!0}function LD(s,o){if(s=pe(s),s<1||s>re)return[];var h=K,g=It(s,K);o=oe(o),s-=K;for(var y=lc(g,o);++h<s;)o(h);return y}function kD(s){return de(s)?rt(s,Or):Xt(s)?[s]:kt(y0(Ue(s)))}function BD(s){var o=++qF;return Ue(s)+o}var DD=So(function(s,o){return s+o},0),UD=Lc("ceil"),$D=So(function(s,o){return s/o},1),GD=Lc("floor");function zD(s){return s&&s.length?_o(s,Ut,xc):r}function HD(s,o){return s&&s.length?_o(s,oe(o,2),xc):r}function VD(s){return sm(s,Ut)}function XD(s,o){return sm(s,oe(o,2))}function jD(s){return s&&s.length?_o(s,Ut,Ac):r}function WD(s,o){return s&&s.length?_o(s,oe(o,2),Ac):r}var qD=So(function(s,o){return s*o},1),YD=Lc("round"),KD=So(function(s,o){return s-o},0);function ZD(s){return s&&s.length?uc(s,Ut):0}function QD(s,o){return s&&s.length?uc(s,oe(o,2)):0}return T.after=xk,T.ary=P0,T.assign=oB,T.assignIn=V0,T.assignInWith=Do,T.assignWith=uB,T.at=lB,T.before=M0,T.bind=Wc,T.bindAll=pD,T.bindKey=O0,T.castArray=Ok,T.chain=C0,T.chunk=GN,T.compact=zN,T.concat=HN,T.cond=gD,T.conforms=mD,T.constant=eh,T.countBy=ZL,T.create=cB,T.curry=F0,T.curryRight=N0,T.debounce=L0,T.defaults=hB,T.defaultsDeep=fB,T.defer=bk,T.delay=wk,T.difference=VN,T.differenceBy=XN,T.differenceWith=jN,T.drop=WN,T.dropRight=qN,T.dropRightWhile=YN,T.dropWhile=KN,T.fill=ZN,T.filter=JL,T.flatMap=rk,T.flatMapDeep=nk,T.flatMapDepth=ik,T.flatten=T0,T.flattenDeep=QN,T.flattenDepth=JN,T.flip=Tk,T.flow=_D,T.flowRight=yD,T.fromPairs=eL,T.functions=yB,T.functionsIn=xB,T.groupBy=sk,T.initial=rL,T.intersection=nL,T.intersectionBy=iL,T.intersectionWith=sL,T.invert=wB,T.invertBy=TB,T.invokeMap=ok,T.iteratee=th,T.keyBy=uk,T.keys=xt,T.keysIn=Dt,T.map=Oo,T.mapKeys=SB,T.mapValues=EB,T.matches=xD,T.matchesProperty=bD,T.memoize=No,T.merge=CB,T.mergeWith=X0,T.method=wD,T.methodOf=TD,T.mixin=rh,T.negate=Lo,T.nthArg=SD,T.omit=IB,T.omitBy=RB,T.once=Ak,T.orderBy=lk,T.over=ED,T.overArgs=Sk,T.overEvery=CD,T.overSome=ID,T.partial=qc,T.partialRight=k0,T.partition=ck,T.pick=PB,T.pickBy=j0,T.property=J0,T.propertyOf=RD,T.pull=lL,T.pullAll=S0,T.pullAllBy=cL,T.pullAllWith=hL,T.pullAt=fL,T.range=PD,T.rangeRight=MD,T.rearg=Ek,T.reject=dk,T.remove=dL,T.rest=Ck,T.reverse=Xc,T.sampleSize=gk,T.set=OB,T.setWith=FB,T.shuffle=mk,T.slice=pL,T.sortBy=yk,T.sortedUniq=bL,T.sortedUniqBy=wL,T.split=rD,T.spread=Ik,T.tail=TL,T.take=AL,T.takeRight=SL,T.takeRightWhile=EL,T.takeWhile=CL,T.tap=zL,T.throttle=Rk,T.thru=Mo,T.toArray=G0,T.toPairs=W0,T.toPairsIn=q0,T.toPath=kD,T.toPlainObject=H0,T.transform=NB,T.unary=Pk,T.union=IL,T.unionBy=RL,T.unionWith=PL,T.uniq=ML,T.uniqBy=OL,T.uniqWith=FL,T.unset=LB,T.unzip=jc,T.unzipWith=E0,T.update=kB,T.updateWith=BB,T.values=Ui,T.valuesIn=DB,T.without=NL,T.words=Z0,T.wrap=Mk,T.xor=LL,T.xorBy=kL,T.xorWith=BL,T.zip=DL,T.zipObject=UL,T.zipObjectDeep=$L,T.zipWith=GL,T.entries=W0,T.entriesIn=q0,T.extend=V0,T.extendWith=Do,rh(T,T),T.add=DD,T.attempt=Q0,T.camelCase=zB,T.capitalize=Y0,T.ceil=UD,T.clamp=UB,T.clone=Fk,T.cloneDeep=Lk,T.cloneDeepWith=kk,T.cloneWith=Nk,T.conformsTo=Bk,T.deburr=K0,T.defaultTo=vD,T.divide=$D,T.endsWith=HB,T.eq=xr,T.escape=VB,T.escapeRegExp=XB,T.every=QL,T.find=ek,T.findIndex=b0,T.findKey=dB,T.findLast=tk,T.findLastIndex=w0,T.findLastKey=pB,T.floor=GD,T.forEach=I0,T.forEachRight=R0,T.forIn=gB,T.forInRight=mB,T.forOwn=vB,T.forOwnRight=_B,T.get=Zc,T.gt=Dk,T.gte=Uk,T.has=bB,T.hasIn=Qc,T.head=A0,T.identity=Ut,T.includes=ak,T.indexOf=tL,T.inRange=$B,T.invoke=AB,T.isArguments=zn,T.isArray=de,T.isArrayBuffer=$k,T.isArrayLike=Bt,T.isArrayLikeObject=ct,T.isBoolean=Gk,T.isBuffer=dn,T.isDate=zk,T.isElement=Hk,T.isEmpty=Vk,T.isEqual=Xk,T.isEqualWith=jk,T.isError=Yc,T.isFinite=Wk,T.isFunction=Wr,T.isInteger=B0,T.isLength=ko,T.isMap=D0,T.isMatch=qk,T.isMatchWith=Yk,T.isNaN=Kk,T.isNative=Zk,T.isNil=Jk,T.isNull=Qk,T.isNumber=U0,T.isObject=at,T.isObjectLike=ut,T.isPlainObject=Fs,T.isRegExp=Kc,T.isSafeInteger=eB,T.isSet=$0,T.isString=Bo,T.isSymbol=Xt,T.isTypedArray=Di,T.isUndefined=tB,T.isWeakMap=rB,T.isWeakSet=nB,T.join=aL,T.kebabCase=jB,T.last=rr,T.lastIndexOf=oL,T.lowerCase=WB,T.lowerFirst=qB,T.lt=iB,T.lte=sB,T.max=zD,T.maxBy=HD,T.mean=VD,T.meanBy=XD,T.min=jD,T.minBy=WD,T.stubArray=ih,T.stubFalse=sh,T.stubObject=OD,T.stubString=FD,T.stubTrue=ND,T.multiply=qD,T.nth=uL,T.noConflict=AD,T.noop=nh,T.now=Fo,T.pad=YB,T.padEnd=KB,T.padStart=ZB,T.parseInt=QB,T.random=GB,T.reduce=hk,T.reduceRight=fk,T.repeat=JB,T.replace=eD,T.result=MB,T.round=YD,T.runInContext=P,T.sample=pk,T.size=vk,T.snakeCase=tD,T.some=_k,T.sortedIndex=gL,T.sortedIndexBy=mL,T.sortedIndexOf=vL,T.sortedLastIndex=_L,T.sortedLastIndexBy=yL,T.sortedLastIndexOf=xL,T.startCase=nD,T.startsWith=iD,T.subtract=KD,T.sum=ZD,T.sumBy=QD,T.template=sD,T.times=LD,T.toFinite=qr,T.toInteger=pe,T.toLength=z0,T.toLower=aD,T.toNumber=nr,T.toSafeInteger=aB,T.toString=Ue,T.toUpper=oD,T.trim=uD,T.trimEnd=lD,T.trimStart=cD,T.truncate=hD,T.unescape=fD,T.uniqueId=BD,T.upperCase=dD,T.upperFirst=Jc,T.each=I0,T.eachRight=R0,T.first=A0,rh(T,function(){var s={};return Pr(T,function(o,h){Ge.call(T.prototype,h)||(s[h]=o)}),s}(),{chain:!1}),T.VERSION=n,Zt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){T[s].placeholder=T}),Zt(["drop","take"],function(s,o){Ae.prototype[s]=function(h){h=h===r?1:gt(pe(h),0);var g=this.__filtered__&&!o?new Ae(this):this.clone();return g.__filtered__?g.__takeCount__=It(h,g.__takeCount__):g.__views__.push({size:It(h,K),type:s+(g.__dir__<0?"Right":"")}),g},Ae.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),Zt(["filter","map","takeWhile"],function(s,o){var h=o+1,g=h==H||h==ke;Ae.prototype[s]=function(y){var A=this.clone();return A.__iteratees__.push({iteratee:oe(y,3),type:h}),A.__filtered__=A.__filtered__||g,A}}),Zt(["head","last"],function(s,o){var h="take"+(o?"Right":"");Ae.prototype[s]=function(){return this[h](1).value()[0]}}),Zt(["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(Ut)},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 Cs(h,s,o)})}),Ae.prototype.reject=function(s){return this.filter(Lo(oe(s)))},Ae.prototype.slice=function(s,o){s=pe(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=pe(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(K)},Pr(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],A=g||/^find/.test(o);y&&(T.prototype[o]=function(){var C=this.__wrapped__,R=g?[1]:arguments,M=C instanceof Ae,D=R[0],U=M||de(C),G=function(we){var Ie=y.apply(T,an([we],R));return g&&Y?Ie[0]:Ie};U&&h&&typeof D=="function"&&D.length!=1&&(M=U=!1);var Y=this.__chain__,te=!!this.__actions__.length,ue=A&&!Y,me=M&&!te;if(!A&&U){C=me?C:new Ae(this);var le=s.apply(C,R);return le.__actions__.push({func:Mo,args:[G],thisArg:r}),new Jt(le,Y)}return ue&&me?s.apply(this,R):(le=this.thru(G),ue?g?le.value()[0]:le.value():le)})}),Zt(["pop","push","shift","sort","splice","unshift"],function(s){var o=ro[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 A=this.value();return o.apply(de(A)?A:[],y)}return this[h](function(C){return o.apply(de(C)?C:[],y)})}}),Pr(Ae.prototype,function(s,o){var h=T[o];if(h){var g=h.name+"";Ge.call(Fi,g)||(Fi[g]=[]),Fi[g].push({name:o,func:h})}}),Fi[Ao(r,x).name]=[{name:"wrapper",func:r}],Ae.prototype.clone=f3,Ae.prototype.reverse=d3,Ae.prototype.value=p3,T.prototype.at=HL,T.prototype.chain=VL,T.prototype.commit=XL,T.prototype.next=jL,T.prototype.plant=qL,T.prototype.reverse=YL,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=KL,T.prototype.first=T.prototype.head,xs&&(T.prototype[xs]=WL),T},Pi=XF();Nn?((Nn.exports=Pi)._=Pi,tc._=Pi):Tt._=Pi}).call(bt)}(Wa,Wa.exports);var _g=Wa.exports;const zM={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},yg=ie.forwardRef((t,e)=>{const[r,n]=ie.useState([]),[,i]=ie.useState(0),[a,u]=ie.useState([]),[,l]=q.useState(!1),[f,p]=OM({autoPlay:!1}),v=q.useRef(null),c=q.useRef(null),d=q.useRef(zM),m=q.useRef(),{tl:_,dragModeRef:b}=q.useContext(gn),{frames:w,delays:x}=f,{src:E,startAt:S,endAt:I,frameStartAt:O,frameEndAt:N,loop:L,visible:k,transformation:{width:$=0,height:j=0,x:ee,y:se,animation:X,colorCorrection:H={}},pointerdown:ve}=t,{temperatureFilter:ke,sharpnessFilter:z,hueFilter:re,blurFilter:ge,adjustmentFilter:V}=cs(H),{blurRadius:K=0}=H,he=.1;$M(E,p),ot(Xe.PAUSE,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ot(Xe.SEEK_END,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ot(Xe.SCRUBBER_CLICKED,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ie.useEffect(()=>{d.current&&v.current&&(b.current?(v.current.stop(),d.current.isPlaying=!1,d.current.isDragging=!0):d.current.isDragging=!1)},[b]),ie.useEffect(()=>{if(!Zo(w)){const Q=uM(w,Ee=>{const{data:Ce,width:Qe,height:gr}=Ee,Ot=new Uint8Array(Ce);return Fr.Texture.fromBuffer(Ot,Qe,gr)}),W=Q.map((Ee,Ce)=>({texture:Ee,time:x[Ce]}));n(Q),u(W);let ae=0;x.forEach(Ee=>{ae+=Ee*10}),i(ae),d.current.totalDuration=ae,d.current.totalFrames=w.length}},[w,x]);const ye=_g.debounce(Q=>{if(v.current){let W=Q===0?0:Q/he;W=isNaN(W)?0:W;const ae=d.current.totalFrames;W=W>ae?ae:W,W>=ae?(v.current.gotoAndStop(0),d.current.isPlaying=!1):(v.current.gotoAndPlay(W||0),d.current.isPlaying=!0)}},20),xe=_g.debounce(()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},50),Pe=Q=>{if(v.current){let W=Q===0?0:Q/he;W=isNaN(W)?0:W;const ae=d.current.totalFrames;W=W>ae?ae:W,W>=ae?(v.current.gotoAndStop(0),d.current.isPlaying=!1):(v.current.gotoAndPlay(W||0),d.current.isPlaying=!0)}},Oe=()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},ze=()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},He=Q=>{var ae;const W=Q+((ae=m.current)==null?void 0:ae.time());v.current&&b.current?(ye(W),xe(),d.current.isPlaying=!1):m.current&&v.current&&!d.current.isPlaying&&m.current.isActive()&&_.current.isActive()&&(ye(W),d.current.isPlaying=!0)},Ze=()=>{l(!0)};return q.useEffect(()=>{let Q=mt.context(()=>{});if(c.current&&_.current){const W={duration:Number(N)-Number(O),onStart:Pe,onComplete:Oe,onStartParams:[O,N],onCompleteParams:[],onInterrupt:ze,onUpdate:He,onUpdateParams:[O,N]};m.current&&m.current.kill(),Q=mt.context(()=>{m.current=mt.from(c.current,W,O),_.current.add(m.current,S)})}return()=>{m.current&&(m.current.kill(),mt.killTweensOf(m.current)),Q.revert()}},[X,S,I,O,N]),Fe.jsx(Wn,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:Fe.jsx(et.Container,{ref:c,children:r&&r.length>0&&Fe.jsx(vg,{x:ee,y:se,width:$,height:j,animationSpeed:1,alpha:k?1:0,loop:L,textures:a,onComplete:Ze,anchor:.5,forwardRef:v,...k&&{interactive:!0,pointerdown:ve},filters:[ke,z,re,V,...K>0?[ge]:[]]})})})});yg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const HM=ie.forwardRef((t,e)=>{const n=q.useRef(null),i=q.useRef(0),a=q.useRef(null),u=q.useRef(null),l=q.useRef(16),f=q.useRef(null),{visible:p,text:v,disabled:c,transformation:d,pointerdown:m,onDobuleClick:_}=t,{x:b,y:w,fontFamily:x="Arial",fontWeight:E="normal",fontStyle:S="normal",fontSize:I=16,fontVariant:O="normal",fill:N="black",stroke:L,strokeThickness:k=0,blurRadius:$=0,blurEnabled:j=!1,dropShadowColor:ee=null,dropShadow:se=!1,dropShadowBlur:X=0,wordWrapWidth:H=5e7,leading:ve=0,letterSpacing:ke,colorCorrection:z={}}=d,{temperatureFilter:re,sharpnessFilter:ge,hueFilter:V,blurFilter:K,adjustmentFilter:he}=cs(z),{blurRadius:ye=0}=z;ie.useEffect(()=>{l.current=Number(I)},[I]);const xe=["italic","oblique"].includes(S)?S:void 0,Pe=["small-caps"].includes(O),Oe=["bold","bolder","lighter","100","200","300"].includes(E)?E:void 0,ze=Number(ke)>0?ke:void 0,He=ie.useMemo(()=>new Fr.TextStyle({fontFamily:x,fontSize:I,fill:N||"white",...L&&k>0&&{stroke:L,strokeThickness:k},...xe&&{fontStyle:xe},...Pe&&{fontVariant:Pe},...Oe&&{fontWeight:Oe},...ze&&{letterSpacing:ze},...j&&{dropShadow:!0,dropShadowBlur:Number($),dropShadowColor:(ee==null?void 0:ee.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...se&&{dropShadow:!0,dropShadowBlur:Number(X),dropShadowColor:(ee==null?void 0:ee.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:H||500,leading:ve||0}),[j,$,N,x,I,S,ve,xe,Oe,Pe,ze,ee,L,k,H,se,X]);ie.useEffect(()=>{f.current={...d}},[d]);const Ze=()=>{const W=new Date().getTime();W-i.current<300&&_?_():m&&m(),i.current=W},Q=()=>{_&&_()};return Fe.jsx(Wn,{...t,ref:e,isText:!0,onDoubleClick:Q,children:Fe.jsx(et.Container,{ref:n,children:Fe.jsx(et.Container,{alpha:1,ref:u,children:Fe.jsx(et.Text,{style:He,x:b,y:w,anchor:.5,text:v,alpha:p?1:0,...p&&!c&&{interactive:!0,buttonMode:!0,pointerdown:Ze},ref:a,filters:[re,ge,V,he,...ye>0?[K]:[]]})})})})});var VM=wr,XM=function(){return VM.Date.now()},jM=XM,WM=/\s/;function qM(t){for(var e=t.length;e--&&WM.test(t.charAt(e)););return e}var YM=qM,KM=YM,ZM=/^\s+/;function QM(t){return t&&t.slice(0,KM(t)+1).replace(ZM,"")}var JM=QM,eO=JM,xg=zi,tO=za,bg=0/0,rO=/^[-+]0x[0-9a-f]+$/i,nO=/^0b[01]+$/i,iO=/^0o[0-7]+$/i,sO=parseInt;function aO(t){if(typeof t=="number")return t;if(tO(t))return bg;if(xg(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=xg(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=eO(t);var r=nO.test(t);return r||iO.test(t)?sO(t.slice(2),r?2:8):rO.test(t)?bg:+t}var oO=aO,uO=zi,Dl=jM,wg=oO,lO="Expected a function",cO=Math.max,hO=Math.min;function fO(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(lO);e=wg(e)||0,uO(r)&&(v=!!r.leading,c="maxWait"in r,a=c?cO(wg(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(x,e),v?m(N):u}function b(N){var L=N-f,k=N-p,$=e-L;return c?hO($,a-k):$}function w(N){var L=N-f,k=N-p;return f===void 0||L>=e||L<0||c&&k>=a}function x(){var N=Dl();if(w(N))return E(N);l=setTimeout(x,b(N))}function E(N){return l=void 0,d&&n?m(N):(n=i=void 0,u)}function S(){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=w(N);if(n=arguments,i=this,f=N,L){if(l===void 0)return _(f);if(c)return clearTimeout(l),l=setTimeout(x,e),m(f)}return l===void 0&&(l=setTimeout(x,e)),u}return O.cancel=S,O.flush=I,O}var dO=fO;const qa=Hn(dO),pO=(t,e,r,n)=>{const i=q.useCallback(qa(t,n),[t,n]),a=q.useCallback(qa(e,n),[e,n]),u=q.useCallback(qa(r,n),[r,n]),l=q.useCallback(()=>{i()},[i]),f=q.useCallback(()=>{a()},[a]),p=q.useCallback(()=>{u()},[u]);return{onPointerOver:l,onPointerDown:f,onPointerOut:p}},gO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Tg=ie.forwardRef((t,e)=>{const[r,n]=ie.useState(0),[i,a]=ie.useState(),u=q.useRef(null),l=q.useRef(null),f=q.useRef(null),p=q.useRef(gO),v=q.useRef(),{uniqueId:c,mute:d=!1,src:m,startAt:_,endAt:b,frameStartAt:w,frameEndAt:x,visible:E,transformation:{x:S,y:I,width:O,height:N,animation:L,colorCorrection:k={}},pointerdown:$=()=>{},pointerout:j=()=>{},pointerover:ee=()=>{}}=t,{tl:se,dragModeRef:X}=q.useContext(gn),{onPointerDown:H,onPointerOut:ve,onPointerOver:ke}=pO(ee,$,j,1),{blurRadius:z=0}=k,{temperatureFilter:re,sharpnessFilter:ge,hueFilter:V,blurFilter:K,adjustmentFilter:he}=cs(k),ye=m||"",xe=ie.useMemo(()=>{const Q=document.createElement("video");return Q.src=m,Q.crossOrigin="Anonymus",Q.autoplay=!1,Q.currentTime=w===0?.001:w,Q},[m,w]);ot(Xe.PAUSE,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),ot(Xe.SCRUBBER_CLICKED,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),ot(Xe.REVERSE_MODE_END,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)});const Pe=ie.useCallback(qa(()=>{if(f.current){const Q=f.current;Q.currentTime>0&&!Q.paused&&!Q.ended&&Q.readyState>Q.HAVE_CURRENT_DATA&&f.current.pause(),p.current.isPlaying=!1}},400),[f]);ie.useEffect(()=>{f.current?(X.current?(Pe(),p.current.isPlaying=!1,p.current.isDragging=!0):p.current.isDragging=!1,f.current.muted=d):p.current.isDragging=!1},[d,X,Pe,f]);const Oe=Q=>{if(f.current){if(f.current.currentTime=Number(Q),!X.current){const W=f.current,ae=W.currentTime>0&&!W.paused&&!W.ended&&W.readyState>W.HAVE_CURRENT_DATA;se.current&&se.current.isActive()&&v.current&&v.current.isActive()&&(ae||f.current.play(),p.current.isPlaying=!0,n(Ee=>Ee+1))}p.current.progress=0}},ze=()=>{if(f.current){const Q=f.current;Q.currentTime>0&&!Q.paused&&!Q.ended&&Q.readyState>Q.HAVE_CURRENT_DATA&&f.current.pause(),p.current.isPlaying=!1,v.current&&(p.current.progress=v.current.progress())}},He=()=>{},Ze=()=>{var Q,W;if(v.current&&(p.current.progress=v.current.progress()),f.current&&v.current){const ae=w+((Q=v==null?void 0:v.current)==null?void 0:Q.time()),Ee=Math.abs(f.current.currentTime-ae),Ce=f.current,Qe=Ce.currentTime>0&&!Ce.paused&&!Ce.ended&&Ce.readyState>Ce.HAVE_CURRENT_DATA;X.current?(f.current.currentTime=ae,setTimeout(()=>{f.current&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},100),p.current.isPlaying=!1):(Qe!==p.current.isPlaying||!Qe)&&p.current.progress>.01&&p.current.progress<.99?(W=se.current)!=null&&W.isActive()&&v.current&&v.current.isActive()&&(Qe||f.current.play(),p.current.isPlaying=!0):Ee>.3&&p.current.progress>.01&&p.current.progress<.99&&(f.current.currentTime=ae)}};return q.useEffect(()=>{let Q=mt.context(()=>{});if(l.current&&se.current){const W={duration:Number(x)-Number(w),onStart:Oe,onComplete:ze,onStartParams:[w,x],onCompleteParams:[],onInterrupt:He,onUpdate:Ze,onUpdateParams:[w,x],onPause:()=>{console.log("onPause video sprite pause",c)},onResume:()=>{console.log("onResume video sprite resume",c)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",c)},onKill:()=>{console.log("onKill video sprite kill",c)}};Q=mt.context(()=>{v.current=mt.from(l.current,W,w),se.current.add(v.current,_)})}return()=>{v.current&&(v.current.kill(),mt.killTweensOf(v.current)),Q.revert()}},[L,_,b,w,x]),ie.useEffect(()=>{f.current&&(f.current.muted=d)},[d]),ie.useEffect(()=>{const Q=Math.round((Number(w)+Number.EPSILON)*100)/100,W=function(){f.current&&(f.current.currentTime=Q)},ae=function(){if(f.current){const mr=f.current;mr.currentTime>0&&!mr.paused&&!mr.ended&&mr.readyState>mr.HAVE_CURRENT_DATA&&f.current.pause()}p.current.isWaiting=!1,p.current.isStalled=!1},Ee=function(){f.current&&f.current.pause(),p.current.isWaiting=!0,p.current.isStalled=!1},Ce=function(){p.current.isWaiting=!1,p.current.isStalled=!1},Qe=function(){p.current.isWaiting=!1,p.current.isStalled=!0},gr=Math.round((Number(w)+Number.EPSILON)*100)/100,Ot=Math.round((Number(x)+Number.EPSILON)*100)/100,$r=`${ye}#t=${gr},${Ot}`;return Fr.Texture.fromLoader(xe,$r,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(mr=>{mr&&(a(mr),f.current=mr.baseTexture.resource.source,f.current.id=c,f.current.addEventListener("loadedmetadata",W),f.current.addEventListener("ended",ae),f.current.addEventListener("loadstart",Ee),f.current.addEventListener("canplaythrough",Ce),f.current.addEventListener("stalled",Qe))}),()=>{f.current&&(f.current.pause(),f.current.removeEventListener("loadedmetadata",W),f.current.removeEventListener("ended",ae),f.current.removeEventListener("loadstart",Ee),f.current.removeEventListener("canplaythrough",Ce),f.current.removeEventListener("stalled",Qe))}},[ye,c,w,x,xe]),ie.useEffect(()=>{const Q=setTimeout(()=>{i&&v.current&&se.current&&v.current.progress()<.1&&f.current&&!v.current.isActive()&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},30);return()=>{clearTimeout(Q)}},[i]),ie.useEffect(()=>{se.current&&!se.current.isActive()&&(p.current.isPlaying=!1,f.current&&f.current.pause());const Q=setTimeout(()=>{if(i&&se.current&&r>0){se.current.isActive()||(p.current.isPlaying=!1,f.current&&f.current.pause());const W=f.current;W&&se.current.isActive()&&v.current&&v.current.isActive()&&(W.currentTime>0&&!W.paused&&!W.ended&&W.readyState>W.HAVE_CURRENT_DATA||f.current.play(),p.current.isPlaying=!0)}},10);return()=>{clearTimeout(Q)}},[r,i]),Fe.jsx(Wn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:H,pointerover:ke,pointerout:ve,children:Fe.jsx(et.Container,{ref:l,children:i&&Fe.jsx(et.Sprite,{texture:i,width:O,height:N,anchor:.5,x:S,y:I,ref:u,alpha:E?1:0,...E&&{interactive:!0,pointerdown:$},filters:[re,ge,V,he,...z>0?[K]:[]]})})})});Tg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const mO=t=>{const{startAt:e,endAt:r,uniqueId:n}=t,i=q.useRef(null),a=q.useRef(null),u=q.useRef(null),l=q.useRef(null),f=q.useRef(!1),{tl:p,totalDuration:v=0,reverseModeRef:c}=q.useContext(gn),d=e<.2?"static":"none";ot(Xe.COMPLETE,()=>{i.current&&(i.current.eventMode=d)}),ot(Xe.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 ot(Xe.COMPLETE,()=>{}),ie.useEffect(()=>{const _=mt.context(()=>{if(i.current&&p.current){const b=mt.to(i.current,{alpha:1,duration:.1});l.current=mt.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([b,l.current],e)}});return()=>{l.current&&(p.current.remove(l.current),l.current.progress(0).kill()),_.revert()}},[e,r,v,n]),Fe.jsx(et.Container,{ref:i,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:Fe.jsx(et.Container,{ref:u,children:Fe.jsx(et.Container,{ref:a,alpha:1,children:t.children})})})},vO=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:n}=q.useContext(gn);return ie.useEffect(()=>{n&&n(Number(r)+.2)},[e,r]),t.children};var Ag=(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))(Ag||{}),Sg=(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))(Sg||{});Ve.Animations=Ag,Ve.BlendModes=Sg,Ve.Events=Xe,Ve.GsapPixieContext=gn,Ve.GsapPixieContextProvider=dv,Ve.PixiAnimatedSprite=vg,Ve.PixiAudioSprite=nE,Ve.PixiGifSprite=yg,Ve.PixiImageSprite=pp,Ve.PixiSequence=mO,Ve.PixiSequenceWrapper=vO,Ve.PixiSvgPathSprite=rE,Ve.PixiTextSprite=HM,Ve.PixiVideoSprite=Tg,Ve.emitCustomEvent=Vn,Ve.newCustomEventEmitter=fv,Ve.useCustomEventListener=ot,Object.defineProperty(Ve,Symbol.toStringTag,{value:"Module"})});
|
|
1992
|
+
}`;var me=ev(function(){return ke(A,te+"return "+G).apply(r,C)});if(me.source=G,Kc(me))throw me;return me}function aD(s){return $e(s).toLowerCase()}function oD(s){return $e(s).toUpperCase()}function uD(s,o,h){if(s=$e(s),s&&(h||o===r))return lm(s);if(!s||!(o=Yt(o)))return s;var g=wr(s),y=wr(o),A=cm(g,y),C=hm(g,y)+1;return gn(g,A,C).join("")}function lD(s,o,h){if(s=$e(s),s&&(h||o===r))return s.slice(0,dm(s)+1);if(!s||!(o=Yt(o)))return s;var g=wr(s),y=hm(g,wr(o))+1;return gn(g,0,y).join("")}function cD(s,o,h){if(s=$e(s),s&&(h||o===r))return s.replace(Kl,"");if(!s||!(o=Yt(o)))return s;var g=wr(s),y=cm(g,wr(o));return gn(g,y).join("")}function hD(s,o){var h=j,g=Q;if(ut(o)){var y="separator"in o?o.separator:y;h="length"in o?pe(o.length):h,g="omission"in o?Yt(o.omission):g}s=$e(s);var A=s.length;if(Oi(s)){var C=wr(s);A=C.length}if(h>=A)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 D,U=M;for(y.global||(y=dc(y.source,$e(Mg.exec(y))+"g")),y.lastIndex=0;D=y.exec(U);)var G=D.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 fD(s){return s=$e(s),s&&TO.test(s)?s.replace(Ig,GF):s}var dD=$i(function(s,o,h){return s+(h?" ":"")+o.toUpperCase()}),eh=t0("toUpperCase");function J0(s,o,h){return s=$e(s),o=h?r:o,o===r?kF(s)?VF(s):CF(s):s.match(o)||[]}var ev=ve(function(s,o){try{return Wt(s,r,o)}catch(h){return Kc(h)?h:new ce(h)}}),pD=qr(function(s,o){return rr(o,function(h){h=kr(h),jr(s,h,qc(s[h],s))}),s});function gD(s){var o=s==null?0:s.length,h=se();return s=o?it(s,function(g){if(typeof g[1]!="function")throw new nr(u);return[h(g[0]),g[1]]}):[],ve(function(g){for(var y=-1;++y<o;){var A=s[y];if(Wt(A[0],this,g))return Wt(A[1],this,g)}})}function mD(s){return G3(sr(s,c))}function th(s){return function(){return s}}function vD(s,o){return s==null||s!==s?o:s}var _D=n0(),yD=n0(!0);function Vt(s){return s}function rh(s){return Fm(typeof s=="function"?s:sr(s,c))}function xD(s){return Lm(sr(s,c))}function bD(s,o){return km(s,sr(o,c))}var wD=ve(function(s,o){return function(h){return Rs(h,s,o)}}),TD=ve(function(s,o){return function(h){return Rs(s,h,o)}});function nh(s,o,h){var g=Tt(o),y=xo(o,g);h==null&&!(ut(o)&&(y.length||!g.length))&&(h=o,o=s,s=this,y=xo(o,Tt(o)));var A=!(ut(h)&&"chain"in h)||!!h.chain,C=Kr(s);return rr(y,function(R){var M=o[R];s[R]=M,C&&(s.prototype[R]=function(){var D=this.__chain__;if(A||D){var U=s(this.__wrapped__),G=U.__actions__=Gt(this.__actions__);return G.push({func:M,args:arguments,thisArg:s}),U.__chain__=D,U}return M.apply(s,ln([this.value()],arguments))})}),s}function AD(){return Et._===this&&(Et._=KF),this}function ih(){}function SD(s){return s=pe(s),ve(function(o){return Bm(o,s)})}var ED=Lc(it),CD=Lc(im),ID=Lc(ac);function tv(s){return zc(s)?oc(kr(s)):iN(s)}function RD(s){return function(o){return s==null?r:zn(s,o)}}var PD=s0(),MD=s0(!0);function sh(){return[]}function ah(){return!1}function OD(){return{}}function FD(){return""}function ND(){return!0}function LD(s,o){if(s=pe(s),s<1||s>ee)return[];var h=Y,g=Mt(s,Y);o=se(o),s-=Y;for(var y=cc(g,o);++h<s;)o(h);return y}function kD(s){return he(s)?it(s,kr):Kt(s)?[s]:Gt(b0($e(s)))}function BD(s){var o=++qF;return $e(s)+o}var DD=Eo(function(s,o){return s+o},0),UD=kc("ceil"),$D=Eo(function(s,o){return s/o},1),GD=kc("floor");function zD(s){return s&&s.length?yo(s,Vt,bc):r}function HD(s,o){return s&&s.length?yo(s,se(o,2),bc):r}function VD(s){return om(s,Vt)}function XD(s,o){return om(s,se(o,2))}function jD(s){return s&&s.length?yo(s,Vt,Sc):r}function WD(s,o){return s&&s.length?yo(s,se(o,2),Sc):r}var qD=Eo(function(s,o){return s*o},1),YD=kc("round"),KD=Eo(function(s,o){return s-o},0);function ZD(s){return s&&s.length?lc(s,Vt):0}function QD(s,o){return s&&s.length?lc(s,se(o,2)):0}return T.after=xk,T.ary=O0,T.assign=oB,T.assignIn=j0,T.assignInWith=Uo,T.assignWith=uB,T.at=lB,T.before=F0,T.bind=qc,T.bindAll=pD,T.bindKey=N0,T.castArray=Ok,T.chain=R0,T.chunk=GN,T.compact=zN,T.concat=HN,T.cond=gD,T.conforms=mD,T.constant=th,T.countBy=ZL,T.create=cB,T.curry=L0,T.curryRight=k0,T.debounce=B0,T.defaults=hB,T.defaultsDeep=fB,T.defer=bk,T.delay=wk,T.difference=VN,T.differenceBy=XN,T.differenceWith=jN,T.drop=WN,T.dropRight=qN,T.dropRightWhile=YN,T.dropWhile=KN,T.fill=ZN,T.filter=JL,T.flatMap=rk,T.flatMapDeep=nk,T.flatMapDepth=ik,T.flatten=S0,T.flattenDeep=QN,T.flattenDepth=JN,T.flip=Tk,T.flow=_D,T.flowRight=yD,T.fromPairs=eL,T.functions=yB,T.functionsIn=xB,T.groupBy=sk,T.initial=rL,T.intersection=nL,T.intersectionBy=iL,T.intersectionWith=sL,T.invert=wB,T.invertBy=TB,T.invokeMap=ok,T.iteratee=rh,T.keyBy=uk,T.keys=Tt,T.keysIn=Ht,T.map=Fo,T.mapKeys=SB,T.mapValues=EB,T.matches=xD,T.matchesProperty=bD,T.memoize=Lo,T.merge=CB,T.mergeWith=W0,T.method=wD,T.methodOf=TD,T.mixin=nh,T.negate=ko,T.nthArg=SD,T.omit=IB,T.omitBy=RB,T.once=Ak,T.orderBy=lk,T.over=ED,T.overArgs=Sk,T.overEvery=CD,T.overSome=ID,T.partial=Yc,T.partialRight=D0,T.partition=ck,T.pick=PB,T.pickBy=q0,T.property=tv,T.propertyOf=RD,T.pull=lL,T.pullAll=C0,T.pullAllBy=cL,T.pullAllWith=hL,T.pullAt=fL,T.range=PD,T.rangeRight=MD,T.rearg=Ek,T.reject=dk,T.remove=dL,T.rest=Ck,T.reverse=jc,T.sampleSize=gk,T.set=OB,T.setWith=FB,T.shuffle=mk,T.slice=pL,T.sortBy=yk,T.sortedUniq=bL,T.sortedUniqBy=wL,T.split=rD,T.spread=Ik,T.tail=TL,T.take=AL,T.takeRight=SL,T.takeRightWhile=EL,T.takeWhile=CL,T.tap=zL,T.throttle=Rk,T.thru=Oo,T.toArray=H0,T.toPairs=Y0,T.toPairsIn=K0,T.toPath=kD,T.toPlainObject=X0,T.transform=NB,T.unary=Pk,T.union=IL,T.unionBy=RL,T.unionWith=PL,T.uniq=ML,T.uniqBy=OL,T.uniqWith=FL,T.unset=LB,T.unzip=Wc,T.unzipWith=I0,T.update=kB,T.updateWith=BB,T.values=Hi,T.valuesIn=DB,T.without=NL,T.words=J0,T.wrap=Mk,T.xor=LL,T.xorBy=kL,T.xorWith=BL,T.zip=DL,T.zipObject=UL,T.zipObjectDeep=$L,T.zipWith=GL,T.entries=Y0,T.entriesIn=K0,T.extend=j0,T.extendWith=Uo,nh(T,T),T.add=DD,T.attempt=ev,T.camelCase=zB,T.capitalize=Z0,T.ceil=UD,T.clamp=UB,T.clone=Fk,T.cloneDeep=Lk,T.cloneDeepWith=kk,T.cloneWith=Nk,T.conformsTo=Bk,T.deburr=Q0,T.defaultTo=vD,T.divide=$D,T.endsWith=HB,T.eq=Ar,T.escape=VB,T.escapeRegExp=XB,T.every=QL,T.find=ek,T.findIndex=T0,T.findKey=dB,T.findLast=tk,T.findLastIndex=A0,T.findLastKey=pB,T.floor=GD,T.forEach=P0,T.forEachRight=M0,T.forIn=gB,T.forInRight=mB,T.forOwn=vB,T.forOwnRight=_B,T.get=Qc,T.gt=Dk,T.gte=Uk,T.has=bB,T.hasIn=Jc,T.head=E0,T.identity=Vt,T.includes=ak,T.indexOf=tL,T.inRange=$B,T.invoke=AB,T.isArguments=Xn,T.isArray=he,T.isArrayBuffer=$k,T.isArrayLike=zt,T.isArrayLikeObject=ft,T.isBoolean=Gk,T.isBuffer=mn,T.isDate=zk,T.isElement=Hk,T.isEmpty=Vk,T.isEqual=Xk,T.isEqualWith=jk,T.isError=Kc,T.isFinite=Wk,T.isFunction=Kr,T.isInteger=U0,T.isLength=Bo,T.isMap=$0,T.isMatch=qk,T.isMatchWith=Yk,T.isNaN=Kk,T.isNative=Zk,T.isNil=Jk,T.isNull=Qk,T.isNumber=G0,T.isObject=ut,T.isObjectLike=ct,T.isPlainObject=Ls,T.isRegExp=Zc,T.isSafeInteger=eB,T.isSet=z0,T.isString=Do,T.isSymbol=Kt,T.isTypedArray=zi,T.isUndefined=tB,T.isWeakMap=rB,T.isWeakSet=nB,T.join=aL,T.kebabCase=jB,T.last=or,T.lastIndexOf=oL,T.lowerCase=WB,T.lowerFirst=qB,T.lt=iB,T.lte=sB,T.max=zD,T.maxBy=HD,T.mean=VD,T.meanBy=XD,T.min=jD,T.minBy=WD,T.stubArray=sh,T.stubFalse=ah,T.stubObject=OD,T.stubString=FD,T.stubTrue=ND,T.multiply=qD,T.nth=uL,T.noConflict=AD,T.noop=ih,T.now=No,T.pad=YB,T.padEnd=KB,T.padStart=ZB,T.parseInt=QB,T.random=GB,T.reduce=hk,T.reduceRight=fk,T.repeat=JB,T.replace=eD,T.result=MB,T.round=YD,T.runInContext=P,T.sample=pk,T.size=vk,T.snakeCase=tD,T.some=_k,T.sortedIndex=gL,T.sortedIndexBy=mL,T.sortedIndexOf=vL,T.sortedLastIndex=_L,T.sortedLastIndexBy=yL,T.sortedLastIndexOf=xL,T.startCase=nD,T.startsWith=iD,T.subtract=KD,T.sum=ZD,T.sumBy=QD,T.template=sD,T.times=LD,T.toFinite=Zr,T.toInteger=pe,T.toLength=V0,T.toLower=aD,T.toNumber=ur,T.toSafeInteger=aB,T.toString=$e,T.toUpper=oD,T.trim=uD,T.trimEnd=lD,T.trimStart=cD,T.truncate=hD,T.unescape=fD,T.uniqueId=BD,T.upperCase=dD,T.upperFirst=eh,T.each=P0,T.eachRight=M0,T.first=E0,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,rr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){T[s].placeholder=T}),rr(["drop","take"],function(s,o){Se.prototype[s]=function(h){h=h===r?1:_t(pe(h),0);var g=this.__filtered__&&!o?new Se(this):this.clone();return g.__filtered__?g.__takeCount__=Mt(h,g.__takeCount__):g.__views__.push({size:Mt(h,Y),type:s+(g.__dir__<0?"Right":"")}),g},Se.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),rr(["filter","map","takeWhile"],function(s,o){var h=o+1,g=h==V||h==Re;Se.prototype[s]=function(y){var A=this.clone();return A.__iteratees__.push({iteratee:se(y,3),type:h}),A.__filtered__=A.__filtered__||g,A}}),rr(["head","last"],function(s,o){var h="take"+(o?"Right":"");Se.prototype[s]=function(){return this[h](1).value()[0]}}),rr(["initial","tail"],function(s,o){var h="drop"+(o?"":"Right");Se.prototype[s]=function(){return this.__filtered__?new Se(this):this[h](1)}}),Se.prototype.compact=function(){return this.filter(Vt)},Se.prototype.find=function(s){return this.filter(s).head()},Se.prototype.findLast=function(s){return this.reverse().find(s)},Se.prototype.invokeMap=ve(function(s,o){return typeof s=="function"?new Se(this):this.map(function(h){return Rs(h,s,o)})}),Se.prototype.reject=function(s){return this.filter(ko(se(s)))},Se.prototype.slice=function(s,o){s=pe(s);var h=this;return h.__filtered__&&(s>0||o<0)?new Se(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),o!==r&&(o=pe(o),h=o<0?h.dropRight(-o):h.take(o-s)),h)},Se.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Se.prototype.toArray=function(){return this.take(Y)},Nr(Se.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],A=g||/^find/.test(o);y&&(T.prototype[o]=function(){var C=this.__wrapped__,R=g?[1]:arguments,M=C instanceof Se,D=R[0],U=M||he(C),G=function(xe){var Ce=y.apply(T,ln([xe],R));return g&&q?Ce[0]:Ce};U&&h&&typeof D=="function"&&D.length!=1&&(M=U=!1);var q=this.__chain__,te=!!this.__actions__.length,ae=A&&!q,me=M&&!te;if(!A&&U){C=me?C:new Se(this);var oe=s.apply(C,R);return oe.__actions__.push({func:Oo,args:[G],thisArg:r}),new ir(oe,q)}return ae&&me?s.apply(this,R):(oe=this.thru(G),ae?g?oe.value()[0]:oe.value():oe)})}),rr(["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 A=this.value();return o.apply(he(A)?A:[],y)}return this[h](function(C){return o.apply(he(C)?C:[],y)})}}),Nr(Se.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[So(r,x).name]=[{name:"wrapper",func:r}],Se.prototype.clone=f3,Se.prototype.reverse=d3,Se.prototype.value=p3,T.prototype.at=HL,T.prototype.chain=VL,T.prototype.commit=XL,T.prototype.next=jL,T.prototype.plant=qL,T.prototype.reverse=YL,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=KL,T.prototype.first=T.prototype.head,ws&&(T.prototype[ws]=WL),T},Ni=XF();Bn?((Bn.exports=Ni)._=Ni,rc._=Ni):Et._=Ni}).call(At)}(Ya,Ya.exports);var xg=Ya.exports;const HM={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},bg=ie.forwardRef((t,e)=>{const[r,n]=ie.useState([]),[,i]=ie.useState(0),[a,u]=ie.useState([]),[,l]=W.useState(!1),[f,p]=FM({autoPlay:!1}),v=W.useRef(null),c=W.useRef(null),d=W.useRef(HM),m=W.useRef(),{tl:_,dragModeRef:b}=W.useContext(_n),{frames:w,delays:x}=f,{src:E,startAt:S,endAt:I,frameStartAt:O,frameEndAt:N,loop:L,visible:k,disabled:$,transformation:{width:j=0,height:Q=0,x:de,y:H,animation:V,colorCorrection:ge={}},pointerdown:Re}=t,{temperatureFilter:z,sharpnessFilter:ee,hueFilter:fe,blurFilter:X,adjustmentFilter:Y,vignetteFilter:le,noiseFilter:we}=ps(ge),{blurRadius:ye=0,vignette:Me=0,noise:Oe=0}=ge,ze=.1;GM(E,p),lt(Xe.PAUSE,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),lt(Xe.SEEK_END,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),lt(Xe.SCRUBBER_CLICKED,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),ie.useEffect(()=>{d.current&&v.current&&(b.current?(v.current.stop(),d.current.isPlaying=!1,d.current.isDragging=!0):d.current.isDragging=!1)},[b]),ie.useEffect(()=>{if(!Qo(w)){const J=lM(w,gt=>{const{data:Ut,width:$t,height:Lt}=gt,Hr=new Uint8Array(Ut);return lr.Texture.fromBuffer(Hr,$t,Lt)}),ne=J.map((gt,Ut)=>({texture:gt,time:x[Ut]}));n(J),u(ne);let Ae=0;x.forEach(gt=>{Ae+=gt*10}),i(Ae),d.current.totalDuration=Ae,d.current.totalFrames=w.length}},[w,x]);const De=xg.debounce(J=>{if(v.current){let ne=J===0?0:J/ze;ne=isNaN(ne)?0:ne;const Ae=d.current.totalFrames;ne=ne>Ae?Ae:ne,ne>=Ae?(v.current.gotoAndStop(0),d.current.isPlaying=!1):(v.current.gotoAndPlay(ne||0),d.current.isPlaying=!0)}},20),Ye=xg.debounce(()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},50),Ke=J=>{if(v.current){let ne=J===0?0:J/ze;ne=isNaN(ne)?0:ne;const Ae=d.current.totalFrames;ne=ne>Ae?Ae:ne,ne>=Ae?(v.current.gotoAndStop(0),d.current.isPlaying=!1):(v.current.gotoAndPlay(ne||0),d.current.isPlaying=!0)}},Te=()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},Ue=()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)},Ze=J=>{var Ae;const ne=J+((Ae=m.current)==null?void 0:Ae.time());v.current&&b.current?(De(ne),Ye(),d.current.isPlaying=!1):m.current&&v.current&&!d.current.isPlaying&&m.current.isActive()&&_.current.isActive()&&(De(ne),d.current.isPlaying=!0)},Qe=()=>{l(!0)};return W.useEffect(()=>{let J=yt.context(()=>{});if(c.current&&_.current){const ne={duration:Number(N)-Number(O),onStart:Ke,onComplete:Te,onStartParams:[O,N],onCompleteParams:[],onInterrupt:Ue,onUpdate:Ze,onUpdateParams:[O,N]};m.current&&m.current.kill(),J=yt.context(()=>{m.current=yt.from(c.current,ne,O),_.current.add(m.current,S)})}return()=>{m.current&&(m.current.kill(),yt.killTweensOf(m.current)),J.revert()}},[V,S,I,O,N]),Fe.jsx(Kn,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:Fe.jsx(rt.Container,{ref:c,children:r&&r.length>0&&Fe.jsx(yg,{x:de,y:H,width:j,height:Q,animationSpeed:1,alpha:k?1:0,loop:L,textures:a,onComplete:Qe,anchor:.5,forwardRef:v,...!$&&k&&{interactive:!0,pointerdown:Re},filters:[z,ee,fe,Y,...ye>0?[X]:[],...Me>0?[le]:[],...Oe>0?[we]:[]]})})})});bg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const VM=ie.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:w,fontFamily:x="Arial",fontWeight:E="normal",fontStyle:S="normal",fontSize:I=16,fontVariant:O="normal",fill:N="black",stroke:L,strokeThickness:k=0,blurRadius:$=0,blurEnabled:j=!1,dropShadowColor:Q=null,dropShadow:de=!1,dropShadowBlur:H=0,wordWrapWidth:V=5e7,leading:ge=0,letterSpacing:Re,colorCorrection:z={}}=d,{temperatureFilter:ee,sharpnessFilter:fe,hueFilter:X,blurFilter:Y,adjustmentFilter:le}=ps(z),{blurRadius:we=0}=z;ie.useEffect(()=>{l.current=Number(I)},[I]);const ye=["italic","oblique"].includes(S)?S:void 0,Me=["small-caps"].includes(O),Oe=["bold","bolder","lighter","100","200","300"].includes(E)?E:void 0,ze=Number(Re)>0?Re:void 0,De=ie.useMemo(()=>new lr.TextStyle({fontFamily:x,fontSize:I,fill:N||"white",...L&&k>0&&{stroke:L,strokeThickness:k},...ye&&{fontStyle:ye},...Me&&{fontVariant:Me},...Oe&&{fontWeight:Oe},...ze&&{letterSpacing:ze},...j&&{dropShadow:!0,dropShadowBlur:Number($),dropShadowColor:(Q==null?void 0:Q.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...de&&{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:ge||0}),[j,$,N,x,I,S,ge,ye,Oe,Me,ze,Q,L,k,V,de,H]);ie.useEffect(()=>{f.current={...d}},[d]);const Ye=()=>{const Te=new Date().getTime();Te-i.current<300&&_?_():m&&m(),i.current=Te},Ke=()=>{!c&&_&&_()};return Fe.jsx(Kn,{...t,ref:e,isText:!0,onDoubleClick:Ke,children:Fe.jsx(rt.Container,{ref:n,children:Fe.jsx(rt.Container,{alpha:1,ref:u,children:Fe.jsx(rt.Text,{style:De,x:b,y:w,anchor:.5,text:v,alpha:p?1:0,...p&&!c&&{interactive:!0,buttonMode:!0,pointerdown:Ye},ref:a,filters:[ee,fe,X,le,...we>0?[Y]:[]]})})})})});var XM=Er,jM=function(){return XM.Date.now()},WM=jM,qM=/\s/;function YM(t){for(var e=t.length;e--&&qM.test(t.charAt(e)););return e}var KM=YM,ZM=KM,QM=/^\s+/;function JM(t){return t&&t.slice(0,ZM(t)+1).replace(QM,"")}var eO=JM,tO=eO,wg=ji,rO=Va,Tg=0/0,nO=/^[-+]0x[0-9a-f]+$/i,iO=/^0b[01]+$/i,sO=/^0o[0-7]+$/i,aO=parseInt;function oO(t){if(typeof t=="number")return t;if(rO(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=tO(t);var r=iO.test(t);return r||sO.test(t)?aO(t.slice(2),r?2:8):nO.test(t)?Tg:+t}var uO=oO,lO=ji,Ul=WM,Ag=uO,cO="Expected a function",hO=Math.max,fO=Math.min;function dO(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(cO);e=Ag(e)||0,lO(r)&&(v=!!r.leading,c="maxWait"in r,a=c?hO(Ag(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(x,e),v?m(N):u}function b(N){var L=N-f,k=N-p,$=e-L;return c?fO($,a-k):$}function w(N){var L=N-f,k=N-p;return f===void 0||L>=e||L<0||c&&k>=a}function x(){var N=Ul();if(w(N))return E(N);l=setTimeout(x,b(N))}function E(N){return l=void 0,d&&n?m(N):(n=i=void 0,u)}function S(){l!==void 0&&clearTimeout(l),p=0,n=f=i=l=void 0}function I(){return l===void 0?u:E(Ul())}function O(){var N=Ul(),L=w(N);if(n=arguments,i=this,f=N,L){if(l===void 0)return _(f);if(c)return clearTimeout(l),l=setTimeout(x,e),m(f)}return l===void 0&&(l=setTimeout(x,e)),u}return O.cancel=S,O.flush=I,O}var pO=dO;const Ka=jn(pO),gO=(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}},mO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Sg=ie.forwardRef((t,e)=>{const[r,n]=ie.useState(0),[i,a]=ie.useState(),u=W.useRef(null),l=W.useRef(null),f=W.useRef(null),p=W.useRef(mO),v=W.useRef(),{uniqueId:c,mute:d=!1,src:m,startAt:_,endAt:b,frameStartAt:w,frameEndAt:x,visible:E,disabled:S,transformation:{x:I,y:O,width:N,height:L,animation:k,colorCorrection:$={}},pointerdown:j=()=>{},pointerout:Q=()=>{},pointerover:de=()=>{}}=t,{tl:H,dragModeRef:V}=W.useContext(_n),{onPointerDown:ge,onPointerOut:Re,onPointerOver:z}=gO(de,j,Q,1),{blurRadius:ee=0,vignette:fe=0,noise:X=0}=$,{temperatureFilter:Y,sharpnessFilter:le,hueFilter:we,blurFilter:ye,adjustmentFilter:Me,vignetteFilter:Oe,noiseFilter:ze}=ps($),De=m||"",Ye=ie.useMemo(()=>{const J=document.createElement("video");return J.src=m,J.crossOrigin="Anonymus",J.autoplay=!1,J.currentTime=w===0?.001:w,J},[m,w]);lt(Xe.PAUSE,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),lt(Xe.SCRUBBER_CLICKED,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),lt(Xe.REVERSE_MODE_END,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)});const Ke=ie.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]);ie.useEffect(()=>{f.current?(V.current?(Ke(),p.current.isPlaying=!1,p.current.isDragging=!0):p.current.isDragging=!1,f.current.muted=d):p.current.isDragging=!1},[d,V,Ke,f]);const Te=J=>{if(f.current){if(f.current.currentTime=Number(J),!V.current){const ne=f.current,Ae=ne.currentTime>0&&!ne.paused&&!ne.ended&&ne.readyState>ne.HAVE_CURRENT_DATA;H.current&&H.current.isActive()&&v.current&&v.current.isActive()&&(Ae||f.current.play(),p.current.isPlaying=!0,n(gt=>gt+1))}p.current.progress=0}},Ue=()=>{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())}},Ze=()=>{},Qe=()=>{var J,ne;if(v.current&&(p.current.progress=v.current.progress()),f.current&&v.current){const Ae=w+((J=v==null?void 0:v.current)==null?void 0:J.time()),gt=Math.abs(f.current.currentTime-Ae),Ut=f.current,$t=Ut.currentTime>0&&!Ut.paused&&!Ut.ended&&Ut.readyState>Ut.HAVE_CURRENT_DATA;V.current?(f.current.currentTime=Ae,setTimeout(()=>{f.current&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},100),p.current.isPlaying=!1):($t!==p.current.isPlaying||!$t)&&p.current.progress>.01&&p.current.progress<.99?(ne=H.current)!=null&&ne.isActive()&&v.current&&v.current.isActive()&&($t||f.current.play(),p.current.isPlaying=!0):gt>.3&&p.current.progress>.01&&p.current.progress<.99&&(f.current.currentTime=Ae)}};return W.useEffect(()=>{let J=yt.context(()=>{});if(l.current&&H.current){const ne={duration:Number(x)-Number(w),onStart:Te,onComplete:Ue,onStartParams:[w,x],onCompleteParams:[],onInterrupt:Ze,onUpdate:Qe,onUpdateParams:[w,x],onPause:()=>{console.log("onPause video sprite pause",c)},onResume:()=>{console.log("onResume video sprite resume",c)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",c)},onKill:()=>{console.log("onKill video sprite kill",c)}};J=yt.context(()=>{v.current=yt.from(l.current,ne,w),H.current.add(v.current,_)})}return()=>{v.current&&(v.current.kill(),yt.killTweensOf(v.current)),J.revert()}},[k,_,b,w,x]),ie.useEffect(()=>{f.current&&(f.current.muted=d)},[d]),ie.useEffect(()=>{const J=Math.round((Number(w)+Number.EPSILON)*100)/100,ne=function(){f.current&&(f.current.currentTime=J)},Ae=function(){if(f.current){const br=f.current;br.currentTime>0&&!br.paused&&!br.ended&&br.readyState>br.HAVE_CURRENT_DATA&&f.current.pause()}p.current.isWaiting=!1,p.current.isStalled=!1},gt=function(){f.current&&f.current.pause(),p.current.isWaiting=!0,p.current.isStalled=!1},Ut=function(){p.current.isWaiting=!1,p.current.isStalled=!1},$t=function(){p.current.isWaiting=!1,p.current.isStalled=!0},Lt=Math.round((Number(w)+Number.EPSILON)*100)/100,Hr=Math.round((Number(x)+Number.EPSILON)*100)/100,Ci=`${De}#t=${Lt},${Hr}`;return lr.Texture.fromLoader(Ye,Ci,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(br=>{br&&(a(br),f.current=br.baseTexture.resource.source,f.current.id=c,f.current.addEventListener("loadedmetadata",ne),f.current.addEventListener("ended",Ae),f.current.addEventListener("loadstart",gt),f.current.addEventListener("canplaythrough",Ut),f.current.addEventListener("stalled",$t))}),()=>{f.current&&(f.current.pause(),f.current.removeEventListener("loadedmetadata",ne),f.current.removeEventListener("ended",Ae),f.current.removeEventListener("loadstart",gt),f.current.removeEventListener("canplaythrough",Ut),f.current.removeEventListener("stalled",$t))}},[De,c,w,x,Ye]),ie.useEffect(()=>{const J=setTimeout(()=>{i&&v.current&&H.current&&v.current.progress()<.1&&f.current&&!v.current.isActive()&&f.current.play().then(()=>{p.current.isPlaying=!1,f.current&&f.current.pause()})},30);return()=>{clearTimeout(J)}},[i]),ie.useEffect(()=>{H.current&&!H.current.isActive()&&(p.current.isPlaying=!1,f.current&&f.current.pause());const J=setTimeout(()=>{if(i&&H.current&&r>0){H.current.isActive()||(p.current.isPlaying=!1,f.current&&f.current.pause());const ne=f.current;ne&&H.current.isActive()&&v.current&&v.current.isActive()&&(ne.currentTime>0&&!ne.paused&&!ne.ended&&ne.readyState>ne.HAVE_CURRENT_DATA||f.current.play(),p.current.isPlaying=!0)}},10);return()=>{clearTimeout(J)}},[r,i]),Fe.jsx(Kn,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:ge,pointerover:z,pointerout:Re,children:Fe.jsx(rt.Container,{ref:l,children:i&&Fe.jsx(rt.Sprite,{texture:i,width:N,height:L,anchor:.5,x:I,y:O,ref:u,alpha:E?1:0,...!S&&E&&{interactive:!0,pointerdown:j},filters:[Y,le,we,Me,...ee>0?[ye]:[],...fe>0?[Oe]:[],...X>0?[ze]:[]]})})})});Sg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const vO=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";lt(Xe.COMPLETE,()=>{i.current&&(i.current.eventMode=d)}),lt(Xe.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 lt(Xe.COMPLETE,()=>{}),ie.useEffect(()=>{const _=yt.context(()=>{if(i.current&&p.current){const b=yt.to(i.current,{alpha:1,duration:.1});l.current=yt.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([b,l.current],e)}});return()=>{l.current&&(p.current.remove(l.current),l.current.progress(0).kill()),_.revert()}},[e,r,v,n]),Fe.jsx(rt.Container,{ref:i,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:Fe.jsx(rt.Container,{ref:u,children:Fe.jsx(rt.Container,{ref:a,alpha:1,children:t.children})})})},_O=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:n}=W.useContext(_n);return ie.useEffect(()=>{n&&n(Number(r)+.2)},[e,r]),t.children};var Eg=(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))(Eg||{}),Cg=(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))(Cg||{});Ve.Animations=Eg,Ve.BlendModes=Cg,Ve.Events=Xe,Ve.GsapPixieContext=_n,Ve.GsapPixieContextProvider=gv,Ve.PixiAnimatedSprite=yg,Ve.PixiAudioSprite=iE,Ve.PixiGifSprite=bg,Ve.PixiImageSprite=mp,Ve.PixiSequence=vO,Ve.PixiSequenceWrapper=_O,Ve.PixiSvgPathSprite=nE,Ve.PixiTextSprite=VM,Ve.PixiVideoSprite=Sg,Ve.emitCustomEvent=Wn,Ve.newCustomEventEmitter=pv,Ve.useCustomEventListener=lt,Object.defineProperty(Ve,Symbol.toStringTag,{value:"Module"})});
|